Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 233441
b: refs/heads/master
c: 7e9c262
h: refs/heads/master
i:
  233439: 40b527b
v: v3
  • Loading branch information
Casey Leedom authored and David S. Miller committed Feb 15, 2011
1 parent 2be7e84 commit 0d63e92
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 843635e0349be9e318be224d6241069a40e23320
refs/heads/master: 7e9c26295b2ae1be1285c7c9e593c19ce7ea7eba
41 changes: 41 additions & 0 deletions trunk/drivers/net/cxgb4vf/cxgb4vf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2861,6 +2861,46 @@ static void __devexit cxgb4vf_pci_remove(struct pci_dev *pdev)
pci_release_regions(pdev);
}

/*
* "Shutdown" quiesce the device, stopping Ingress Packet and Interrupt
* delivery.
*/
static void __devexit cxgb4vf_pci_shutdown(struct pci_dev *pdev)
{
struct adapter *adapter;
int pidx;

adapter = pci_get_drvdata(pdev);
if (!adapter)
return;

/*
* Disable all Virtual Interfaces. This will shut down the
* delivery of all ingress packets into the chip for these
* Virtual Interfaces.
*/
for_each_port(adapter, pidx) {
struct net_device *netdev;
struct port_info *pi;

if (!test_bit(pidx, &adapter->registered_device_map))
continue;

netdev = adapter->port[pidx];
if (!netdev)
continue;

pi = netdev_priv(netdev);
t4vf_enable_vi(adapter, pi->viid, false, false);
}

/*
* Free up all Queues which will prevent further DMA and
* Interrupts allowing various internal pathways to drain.
*/
t4vf_free_sge_resources(adapter);
}

/*
* PCI Device registration data structures.
*/
Expand Down Expand Up @@ -2894,6 +2934,7 @@ static struct pci_driver cxgb4vf_driver = {
.id_table = cxgb4vf_pci_tbl,
.probe = cxgb4vf_pci_probe,
.remove = __devexit_p(cxgb4vf_pci_remove),
.shutdown = __devexit_p(cxgb4vf_pci_shutdown),
};

/*
Expand Down

0 comments on commit 0d63e92

Please sign in to comment.