diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2013-01-15 15:58:25 -0500 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2013-01-15 15:58:25 -0500 |
commit | 7bcc1ec07748cae3552dc9b46701c117926c8923 (patch) | |
tree | 2b3edc7de77ca306b2559ae341077094bac8c4a2 /drivers/net/usb | |
parent | e5c702d3b268066dc70d619ecff06a08065f343f (diff) | |
parent | 29594404d7fe73cd80eaa4ee8c43dcc53970c60e (diff) |
Merge tag 'v3.7' into stable/for-linus-3.8
Linux 3.7
* tag 'v3.7': (833 commits)
Linux 3.7
Input: matrix-keymap - provide proper module license
Revert "revert "Revert "mm: remove __GFP_NO_KSWAPD""" and associated damage
ipv4: ip_check_defrag must not modify skb before unsharing
Revert "mm: avoid waking kswapd for THP allocations when compaction is deferred or contended"
inet_diag: validate port comparison byte code to prevent unsafe reads
inet_diag: avoid unsafe and nonsensical prefix matches in inet_diag_bc_run()
inet_diag: validate byte code to prevent oops in inet_diag_bc_run()
inet_diag: fix oops for IPv4 AF_INET6 TCP SYN-RECV state
mm: vmscan: fix inappropriate zone congestion clearing
vfs: fix O_DIRECT read past end of block device
net: gro: fix possible panic in skb_gro_receive()
tcp: bug fix Fast Open client retransmission
tmpfs: fix shared mempolicy leak
mm: vmscan: do not keep kswapd looping forever due to individual uncompactable zones
mm: compaction: validate pfn range passed to isolate_freepages_block
mmc: sh-mmcif: avoid oops on spurious interrupts (second try)
Revert misapplied "mmc: sh-mmcif: avoid oops on spurious interrupts"
mmc: sdhci-s3c: fix missing clock for gpio card-detect
lib/Makefile: Fix oid_registry build dependency
...
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Conflicts:
arch/arm/xen/enlighten.c
drivers/xen/Makefile
[We need to have the v3.7 base as the 'for-3.8' was based off v3.7-rc3
and there are some patches in v3.7-rc6 that we to have in our branch]
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/cdc_eem.c | 3 | ||||
-rw-r--r-- | drivers/net/usb/cdc_ncm.c | 22 | ||||
-rw-r--r-- | drivers/net/usb/qmi_wwan.c | 1 | ||||
-rw-r--r-- | drivers/net/usb/smsc95xx.c | 5 | ||||
-rw-r--r-- | drivers/net/usb/usbnet.c | 8 |
5 files changed, 29 insertions, 10 deletions
diff --git a/drivers/net/usb/cdc_eem.c b/drivers/net/usb/cdc_eem.c index c81e278629ff..08d55b6bf272 100644 --- a/drivers/net/usb/cdc_eem.c +++ b/drivers/net/usb/cdc_eem.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/usb/cdc.h> | 31 | #include <linux/usb/cdc.h> |
32 | #include <linux/usb/usbnet.h> | 32 | #include <linux/usb/usbnet.h> |
33 | #include <linux/gfp.h> | 33 | #include <linux/gfp.h> |
34 | #include <linux/if_vlan.h> | ||
34 | 35 | ||
35 | 36 | ||
36 | /* | 37 | /* |
@@ -92,7 +93,7 @@ static int eem_bind(struct usbnet *dev, struct usb_interface *intf) | |||
92 | 93 | ||
93 | /* no jumbogram (16K) support for now */ | 94 | /* no jumbogram (16K) support for now */ |
94 | 95 | ||
95 | dev->net->hard_header_len += EEM_HEAD + ETH_FCS_LEN; | 96 | dev->net->hard_header_len += EEM_HEAD + ETH_FCS_LEN + VLAN_HLEN; |
96 | dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len; | 97 | dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len; |
97 | 98 | ||
98 | return 0; | 99 | return 0; |
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c index 4cd582a4f625..74fab1a40156 100644 --- a/drivers/net/usb/cdc_ncm.c +++ b/drivers/net/usb/cdc_ncm.c | |||
@@ -540,10 +540,12 @@ advance: | |||
540 | (ctx->ether_desc == NULL) || (ctx->control != intf)) | 540 | (ctx->ether_desc == NULL) || (ctx->control != intf)) |
541 | goto error; | 541 | goto error; |
542 | 542 | ||
543 | /* claim interfaces, if any */ | 543 | /* claim data interface, if different from control */ |
544 | temp = usb_driver_claim_interface(driver, ctx->data, dev); | 544 | if (ctx->data != ctx->control) { |
545 | if (temp) | 545 | temp = usb_driver_claim_interface(driver, ctx->data, dev); |
546 | goto error; | 546 | if (temp) |
547 | goto error; | ||
548 | } | ||
547 | 549 | ||
548 | iface_no = ctx->data->cur_altsetting->desc.bInterfaceNumber; | 550 | iface_no = ctx->data->cur_altsetting->desc.bInterfaceNumber; |
549 | 551 | ||
@@ -623,6 +625,10 @@ static void cdc_ncm_unbind(struct usbnet *dev, struct usb_interface *intf) | |||
623 | 625 | ||
624 | tasklet_kill(&ctx->bh); | 626 | tasklet_kill(&ctx->bh); |
625 | 627 | ||
628 | /* handle devices with combined control and data interface */ | ||
629 | if (ctx->control == ctx->data) | ||
630 | ctx->data = NULL; | ||
631 | |||
626 | /* disconnect master --> disconnect slave */ | 632 | /* disconnect master --> disconnect slave */ |
627 | if (intf == ctx->control && ctx->data) { | 633 | if (intf == ctx->control && ctx->data) { |
628 | usb_set_intfdata(ctx->data, NULL); | 634 | usb_set_intfdata(ctx->data, NULL); |
@@ -1245,6 +1251,14 @@ static const struct usb_device_id cdc_devs[] = { | |||
1245 | .driver_info = (unsigned long) &wwan_info, | 1251 | .driver_info = (unsigned long) &wwan_info, |
1246 | }, | 1252 | }, |
1247 | 1253 | ||
1254 | /* Huawei NCM devices disguised as vendor specific */ | ||
1255 | { USB_VENDOR_AND_INTERFACE_INFO(0x12d1, 0xff, 0x02, 0x16), | ||
1256 | .driver_info = (unsigned long)&wwan_info, | ||
1257 | }, | ||
1258 | { USB_VENDOR_AND_INTERFACE_INFO(0x12d1, 0xff, 0x02, 0x46), | ||
1259 | .driver_info = (unsigned long)&wwan_info, | ||
1260 | }, | ||
1261 | |||
1248 | /* Generic CDC-NCM devices */ | 1262 | /* Generic CDC-NCM devices */ |
1249 | { USB_INTERFACE_INFO(USB_CLASS_COMM, | 1263 | { USB_INTERFACE_INFO(USB_CLASS_COMM, |
1250 | USB_CDC_SUBCLASS_NCM, USB_CDC_PROTO_NONE), | 1264 | USB_CDC_SUBCLASS_NCM, USB_CDC_PROTO_NONE), |
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index 3b566fa0f8e6..1ea91f4237f0 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c | |||
@@ -385,6 +385,7 @@ static const struct usb_device_id products[] = { | |||
385 | }, | 385 | }, |
386 | 386 | ||
387 | /* 3. Combined interface devices matching on interface number */ | 387 | /* 3. Combined interface devices matching on interface number */ |
388 | {QMI_FIXED_INTF(0x12d1, 0x140c, 1)}, /* Huawei E173 */ | ||
388 | {QMI_FIXED_INTF(0x19d2, 0x0002, 1)}, | 389 | {QMI_FIXED_INTF(0x19d2, 0x0002, 1)}, |
389 | {QMI_FIXED_INTF(0x19d2, 0x0012, 1)}, | 390 | {QMI_FIXED_INTF(0x19d2, 0x0012, 1)}, |
390 | {QMI_FIXED_INTF(0x19d2, 0x0017, 3)}, | 391 | {QMI_FIXED_INTF(0x19d2, 0x0017, 3)}, |
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index 7479a5761d0d..362cb8cfeb92 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c | |||
@@ -184,7 +184,7 @@ static int smsc95xx_mdio_read(struct net_device *netdev, int phy_id, int idx) | |||
184 | /* set the address, index & direction (read from PHY) */ | 184 | /* set the address, index & direction (read from PHY) */ |
185 | phy_id &= dev->mii.phy_id_mask; | 185 | phy_id &= dev->mii.phy_id_mask; |
186 | idx &= dev->mii.reg_num_mask; | 186 | idx &= dev->mii.reg_num_mask; |
187 | addr = (phy_id << 11) | (idx << 6) | MII_READ_; | 187 | addr = (phy_id << 11) | (idx << 6) | MII_READ_ | MII_BUSY_; |
188 | ret = smsc95xx_write_reg(dev, MII_ADDR, addr); | 188 | ret = smsc95xx_write_reg(dev, MII_ADDR, addr); |
189 | check_warn_goto_done(ret, "Error writing MII_ADDR"); | 189 | check_warn_goto_done(ret, "Error writing MII_ADDR"); |
190 | 190 | ||
@@ -221,7 +221,7 @@ static void smsc95xx_mdio_write(struct net_device *netdev, int phy_id, int idx, | |||
221 | /* set the address, index & direction (write to PHY) */ | 221 | /* set the address, index & direction (write to PHY) */ |
222 | phy_id &= dev->mii.phy_id_mask; | 222 | phy_id &= dev->mii.phy_id_mask; |
223 | idx &= dev->mii.reg_num_mask; | 223 | idx &= dev->mii.reg_num_mask; |
224 | addr = (phy_id << 11) | (idx << 6) | MII_WRITE_; | 224 | addr = (phy_id << 11) | (idx << 6) | MII_WRITE_ | MII_BUSY_; |
225 | ret = smsc95xx_write_reg(dev, MII_ADDR, addr); | 225 | ret = smsc95xx_write_reg(dev, MII_ADDR, addr); |
226 | check_warn_goto_done(ret, "Error writing MII_ADDR"); | 226 | check_warn_goto_done(ret, "Error writing MII_ADDR"); |
227 | 227 | ||
@@ -1344,6 +1344,7 @@ static struct sk_buff *smsc95xx_tx_fixup(struct usbnet *dev, | |||
1344 | } else { | 1344 | } else { |
1345 | u32 csum_preamble = smsc95xx_calc_csum_preamble(skb); | 1345 | u32 csum_preamble = smsc95xx_calc_csum_preamble(skb); |
1346 | skb_push(skb, 4); | 1346 | skb_push(skb, 4); |
1347 | cpu_to_le32s(&csum_preamble); | ||
1347 | memcpy(skb->data, &csum_preamble, 4); | 1348 | memcpy(skb->data, &csum_preamble, 4); |
1348 | } | 1349 | } |
1349 | } | 1350 | } |
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index cb04f900cc46..edb81ed06950 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c | |||
@@ -359,10 +359,12 @@ static enum skb_state defer_bh(struct usbnet *dev, struct sk_buff *skb, | |||
359 | void usbnet_defer_kevent (struct usbnet *dev, int work) | 359 | void usbnet_defer_kevent (struct usbnet *dev, int work) |
360 | { | 360 | { |
361 | set_bit (work, &dev->flags); | 361 | set_bit (work, &dev->flags); |
362 | if (!schedule_work (&dev->kevent)) | 362 | if (!schedule_work (&dev->kevent)) { |
363 | netdev_err(dev->net, "kevent %d may have been dropped\n", work); | 363 | if (net_ratelimit()) |
364 | else | 364 | netdev_err(dev->net, "kevent %d may have been dropped\n", work); |
365 | } else { | ||
365 | netdev_dbg(dev->net, "kevent %d scheduled\n", work); | 366 | netdev_dbg(dev->net, "kevent %d scheduled\n", work); |
367 | } | ||
366 | } | 368 | } |
367 | EXPORT_SYMBOL_GPL(usbnet_defer_kevent); | 369 | EXPORT_SYMBOL_GPL(usbnet_defer_kevent); |
368 | 370 | ||