diff options
author | David S. Miller <davem@davemloft.net> | 2011-05-17 17:53:22 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-17 17:53:22 -0400 |
commit | b56269468483a0255a27126ebc2ae7e321638d7b (patch) | |
tree | 11666efc904d51458fc2f79629ef66fb179d449c /drivers | |
parent | 9cbc94eabb0791906051bbfac024ef2c2be8e079 (diff) |
sfc: Don't use enums as a bitmask.
This fixes:
drivers/net/sfc/mcdi_mac.c: In function ‘efx_mcdi_set_mac’:
drivers/net/sfc/mcdi_mac.c:36:2: warning: case value ‘3’ not in enumerated type ‘enum efx_fc_type’
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/sfc/efx.c | 2 | ||||
-rw-r--r-- | drivers/net/sfc/efx.h | 2 | ||||
-rw-r--r-- | drivers/net/sfc/ethtool.c | 2 | ||||
-rw-r--r-- | drivers/net/sfc/mdio_10g.c | 2 | ||||
-rw-r--r-- | drivers/net/sfc/mdio_10g.h | 2 | ||||
-rw-r--r-- | drivers/net/sfc/net_driver.h | 12 |
6 files changed, 10 insertions, 12 deletions
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c index 05502b359b9e..c914729f9554 100644 --- a/drivers/net/sfc/efx.c +++ b/drivers/net/sfc/efx.c | |||
@@ -833,7 +833,7 @@ void efx_link_set_advertising(struct efx_nic *efx, u32 advertising) | |||
833 | } | 833 | } |
834 | } | 834 | } |
835 | 835 | ||
836 | void efx_link_set_wanted_fc(struct efx_nic *efx, enum efx_fc_type wanted_fc) | 836 | void efx_link_set_wanted_fc(struct efx_nic *efx, u8 wanted_fc) |
837 | { | 837 | { |
838 | efx->wanted_fc = wanted_fc; | 838 | efx->wanted_fc = wanted_fc; |
839 | if (efx->link_advertising) { | 839 | if (efx->link_advertising) { |
diff --git a/drivers/net/sfc/efx.h b/drivers/net/sfc/efx.h index 3d83a1f74fef..b0d1209ea18d 100644 --- a/drivers/net/sfc/efx.h +++ b/drivers/net/sfc/efx.h | |||
@@ -142,6 +142,6 @@ static inline void efx_schedule_channel(struct efx_channel *channel) | |||
142 | 142 | ||
143 | extern void efx_link_status_changed(struct efx_nic *efx); | 143 | extern void efx_link_status_changed(struct efx_nic *efx); |
144 | extern void efx_link_set_advertising(struct efx_nic *efx, u32); | 144 | extern void efx_link_set_advertising(struct efx_nic *efx, u32); |
145 | extern void efx_link_set_wanted_fc(struct efx_nic *efx, enum efx_fc_type); | 145 | extern void efx_link_set_wanted_fc(struct efx_nic *efx, u8); |
146 | 146 | ||
147 | #endif /* EFX_EFX_H */ | 147 | #endif /* EFX_EFX_H */ |
diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c index 348437a8117e..d229027dc363 100644 --- a/drivers/net/sfc/ethtool.c +++ b/drivers/net/sfc/ethtool.c | |||
@@ -698,7 +698,7 @@ static int efx_ethtool_set_pauseparam(struct net_device *net_dev, | |||
698 | struct ethtool_pauseparam *pause) | 698 | struct ethtool_pauseparam *pause) |
699 | { | 699 | { |
700 | struct efx_nic *efx = netdev_priv(net_dev); | 700 | struct efx_nic *efx = netdev_priv(net_dev); |
701 | enum efx_fc_type wanted_fc, old_fc; | 701 | u8 wanted_fc, old_fc; |
702 | u32 old_adv; | 702 | u32 old_adv; |
703 | bool reset; | 703 | bool reset; |
704 | int rc = 0; | 704 | int rc = 0; |
diff --git a/drivers/net/sfc/mdio_10g.c b/drivers/net/sfc/mdio_10g.c index 71159145b4bf..7ab385c8136d 100644 --- a/drivers/net/sfc/mdio_10g.c +++ b/drivers/net/sfc/mdio_10g.c | |||
@@ -284,7 +284,7 @@ void efx_mdio_an_reconfigure(struct efx_nic *efx) | |||
284 | efx_mdio_write(efx, MDIO_MMD_AN, MDIO_CTRL1, reg); | 284 | efx_mdio_write(efx, MDIO_MMD_AN, MDIO_CTRL1, reg); |
285 | } | 285 | } |
286 | 286 | ||
287 | enum efx_fc_type efx_mdio_get_pause(struct efx_nic *efx) | 287 | u8 efx_mdio_get_pause(struct efx_nic *efx) |
288 | { | 288 | { |
289 | BUILD_BUG_ON(EFX_FC_AUTO & (EFX_FC_RX | EFX_FC_TX)); | 289 | BUILD_BUG_ON(EFX_FC_AUTO & (EFX_FC_RX | EFX_FC_TX)); |
290 | 290 | ||
diff --git a/drivers/net/sfc/mdio_10g.h b/drivers/net/sfc/mdio_10g.h index df0703940c83..a97dbbd2de99 100644 --- a/drivers/net/sfc/mdio_10g.h +++ b/drivers/net/sfc/mdio_10g.h | |||
@@ -92,7 +92,7 @@ extern void efx_mdio_an_reconfigure(struct efx_nic *efx); | |||
92 | /* Get pause parameters from AN if available (otherwise return | 92 | /* Get pause parameters from AN if available (otherwise return |
93 | * requested pause parameters) | 93 | * requested pause parameters) |
94 | */ | 94 | */ |
95 | enum efx_fc_type efx_mdio_get_pause(struct efx_nic *efx); | 95 | u8 efx_mdio_get_pause(struct efx_nic *efx); |
96 | 96 | ||
97 | /* Wait for specified MMDs to exit reset within a timeout */ | 97 | /* Wait for specified MMDs to exit reset within a timeout */ |
98 | extern int efx_mdio_wait_reset_mmds(struct efx_nic *efx, | 98 | extern int efx_mdio_wait_reset_mmds(struct efx_nic *efx, |
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h index ce9697bac1b9..e8d5f03a89fe 100644 --- a/drivers/net/sfc/net_driver.h +++ b/drivers/net/sfc/net_driver.h | |||
@@ -449,11 +449,9 @@ enum nic_state { | |||
449 | struct efx_nic; | 449 | struct efx_nic; |
450 | 450 | ||
451 | /* Pseudo bit-mask flow control field */ | 451 | /* Pseudo bit-mask flow control field */ |
452 | enum efx_fc_type { | 452 | #define EFX_FC_RX FLOW_CTRL_RX |
453 | EFX_FC_RX = FLOW_CTRL_RX, | 453 | #define EFX_FC_TX FLOW_CTRL_TX |
454 | EFX_FC_TX = FLOW_CTRL_TX, | 454 | #define EFX_FC_AUTO 4 |
455 | EFX_FC_AUTO = 4, | ||
456 | }; | ||
457 | 455 | ||
458 | /** | 456 | /** |
459 | * struct efx_link_state - Current state of the link | 457 | * struct efx_link_state - Current state of the link |
@@ -465,7 +463,7 @@ enum efx_fc_type { | |||
465 | struct efx_link_state { | 463 | struct efx_link_state { |
466 | bool up; | 464 | bool up; |
467 | bool fd; | 465 | bool fd; |
468 | enum efx_fc_type fc; | 466 | u8 fc; |
469 | unsigned int speed; | 467 | unsigned int speed; |
470 | }; | 468 | }; |
471 | 469 | ||
@@ -784,7 +782,7 @@ struct efx_nic { | |||
784 | 782 | ||
785 | bool promiscuous; | 783 | bool promiscuous; |
786 | union efx_multicast_hash multicast_hash; | 784 | union efx_multicast_hash multicast_hash; |
787 | enum efx_fc_type wanted_fc; | 785 | u8 wanted_fc; |
788 | 786 | ||
789 | atomic_t rx_reset; | 787 | atomic_t rx_reset; |
790 | enum efx_loopback_mode loopback_mode; | 788 | enum efx_loopback_mode loopback_mode; |