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

Commit 13557b5d authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'fixes-for-v4.1-rc5' of...

Merge tag 'fixes-for-v4.1-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb

 into usb-linus

Felipe writes:

usb: fixes for v4.1-rc5

A few late important fixes which have been pending
on mailing list due to my vacations.

The important fixes are a fix for DEPCMD and DGCMD
status bitfields on DWC3, a couple fixes for Renesas
USB Controller, one of which prevents a broken DT
binding from reaching v4.1-final, and an old fix for
s3c2410-udc where pullup logic was reversed.

Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parents 4bc5d3bb 93fb9127
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -15,10 +15,8 @@ Optional properties:
  - phys: phandle + phy specifier pair
  - phy-names: must be "usb"
  - dmas: Must contain a list of references to DMA specifiers.
  - dma-names : Must contain a list of DMA names:
   - tx0 ... tx<n>
   - rx0 ... rx<n>
    - This <n> means DnFIFO in USBHS module.
  - dma-names : named "ch%d", where %d is the channel number ranging from zero
                to the number of channels (DnFIFOs) minus one.

Example:
	usbhs: usb@e6590000 {
+2 −2
Original line number Diff line number Diff line
@@ -339,7 +339,7 @@
#define DWC3_DGCMD_SET_ENDPOINT_NRDY	0x0c
#define DWC3_DGCMD_RUN_SOC_BUS_LOOPBACK	0x10

#define DWC3_DGCMD_STATUS(n)		(((n) >> 15) & 1)
#define DWC3_DGCMD_STATUS(n)		(((n) >> 12) & 0x0F)
#define DWC3_DGCMD_CMDACT		(1 << 10)
#define DWC3_DGCMD_CMDIOC		(1 << 8)

@@ -355,7 +355,7 @@
#define DWC3_DEPCMD_PARAM_SHIFT		16
#define DWC3_DEPCMD_PARAM(x)		((x) << DWC3_DEPCMD_PARAM_SHIFT)
#define DWC3_DEPCMD_GET_RSC_IDX(x)	(((x) >> DWC3_DEPCMD_PARAM_SHIFT) & 0x7f)
#define DWC3_DEPCMD_STATUS(x)		(((x) >> 15) & 1)
#define DWC3_DEPCMD_STATUS(x)		(((x) >> 12) & 0x0F)
#define DWC3_DEPCMD_HIPRI_FORCERM	(1 << 11)
#define DWC3_DEPCMD_CMDACT		(1 << 10)
#define DWC3_DEPCMD_CMDIOC		(1 << 8)
+9 −6
Original line number Diff line number Diff line
@@ -315,7 +315,6 @@ static ssize_t ffs_ep0_write(struct file *file, const char __user *buf,
				return ret;
			}

			set_bit(FFS_FL_CALL_CLOSED_CALLBACK, &ffs->flags);
			return len;
		}
		break;
@@ -847,7 +846,7 @@ static ssize_t ffs_epfile_io(struct file *file, struct ffs_io_data *io_data)
				ret = ep->status;
				if (io_data->read && ret > 0) {
					ret = copy_to_iter(data, ret, &io_data->data);
					if (unlikely(iov_iter_count(&io_data->data)))
					if (!ret)
						ret = -EFAULT;
				}
			}
@@ -1463,7 +1462,6 @@ static void ffs_data_clear(struct ffs_data *ffs)
{
	ENTER();

	if (test_and_clear_bit(FFS_FL_CALL_CLOSED_CALLBACK, &ffs->flags))
	ffs_closed(ffs);

	BUG_ON(ffs->gadget);
@@ -3422,9 +3420,13 @@ static int ffs_ready(struct ffs_data *ffs)
	ffs_obj->desc_ready = true;
	ffs_obj->ffs_data = ffs;

	if (ffs_obj->ffs_ready_callback)
	if (ffs_obj->ffs_ready_callback) {
		ret = ffs_obj->ffs_ready_callback(ffs);
		if (ret)
			goto done;
	}

	set_bit(FFS_FL_CALL_CLOSED_CALLBACK, &ffs->flags);
done:
	ffs_dev_unlock();
	return ret;
@@ -3443,7 +3445,8 @@ static void ffs_closed(struct ffs_data *ffs)

	ffs_obj->desc_ready = false;

	if (ffs_obj->ffs_closed_callback)
	if (test_and_clear_bit(FFS_FL_CALL_CLOSED_CALLBACK, &ffs->flags) &&
	    ffs_obj->ffs_closed_callback)
		ffs_obj->ffs_closed_callback(ffs);

	if (!ffs_obj->opts || ffs_obj->opts->no_configfs
+7 −1
Original line number Diff line number Diff line
@@ -973,7 +973,13 @@ static ssize_t f_midi_opts_id_show(struct f_midi_opts *opts, char *page)
	int result;

	mutex_lock(&opts->lock);
	if (opts->id) {
		result = strlcpy(page, opts->id, PAGE_SIZE);
	} else {
		page[0] = 0;
		result = 0;
	}

	mutex_unlock(&opts->lock);

	return result;
+4 −1
Original line number Diff line number Diff line
@@ -588,7 +588,10 @@ static int f_audio_set_alt(struct usb_function *f, unsigned intf, unsigned alt)

	if (intf == 1) {
		if (alt == 1) {
			config_ep_by_speed(cdev->gadget, f, out_ep);
			err = config_ep_by_speed(cdev->gadget, f, out_ep);
			if (err)
				return err;

			usb_ep_enable(out_ep);
			out_ep->driver_data = audio;
			audio->copy_buf = f_audio_buffer_alloc(audio_buf_size);
Loading