Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d006b2b6 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB: Storage: Update unusual_devs entry for Datafab KECF-USB
  USB: Correct Makefile to make isp1760 buildable
  USB: option: New mobile broadband modems to be supported
  USB: two more usb ids for ti_usb_3410_5052
  USB: ftdi_sio: unlock_kernel() on error in set_serial_info()
  USB: usb-storage: add Pentax to the bad-vendor list
  USB: ftdi_sio: add support for the NDI Polaris system
  USB: usb-serial: fix the aircable_init failure path
  USB: usb-storage: remove WARN from last-sector hacks
  Revert USB: option: add Pantech cards
  USB: cdc-acm.c: remove duplicate lines for MTK gps support
  USB: fsl_qe_udc: Fix stalled TX requests bug
  USB: fsl_qe_udc: Fix muram corruption by disabled endpoints
  USB: fsl_qe_udc: Fix disconnects reporting during bus reset
  USB: fsl_qe_udc: Fix QE USB controller initialization
  USB: fsl_qe_udc: Fix recursive locking bug in ch9getstatus()
  USB: fsl_qe_udc: Fix oops on QE UDC probe failure
parents 7d167662 049a6acb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ obj-$(CONFIG_USB_MON) += mon/
obj-$(CONFIG_PCI)		+= host/
obj-$(CONFIG_USB_EHCI_HCD)	+= host/
obj-$(CONFIG_USB_ISP116X_HCD)	+= host/
obj-$(CONFIG_USB_ISP1760_HCD)	+= host/
obj-$(CONFIG_USB_OHCI_HCD)	+= host/
obj-$(CONFIG_USB_UHCI_HCD)	+= host/
obj-$(CONFIG_USB_FHCI_HCD)	+= host/
+0 −3
Original line number Diff line number Diff line
@@ -1349,9 +1349,6 @@ static struct usb_device_id acm_ids[] = {
	{ USB_DEVICE(0x0e8d, 0x0003), /* FIREFLY, MediaTek Inc; andrey.arapov@gmail.com */
	.driver_info = NO_UNION_NORMAL, /* has no union descriptor */
	},
	{ USB_DEVICE(0x0e8d, 0x3329), /* i-blue 747, Qstarz BT-Q1000, Holux M-241 */
	.driver_info = NO_UNION_NORMAL, /* has no union descriptor */
	},
	{ USB_DEVICE(0x0e8d, 0x3329), /* MediaTek Inc GPS */
	.driver_info = NO_UNION_NORMAL, /* has no union descriptor */
	},
+36 −10
Original line number Diff line number Diff line
@@ -1622,6 +1622,8 @@ static int qe_ep_disable(struct usb_ep *_ep)
	nuke(ep, -ESHUTDOWN);
	ep->desc = NULL;
	ep->stopped = 1;
	ep->tx_req = NULL;
	qe_ep_reset(udc, ep->epnum);
	spin_unlock_irqrestore(&udc->lock, flags);

	cpm_muram_free(cpm_muram_offset(ep->rxbase));
@@ -1681,14 +1683,11 @@ static void qe_free_request(struct usb_ep *_ep, struct usb_request *_req)
		kfree(req);
}

/* queues (submits) an I/O request to an endpoint */
static int qe_ep_queue(struct usb_ep *_ep, struct usb_request *_req,
				gfp_t gfp_flags)
