aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-05-29 11:50:15 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-05-29 11:50:15 -0400
commitb939e414f0dbd7ac8d38da2c7e3a419728229afd (patch)
tree7d54bd66e249fa7432e1eac7ef303049621f7590 /drivers
parentdeeb103412efcf9313e2d1dfe892fed4e372b9e7 (diff)
parent29868b281f6d057b4cbe348f4483f1717c021c5c (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: Revert "USB: Correct Makefile to make isp1760 buildable" usb-serial: fix crash when sub-driver updates firmware USB: isp1760: urb_dequeue doesn't always find the urbs USB: Yet another Conexant Clone to add to cdc-acm.c USB: atmel_usb_udc: Use kzalloc() to allocate ep structures USB: atmel-usba-udc : fix control out requests.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/Makefile1
-rw-r--r--drivers/usb/class/cdc-acm.c3
-rw-r--r--drivers/usb/gadget/atmel_usba_udc.c5
-rw-r--r--drivers/usb/host/isp1760-hcd.c24
-rw-r--r--drivers/usb/serial/usb-serial.c1
5 files changed, 29 insertions, 5 deletions
diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile
index 0716cdb44cd8..0a3dc5ece634 100644
--- a/drivers/usb/Makefile
+++ b/drivers/usb/Makefile
@@ -11,7 +11,6 @@ obj-$(CONFIG_USB_MON) += mon/
11obj-$(CONFIG_PCI) += host/ 11obj-$(CONFIG_PCI) += host/
12obj-$(CONFIG_USB_EHCI_HCD) += host/ 12obj-$(CONFIG_USB_EHCI_HCD) += host/
13obj-$(CONFIG_USB_ISP116X_HCD) += host/ 13obj-$(CONFIG_USB_ISP116X_HCD) += host/
14obj-$(CONFIG_USB_ISP1760_HCD) += host/
15obj-$(CONFIG_USB_OHCI_HCD) += host/ 14obj-$(CONFIG_USB_OHCI_HCD) += host/
16obj-$(CONFIG_USB_UHCI_HCD) += host/ 15obj-$(CONFIG_USB_UHCI_HCD) += host/
17obj-$(CONFIG_USB_FHCI_HCD) += host/ 16obj-$(CONFIG_USB_FHCI_HCD) += host/
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 0a69c0977e3f..7a1164dd1d37 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -1375,6 +1375,9 @@ static struct usb_device_id acm_ids[] = {
1375 { USB_DEVICE(0x0572, 0x1324), /* Conexant USB MODEM RD02-D400 */ 1375 { USB_DEVICE(0x0572, 0x1324), /* Conexant USB MODEM RD02-D400 */
1376 .driver_info = NO_UNION_NORMAL, /* has no union descriptor */ 1376 .driver_info = NO_UNION_NORMAL, /* has no union descriptor */
1377 }, 1377 },
1378 { USB_DEVICE(0x0572, 0x1328), /* Shiro / Aztech USB MODEM UM-3100 */
1379 .driver_info = NO_UNION_NORMAL, /* has no union descriptor */
1380 },
1378 { USB_DEVICE(0x22b8, 0x6425), /* Motorola MOTOMAGX phones */ 1381 { USB_DEVICE(0x22b8, 0x6425), /* Motorola MOTOMAGX phones */
1379 }, 1382 },
1380 { USB_DEVICE(0x0572, 0x1329), /* Hummingbird huc56s (Conexant) */ 1383 { USB_DEVICE(0x0572, 0x1329), /* Hummingbird huc56s (Conexant) */
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c
index 563d57275448..05c913cc3658 100644
--- a/drivers/usb/gadget/atmel_usba_udc.c
+++ b/drivers/usb/gadget/atmel_usba_udc.c
@@ -794,7 +794,8 @@ usba_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
794 if (ep->desc) { 794 if (ep->desc) {
795 list_add_tail(&req->queue, &ep->queue); 795 list_add_tail(&req->queue, &ep->queue);
796 796
797 if (ep->is_in || (ep_is_control(ep) 797 if ((!ep_is_control(ep) && ep->is_in) ||
798 (ep_is_control(ep)
798 && (ep->state == DATA_STAGE_IN 799 && (ep->state == DATA_STAGE_IN
799 || ep->state == STATUS_STAGE_IN))) 800 || ep->state == STATUS_STAGE_IN)))
800 usba_ep_writel(ep, CTL_ENB, USBA_TX_PK_RDY); 801 usba_ep_writel(ep, CTL_ENB, USBA_TX_PK_RDY);
@@ -1940,7 +1941,7 @@ static int __init usba_udc_probe(struct platform_device *pdev)
1940 usba_writel(udc, CTRL, USBA_DISABLE_MASK); 1941 usba_writel(udc, CTRL, USBA_DISABLE_MASK);
1941 clk_disable(pclk); 1942 clk_disable(pclk);
1942 1943
1943 usba_ep = kmalloc(sizeof(struct usba_ep) * pdata->num_ep, 1944 usba_ep = kzalloc(sizeof(struct usba_ep) * pdata->num_ep,
1944 GFP_KERNEL); 1945 GFP_KERNEL);
1945 if (!usba_ep) 1946 if (!usba_ep)
1946 goto err_alloc_ep; 1947 goto err_alloc_ep;
diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c
index cd07ea3f0c63..15438469f21a 100644
--- a/drivers/usb/host/isp1760-hcd.c
+++ b/drivers/usb/host/isp1760-hcd.c
@@ -1658,6 +1658,7 @@ static int isp1760_urb_dequeue(struct usb_hcd *hcd, struct urb *urb,
1658 u32 reg_base, or_reg, skip_reg; 1658 u32 reg_base, or_reg, skip_reg;
1659 unsigned long flags; 1659 unsigned long flags;
1660 struct ptd ptd; 1660 struct ptd ptd;
1661 packet_enqueue *pe;
1661 1662
1662 switch (usb_pipetype(urb->pipe)) { 1663 switch (usb_pipetype(urb->pipe)) {
1663 case PIPE_ISOCHRONOUS: 1664 case PIPE_ISOCHRONOUS:
@@ -1669,6 +1670,7 @@ static int isp1760_urb_dequeue(struct usb_hcd *hcd, struct urb *urb,
1669 reg_base = INT_REGS_OFFSET; 1670 reg_base = INT_REGS_OFFSET;
1670 or_reg = HC_INT_IRQ_MASK_OR_REG; 1671 or_reg = HC_INT_IRQ_MASK_OR_REG;
1671 skip_reg = HC_INT_PTD_SKIPMAP_REG; 1672 skip_reg = HC_INT_PTD_SKIPMAP_REG;
1673 pe = enqueue_an_INT_packet;
1672 break; 1674 break;
1673 1675
1674 default: 1676 default:
@@ -1676,6 +1678,7 @@ static int isp1760_urb_dequeue(struct usb_hcd *hcd, struct urb *urb,
1676 reg_base = ATL_REGS_OFFSET; 1678 reg_base = ATL_REGS_OFFSET;
1677 or_reg = HC_ATL_IRQ_MASK_OR_REG; 1679 or_reg = HC_ATL_IRQ_MASK_OR_REG;
1678 skip_reg = HC_ATL_PTD_SKIPMAP_REG; 1680 skip_reg = HC_ATL_PTD_SKIPMAP_REG;
1681 pe = enqueue_an_ATL_packet;
1679 break; 1682 break;
1680 } 1683 }
1681 1684
@@ -1687,6 +1690,7 @@ static int isp1760_urb_dequeue(struct usb_hcd *hcd, struct urb *urb,
1687 u32 skip_map; 1690 u32 skip_map;
1688 u32 or_map; 1691 u32 or_map;
1689 struct isp1760_qtd *qtd; 1692 struct isp1760_qtd *qtd;
1693 struct isp1760_qh *qh = ints->qh;
1690 1694
1691 skip_map = isp1760_readl(hcd->regs + skip_reg); 1695 skip_map = isp1760_readl(hcd->regs + skip_reg);
1692 skip_map |= 1 << i; 1696 skip_map |= 1 << i;
@@ -1699,8 +1703,7 @@ static int isp1760_urb_dequeue(struct usb_hcd *hcd, struct urb *urb,
1699 priv_write_copy(priv, (u32 *)&ptd, hcd->regs + reg_base 1703 priv_write_copy(priv, (u32 *)&ptd, hcd->regs + reg_base
1700 + i * sizeof(ptd), sizeof(ptd)); 1704 + i * sizeof(ptd), sizeof(ptd));
1701 qtd = ints->qtd; 1705 qtd = ints->qtd;
1702 1706 qtd = clean_up_qtdlist(qtd);
1703 clean_up_qtdlist(qtd);
1704 1707
1705 free_mem(priv, ints->payload); 1708 free_mem(priv, ints->payload);
1706 1709
@@ -1711,7 +1714,24 @@ static int isp1760_urb_dequeue(struct usb_hcd *hcd, struct urb *urb,
1711 ints->payload = 0; 1714 ints->payload = 0;
1712 1715
1713 isp1760_urb_done(priv, urb, status); 1716 isp1760_urb_done(priv, urb, status);
1717 if (qtd)
1718 pe(hcd, qh, qtd);
1714 break; 1719 break;
1720
1721 } else if (ints->qtd) {
1722 struct isp1760_qtd *qtd, *prev_qtd = ints->qtd;
1723
1724 for (qtd = ints->qtd->hw_next; qtd; qtd = qtd->hw_next) {
1725 if (qtd->urb == urb) {
1726 prev_qtd->hw_next = clean_up_qtdlist(qtd);
1727 isp1760_urb_done(priv, urb, status);
1728 break;
1729 }
1730 prev_qtd = qtd;
1731 }
1732 /* we found the urb before the end of the list */
1733 if (qtd)
1734 break;
1715 } 1735 }
1716 ints++; 1736 ints++;
1717 } 1737 }
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 0a566eea49c0..f331e2bde88a 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -974,6 +974,7 @@ int usb_serial_probe(struct usb_interface *interface,
974 if (retval > 0) { 974 if (retval > 0) {
975 /* quietly accept this device, but don't bind to a 975 /* quietly accept this device, but don't bind to a
976 serial port as it's about to disappear */ 976 serial port as it's about to disappear */
977 serial->num_ports = 0;
977 goto exit; 978 goto exit;
978 } 979 }
979 } 980 }