aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/Kconfig1
-rw-r--r--drivers/net/bnx2.c35
-rw-r--r--drivers/net/bnx2.h1
-rw-r--r--drivers/net/e100.c5
-rw-r--r--drivers/net/hamachi.c70
-rw-r--r--drivers/net/ibm_newemac/debug.c2
-rw-r--r--drivers/net/ixgb/ixgb_main.c16
-rw-r--r--drivers/net/pcmcia/pcnet_cs.c1
-rw-r--r--drivers/net/s2io.c4
-rw-r--r--drivers/net/sis190.c10
-rw-r--r--drivers/net/sky2.c9
-rw-r--r--drivers/net/smc911x.h2
-rw-r--r--drivers/net/starfire.c2
-rw-r--r--drivers/net/sundance.c34
-rw-r--r--drivers/net/ucc_geth.c2
-rw-r--r--drivers/net/ucc_geth_mii.h2
16 files changed, 111 insertions, 85 deletions
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 6cde4edc846b..d9107e542dfa 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -2588,7 +2588,6 @@ config MLX4_DEBUG
2588config TEHUTI 2588config TEHUTI
2589 tristate "Tehuti Networks 10G Ethernet" 2589 tristate "Tehuti Networks 10G Ethernet"
2590 depends on PCI 2590 depends on PCI
2591 select ZLIB_INFLATE
2592 help 2591 help
2593 Tehuti Networks 10G Ethernet NIC 2592 Tehuti Networks 10G Ethernet NIC
2594 2593
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index da767d3d5af5..4e7b46e44874 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -56,8 +56,8 @@
56 56
57#define DRV_MODULE_NAME "bnx2" 57#define DRV_MODULE_NAME "bnx2"
58#define PFX DRV_MODULE_NAME ": " 58#define PFX DRV_MODULE_NAME ": "
59#define DRV_MODULE_VERSION "1.6.8" 59#define DRV_MODULE_VERSION "1.6.9"
60#define DRV_MODULE_RELDATE "October 17, 2007" 60#define DRV_MODULE_RELDATE "December 8, 2007"
61 61
62#define RUN_AT(x) (jiffies + (x)) 62#define RUN_AT(x) (jiffies + (x))
63 63
@@ -2387,18 +2387,24 @@ bnx2_reuse_rx_skb(struct bnx2 *bp, struct sk_buff *skb,
2387 prod_bd->rx_bd_haddr_lo = cons_bd->rx_bd_haddr_lo; 2387 prod_bd->rx_bd_haddr_lo = cons_bd->rx_bd_haddr_lo;
2388} 2388}
2389 2389
2390static inline u16
2391bnx2_get_hw_rx_cons(struct bnx2 *bp)
2392{
2393 u16 cons = bp->status_blk->status_rx_quick_consumer_index0;
2394
2395 if (unlikely((cons & MAX_RX_DESC_CNT) == MAX_RX_DESC_CNT))
2396 cons++;
2397 return cons;
2398}
2399
2390static int 2400static int
2391bnx2_rx_int(struct bnx2 *bp, int budget) 2401bnx2_rx_int(struct bnx2 *bp, int budget)
2392{ 2402{
2393 struct status_block *sblk = bp->status_blk;
2394 u16 hw_cons, sw_cons, sw_ring_cons, sw_prod, sw_ring_prod; 2403 u16 hw_cons, sw_cons, sw_ring_cons, sw_prod, sw_ring_prod;
2395 struct l2_fhdr *rx_hdr; 2404 struct l2_fhdr *rx_hdr;
2396 int rx_pkt = 0; 2405 int rx_pkt = 0;
2397 2406
2398 hw_cons = bp->hw_rx_cons = sblk->status_rx_quick_consumer_index0; 2407 hw_cons = bnx2_get_hw_rx_cons(bp);
2399 if ((hw_cons & MAX_RX_DESC_CNT) == MAX_RX_DESC_CNT) {
2400 hw_cons++;
2401 }
2402 sw_cons = bp->rx_cons; 2408 sw_cons = bp->rx_cons;
2403 sw_prod = bp->rx_prod; 2409 sw_prod = bp->rx_prod;
2404 2410
@@ -2515,10 +2521,7 @@ next_rx:
2515 2521
2516 /* Refresh hw_cons to see if there is new work */ 2522 /* Refresh hw_cons to see if there is new work */
2517 if (sw_cons == hw_cons) { 2523 if (sw_cons == hw_cons) {
2518 hw_cons = bp->hw_rx_cons = 2524 hw_cons = bnx2_get_hw_rx_cons(bp);
2519 sblk->status_rx_quick_consumer_index0;
2520 if ((hw_cons & MAX_RX_DESC_CNT) == MAX_RX_DESC_CNT)
2521 hw_cons++;
2522 rmb(); 2525 rmb();
2523 } 2526 }
2524 } 2527 }
@@ -2622,7 +2625,7 @@ bnx2_has_work(struct bnx2 *bp)
2622{ 2625{
2623 struct status_block *sblk = bp->status_blk; 2626 struct status_block *sblk = bp->status_blk;
2624 2627
2625 if ((sblk->status_rx_quick_consumer_index0 != bp->hw_rx_cons) || 2628 if ((bnx2_get_hw_rx_cons(bp) != bp->rx_cons) ||
2626 (sblk->status_tx_quick_consumer_index0 != bp->hw_tx_cons)) 2629 (sblk->status_tx_quick_consumer_index0 != bp->hw_tx_cons))
2627 return 1; 2630 return 1;
2628 2631
@@ -2655,7 +2658,7 @@ static int bnx2_poll_work(struct bnx2 *bp, int work_done, int budget)
2655 if (sblk->status_tx_quick_consumer_index0 != bp->hw_tx_cons) 2658 if (sblk->status_tx_quick_consumer_index0 != bp->hw_tx_cons)
2656 bnx2_tx_int(bp); 2659 bnx2_tx_int(bp);
2657 2660
2658 if (sblk->status_rx_quick_consumer_index0 != bp->hw_rx_cons) 2661 if (bnx2_get_hw_rx_cons(bp) != bp->rx_cons)
2659 work_done += bnx2_rx_int(bp, budget - work_done); 2662 work_done += bnx2_rx_int(bp, budget - work_done);
2660 2663
2661 return work_done; 2664 return work_done;
@@ -4177,7 +4180,6 @@ bnx2_init_rx_ring(struct bnx2 *bp)
4177 4180
4178 ring_prod = prod = bp->rx_prod = 0; 4181 ring_prod = prod = bp->rx_prod = 0;
4179 bp->rx_cons = 0; 4182 bp->rx_cons = 0;
4180 bp->hw_rx_cons = 0;
4181 bp->rx_prod_bseq = 0; 4183 bp->rx_prod_bseq = 0;
4182 4184
4183 for (i = 0; i < bp->rx_max_ring; i++) { 4185 for (i = 0; i < bp->rx_max_ring; i++) {
@@ -6685,8 +6687,9 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
6685 } else if (CHIP_NUM(bp) == CHIP_NUM_5706 || 6687 } else if (CHIP_NUM(bp) == CHIP_NUM_5706 ||
6686 CHIP_NUM(bp) == CHIP_NUM_5708) 6688 CHIP_NUM(bp) == CHIP_NUM_5708)
6687 bp->phy_flags |= PHY_CRC_FIX_FLAG; 6689 bp->phy_flags |= PHY_CRC_FIX_FLAG;
6688 else if (CHIP_ID(bp) == CHIP_ID_5709_A0 || 6690 else if (CHIP_NUM(bp) == CHIP_NUM_5709 &&
6689 CHIP_ID(bp) == CHIP_ID_5709_A1) 6691 (CHIP_REV(bp) == CHIP_REV_Ax ||
6692 CHIP_REV(bp) == CHIP_REV_Bx))
6690 bp->phy_flags |= PHY_DIS_EARLY_DAC_FLAG; 6693 bp->phy_flags |= PHY_DIS_EARLY_DAC_FLAG;
6691 6694
6692 if ((CHIP_ID(bp) == CHIP_ID_5708_A0) || 6695 if ((CHIP_ID(bp) == CHIP_ID_5708_A0) ||
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h
index 1dce0d1a2581..30ba366608b0 100644
--- a/drivers/net/bnx2.h
+++ b/drivers/net/bnx2.h
@@ -6513,7 +6513,6 @@ struct bnx2 {
6513 u32 rx_prod_bseq; 6513 u32 rx_prod_bseq;
6514 u16 rx_prod; 6514 u16 rx_prod;
6515 u16 rx_cons; 6515 u16 rx_cons;
6516 u16 hw_rx_cons;
6517 6516
6518 u32 rx_csum; 6517 u32 rx_csum;
6519 6518
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index e1c8a0d023ea..2b06e4b4dabc 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -2737,8 +2737,9 @@ static int e100_suspend(struct pci_dev *pdev, pm_message_t state)
2737 pci_enable_wake(pdev, PCI_D3cold, 0); 2737 pci_enable_wake(pdev, PCI_D3cold, 0);
2738 } 2738 }
2739 2739
2740 pci_disable_device(pdev);
2741 free_irq(pdev->irq, netdev); 2740 free_irq(pdev->irq, netdev);
2741
2742 pci_disable_device(pdev);
2742 pci_set_power_state(pdev, PCI_D3hot); 2743 pci_set_power_state(pdev, PCI_D3hot);
2743 2744
2744 return 0; 2745 return 0;
@@ -2780,6 +2781,8 @@ static void e100_shutdown(struct pci_dev *pdev)
2780 pci_enable_wake(pdev, PCI_D3cold, 0); 2781 pci_enable_wake(pdev, PCI_D3cold, 0);
2781 } 2782 }
2782 2783
2784 free_irq(pdev->irq, netdev);
2785
2783 pci_disable_device(pdev); 2786 pci_disable_device(pdev);
2784 pci_set_power_state(pdev, PCI_D3hot); 2787 pci_set_power_state(pdev, PCI_D3hot);
2785} 2788}
diff --git a/drivers/net/hamachi.c b/drivers/net/hamachi.c
index ed407c85708f..b53f6b6491b3 100644
--- a/drivers/net/hamachi.c
+++ b/drivers/net/hamachi.c
@@ -204,8 +204,10 @@ KERN_INFO " Further modifications by Keith Underwood <keithu@parl.clemson.edu>
204/* Condensed bus+endian portability operations. */ 204/* Condensed bus+endian portability operations. */
205#if ADDRLEN == 64 205#if ADDRLEN == 64
206#define cpu_to_leXX(addr) cpu_to_le64(addr) 206#define cpu_to_leXX(addr) cpu_to_le64(addr)
207#define leXX_to_cpu(addr) le64_to_cpu(addr)
207#else 208#else
208#define cpu_to_leXX(addr) cpu_to_le32(addr) 209#define cpu_to_leXX(addr) cpu_to_le32(addr)
210#define leXX_to_cpu(addr) le32_to_cpu(addr)
209#endif 211#endif
210 212
211 213
@@ -465,12 +467,12 @@ enum intr_status_bits {
465 467
466/* The Hamachi Rx and Tx buffer descriptors. */ 468/* The Hamachi Rx and Tx buffer descriptors. */
467struct hamachi_desc { 469struct hamachi_desc {
468 u32 status_n_length; 470 __le32 status_n_length;
469#if ADDRLEN == 64 471#if ADDRLEN == 64
470 u32 pad; 472 u32 pad;
471 u64 addr; 473 __le64 addr;
472#else 474#else
473 u32 addr; 475 __le32 addr;
474#endif 476#endif
475}; 477};
476 478
@@ -874,13 +876,13 @@ static int hamachi_open(struct net_device *dev)
874 876
875#if ADDRLEN == 64 877#if ADDRLEN == 64
876 /* writellll anyone ? */ 878 /* writellll anyone ? */
877 writel(cpu_to_le64(hmp->rx_ring_dma), ioaddr + RxPtr); 879 writel(hmp->rx_ring_dma, ioaddr + RxPtr);
878 writel(cpu_to_le64(hmp->rx_ring_dma) >> 32, ioaddr + RxPtr + 4); 880 writel(hmp->rx_ring_dma >> 32, ioaddr + RxPtr + 4);
879 writel(cpu_to_le64(hmp->tx_ring_dma), ioaddr + TxPtr); 881 writel(hmp->tx_ring_dma, ioaddr + TxPtr);
880 writel(cpu_to_le64(hmp->tx_ring_dma) >> 32, ioaddr + TxPtr + 4); 882 writel(hmp->tx_ring_dma >> 32, ioaddr + TxPtr + 4);
881#else 883#else
882 writel(cpu_to_le32(hmp->rx_ring_dma), ioaddr + RxPtr); 884 writel(hmp->rx_ring_dma, ioaddr + RxPtr);
883 writel(cpu_to_le32(hmp->tx_ring_dma), ioaddr + TxPtr); 885 writel(hmp->tx_ring_dma, ioaddr + TxPtr);
884#endif 886#endif
885 887
886 /* TODO: It would make sense to organize this as words since the card 888 /* TODO: It would make sense to organize this as words since the card
@@ -1019,8 +1021,8 @@ static inline int hamachi_tx(struct net_device *dev)
1019 skb = hmp->tx_skbuff[entry]; 1021 skb = hmp->tx_skbuff[entry];
1020 if (skb) { 1022 if (skb) {
1021 pci_unmap_single(hmp->pci_dev, 1023 pci_unmap_single(hmp->pci_dev,
1022 hmp->tx_ring[entry].addr, skb->len, 1024 leXX_to_cpu(hmp->tx_ring[entry].addr),
1023 PCI_DMA_TODEVICE); 1025 skb->len, PCI_DMA_TODEVICE);
1024 dev_kfree_skb(skb); 1026 dev_kfree_skb(skb);
1025 hmp->tx_skbuff[entry] = NULL; 1027 hmp->tx_skbuff[entry] = NULL;
1026 } 1028 }
@@ -1071,10 +1073,10 @@ static void hamachi_tx_timeout(struct net_device *dev)
1071 { 1073 {
1072 printk(KERN_DEBUG " Rx ring %p: ", hmp->rx_ring); 1074 printk(KERN_DEBUG " Rx ring %p: ", hmp->rx_ring);
1073 for (i = 0; i < RX_RING_SIZE; i++) 1075 for (i = 0; i < RX_RING_SIZE; i++)
1074 printk(" %8.8x", (unsigned int)hmp->rx_ring[i].status_n_length); 1076 printk(" %8.8x", le32_to_cpu(hmp->rx_ring[i].status_n_length));
1075 printk("\n"KERN_DEBUG" Tx ring %p: ", hmp->tx_ring); 1077 printk("\n"KERN_DEBUG" Tx ring %p: ", hmp->tx_ring);
1076 for (i = 0; i < TX_RING_SIZE; i++) 1078 for (i = 0; i < TX_RING_SIZE; i++)
1077 printk(" %4.4x", hmp->tx_ring[i].status_n_length); 1079 printk(" %4.4x", le32_to_cpu(hmp->tx_ring[i].status_n_length));
1078 printk("\n"); 1080 printk("\n");
1079 } 1081 }
1080 1082
@@ -1099,14 +1101,15 @@ static void hamachi_tx_timeout(struct net_device *dev)
1099 struct sk_buff *skb; 1101 struct sk_buff *skb;
1100 1102
1101 if (i >= TX_RING_SIZE - 1) 1103 if (i >= TX_RING_SIZE - 1)
1102 hmp->tx_ring[i].status_n_length = cpu_to_le32( 1104 hmp->tx_ring[i].status_n_length =
1103 DescEndRing | 1105 cpu_to_le32(DescEndRing) |
1104 (hmp->tx_ring[i].status_n_length & 0x0000FFFF)); 1106 (hmp->tx_ring[i].status_n_length &
1107 cpu_to_le32(0x0000ffff));
1105 else 1108 else
1106 hmp->tx_ring[i].status_n_length &= 0x0000ffff; 1109 hmp->tx_ring[i].status_n_length &= cpu_to_le32(0x0000ffff);
1107 skb = hmp->tx_skbuff[i]; 1110 skb = hmp->tx_skbuff[i];
1108 if (skb){ 1111 if (skb){
1109 pci_unmap_single(hmp->pci_dev, hmp->tx_ring[i].addr, 1112 pci_unmap_single(hmp->pci_dev, leXX_to_cpu(hmp->tx_ring[i].addr),
1110 skb->len, PCI_DMA_TODEVICE); 1113 skb->len, PCI_DMA_TODEVICE);
1111 dev_kfree_skb(skb); 1114 dev_kfree_skb(skb);
1112 hmp->tx_skbuff[i] = NULL; 1115 hmp->tx_skbuff[i] = NULL;
@@ -1128,7 +1131,8 @@ static void hamachi_tx_timeout(struct net_device *dev)
1128 struct sk_buff *skb = hmp->rx_skbuff[i]; 1131 struct sk_buff *skb = hmp->rx_skbuff[i];
1129 1132
1130 if (skb){ 1133 if (skb){
1131 pci_unmap_single(hmp->pci_dev, hmp->rx_ring[i].addr, 1134 pci_unmap_single(hmp->pci_dev,
1135 leXX_to_cpu(hmp->rx_ring[i].addr),
1132 hmp->rx_buf_sz, PCI_DMA_FROMDEVICE); 1136 hmp->rx_buf_sz, PCI_DMA_FROMDEVICE);
1133 dev_kfree_skb(skb); 1137 dev_kfree_skb(skb);
1134 hmp->rx_skbuff[i] = NULL; 1138 hmp->rx_skbuff[i] = NULL;
@@ -1420,7 +1424,7 @@ static irqreturn_t hamachi_interrupt(int irq, void *dev_instance)
1420 /* Free the original skb. */ 1424 /* Free the original skb. */
1421 if (skb){ 1425 if (skb){
1422 pci_unmap_single(hmp->pci_dev, 1426 pci_unmap_single(hmp->pci_dev,
1423 hmp->tx_ring[entry].addr, 1427 leXX_to_cpu(hmp->tx_ring[entry].addr),
1424 skb->len, 1428 skb->len,
1425 PCI_DMA_TODEVICE); 1429 PCI_DMA_TODEVICE);
1426 dev_kfree_skb_irq(skb); 1430 dev_kfree_skb_irq(skb);
@@ -1500,11 +1504,11 @@ static int hamachi_rx(struct net_device *dev)
1500 if (desc_status & DescOwn) 1504 if (desc_status & DescOwn)
1501 break; 1505 break;
1502 pci_dma_sync_single_for_cpu(hmp->pci_dev, 1506 pci_dma_sync_single_for_cpu(hmp->pci_dev,
1503 desc->addr, 1507 leXX_to_cpu(desc->addr),
1504 hmp->rx_buf_sz, 1508 hmp->rx_buf_sz,
1505 PCI_DMA_FROMDEVICE); 1509 PCI_DMA_FROMDEVICE);
1506 buf_addr = (u8 *) hmp->rx_skbuff[entry]->data; 1510 buf_addr = (u8 *) hmp->rx_skbuff[entry]->data;
1507 frame_status = le32_to_cpu(get_unaligned((s32*)&(buf_addr[data_size - 12]))); 1511 frame_status = le32_to_cpu(get_unaligned((__le32*)&(buf_addr[data_size - 12])));
1508 if (hamachi_debug > 4) 1512 if (hamachi_debug > 4)
1509 printk(KERN_DEBUG " hamachi_rx() status was %8.8x.\n", 1513 printk(KERN_DEBUG " hamachi_rx() status was %8.8x.\n",
1510 frame_status); 1514 frame_status);
@@ -1518,9 +1522,9 @@ static int hamachi_rx(struct net_device *dev)
1518 dev->name, desc, &hmp->rx_ring[hmp->cur_rx % RX_RING_SIZE]); 1522 dev->name, desc, &hmp->rx_ring[hmp->cur_rx % RX_RING_SIZE]);
1519 printk(KERN_WARNING "%s: Oversized Ethernet frame -- next status %x/%x last status %x.\n", 1523 printk(KERN_WARNING "%s: Oversized Ethernet frame -- next status %x/%x last status %x.\n",
1520 dev->name, 1524 dev->name,
1521 hmp->rx_ring[(hmp->cur_rx+1) % RX_RING_SIZE].status_n_length & 0xffff0000, 1525 le32_to_cpu(hmp->rx_ring[(hmp->cur_rx+1) % RX_RING_SIZE].status_n_length) & 0xffff0000,
1522 hmp->rx_ring[(hmp->cur_rx+1) % RX_RING_SIZE].status_n_length & 0x0000ffff, 1526 le32_to_cpu(hmp->rx_ring[(hmp->cur_rx+1) % RX_RING_SIZE].status_n_length) & 0x0000ffff,
1523 hmp->rx_ring[(hmp->cur_rx-1) % RX_RING_SIZE].status_n_length); 1527 le32_to_cpu(hmp->rx_ring[(hmp->cur_rx-1) % RX_RING_SIZE].status_n_length));
1524 hmp->stats.rx_length_errors++; 1528 hmp->stats.rx_length_errors++;
1525 } /* else Omit for prototype errata??? */ 1529 } /* else Omit for prototype errata??? */
1526 if (frame_status & 0x00380000) { 1530 if (frame_status & 0x00380000) {
@@ -1566,7 +1570,7 @@ static int hamachi_rx(struct net_device *dev)
1566#endif 1570#endif
1567 skb_reserve(skb, 2); /* 16 byte align the IP header */ 1571 skb_reserve(skb, 2); /* 16 byte align the IP header */
1568 pci_dma_sync_single_for_cpu(hmp->pci_dev, 1572 pci_dma_sync_single_for_cpu(hmp->pci_dev,
1569 hmp->rx_ring[entry].addr, 1573 leXX_to_cpu(hmp->rx_ring[entry].addr),
1570 hmp->rx_buf_sz, 1574 hmp->rx_buf_sz,
1571 PCI_DMA_FROMDEVICE); 1575 PCI_DMA_FROMDEVICE);
1572 /* Call copy + cksum if available. */ 1576 /* Call copy + cksum if available. */
@@ -1579,12 +1583,12 @@ static int hamachi_rx(struct net_device *dev)
1579 + entry*sizeof(*desc), pkt_len); 1583 + entry*sizeof(*desc), pkt_len);
1580#endif 1584#endif
1581 pci_dma_sync_single_for_device(hmp->pci_dev, 1585 pci_dma_sync_single_for_device(hmp->pci_dev,
1582 hmp->rx_ring[entry].addr, 1586 leXX_to_cpu(hmp->rx_ring[entry].addr),
1583 hmp->rx_buf_sz, 1587 hmp->rx_buf_sz,
1584 PCI_DMA_FROMDEVICE); 1588 PCI_DMA_FROMDEVICE);
1585 } else { 1589 } else {
1586 pci_unmap_single(hmp->pci_dev, 1590 pci_unmap_single(hmp->pci_dev,
1587 hmp->rx_ring[entry].addr, 1591 leXX_to_cpu(hmp->rx_ring[entry].addr),
1588 hmp->rx_buf_sz, PCI_DMA_FROMDEVICE); 1592 hmp->rx_buf_sz, PCI_DMA_FROMDEVICE);
1589 skb_put(skb = hmp->rx_skbuff[entry], pkt_len); 1593 skb_put(skb = hmp->rx_skbuff[entry], pkt_len);
1590 hmp->rx_skbuff[entry] = NULL; 1594 hmp->rx_skbuff[entry] = NULL;
@@ -1787,21 +1791,21 @@ static int hamachi_close(struct net_device *dev)
1787 for (i = 0; i < RX_RING_SIZE; i++) { 1791 for (i = 0; i < RX_RING_SIZE; i++) {
1788 skb = hmp->rx_skbuff[i]; 1792 skb = hmp->rx_skbuff[i];
1789 hmp->rx_ring[i].status_n_length = 0; 1793 hmp->rx_ring[i].status_n_length = 0;
1790 hmp->rx_ring[i].addr = 0xBADF00D0; /* An invalid address. */
1791 if (skb) { 1794 if (skb) {
1792 pci_unmap_single(hmp->pci_dev, 1795 pci_unmap_single(hmp->pci_dev,
1793 hmp->rx_ring[i].addr, hmp->rx_buf_sz, 1796 leXX_to_cpu(hmp->rx_ring[i].addr),
1794 PCI_DMA_FROMDEVICE); 1797 hmp->rx_buf_sz, PCI_DMA_FROMDEVICE);
1795 dev_kfree_skb(skb); 1798 dev_kfree_skb(skb);
1796 hmp->rx_skbuff[i] = NULL; 1799 hmp->rx_skbuff[i] = NULL;
1797 } 1800 }
1801 hmp->rx_ring[i].addr = cpu_to_leXX(0xBADF00D0); /* An invalid address. */
1798 } 1802 }
1799 for (i = 0; i < TX_RING_SIZE; i++) { 1803 for (i = 0; i < TX_RING_SIZE; i++) {
1800 skb = hmp->tx_skbuff[i]; 1804 skb = hmp->tx_skbuff[i];
1801 if (skb) { 1805 if (skb) {
1802 pci_unmap_single(hmp->pci_dev, 1806 pci_unmap_single(hmp->pci_dev,
1803 hmp->tx_ring[i].addr, skb->len, 1807 leXX_to_cpu(hmp->tx_ring[i].addr),
1804 PCI_DMA_TODEVICE); 1808 skb->len, PCI_DMA_TODEVICE);
1805 dev_kfree_skb(skb); 1809 dev_kfree_skb(skb);
1806 hmp->tx_skbuff[i] = NULL; 1810 hmp->tx_skbuff[i] = NULL;
1807 } 1811 }
diff --git a/drivers/net/ibm_newemac/debug.c b/drivers/net/ibm_newemac/debug.c
index a2fc660ca5d4..86b756a30784 100644
--- a/drivers/net/ibm_newemac/debug.c
+++ b/drivers/net/ibm_newemac/debug.c
@@ -26,7 +26,7 @@
26 26
27#include "core.h" 27#include "core.h"
28 28
29static spinlock_t emac_dbg_lock = SPIN_LOCK_UNLOCKED; 29static DEFINE_SPINLOCK(emac_dbg_lock);
30 30
31static void emac_desc_dump(struct emac_instance *p) 31static void emac_desc_dump(struct emac_instance *p)
32{ 32{
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index 3021234b1e17..bf9085fe035a 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -320,10 +320,22 @@ ixgb_down(struct ixgb_adapter *adapter, boolean_t kill_watchdog)
320void 320void
321ixgb_reset(struct ixgb_adapter *adapter) 321ixgb_reset(struct ixgb_adapter *adapter)
322{ 322{
323 struct ixgb_hw *hw = &adapter->hw;
323 324
324 ixgb_adapter_stop(&adapter->hw); 325 ixgb_adapter_stop(hw);
325 if(!ixgb_init_hw(&adapter->hw)) 326 if (!ixgb_init_hw(hw))
326 DPRINTK(PROBE, ERR, "ixgb_init_hw failed.\n"); 327 DPRINTK(PROBE, ERR, "ixgb_init_hw failed.\n");
328
329 /* restore frame size information */
330 IXGB_WRITE_REG(hw, MFS, hw->max_frame_size << IXGB_MFS_SHIFT);
331 if (hw->max_frame_size >
332 IXGB_MAX_ENET_FRAME_SIZE_WITHOUT_FCS + ENET_FCS_LENGTH) {
333 u32 ctrl0 = IXGB_READ_REG(hw, CTRL0);
334 if (!(ctrl0 & IXGB_CTRL0_JFE)) {
335 ctrl0 |= IXGB_CTRL0_JFE;
336 IXGB_WRITE_REG(hw, CTRL0, ctrl0);
337 }
338 }
327} 339}
328 340
329/** 341/**
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
index db6a97d1d7b1..51bbd582f16c 100644
--- a/drivers/net/pcmcia/pcnet_cs.c
+++ b/drivers/net/pcmcia/pcnet_cs.c
@@ -1746,6 +1746,7 @@ static struct pcmcia_device_id pcnet_ids[] = {
1746 PCMCIA_DEVICE_CIS_PROD_ID12("NDC", "Ethernet", 0x01c43ae1, 0x00b2e941, "NE2K.cis"), 1746 PCMCIA_DEVICE_CIS_PROD_ID12("NDC", "Ethernet", 0x01c43ae1, 0x00b2e941, "NE2K.cis"),
1747 PCMCIA_DEVICE_CIS_PROD_ID12("PMX ", "PE-200", 0x34f3f1c8, 0x10b59f8c, "PE-200.cis"), 1747 PCMCIA_DEVICE_CIS_PROD_ID12("PMX ", "PE-200", 0x34f3f1c8, 0x10b59f8c, "PE-200.cis"),
1748 PCMCIA_DEVICE_CIS_PROD_ID12("TAMARACK", "Ethernet", 0xcf434fba, 0x00b2e941, "tamarack.cis"), 1748 PCMCIA_DEVICE_CIS_PROD_ID12("TAMARACK", "Ethernet", 0xcf434fba, 0x00b2e941, "tamarack.cis"),
1749 PCMCIA_DEVICE_PROD_ID12("Ethernet", "CF Size PC Card", 0x00b2e941, 0x43ac239b),
1749 PCMCIA_DEVICE_PROD_ID123("Fast Ethernet", "CF Size PC Card", "1.0", 1750 PCMCIA_DEVICE_PROD_ID123("Fast Ethernet", "CF Size PC Card", "1.0",
1750 0xb4be14e3, 0x43ac239b, 0x0877b627), 1751 0xb4be14e3, 0x43ac239b, 0x0877b627),
1751 PCMCIA_DEVICE_NULL 1752 PCMCIA_DEVICE_NULL
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 121cb100f93a..9d80f1cf73ac 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -3737,7 +3737,7 @@ static int s2io_enable_msi_x(struct s2io_nic *nic)
3737} 3737}
3738 3738
3739/* Handle software interrupt used during MSI(X) test */ 3739/* Handle software interrupt used during MSI(X) test */
3740static irqreturn_t __devinit s2io_test_intr(int irq, void *dev_id) 3740static irqreturn_t s2io_test_intr(int irq, void *dev_id)
3741{ 3741{
3742 struct s2io_nic *sp = dev_id; 3742 struct s2io_nic *sp = dev_id;
3743 3743
@@ -3748,7 +3748,7 @@ static irqreturn_t __devinit s2io_test_intr(int irq, void *dev_id)
3748} 3748}
3749 3749
3750/* Test interrupt path by forcing a a software IRQ */ 3750/* Test interrupt path by forcing a a software IRQ */
3751static int __devinit s2io_test_msi(struct s2io_nic *sp) 3751static int s2io_test_msi(struct s2io_nic *sp)
3752{ 3752{
3753 struct pci_dev *pdev = sp->pdev; 3753 struct pci_dev *pdev = sp->pdev;
3754 struct XENA_dev_config __iomem *bar0 = sp->bar0; 3754 struct XENA_dev_config __iomem *bar0 = sp->bar0;
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c
index 720088396bb9..7eab072ae792 100644
--- a/drivers/net/sis190.c
+++ b/drivers/net/sis190.c
@@ -474,7 +474,7 @@ static inline void sis190_map_to_asic(struct RxDesc *desc, dma_addr_t mapping,
474static inline void sis190_make_unusable_by_asic(struct RxDesc *desc) 474static inline void sis190_make_unusable_by_asic(struct RxDesc *desc)
475{ 475{
476 desc->PSize = 0x0; 476 desc->PSize = 0x0;
477 desc->addr = 0xdeadbeef; 477 desc->addr = cpu_to_le32(0xdeadbeef);
478 desc->size &= cpu_to_le32(RingEnd); 478 desc->size &= cpu_to_le32(RingEnd);
479 wmb(); 479 wmb();
480 desc->status = 0x0; 480 desc->status = 0x0;
@@ -580,7 +580,7 @@ static int sis190_rx_interrupt(struct net_device *dev,
580 struct RxDesc *desc = tp->RxDescRing + entry; 580 struct RxDesc *desc = tp->RxDescRing + entry;
581 u32 status; 581 u32 status;
582 582
583 if (desc->status & OWNbit) 583 if (le32_to_cpu(desc->status) & OWNbit)
584 break; 584 break;
585 585
586 status = le32_to_cpu(desc->PSize); 586 status = le32_to_cpu(desc->PSize);
@@ -1381,7 +1381,7 @@ out:
1381 return rc; 1381 return rc;
1382} 1382}
1383 1383
1384static void __devexit sis190_mii_remove(struct net_device *dev) 1384static void sis190_mii_remove(struct net_device *dev)
1385{ 1385{
1386 struct sis190_private *tp = netdev_priv(dev); 1386 struct sis190_private *tp = netdev_priv(dev);
1387 1387
@@ -1538,9 +1538,9 @@ static int __devinit sis190_get_mac_addr_from_eeprom(struct pci_dev *pdev,
1538 1538
1539 /* Get MAC address from EEPROM */ 1539 /* Get MAC address from EEPROM */
1540 for (i = 0; i < MAC_ADDR_LEN / 2; i++) { 1540 for (i = 0; i < MAC_ADDR_LEN / 2; i++) {
1541 __le16 w = sis190_read_eeprom(ioaddr, EEPROMMACAddr + i); 1541 u16 w = sis190_read_eeprom(ioaddr, EEPROMMACAddr + i);
1542 1542
1543 ((u16 *)dev->dev_addr)[i] = le16_to_cpu(w); 1543 ((__le16 *)dev->dev_addr)[i] = cpu_to_le16(w);
1544 } 1544 }
1545 1545
1546 sis190_set_rgmii(tp, sis190_read_eeprom(ioaddr, EEPROMInfo)); 1546 sis190_set_rgmii(tp, sis190_read_eeprom(ioaddr, EEPROMInfo));
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 6197afb3ed83..a74fc11a6482 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -822,8 +822,13 @@ static void sky2_mac_init(struct sky2_hw *hw, unsigned port)
822 822
823 sky2_write32(hw, SK_REG(port, RX_GMF_CTRL_T), rx_reg); 823 sky2_write32(hw, SK_REG(port, RX_GMF_CTRL_T), rx_reg);
824 824
825 /* Flush Rx MAC FIFO on any flow control or error */ 825 if (hw->chip_id == CHIP_ID_YUKON_XL) {
826 sky2_write16(hw, SK_REG(port, RX_GMF_FL_MSK), GMR_FS_ANY_ERR); 826 /* Hardware errata - clear flush mask */
827 sky2_write16(hw, SK_REG(port, RX_GMF_FL_MSK), 0);
828 } else {
829 /* Flush Rx MAC FIFO on any flow control or error */
830 sky2_write16(hw, SK_REG(port, RX_GMF_FL_MSK), GMR_FS_ANY_ERR);
831 }
827 832
828 /* Set threshold to 0xa (64 bytes) + 1 to workaround pause bug */ 833 /* Set threshold to 0xa (64 bytes) + 1 to workaround pause bug */
829 reg = RX_GMF_FL_THR_DEF + 1; 834 reg = RX_GMF_FL_THR_DEF + 1;
diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h
index d04e4fa35206..7defa63b9c74 100644
--- a/drivers/net/smc911x.h
+++ b/drivers/net/smc911x.h
@@ -76,7 +76,7 @@
76 76
77 77
78 78
79#if SMC_USE_PXA_DMA 79#ifdef SMC_USE_PXA_DMA
80#define SMC_USE_DMA 80#define SMC_USE_DMA
81 81
82/* 82/*
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c
index bcc430bd9e49..6e00dc857afa 100644
--- a/drivers/net/starfire.c
+++ b/drivers/net/starfire.c
@@ -1742,7 +1742,7 @@ static void set_rx_mode(struct net_device *dev)
1742 if (vlan_group_get_device(np->vlgrp, i)) { 1742 if (vlan_group_get_device(np->vlgrp, i)) {
1743 if (vlan_count >= 32) 1743 if (vlan_count >= 32)
1744 break; 1744 break;
1745 writew(cpu_to_be16(i), filter_addr); 1745 writew(i, filter_addr);
1746 filter_addr += 16; 1746 filter_addr += 16;
1747 vlan_count++; 1747 vlan_count++;
1748 } 1748 }
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c
index ff98f5d597f1..0a6186d4a48e 100644
--- a/drivers/net/sundance.c
+++ b/drivers/net/sundance.c
@@ -340,9 +340,9 @@ enum mac_ctrl1_bits {
340/* Note that using only 32 bit fields simplifies conversion to big-endian 340/* Note that using only 32 bit fields simplifies conversion to big-endian
341 architectures. */ 341 architectures. */
342struct netdev_desc { 342struct netdev_desc {
343 u32 next_desc; 343 __le32 next_desc;
344 u32 status; 344 __le32 status;
345 struct desc_frag { u32 addr, length; } frag[1]; 345 struct desc_frag { __le32 addr, length; } frag[1];
346}; 346};
347 347
348/* Bits in netdev_desc.status */ 348/* Bits in netdev_desc.status */
@@ -495,8 +495,8 @@ static int __devinit sundance_probe1 (struct pci_dev *pdev,
495 goto err_out_res; 495 goto err_out_res;
496 496
497 for (i = 0; i < 3; i++) 497 for (i = 0; i < 3; i++)
498 ((u16 *)dev->dev_addr)[i] = 498 ((__le16 *)dev->dev_addr)[i] =
499 le16_to_cpu(eeprom_read(ioaddr, i + EEPROM_SA_OFFSET)); 499 cpu_to_le16(eeprom_read(ioaddr, i + EEPROM_SA_OFFSET));
500 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len); 500 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
501 501
502 dev->base_addr = (unsigned long)ioaddr; 502 dev->base_addr = (unsigned long)ioaddr;
@@ -1090,8 +1090,8 @@ reset_tx (struct net_device *dev)
1090 skb = np->tx_skbuff[i]; 1090 skb = np->tx_skbuff[i];
1091 if (skb) { 1091 if (skb) {
1092 pci_unmap_single(np->pci_dev, 1092 pci_unmap_single(np->pci_dev,
1093 np->tx_ring[i].frag[0].addr, skb->len, 1093 le32_to_cpu(np->tx_ring[i].frag[0].addr),
1094 PCI_DMA_TODEVICE); 1094 skb->len, PCI_DMA_TODEVICE);
1095 if (irq) 1095 if (irq)
1096 dev_kfree_skb_irq (skb); 1096 dev_kfree_skb_irq (skb);
1097 else 1097 else
@@ -1214,7 +1214,7 @@ static irqreturn_t intr_handler(int irq, void *dev_instance)
1214 skb = np->tx_skbuff[entry]; 1214 skb = np->tx_skbuff[entry];
1215 /* Free the original skb. */ 1215 /* Free the original skb. */
1216 pci_unmap_single(np->pci_dev, 1216 pci_unmap_single(np->pci_dev,
1217 np->tx_ring[entry].frag[0].addr, 1217 le32_to_cpu(np->tx_ring[entry].frag[0].addr),
1218 skb->len, PCI_DMA_TODEVICE); 1218 skb->len, PCI_DMA_TODEVICE);
1219 dev_kfree_skb_irq (np->tx_skbuff[entry]); 1219 dev_kfree_skb_irq (np->tx_skbuff[entry]);
1220 np->tx_skbuff[entry] = NULL; 1220 np->tx_skbuff[entry] = NULL;
@@ -1233,7 +1233,7 @@ static irqreturn_t intr_handler(int irq, void *dev_instance)
1233 skb = np->tx_skbuff[entry]; 1233 skb = np->tx_skbuff[entry];
1234 /* Free the original skb. */ 1234 /* Free the original skb. */
1235 pci_unmap_single(np->pci_dev, 1235 pci_unmap_single(np->pci_dev,
1236 np->tx_ring[entry].frag[0].addr, 1236 le32_to_cpu(np->tx_ring[entry].frag[0].addr),
1237 skb->len, PCI_DMA_TODEVICE); 1237 skb->len, PCI_DMA_TODEVICE);
1238 dev_kfree_skb_irq (np->tx_skbuff[entry]); 1238 dev_kfree_skb_irq (np->tx_skbuff[entry]);
1239 np->tx_skbuff[entry] = NULL; 1239 np->tx_skbuff[entry] = NULL;
@@ -1311,19 +1311,19 @@ static void rx_poll(unsigned long data)
1311 && (skb = dev_alloc_skb(pkt_len + 2)) != NULL) { 1311 && (skb = dev_alloc_skb(pkt_len + 2)) != NULL) {
1312 skb_reserve(skb, 2); /* 16 byte align the IP header */ 1312 skb_reserve(skb, 2); /* 16 byte align the IP header */
1313 pci_dma_sync_single_for_cpu(np->pci_dev, 1313 pci_dma_sync_single_for_cpu(np->pci_dev,
1314 desc->frag[0].addr, 1314 le32_to_cpu(desc->frag[0].addr),
1315 np->rx_buf_sz, 1315 np->rx_buf_sz,
1316 PCI_DMA_FROMDEVICE); 1316 PCI_DMA_FROMDEVICE);
1317 1317
1318 skb_copy_to_linear_data(skb, np->rx_skbuff[entry]->data, pkt_len); 1318 skb_copy_to_linear_data(skb, np->rx_skbuff[entry]->data, pkt_len);
1319 pci_dma_sync_single_for_device(np->pci_dev, 1319 pci_dma_sync_single_for_device(np->pci_dev,
1320 desc->frag[0].addr, 1320 le32_to_cpu(desc->frag[0].addr),
1321 np->rx_buf_sz, 1321 np->rx_buf_sz,
1322 PCI_DMA_FROMDEVICE); 1322 PCI_DMA_FROMDEVICE);
1323 skb_put(skb, pkt_len); 1323 skb_put(skb, pkt_len);
1324 } else { 1324 } else {
1325 pci_unmap_single(np->pci_dev, 1325 pci_unmap_single(np->pci_dev,
1326 desc->frag[0].addr, 1326 le32_to_cpu(desc->frag[0].addr),
1327 np->rx_buf_sz, 1327 np->rx_buf_sz,
1328 PCI_DMA_FROMDEVICE); 1328 PCI_DMA_FROMDEVICE);
1329 skb_put(skb = np->rx_skbuff[entry], pkt_len); 1329 skb_put(skb = np->rx_skbuff[entry], pkt_len);
@@ -1709,23 +1709,23 @@ static int netdev_close(struct net_device *dev)
1709 /* Free all the skbuffs in the Rx queue. */ 1709 /* Free all the skbuffs in the Rx queue. */
1710 for (i = 0; i < RX_RING_SIZE; i++) { 1710 for (i = 0; i < RX_RING_SIZE; i++) {
1711 np->rx_ring[i].status = 0; 1711 np->rx_ring[i].status = 0;
1712 np->rx_ring[i].frag[0].addr = 0xBADF00D0; /* An invalid address. */
1713 skb = np->rx_skbuff[i]; 1712 skb = np->rx_skbuff[i];
1714 if (skb) { 1713 if (skb) {
1715 pci_unmap_single(np->pci_dev, 1714 pci_unmap_single(np->pci_dev,
1716 np->rx_ring[i].frag[0].addr, np->rx_buf_sz, 1715 le32_to_cpu(np->rx_ring[i].frag[0].addr),
1717 PCI_DMA_FROMDEVICE); 1716 np->rx_buf_sz, PCI_DMA_FROMDEVICE);
1718 dev_kfree_skb(skb); 1717 dev_kfree_skb(skb);
1719 np->rx_skbuff[i] = NULL; 1718 np->rx_skbuff[i] = NULL;
1720 } 1719 }
1720 np->rx_ring[i].frag[0].addr = cpu_to_le32(0xBADF00D0); /* poison */
1721 } 1721 }
1722 for (i = 0; i < TX_RING_SIZE; i++) { 1722 for (i = 0; i < TX_RING_SIZE; i++) {
1723 np->tx_ring[i].next_desc = 0; 1723 np->tx_ring[i].next_desc = 0;
1724 skb = np->tx_skbuff[i]; 1724 skb = np->tx_skbuff[i];
1725 if (skb) { 1725 if (skb) {
1726 pci_unmap_single(np->pci_dev, 1726 pci_unmap_single(np->pci_dev,
1727 np->tx_ring[i].frag[0].addr, skb->len, 1727 le32_to_cpu(np->tx_ring[i].frag[0].addr),
1728 PCI_DMA_TODEVICE); 1728 skb->len, PCI_DMA_TODEVICE);
1729 dev_kfree_skb(skb); 1729 dev_kfree_skb(skb);
1730 np->tx_skbuff[i] = NULL; 1730 np->tx_skbuff[i] = NULL;
1731 } 1731 }
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index 7f689907ac28..abac7db3819e 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -3447,7 +3447,7 @@ static int ucc_geth_rx(struct ucc_geth_private *ugeth, u8 rxQ, int rx_work_limit
3447 u16 length, howmany = 0; 3447 u16 length, howmany = 0;
3448 u32 bd_status; 3448 u32 bd_status;
3449 u8 *bdBuffer; 3449 u8 *bdBuffer;
3450 struct net_device * dev; 3450 struct net_device *dev;
3451 3451
3452 ugeth_vdbg("%s: IN", __FUNCTION__); 3452 ugeth_vdbg("%s: IN", __FUNCTION__);
3453 3453
diff --git a/drivers/net/ucc_geth_mii.h b/drivers/net/ucc_geth_mii.h
index d83437039919..1e45b2028a50 100644
--- a/drivers/net/ucc_geth_mii.h
+++ b/drivers/net/ucc_geth_mii.h
@@ -96,5 +96,5 @@ enum enet_tbi_mii_reg {
96int uec_mdio_read(struct mii_bus *bus, int mii_id, int regnum); 96int uec_mdio_read(struct mii_bus *bus, int mii_id, int regnum);
97int uec_mdio_write(struct mii_bus *bus, int mii_id, int regnum, u16 value); 97int uec_mdio_write(struct mii_bus *bus, int mii_id, int regnum, u16 value);
98int __init uec_mdio_init(void); 98int __init uec_mdio_init(void);
99void __exit uec_mdio_exit(void); 99void uec_mdio_exit(void);
100#endif /* __UEC_MII_H */ 100#endif /* __UEC_MII_H */