diff options
Diffstat (limited to 'drivers/net')
31 files changed, 291 insertions, 260 deletions
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c index e2cb19b582a1..6f93a765e564 100644 --- a/drivers/net/8139cp.c +++ b/drivers/net/8139cp.c | |||
@@ -765,17 +765,18 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev) | |||
765 | struct cp_private *cp = netdev_priv(dev); | 765 | struct cp_private *cp = netdev_priv(dev); |
766 | unsigned entry; | 766 | unsigned entry; |
767 | u32 eor, flags; | 767 | u32 eor, flags; |
768 | unsigned long intr_flags; | ||
768 | #if CP_VLAN_TAG_USED | 769 | #if CP_VLAN_TAG_USED |
769 | u32 vlan_tag = 0; | 770 | u32 vlan_tag = 0; |
770 | #endif | 771 | #endif |
771 | int mss = 0; | 772 | int mss = 0; |
772 | 773 | ||
773 | spin_lock_irq(&cp->lock); | 774 | spin_lock_irqsave(&cp->lock, intr_flags); |
774 | 775 | ||
775 | /* This is a hard error, log it. */ | 776 | /* This is a hard error, log it. */ |
776 | if (TX_BUFFS_AVAIL(cp) <= (skb_shinfo(skb)->nr_frags + 1)) { | 777 | if (TX_BUFFS_AVAIL(cp) <= (skb_shinfo(skb)->nr_frags + 1)) { |
777 | netif_stop_queue(dev); | 778 | netif_stop_queue(dev); |
778 | spin_unlock_irq(&cp->lock); | 779 | spin_unlock_irqrestore(&cp->lock, intr_flags); |
779 | printk(KERN_ERR PFX "%s: BUG! Tx Ring full when queue awake!\n", | 780 | printk(KERN_ERR PFX "%s: BUG! Tx Ring full when queue awake!\n", |
780 | dev->name); | 781 | dev->name); |
781 | return 1; | 782 | return 1; |
@@ -908,7 +909,7 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev) | |||
908 | if (TX_BUFFS_AVAIL(cp) <= (MAX_SKB_FRAGS + 1)) | 909 | if (TX_BUFFS_AVAIL(cp) <= (MAX_SKB_FRAGS + 1)) |
909 | netif_stop_queue(dev); | 910 | netif_stop_queue(dev); |
910 | 911 | ||
911 | spin_unlock_irq(&cp->lock); | 912 | spin_unlock_irqrestore(&cp->lock, intr_flags); |
912 | 913 | ||
913 | cpw8(TxPoll, NormalTxPoll); | 914 | cpw8(TxPoll, NormalTxPoll); |
914 | dev->trans_start = jiffies; | 915 | dev->trans_start = jiffies; |
diff --git a/drivers/net/82596.c b/drivers/net/82596.c index 8236f26ffd46..640d7ca2ebcf 100644 --- a/drivers/net/82596.c +++ b/drivers/net/82596.c | |||
@@ -1066,8 +1066,8 @@ static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1066 | short length = skb->len; | 1066 | short length = skb->len; |
1067 | dev->trans_start = jiffies; | 1067 | dev->trans_start = jiffies; |
1068 | 1068 | ||
1069 | DEB(DEB_STARTTX,printk(KERN_DEBUG "%s: i596_start_xmit(%x,%x) called\n", dev->name, | 1069 | DEB(DEB_STARTTX,printk(KERN_DEBUG "%s: i596_start_xmit(%x,%p) called\n", |
1070 | skb->len, (unsigned int)skb->data)); | 1070 | dev->name, skb->len, skb->data)); |
1071 | 1071 | ||
1072 | if (skb->len < ETH_ZLEN) { | 1072 | if (skb->len < ETH_ZLEN) { |
1073 | if (skb_padto(skb, ETH_ZLEN)) | 1073 | if (skb_padto(skb, ETH_ZLEN)) |
@@ -1246,7 +1246,8 @@ struct net_device * __init i82596_probe(int unit) | |||
1246 | dev->priv = (void *)(dev->mem_start); | 1246 | dev->priv = (void *)(dev->mem_start); |
1247 | 1247 | ||
1248 | lp = dev->priv; | 1248 | lp = dev->priv; |
1249 | DEB(DEB_INIT,printk(KERN_DEBUG "%s: lp at 0x%08lx (%d bytes), lp->scb at 0x%08lx\n", | 1249 | DEB(DEB_INIT,printk(KERN_DEBUG "%s: lp at 0x%08lx (%zd bytes), " |
1250 | "lp->scb at 0x%08lx\n", | ||
1250 | dev->name, (unsigned long)lp, | 1251 | dev->name, (unsigned long)lp, |
1251 | sizeof(struct i596_private), (unsigned long)&lp->scb)); | 1252 | sizeof(struct i596_private), (unsigned long)&lp->scb)); |
1252 | memset((void *) lp, 0, sizeof(struct i596_private)); | 1253 | memset((void *) lp, 0, sizeof(struct i596_private)); |
diff --git a/drivers/net/b44.c b/drivers/net/b44.c index 5eb2ec68393f..303a8d94ad4b 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c | |||
@@ -110,6 +110,11 @@ MODULE_DEVICE_TABLE(pci, b44_pci_tbl); | |||
110 | 110 | ||
111 | static void b44_halt(struct b44 *); | 111 | static void b44_halt(struct b44 *); |
112 | static void b44_init_rings(struct b44 *); | 112 | static void b44_init_rings(struct b44 *); |
113 | |||
114 | #define B44_FULL_RESET 1 | ||
115 | #define B44_FULL_RESET_SKIP_PHY 2 | ||
116 | #define B44_PARTIAL_RESET 3 | ||
117 | |||
113 | static void b44_init_hw(struct b44 *, int); | 118 | static void b44_init_hw(struct b44 *, int); |
114 | 119 | ||
115 | static int dma_desc_align_mask; | 120 | static int dma_desc_align_mask; |
@@ -752,7 +757,7 @@ static void b44_recycle_rx(struct b44 *bp, int src_idx, u32 dest_idx_unmasked) | |||
752 | dest_idx * sizeof(dest_desc), | 757 | dest_idx * sizeof(dest_desc), |
753 | DMA_BIDIRECTIONAL); | 758 | DMA_BIDIRECTIONAL); |
754 | 759 | ||
755 | pci_dma_sync_single_for_device(bp->pdev, src_desc->addr, | 760 | pci_dma_sync_single_for_device(bp->pdev, le32_to_cpu(src_desc->addr), |
756 | RX_PKT_BUF_SZ, | 761 | RX_PKT_BUF_SZ, |
757 | PCI_DMA_FROMDEVICE); | 762 | PCI_DMA_FROMDEVICE); |
758 | } | 763 | } |
@@ -884,7 +889,7 @@ static int b44_poll(struct net_device *netdev, int *budget) | |||
884 | spin_lock_irqsave(&bp->lock, flags); | 889 | spin_lock_irqsave(&bp->lock, flags); |
885 | b44_halt(bp); | 890 | b44_halt(bp); |
886 | b44_init_rings(bp); | 891 | b44_init_rings(bp); |
887 | b44_init_hw(bp, 1); | 892 | b44_init_hw(bp, B44_FULL_RESET_SKIP_PHY); |
888 | netif_wake_queue(bp->dev); | 893 | netif_wake_queue(bp->dev); |
889 | spin_unlock_irqrestore(&bp->lock, flags); | 894 | spin_unlock_irqrestore(&bp->lock, flags); |
890 | done = 1; | 895 | done = 1; |
@@ -954,7 +959,7 @@ static void b44_tx_timeout(struct net_device *dev) | |||
954 | 959 | ||
955 | b44_halt(bp); | 960 | b44_halt(bp); |
956 | b44_init_rings(bp); | 961 | b44_init_rings(bp); |
957 | b44_init_hw(bp, 1); | 962 | b44_init_hw(bp, B44_FULL_RESET); |
958 | 963 | ||
959 | spin_unlock_irq(&bp->lock); | 964 | spin_unlock_irq(&bp->lock); |
960 | 965 | ||
@@ -1071,7 +1076,7 @@ static int b44_change_mtu(struct net_device *dev, int new_mtu) | |||
1071 | b44_halt(bp); | 1076 | b44_halt(bp); |
1072 | dev->mtu = new_mtu; | 1077 | dev->mtu = new_mtu; |
1073 | b44_init_rings(bp); | 1078 | b44_init_rings(bp); |
1074 | b44_init_hw(bp, 1); | 1079 | b44_init_hw(bp, B44_FULL_RESET); |
1075 | spin_unlock_irq(&bp->lock); | 1080 | spin_unlock_irq(&bp->lock); |
1076 | 1081 | ||
1077 | b44_enable_ints(bp); | 1082 | b44_enable_ints(bp); |
@@ -1368,12 +1373,12 @@ static int b44_set_mac_addr(struct net_device *dev, void *p) | |||
1368 | * packet processing. Invoked with bp->lock held. | 1373 | * packet processing. Invoked with bp->lock held. |
1369 | */ | 1374 | */ |
1370 | static void __b44_set_rx_mode(struct net_device *); | 1375 | static void __b44_set_rx_mode(struct net_device *); |
1371 | static void b44_init_hw(struct b44 *bp, int full_reset) | 1376 | static void b44_init_hw(struct b44 *bp, int reset_kind) |
1372 | { | 1377 | { |
1373 | u32 val; | 1378 | u32 val; |
1374 | 1379 | ||
1375 | b44_chip_reset(bp); | 1380 | b44_chip_reset(bp); |
1376 | if (full_reset) { | 1381 | if (reset_kind == B44_FULL_RESET) { |
1377 | b44_phy_reset(bp); | 1382 | b44_phy_reset(bp); |
1378 | b44_setup_phy(bp); | 1383 | b44_setup_phy(bp); |
1379 | } | 1384 | } |
@@ -1390,7 +1395,10 @@ static void b44_init_hw(struct b44 *bp, int full_reset) | |||
1390 | bw32(bp, B44_TXMAXLEN, bp->dev->mtu + ETH_HLEN + 8 + RX_HEADER_LEN); | 1395 | bw32(bp, B44_TXMAXLEN, bp->dev->mtu + ETH_HLEN + 8 + RX_HEADER_LEN); |
1391 | 1396 | ||
1392 | bw32(bp, B44_TX_WMARK, 56); /* XXX magic */ | 1397 | bw32(bp, B44_TX_WMARK, 56); /* XXX magic */ |
1393 | if (full_reset) { | 1398 | if (reset_kind == B44_PARTIAL_RESET) { |
1399 | bw32(bp, B44_DMARX_CTRL, (DMARX_CTRL_ENABLE | | ||
1400 | (bp->rx_offset << DMARX_CTRL_ROSHIFT))); | ||
1401 | } else { | ||
1394 | bw32(bp, B44_DMATX_CTRL, DMATX_CTRL_ENABLE); | 1402 | bw32(bp, B44_DMATX_CTRL, DMATX_CTRL_ENABLE); |
1395 | bw32(bp, B44_DMATX_ADDR, bp->tx_ring_dma + bp->dma_offset); | 1403 | bw32(bp, B44_DMATX_ADDR, bp->tx_ring_dma + bp->dma_offset); |
1396 | bw32(bp, B44_DMARX_CTRL, (DMARX_CTRL_ENABLE | | 1404 | bw32(bp, B44_DMARX_CTRL, (DMARX_CTRL_ENABLE | |
@@ -1401,9 +1409,6 @@ static void b44_init_hw(struct b44 *bp, int full_reset) | |||
1401 | bp->rx_prod = bp->rx_pending; | 1409 | bp->rx_prod = bp->rx_pending; |
1402 | 1410 | ||
1403 | bw32(bp, B44_MIB_CTRL, MIB_CTRL_CLR_ON_READ); | 1411 | bw32(bp, B44_MIB_CTRL, MIB_CTRL_CLR_ON_READ); |
1404 | } else { | ||
1405 | bw32(bp, B44_DMARX_CTRL, (DMARX_CTRL_ENABLE | | ||
1406 | (bp->rx_offset << DMARX_CTRL_ROSHIFT))); | ||
1407 | } | 1412 | } |
1408 | 1413 | ||
1409 | val = br32(bp, B44_ENET_CTRL); | 1414 | val = br32(bp, B44_ENET_CTRL); |
@@ -1420,7 +1425,7 @@ static int b44_open(struct net_device *dev) | |||
1420 | goto out; | 1425 | goto out; |
1421 | 1426 | ||
1422 | b44_init_rings(bp); | 1427 | b44_init_rings(bp); |
1423 | b44_init_hw(bp, 1); | 1428 | b44_init_hw(bp, B44_FULL_RESET); |
1424 | 1429 | ||
1425 | b44_check_phy(bp); | 1430 | b44_check_phy(bp); |
1426 | 1431 | ||
@@ -1629,7 +1634,7 @@ static int b44_close(struct net_device *dev) | |||
1629 | netif_poll_enable(dev); | 1634 | netif_poll_enable(dev); |
1630 | 1635 | ||
1631 | if (bp->flags & B44_FLAG_WOL_ENABLE) { | 1636 | if (bp->flags & B44_FLAG_WOL_ENABLE) { |
1632 | b44_init_hw(bp, 0); | 1637 | b44_init_hw(bp, B44_PARTIAL_RESET); |
1633 | b44_setup_wol(bp); | 1638 | b44_setup_wol(bp); |
1634 | } | 1639 | } |
1635 | 1640 | ||
@@ -1905,7 +1910,7 @@ static int b44_set_ringparam(struct net_device *dev, | |||
1905 | 1910 | ||
1906 | b44_halt(bp); | 1911 | b44_halt(bp); |
1907 | b44_init_rings(bp); | 1912 | b44_init_rings(bp); |
1908 | b44_init_hw(bp, 1); | 1913 | b44_init_hw(bp, B44_FULL_RESET); |
1909 | netif_wake_queue(bp->dev); | 1914 | netif_wake_queue(bp->dev); |
1910 | spin_unlock_irq(&bp->lock); | 1915 | spin_unlock_irq(&bp->lock); |
1911 | 1916 | ||
@@ -1948,7 +1953,7 @@ static int b44_set_pauseparam(struct net_device *dev, | |||
1948 | if (bp->flags & B44_FLAG_PAUSE_AUTO) { | 1953 | if (bp->flags & B44_FLAG_PAUSE_AUTO) { |
1949 | b44_halt(bp); | 1954 | b44_halt(bp); |
1950 | b44_init_rings(bp); | 1955 | b44_init_rings(bp); |
1951 | b44_init_hw(bp, 1); | 1956 | b44_init_hw(bp, B44_FULL_RESET); |
1952 | } else { | 1957 | } else { |
1953 | __b44_set_flow_ctrl(bp, bp->flags); | 1958 | __b44_set_flow_ctrl(bp, bp->flags); |
1954 | } | 1959 | } |
@@ -2304,7 +2309,7 @@ static int b44_suspend(struct pci_dev *pdev, pm_message_t state) | |||
2304 | 2309 | ||
2305 | free_irq(dev->irq, dev); | 2310 | free_irq(dev->irq, dev); |
2306 | if (bp->flags & B44_FLAG_WOL_ENABLE) { | 2311 | if (bp->flags & B44_FLAG_WOL_ENABLE) { |
2307 | b44_init_hw(bp, 0); | 2312 | b44_init_hw(bp, B44_PARTIAL_RESET); |
2308 | b44_setup_wol(bp); | 2313 | b44_setup_wol(bp); |
2309 | } | 2314 | } |
2310 | pci_disable_device(pdev); | 2315 | pci_disable_device(pdev); |
@@ -2315,21 +2320,32 @@ static int b44_resume(struct pci_dev *pdev) | |||
2315 | { | 2320 | { |
2316 | struct net_device *dev = pci_get_drvdata(pdev); | 2321 | struct net_device *dev = pci_get_drvdata(pdev); |
2317 | struct b44 *bp = netdev_priv(dev); | 2322 | struct b44 *bp = netdev_priv(dev); |
2323 | int rc = 0; | ||
2318 | 2324 | ||
2319 | pci_restore_state(pdev); | 2325 | pci_restore_state(pdev); |
2320 | pci_enable_device(pdev); | 2326 | rc = pci_enable_device(pdev); |
2327 | if (rc) { | ||
2328 | printk(KERN_ERR PFX "%s: pci_enable_device failed\n", | ||
2329 | dev->name); | ||
2330 | return rc; | ||
2331 | } | ||
2332 | |||
2321 | pci_set_master(pdev); | 2333 | pci_set_master(pdev); |
2322 | 2334 | ||
2323 | if (!netif_running(dev)) | 2335 | if (!netif_running(dev)) |
2324 | return 0; | 2336 | return 0; |
2325 | 2337 | ||
2326 | if (request_irq(dev->irq, b44_interrupt, IRQF_SHARED, dev->name, dev)) | 2338 | rc = request_irq(dev->irq, b44_interrupt, IRQF_SHARED, dev->name, dev); |
2339 | if (rc) { | ||
2327 | printk(KERN_ERR PFX "%s: request_irq failed\n", dev->name); | 2340 | printk(KERN_ERR PFX "%s: request_irq failed\n", dev->name); |
2341 | pci_disable_device(pdev); | ||
2342 | return rc; | ||
2343 | } | ||
2328 | 2344 | ||
2329 | spin_lock_irq(&bp->lock); | 2345 | spin_lock_irq(&bp->lock); |
2330 | 2346 | ||
2331 | b44_init_rings(bp); | 2347 | b44_init_rings(bp); |
2332 | b44_init_hw(bp, 1); | 2348 | b44_init_hw(bp, B44_FULL_RESET); |
2333 | netif_device_attach(bp->dev); | 2349 | netif_device_attach(bp->dev); |
2334 | spin_unlock_irq(&bp->lock); | 2350 | spin_unlock_irq(&bp->lock); |
2335 | 2351 | ||
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index ca5acc4736df..953808efe551 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -57,8 +57,8 @@ | |||
57 | 57 | ||
58 | #define DRV_MODULE_NAME "bnx2" | 58 | #define DRV_MODULE_NAME "bnx2" |
59 | #define PFX DRV_MODULE_NAME ": " | 59 | #define PFX DRV_MODULE_NAME ": " |
60 | #define DRV_MODULE_VERSION "1.5.3" | 60 | #define DRV_MODULE_VERSION "1.5.4" |
61 | #define DRV_MODULE_RELDATE "January 8, 2007" | 61 | #define DRV_MODULE_RELDATE "January 24, 2007" |
62 | 62 | ||
63 | #define RUN_AT(x) (jiffies + (x)) | 63 | #define RUN_AT(x) (jiffies + (x)) |
64 | 64 | ||
@@ -5845,9 +5845,11 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) | |||
5845 | reg = REG_RD_IND(bp, BNX2_SHM_HDR_SIGNATURE); | 5845 | reg = REG_RD_IND(bp, BNX2_SHM_HDR_SIGNATURE); |
5846 | 5846 | ||
5847 | if ((reg & BNX2_SHM_HDR_SIGNATURE_SIG_MASK) == | 5847 | if ((reg & BNX2_SHM_HDR_SIGNATURE_SIG_MASK) == |
5848 | BNX2_SHM_HDR_SIGNATURE_SIG) | 5848 | BNX2_SHM_HDR_SIGNATURE_SIG) { |
5849 | bp->shmem_base = REG_RD_IND(bp, BNX2_SHM_HDR_ADDR_0); | 5849 | u32 off = PCI_FUNC(pdev->devfn) << 2; |
5850 | else | 5850 | |
5851 | bp->shmem_base = REG_RD_IND(bp, BNX2_SHM_HDR_ADDR_0 + off); | ||
5852 | } else | ||
5851 | bp->shmem_base = HOST_VIEW_SHMEM_BASE; | 5853 | bp->shmem_base = HOST_VIEW_SHMEM_BASE; |
5852 | 5854 | ||
5853 | /* Get the permanent MAC address. First we need to make sure the | 5855 | /* Get the permanent MAC address. First we need to make sure the |
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index dc434fb6da85..0978c9ac6d2b 100644 --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h | |||
@@ -151,8 +151,8 @@ struct slave { | |||
151 | struct slave *next; | 151 | struct slave *next; |
152 | struct slave *prev; | 152 | struct slave *prev; |
153 | int delay; | 153 | int delay; |
154 | u32 jiffies; | 154 | unsigned long jiffies; |
155 | u32 last_arp_rx; | 155 | unsigned long last_arp_rx; |
156 | s8 link; /* one of BOND_LINK_XXXX */ | 156 | s8 link; /* one of BOND_LINK_XXXX */ |
157 | s8 state; /* one of BOND_STATE_XXXX */ | 157 | s8 state; /* one of BOND_STATE_XXXX */ |
158 | u32 original_flags; | 158 | u32 original_flags; |
@@ -242,7 +242,8 @@ extern inline int slave_do_arp_validate(struct bonding *bond, struct slave *slav | |||
242 | return bond->params.arp_validate & (1 << slave->state); | 242 | return bond->params.arp_validate & (1 << slave->state); |
243 | } | 243 | } |
244 | 244 | ||
245 | extern inline u32 slave_last_rx(struct bonding *bond, struct slave *slave) | 245 | extern inline unsigned long slave_last_rx(struct bonding *bond, |
246 | struct slave *slave) | ||
246 | { | 247 | { |
247 | if (slave_do_arp_validate(bond, slave)) | 248 | if (slave_do_arp_validate(bond, slave)) |
248 | return slave->last_arp_rx; | 249 | return slave->last_arp_rx; |
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index c2ae2a24629b..3208dac29168 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c | |||
@@ -2725,6 +2725,7 @@ static int e100_suspend(struct pci_dev *pdev, pm_message_t state) | |||
2725 | del_timer_sync(&nic->watchdog); | 2725 | del_timer_sync(&nic->watchdog); |
2726 | netif_carrier_off(nic->netdev); | 2726 | netif_carrier_off(nic->netdev); |
2727 | 2727 | ||
2728 | netif_device_detach(netdev); | ||
2728 | pci_save_state(pdev); | 2729 | pci_save_state(pdev); |
2729 | 2730 | ||
2730 | if ((nic->flags & wol_magic) | e100_asf(nic)) { | 2731 | if ((nic->flags & wol_magic) | e100_asf(nic)) { |
@@ -2736,6 +2737,7 @@ static int e100_suspend(struct pci_dev *pdev, pm_message_t state) | |||
2736 | } | 2737 | } |
2737 | 2738 | ||
2738 | pci_disable_device(pdev); | 2739 | pci_disable_device(pdev); |
2740 | free_irq(pdev->irq, netdev); | ||
2739 | pci_set_power_state(pdev, PCI_D3hot); | 2741 | pci_set_power_state(pdev, PCI_D3hot); |
2740 | 2742 | ||
2741 | return 0; | 2743 | return 0; |
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h index 39ad9f73d1ec..272e1ec51aa2 100644 --- a/drivers/net/ehea/ehea.h +++ b/drivers/net/ehea/ehea.h | |||
@@ -39,7 +39,7 @@ | |||
39 | #include <asm/io.h> | 39 | #include <asm/io.h> |
40 | 40 | ||
41 | #define DRV_NAME "ehea" | 41 | #define DRV_NAME "ehea" |
42 | #define DRV_VERSION "EHEA_0043" | 42 | #define DRV_VERSION "EHEA_0045" |
43 | 43 | ||
44 | #define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \ | 44 | #define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \ |
45 | | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR) | 45 | | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR) |
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 83fa32f72398..9de2d38a5321 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -558,12 +558,12 @@ static irqreturn_t ehea_qp_aff_irq_handler(int irq, void *param) | |||
558 | u32 qp_token; | 558 | u32 qp_token; |
559 | 559 | ||
560 | eqe = ehea_poll_eq(port->qp_eq); | 560 | eqe = ehea_poll_eq(port->qp_eq); |
561 | ehea_debug("eqe=%p", eqe); | 561 | |
562 | while (eqe) { | 562 | while (eqe) { |
563 | ehea_debug("*eqe=%lx", *(u64*)eqe); | ||
564 | eqe = ehea_poll_eq(port->qp_eq); | ||
565 | qp_token = EHEA_BMASK_GET(EHEA_EQE_QP_TOKEN, eqe->entry); | 563 | qp_token = EHEA_BMASK_GET(EHEA_EQE_QP_TOKEN, eqe->entry); |
566 | ehea_debug("next eqe=%p", eqe); | 564 | ehea_error("QP aff_err: entry=0x%lx, token=0x%x", |
565 | eqe->entry, qp_token); | ||
566 | eqe = ehea_poll_eq(port->qp_eq); | ||
567 | } | 567 | } |
568 | 568 | ||
569 | return IRQ_HANDLED; | 569 | return IRQ_HANDLED; |
@@ -575,8 +575,9 @@ static struct ehea_port *ehea_get_port(struct ehea_adapter *adapter, | |||
575 | int i; | 575 | int i; |
576 | 576 | ||
577 | for (i = 0; i < adapter->num_ports; i++) | 577 | for (i = 0; i < adapter->num_ports; i++) |
578 | if (adapter->port[i]->logical_port_id == logical_port) | 578 | if (adapter->port[i]) |
579 | return adapter->port[i]; | 579 | if (adapter->port[i]->logical_port_id == logical_port) |
580 | return adapter->port[i]; | ||
580 | return NULL; | 581 | return NULL; |
581 | } | 582 | } |
582 | 583 | ||
@@ -642,6 +643,8 @@ int ehea_sense_port_attr(struct ehea_port *port) | |||
642 | break; | 643 | break; |
643 | } | 644 | } |
644 | 645 | ||
646 | port->autoneg = 1; | ||
647 | |||
645 | /* Number of default QPs */ | 648 | /* Number of default QPs */ |
646 | port->num_def_qps = cb0->num_default_qps; | 649 | port->num_def_qps = cb0->num_default_qps; |
647 | 650 | ||
@@ -728,10 +731,7 @@ int ehea_set_portspeed(struct ehea_port *port, u32 port_speed) | |||
728 | } | 731 | } |
729 | } else { | 732 | } else { |
730 | if (hret == H_AUTHORITY) { | 733 | if (hret == H_AUTHORITY) { |
731 | ehea_info("Hypervisor denied setting port speed. Either" | 734 | ehea_info("Hypervisor denied setting port speed"); |
732 | " this partition is not authorized to set " | ||
733 | "port speed or another partition has modified" | ||
734 | " port speed first."); | ||
735 | ret = -EPERM; | 735 | ret = -EPERM; |
736 | } else { | 736 | } else { |
737 | ret = -EIO; | 737 | ret = -EIO; |
@@ -998,7 +998,7 @@ static int ehea_configure_port(struct ehea_port *port) | |||
998 | | EHEA_BMASK_SET(PXLY_RC_JUMBO_FRAME, 1); | 998 | | EHEA_BMASK_SET(PXLY_RC_JUMBO_FRAME, 1); |
999 | 999 | ||
1000 | for (i = 0; i < port->num_def_qps; i++) | 1000 | for (i = 0; i < port->num_def_qps; i++) |
1001 | cb0->default_qpn_arr[i] = port->port_res[i].qp->init_attr.qp_nr; | 1001 | cb0->default_qpn_arr[i] = port->port_res[0].qp->init_attr.qp_nr; |
1002 | 1002 | ||
1003 | if (netif_msg_ifup(port)) | 1003 | if (netif_msg_ifup(port)) |
1004 | ehea_dump(cb0, sizeof(*cb0), "ehea_configure_port"); | 1004 | ehea_dump(cb0, sizeof(*cb0), "ehea_configure_port"); |
@@ -1485,11 +1485,12 @@ out: | |||
1485 | 1485 | ||
1486 | static void ehea_promiscuous_error(u64 hret, int enable) | 1486 | static void ehea_promiscuous_error(u64 hret, int enable) |
1487 | { | 1487 | { |
1488 | ehea_info("Hypervisor denied %sabling promiscuous mode.%s", | 1488 | if (hret == H_AUTHORITY) |
1489 | enable == 1 ? "en" : "dis", | 1489 | ehea_info("Hypervisor denied %sabling promiscuous mode", |
1490 | hret != H_AUTHORITY ? "" : " Another partition owning a " | 1490 | enable == 1 ? "en" : "dis"); |
1491 | "logical port on the same physical port might have altered " | 1491 | else |
1492 | "promiscuous mode first."); | 1492 | ehea_error("failed %sabling promiscuous mode", |
1493 | enable == 1 ? "en" : "dis"); | ||
1493 | } | 1494 | } |
1494 | 1495 | ||
1495 | static void ehea_promiscuous(struct net_device *dev, int enable) | 1496 | static void ehea_promiscuous(struct net_device *dev, int enable) |
@@ -2267,6 +2268,8 @@ static void ehea_tx_watchdog(struct net_device *dev) | |||
2267 | int ehea_sense_adapter_attr(struct ehea_adapter *adapter) | 2268 | int ehea_sense_adapter_attr(struct ehea_adapter *adapter) |
2268 | { | 2269 | { |
2269 | struct hcp_query_ehea *cb; | 2270 | struct hcp_query_ehea *cb; |
2271 | struct device_node *lhea_dn = NULL; | ||
2272 | struct device_node *eth_dn = NULL; | ||
2270 | u64 hret; | 2273 | u64 hret; |
2271 | int ret; | 2274 | int ret; |
2272 | 2275 | ||
@@ -2283,7 +2286,18 @@ int ehea_sense_adapter_attr(struct ehea_adapter *adapter) | |||
2283 | goto out_herr; | 2286 | goto out_herr; |
2284 | } | 2287 | } |
2285 | 2288 | ||
2286 | adapter->num_ports = cb->num_ports; | 2289 | /* Determine the number of available logical ports |
2290 | * by counting the child nodes of the lhea OFDT entry | ||
2291 | */ | ||
2292 | adapter->num_ports = 0; | ||
2293 | lhea_dn = of_find_node_by_name(lhea_dn, "lhea"); | ||
2294 | do { | ||
2295 | eth_dn = of_get_next_child(lhea_dn, eth_dn); | ||
2296 | if (eth_dn) | ||
2297 | adapter->num_ports++; | ||
2298 | } while ( eth_dn ); | ||
2299 | of_node_put(lhea_dn); | ||
2300 | |||
2287 | adapter->max_mc_mac = cb->max_mc_mac - 1; | 2301 | adapter->max_mc_mac = cb->max_mc_mac - 1; |
2288 | ret = 0; | 2302 | ret = 0; |
2289 | 2303 | ||
@@ -2302,6 +2316,7 @@ static int ehea_setup_single_port(struct ehea_port *port, | |||
2302 | struct ehea_adapter *adapter = port->adapter; | 2316 | struct ehea_adapter *adapter = port->adapter; |
2303 | struct hcp_ehea_port_cb4 *cb4; | 2317 | struct hcp_ehea_port_cb4 *cb4; |
2304 | u32 *dn_log_port_id; | 2318 | u32 *dn_log_port_id; |
2319 | int jumbo = 0; | ||
2305 | 2320 | ||
2306 | sema_init(&port->port_lock, 1); | 2321 | sema_init(&port->port_lock, 1); |
2307 | port->state = EHEA_PORT_DOWN; | 2322 | port->state = EHEA_PORT_DOWN; |
@@ -2334,8 +2349,6 @@ static int ehea_setup_single_port(struct ehea_port *port, | |||
2334 | 2349 | ||
2335 | INIT_LIST_HEAD(&port->mc_list->list); | 2350 | INIT_LIST_HEAD(&port->mc_list->list); |
2336 | 2351 | ||
2337 | ehea_set_portspeed(port, EHEA_SPEED_AUTONEG); | ||
2338 | |||
2339 | ret = ehea_sense_port_attr(port); | 2352 | ret = ehea_sense_port_attr(port); |
2340 | if (ret) | 2353 | if (ret) |
2341 | goto out; | 2354 | goto out; |
@@ -2345,13 +2358,25 @@ static int ehea_setup_single_port(struct ehea_port *port, | |||
2345 | if (!cb4) { | 2358 | if (!cb4) { |
2346 | ehea_error("no mem for cb4"); | 2359 | ehea_error("no mem for cb4"); |
2347 | } else { | 2360 | } else { |
2348 | cb4->jumbo_frame = 1; | 2361 | hret = ehea_h_query_ehea_port(adapter->handle, |
2349 | hret = ehea_h_modify_ehea_port(adapter->handle, | 2362 | port->logical_port_id, |
2350 | port->logical_port_id, | 2363 | H_PORT_CB4, |
2351 | H_PORT_CB4, H_PORT_CB4_JUMBO, | 2364 | H_PORT_CB4_JUMBO, cb4); |
2352 | cb4); | 2365 | |
2353 | if (hret != H_SUCCESS) { | 2366 | if (hret == H_SUCCESS) { |
2354 | ehea_info("Jumbo frames not activated"); | 2367 | if (cb4->jumbo_frame) |
2368 | jumbo = 1; | ||
2369 | else { | ||
2370 | cb4->jumbo_frame = 1; | ||
2371 | hret = ehea_h_modify_ehea_port(adapter->handle, | ||
2372 | port-> | ||
2373 | logical_port_id, | ||
2374 | H_PORT_CB4, | ||
2375 | H_PORT_CB4_JUMBO, | ||
2376 | cb4); | ||
2377 | if (hret == H_SUCCESS) | ||
2378 | jumbo = 1; | ||
2379 | } | ||
2355 | } | 2380 | } |
2356 | kfree(cb4); | 2381 | kfree(cb4); |
2357 | } | 2382 | } |
@@ -2390,6 +2415,9 @@ static int ehea_setup_single_port(struct ehea_port *port, | |||
2390 | goto out_free; | 2415 | goto out_free; |
2391 | } | 2416 | } |
2392 | 2417 | ||
2418 | ehea_info("%s: Jumbo frames are %sabled", dev->name, | ||
2419 | jumbo == 1 ? "en" : "dis"); | ||
2420 | |||
2393 | port->netdev = dev; | 2421 | port->netdev = dev; |
2394 | ret = 0; | 2422 | ret = 0; |
2395 | goto out; | 2423 | goto out; |
@@ -2471,14 +2499,16 @@ static int __devinit ehea_probe(struct ibmebus_dev *dev, | |||
2471 | 2499 | ||
2472 | adapter_handle = (u64*)get_property(dev->ofdev.node, "ibm,hea-handle", | 2500 | adapter_handle = (u64*)get_property(dev->ofdev.node, "ibm,hea-handle", |
2473 | NULL); | 2501 | NULL); |
2474 | if (!adapter_handle) { | 2502 | if (adapter_handle) |
2503 | adapter->handle = *adapter_handle; | ||
2504 | |||
2505 | if (!adapter->handle) { | ||
2475 | dev_err(&dev->ofdev.dev, "failed getting handle for adapter" | 2506 | dev_err(&dev->ofdev.dev, "failed getting handle for adapter" |
2476 | " '%s'\n", dev->ofdev.node->full_name); | 2507 | " '%s'\n", dev->ofdev.node->full_name); |
2477 | ret = -ENODEV; | 2508 | ret = -ENODEV; |
2478 | goto out_free_ad; | 2509 | goto out_free_ad; |
2479 | } | 2510 | } |
2480 | 2511 | ||
2481 | adapter->handle = *adapter_handle; | ||
2482 | adapter->pd = EHEA_PD_ID; | 2512 | adapter->pd = EHEA_PD_ID; |
2483 | 2513 | ||
2484 | dev->ofdev.dev.driver_data = adapter; | 2514 | dev->ofdev.dev.driver_data = adapter; |
@@ -2568,6 +2598,7 @@ static int __devexit ehea_remove(struct ibmebus_dev *dev) | |||
2568 | destroy_workqueue(adapter->ehea_wq); | 2598 | destroy_workqueue(adapter->ehea_wq); |
2569 | 2599 | ||
2570 | ibmebus_free_irq(NULL, adapter->neq->attr.ist1, adapter); | 2600 | ibmebus_free_irq(NULL, adapter->neq->attr.ist1, adapter); |
2601 | tasklet_kill(&adapter->neq_tasklet); | ||
2571 | 2602 | ||
2572 | ehea_destroy_eq(adapter->neq); | 2603 | ehea_destroy_eq(adapter->neq); |
2573 | 2604 | ||
diff --git a/drivers/net/ehea/ehea_phyp.c b/drivers/net/ehea/ehea_phyp.c index 0cfc2bc1a27b..37716e05e808 100644 --- a/drivers/net/ehea/ehea_phyp.c +++ b/drivers/net/ehea/ehea_phyp.c | |||
@@ -94,6 +94,7 @@ static long ehea_plpar_hcall9(unsigned long opcode, | |||
94 | { | 94 | { |
95 | long ret; | 95 | long ret; |
96 | int i, sleep_msecs; | 96 | int i, sleep_msecs; |
97 | u8 cb_cat; | ||
97 | 98 | ||
98 | for (i = 0; i < 5; i++) { | 99 | for (i = 0; i < 5; i++) { |
99 | ret = plpar_hcall9(opcode, outs, | 100 | ret = plpar_hcall9(opcode, outs, |
@@ -106,7 +107,13 @@ static long ehea_plpar_hcall9(unsigned long opcode, | |||
106 | continue; | 107 | continue; |
107 | } | 108 | } |
108 | 109 | ||
109 | if (ret < H_SUCCESS) | 110 | cb_cat = EHEA_BMASK_GET(H_MEHEAPORT_CAT, arg2); |
111 | |||
112 | if ((ret < H_SUCCESS) && !(((ret == H_AUTHORITY) | ||
113 | && (opcode == H_MODIFY_HEA_PORT)) | ||
114 | && (((cb_cat == H_PORT_CB4) && ((arg3 == H_PORT_CB4_JUMBO) | ||
115 | || (arg3 == H_PORT_CB4_SPEED))) || ((cb_cat == H_PORT_CB7) | ||
116 | && (arg3 == H_PORT_CB7_DUCQPN))))) | ||
110 | ehea_error("opcode=%lx ret=%lx" | 117 | ehea_error("opcode=%lx ret=%lx" |
111 | " arg1=%lx arg2=%lx arg3=%lx arg4=%lx" | 118 | " arg1=%lx arg2=%lx arg3=%lx arg4=%lx" |
112 | " arg5=%lx arg6=%lx arg7=%lx arg8=%lx" | 119 | " arg5=%lx arg6=%lx arg7=%lx arg8=%lx" |
@@ -120,7 +127,6 @@ static long ehea_plpar_hcall9(unsigned long opcode, | |||
120 | outs[0], outs[1], outs[2], outs[3], | 127 | outs[0], outs[1], outs[2], outs[3], |
121 | outs[4], outs[5], outs[6], outs[7], | 128 | outs[4], outs[5], outs[6], outs[7], |
122 | outs[8]); | 129 | outs[8]); |
123 | |||
124 | return ret; | 130 | return ret; |
125 | } | 131 | } |
126 | 132 | ||
diff --git a/drivers/net/fs_enet/mac-fec.c b/drivers/net/fs_enet/mac-fec.c index c2c5fd419bd0..ff6839477306 100644 --- a/drivers/net/fs_enet/mac-fec.c +++ b/drivers/net/fs_enet/mac-fec.c | |||
@@ -104,9 +104,9 @@ static int do_pd_setup(struct fs_enet_private *fep) | |||
104 | fep->interrupt = platform_get_irq_byname(pdev,"interrupt"); | 104 | fep->interrupt = platform_get_irq_byname(pdev,"interrupt"); |
105 | if (fep->interrupt < 0) | 105 | if (fep->interrupt < 0) |
106 | return -EINVAL; | 106 | return -EINVAL; |
107 | 107 | ||
108 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs"); | 108 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs"); |
109 | fep->fec.fecp =(void*)r->start; | 109 | fep->fec.fecp = ioremap(r->start, r->end - r->start + 1); |
110 | 110 | ||
111 | if(fep->fec.fecp == NULL) | 111 | if(fep->fec.fecp == NULL) |
112 | return -EINVAL; | 112 | return -EINVAL; |
@@ -319,11 +319,14 @@ static void restart(struct net_device *dev) | |||
319 | * Clear any outstanding interrupt. | 319 | * Clear any outstanding interrupt. |
320 | */ | 320 | */ |
321 | FW(fecp, ievent, 0xffc0); | 321 | FW(fecp, ievent, 0xffc0); |
322 | #ifndef CONFIG_PPC_MERGE | ||
322 | FW(fecp, ivec, (fep->interrupt / 2) << 29); | 323 | FW(fecp, ivec, (fep->interrupt / 2) << 29); |
323 | 324 | #else | |
325 | FW(fecp, ivec, (virq_to_hw(fep->interrupt) / 2) << 29); | ||
326 | #endif | ||
324 | 327 | ||
325 | /* | 328 | /* |
326 | * adjust to speed (only for DUET & RMII) | 329 | * adjust to speed (only for DUET & RMII) |
327 | */ | 330 | */ |
328 | #ifdef CONFIG_DUET | 331 | #ifdef CONFIG_DUET |
329 | if (fpi->use_rmii) { | 332 | if (fpi->use_rmii) { |
@@ -418,6 +421,7 @@ static void stop(struct net_device *dev) | |||
418 | 421 | ||
419 | static void pre_request_irq(struct net_device *dev, int irq) | 422 | static void pre_request_irq(struct net_device *dev, int irq) |
420 | { | 423 | { |
424 | #ifndef CONFIG_PPC_MERGE | ||
421 | immap_t *immap = fs_enet_immap; | 425 | immap_t *immap = fs_enet_immap; |
422 | u32 siel; | 426 | u32 siel; |
423 | 427 | ||
@@ -431,6 +435,7 @@ static void pre_request_irq(struct net_device *dev, int irq) | |||
431 | siel &= ~(0x80000000 >> (irq & ~1)); | 435 | siel &= ~(0x80000000 >> (irq & ~1)); |
432 | out_be32(&immap->im_siu_conf.sc_siel, siel); | 436 | out_be32(&immap->im_siu_conf.sc_siel, siel); |
433 | } | 437 | } |
438 | #endif | ||
434 | } | 439 | } |
435 | 440 | ||
436 | static void post_free_irq(struct net_device *dev, int irq) | 441 | static void post_free_irq(struct net_device *dev, int irq) |
diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c index 95ec5872c507..afd7fca7c6c4 100644 --- a/drivers/net/fs_enet/mac-scc.c +++ b/drivers/net/fs_enet/mac-scc.c | |||
@@ -121,13 +121,13 @@ static int do_pd_setup(struct fs_enet_private *fep) | |||
121 | return -EINVAL; | 121 | return -EINVAL; |
122 | 122 | ||
123 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs"); | 123 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs"); |
124 | fep->scc.sccp = (void *)r->start; | 124 | fep->scc.sccp = ioremap(r->start, r->end - r->start + 1); |
125 | 125 | ||
126 | if (fep->scc.sccp == NULL) | 126 | if (fep->scc.sccp == NULL) |
127 | return -EINVAL; | 127 | return -EINVAL; |
128 | 128 | ||
129 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pram"); | 129 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pram"); |
130 | fep->scc.ep = (void *)r->start; | 130 | fep->scc.ep = ioremap(r->start, r->end - r->start + 1); |
131 | 131 | ||
132 | if (fep->scc.ep == NULL) | 132 | if (fep->scc.ep == NULL) |
133 | return -EINVAL; | 133 | return -EINVAL; |
@@ -397,6 +397,7 @@ static void stop(struct net_device *dev) | |||
397 | 397 | ||
398 | static void pre_request_irq(struct net_device *dev, int irq) | 398 | static void pre_request_irq(struct net_device *dev, int irq) |
399 | { | 399 | { |
400 | #ifndef CONFIG_PPC_MERGE | ||
400 | immap_t *immap = fs_enet_immap; | 401 | immap_t *immap = fs_enet_immap; |
401 | u32 siel; | 402 | u32 siel; |
402 | 403 | ||
@@ -410,6 +411,7 @@ static void pre_request_irq(struct net_device *dev, int irq) | |||
410 | siel &= ~(0x80000000 >> (irq & ~1)); | 411 | siel &= ~(0x80000000 >> (irq & ~1)); |
411 | out_be32(&immap->im_siu_conf.sc_siel, siel); | 412 | out_be32(&immap->im_siu_conf.sc_siel, siel); |
412 | } | 413 | } |
414 | #endif | ||
413 | } | 415 | } |
414 | 416 | ||
415 | static void post_free_irq(struct net_device *dev, int irq) | 417 | static void post_free_irq(struct net_device *dev, int irq) |
diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c index 3ca1082ec776..340ee99652eb 100644 --- a/drivers/net/irda/irda-usb.c +++ b/drivers/net/irda/irda-usb.c | |||
@@ -441,25 +441,13 @@ static int irda_usb_hard_xmit(struct sk_buff *skb, struct net_device *netdev) | |||
441 | goto drop; | 441 | goto drop; |
442 | } | 442 | } |
443 | 443 | ||
444 | /* Make sure there is room for IrDA-USB header. The actual | 444 | memcpy(self->tx_buff + self->header_length, skb->data, skb->len); |
445 | * allocation will be done lower in skb_push(). | ||
446 | * Also, we don't use directly skb_cow(), because it require | ||
447 | * headroom >= 16, which force unnecessary copies - Jean II */ | ||
448 | if (skb_headroom(skb) < self->header_length) { | ||
449 | IRDA_DEBUG(0, "%s(), Insuficient skb headroom.\n", __FUNCTION__); | ||
450 | if (skb_cow(skb, self->header_length)) { | ||
451 | IRDA_WARNING("%s(), failed skb_cow() !!!\n", __FUNCTION__); | ||
452 | goto drop; | ||
453 | } | ||
454 | } | ||
455 | 445 | ||
456 | /* Change setting for next frame */ | 446 | /* Change setting for next frame */ |
457 | |||
458 | if (self->capability & IUC_STIR421X) { | 447 | if (self->capability & IUC_STIR421X) { |
459 | __u8 turnaround_time; | 448 | __u8 turnaround_time; |
460 | __u8* frame; | 449 | __u8* frame = self->tx_buff; |
461 | turnaround_time = get_turnaround_time( skb ); | 450 | turnaround_time = get_turnaround_time( skb ); |
462 | frame= skb_push(skb, self->header_length); | ||
463 | irda_usb_build_header(self, frame, 0); | 451 | irda_usb_build_header(self, frame, 0); |
464 | frame[2] = turnaround_time; | 452 | frame[2] = turnaround_time; |
465 | if ((skb->len != 0) && | 453 | if ((skb->len != 0) && |
@@ -472,17 +460,17 @@ static int irda_usb_hard_xmit(struct sk_buff *skb, struct net_device *netdev) | |||
472 | frame[1] = 0; | 460 | frame[1] = 0; |
473 | } | 461 | } |
474 | } else { | 462 | } else { |
475 | irda_usb_build_header(self, skb_push(skb, self->header_length), 0); | 463 | irda_usb_build_header(self, self->tx_buff, 0); |
476 | } | 464 | } |
477 | 465 | ||
478 | /* FIXME: Make macro out of this one */ | 466 | /* FIXME: Make macro out of this one */ |
479 | ((struct irda_skb_cb *)skb->cb)->context = self; | 467 | ((struct irda_skb_cb *)skb->cb)->context = self; |
480 | 468 | ||
481 | usb_fill_bulk_urb(urb, self->usbdev, | 469 | usb_fill_bulk_urb(urb, self->usbdev, |
482 | usb_sndbulkpipe(self->usbdev, self->bulk_out_ep), | 470 | usb_sndbulkpipe(self->usbdev, self->bulk_out_ep), |
483 | skb->data, IRDA_SKB_MAX_MTU, | 471 | self->tx_buff, skb->len + self->header_length, |
484 | write_bulk_callback, skb); | 472 | write_bulk_callback, skb); |
485 | urb->transfer_buffer_length = skb->len; | 473 | |
486 | /* This flag (URB_ZERO_PACKET) indicates that what we send is not | 474 | /* This flag (URB_ZERO_PACKET) indicates that what we send is not |
487 | * a continuous stream of data but separate packets. | 475 | * a continuous stream of data but separate packets. |
488 | * In this case, the USB layer will insert an empty USB frame (TD) | 476 | * In this case, the USB layer will insert an empty USB frame (TD) |
@@ -1455,6 +1443,9 @@ static inline void irda_usb_close(struct irda_usb_cb *self) | |||
1455 | /* Remove the speed buffer */ | 1443 | /* Remove the speed buffer */ |
1456 | kfree(self->speed_buff); | 1444 | kfree(self->speed_buff); |
1457 | self->speed_buff = NULL; | 1445 | self->speed_buff = NULL; |
1446 | |||
1447 | kfree(self->tx_buff); | ||
1448 | self->tx_buff = NULL; | ||
1458 | } | 1449 | } |
1459 | 1450 | ||
1460 | /********************** USB CONFIG SUBROUTINES **********************/ | 1451 | /********************** USB CONFIG SUBROUTINES **********************/ |
@@ -1524,8 +1515,6 @@ static inline int irda_usb_parse_endpoints(struct irda_usb_cb *self, struct usb_ | |||
1524 | 1515 | ||
1525 | IRDA_DEBUG(0, "%s(), And our endpoints are : in=%02X, out=%02X (%d), int=%02X\n", | 1516 | IRDA_DEBUG(0, "%s(), And our endpoints are : in=%02X, out=%02X (%d), int=%02X\n", |
1526 | __FUNCTION__, self->bulk_in_ep, self->bulk_out_ep, self->bulk_out_mtu, self->bulk_int_ep); | 1517 | __FUNCTION__, self->bulk_in_ep, self->bulk_out_ep, self->bulk_out_mtu, self->bulk_int_ep); |
1527 | /* Should be 8, 16, 32 or 64 bytes */ | ||
1528 | IRDA_ASSERT(self->bulk_out_mtu == 64, ;); | ||
1529 | 1518 | ||
1530 | return((self->bulk_in_ep != 0) && (self->bulk_out_ep != 0)); | 1519 | return((self->bulk_in_ep != 0) && (self->bulk_out_ep != 0)); |
1531 | } | 1520 | } |
@@ -1753,9 +1742,14 @@ static int irda_usb_probe(struct usb_interface *intf, | |||
1753 | 1742 | ||
1754 | memset(self->speed_buff, 0, IRDA_USB_SPEED_MTU); | 1743 | memset(self->speed_buff, 0, IRDA_USB_SPEED_MTU); |
1755 | 1744 | ||
1745 | self->tx_buff = kzalloc(IRDA_SKB_MAX_MTU + self->header_length, | ||
1746 | GFP_KERNEL); | ||
1747 | if (self->tx_buff == NULL) | ||
1748 | goto err_out_4; | ||
1749 | |||
1756 | ret = irda_usb_open(self); | 1750 | ret = irda_usb_open(self); |
1757 | if (ret) | 1751 | if (ret) |
1758 | goto err_out_4; | 1752 | goto err_out_5; |
1759 | 1753 | ||
1760 | IRDA_MESSAGE("IrDA: Registered device %s\n", net->name); | 1754 | IRDA_MESSAGE("IrDA: Registered device %s\n", net->name); |
1761 | usb_set_intfdata(intf, self); | 1755 | usb_set_intfdata(intf, self); |
@@ -1766,14 +1760,14 @@ static int irda_usb_probe(struct usb_interface *intf, | |||
1766 | self->needspatch = (ret < 0); | 1760 | self->needspatch = (ret < 0); |
1767 | if (self->needspatch) { | 1761 | if (self->needspatch) { |
1768 | IRDA_ERROR("STIR421X: Couldn't upload patch\n"); | 1762 | IRDA_ERROR("STIR421X: Couldn't upload patch\n"); |
1769 | goto err_out_5; | 1763 | goto err_out_6; |
1770 | } | 1764 | } |
1771 | 1765 | ||
1772 | /* replace IrDA class descriptor with what patched device is now reporting */ | 1766 | /* replace IrDA class descriptor with what patched device is now reporting */ |
1773 | irda_desc = irda_usb_find_class_desc (self->usbintf); | 1767 | irda_desc = irda_usb_find_class_desc (self->usbintf); |
1774 | if (irda_desc == NULL) { | 1768 | if (irda_desc == NULL) { |
1775 | ret = -ENODEV; | 1769 | ret = -ENODEV; |
1776 | goto err_out_5; | 1770 | goto err_out_6; |
1777 | } | 1771 | } |
1778 | if (self->irda_desc) | 1772 | if (self->irda_desc) |
1779 | kfree (self->irda_desc); | 1773 | kfree (self->irda_desc); |
@@ -1782,9 +1776,10 @@ static int irda_usb_probe(struct usb_interface *intf, | |||
1782 | } | 1776 | } |
1783 | 1777 | ||
1784 | return 0; | 1778 | return 0; |
1785 | 1779 | err_out_6: | |
1786 | err_out_5: | ||
1787 | unregister_netdev(self->netdev); | 1780 | unregister_netdev(self->netdev); |
1781 | err_out_5: | ||
1782 | kfree(self->tx_buff); | ||
1788 | err_out_4: | 1783 | err_out_4: |
1789 | kfree(self->speed_buff); | 1784 | kfree(self->speed_buff); |
1790 | err_out_3: | 1785 | err_out_3: |
diff --git a/drivers/net/irda/irda-usb.h b/drivers/net/irda/irda-usb.h index 6b2271f18e77..e846c38224a3 100644 --- a/drivers/net/irda/irda-usb.h +++ b/drivers/net/irda/irda-usb.h | |||
@@ -156,6 +156,7 @@ struct irda_usb_cb { | |||
156 | struct irlap_cb *irlap; /* The link layer we are binded to */ | 156 | struct irlap_cb *irlap; /* The link layer we are binded to */ |
157 | struct qos_info qos; | 157 | struct qos_info qos; |
158 | char *speed_buff; /* Buffer for speed changes */ | 158 | char *speed_buff; /* Buffer for speed changes */ |
159 | char *tx_buff; | ||
159 | 160 | ||
160 | struct timeval stamp; | 161 | struct timeval stamp; |
161 | struct timeval now; | 162 | struct timeval now; |
diff --git a/drivers/net/irda/stir4200.c b/drivers/net/irda/stir4200.c index c14a74634fd5..20d306fea4cb 100644 --- a/drivers/net/irda/stir4200.c +++ b/drivers/net/irda/stir4200.c | |||
@@ -59,7 +59,7 @@ | |||
59 | #include <asm/byteorder.h> | 59 | #include <asm/byteorder.h> |
60 | #include <asm/unaligned.h> | 60 | #include <asm/unaligned.h> |
61 | 61 | ||
62 | MODULE_AUTHOR("Stephen Hemminger <shemminger@osdl.org>"); | 62 | MODULE_AUTHOR("Stephen Hemminger <shemminger@linux-foundation.org>"); |
63 | MODULE_DESCRIPTION("IrDA-USB Dongle Driver for SigmaTel STIr4200"); | 63 | MODULE_DESCRIPTION("IrDA-USB Dongle Driver for SigmaTel STIr4200"); |
64 | MODULE_LICENSE("GPL"); | 64 | MODULE_LICENSE("GPL"); |
65 | 65 | ||
diff --git a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c index 18c68193bf14..e2b1af618450 100644 --- a/drivers/net/irda/vlsi_ir.c +++ b/drivers/net/irda/vlsi_ir.c | |||
@@ -166,7 +166,7 @@ static void vlsi_proc_pdev(struct seq_file *seq, struct pci_dev *pdev) | |||
166 | unsigned i; | 166 | unsigned i; |
167 | 167 | ||
168 | seq_printf(seq, "\n%s (vid/did: %04x/%04x)\n", | 168 | seq_printf(seq, "\n%s (vid/did: %04x/%04x)\n", |
169 | PCIDEV_NAME(pdev), (int)pdev->vendor, (int)pdev->device); | 169 | pci_name(pdev), (int)pdev->vendor, (int)pdev->device); |
170 | seq_printf(seq, "pci-power-state: %u\n", (unsigned) pdev->current_state); | 170 | seq_printf(seq, "pci-power-state: %u\n", (unsigned) pdev->current_state); |
171 | seq_printf(seq, "resources: irq=%u / io=0x%04x / dma_mask=0x%016Lx\n", | 171 | seq_printf(seq, "resources: irq=%u / io=0x%04x / dma_mask=0x%016Lx\n", |
172 | pdev->irq, (unsigned)pci_resource_start(pdev, 0), (unsigned long long)pdev->dma_mask); | 172 | pdev->irq, (unsigned)pci_resource_start(pdev, 0), (unsigned long long)pdev->dma_mask); |
@@ -1401,7 +1401,7 @@ static void vlsi_tx_timeout(struct net_device *ndev) | |||
1401 | 1401 | ||
1402 | if (vlsi_start_hw(idev)) | 1402 | if (vlsi_start_hw(idev)) |
1403 | IRDA_ERROR("%s: failed to restart hw - %s(%s) unusable!\n", | 1403 | IRDA_ERROR("%s: failed to restart hw - %s(%s) unusable!\n", |
1404 | __FUNCTION__, PCIDEV_NAME(idev->pdev), ndev->name); | 1404 | __FUNCTION__, pci_name(idev->pdev), ndev->name); |
1405 | else | 1405 | else |
1406 | netif_start_queue(ndev); | 1406 | netif_start_queue(ndev); |
1407 | } | 1407 | } |
@@ -1643,7 +1643,7 @@ vlsi_irda_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1643 | pdev->current_state = 0; /* hw must be running now */ | 1643 | pdev->current_state = 0; /* hw must be running now */ |
1644 | 1644 | ||
1645 | IRDA_MESSAGE("%s: IrDA PCI controller %s detected\n", | 1645 | IRDA_MESSAGE("%s: IrDA PCI controller %s detected\n", |
1646 | drivername, PCIDEV_NAME(pdev)); | 1646 | drivername, pci_name(pdev)); |
1647 | 1647 | ||
1648 | if ( !pci_resource_start(pdev,0) | 1648 | if ( !pci_resource_start(pdev,0) |
1649 | || !(pci_resource_flags(pdev,0) & IORESOURCE_IO) ) { | 1649 | || !(pci_resource_flags(pdev,0) & IORESOURCE_IO) ) { |
@@ -1728,7 +1728,7 @@ static void __devexit vlsi_irda_remove(struct pci_dev *pdev) | |||
1728 | 1728 | ||
1729 | pci_set_drvdata(pdev, NULL); | 1729 | pci_set_drvdata(pdev, NULL); |
1730 | 1730 | ||
1731 | IRDA_MESSAGE("%s: %s removed\n", drivername, PCIDEV_NAME(pdev)); | 1731 | IRDA_MESSAGE("%s: %s removed\n", drivername, pci_name(pdev)); |
1732 | } | 1732 | } |
1733 | 1733 | ||
1734 | #ifdef CONFIG_PM | 1734 | #ifdef CONFIG_PM |
@@ -1748,7 +1748,7 @@ static int vlsi_irda_suspend(struct pci_dev *pdev, pm_message_t state) | |||
1748 | 1748 | ||
1749 | if (!ndev) { | 1749 | if (!ndev) { |
1750 | IRDA_ERROR("%s - %s: no netdevice \n", | 1750 | IRDA_ERROR("%s - %s: no netdevice \n", |
1751 | __FUNCTION__, PCIDEV_NAME(pdev)); | 1751 | __FUNCTION__, pci_name(pdev)); |
1752 | return 0; | 1752 | return 0; |
1753 | } | 1753 | } |
1754 | idev = ndev->priv; | 1754 | idev = ndev->priv; |
@@ -1759,7 +1759,7 @@ static int vlsi_irda_suspend(struct pci_dev *pdev, pm_message_t state) | |||
1759 | pdev->current_state = state.event; | 1759 | pdev->current_state = state.event; |
1760 | } | 1760 | } |
1761 | else | 1761 | else |
1762 | IRDA_ERROR("%s - %s: invalid suspend request %u -> %u\n", __FUNCTION__, PCIDEV_NAME(pdev), pdev->current_state, state.event); | 1762 | IRDA_ERROR("%s - %s: invalid suspend request %u -> %u\n", __FUNCTION__, pci_name(pdev), pdev->current_state, state.event); |
1763 | up(&idev->sem); | 1763 | up(&idev->sem); |
1764 | return 0; | 1764 | return 0; |
1765 | } | 1765 | } |
@@ -1787,7 +1787,7 @@ static int vlsi_irda_resume(struct pci_dev *pdev) | |||
1787 | 1787 | ||
1788 | if (!ndev) { | 1788 | if (!ndev) { |
1789 | IRDA_ERROR("%s - %s: no netdevice \n", | 1789 | IRDA_ERROR("%s - %s: no netdevice \n", |
1790 | __FUNCTION__, PCIDEV_NAME(pdev)); | 1790 | __FUNCTION__, pci_name(pdev)); |
1791 | return 0; | 1791 | return 0; |
1792 | } | 1792 | } |
1793 | idev = ndev->priv; | 1793 | idev = ndev->priv; |
@@ -1795,7 +1795,7 @@ static int vlsi_irda_resume(struct pci_dev *pdev) | |||
1795 | if (pdev->current_state == 0) { | 1795 | if (pdev->current_state == 0) { |
1796 | up(&idev->sem); | 1796 | up(&idev->sem); |
1797 | IRDA_WARNING("%s - %s: already resumed\n", | 1797 | IRDA_WARNING("%s - %s: already resumed\n", |
1798 | __FUNCTION__, PCIDEV_NAME(pdev)); | 1798 | __FUNCTION__, pci_name(pdev)); |
1799 | return 0; | 1799 | return 0; |
1800 | } | 1800 | } |
1801 | 1801 | ||
diff --git a/drivers/net/irda/vlsi_ir.h b/drivers/net/irda/vlsi_ir.h index c37f0bc4c7f9..2d3b773d8e35 100644 --- a/drivers/net/irda/vlsi_ir.h +++ b/drivers/net/irda/vlsi_ir.h | |||
@@ -41,39 +41,6 @@ | |||
41 | #define PCI_CLASS_SUBCLASS_MASK 0xffff | 41 | #define PCI_CLASS_SUBCLASS_MASK 0xffff |
42 | #endif | 42 | #endif |
43 | 43 | ||
44 | /* in recent 2.5 interrupt handlers have non-void return value */ | ||
45 | #ifndef IRQ_RETVAL | ||
46 | typedef void irqreturn_t; | ||
47 | #define IRQ_NONE | ||
48 | #define IRQ_HANDLED | ||
49 | #define IRQ_RETVAL(x) | ||
50 | #endif | ||
51 | |||
52 | /* some stuff need to check kernelversion. Not all 2.5 stuff was present | ||
53 | * in early 2.5.x - the test is merely to separate 2.4 from 2.5 | ||
54 | */ | ||
55 | #include <linux/version.h> | ||
56 | |||
57 | #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) | ||
58 | |||
59 | /* PDE() introduced in 2.5.4 */ | ||
60 | #ifdef CONFIG_PROC_FS | ||
61 | #define PDE(inode) ((inode)->i_private) | ||
62 | #endif | ||
63 | |||
64 | /* irda crc16 calculation exported in 2.5.42 */ | ||
65 | #define irda_calc_crc16(fcs,buf,len) (GOOD_FCS) | ||
66 | |||
67 | /* we use this for unified pci device name access */ | ||
68 | #define PCIDEV_NAME(pdev) ((pdev)->name) | ||
69 | |||
70 | #else /* 2.5 or later */ | ||
71 | |||
72 | /* whatever we get from the associated struct device - bus:slot:dev.fn id */ | ||
73 | #define PCIDEV_NAME(pdev) (pci_name(pdev)) | ||
74 | |||
75 | #endif | ||
76 | |||
77 | /* ================================================================ */ | 44 | /* ================================================================ */ |
78 | 45 | ||
79 | /* non-standard PCI registers */ | 46 | /* non-standard PCI registers */ |
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index c41ae4286eea..b3bf86422734 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c | |||
@@ -314,6 +314,13 @@ int mv643xx_eth_free_tx_descs(struct net_device *dev, int force) | |||
314 | 314 | ||
315 | while (mp->tx_desc_count > 0) { | 315 | while (mp->tx_desc_count > 0) { |
316 | spin_lock_irqsave(&mp->lock, flags); | 316 | spin_lock_irqsave(&mp->lock, flags); |
317 | |||
318 | /* tx_desc_count might have changed before acquiring the lock */ | ||
319 | if (mp->tx_desc_count <= 0) { | ||
320 | spin_unlock_irqrestore(&mp->lock, flags); | ||
321 | return released; | ||
322 | } | ||
323 | |||
317 | tx_index = mp->tx_used_desc_q; | 324 | tx_index = mp->tx_used_desc_q; |
318 | desc = &mp->p_tx_desc_area[tx_index]; | 325 | desc = &mp->p_tx_desc_area[tx_index]; |
319 | cmd_sts = desc->cmd_sts; | 326 | cmd_sts = desc->cmd_sts; |
@@ -332,13 +339,13 @@ int mv643xx_eth_free_tx_descs(struct net_device *dev, int force) | |||
332 | if (skb) | 339 | if (skb) |
333 | mp->tx_skb[tx_index] = NULL; | 340 | mp->tx_skb[tx_index] = NULL; |
334 | 341 | ||
335 | spin_unlock_irqrestore(&mp->lock, flags); | ||
336 | |||
337 | if (cmd_sts & ETH_ERROR_SUMMARY) { | 342 | if (cmd_sts & ETH_ERROR_SUMMARY) { |
338 | printk("%s: Error in TX\n", dev->name); | 343 | printk("%s: Error in TX\n", dev->name); |
339 | mp->stats.tx_errors++; | 344 | mp->stats.tx_errors++; |
340 | } | 345 | } |
341 | 346 | ||
347 | spin_unlock_irqrestore(&mp->lock, flags); | ||
348 | |||
342 | if (cmd_sts & ETH_TX_FIRST_DESC) | 349 | if (cmd_sts & ETH_TX_FIRST_DESC) |
343 | dma_unmap_single(NULL, addr, count, DMA_TO_DEVICE); | 350 | dma_unmap_single(NULL, addr, count, DMA_TO_DEVICE); |
344 | else | 351 | else |
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index 07cf574197e5..61cbd4a60446 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
@@ -71,7 +71,7 @@ | |||
71 | #include "myri10ge_mcp.h" | 71 | #include "myri10ge_mcp.h" |
72 | #include "myri10ge_mcp_gen_header.h" | 72 | #include "myri10ge_mcp_gen_header.h" |
73 | 73 | ||
74 | #define MYRI10GE_VERSION_STR "1.1.0" | 74 | #define MYRI10GE_VERSION_STR "1.2.0" |
75 | 75 | ||
76 | MODULE_DESCRIPTION("Myricom 10G driver (10GbE)"); | 76 | MODULE_DESCRIPTION("Myricom 10G driver (10GbE)"); |
77 | MODULE_AUTHOR("Maintainer: help@myri.com"); | 77 | MODULE_AUTHOR("Maintainer: help@myri.com"); |
@@ -274,6 +274,10 @@ static int myri10ge_fill_thresh = 256; | |||
274 | module_param(myri10ge_fill_thresh, int, S_IRUGO | S_IWUSR); | 274 | module_param(myri10ge_fill_thresh, int, S_IRUGO | S_IWUSR); |
275 | MODULE_PARM_DESC(myri10ge_fill_thresh, "Number of empty rx slots allowed\n"); | 275 | MODULE_PARM_DESC(myri10ge_fill_thresh, "Number of empty rx slots allowed\n"); |
276 | 276 | ||
277 | static int myri10ge_wcfifo = 1; | ||
278 | module_param(myri10ge_wcfifo, int, S_IRUGO); | ||
279 | MODULE_PARM_DESC(myri10ge_wcfifo, "Enable WC Fifo when WC is enabled\n"); | ||
280 | |||
277 | #define MYRI10GE_FW_OFFSET 1024*1024 | 281 | #define MYRI10GE_FW_OFFSET 1024*1024 |
278 | #define MYRI10GE_HIGHPART_TO_U32(X) \ | 282 | #define MYRI10GE_HIGHPART_TO_U32(X) \ |
279 | (sizeof (X) == 8) ? ((u32)((u64)(X) >> 32)) : (0) | 283 | (sizeof (X) == 8) ? ((u32)((u64)(X) >> 32)) : (0) |
@@ -1714,7 +1718,7 @@ static int myri10ge_open(struct net_device *dev) | |||
1714 | goto abort_with_irq; | 1718 | goto abort_with_irq; |
1715 | } | 1719 | } |
1716 | 1720 | ||
1717 | if (mgp->mtrr >= 0) { | 1721 | if (myri10ge_wcfifo && mgp->mtrr >= 0) { |
1718 | mgp->tx.wc_fifo = (u8 __iomem *) mgp->sram + MXGEFW_ETH_SEND_4; | 1722 | mgp->tx.wc_fifo = (u8 __iomem *) mgp->sram + MXGEFW_ETH_SEND_4; |
1719 | mgp->rx_small.wc_fifo = | 1723 | mgp->rx_small.wc_fifo = |
1720 | (u8 __iomem *) mgp->sram + MXGEFW_ETH_RECV_SMALL; | 1724 | (u8 __iomem *) mgp->sram + MXGEFW_ETH_RECV_SMALL; |
@@ -2878,7 +2882,6 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2878 | netdev->hard_start_xmit = myri10ge_xmit; | 2882 | netdev->hard_start_xmit = myri10ge_xmit; |
2879 | netdev->get_stats = myri10ge_get_stats; | 2883 | netdev->get_stats = myri10ge_get_stats; |
2880 | netdev->base_addr = mgp->iomem_base; | 2884 | netdev->base_addr = mgp->iomem_base; |
2881 | netdev->irq = pdev->irq; | ||
2882 | netdev->change_mtu = myri10ge_change_mtu; | 2885 | netdev->change_mtu = myri10ge_change_mtu; |
2883 | netdev->set_multicast_list = myri10ge_set_multicast_list; | 2886 | netdev->set_multicast_list = myri10ge_set_multicast_list; |
2884 | netdev->set_mac_address = myri10ge_set_mac_address; | 2887 | netdev->set_mac_address = myri10ge_set_mac_address; |
@@ -2888,6 +2891,15 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2888 | netdev->poll = myri10ge_poll; | 2891 | netdev->poll = myri10ge_poll; |
2889 | netdev->weight = myri10ge_napi_weight; | 2892 | netdev->weight = myri10ge_napi_weight; |
2890 | 2893 | ||
2894 | /* make sure we can get an irq, and that MSI can be | ||
2895 | * setup (if available). Also ensure netdev->irq | ||
2896 | * is set to correct value if MSI is enabled */ | ||
2897 | status = myri10ge_request_irq(mgp); | ||
2898 | if (status != 0) | ||
2899 | goto abort_with_firmware; | ||
2900 | netdev->irq = pdev->irq; | ||
2901 | myri10ge_free_irq(mgp); | ||
2902 | |||
2891 | /* Save configuration space to be restored if the | 2903 | /* Save configuration space to be restored if the |
2892 | * nic resets due to a parity error */ | 2904 | * nic resets due to a parity error */ |
2893 | pci_save_state(pdev); | 2905 | pci_save_state(pdev); |
@@ -2903,8 +2915,9 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2903 | dev_err(&pdev->dev, "register_netdev failed: %d\n", status); | 2915 | dev_err(&pdev->dev, "register_netdev failed: %d\n", status); |
2904 | goto abort_with_state; | 2916 | goto abort_with_state; |
2905 | } | 2917 | } |
2906 | dev_info(dev, "%d, tx bndry %d, fw %s, WC %s\n", | 2918 | dev_info(dev, "%s IRQ %d, tx bndry %d, fw %s, WC %s\n", |
2907 | pdev->irq, mgp->tx.boundary, mgp->fw_name, | 2919 | (mgp->msi_enabled ? "MSI" : "xPIC"), |
2920 | netdev->irq, mgp->tx.boundary, mgp->fw_name, | ||
2908 | (mgp->mtrr >= 0 ? "Enabled" : "Disabled")); | 2921 | (mgp->mtrr >= 0 ? "Enabled" : "Disabled")); |
2909 | 2922 | ||
2910 | return 0; | 2923 | return 0; |
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h index 6490acf05305..59324b1693d6 100644 --- a/drivers/net/netxen/netxen_nic.h +++ b/drivers/net/netxen/netxen_nic.h | |||
@@ -63,12 +63,11 @@ | |||
63 | 63 | ||
64 | #include "netxen_nic_hw.h" | 64 | #include "netxen_nic_hw.h" |
65 | 65 | ||
66 | #define NETXEN_NIC_BUILD_NO "4" | 66 | #define NETXEN_NIC_BUILD_NO "2" |
67 | #define _NETXEN_NIC_LINUX_MAJOR 3 | 67 | #define _NETXEN_NIC_LINUX_MAJOR 3 |
68 | #define _NETXEN_NIC_LINUX_MINOR 3 | 68 | #define _NETXEN_NIC_LINUX_MINOR 3 |
69 | #define _NETXEN_NIC_LINUX_SUBVERSION 2 | 69 | #define _NETXEN_NIC_LINUX_SUBVERSION 3 |
70 | #define NETXEN_NIC_LINUX_VERSIONID "3.3.2" "-" NETXEN_NIC_BUILD_NO | 70 | #define NETXEN_NIC_LINUX_VERSIONID "3.3.3" "-" NETXEN_NIC_BUILD_NO |
71 | #define NETXEN_NIC_FW_VERSIONID "3.3.2" | ||
72 | 71 | ||
73 | #define RCV_DESC_RINGSIZE \ | 72 | #define RCV_DESC_RINGSIZE \ |
74 | (sizeof(struct rcv_desc) * adapter->max_rx_desc_count) | 73 | (sizeof(struct rcv_desc) * adapter->max_rx_desc_count) |
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c index c0c31d1914a7..191e2336e323 100644 --- a/drivers/net/netxen/netxen_nic_hw.c +++ b/drivers/net/netxen/netxen_nic_hw.c | |||
@@ -984,7 +984,8 @@ void netxen_nic_flash_print(struct netxen_adapter *adapter) | |||
984 | _NETXEN_NIC_LINUX_MAJOR, fw_major); | 984 | _NETXEN_NIC_LINUX_MAJOR, fw_major); |
985 | adapter->driver_mismatch = 1; | 985 | adapter->driver_mismatch = 1; |
986 | } | 986 | } |
987 | if (fw_minor != _NETXEN_NIC_LINUX_MINOR) { | 987 | if (fw_minor != _NETXEN_NIC_LINUX_MINOR && |
988 | fw_minor != (_NETXEN_NIC_LINUX_MINOR + 1)) { | ||
988 | printk(KERN_ERR "The mismatch in driver version and firmware " | 989 | printk(KERN_ERR "The mismatch in driver version and firmware " |
989 | "version minor number\n" | 990 | "version minor number\n" |
990 | "Driver version minor number = %d \t" | 991 | "Driver version minor number = %d \t" |
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 8a5792fea774..96e1bee19ba0 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
@@ -1144,7 +1144,7 @@ static int __init netxen_init_module(void) | |||
1144 | if ((netxen_workq = create_singlethread_workqueue("netxen")) == 0) | 1144 | if ((netxen_workq = create_singlethread_workqueue("netxen")) == 0) |
1145 | return -ENOMEM; | 1145 | return -ENOMEM; |
1146 | 1146 | ||
1147 | return pci_module_init(&netxen_driver); | 1147 | return pci_register_driver(&netxen_driver); |
1148 | } | 1148 | } |
1149 | 1149 | ||
1150 | module_init(netxen_init_module); | 1150 | module_init(netxen_init_module); |
diff --git a/drivers/net/pcmcia/3c589_cs.c b/drivers/net/pcmcia/3c589_cs.c index 342f4062de0b..461e8274ef69 100644 --- a/drivers/net/pcmcia/3c589_cs.c +++ b/drivers/net/pcmcia/3c589_cs.c | |||
@@ -606,11 +606,14 @@ static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
606 | { | 606 | { |
607 | kio_addr_t ioaddr = dev->base_addr; | 607 | kio_addr_t ioaddr = dev->base_addr; |
608 | struct el3_private *priv = netdev_priv(dev); | 608 | struct el3_private *priv = netdev_priv(dev); |
609 | unsigned long flags; | ||
609 | 610 | ||
610 | DEBUG(3, "%s: el3_start_xmit(length = %ld) called, " | 611 | DEBUG(3, "%s: el3_start_xmit(length = %ld) called, " |
611 | "status %4.4x.\n", dev->name, (long)skb->len, | 612 | "status %4.4x.\n", dev->name, (long)skb->len, |
612 | inw(ioaddr + EL3_STATUS)); | 613 | inw(ioaddr + EL3_STATUS)); |
613 | 614 | ||
615 | spin_lock_irqsave(&priv->lock, flags); | ||
616 | |||
614 | priv->stats.tx_bytes += skb->len; | 617 | priv->stats.tx_bytes += skb->len; |
615 | 618 | ||
616 | /* Put out the doubleword header... */ | 619 | /* Put out the doubleword header... */ |
@@ -628,6 +631,7 @@ static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
628 | 631 | ||
629 | dev_kfree_skb(skb); | 632 | dev_kfree_skb(skb); |
630 | pop_tx_status(dev); | 633 | pop_tx_status(dev); |
634 | spin_unlock_irqrestore(&priv->lock, flags); | ||
631 | 635 | ||
632 | return 0; | 636 | return 0; |
633 | } | 637 | } |
@@ -729,14 +733,13 @@ static void media_check(unsigned long arg) | |||
729 | 733 | ||
730 | if (!netif_device_present(dev)) goto reschedule; | 734 | if (!netif_device_present(dev)) goto reschedule; |
731 | 735 | ||
732 | EL3WINDOW(1); | ||
733 | /* Check for pending interrupt with expired latency timer: with | 736 | /* Check for pending interrupt with expired latency timer: with |
734 | this, we can limp along even if the interrupt is blocked */ | 737 | this, we can limp along even if the interrupt is blocked */ |
735 | if ((inw(ioaddr + EL3_STATUS) & IntLatch) && | 738 | if ((inw(ioaddr + EL3_STATUS) & IntLatch) && |
736 | (inb(ioaddr + EL3_TIMER) == 0xff)) { | 739 | (inb(ioaddr + EL3_TIMER) == 0xff)) { |
737 | if (!lp->fast_poll) | 740 | if (!lp->fast_poll) |
738 | printk(KERN_WARNING "%s: interrupt(s) dropped!\n", dev->name); | 741 | printk(KERN_WARNING "%s: interrupt(s) dropped!\n", dev->name); |
739 | el3_interrupt(dev->irq, lp); | 742 | el3_interrupt(dev->irq, dev); |
740 | lp->fast_poll = HZ; | 743 | lp->fast_poll = HZ; |
741 | } | 744 | } |
742 | if (lp->fast_poll) { | 745 | if (lp->fast_poll) { |
diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c index 096d4a100bf2..86135397f430 100644 --- a/drivers/net/phy/fixed.c +++ b/drivers/net/phy/fixed.c | |||
@@ -349,7 +349,7 @@ static int __init fixed_init(void) | |||
349 | fixed_mdio_register_device(0, 100, 1); | 349 | fixed_mdio_register_device(0, 100, 1); |
350 | #endif | 350 | #endif |
351 | 351 | ||
352 | #ifdef CONFIX_FIXED_MII_10_FDX | 352 | #ifdef CONFIG_FIXED_MII_10_FDX |
353 | fixed_mdio_register_device(0, 10, 1); | 353 | fixed_mdio_register_device(0, 10, 1); |
354 | #endif | 354 | #endif |
355 | return 0; | 355 | return 0; |
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index e175f3910b18..9765fa661467 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c | |||
@@ -286,6 +286,7 @@ int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd) | |||
286 | 286 | ||
287 | return 0; | 287 | return 0; |
288 | } | 288 | } |
289 | EXPORT_SYMBOL(phy_ethtool_sset); | ||
289 | 290 | ||
290 | int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd) | 291 | int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd) |
291 | { | 292 | { |
@@ -302,7 +303,7 @@ int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd) | |||
302 | 303 | ||
303 | return 0; | 304 | return 0; |
304 | } | 305 | } |
305 | 306 | EXPORT_SYMBOL(phy_ethtool_gset); | |
306 | 307 | ||
307 | /* Note that this function is currently incompatible with the | 308 | /* Note that this function is currently incompatible with the |
308 | * PHYCONTROL layer. It changes registers without regard to | 309 | * PHYCONTROL layer. It changes registers without regard to |
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 250cdbeefdfd..1dd66b8ea0fa 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c | |||
@@ -556,10 +556,9 @@ static int init_shared_mem(struct s2io_nic *nic) | |||
556 | } | 556 | } |
557 | } | 557 | } |
558 | 558 | ||
559 | nic->ufo_in_band_v = kmalloc((sizeof(u64) * size), GFP_KERNEL); | 559 | nic->ufo_in_band_v = kcalloc(size, sizeof(u64), GFP_KERNEL); |
560 | if (!nic->ufo_in_band_v) | 560 | if (!nic->ufo_in_band_v) |
561 | return -ENOMEM; | 561 | return -ENOMEM; |
562 | memset(nic->ufo_in_band_v, 0, size); | ||
563 | 562 | ||
564 | /* Allocation and initialization of RXDs in Rings */ | 563 | /* Allocation and initialization of RXDs in Rings */ |
565 | size = 0; | 564 | size = 0; |
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c index b70ed79d4121..45d91b159100 100644 --- a/drivers/net/sis190.c +++ b/drivers/net/sis190.c | |||
@@ -1562,7 +1562,7 @@ static int __devinit sis190_get_mac_addr_from_eeprom(struct pci_dev *pdev, | |||
1562 | for (i = 0; i < MAC_ADDR_LEN / 2; i++) { | 1562 | for (i = 0; i < MAC_ADDR_LEN / 2; i++) { |
1563 | __le16 w = sis190_read_eeprom(ioaddr, EEPROMMACAddr + i); | 1563 | __le16 w = sis190_read_eeprom(ioaddr, EEPROMMACAddr + i); |
1564 | 1564 | ||
1565 | ((u16 *)dev->dev_addr)[0] = le16_to_cpu(w); | 1565 | ((u16 *)dev->dev_addr)[i] = le16_to_cpu(w); |
1566 | } | 1566 | } |
1567 | 1567 | ||
1568 | sis190_set_rgmii(tp, sis190_read_eeprom(ioaddr, EEPROMInfo)); | 1568 | sis190_set_rgmii(tp, sis190_read_eeprom(ioaddr, EEPROMInfo)); |
diff --git a/drivers/net/skge.c b/drivers/net/skge.c index deedfd5f8226..45283f3f95e4 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c | |||
@@ -60,7 +60,7 @@ | |||
60 | #define LINK_HZ (HZ/2) | 60 | #define LINK_HZ (HZ/2) |
61 | 61 | ||
62 | MODULE_DESCRIPTION("SysKonnect Gigabit Ethernet driver"); | 62 | MODULE_DESCRIPTION("SysKonnect Gigabit Ethernet driver"); |
63 | MODULE_AUTHOR("Stephen Hemminger <shemminger@osdl.org>"); | 63 | MODULE_AUTHOR("Stephen Hemminger <shemminger@linux-foundation.org>"); |
64 | MODULE_LICENSE("GPL"); | 64 | MODULE_LICENSE("GPL"); |
65 | MODULE_VERSION(DRV_VERSION); | 65 | MODULE_VERSION(DRV_VERSION); |
66 | 66 | ||
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index a6601e8d423c..822dd0b13133 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -3639,29 +3639,6 @@ static int sky2_resume(struct pci_dev *pdev) | |||
3639 | out: | 3639 | out: |
3640 | return err; | 3640 | return err; |
3641 | } | 3641 | } |
3642 | |||
3643 | /* BIOS resume runs after device (it's a bug in PM) | ||
3644 | * as a temporary workaround on suspend/resume leave MSI disabled | ||
3645 | */ | ||
3646 | static int sky2_suspend_late(struct pci_dev *pdev, pm_message_t state) | ||
3647 | { | ||
3648 | struct sky2_hw *hw = pci_get_drvdata(pdev); | ||
3649 | |||
3650 | free_irq(pdev->irq, hw); | ||
3651 | if (hw->msi) { | ||
3652 | pci_disable_msi(pdev); | ||
3653 | hw->msi = 0; | ||
3654 | } | ||
3655 | return 0; | ||
3656 | } | ||
3657 | |||
3658 | static int sky2_resume_early(struct pci_dev *pdev) | ||
3659 | { | ||
3660 | struct sky2_hw *hw = pci_get_drvdata(pdev); | ||
3661 | struct net_device *dev = hw->dev[0]; | ||
3662 | |||
3663 | return request_irq(pdev->irq, sky2_intr, IRQF_SHARED, dev->name, hw); | ||
3664 | } | ||
3665 | #endif | 3642 | #endif |
3666 | 3643 | ||
3667 | static struct pci_driver sky2_driver = { | 3644 | static struct pci_driver sky2_driver = { |
@@ -3672,8 +3649,6 @@ static struct pci_driver sky2_driver = { | |||
3672 | #ifdef CONFIG_PM | 3649 | #ifdef CONFIG_PM |
3673 | .suspend = sky2_suspend, | 3650 | .suspend = sky2_suspend, |
3674 | .resume = sky2_resume, | 3651 | .resume = sky2_resume, |
3675 | .suspend_late = sky2_suspend_late, | ||
3676 | .resume_early = sky2_resume_early, | ||
3677 | #endif | 3652 | #endif |
3678 | }; | 3653 | }; |
3679 | 3654 | ||
@@ -3691,6 +3666,6 @@ module_init(sky2_init_module); | |||
3691 | module_exit(sky2_cleanup_module); | 3666 | module_exit(sky2_cleanup_module); |
3692 | 3667 | ||
3693 | MODULE_DESCRIPTION("Marvell Yukon 2 Gigabit Ethernet driver"); | 3668 | MODULE_DESCRIPTION("Marvell Yukon 2 Gigabit Ethernet driver"); |
3694 | MODULE_AUTHOR("Stephen Hemminger <shemminger@osdl.org>"); | 3669 | MODULE_AUTHOR("Stephen Hemminger <shemminger@linux-foundation.org>"); |
3695 | MODULE_LICENSE("GPL"); | 3670 | MODULE_LICENSE("GPL"); |
3696 | MODULE_VERSION(DRV_VERSION); | 3671 | MODULE_VERSION(DRV_VERSION); |
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 8243150f5b05..7e4b23c7c1ba 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/fsl_devices.h> | 29 | #include <linux/fsl_devices.h> |
30 | #include <linux/ethtool.h> | 30 | #include <linux/ethtool.h> |
31 | #include <linux/mii.h> | 31 | #include <linux/mii.h> |
32 | #include <linux/workqueue.h> | ||
32 | 33 | ||
33 | #include <asm/of_platform.h> | 34 | #include <asm/of_platform.h> |
34 | #include <asm/uaccess.h> | 35 | #include <asm/uaccess.h> |
@@ -472,7 +473,7 @@ static void put_enet_addr_container(struct enet_addr_container *enet_addr_cont) | |||
472 | kfree(enet_addr_cont); | 473 | kfree(enet_addr_cont); |
473 | } | 474 | } |
474 | 475 | ||
475 | static int set_mac_addr(__be16 __iomem *reg, u8 *mac) | 476 | static void set_mac_addr(__be16 __iomem *reg, u8 *mac) |
476 | { | 477 | { |
477 | out_be16(®[0], ((u16)mac[5] << 8) | mac[4]); | 478 | out_be16(®[0], ((u16)mac[5] << 8) | mac[4]); |
478 | out_be16(®[1], ((u16)mac[3] << 8) | mac[2]); | 479 | out_be16(®[1], ((u16)mac[3] << 8) | mac[2]); |
@@ -3920,10 +3921,11 @@ static irqreturn_t phy_interrupt(int irq, void *dev_id) | |||
3920 | } | 3921 | } |
3921 | 3922 | ||
3922 | /* Scheduled by the phy_interrupt/timer to handle PHY changes */ | 3923 | /* Scheduled by the phy_interrupt/timer to handle PHY changes */ |
3923 | static void ugeth_phy_change(void *data) | 3924 | static void ugeth_phy_change(struct work_struct *work) |
3924 | { | 3925 | { |
3925 | struct net_device *dev = (struct net_device *)data; | 3926 | struct ucc_geth_private *ugeth = |
3926 | struct ucc_geth_private *ugeth = netdev_priv(dev); | 3927 | container_of(work, struct ucc_geth_private, tq); |
3928 | struct net_device *dev = ugeth->dev; | ||
3927 | struct ucc_geth *ug_regs; | 3929 | struct ucc_geth *ug_regs; |
3928 | int result = 0; | 3930 | int result = 0; |
3929 | 3931 | ||
@@ -4080,7 +4082,7 @@ static int ucc_geth_open(struct net_device *dev) | |||
4080 | #endif /* CONFIG_UGETH_NAPI */ | 4082 | #endif /* CONFIG_UGETH_NAPI */ |
4081 | 4083 | ||
4082 | /* Set up the PHY change work queue */ | 4084 | /* Set up the PHY change work queue */ |
4083 | INIT_WORK(&ugeth->tq, ugeth_phy_change, dev); | 4085 | INIT_WORK(&ugeth->tq, ugeth_phy_change); |
4084 | 4086 | ||
4085 | init_timer(&ugeth->phy_info_timer); | 4087 | init_timer(&ugeth->phy_info_timer); |
4086 | ugeth->phy_info_timer.function = &ugeth_phy_startup_timer; | 4088 | ugeth->phy_info_timer.function = &ugeth_phy_startup_timer; |
diff --git a/drivers/net/ucc_geth_phy.c b/drivers/net/ucc_geth_phy.c index 5360ec05eaa3..3c86592ce03c 100644 --- a/drivers/net/ucc_geth_phy.c +++ b/drivers/net/ucc_geth_phy.c | |||
@@ -68,8 +68,31 @@ static int gbit_config_aneg(struct ugeth_mii_info *mii_info); | |||
68 | static int genmii_config_aneg(struct ugeth_mii_info *mii_info); | 68 | static int genmii_config_aneg(struct ugeth_mii_info *mii_info); |
69 | static int genmii_update_link(struct ugeth_mii_info *mii_info); | 69 | static int genmii_update_link(struct ugeth_mii_info *mii_info); |
70 | static int genmii_read_status(struct ugeth_mii_info *mii_info); | 70 | static int genmii_read_status(struct ugeth_mii_info *mii_info); |
71 | u16 phy_read(struct ugeth_mii_info *mii_info, u16 regnum); | 71 | |
72 | void phy_write(struct ugeth_mii_info *mii_info, u16 regnum, u16 val); | 72 | static u16 ucc_geth_phy_read(struct ugeth_mii_info *mii_info, u16 regnum) |
73 | { | ||
74 | u16 retval; | ||
75 | unsigned long flags; | ||
76 | |||
77 | ugphy_vdbg("%s: IN", __FUNCTION__); | ||
78 | |||
79 | spin_lock_irqsave(&mii_info->mdio_lock, flags); | ||
80 | retval = mii_info->mdio_read(mii_info->dev, mii_info->mii_id, regnum); | ||
81 | spin_unlock_irqrestore(&mii_info->mdio_lock, flags); | ||
82 | |||
83 | return retval; | ||
84 | } | ||
85 | |||
86 | static void ucc_geth_phy_write(struct ugeth_mii_info *mii_info, u16 regnum, u16 val) | ||
87 | { | ||
88 | unsigned long flags; | ||
89 | |||
90 | ugphy_vdbg("%s: IN", __FUNCTION__); | ||
91 | |||
92 | spin_lock_irqsave(&mii_info->mdio_lock, flags); | ||
93 | mii_info->mdio_write(mii_info->dev, mii_info->mii_id, regnum, val); | ||
94 | spin_unlock_irqrestore(&mii_info->mdio_lock, flags); | ||
95 | } | ||
73 | 96 | ||
74 | /* Write value to the PHY for this device to the register at regnum, */ | 97 | /* Write value to the PHY for this device to the register at regnum, */ |
75 | /* waiting until the write is done before it returns. All PHY */ | 98 | /* waiting until the write is done before it returns. All PHY */ |
@@ -184,7 +207,7 @@ static void config_genmii_advert(struct ugeth_mii_info *mii_info) | |||
184 | advertise = mii_info->advertising; | 207 | advertise = mii_info->advertising; |
185 | 208 | ||
186 | /* Setup standard advertisement */ | 209 | /* Setup standard advertisement */ |
187 | adv = phy_read(mii_info, MII_ADVERTISE); | 210 | adv = ucc_geth_phy_read(mii_info, MII_ADVERTISE); |
188 | adv &= ~(ADVERTISE_ALL | ADVERTISE_100BASE4); | 211 | adv &= ~(ADVERTISE_ALL | ADVERTISE_100BASE4); |
189 | if (advertise & ADVERTISED_10baseT_Half) | 212 | if (advertise & ADVERTISED_10baseT_Half) |
190 | adv |= ADVERTISE_10HALF; | 213 | adv |= ADVERTISE_10HALF; |
@@ -194,7 +217,7 @@ static void config_genmii_advert(struct ugeth_mii_info *mii_info) | |||
194 | adv |= ADVERTISE_100HALF; | 217 | adv |= ADVERTISE_100HALF; |
195 | if (advertise & ADVERTISED_100baseT_Full) | 218 | if (advertise & ADVERTISED_100baseT_Full) |
196 | adv |= ADVERTISE_100FULL; | 219 | adv |= ADVERTISE_100FULL; |
197 | phy_write(mii_info, MII_ADVERTISE, adv); | 220 | ucc_geth_phy_write(mii_info, MII_ADVERTISE, adv); |
198 | } | 221 | } |
199 | 222 | ||
200 | static void genmii_setup_forced(struct ugeth_mii_info *mii_info) | 223 | static void genmii_setup_forced(struct ugeth_mii_info *mii_info) |
@@ -204,7 +227,7 @@ static void genmii_setup_forced(struct ugeth_mii_info *mii_info) | |||
204 | 227 | ||
205 | ugphy_vdbg("%s: IN", __FUNCTION__); | 228 | ugphy_vdbg("%s: IN", __FUNCTION__); |
206 | 229 | ||
207 | ctrl = phy_read(mii_info, MII_BMCR); | 230 | ctrl = ucc_geth_phy_read(mii_info, MII_BMCR); |
208 | 231 | ||
209 | ctrl &= | 232 | ctrl &= |
210 | ~(BMCR_FULLDPLX | BMCR_SPEED100 | BMCR_SPEED1000 | BMCR_ANENABLE); | 233 | ~(BMCR_FULLDPLX | BMCR_SPEED100 | BMCR_SPEED1000 | BMCR_ANENABLE); |
@@ -234,7 +257,7 @@ static void genmii_setup_forced(struct ugeth_mii_info *mii_info) | |||
234 | break; | 257 | break; |
235 | } | 258 | } |
236 | 259 | ||
237 | phy_write(mii_info, MII_BMCR, ctrl); | 260 | ucc_geth_phy_write(mii_info, MII_BMCR, ctrl); |
238 | } | 261 | } |
239 | 262 | ||
240 | /* Enable and Restart Autonegotiation */ | 263 | /* Enable and Restart Autonegotiation */ |
@@ -244,9 +267,9 @@ static void genmii_restart_aneg(struct ugeth_mii_info *mii_info) | |||
244 | 267 | ||
245 | ugphy_vdbg("%s: IN", __FUNCTION__); | 268 | ugphy_vdbg("%s: IN", __FUNCTION__); |
246 | 269 | ||
247 | ctl = phy_read(mii_info, MII_BMCR); | 270 | ctl = ucc_geth_phy_read(mii_info, MII_BMCR); |
248 | ctl |= (BMCR_ANENABLE | BMCR_ANRESTART); | 271 | ctl |= (BMCR_ANENABLE | BMCR_ANRESTART); |
249 | phy_write(mii_info, MII_BMCR, ctl); | 272 | ucc_geth_phy_write(mii_info, MII_BMCR, ctl); |
250 | } | 273 | } |
251 | 274 | ||
252 | static int gbit_config_aneg(struct ugeth_mii_info *mii_info) | 275 | static int gbit_config_aneg(struct ugeth_mii_info *mii_info) |
@@ -261,14 +284,14 @@ static int gbit_config_aneg(struct ugeth_mii_info *mii_info) | |||
261 | config_genmii_advert(mii_info); | 284 | config_genmii_advert(mii_info); |
262 | advertise = mii_info->advertising; | 285 | advertise = mii_info->advertising; |
263 | 286 | ||
264 | adv = phy_read(mii_info, MII_1000BASETCONTROL); | 287 | adv = ucc_geth_phy_read(mii_info, MII_1000BASETCONTROL); |
265 | adv &= ~(MII_1000BASETCONTROL_FULLDUPLEXCAP | | 288 | adv &= ~(MII_1000BASETCONTROL_FULLDUPLEXCAP | |
266 | MII_1000BASETCONTROL_HALFDUPLEXCAP); | 289 | MII_1000BASETCONTROL_HALFDUPLEXCAP); |
267 | if (advertise & SUPPORTED_1000baseT_Half) | 290 | if (advertise & SUPPORTED_1000baseT_Half) |
268 | adv |= MII_1000BASETCONTROL_HALFDUPLEXCAP; | 291 | adv |= MII_1000BASETCONTROL_HALFDUPLEXCAP; |
269 | if (advertise & SUPPORTED_1000baseT_Full) | 292 | if (advertise & SUPPORTED_1000baseT_Full) |
270 | adv |= MII_1000BASETCONTROL_FULLDUPLEXCAP; | 293 | adv |= MII_1000BASETCONTROL_FULLDUPLEXCAP; |
271 | phy_write(mii_info, MII_1000BASETCONTROL, adv); | 294 | ucc_geth_phy_write(mii_info, MII_1000BASETCONTROL, adv); |
272 | 295 | ||
273 | /* Start/Restart aneg */ | 296 | /* Start/Restart aneg */ |
274 | genmii_restart_aneg(mii_info); | 297 | genmii_restart_aneg(mii_info); |
@@ -298,10 +321,10 @@ static int genmii_update_link(struct ugeth_mii_info *mii_info) | |||
298 | ugphy_vdbg("%s: IN", __FUNCTION__); | 321 | ugphy_vdbg("%s: IN", __FUNCTION__); |
299 | 322 | ||
300 | /* Do a fake read */ | 323 | /* Do a fake read */ |
301 | phy_read(mii_info, MII_BMSR); | 324 | ucc_geth_phy_read(mii_info, MII_BMSR); |
302 | 325 | ||
303 | /* Read link and autonegotiation status */ | 326 | /* Read link and autonegotiation status */ |
304 | status = phy_read(mii_info, MII_BMSR); | 327 | status = ucc_geth_phy_read(mii_info, MII_BMSR); |
305 | if ((status & BMSR_LSTATUS) == 0) | 328 | if ((status & BMSR_LSTATUS) == 0) |
306 | mii_info->link = 0; | 329 | mii_info->link = 0; |
307 | else | 330 | else |
@@ -329,7 +352,7 @@ static int genmii_read_status(struct ugeth_mii_info *mii_info) | |||
329 | return err; | 352 | return err; |
330 | 353 | ||
331 | if (mii_info->autoneg) { | 354 | if (mii_info->autoneg) { |
332 | status = phy_read(mii_info, MII_LPA); | 355 | status = ucc_geth_phy_read(mii_info, MII_LPA); |
333 | 356 | ||
334 | if (status & (LPA_10FULL | LPA_100FULL)) | 357 | if (status & (LPA_10FULL | LPA_100FULL)) |
335 | mii_info->duplex = DUPLEX_FULL; | 358 | mii_info->duplex = DUPLEX_FULL; |
@@ -352,9 +375,9 @@ static int marvell_init(struct ugeth_mii_info *mii_info) | |||
352 | { | 375 | { |
353 | ugphy_vdbg("%s: IN", __FUNCTION__); | 376 | ugphy_vdbg("%s: IN", __FUNCTION__); |
354 | 377 | ||
355 | phy_write(mii_info, 0x14, 0x0cd2); | 378 | ucc_geth_phy_write(mii_info, 0x14, 0x0cd2); |
356 | phy_write(mii_info, MII_BMCR, | 379 | ucc_geth_phy_write(mii_info, MII_BMCR, |
357 | phy_read(mii_info, MII_BMCR) | BMCR_RESET); | 380 | ucc_geth_phy_read(mii_info, MII_BMCR) | BMCR_RESET); |
358 | msleep(4000); | 381 | msleep(4000); |
359 | 382 | ||
360 | return 0; | 383 | return 0; |
@@ -367,13 +390,13 @@ static int marvell_config_aneg(struct ugeth_mii_info *mii_info) | |||
367 | /* The Marvell PHY has an errata which requires | 390 | /* The Marvell PHY has an errata which requires |
368 | * that certain registers get written in order | 391 | * that certain registers get written in order |
369 | * to restart autonegotiation */ | 392 | * to restart autonegotiation */ |
370 | phy_write(mii_info, MII_BMCR, BMCR_RESET); | 393 | ucc_geth_phy_write(mii_info, MII_BMCR, BMCR_RESET); |
371 | 394 | ||
372 | phy_write(mii_info, 0x1d, 0x1f); | 395 | ucc_geth_phy_write(mii_info, 0x1d, 0x1f); |
373 | phy_write(mii_info, 0x1e, 0x200c); | 396 | ucc_geth_phy_write(mii_info, 0x1e, 0x200c); |
374 | phy_write(mii_info, 0x1d, 0x5); | 397 | ucc_geth_phy_write(mii_info, 0x1d, 0x5); |
375 | phy_write(mii_info, 0x1e, 0); | 398 | ucc_geth_phy_write(mii_info, 0x1e, 0); |
376 | phy_write(mii_info, 0x1e, 0x100); | 399 | ucc_geth_phy_write(mii_info, 0x1e, 0x100); |
377 | 400 | ||
378 | gbit_config_aneg(mii_info); | 401 | gbit_config_aneg(mii_info); |
379 | 402 | ||
@@ -398,7 +421,7 @@ static int marvell_read_status(struct ugeth_mii_info *mii_info) | |||
398 | * are as set */ | 421 | * are as set */ |
399 | if (mii_info->autoneg && mii_info->link) { | 422 | if (mii_info->autoneg && mii_info->link) { |
400 | int speed; | 423 | int speed; |
401 | status = phy_read(mii_info, MII_M1011_PHY_SPEC_STATUS); | 424 | status = ucc_geth_phy_read(mii_info, MII_M1011_PHY_SPEC_STATUS); |
402 | 425 | ||
403 | /* Get the duplexity */ | 426 | /* Get the duplexity */ |
404 | if (status & MII_M1011_PHY_SPEC_STATUS_FULLDUPLEX) | 427 | if (status & MII_M1011_PHY_SPEC_STATUS_FULLDUPLEX) |
@@ -430,7 +453,7 @@ static int marvell_ack_interrupt(struct ugeth_mii_info *mii_info) | |||
430 | ugphy_vdbg("%s: IN", __FUNCTION__); | 453 | ugphy_vdbg("%s: IN", __FUNCTION__); |
431 | 454 | ||
432 | /* Clear the interrupts by reading the reg */ | 455 | /* Clear the interrupts by reading the reg */ |
433 | phy_read(mii_info, MII_M1011_IEVENT); | 456 | ucc_geth_phy_read(mii_info, MII_M1011_IEVENT); |
434 | 457 | ||
435 | return 0; | 458 | return 0; |
436 | } | 459 | } |
@@ -440,9 +463,9 @@ static int marvell_config_intr(struct ugeth_mii_info *mii_info) | |||
440 | ugphy_vdbg("%s: IN", __FUNCTION__); | 463 | ugphy_vdbg("%s: IN", __FUNCTION__); |
441 | 464 | ||
442 | if (mii_info->interrupts == MII_INTERRUPT_ENABLED) | 465 | if (mii_info->interrupts == MII_INTERRUPT_ENABLED) |
443 | phy_write(mii_info, MII_M1011_IMASK, MII_M1011_IMASK_INIT); | 466 | ucc_geth_phy_write(mii_info, MII_M1011_IMASK, MII_M1011_IMASK_INIT); |
444 | else | 467 | else |
445 | phy_write(mii_info, MII_M1011_IMASK, MII_M1011_IMASK_CLEAR); | 468 | ucc_geth_phy_write(mii_info, MII_M1011_IMASK, MII_M1011_IMASK_CLEAR); |
446 | 469 | ||
447 | return 0; | 470 | return 0; |
448 | } | 471 | } |
@@ -451,9 +474,9 @@ static int cis820x_init(struct ugeth_mii_info *mii_info) | |||
451 | { | 474 | { |
452 | ugphy_vdbg("%s: IN", __FUNCTION__); | 475 | ugphy_vdbg("%s: IN", __FUNCTION__); |
453 | 476 | ||
454 | phy_write(mii_info, MII_CIS8201_AUX_CONSTAT, | 477 | ucc_geth_phy_write(mii_info, MII_CIS8201_AUX_CONSTAT, |
455 | MII_CIS8201_AUXCONSTAT_INIT); | 478 | MII_CIS8201_AUXCONSTAT_INIT); |
456 | phy_write(mii_info, MII_CIS8201_EXT_CON1, MII_CIS8201_EXTCON1_INIT); | 479 | ucc_geth_phy_write(mii_info, MII_CIS8201_EXT_CON1, MII_CIS8201_EXTCON1_INIT); |
457 | 480 | ||
458 | return 0; | 481 | return 0; |
459 | } | 482 | } |
@@ -477,7 +500,7 @@ static int cis820x_read_status(struct ugeth_mii_info *mii_info) | |||
477 | if (mii_info->autoneg && mii_info->link) { | 500 | if (mii_info->autoneg && mii_info->link) { |
478 | int speed; | 501 | int speed; |
479 | 502 | ||
480 | status = phy_read(mii_info, MII_CIS8201_AUX_CONSTAT); | 503 | status = ucc_geth_phy_read(mii_info, MII_CIS8201_AUX_CONSTAT); |
481 | if (status & MII_CIS8201_AUXCONSTAT_DUPLEX) | 504 | if (status & MII_CIS8201_AUXCONSTAT_DUPLEX) |
482 | mii_info->duplex = DUPLEX_FULL; | 505 | mii_info->duplex = DUPLEX_FULL; |
483 | else | 506 | else |
@@ -505,7 +528,7 @@ static int cis820x_ack_interrupt(struct ugeth_mii_info *mii_info) | |||
505 | { | 528 | { |
506 | ugphy_vdbg("%s: IN", __FUNCTION__); | 529 | ugphy_vdbg("%s: IN", __FUNCTION__); |
507 | 530 | ||
508 | phy_read(mii_info, MII_CIS8201_ISTAT); | 531 | ucc_geth_phy_read(mii_info, MII_CIS8201_ISTAT); |
509 | 532 | ||
510 | return 0; | 533 | return 0; |
511 | } | 534 | } |
@@ -515,9 +538,9 @@ static int cis820x_config_intr(struct ugeth_mii_info *mii_info) | |||
515 | ugphy_vdbg("%s: IN", __FUNCTION__); | 538 | ugphy_vdbg("%s: IN", __FUNCTION__); |
516 | 539 | ||
517 | if (mii_info->interrupts == MII_INTERRUPT_ENABLED) | 540 | if (mii_info->interrupts == MII_INTERRUPT_ENABLED) |
518 | phy_write(mii_info, MII_CIS8201_IMASK, MII_CIS8201_IMASK_MASK); | 541 | ucc_geth_phy_write(mii_info, MII_CIS8201_IMASK, MII_CIS8201_IMASK_MASK); |
519 | else | 542 | else |
520 | phy_write(mii_info, MII_CIS8201_IMASK, 0); | 543 | ucc_geth_phy_write(mii_info, MII_CIS8201_IMASK, 0); |
521 | 544 | ||
522 | return 0; | 545 | return 0; |
523 | } | 546 | } |
@@ -541,7 +564,7 @@ static int dm9161_read_status(struct ugeth_mii_info *mii_info) | |||
541 | /* If we aren't autonegotiating, assume speeds | 564 | /* If we aren't autonegotiating, assume speeds |
542 | * are as set */ | 565 | * are as set */ |
543 | if (mii_info->autoneg && mii_info->link) { | 566 | if (mii_info->autoneg && mii_info->link) { |
544 | status = phy_read(mii_info, MII_DM9161_SCSR); | 567 | status = ucc_geth_phy_read(mii_info, MII_DM9161_SCSR); |
545 | if (status & (MII_DM9161_SCSR_100F | MII_DM9161_SCSR_100H)) | 568 | if (status & (MII_DM9161_SCSR_100F | MII_DM9161_SCSR_100H)) |
546 | mii_info->speed = SPEED_100; | 569 | mii_info->speed = SPEED_100; |
547 | else | 570 | else |
@@ -572,7 +595,7 @@ static void dm9161_timer(unsigned long data) | |||
572 | { | 595 | { |
573 | struct ugeth_mii_info *mii_info = (struct ugeth_mii_info *)data; | 596 | struct ugeth_mii_info *mii_info = (struct ugeth_mii_info *)data; |
574 | struct dm9161_private *priv = mii_info->priv; | 597 | struct dm9161_private *priv = mii_info->priv; |
575 | u16 status = phy_read(mii_info, MII_BMSR); | 598 | u16 status = ucc_geth_phy_read(mii_info, MII_BMSR); |
576 | 599 | ||
577 | ugphy_vdbg("%s: IN", __FUNCTION__); | 600 | ugphy_vdbg("%s: IN", __FUNCTION__); |
578 | 601 | ||
@@ -599,11 +622,11 @@ static int dm9161_init(struct ugeth_mii_info *mii_info) | |||
599 | /* Reset is not done yet */ | 622 | /* Reset is not done yet */ |
600 | priv->resetdone = 0; | 623 | priv->resetdone = 0; |
601 | 624 | ||
602 | phy_write(mii_info, MII_BMCR, | 625 | ucc_geth_phy_write(mii_info, MII_BMCR, |
603 | phy_read(mii_info, MII_BMCR) | BMCR_RESET); | 626 | ucc_geth_phy_read(mii_info, MII_BMCR) | BMCR_RESET); |
604 | 627 | ||
605 | phy_write(mii_info, MII_BMCR, | 628 | ucc_geth_phy_write(mii_info, MII_BMCR, |
606 | phy_read(mii_info, MII_BMCR) & ~BMCR_ISOLATE); | 629 | ucc_geth_phy_read(mii_info, MII_BMCR) & ~BMCR_ISOLATE); |
607 | 630 | ||
608 | config_genmii_advert(mii_info); | 631 | config_genmii_advert(mii_info); |
609 | /* Start/Restart aneg */ | 632 | /* Start/Restart aneg */ |
@@ -634,7 +657,7 @@ static int dm9161_ack_interrupt(struct ugeth_mii_info *mii_info) | |||
634 | ugphy_vdbg("%s: IN", __FUNCTION__); | 657 | ugphy_vdbg("%s: IN", __FUNCTION__); |
635 | 658 | ||
636 | /* Clear the interrupts by reading the reg */ | 659 | /* Clear the interrupts by reading the reg */ |
637 | phy_read(mii_info, MII_DM9161_INTR); | 660 | ucc_geth_phy_read(mii_info, MII_DM9161_INTR); |
638 | 661 | ||
639 | 662 | ||
640 | return 0; | 663 | return 0; |
@@ -645,9 +668,9 @@ static int dm9161_config_intr(struct ugeth_mii_info *mii_info) | |||
645 | ugphy_vdbg("%s: IN", __FUNCTION__); | 668 | ugphy_vdbg("%s: IN", __FUNCTION__); |
646 | 669 | ||
647 | if (mii_info->interrupts == MII_INTERRUPT_ENABLED) | 670 | if (mii_info->interrupts == MII_INTERRUPT_ENABLED) |
648 | phy_write(mii_info, MII_DM9161_INTR, MII_DM9161_INTR_INIT); | 671 | ucc_geth_phy_write(mii_info, MII_DM9161_INTR, MII_DM9161_INTR_INIT); |
649 | else | 672 | else |
650 | phy_write(mii_info, MII_DM9161_INTR, MII_DM9161_INTR_STOP); | 673 | ucc_geth_phy_write(mii_info, MII_DM9161_INTR, MII_DM9161_INTR_STOP); |
651 | 674 | ||
652 | return 0; | 675 | return 0; |
653 | } | 676 | } |
@@ -718,31 +741,6 @@ static struct phy_info *phy_info[] = { | |||
718 | NULL | 741 | NULL |
719 | }; | 742 | }; |
720 | 743 | ||
721 | u16 phy_read(struct ugeth_mii_info *mii_info, u16 regnum) | ||
722 | { | ||
723 | u16 retval; | ||
724 | unsigned long flags; | ||
725 | |||
726 | ugphy_vdbg("%s: IN", __FUNCTION__); | ||
727 | |||
728 | spin_lock_irqsave(&mii_info->mdio_lock, flags); | ||
729 | retval = mii_info->mdio_read(mii_info->dev, mii_info->mii_id, regnum); | ||
730 | spin_unlock_irqrestore(&mii_info->mdio_lock, flags); | ||
731 | |||
732 | return retval; | ||
733 | } | ||
734 | |||
735 | void phy_write(struct ugeth_mii_info *mii_info, u16 regnum, u16 val) | ||
736 | { | ||
737 | unsigned long flags; | ||
738 | |||
739 | ugphy_vdbg("%s: IN", __FUNCTION__); | ||
740 | |||
741 | spin_lock_irqsave(&mii_info->mdio_lock, flags); | ||
742 | mii_info->mdio_write(mii_info->dev, mii_info->mii_id, regnum, val); | ||
743 | spin_unlock_irqrestore(&mii_info->mdio_lock, flags); | ||
744 | } | ||
745 | |||
746 | /* Use the PHY ID registers to determine what type of PHY is attached | 744 | /* Use the PHY ID registers to determine what type of PHY is attached |
747 | * to device dev. return a struct phy_info structure describing that PHY | 745 | * to device dev. return a struct phy_info structure describing that PHY |
748 | */ | 746 | */ |
@@ -757,11 +755,11 @@ struct phy_info *get_phy_info(struct ugeth_mii_info *mii_info) | |||
757 | ugphy_vdbg("%s: IN", __FUNCTION__); | 755 | ugphy_vdbg("%s: IN", __FUNCTION__); |
758 | 756 | ||
759 | /* Grab the bits from PHYIR1, and put them in the upper half */ | 757 | /* Grab the bits from PHYIR1, and put them in the upper half */ |
760 | phy_reg = phy_read(mii_info, MII_PHYSID1); | 758 | phy_reg = ucc_geth_phy_read(mii_info, MII_PHYSID1); |
761 | phy_ID = (phy_reg & 0xffff) << 16; | 759 | phy_ID = (phy_reg & 0xffff) << 16; |
762 | 760 | ||
763 | /* Grab the bits from PHYIR2, and put them in the lower half */ | 761 | /* Grab the bits from PHYIR2, and put them in the lower half */ |
764 | phy_reg = phy_read(mii_info, MII_PHYSID2); | 762 | phy_reg = ucc_geth_phy_read(mii_info, MII_PHYSID2); |
765 | phy_ID |= (phy_reg & 0xffff); | 763 | phy_ID |= (phy_reg & 0xffff); |
766 | 764 | ||
767 | /* loop through all the known PHY types, and find one that */ | 765 | /* loop through all the known PHY types, and find one that */ |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c index 2ec2e5afce67..91b752e3d07e 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c | |||
@@ -2701,8 +2701,8 @@ static int bcm43xx_probe_cores(struct bcm43xx_private *bcm) | |||
2701 | sb_id_hi = bcm43xx_read32(bcm, BCM43xx_CIR_SB_ID_HI); | 2701 | sb_id_hi = bcm43xx_read32(bcm, BCM43xx_CIR_SB_ID_HI); |
2702 | 2702 | ||
2703 | /* extract core_id, core_rev, core_vendor */ | 2703 | /* extract core_id, core_rev, core_vendor */ |
2704 | core_id = (sb_id_hi & 0xFFF0) >> 4; | 2704 | core_id = (sb_id_hi & 0x8FF0) >> 4; |
2705 | core_rev = (sb_id_hi & 0xF); | 2705 | core_rev = ((sb_id_hi & 0xF) | ((sb_id_hi & 0x7000) >> 8)); |
2706 | core_vendor = (sb_id_hi & 0xFFFF0000) >> 16; | 2706 | core_vendor = (sb_id_hi & 0xFFFF0000) >> 16; |
2707 | 2707 | ||
2708 | dprintk(KERN_INFO PFX "Core %d: ID 0x%x, rev 0x%x, vendor 0x%x\n", | 2708 | dprintk(KERN_INFO PFX "Core %d: ID 0x%x, rev 0x%x, vendor 0x%x\n", |
@@ -2873,7 +2873,10 @@ static int bcm43xx_wireless_core_init(struct bcm43xx_private *bcm, | |||
2873 | sbimconfiglow = bcm43xx_read32(bcm, BCM43xx_CIR_SBIMCONFIGLOW); | 2873 | sbimconfiglow = bcm43xx_read32(bcm, BCM43xx_CIR_SBIMCONFIGLOW); |
2874 | sbimconfiglow &= ~ BCM43xx_SBIMCONFIGLOW_REQUEST_TOUT_MASK; | 2874 | sbimconfiglow &= ~ BCM43xx_SBIMCONFIGLOW_REQUEST_TOUT_MASK; |
2875 | sbimconfiglow &= ~ BCM43xx_SBIMCONFIGLOW_SERVICE_TOUT_MASK; | 2875 | sbimconfiglow &= ~ BCM43xx_SBIMCONFIGLOW_SERVICE_TOUT_MASK; |
2876 | sbimconfiglow |= 0x32; | 2876 | if (bcm->bustype == BCM43xx_BUSTYPE_PCI) |
2877 | sbimconfiglow |= 0x32; | ||
2878 | else | ||
2879 | sbimconfiglow |= 0x53; | ||
2877 | bcm43xx_write32(bcm, BCM43xx_CIR_SBIMCONFIGLOW, sbimconfiglow); | 2880 | bcm43xx_write32(bcm, BCM43xx_CIR_SBIMCONFIGLOW, sbimconfiglow); |
2878 | } | 2881 | } |
2879 | 2882 | ||
@@ -3077,7 +3080,7 @@ static int bcm43xx_setup_backplane_pci_connection(struct bcm43xx_private *bcm, | |||
3077 | if (err) | 3080 | if (err) |
3078 | goto out; | 3081 | goto out; |
3079 | 3082 | ||
3080 | if (bcm->current_core->rev < 6 || | 3083 | if (bcm->current_core->rev < 6 && |
3081 | bcm->current_core->id == BCM43xx_COREID_PCI) { | 3084 | bcm->current_core->id == BCM43xx_COREID_PCI) { |
3082 | value = bcm43xx_read32(bcm, BCM43xx_CIR_SBINTVEC); | 3085 | value = bcm43xx_read32(bcm, BCM43xx_CIR_SBINTVEC); |
3083 | value |= (1 << backplane_flag_nr); | 3086 | value |= (1 << backplane_flag_nr); |