summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/freescale/fman/fman_mac.h
diff options
context:
space:
mode:
authorSean Anderson <sean.anderson@seco.com>2022-08-18 19:16:29 +0300
committerJakub Kicinski <kuba@kernel.org>2022-08-20 02:35:54 +0300
commitaae73fde7eb33d407257dceffb7aed0bcdaf247a (patch)
tree76c884febef91e5582f32d064fcd7e4dd4d09c07 /drivers/net/ethernet/freescale/fman/fman_mac.h
parente61406a1955eb968aed43ffb35301ff969d7522f (diff)
downloadlinux-aae73fde7eb33d407257dceffb7aed0bcdaf247a.tar.xz
net: fman: dtsec: Always gracefully stop/start
There are two ways that GRS can be set: graceful_stop and dtsec_isr. It is cleared by graceful_start. If it is already set before calling graceful_stop, then that means that dtsec_isr set it. In that case, we will not set GRS nor will we clear it (which seems like a bug?). For GTS the logic is similar, except that there is no one else messing with this bit (so we will always set and clear it). Simplify the logic by always setting/clearing GRS/GTS. This is less racy that the previous behavior, and ensures that we always end up clearing the bits. This can of course clear GRS while dtsec_isr is waiting, but because we have already done our own waiting it should be fine. This is the last user of enum comm_mode, so remove it. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Acked-by: Camelia Groza <camelia.groza@nxp.com> Tested-by: Camelia Groza <camelia.groza@nxp.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/freescale/fman/fman_mac.h')
-rw-r--r--drivers/net/ethernet/freescale/fman/fman_mac.h10
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/net/ethernet/freescale/fman/fman_mac.h b/drivers/net/ethernet/freescale/fman/fman_mac.h
index 19f327efdaff..418d1de85702 100644
--- a/drivers/net/ethernet/freescale/fman/fman_mac.h
+++ b/drivers/net/ethernet/freescale/fman/fman_mac.h
@@ -75,16 +75,6 @@ typedef u8 enet_addr_t[ETH_ALEN];
#define ETH_HASH_ENTRY_OBJ(ptr) \
hlist_entry_safe(ptr, struct eth_hash_entry, node)
-/* Enumeration (bit flags) of communication modes (Transmit,
- * receive or both).
- */
-enum comm_mode {
- COMM_MODE_NONE = 0, /* No transmit/receive communication */
- COMM_MODE_RX = 1, /* Only receive communication */
- COMM_MODE_TX = 2, /* Only transmit communication */
- COMM_MODE_RX_AND_TX = 3 /* Both transmit and receive communication */
-};
-
/* FM MAC Exceptions */
enum fman_mac_exceptions {
FM_MAC_EX_10G_MDIO_SCAN_EVENT = 0