diff options
Diffstat (limited to 'drivers/usb/net')
-rw-r--r-- | drivers/usb/net/asix.c | 2 | ||||
-rw-r--r-- | drivers/usb/net/gl620a.c | 2 | ||||
-rw-r--r-- | drivers/usb/net/kaweth.c | 6 | ||||
-rw-r--r-- | drivers/usb/net/net1080.c | 2 | ||||
-rw-r--r-- | drivers/usb/net/pegasus.c | 29 | ||||
-rw-r--r-- | drivers/usb/net/rndis_host.c | 2 | ||||
-rw-r--r-- | drivers/usb/net/usbnet.c | 2 | ||||
-rw-r--r-- | drivers/usb/net/usbnet.h | 2 | ||||
-rw-r--r-- | drivers/usb/net/zaurus.c | 2 | ||||
-rw-r--r-- | drivers/usb/net/zd1201.c | 2 |
10 files changed, 31 insertions, 20 deletions
diff --git a/drivers/usb/net/asix.c b/drivers/usb/net/asix.c index 861f00a43750..252a34fbb42c 100644 --- a/drivers/usb/net/asix.c +++ b/drivers/usb/net/asix.c | |||
@@ -753,7 +753,7 @@ static int ax88772_rx_fixup(struct usbnet *dev, struct sk_buff *skb) | |||
753 | } | 753 | } |
754 | 754 | ||
755 | static struct sk_buff *ax88772_tx_fixup(struct usbnet *dev, struct sk_buff *skb, | 755 | static struct sk_buff *ax88772_tx_fixup(struct usbnet *dev, struct sk_buff *skb, |
756 | unsigned flags) | 756 | gfp_t flags) |
757 | { | 757 | { |
758 | int padlen; | 758 | int padlen; |
759 | int headroom = skb_headroom(skb); | 759 | int headroom = skb_headroom(skb); |
diff --git a/drivers/usb/net/gl620a.c b/drivers/usb/net/gl620a.c index c8763ae33c73..c0f263b202a6 100644 --- a/drivers/usb/net/gl620a.c +++ b/drivers/usb/net/gl620a.c | |||
@@ -301,7 +301,7 @@ static int genelink_rx_fixup(struct usbnet *dev, struct sk_buff *skb) | |||
301 | } | 301 | } |
302 | 302 | ||
303 | static struct sk_buff * | 303 | static struct sk_buff * |
304 | genelink_tx_fixup(struct usbnet *dev, struct sk_buff *skb, unsigned flags) | 304 | genelink_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags) |
305 | { | 305 | { |
306 | int padlen; | 306 | int padlen; |
307 | int length = skb->len; | 307 | int length = skb->len; |
diff --git a/drivers/usb/net/kaweth.c b/drivers/usb/net/kaweth.c index e04b0ce3611a..c82655d3d448 100644 --- a/drivers/usb/net/kaweth.c +++ b/drivers/usb/net/kaweth.c | |||
@@ -477,13 +477,13 @@ static int kaweth_reset(struct kaweth_device *kaweth) | |||
477 | } | 477 | } |
478 | 478 | ||
479 | static void kaweth_usb_receive(struct urb *, struct pt_regs *regs); | 479 | static void kaweth_usb_receive(struct urb *, struct pt_regs *regs); |
480 | static int kaweth_resubmit_rx_urb(struct kaweth_device *, unsigned); | 480 | static int kaweth_resubmit_rx_urb(struct kaweth_device *, gfp_t); |
481 | 481 | ||
482 | /**************************************************************** | 482 | /**************************************************************** |
483 | int_callback | 483 | int_callback |
484 | *****************************************************************/ | 484 | *****************************************************************/ |
485 | 485 | ||
486 | static void kaweth_resubmit_int_urb(struct kaweth_device *kaweth, int mf) | 486 | static void kaweth_resubmit_int_urb(struct kaweth_device *kaweth, gfp_t mf) |
487 | { | 487 | { |
488 | int status; | 488 | int status; |
489 | 489 | ||
@@ -550,7 +550,7 @@ static void kaweth_resubmit_tl(void *d) | |||
550 | * kaweth_resubmit_rx_urb | 550 | * kaweth_resubmit_rx_urb |
551 | ****************************************************************/ | 551 | ****************************************************************/ |
552 | static int kaweth_resubmit_rx_urb(struct kaweth_device *kaweth, | 552 | static int kaweth_resubmit_rx_urb(struct kaweth_device *kaweth, |
553 | unsigned mem_flags) | 553 | gfp_t mem_flags) |
554 | { | 554 | { |
555 | int result; | 555 | int result; |
556 | 556 | ||
diff --git a/drivers/usb/net/net1080.c b/drivers/usb/net/net1080.c index a4309c4a491b..cee55f8cf64f 100644 --- a/drivers/usb/net/net1080.c +++ b/drivers/usb/net/net1080.c | |||
@@ -500,7 +500,7 @@ static int net1080_rx_fixup(struct usbnet *dev, struct sk_buff *skb) | |||
500 | } | 500 | } |
501 | 501 | ||
502 | static struct sk_buff * | 502 | static struct sk_buff * |
503 | net1080_tx_fixup(struct usbnet *dev, struct sk_buff *skb, unsigned flags) | 503 | net1080_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags) |
504 | { | 504 | { |
505 | int padlen; | 505 | int padlen; |
506 | struct sk_buff *skb2; | 506 | struct sk_buff *skb2; |
diff --git a/drivers/usb/net/pegasus.c b/drivers/usb/net/pegasus.c index 7484d34780fc..6a4ffe6c3977 100644 --- a/drivers/usb/net/pegasus.c +++ b/drivers/usb/net/pegasus.c | |||
@@ -648,6 +648,13 @@ static void read_bulk_callback(struct urb *urb, struct pt_regs *regs) | |||
648 | } | 648 | } |
649 | 649 | ||
650 | /* | 650 | /* |
651 | * If the packet is unreasonably long, quietly drop it rather than | ||
652 | * kernel panicing by calling skb_put. | ||
653 | */ | ||
654 | if (pkt_len > PEGASUS_MTU) | ||
655 | goto goon; | ||
656 | |||
657 | /* | ||
651 | * at this point we are sure pegasus->rx_skb != NULL | 658 | * at this point we are sure pegasus->rx_skb != NULL |
652 | * so we go ahead and pass up the packet. | 659 | * so we go ahead and pass up the packet. |
653 | */ | 660 | */ |
@@ -886,15 +893,17 @@ static inline void get_interrupt_interval(pegasus_t * pegasus) | |||
886 | __u8 data[2]; | 893 | __u8 data[2]; |
887 | 894 | ||
888 | read_eprom_word(pegasus, 4, (__u16 *) data); | 895 | read_eprom_word(pegasus, 4, (__u16 *) data); |
889 | if (data[1] < 0x80) { | 896 | if (pegasus->usb->speed != USB_SPEED_HIGH) { |
890 | if (netif_msg_timer(pegasus)) | 897 | if (data[1] < 0x80) { |
891 | dev_info(&pegasus->intf->dev, | 898 | if (netif_msg_timer(pegasus)) |
892 | "intr interval changed from %ums to %ums\n", | 899 | dev_info(&pegasus->intf->dev, "intr interval " |
893 | data[1], 0x80); | 900 | "changed from %ums to %ums\n", |
894 | data[1] = 0x80; | 901 | data[1], 0x80); |
895 | #ifdef PEGASUS_WRITE_EEPROM | 902 | data[1] = 0x80; |
896 | write_eprom_word(pegasus, 4, *(__u16 *) data); | 903 | #ifdef PEGASUS_WRITE_EEPROM |
904 | write_eprom_word(pegasus, 4, *(__u16 *) data); | ||
897 | #endif | 905 | #endif |
906 | } | ||
898 | } | 907 | } |
899 | pegasus->intr_interval = data[1]; | 908 | pegasus->intr_interval = data[1]; |
900 | } | 909 | } |
@@ -904,8 +913,9 @@ static void set_carrier(struct net_device *net) | |||
904 | pegasus_t *pegasus = netdev_priv(net); | 913 | pegasus_t *pegasus = netdev_priv(net); |
905 | u16 tmp; | 914 | u16 tmp; |
906 | 915 | ||
907 | if (read_mii_word(pegasus, pegasus->phy, MII_BMSR, &tmp)) | 916 | if (!read_mii_word(pegasus, pegasus->phy, MII_BMSR, &tmp)) |
908 | return; | 917 | return; |
918 | |||
909 | if (tmp & BMSR_LSTATUS) | 919 | if (tmp & BMSR_LSTATUS) |
910 | netif_carrier_on(net); | 920 | netif_carrier_on(net); |
911 | else | 921 | else |
@@ -1355,6 +1365,7 @@ static void pegasus_disconnect(struct usb_interface *intf) | |||
1355 | cancel_delayed_work(&pegasus->carrier_check); | 1365 | cancel_delayed_work(&pegasus->carrier_check); |
1356 | unregister_netdev(pegasus->net); | 1366 | unregister_netdev(pegasus->net); |
1357 | usb_put_dev(interface_to_usbdev(intf)); | 1367 | usb_put_dev(interface_to_usbdev(intf)); |
1368 | unlink_all_urbs(pegasus); | ||
1358 | free_all_urbs(pegasus); | 1369 | free_all_urbs(pegasus); |
1359 | free_skb_pool(pegasus); | 1370 | free_skb_pool(pegasus); |
1360 | if (pegasus->rx_skb) | 1371 | if (pegasus->rx_skb) |
diff --git a/drivers/usb/net/rndis_host.c b/drivers/usb/net/rndis_host.c index 2ed2e5fb7778..b5a925dc1beb 100644 --- a/drivers/usb/net/rndis_host.c +++ b/drivers/usb/net/rndis_host.c | |||
@@ -517,7 +517,7 @@ static int rndis_rx_fixup(struct usbnet *dev, struct sk_buff *skb) | |||
517 | } | 517 | } |
518 | 518 | ||
519 | static struct sk_buff * | 519 | static struct sk_buff * |
520 | rndis_tx_fixup(struct usbnet *dev, struct sk_buff *skb, unsigned flags) | 520 | rndis_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags) |
521 | { | 521 | { |
522 | struct rndis_data_hdr *hdr; | 522 | struct rndis_data_hdr *hdr; |
523 | struct sk_buff *skb2; | 523 | struct sk_buff *skb2; |
diff --git a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c index 6c460918d54f..fce81d738933 100644 --- a/drivers/usb/net/usbnet.c +++ b/drivers/usb/net/usbnet.c | |||
@@ -288,7 +288,7 @@ EXPORT_SYMBOL_GPL(usbnet_defer_kevent); | |||
288 | 288 | ||
289 | static void rx_complete (struct urb *urb, struct pt_regs *regs); | 289 | static void rx_complete (struct urb *urb, struct pt_regs *regs); |
290 | 290 | ||
291 | static void rx_submit (struct usbnet *dev, struct urb *urb, unsigned flags) | 291 | static void rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags) |
292 | { | 292 | { |
293 | struct sk_buff *skb; | 293 | struct sk_buff *skb; |
294 | struct skb_data *entry; | 294 | struct skb_data *entry; |
diff --git a/drivers/usb/net/usbnet.h b/drivers/usb/net/usbnet.h index 7aa0abd1a9bd..89fc4958eecf 100644 --- a/drivers/usb/net/usbnet.h +++ b/drivers/usb/net/usbnet.h | |||
@@ -107,7 +107,7 @@ struct driver_info { | |||
107 | 107 | ||
108 | /* fixup tx packet (add framing) */ | 108 | /* fixup tx packet (add framing) */ |
109 | struct sk_buff *(*tx_fixup)(struct usbnet *dev, | 109 | struct sk_buff *(*tx_fixup)(struct usbnet *dev, |
110 | struct sk_buff *skb, unsigned flags); | 110 | struct sk_buff *skb, gfp_t flags); |
111 | 111 | ||
112 | /* for new devices, use the descriptor-reading code instead */ | 112 | /* for new devices, use the descriptor-reading code instead */ |
113 | int in; /* rx endpoint */ | 113 | int in; /* rx endpoint */ |
diff --git a/drivers/usb/net/zaurus.c b/drivers/usb/net/zaurus.c index ee3b892aeabc..5d4b7d55b097 100644 --- a/drivers/usb/net/zaurus.c +++ b/drivers/usb/net/zaurus.c | |||
@@ -62,7 +62,7 @@ | |||
62 | */ | 62 | */ |
63 | 63 | ||
64 | static struct sk_buff * | 64 | static struct sk_buff * |
65 | zaurus_tx_fixup(struct usbnet *dev, struct sk_buff *skb, unsigned flags) | 65 | zaurus_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags) |
66 | { | 66 | { |
67 | int padlen; | 67 | int padlen; |
68 | struct sk_buff *skb2; | 68 | struct sk_buff *skb2; |
diff --git a/drivers/usb/net/zd1201.c b/drivers/usb/net/zd1201.c index c4e479ee926a..2f52261c7cc1 100644 --- a/drivers/usb/net/zd1201.c +++ b/drivers/usb/net/zd1201.c | |||
@@ -521,7 +521,7 @@ static int zd1201_setconfig(struct zd1201 *zd, int rid, void *buf, int len, int | |||
521 | int reqlen; | 521 | int reqlen; |
522 | char seq=0; | 522 | char seq=0; |
523 | struct urb *urb; | 523 | struct urb *urb; |
524 | unsigned int gfp_mask = wait ? GFP_NOIO : GFP_ATOMIC; | 524 | gfp_t gfp_mask = wait ? GFP_NOIO : GFP_ATOMIC; |
525 | 525 | ||
526 | len += 4; /* first 4 are for header */ | 526 | len += 4; /* first 4 are for header */ |
527 | 527 | ||