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

Merge branch 'for-greg' of master.kernel.org:/pub/scm/linux/kernel/git/balbi/usb into usb-linus

* 'for-greg' of master.kernel.org:/pub/scm/linux/kernel/git/balbi/usb:
  usb: musb: fix oops on musb_gadget_pullup
  usb: host: ehci-omap: fix .remove and failure handling path of .probe(v1)
  usb: gadget: hid: don't STALL when processing a HID Descriptor request
  usb: musb: fix Kconfig
  usb: musb: tusb6010_omap: fix build failure: error: 'musb' undeclared
  usb: gadget: composite: fix bMaxPacketSize for SuperSpeed
  usb: gadget: fusb300: remove #if 0 block
  usb: gadget: s3c2410_udc: fix unterminated platform_device_id table
parents 8e36f79e 72c487df
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -310,7 +310,7 @@ config USB_PXA_U2O
# musb builds in ../musb along with host support
config USB_GADGET_MUSB_HDRC
	tristate "Inventra HDRC USB Peripheral (TI, ADI, ...)"
	depends on USB_MUSB_HDRC && (USB_MUSB_PERIPHERAL || USB_MUSB_OTG)
	depends on USB_MUSB_HDRC
	select USB_GADGET_DUALSPEED
	help
	  This OTG-capable silicon IP is used in dual designs including
+4 −2
Original line number Diff line number Diff line
@@ -1079,11 +1079,13 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
			cdev->desc.bMaxPacketSize0 =
				cdev->gadget->ep0->maxpacket;
			if (gadget_is_superspeed(gadget)) {
				if (gadget->speed >= USB_SPEED_SUPER)
				if (gadget->speed >= USB_SPEED_SUPER) {
					cdev->desc.bcdUSB = cpu_to_le16(0x0300);
				else
					cdev->desc.bMaxPacketSize0 = 9;
				} else {
					cdev->desc.bcdUSB = cpu_to_le16(0x0210);
				}
			}

			value = min(w_length, (u16) sizeof cdev->desc);
			memcpy(req->buf, &cdev->desc, value);
