diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-12-04 15:21:11 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-12-04 15:21:11 -0500 |
commit | e3c0ac04f980750a368f7cd5f1b8d1d2cdc1f735 (patch) | |
tree | 134501057a244b8ae18b87647a7574e4a36e4b5b /drivers | |
parent | 943547abdfe9b4e27e36a25987909619908dffbf (diff) | |
parent | 6f4a7f4183bdbd02741dcd8edbd10b8628acc5d5 (diff) |
Merge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
PHY: Add the phy_device_release device method.
gianfar: fix compile warning
pasemi_mac: Fix reuse of free'd skb
SMC911X: Fix using of dereferenced skb after netif_rx
sky2: recovery deadlock fix
Fix memory corruption in fec_mpc52xx
Don't claim to do IPv6 checksum offload
cxgb - revert file mode changes.
Diffstat (limited to 'drivers')
-rw-r--r--[-rwxr-xr-x] | drivers/net/chelsio/cxgb2.c | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | drivers/net/chelsio/pm3393.c | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | drivers/net/chelsio/sge.c | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | drivers/net/chelsio/sge.h | 0 | ||||
-rw-r--r-- | drivers/net/fec_mpc52xx.c | 4 | ||||
-rw-r--r-- | drivers/net/gianfar.c | 2 | ||||
-rw-r--r-- | drivers/net/pasemi_mac.c | 4 | ||||
-rw-r--r-- | drivers/net/phy/mdio_bus.c | 9 | ||||
-rw-r--r-- | drivers/net/phy/phy_device.c | 12 | ||||
-rw-r--r-- | drivers/net/sky2.c | 6 | ||||
-rw-r--r-- | drivers/net/smc911x.c | 2 |
11 files changed, 25 insertions, 14 deletions
diff --git a/drivers/net/chelsio/cxgb2.c b/drivers/net/chelsio/cxgb2.c index c5975047c89b..c5975047c89b 100755..100644 --- a/drivers/net/chelsio/cxgb2.c +++ b/drivers/net/chelsio/cxgb2.c | |||
diff --git a/drivers/net/chelsio/pm3393.c b/drivers/net/chelsio/pm3393.c index 2117c4fbb107..2117c4fbb107 100755..100644 --- a/drivers/net/chelsio/pm3393.c +++ b/drivers/net/chelsio/pm3393.c | |||
diff --git a/drivers/net/chelsio/sge.c b/drivers/net/chelsio/sge.c index b301c0428ae0..b301c0428ae0 100755..100644 --- a/drivers/net/chelsio/sge.c +++ b/drivers/net/chelsio/sge.c | |||
diff --git a/drivers/net/chelsio/sge.h b/drivers/net/chelsio/sge.h index cced9dff91c5..cced9dff91c5 100755..100644 --- a/drivers/net/chelsio/sge.h +++ b/drivers/net/chelsio/sge.h | |||
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c index bf5a7caa5b52..79f7eade4773 100644 --- a/drivers/net/fec_mpc52xx.c +++ b/drivers/net/fec_mpc52xx.c | |||
@@ -422,7 +422,7 @@ static irqreturn_t mpc52xx_fec_rx_interrupt(int irq, void *dev_id) | |||
422 | 422 | ||
423 | rskb = bcom_retrieve_buffer(priv->rx_dmatsk, &status, | 423 | rskb = bcom_retrieve_buffer(priv->rx_dmatsk, &status, |
424 | (struct bcom_bd **)&bd); | 424 | (struct bcom_bd **)&bd); |
425 | dma_unmap_single(&dev->dev, bd->skb_pa, skb->len, DMA_FROM_DEVICE); | 425 | dma_unmap_single(&dev->dev, bd->skb_pa, rskb->len, DMA_FROM_DEVICE); |
426 | 426 | ||
427 | /* Test for errors in received frame */ | 427 | /* Test for errors in received frame */ |
428 | if (status & BCOM_FEC_RX_BD_ERRORS) { | 428 | if (status & BCOM_FEC_RX_BD_ERRORS) { |
@@ -467,7 +467,7 @@ static irqreturn_t mpc52xx_fec_rx_interrupt(int irq, void *dev_id) | |||
467 | bcom_prepare_next_buffer(priv->rx_dmatsk); | 467 | bcom_prepare_next_buffer(priv->rx_dmatsk); |
468 | 468 | ||
469 | bd->status = FEC_RX_BUFFER_SIZE; | 469 | bd->status = FEC_RX_BUFFER_SIZE; |
470 | bd->skb_pa = dma_map_single(&dev->dev, rskb->data, | 470 | bd->skb_pa = dma_map_single(&dev->dev, skb->data, |
471 | FEC_RX_BUFFER_SIZE, DMA_FROM_DEVICE); | 471 | FEC_RX_BUFFER_SIZE, DMA_FROM_DEVICE); |
472 | 472 | ||
473 | bcom_submit_next_buffer(priv->rx_dmatsk, skb); | 473 | bcom_submit_next_buffer(priv->rx_dmatsk, skb); |
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 38268d7335a8..0431e9ed0fac 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
@@ -696,7 +696,7 @@ int startup_gfar(struct net_device *dev) | |||
696 | { | 696 | { |
697 | struct txbd8 *txbdp; | 697 | struct txbd8 *txbdp; |
698 | struct rxbd8 *rxbdp; | 698 | struct rxbd8 *rxbdp; |
699 | dma_addr_t addr; | 699 | dma_addr_t addr = 0; |
700 | unsigned long vaddr; | 700 | unsigned long vaddr; |
701 | int i; | 701 | int i; |
702 | struct gfar_private *priv = netdev_priv(dev); | 702 | struct gfar_private *priv = netdev_priv(dev); |
diff --git a/drivers/net/pasemi_mac.c b/drivers/net/pasemi_mac.c index 09b4fde8d924..816a59e801b2 100644 --- a/drivers/net/pasemi_mac.c +++ b/drivers/net/pasemi_mac.c | |||
@@ -586,7 +586,7 @@ static int pasemi_mac_clean_rx(struct pasemi_mac *mac, int limit) | |||
586 | /* CRC error flagged */ | 586 | /* CRC error flagged */ |
587 | mac->netdev->stats.rx_errors++; | 587 | mac->netdev->stats.rx_errors++; |
588 | mac->netdev->stats.rx_crc_errors++; | 588 | mac->netdev->stats.rx_crc_errors++; |
589 | dev_kfree_skb_irq(skb); | 589 | /* No need to free skb, it'll be reused */ |
590 | goto next; | 590 | goto next; |
591 | } | 591 | } |
592 | 592 | ||
@@ -1362,7 +1362,7 @@ pasemi_mac_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1362 | 1362 | ||
1363 | netif_napi_add(dev, &mac->napi, pasemi_mac_poll, 64); | 1363 | netif_napi_add(dev, &mac->napi, pasemi_mac_poll, 64); |
1364 | 1364 | ||
1365 | dev->features = NETIF_F_HW_CSUM | NETIF_F_LLTX | NETIF_F_SG; | 1365 | dev->features = NETIF_F_IP_CSUM | NETIF_F_LLTX | NETIF_F_SG; |
1366 | 1366 | ||
1367 | /* These should come out of the device tree eventually */ | 1367 | /* These should come out of the device tree eventually */ |
1368 | mac->dma_txch = index; | 1368 | mac->dma_txch = index; |
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index fc2f0e695a13..c30196d0ad16 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c | |||
@@ -91,9 +91,12 @@ int mdiobus_register(struct mii_bus *bus) | |||
91 | 91 | ||
92 | err = device_register(&phydev->dev); | 92 | err = device_register(&phydev->dev); |
93 | 93 | ||
94 | if (err) | 94 | if (err) { |
95 | printk(KERN_ERR "phy %d failed to register\n", | 95 | printk(KERN_ERR "phy %d failed to register\n", |
96 | i); | 96 | i); |
97 | phy_device_free(phydev); | ||
98 | phydev = NULL; | ||
99 | } | ||
97 | } | 100 | } |
98 | 101 | ||
99 | bus->phy_map[i] = phydev; | 102 | bus->phy_map[i] = phydev; |
@@ -110,10 +113,8 @@ void mdiobus_unregister(struct mii_bus *bus) | |||
110 | int i; | 113 | int i; |
111 | 114 | ||
112 | for (i = 0; i < PHY_MAX_ADDR; i++) { | 115 | for (i = 0; i < PHY_MAX_ADDR; i++) { |
113 | if (bus->phy_map[i]) { | 116 | if (bus->phy_map[i]) |
114 | device_unregister(&bus->phy_map[i]->dev); | 117 | device_unregister(&bus->phy_map[i]->dev); |
115 | kfree(bus->phy_map[i]); | ||
116 | } | ||
117 | } | 118 | } |
118 | } | 119 | } |
119 | EXPORT_SYMBOL(mdiobus_unregister); | 120 | EXPORT_SYMBOL(mdiobus_unregister); |
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index f6e484812a98..5b9e1751e1b4 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c | |||
@@ -44,6 +44,16 @@ static struct phy_driver genphy_driver; | |||
44 | extern int mdio_bus_init(void); | 44 | extern int mdio_bus_init(void); |
45 | extern void mdio_bus_exit(void); | 45 | extern void mdio_bus_exit(void); |
46 | 46 | ||
47 | void phy_device_free(struct phy_device *phydev) | ||
48 | { | ||
49 | kfree(phydev); | ||
50 | } | ||
51 | |||
52 | static void phy_device_release(struct device *dev) | ||
53 | { | ||
54 | phy_device_free(to_phy_device(dev)); | ||
55 | } | ||
56 | |||
47 | struct phy_device* phy_device_create(struct mii_bus *bus, int addr, int phy_id) | 57 | struct phy_device* phy_device_create(struct mii_bus *bus, int addr, int phy_id) |
48 | { | 58 | { |
49 | struct phy_device *dev; | 59 | struct phy_device *dev; |
@@ -54,6 +64,8 @@ struct phy_device* phy_device_create(struct mii_bus *bus, int addr, int phy_id) | |||
54 | if (NULL == dev) | 64 | if (NULL == dev) |
55 | return (struct phy_device*) PTR_ERR((void*)-ENOMEM); | 65 | return (struct phy_device*) PTR_ERR((void*)-ENOMEM); |
56 | 66 | ||
67 | dev->dev.release = phy_device_release; | ||
68 | |||
57 | dev->speed = 0; | 69 | dev->speed = 0; |
58 | dev->duplex = -1; | 70 | dev->duplex = -1; |
59 | dev->pause = dev->asym_pause = 0; | 71 | dev->pause = dev->asym_pause = 0; |
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 3d1dfc948405..6197afb3ed83 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -2906,16 +2906,14 @@ static void sky2_restart(struct work_struct *work) | |||
2906 | int i, err; | 2906 | int i, err; |
2907 | 2907 | ||
2908 | rtnl_lock(); | 2908 | rtnl_lock(); |
2909 | sky2_write32(hw, B0_IMSK, 0); | ||
2910 | sky2_read32(hw, B0_IMSK); | ||
2911 | napi_disable(&hw->napi); | ||
2912 | |||
2913 | for (i = 0; i < hw->ports; i++) { | 2909 | for (i = 0; i < hw->ports; i++) { |
2914 | dev = hw->dev[i]; | 2910 | dev = hw->dev[i]; |
2915 | if (netif_running(dev)) | 2911 | if (netif_running(dev)) |
2916 | sky2_down(dev); | 2912 | sky2_down(dev); |
2917 | } | 2913 | } |
2918 | 2914 | ||
2915 | napi_disable(&hw->napi); | ||
2916 | sky2_write32(hw, B0_IMSK, 0); | ||
2919 | sky2_reset(hw); | 2917 | sky2_reset(hw); |
2920 | sky2_write32(hw, B0_IMSK, Y2_IS_BASE); | 2918 | sky2_write32(hw, B0_IMSK, Y2_IS_BASE); |
2921 | napi_enable(&hw->napi); | 2919 | napi_enable(&hw->napi); |
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index 1a3d80bfe9ea..76cc1d3adf71 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c | |||
@@ -1299,9 +1299,9 @@ smc911x_rx_dma_irq(int dma, void *data) | |||
1299 | PRINT_PKT(skb->data, skb->len); | 1299 | PRINT_PKT(skb->data, skb->len); |
1300 | dev->last_rx = jiffies; | 1300 | dev->last_rx = jiffies; |
1301 | skb->protocol = eth_type_trans(skb, dev); | 1301 | skb->protocol = eth_type_trans(skb, dev); |
1302 | netif_rx(skb); | ||
1303 | dev->stats.rx_packets++; | 1302 | dev->stats.rx_packets++; |
1304 | dev->stats.rx_bytes += skb->len; | 1303 | dev->stats.rx_bytes += skb->len; |
1304 | netif_rx(skb); | ||
1305 | 1305 | ||
1306 | spin_lock_irqsave(&lp->lock, flags); | 1306 | spin_lock_irqsave(&lp->lock, flags); |
1307 | pkts = (SMC_GET_RX_FIFO_INF() & RX_FIFO_INF_RXSUSED_) >> 16; | 1307 | pkts = (SMC_GET_RX_FIFO_INF() & RX_FIFO_INF_RXSUSED_) >> 16; |