diff options
author | Don Skidmore <donald.c.skidmore@intel.com> | 2010-12-09 01:55:19 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2010-12-11 01:12:52 -0500 |
commit | d994653db465616a7bf27703e733170c47488cdf (patch) | |
tree | f2419ca870ce17fc5f9c0d6c381cd3ab6e229b72 /drivers/net/ixgbe | |
parent | 2b264909c660717a67da997a181a4a4f551ef9b6 (diff) |
ixgbe: fix X540 to use it's own info struct
This patch enables X540 hardware to use it's own set of support
functions. This is useful as it has no need of SFP+ support. A
couple minor bugs with the eeprom semaphore were also cleaned up.
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ixgbe')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 16 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_x540.c | 4 |
2 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index fdb35d040d23..f2694f2b127a 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -118,7 +118,7 @@ static DEFINE_PCI_DEVICE_TABLE(ixgbe_pci_tbl) = { | |||
118 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_COMBO_BACKPLANE), | 118 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_COMBO_BACKPLANE), |
119 | board_82599 }, | 119 | board_82599 }, |
120 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X540T), | 120 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X540T), |
121 | board_82599 }, | 121 | board_X540 }, |
122 | 122 | ||
123 | /* required last entry */ | 123 | /* required last entry */ |
124 | {0, } | 124 | {0, } |
@@ -1897,6 +1897,13 @@ static irqreturn_t ixgbe_msix_lsc(int irq, void *data) | |||
1897 | 1897 | ||
1898 | switch (hw->mac.type) { | 1898 | switch (hw->mac.type) { |
1899 | case ixgbe_mac_82599EB: | 1899 | case ixgbe_mac_82599EB: |
1900 | ixgbe_check_sfp_event(adapter, eicr); | ||
1901 | if ((adapter->flags2 & IXGBE_FLAG2_TEMP_SENSOR_CAPABLE) && | ||
1902 | ((eicr & IXGBE_EICR_GPI_SDP0) || (eicr & IXGBE_EICR_LSC))) { | ||
1903 | adapter->interrupt_event = eicr; | ||
1904 | schedule_work(&adapter->check_overtemp_task); | ||
1905 | } | ||
1906 | /* now fallthrough to handle Flow Director */ | ||
1900 | case ixgbe_mac_X540: | 1907 | case ixgbe_mac_X540: |
1901 | /* Handle Flow Director Full threshold interrupt */ | 1908 | /* Handle Flow Director Full threshold interrupt */ |
1902 | if (eicr & IXGBE_EICR_FLOW_DIR) { | 1909 | if (eicr & IXGBE_EICR_FLOW_DIR) { |
@@ -1912,12 +1919,6 @@ static irqreturn_t ixgbe_msix_lsc(int irq, void *data) | |||
1912 | schedule_work(&adapter->fdir_reinit_task); | 1919 | schedule_work(&adapter->fdir_reinit_task); |
1913 | } | 1920 | } |
1914 | } | 1921 | } |
1915 | ixgbe_check_sfp_event(adapter, eicr); | ||
1916 | if ((adapter->flags2 & IXGBE_FLAG2_TEMP_SENSOR_CAPABLE) && | ||
1917 | ((eicr & IXGBE_EICR_GPI_SDP0) || (eicr & IXGBE_EICR_LSC))) { | ||
1918 | adapter->interrupt_event = eicr; | ||
1919 | schedule_work(&adapter->check_overtemp_task); | ||
1920 | } | ||
1921 | break; | 1922 | break; |
1922 | default: | 1923 | default: |
1923 | break; | 1924 | break; |
@@ -2508,7 +2509,6 @@ static irqreturn_t ixgbe_intr(int irq, void *data) | |||
2508 | 2509 | ||
2509 | switch (hw->mac.type) { | 2510 | switch (hw->mac.type) { |
2510 | case ixgbe_mac_82599EB: | 2511 | case ixgbe_mac_82599EB: |
2511 | case ixgbe_mac_X540: | ||
2512 | ixgbe_check_sfp_event(adapter, eicr); | 2512 | ixgbe_check_sfp_event(adapter, eicr); |
2513 | if ((adapter->flags2 & IXGBE_FLAG2_TEMP_SENSOR_CAPABLE) && | 2513 | if ((adapter->flags2 & IXGBE_FLAG2_TEMP_SENSOR_CAPABLE) && |
2514 | ((eicr & IXGBE_EICR_GPI_SDP0) || (eicr & IXGBE_EICR_LSC))) { | 2514 | ((eicr & IXGBE_EICR_GPI_SDP0) || (eicr & IXGBE_EICR_LSC))) { |
diff --git a/drivers/net/ixgbe/ixgbe_x540.c b/drivers/net/ixgbe/ixgbe_x540.c index 9649fa727e31..cf88515c0ef8 100644 --- a/drivers/net/ixgbe/ixgbe_x540.c +++ b/drivers/net/ixgbe/ixgbe_x540.c | |||
@@ -278,7 +278,7 @@ static s32 ixgbe_read_eerd_X540(struct ixgbe_hw *hw, u16 offset, u16 *data) | |||
278 | { | 278 | { |
279 | s32 status; | 279 | s32 status; |
280 | 280 | ||
281 | if (ixgbe_acquire_swfw_sync_X540(hw, IXGBE_GSSR_EEP_SM)) | 281 | if (ixgbe_acquire_swfw_sync_X540(hw, IXGBE_GSSR_EEP_SM) == 0) |
282 | status = ixgbe_read_eerd_generic(hw, offset, data); | 282 | status = ixgbe_read_eerd_generic(hw, offset, data); |
283 | else | 283 | else |
284 | status = IXGBE_ERR_SWFW_SYNC; | 284 | status = IXGBE_ERR_SWFW_SYNC; |
@@ -311,7 +311,7 @@ static s32 ixgbe_write_eewr_X540(struct ixgbe_hw *hw, u16 offset, u16 data) | |||
311 | (data << IXGBE_EEPROM_RW_REG_DATA) | | 311 | (data << IXGBE_EEPROM_RW_REG_DATA) | |
312 | IXGBE_EEPROM_RW_REG_START; | 312 | IXGBE_EEPROM_RW_REG_START; |
313 | 313 | ||
314 | if (ixgbe_acquire_swfw_sync_X540(hw, IXGBE_GSSR_EEP_SM)) { | 314 | if (ixgbe_acquire_swfw_sync_X540(hw, IXGBE_GSSR_EEP_SM) == 0) { |
315 | status = ixgbe_poll_eerd_eewr_done(hw, IXGBE_NVM_POLL_WRITE); | 315 | status = ixgbe_poll_eerd_eewr_done(hw, IXGBE_NVM_POLL_WRITE); |
316 | if (status != 0) { | 316 | if (status != 0) { |
317 | hw_dbg(hw, "Eeprom write EEWR timed out\n"); | 317 | hw_dbg(hw, "Eeprom write EEWR timed out\n"); |