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

Commit 41c8a48a authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'fixes-for-v3.4-rc5' of...

Merge tag 'fixes-for-v3.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus

usb: fixes for v3.4-rc cycle

A few more fixes for v3.4-rc cycle.

It includes a couple of fixes to the ordering of the methods in udc-core.c.
Without these two patches, we will have issues when either unregistering a
gadget driver (triggered with dummy_hcd only) or issuing a device-initiated
disconnect through sysfs.

There's also a fix on dummy_hcd to not call ->pullup() from udc_stop() because
udc-core.c already handles that.

A fix to MUSB as promised, to kill the compile warnings regarding deprecated
interfaces. We are essentially dropping the __deprecated flag because it
doesn't look like we will ever be able to live without it when we consider the
amount of silicon issues we find on different MUSB instantiations.

A couple of other fixes are also available, one adding the missing transceiver
events to gpio_vbus and another adding a missing unregister call to MUSB's
davinci glue layer.
parents 5c22837a 320cd1e7
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -927,7 +927,6 @@ static int dummy_udc_stop(struct usb_gadget *g,

	dum->driver = NULL;

	dummy_pullup(&dum->gadget, 0);
	return 0;
}

+1 −1
Original line number Diff line number Diff line
@@ -2189,7 +2189,7 @@ unknown_cmnd:
		common->data_size_from_cmnd = 0;
		sprintf(unknown, "Unknown x%02x", common->cmnd[0]);
		reply = check_command(common, common->cmnd_size,
				      DATA_DIR_UNKNOWN, 0xff, 0, unknown);
				      DATA_DIR_UNKNOWN, ~0, 0, unknown);
		if (reply == 0) {
			common->curlun->sense_data = SS_INVALID_COMMAND;
			reply = -EINVAL;
+1 −1
Original line number Diff line number Diff line
@@ -2579,7 +2579,7 @@ static int do_scsi_command(struct fsg_dev *fsg)
		fsg->data_size_from_cmnd = 0;
		sprintf(unknown, "Unknown x%02x", fsg->cmnd[0]);
		if ((reply = check_command(fsg, fsg->cmnd_size,
				DATA_DIR_UNKNOWN, 0xff, 0, unknown)) == 0) {
				DATA_DIR_UNKNOWN, ~0, 0, unknown)) == 0) {
			fsg->curlun->sense_data = SS_INVALID_COMMAND;
			reply = -EINVAL;
		}
+2 −2
Original line number Diff line number Diff line
@@ -263,8 +263,8 @@ static void usb_gadget_remove_driver(struct usb_udc *udc)

	if (udc_is_newstyle(udc)) {
		udc->driver->disconnect(udc->gadget);
		udc->driver->unbind(udc->gadget);
		usb_gadget_disconnect(udc->gadget);
		udc->driver->unbind(udc->gadget);
		usb_gadget_udc_stop(udc->gadget, udc->driver);
	} else {
		usb_gadget_stop(udc->gadget, udc->driver);
@@ -415,9 +415,9 @@ static ssize_t usb_udc_softconn_store(struct device *dev,
			usb_gadget_udc_start(udc->gadget, udc->driver);
		usb_gadget_connect(udc->gadget);
	} else if (sysfs_streq(buf, "disconnect")) {
		usb_gadget_disconnect(udc->gadget);
		if (udc_is_newstyle(udc))
			usb_gadget_udc_stop(udc->gadget, udc->driver);
		usb_gadget_disconnect(udc->gadget);
	} else {
		dev_err(dev, "unsupported command '%s'\n", buf);
		return -EINVAL;
+2 −1
Original line number Diff line number Diff line
@@ -386,7 +386,7 @@ static int davinci_musb_init(struct musb *musb)
	usb_nop_xceiv_register();
	musb->xceiv = usb_get_transceiver();
	if (!musb->xceiv)
		return -ENODEV;
		goto unregister;

	musb->mregs += DAVINCI_BASE_OFFSET;

@@ -444,6 +444,7 @@ static int davinci_musb_init(struct musb *musb)

fail:
	usb_put_transceiver(musb->xceiv);
unregister:
	usb_nop_xceiv_unregister();
	return -ENODEV;
}
Loading