Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[safe/jmp/linux-2.6] / drivers / net / igb / igb_main.c
index 997124d..0a064ce 100644 (file)
@@ -60,7 +60,7 @@ static const struct e1000_info *igb_info_tbl[] = {
        [board_82575] = &e1000_82575_info,
 };
 
-static struct pci_device_id igb_pci_tbl[] = {
+static DEFINE_PCI_DEVICE_TABLE(igb_pci_tbl) = {
        { PCI_VDEVICE(INTEL, E1000_DEV_ID_82580_COPPER), board_82575 },
        { PCI_VDEVICE(INTEL, E1000_DEV_ID_82580_FIBER), board_82575 },
        { PCI_VDEVICE(INTEL, E1000_DEV_ID_82580_SERDES), board_82575 },
@@ -2905,12 +2905,13 @@ static int igb_write_uc_addr_list(struct net_device *netdev)
        int count = 0;
 
        /* return ENOMEM indicating insufficient memory for addresses */
-       if (netdev->uc.count > rar_entries)
+       if (netdev_uc_count(netdev) > rar_entries)
                return -ENOMEM;
 
-       if (netdev->uc.count && rar_entries) {
+       if (!netdev_uc_empty(netdev) && rar_entries) {
                struct netdev_hw_addr *ha;
-               list_for_each_entry(ha, &netdev->uc.list, list) {
+
+               netdev_for_each_uc_addr(ha, netdev) {
                        if (!rar_entries)
                                break;
                        igb_rar_set_qsel(adapter, ha->addr,
@@ -4105,6 +4106,9 @@ static irqreturn_t igb_msix_other(int irq, void *data)
        u32 icr = rd32(E1000_ICR);
        /* reading ICR causes bit 31 of EICR to be cleared */
 
+       if (icr & E1000_ICR_DRSTA)
+               schedule_work(&adapter->reset_task);
+
        if (icr & E1000_ICR_DOUTSYNC) {
                /* HW is reporting DMA is out of sync */
                adapter->stats.doosync++;
@@ -4728,6 +4732,9 @@ static irqreturn_t igb_intr_msi(int irq, void *data)
 
        igb_write_itr(q_vector);
 
+       if (icr & E1000_ICR_DRSTA)
+               schedule_work(&adapter->reset_task);
+
        if (icr & E1000_ICR_DOUTSYNC) {
                /* HW is reporting DMA is out of sync */
                adapter->stats.doosync++;
@@ -4767,6 +4774,9 @@ static irqreturn_t igb_intr(int irq, void *data)
        if (!(icr & E1000_ICR_INT_ASSERTED))
                return IRQ_NONE;
 
+       if (icr & E1000_ICR_DRSTA)
+               schedule_work(&adapter->reset_task);
+
        if (icr & E1000_ICR_DOUTSYNC) {
                /* HW is reporting DMA is out of sync */
                adapter->stats.doosync++;