diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-04-24 14:34:17 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-04-24 14:34:17 -0400 |
| commit | 8e500ff8df1223dfb42d6c39d3de1fc216fba1a2 (patch) | |
| tree | 8fa65946dd64af4d1b120ff0a96567bbcb0db2f5 | |
| parent | 383bee6b54a1eeac3a286812be8a5c3f122fd834 (diff) | |
| parent | 7ce97d4f78b62e3af24cdd4df953d777e7efb2f6 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (22 commits)
gianfar: Fix potential oops during OF address translation
fsl_pq_mdio: Fix kernel oops during OF address translation
tcp: bind() fix when many ports are bound
rdma: potential ERR_PTR dereference
rtnetlink: potential ERR_PTR dereference
net: ipv6 bind to device issue
ipv6: allow to send packet after receiving ICMPv6 Too Big message with MTU field less than IPV6_MIN_MTU
drivers/net/usb: Add new driver ipheth
cxgb3: fix linkup issue
X25 fix dead unaccepted sockets
KS8851: NULL pointer dereference if list is empty
net: 3c574_cs fix stats.tx_bytes counter
xfrm6: ensure to use the same dev when building a bundle
can: Fix possible NULL pointer dereference in ems_usb.c
net: Fix an RCU warning in dev_pick_tx()
ipv6: Fix tcp_v6_send_response transport header setting.
bridge: add a missing ntohs()
8139too: Fix a typo in the function name.
mac80211: pass HT changes to driver when off channel
mac80211: remove bogus TX agg state assignment
...
31 files changed, 678 insertions, 59 deletions
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c index a03d291de854..f0d23de32967 100644 --- a/drivers/net/8139too.c +++ b/drivers/net/8139too.c | |||
| @@ -1944,7 +1944,7 @@ static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp, | |||
| 1944 | netif_dbg(tp, rx_status, dev, "%s() status %04x, size %04x, cur %04x\n", | 1944 | netif_dbg(tp, rx_status, dev, "%s() status %04x, size %04x, cur %04x\n", |
| 1945 | __func__, rx_status, rx_size, cur_rx); | 1945 | __func__, rx_status, rx_size, cur_rx); |
| 1946 | #if RTL8139_DEBUG > 2 | 1946 | #if RTL8139_DEBUG > 2 |
| 1947 | print_dump_hex(KERN_DEBUG, "Frame contents: ", | 1947 | print_hex_dump(KERN_DEBUG, "Frame contents: ", |
| 1948 | DUMP_PREFIX_OFFSET, 16, 1, | 1948 | DUMP_PREFIX_OFFSET, 16, 1, |
| 1949 | &rx_ring[ring_offset], 70, true); | 1949 | &rx_ring[ring_offset], 70, true); |
| 1950 | #endif | 1950 | #endif |
diff --git a/drivers/net/Makefile b/drivers/net/Makefile index a583b50d9de8..12b280afdd51 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile | |||
| @@ -273,6 +273,7 @@ obj-$(CONFIG_USB_RTL8150) += usb/ | |||
| 273 | obj-$(CONFIG_USB_HSO) += usb/ | 273 | obj-$(CONFIG_USB_HSO) += usb/ |
| 274 | obj-$(CONFIG_USB_USBNET) += usb/ | 274 | obj-$(CONFIG_USB_USBNET) += usb/ |
| 275 | obj-$(CONFIG_USB_ZD1201) += usb/ | 275 | obj-$(CONFIG_USB_ZD1201) += usb/ |
| 276 | obj-$(CONFIG_USB_IPHETH) += usb/ | ||
| 276 | 277 | ||
| 277 | obj-y += wireless/ | 278 | obj-y += wireless/ |
| 278 | obj-$(CONFIG_NET_TULIP) += tulip/ | 279 | obj-$(CONFIG_NET_TULIP) += tulip/ |
diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c index 33451092b8e8..d800b598ae3d 100644 --- a/drivers/net/can/usb/ems_usb.c +++ b/drivers/net/can/usb/ems_usb.c | |||
| @@ -1006,7 +1006,7 @@ static int ems_usb_probe(struct usb_interface *intf, | |||
| 1006 | 1006 | ||
| 1007 | netdev = alloc_candev(sizeof(struct ems_usb), MAX_TX_URBS); | 1007 | netdev = alloc_candev(sizeof(struct ems_usb), MAX_TX_URBS); |
| 1008 | if (!netdev) { | 1008 | if (!netdev) { |
| 1009 | dev_err(netdev->dev.parent, "Couldn't alloc candev\n"); | 1009 | dev_err(&intf->dev, "ems_usb: Couldn't alloc candev\n"); |
| 1010 | return -ENOMEM; | 1010 | return -ENOMEM; |
| 1011 | } | 1011 | } |
| 1012 | 1012 | ||
| @@ -1036,20 +1036,20 @@ static int ems_usb_probe(struct usb_interface *intf, | |||
| 1036 | 1036 | ||
| 1037 | dev->intr_urb = usb_alloc_urb(0, GFP_KERNEL); | 1037 | dev->intr_urb = usb_alloc_urb(0, GFP_KERNEL); |
| 1038 | if (!dev->intr_urb) { | 1038 | if (!dev->intr_urb) { |
| 1039 | dev_err(netdev->dev.parent, "Couldn't alloc intr URB\n"); | 1039 | dev_err(&intf->dev, "Couldn't alloc intr URB\n"); |
| 1040 | goto cleanup_candev; | 1040 | goto cleanup_candev; |
| 1041 | } | 1041 | } |
| 1042 | 1042 | ||
| 1043 | dev->intr_in_buffer = kzalloc(INTR_IN_BUFFER_SIZE, GFP_KERNEL); | 1043 | dev->intr_in_buffer = kzalloc(INTR_IN_BUFFER_SIZE, GFP_KERNEL); |
| 1044 | if (!dev->intr_in_buffer) { | 1044 | if (!dev->intr_in_buffer) { |
| 1045 | dev_err(netdev->dev.parent, "Couldn't alloc Intr buffer\n"); | 1045 | dev_err(&intf->dev, "Couldn't alloc Intr buffer\n"); |
| 1046 | goto cleanup_intr_urb; | 1046 | goto cleanup_intr_urb; |
| 1047 | } | 1047 | } |
| 1048 | 1048 | ||
| 1049 | dev->tx_msg_buffer = kzalloc(CPC_HEADER_SIZE + | 1049 | dev->tx_msg_buffer = kzalloc(CPC_HEADER_SIZE + |
| 1050 | sizeof(struct ems_cpc_msg), GFP_KERNEL); | 1050 | sizeof(struct ems_cpc_msg), GFP_KERNEL); |
| 1051 | if (!dev->tx_msg_buffer) { | 1051 | if (!dev->tx_msg_buffer) { |
| 1052 | dev_err(netdev->dev.parent, "Couldn't alloc Tx buffer\n"); | 1052 | dev_err(&intf->dev, "Couldn't alloc Tx buffer\n"); |
| 1053 | goto cleanup_intr_in_buffer; | 1053 | goto cleanup_intr_in_buffer; |
| 1054 | } | 1054 | } |
| 1055 | 1055 | ||
diff --git a/drivers/net/cxgb3/ael1002.c b/drivers/net/cxgb3/ael1002.c index 5248f9e0b2f4..35cd36729155 100644 --- a/drivers/net/cxgb3/ael1002.c +++ b/drivers/net/cxgb3/ael1002.c | |||
| @@ -934,7 +934,7 @@ static struct cphy_ops xaui_direct_ops = { | |||
| 934 | int t3_xaui_direct_phy_prep(struct cphy *phy, struct adapter *adapter, | 934 | int t3_xaui_direct_phy_prep(struct cphy *phy, struct adapter *adapter, |
| 935 | int phy_addr, const struct mdio_ops *mdio_ops) | 935 | int phy_addr, const struct mdio_ops *mdio_ops) |
| 936 | { | 936 | { |
| 937 | cphy_init(phy, adapter, MDIO_PRTAD_NONE, &xaui_direct_ops, mdio_ops, | 937 | cphy_init(phy, adapter, phy_addr, &xaui_direct_ops, mdio_ops, |
| 938 | SUPPORTED_10000baseT_Full | SUPPORTED_AUI | SUPPORTED_TP, | 938 | SUPPORTED_10000baseT_Full | SUPPORTED_AUI | SUPPORTED_TP, |
| 939 | "10GBASE-CX4"); | 939 | "10GBASE-CX4"); |
| 940 | return 0; | 940 | return 0; |
diff --git a/drivers/net/fsl_pq_mdio.c b/drivers/net/fsl_pq_mdio.c index d5160edf2fcf..3acac5f930c8 100644 --- a/drivers/net/fsl_pq_mdio.c +++ b/drivers/net/fsl_pq_mdio.c | |||
| @@ -205,8 +205,6 @@ static int fsl_pq_mdio_find_free(struct mii_bus *new_bus) | |||
| 205 | static u32 __iomem *get_gfar_tbipa(struct fsl_pq_mdio __iomem *regs, struct device_node *np) | 205 | static u32 __iomem *get_gfar_tbipa(struct fsl_pq_mdio __iomem *regs, struct device_node *np) |
| 206 | { | 206 | { |
| 207 | struct gfar __iomem *enet_regs; | 207 | struct gfar __iomem *enet_regs; |
| 208 | u32 __iomem *ioremap_tbipa; | ||
| 209 | u64 addr, size; | ||
| 210 | 208 | ||
| 211 | /* | 209 | /* |
| 212 | * This is mildly evil, but so is our hardware for doing this. | 210 | * This is mildly evil, but so is our hardware for doing this. |
| @@ -220,9 +218,7 @@ static u32 __iomem *get_gfar_tbipa(struct fsl_pq_mdio __iomem *regs, struct devi | |||
| 220 | return &enet_regs->tbipa; | 218 | return &enet_regs->tbipa; |
| 221 | } else if (of_device_is_compatible(np, "fsl,etsec2-mdio") || | 219 | } else if (of_device_is_compatible(np, "fsl,etsec2-mdio") || |
| 222 | of_device_is_compatible(np, "fsl,etsec2-tbi")) { | 220 | of_device_is_compatible(np, "fsl,etsec2-tbi")) { |
| 223 | addr = of_translate_address(np, of_get_address(np, 1, &size, NULL)); | 221 | return of_iomap(np, 1); |
| 224 | ioremap_tbipa = ioremap(addr, size); | ||
| 225 | return ioremap_tbipa; | ||
| 226 | } else | 222 | } else |
| 227 | return NULL; | 223 | return NULL; |
| 228 | } | 224 | } |
| @@ -279,6 +275,7 @@ static int fsl_pq_mdio_probe(struct of_device *ofdev, | |||
| 279 | u32 __iomem *tbipa; | 275 | u32 __iomem *tbipa; |
| 280 | struct mii_bus *new_bus; | 276 | struct mii_bus *new_bus; |
| 281 | int tbiaddr = -1; | 277 | int tbiaddr = -1; |
| 278 | const u32 *addrp; | ||
| 282 | u64 addr = 0, size = 0; | 279 | u64 addr = 0, size = 0; |
| 283 | int err = 0; | 280 | int err = 0; |
| 284 | 281 | ||
| @@ -297,8 +294,19 @@ static int fsl_pq_mdio_probe(struct of_device *ofdev, | |||
| 297 | new_bus->priv = priv; | 294 | new_bus->priv = priv; |
| 298 | fsl_pq_mdio_bus_name(new_bus->id, np); | 295 | fsl_pq_mdio_bus_name(new_bus->id, np); |
| 299 | 296 | ||
| 297 | addrp = of_get_address(np, 0, &size, NULL); | ||
| 298 | if (!addrp) { | ||
| 299 | err = -EINVAL; | ||
| 300 | goto err_free_bus; | ||
| 301 | } | ||
| 302 | |||
| 300 | /* Set the PHY base address */ | 303 | /* Set the PHY base address */ |
| 301 | addr = of_translate_address(np, of_get_address(np, 0, &size, NULL)); | 304 | addr = of_translate_address(np, addrp); |
| 305 | if (addr == OF_BAD_ADDR) { | ||
