Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 341855
b: refs/heads/master
c: 97ee45e
h: refs/heads/master
i:
  341853: a41f154
  341851: 211107e
  341847: 14827e1
  341839: 28656f6
  341823: 99ff8ee
v: v3
  • Loading branch information
Sony Chacko authored and David S. Miller committed Dec 4, 2012
1 parent 916d206 commit 1649d9e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fb4ce8ad8036e6b3d5ab021fd10934b80270cc11
refs/heads/master: 97ee45eb099a9a0f1dc992f98e9476cc159ee5e0
7 changes: 7 additions & 0 deletions trunk/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
Original file line number Diff line number Diff line change
Expand Up @@ -1515,4 +1515,11 @@ struct qlcnic_nic_template {
__func__, ##_args); \
} while (0)

#define PCI_DEVICE_ID_QLOGIC_QLE824X 0x8020
static inline bool qlcnic_82xx_check(struct qlcnic_adapter *adapter)
{
unsigned short device = adapter->pdev->device;
return (device == PCI_DEVICE_ID_QLOGIC_QLE824X) ? true : false;
}

#endif /* __QLCNIC_H_ */
23 changes: 15 additions & 8 deletions trunk/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1561,7 +1561,9 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)

pci_set_drvdata(pdev, adapter);

qlcnic_schedule_work(adapter, qlcnic_fw_poll_work, FW_POLL_DELAY);
if (qlcnic_82xx_check(adapter))
qlcnic_schedule_work(adapter, qlcnic_fw_poll_work,
FW_POLL_DELAY);

switch (adapter->ahw->port_type) {
case QLCNIC_GBE:
Expand Down Expand Up @@ -1640,7 +1642,8 @@ static void qlcnic_remove(struct pci_dev *pdev)
if (adapter->eswitch != NULL)
kfree(adapter->eswitch);

qlcnic_clr_all_drv_state(adapter, 0);
if (qlcnic_82xx_check(adapter))
qlcnic_clr_all_drv_state(adapter, 0);

clear_bit(__QLCNIC_RESETTING, &adapter->state);

Expand Down Expand Up @@ -1676,17 +1679,20 @@ static int __qlcnic_shutdown(struct pci_dev *pdev)
if (netif_running(netdev))
qlcnic_down(adapter, netdev);

qlcnic_clr_all_drv_state(adapter, 0);
if (qlcnic_82xx_check(adapter))
qlcnic_clr_all_drv_state(adapter, 0);

clear_bit(__QLCNIC_RESETTING, &adapter->state);

retval = pci_save_state(pdev);
if (retval)
return retval;

if (qlcnic_wol_supported(adapter)) {
pci_enable_wake(pdev, PCI_D3cold, 1);
pci_enable_wake(pdev, PCI_D3hot, 1);
if (qlcnic_82xx_check(adapter)) {
if (qlcnic_wol_supported(adapter)) {
pci_enable_wake(pdev, PCI_D3cold, 1);
pci_enable_wake(pdev, PCI_D3hot, 1);
}
}

return 0;
Expand Down Expand Up @@ -1824,10 +1830,11 @@ static void qlcnic_free_lb_filters_mem(struct qlcnic_adapter *adapter)
static int qlcnic_check_temp(struct qlcnic_adapter *adapter)
{
struct net_device *netdev = adapter->netdev;
u32 temp, temp_state, temp_val;
u32 temp_state, temp_val, temp = 0;
int rv = 0;

temp = QLCRD32(adapter, CRB_TEMP_STATE);
if (qlcnic_82xx_check(adapter))
temp = QLCRD32(adapter, CRB_TEMP_STATE);

temp_state = qlcnic_get_temp_state(temp);
temp_val = qlcnic_get_temp_val(temp);
Expand Down

0 comments on commit 1649d9e

Please sign in to comment.