summaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/net_driver.h
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2008-09-01 12:48:17 +0100
committerJeff Garzik <jgarzik@redhat.com>2008-09-03 09:53:47 -0400
commitf8b87c17017f2ce1890fb9a7f85fb0fbf5643e37 (patch)
tree261a31a95d2fa296ef7abaf6019ff5b7c86bbc63 /drivers/net/sfc/net_driver.h
parent3594e131b23665b728b4c98daaf0b61b1d4aaa7a (diff)
downloadop-kernel-dev-f8b87c17017f2ce1890fb9a7f85fb0fbf5643e37.zip
op-kernel-dev-f8b87c17017f2ce1890fb9a7f85fb0fbf5643e37.tar.gz
sfc: Make PHY flash mode a device attribute, not a module parameter
This allows updating PHY firmware for one interface without removing all other interfaces handled by the driver. Replace tx_disabled flags and 10Xpress status enumeration with flags in enum efx_phy_mode. Prevent an interface from being brought up while in PHY flash mode. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/sfc/net_driver.h')
-rw-r--r--drivers/net/sfc/net_driver.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h
index e65d661..df863bc 100644
--- a/drivers/net/sfc/net_driver.h
+++ b/drivers/net/sfc/net_driver.h
@@ -519,6 +519,23 @@ struct efx_phy_operations {
unsigned loopbacks;
};
+/**
+ * @enum efx_phy_mode - PHY operating mode flags
+ * @PHY_MODE_NORMAL: on and should pass traffic
+ * @PHY_MODE_TX_DISABLED: on with TX disabled
+ * @PHY_MODE_SPECIAL: on but will not pass traffic
+ */
+enum efx_phy_mode {
+ PHY_MODE_NORMAL = 0,
+ PHY_MODE_TX_DISABLED = 1,
+ PHY_MODE_SPECIAL = 8,
+};
+
+static inline bool efx_phy_mode_disabled(enum efx_phy_mode mode)
+{
+ return (mode & ~PHY_MODE_TX_DISABLED) != 0;
+}
+
/*
* Efx extended statistics
*
@@ -661,7 +678,7 @@ union efx_multicast_hash {
* @phy_op: PHY interface
* @phy_data: PHY private data (including PHY-specific stats)
* @mii: PHY interface
- * @tx_disabled: PHY transmitter turned off
+ * @phy_mode: PHY operating mode
* @link_up: Link status
* @link_options: Link options (MII/GMII format)
* @n_link_state_changes: Number of times the link has changed state
@@ -735,7 +752,7 @@ struct efx_nic {
struct efx_phy_operations *phy_op;
void *phy_data;
struct mii_if_info mii;
- bool tx_disabled;
+ enum efx_phy_mode phy_mode;
bool link_up;
unsigned int link_options;
OpenPOWER on IntegriCloud