aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic.h7
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c23
2 files changed, 22 insertions, 8 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
index 082eecbf4148..ebc5b069dddd 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
@@ -1515,4 +1515,11 @@ struct qlcnic_nic_template {
1515 __func__, ##_args); \ 1515 __func__, ##_args); \
1516 } while (0) 1516 } while (0)
1517 1517
1518#define PCI_DEVICE_ID_QLOGIC_QLE824X 0x8020
1519static inline bool qlcnic_82xx_check(struct qlcnic_adapter *adapter)
1520{
1521 unsigned short device = adapter->pdev->device;
1522 return (device == PCI_DEVICE_ID_QLOGIC_QLE824X) ? true : false;
1523}
1524
1518#endif /* __QLCNIC_H_ */ 1525#endif /* __QLCNIC_H_ */
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index 0110db1d0a34..f838a17cb326 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -1561,7 +1561,9 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1561 1561
1562 pci_set_drvdata(pdev, adapter); 1562 pci_set_drvdata(pdev, adapter);
1563 1563
1564 qlcnic_schedule_work(adapter, qlcnic_fw_poll_work, FW_POLL_DELAY); 1564 if (qlcnic_82xx_check(adapter))
1565 qlcnic_schedule_work(adapter, qlcnic_fw_poll_work,
1566 FW_POLL_DELAY);
1565 1567
1566 switch (adapter->ahw->port_type) { 1568 switch (adapter->ahw->port_type) {
1567 case QLCNIC_GBE: 1569 case QLCNIC_GBE:
@@ -1640,7 +1642,8 @@ static void qlcnic_remove(struct pci_dev *pdev)
1640 if (adapter->eswitch != NULL) 1642 if (adapter->eswitch != NULL)
1641 kfree(adapter->eswitch); 1643 kfree(adapter->eswitch);
1642 1644
1643 qlcnic_clr_all_drv_state(adapter, 0); 1645 if (qlcnic_82xx_check(adapter))
1646 qlcnic_clr_all_drv_state(adapter, 0);
1644 1647
1645 clear_bit(__QLCNIC_RESETTING, &adapter->state); 1648 clear_bit(__QLCNIC_RESETTING, &adapter->state);
1646 1649
@@ -1676,7 +1679,8 @@ static int __qlcnic_shutdown(struct pci_dev *pdev)
1676 if (netif_running(netdev)) 1679 if (netif_running(netdev))
1677 qlcnic_down(adapter, netdev); 1680 qlcnic_down(adapter, netdev);
1678 1681
1679 qlcnic_clr_all_drv_state(adapter, 0); 1682 if (qlcnic_82xx_check(adapter))
1683 qlcnic_clr_all_drv_state(adapter, 0);
1680 1684
1681 clear_bit(__QLCNIC_RESETTING, &adapter->state); 1685 clear_bit(__QLCNIC_RESETTING, &adapter->state);
1682 1686
@@ -1684,9 +1688,11 @@ static int __qlcnic_shutdown(struct pci_dev *pdev)
1684 if (retval) 1688 if (retval)
1685 return retval; 1689 return retval;
1686 1690
1687 if (qlcnic_wol_supported(adapter)) { 1691 if (qlcnic_82xx_check(adapter)) {
1688 pci_enable_wake(pdev, PCI_D3cold, 1); 1692 if (qlcnic_wol_supported(adapter)) {
1689 pci_enable_wake(pdev, PCI_D3hot, 1); 1693 pci_enable_wake(pdev, PCI_D3cold, 1);
1694 pci_enable_wake(pdev, PCI_D3hot, 1);
1695 }
1690 } 1696 }
1691 1697
1692 return 0; 1698 return 0;
@@ -1824,10 +1830,11 @@ static void qlcnic_free_lb_filters_mem(struct qlcnic_adapter *adapter)
1824static int qlcnic_check_temp(struct qlcnic_adapter *adapter) 1830static int qlcnic_check_temp(struct qlcnic_adapter *adapter)
1825{ 1831{
1826 struct net_device *netdev = adapter->netdev; 1832 struct net_device *netdev = adapter->netdev;
1827 u32 temp, temp_state, temp_val; 1833 u32 temp_state, temp_val, temp = 0;
1828 int rv = 0; 1834 int rv = 0;
1829 1835
1830 temp = QLCRD32(adapter, CRB_TEMP_STATE); 1836 if (qlcnic_82xx_check(adapter))
1837 temp = QLCRD32(adapter, CRB_TEMP_STATE);
1831 1838
1832 temp_state = qlcnic_get_temp_state(temp); 1839 temp_state = qlcnic_get_temp_state(temp);
1833 temp_val = qlcnic_get_temp_val(temp); 1840 temp_val = qlcnic_get_temp_val(temp);