+7 −0
Original line number Diff line number Diff line
@@ -367,6 +367,13 @@ static int hidg_setup(struct usb_function *f,
	case ((USB_DIR_IN | USB_TYPE_STANDARD | USB_RECIP_INTERFACE) << 8
		  | USB_REQ_GET_DESCRIPTOR):
		switch (value >> 8) {
		case HID_DT_HID:
			VDBG(cdev, "USB_REQ_GET_DESCRIPTOR: HID\n");
			length = min_t(unsigned short, length,
						   hidg_desc.bLength);
			memcpy(req->buf, &hidg_desc, length);
			goto respond;
			break;
		case HID_DT_REPORT:
			VDBG(cdev, "USB_REQ_GET_DESCRIPTOR: REPORT\n");
			length = min_t(unsigned short, length,
+0 −101
Original line number Diff line number Diff line
@@ -609,107 +609,6 @@ void fusb300_rdcxf(struct fusb300 *fusb300,
	}
}

#if 0
static void fusb300_dbg_fifo(struct fusb300_ep *ep,
				u8 entry, u16 length)
{
	u32 reg;
	u32 i = 0;
	u32 j = 0;

	reg = ioread32(ep->fusb300->reg + FUSB300_OFFSET_GTM);
	reg &= ~(FUSB300_GTM_TST_EP_ENTRY(0xF) |
		FUSB300_GTM_TST_EP_NUM(0xF) | FUSB300_GTM_TST_FIFO_DEG);
	reg |= (FUSB300_GTM_TST_EP_ENTRY(entry) |
		FUSB300_GTM_TST_EP_NUM(ep->epnum) | FUSB300_GTM_TST_FIFO_DEG);
	iowrite32(reg, ep->fusb300->reg + FUSB300_OFFSET_GTM);

	for (i = 0; i < (length >> 2); i++) {
		if (i * 4 == 1024)
			break;
		reg = ioread32(ep->fusb300->reg +
			FUSB300_OFFSET_BUFDBG_START + i * 4);
		printk(KERN_DEBUG"  0x%-8x", reg);
		j++;
		if ((j % 4)  == 0)
			printk(KERN_DEBUG "\n");
	}

	if (length % 4) {
		reg = ioread32(ep->fusb300->reg +
			FUSB300_OFFSET_BUFDBG_START + i * 4);
		printk(KERN_DEBUG "  0x%x\n", reg);
	}

	if ((j % 4)  != 0)
		printk(KERN_DEBUG "\n");

	fusb300_disable_bit(ep->fusb300, FUSB300_OFFSET_GTM,
		FUSB300_GTM_TST_FIFO_DEG);
}

static void fusb300_cmp_dbg_fifo(struct fusb300_ep *ep,
				u8 entry, u16 length, u8 *golden)
{
	u32 reg;
	u32 i = 0;
	u32 golden_value;
	u8 *tmp;

	tmp = golden;

	printk(KERN_DEBUG "fusb300_cmp_dbg_fifo (entry %d) : start\n", entry);

	reg = ioread32(ep->fusb300->reg + FUSB300_OFFSET_GTM);
	reg &= ~(FUSB300_GTM_TST_EP_ENTRY(0xF) |
		FUSB300_GTM_TST_EP_NUM(0xF) | FUSB300_GTM_TST_FIFO_DEG);
	reg |= (FUSB300_GTM_TST_EP_ENTRY(entry) |
		FUSB300_GTM_TST_EP_NUM(ep->epnum) | FUSB300_GTM_TST_FIFO_DEG);
	iowrite32(reg, ep->fusb300->reg + FUSB300_OFFSET_GTM);

	for (i = 0; i < (length >> 2); i++) {
		if (i * 4 == 1024)
			break;
		golden_value = *tmp | *(tmp + 1) << 8 |
				*(tmp + 2) << 16 | *(tmp + 3) << 24;

		reg = ioread32(ep->fusb300->reg +
			FUSB300_OFFSET_BUFDBG_START + i*4);

		if (reg != golden_value) {
			printk(KERN_DEBUG "0x%x  :  ", (u32)(ep->fusb300->reg +
				FUSB300_OFFSET_BUFDBG_START + i*4));
			printk(KERN_DEBUG "    golden = 0x%x, reg = 0x%x\n",
				golden_value, reg);
		}
		tmp += 4;
	}

	switch (length % 4) {
	case 1:
		golden_value = *tmp;
	case 2:
		golden_value = *tmp | *(tmp + 1) << 8;
	case 3:
		golden_value = *tmp | *(tmp + 1) << 8 | *(tmp + 2) << 16;
	default:
		break;

	reg = ioread32(ep->fusb300->reg + FUSB300_OFFSET_BUFDBG_START + i*4);
	if (reg != golden_value) {
		printk(KERN_DEBUG "0x%x:", (u32)(ep->fusb300->reg +
			FUSB300_OFFSET_BUFDBG_START + i*4));
		printk(KERN_DEBUG "  golden = 0x%x, reg = 0x%x\n",
			golden_value, reg);
	}
	}

	printk(KERN_DEBUG "fusb300_cmp_dbg_fifo : end\n");
	fusb300_disable_bit(ep->fusb300, FUSB300_OFFSET_GTM,
		FUSB300_GTM_TST_FIFO_DEG);
}
#endif

static void fusb300_rdfifo(struct fusb300_ep *ep,
			  struct fusb300_request *req,
			  u32 length)
+1 −0
Original line number Diff line number Diff line
@@ -2060,6 +2060,7 @@ static int s3c2410_udc_resume(struct platform_device *pdev)
static const struct platform_device_id s3c_udc_ids[] = {
	{ "s3c2410-usbgadget", },
	{ "s3c2440-usbgadget", },
	{ }
};
MODULE_DEVICE_TABLE(platform, s3c_udc_ids);

Loading