static int __qe_ep_queue(struct usb_ep *_ep, struct usb_request *_req)
{
	struct qe_ep *ep = container_of(_ep, struct qe_ep, ep);
	struct qe_req *req = container_of(_req, struct qe_req, req);
	struct qe_udc *udc;
	unsigned long flags;
	int reval;

	udc = ep->udc;
@@ -1732,7 +1731,7 @@ static int qe_ep_queue(struct usb_ep *_ep, struct usb_request *_req,
	list_add_tail(&req->queue, &ep->queue);
	dev_vdbg(udc->dev, "gadget have request in %s! %d\n",
			ep->name, req->req.length);
	spin_lock_irqsave(&udc->lock, flags);

	/* push the request to device */
	if (ep_is_in(ep))
		reval = ep_req_send(ep, req);
@@ -1748,11 +1747,24 @@ static int qe_ep_queue(struct usb_ep *_ep, struct usb_request *_req,
	if (ep->dir == USB_DIR_OUT)
		reval = ep_req_receive(ep, req);

	spin_unlock_irqrestore(&udc->lock, flags);

	return 0;
}

/* queues (submits) an I/O request to an endpoint */
static int qe_ep_queue(struct usb_ep *_ep, struct usb_request *_req,
		       gfp_t gfp_flags)
{
	struct qe_ep *ep = container_of(_ep, struct qe_ep, ep);
	struct qe_udc *udc = ep->udc;
	unsigned long flags;
	int ret;

	spin_lock_irqsave(&udc->lock, flags);
	ret = __qe_ep_queue(_ep, _req);
	spin_unlock_irqrestore(&udc->lock, flags);
	return ret;
}

/* dequeues (cancels, unlinks) an I/O request from an endpoint */
static int qe_ep_dequeue(struct usb_ep *_ep, struct usb_request *_req)
{
@@ -2008,7 +2020,7 @@ static void ch9getstatus(struct qe_udc *udc, u8 request_type, u16 value,
	udc->ep0_dir = USB_DIR_IN;

	/* data phase */
	status = qe_ep_queue(&ep->ep, &req->req, GFP_ATOMIC);
	status = __qe_ep_queue(&ep->ep, &req->req);

	if (status == 0)
		return;
@@ -2151,6 +2163,9 @@ static int reset_irq(struct qe_udc *udc)
{
	unsigned char i;

	if (udc->usb_state == USB_STATE_DEFAULT)
		return 0;

	qe_usb_disable();
	out_8(&udc->usb_regs->usb_usadr, 0);

@@ -2442,8 +2457,12 @@ static int __devinit qe_udc_reg_init(struct qe_udc *udc)
	struct usb_ctlr __iomem *qe_usbregs;
	qe_usbregs = udc->usb_regs;

	/* Init the usb register */
	/* Spec says that we must enable the USB controller to change mode. */
	out_8(&qe_usbregs->usb_usmod, 0x01);
	/* Mode changed, now disable it, since muram isn't initialized yet. */
	out_8(&qe_usbregs->usb_usmod, 0x00);

	/* Initialize the rest. */
	out_be16(&qe_usbregs->usb_usbmr, 0);
	out_8(&qe_usbregs->usb_uscom, 0);
	out_be16(&qe_usbregs->usb_usber, USBER_ALL_CLEAR);
@@ -2604,6 +2623,10 @@ static int __devinit qe_udc_probe(struct of_device *ofdev,
			(unsigned long)udc_controller);
	/* request irq and disable DR  */
	udc_controller->usb_irq = irq_of_parse_and_map(np, 0);
	if (!udc_controller->usb_irq) {
		ret = -EINVAL;
		goto err_noirq;
	}

	ret = request_irq(udc_controller->usb_irq, qe_udc_irq, 0,
				driver_name, udc_controller);
@@ -2625,6 +2648,8 @@ static int __devinit qe_udc_probe(struct of_device *ofdev,
err6:
	free_irq(udc_controller->usb_irq, udc_controller);
err5:
	irq_dispose_mapping(udc_controller->usb_irq);
err_noirq:
	if (udc_controller->nullmap) {
		dma_unmap_single(udc_controller->gadget.dev.parent,
			udc_controller->nullp, 256,
@@ -2648,7 +2673,7 @@ static int __devinit qe_udc_probe(struct of_device *ofdev,
	iounmap(udc_controller->usb_regs);
err1:
	kfree(udc_controller);

	udc_controller = NULL;
	return ret;
}

@@ -2710,6 +2735,7 @@ static int __devexit qe_udc_remove(struct of_device *ofdev)
	kfree(ep->txframe);

	free_irq(udc_controller->usb_irq, udc_controller);
	irq_dispose_mapping(udc_controller->usb_irq);

	tasklet_kill(&udc_controller->rx_tasklet);

+2 −2
Original line number Diff line number Diff line
@@ -621,9 +621,9 @@ static int __init aircable_init(void)
		goto failed_usb_register;
	return 0;

failed_serial_register:
	usb_serial_deregister(&aircable_device);
failed_usb_register:
	usb_serial_deregister(&aircable_device);
failed_serial_register:
	return retval;
}

+4 −1
Original line number Diff line number Diff line
@@ -662,6 +662,7 @@ static struct usb_device_id id_table_combined [] = {
	{ USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DUSB_PID) },
	{ USB_DEVICE(ALTI2_VID, ALTI2_N3_PID) },
	{ USB_DEVICE(FTDI_VID, DIEBOLD_BCS_SE923_PID) },
	{ USB_DEVICE(FTDI_VID, FTDI_NDI_HUC_PID) },
	{ },					/* Optional parameter entry */
	{ }					/* Terminating entry */
};
@@ -1064,8 +1065,10 @@ static int set_serial_info(struct tty_struct *tty,

	if (!capable(CAP_SYS_ADMIN)) {
		if (((new_serial.flags & ~ASYNC_USR_MASK) !=
		     (priv->flags & ~ASYNC_USR_MASK)))
		     (priv->flags & ~ASYNC_USR_MASK))) {
			unlock_kernel();
			return -EPERM;
		}
		priv->flags = ((priv->flags & ~ASYNC_USR_MASK) |
			       (new_serial.flags & ASYNC_USR_MASK));
		priv->custom_divisor = new_serial.custom_divisor;
Loading