diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2006-12-08 01:07:56 -0500 |
---|---|---|
committer | Dmitry Torokhov <dtor@insightbb.com> | 2006-12-08 01:07:56 -0500 |
commit | bef986502fa398b1785a3979b1aa17cd902d3527 (patch) | |
tree | b59c1afe7b1dfcc001b86e54863f550d7ddc8c34 /drivers/usb/gadget | |
parent | 4bdbd2807deeccc0793d57fb5120d7a53f2c0b3c (diff) | |
parent | c99767974ebd2a719d849fdeaaa1674456f5283f (diff) |
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/usb/input/hid.h
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/Kconfig | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/ether.c | 10 | ||||
-rw-r--r-- | drivers/usb/gadget/file_storage.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/gmidi.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/goku_udc.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/inode.c | 6 | ||||
-rw-r--r-- | drivers/usb/gadget/lh7a40x_udc.c | 1 | ||||
-rw-r--r-- | drivers/usb/gadget/net2280.c | 10 | ||||
-rw-r--r-- | drivers/usb/gadget/net2280.h | 3 | ||||
-rw-r--r-- | drivers/usb/gadget/omap_udc.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/pxa2xx_udc.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/zero.c | 2 |
12 files changed, 25 insertions, 19 deletions
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index bbbc82a8336a..4097a86c4b5e 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig | |||
@@ -189,7 +189,7 @@ config USB_OTG | |||
189 | 189 | ||
190 | config USB_GADGET_AT91 | 190 | config USB_GADGET_AT91 |
191 | boolean "AT91 USB Device Port" | 191 | boolean "AT91 USB Device Port" |
192 | depends on ARCH_AT91RM9200 | 192 | depends on ARCH_AT91 |
193 | select USB_GADGET_SELECTED | 193 | select USB_GADGET_SELECTED |
194 | help | 194 | help |
195 | Many Atmel AT91 processors (such as the AT91RM2000) have a | 195 | Many Atmel AT91 processors (such as the AT91RM2000) have a |
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index 1c17d26d03b8..d15bf22b9a03 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c | |||
@@ -1833,9 +1833,9 @@ static void rx_fill (struct eth_dev *dev, gfp_t gfp_flags) | |||
1833 | spin_unlock_irqrestore(&dev->req_lock, flags); | 1833 | spin_unlock_irqrestore(&dev->req_lock, flags); |
1834 | } | 1834 | } |
1835 | 1835 | ||
1836 | static void eth_work (void *_dev) | 1836 | static void eth_work (struct work_struct *work) |
1837 | { | 1837 | { |
1838 | struct eth_dev *dev = _dev; | 1838 | struct eth_dev *dev = container_of(work, struct eth_dev, work); |
1839 | 1839 | ||
1840 | if (test_and_clear_bit (WORK_RX_MEMORY, &dev->todo)) { | 1840 | if (test_and_clear_bit (WORK_RX_MEMORY, &dev->todo)) { |
1841 | if (netif_running (dev->net)) | 1841 | if (netif_running (dev->net)) |
@@ -1894,13 +1894,13 @@ static int eth_start_xmit (struct sk_buff *skb, struct net_device *net) | |||
1894 | if (!eth_is_promisc (dev)) { | 1894 | if (!eth_is_promisc (dev)) { |
1895 | u8 *dest = skb->data; | 1895 | u8 *dest = skb->data; |
1896 | 1896 | ||
1897 | if (dest [0] & 0x01) { | 1897 | if (is_multicast_ether_addr(dest)) { |
1898 | u16 type; | 1898 | u16 type; |
1899 | 1899 | ||
1900 | /* ignores USB_CDC_PACKET_TYPE_MULTICAST and host | 1900 | /* ignores USB_CDC_PACKET_TYPE_MULTICAST and host |
1901 | * SET_ETHERNET_MULTICAST_FILTERS requests | 1901 | * SET_ETHERNET_MULTICAST_FILTERS requests |
1902 | */ | 1902 | */ |
1903 | if (memcmp (dest, net->broadcast, ETH_ALEN) == 0) | 1903 | if (is_broadcast_ether_addr(dest)) |
1904 | type = USB_CDC_PACKET_TYPE_BROADCAST; | 1904 | type = USB_CDC_PACKET_TYPE_BROADCAST; |
1905 | else | 1905 | else |
1906 | type = USB_CDC_PACKET_TYPE_ALL_MULTICAST; | 1906 | type = USB_CDC_PACKET_TYPE_ALL_MULTICAST; |
@@ -2398,7 +2398,7 @@ autoconf_fail: | |||
2398 | dev = netdev_priv(net); | 2398 | dev = netdev_priv(net); |
2399 | spin_lock_init (&dev->lock); | 2399 | spin_lock_init (&dev->lock); |
2400 | spin_lock_init (&dev->req_lock); | 2400 | spin_lock_init (&dev->req_lock); |
2401 | INIT_WORK (&dev->work, eth_work, dev); | 2401 | INIT_WORK (&dev->work, eth_work); |
2402 | INIT_LIST_HEAD (&dev->tx_reqs); | 2402 | INIT_LIST_HEAD (&dev->tx_reqs); |
2403 | INIT_LIST_HEAD (&dev->rx_reqs); | 2403 | INIT_LIST_HEAD (&dev->rx_reqs); |
2404 | 2404 | ||
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c index 8b975d15538d..c98316ce8384 100644 --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c | |||
@@ -250,7 +250,7 @@ | |||
250 | #include <linux/slab.h> | 250 | #include <linux/slab.h> |
251 | #include <linux/spinlock.h> | 251 | #include <linux/spinlock.h> |
252 | #include <linux/string.h> | 252 | #include <linux/string.h> |
253 | #include <linux/suspend.h> | 253 | #include <linux/freezer.h> |
254 | #include <linux/utsname.h> | 254 | #include <linux/utsname.h> |
255 | 255 | ||
256 | #include <linux/usb_ch9.h> | 256 | #include <linux/usb_ch9.h> |
diff --git a/drivers/usb/gadget/gmidi.c b/drivers/usb/gadget/gmidi.c index 64554acad63f..31351826f2ba 100644 --- a/drivers/usb/gadget/gmidi.c +++ b/drivers/usb/gadget/gmidi.c | |||
@@ -1236,7 +1236,7 @@ autoconf_fail: | |||
1236 | 1236 | ||
1237 | 1237 | ||
1238 | /* ok, we made sense of the hardware ... */ | 1238 | /* ok, we made sense of the hardware ... */ |
1239 | dev = kzalloc(sizeof(*dev), SLAB_KERNEL); | 1239 | dev = kzalloc(sizeof(*dev), GFP_KERNEL); |
1240 | if (!dev) { | 1240 | if (!dev) { |
1241 | return -ENOMEM; | 1241 | return -ENOMEM; |
1242 | } | 1242 | } |
diff --git a/drivers/usb/gadget/goku_udc.c b/drivers/usb/gadget/goku_udc.c index a3076da3f4eb..805a9826842d 100644 --- a/drivers/usb/gadget/goku_udc.c +++ b/drivers/usb/gadget/goku_udc.c | |||
@@ -1864,7 +1864,7 @@ static int goku_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1864 | } | 1864 | } |
1865 | 1865 | ||
1866 | /* alloc, and start init */ | 1866 | /* alloc, and start init */ |
1867 | dev = kmalloc (sizeof *dev, SLAB_KERNEL); | 1867 | dev = kmalloc (sizeof *dev, GFP_KERNEL); |
1868 | if (dev == NULL){ | 1868 | if (dev == NULL){ |
1869 | pr_debug("enomem %s\n", pci_name(pdev)); | 1869 | pr_debug("enomem %s\n", pci_name(pdev)); |
1870 | retval = -ENOMEM; | 1870 | retval = -ENOMEM; |
diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c index 86924f9cdd7e..3fb1044a4db0 100644 --- a/drivers/usb/gadget/inode.c +++ b/drivers/usb/gadget/inode.c | |||
@@ -412,7 +412,7 @@ ep_read (struct file *fd, char __user *buf, size_t len, loff_t *ptr) | |||
412 | /* FIXME readahead for O_NONBLOCK and poll(); careful with ZLPs */ | 412 | /* FIXME readahead for O_NONBLOCK and poll(); careful with ZLPs */ |
413 | 413 | ||
414 | value = -ENOMEM; | 414 | value = -ENOMEM; |
415 | kbuf = kmalloc (len, SLAB_KERNEL); | 415 | kbuf = kmalloc (len, GFP_KERNEL); |
416 | if (unlikely (!kbuf)) | 416 | if (unlikely (!kbuf)) |
417 | goto free1; | 417 | goto free1; |
418 | 418 | ||
@@ -456,7 +456,7 @@ ep_write (struct file *fd, const char __user *buf, size_t len, loff_t *ptr) | |||
456 | /* FIXME writebehind for O_NONBLOCK and poll(), qlen = 1 */ | 456 | /* FIXME writebehind for O_NONBLOCK and poll(), qlen = 1 */ |
457 | 457 | ||
458 | value = -ENOMEM; | 458 | value = -ENOMEM; |
459 | kbuf = kmalloc (len, SLAB_KERNEL); | 459 | kbuf = kmalloc (len, GFP_KERNEL); |
460 | if (!kbuf) | 460 | if (!kbuf) |
461 | goto free1; | 461 | goto free1; |
462 | if (copy_from_user (kbuf, buf, len)) { | 462 | if (copy_from_user (kbuf, buf, len)) { |
@@ -1898,7 +1898,7 @@ dev_config (struct file *fd, const char __user *buf, size_t len, loff_t *ptr) | |||
1898 | buf += 4; | 1898 | buf += 4; |
1899 | length -= 4; | 1899 | length -= 4; |
1900 | 1900 | ||
1901 | kbuf = kmalloc (length, SLAB_KERNEL); | 1901 | kbuf = kmalloc (length, GFP_KERNEL); |
1902 | if (!kbuf) | 1902 | if (!kbuf) |
1903 | return -ENOMEM; | 1903 | return -ENOMEM; |
1904 | if (copy_from_user (kbuf, buf, length)) { | 1904 | if (copy_from_user (kbuf, buf, length)) { |
diff --git a/drivers/usb/gadget/lh7a40x_udc.c b/drivers/usb/gadget/lh7a40x_udc.c index 179259664c18..4a991564a03e 100644 --- a/drivers/usb/gadget/lh7a40x_udc.c +++ b/drivers/usb/gadget/lh7a40x_udc.c | |||
@@ -83,7 +83,6 @@ static int lh7a40x_queue(struct usb_ep *ep, struct usb_request *, gfp_t); | |||
83 | static int lh7a40x_dequeue(struct usb_ep *ep, struct usb_request *); | 83 | static int lh7a40x_dequeue(struct usb_ep *ep, struct usb_request *); |
84 | static int lh7a40x_set_halt(struct usb_ep *ep, int); | 84 | static int lh7a40x_set_halt(struct usb_ep *ep, int); |
85 | static int lh7a40x_fifo_status(struct usb_ep *ep); | 85 | static int lh7a40x_fifo_status(struct usb_ep *ep); |
86 | static int lh7a40x_fifo_status(struct usb_ep *ep); | ||
87 | static void lh7a40x_fifo_flush(struct usb_ep *ep); | 86 | static void lh7a40x_fifo_flush(struct usb_ep *ep); |
88 | static void lh7a40x_ep0_kick(struct lh7a40x_udc *dev, struct lh7a40x_ep *ep); | 87 | static void lh7a40x_ep0_kick(struct lh7a40x_udc *dev, struct lh7a40x_ep *ep); |
89 | static void lh7a40x_handle_ep0(struct lh7a40x_udc *dev, u32 intr); | 88 | static void lh7a40x_handle_ep0(struct lh7a40x_udc *dev, u32 intr); |
diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c index 3acc896a5d4c..3024c679e38e 100644 --- a/drivers/usb/gadget/net2280.c +++ b/drivers/usb/gadget/net2280.c | |||
@@ -1040,6 +1040,7 @@ net2280_queue (struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags) | |||
1040 | 1040 | ||
1041 | } /* else the irq handler advances the queue. */ | 1041 | } /* else the irq handler advances the queue. */ |
1042 | 1042 | ||
1043 | ep->responded = 1; | ||
1043 | if (req) | 1044 | if (req) |
1044 | list_add_tail (&req->queue, &ep->queue); | 1045 | list_add_tail (&req->queue, &ep->queue); |
1045 | done: | 1046 | done: |
@@ -2188,7 +2189,8 @@ static void handle_ep_small (struct net2280_ep *ep) | |||
2188 | ep->stopped = 1; | 2189 | ep->stopped = 1; |
2189 | set_halt (ep); | 2190 | set_halt (ep); |
2190 | mode = 2; | 2191 | mode = 2; |
2191 | } else if (!req && !ep->stopped) | 2192 | } else if (ep->responded && |
2193 | !req && !ep->stopped) | ||
2192 | write_fifo (ep, NULL); | 2194 | write_fifo (ep, NULL); |
2193 | } | 2195 | } |
2194 | } else { | 2196 | } else { |
@@ -2203,7 +2205,7 @@ static void handle_ep_small (struct net2280_ep *ep) | |||
2203 | } else if (((t & (1 << DATA_OUT_PING_TOKEN_INTERRUPT)) | 2205 | } else if (((t & (1 << DATA_OUT_PING_TOKEN_INTERRUPT)) |
2204 | && req | 2206 | && req |
2205 | && req->req.actual == req->req.length) | 2207 | && req->req.actual == req->req.length) |
2206 | || !req) { | 2208 | || (ep->responded && !req)) { |
2207 | ep->dev->protocol_stall = 1; | 2209 | ep->dev->protocol_stall = 1; |
2208 | set_halt (ep); | 2210 | set_halt (ep); |
2209 | ep->stopped = 1; | 2211 | ep->stopped = 1; |
@@ -2469,6 +2471,7 @@ static void handle_stat0_irqs (struct net2280 *dev, u32 stat) | |||
2469 | /* we made the hardware handle most lowlevel requests; | 2471 | /* we made the hardware handle most lowlevel requests; |
2470 | * everything else goes uplevel to the gadget code. | 2472 | * everything else goes uplevel to the gadget code. |
2471 | */ | 2473 | */ |
2474 | ep->responded = 1; | ||
2472 | switch (u.r.bRequest) { | 2475 | switch (u.r.bRequest) { |
2473 | case USB_REQ_GET_STATUS: { | 2476 | case USB_REQ_GET_STATUS: { |
2474 | struct net2280_ep *e; | 2477 | struct net2280_ep *e; |
@@ -2537,6 +2540,7 @@ delegate: | |||
2537 | u.r.bRequestType, u.r.bRequest, | 2540 | u.r.bRequestType, u.r.bRequest, |
2538 | w_value, w_index, w_length, | 2541 | w_value, w_index, w_length, |
2539 | readl (&ep->regs->ep_cfg)); | 2542 | readl (&ep->regs->ep_cfg)); |
2543 | ep->responded = 0; | ||
2540 | spin_unlock (&dev->lock); | 2544 | spin_unlock (&dev->lock); |
2541 | tmp = dev->driver->setup (&dev->gadget, &u.r); | 2545 | tmp = dev->driver->setup (&dev->gadget, &u.r); |
2542 | spin_lock (&dev->lock); | 2546 | spin_lock (&dev->lock); |
@@ -2857,7 +2861,7 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id) | |||
2857 | } | 2861 | } |
2858 | 2862 | ||
2859 | /* alloc, and start init */ | 2863 | /* alloc, and start init */ |
2860 | dev = kzalloc (sizeof *dev, SLAB_KERNEL); | 2864 | dev = kzalloc (sizeof *dev, GFP_KERNEL); |
2861 | if (dev == NULL){ | 2865 | if (dev == NULL){ |
2862 | retval = -ENOMEM; | 2866 | retval = -ENOMEM; |
2863 | goto done; | 2867 | goto done; |
diff --git a/drivers/usb/gadget/net2280.h b/drivers/usb/gadget/net2280.h index 957d6df34015..44ca139983d8 100644 --- a/drivers/usb/gadget/net2280.h +++ b/drivers/usb/gadget/net2280.h | |||
@@ -110,7 +110,8 @@ struct net2280_ep { | |||
110 | out_overflow : 1, | 110 | out_overflow : 1, |
111 | stopped : 1, | 111 | stopped : 1, |
112 | is_in : 1, | 112 | is_in : 1, |
113 | is_iso : 1; | 113 | is_iso : 1, |
114 | responded : 1; | ||
114 | }; | 115 | }; |
115 | 116 | ||
116 | static inline void allow_status (struct net2280_ep *ep) | 117 | static inline void allow_status (struct net2280_ep *ep) |
diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c index 48a09fd89d18..030d87c28c2f 100644 --- a/drivers/usb/gadget/omap_udc.c +++ b/drivers/usb/gadget/omap_udc.c | |||
@@ -2581,7 +2581,7 @@ omap_udc_setup(struct platform_device *odev, struct otg_transceiver *xceiv) | |||
2581 | /* UDC_PULLUP_EN gates the chip clock */ | 2581 | /* UDC_PULLUP_EN gates the chip clock */ |
2582 | // OTG_SYSCON_1_REG |= DEV_IDLE_EN; | 2582 | // OTG_SYSCON_1_REG |= DEV_IDLE_EN; |
2583 | 2583 | ||
2584 | udc = kzalloc(sizeof(*udc), SLAB_KERNEL); | 2584 | udc = kzalloc(sizeof(*udc), GFP_KERNEL); |
2585 | if (!udc) | 2585 | if (!udc) |
2586 | return -ENOMEM; | 2586 | return -ENOMEM; |
2587 | 2587 | ||
diff --git a/drivers/usb/gadget/pxa2xx_udc.c b/drivers/usb/gadget/pxa2xx_udc.c index 671c24bc6d75..1ed506e95985 100644 --- a/drivers/usb/gadget/pxa2xx_udc.c +++ b/drivers/usb/gadget/pxa2xx_udc.c | |||
@@ -2472,6 +2472,7 @@ static struct pxa2xx_udc memory = { | |||
2472 | #define PXA210_B1 0x00000123 | 2472 | #define PXA210_B1 0x00000123 |
2473 | #define PXA210_B0 0x00000122 | 2473 | #define PXA210_B0 0x00000122 |
2474 | #define IXP425_A0 0x000001c1 | 2474 | #define IXP425_A0 0x000001c1 |
2475 | #define IXP425_B0 0x000001f1 | ||
2475 | #define IXP465_AD 0x00000200 | 2476 | #define IXP465_AD 0x00000200 |
2476 | 2477 | ||
2477 | /* | 2478 | /* |
@@ -2509,6 +2510,7 @@ static int __init pxa2xx_udc_probe(struct platform_device *pdev) | |||
2509 | break; | 2510 | break; |
2510 | #elif defined(CONFIG_ARCH_IXP4XX) | 2511 | #elif defined(CONFIG_ARCH_IXP4XX) |
2511 | case IXP425_A0: | 2512 | case IXP425_A0: |
2513 | case IXP425_B0: | ||
2512 | case IXP465_AD: | 2514 | case IXP465_AD: |
2513 | dev->has_cfr = 1; | 2515 | dev->has_cfr = 1; |
2514 | out_dma = 0; | 2516 | out_dma = 0; |
diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c index 0f809dd68492..40710ea1b490 100644 --- a/drivers/usb/gadget/zero.c +++ b/drivers/usb/gadget/zero.c | |||
@@ -1190,7 +1190,7 @@ autoconf_fail: | |||
1190 | 1190 | ||
1191 | 1191 | ||
1192 | /* ok, we made sense of the hardware ... */ | 1192 | /* ok, we made sense of the hardware ... */ |
1193 | dev = kzalloc(sizeof(*dev), SLAB_KERNEL); | 1193 | dev = kzalloc(sizeof(*dev), GFP_KERNEL); |
1194 | if (!dev) | 1194 | if (!dev) |
1195 | return -ENOMEM; | 1195 | return -ENOMEM; |
1196 | spin_lock_init (&dev->lock); | 1196 | spin_lock_init (&dev->lock); |