Skip to contentSkip to conversation

USB: g_dnl: Change device class

PATCH New John Tobias 3 participants 5 messages Apr 7, 2016 – Apr 11, 2016 USB

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 USB: g_dnl: Change device class

The USB Mass Storage (ums) works in Windows, Linux and OS X (EL Capitan). But, not in OS X (Yosemite). By applying the said patch, it extends the ums support.

---
 drivers/usb/gadget/g_dnl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/gadget/g_dnl.c +2 -2
index 2fa6da4..bd3aad9 100644
@@ -58,8 +58,8 @@ static struct usb_device_descriptor device_desc = {
 	.bDescriptorType = USB_DT_DEVICE,
 
 	.bcdUSB = __constant_cpu_to_le16(0x0200),
-	.bDeviceClass = USB_CLASS_COMM,
-	.bDeviceSubClass = 0x02, /*0x02:CDC-modem , 0x00:CDC-serial*/
+	.bDeviceClass = USB_CLASS_PER_INTERFACE,
+	.bDeviceSubClass = 0, /*0x02:CDC-modem , 0x00:CDC-serial*/
 
 	.idVendor = __constant_cpu_to_le16(CONFIG_G_DNL_VENDOR_NUM),
 	.idProduct = __constant_cpu_to_le16(CONFIG_G_DNL_PRODUCT_NUM),
Signature · 1 line
2.8.1
#1 lore raw

PATCH 1/1 USB: g_dnl: Change device class

Hi John,

Quoted 14 lines

The USB Mass Storage (ums) works in Windows, Linux and OS X (EL Capitan). But, not in OS X (Yosemite). By applying the said patch, it extends the ums support.

---
 drivers/usb/gadget/g_dnl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/gadget/g_dnl.c +0 -0
index 2fa6da4..bd3aad9 100644

drivers/usb/gadget/g_dnl.c static struct usb_device_descriptor device_desc = { · line 62

Quoted 7 lines
drivers/usb/gadget/g_dnl.c +2 -2
@@ -58,8 +58,8 @@ static struct usb_device_descriptor device_desc = {
 	.bDescriptorType = USB_DT_DEVICE,
 
 	.bcdUSB = __constant_cpu_to_le16(0x0200),
-	.bDeviceClass = USB_CLASS_COMM,
-	.bDeviceSubClass = 0x02, /*0x02:CDC-modem , 0x00:CDC-serial*/
+	.bDeviceClass = USB_CLASS_PER_INTERFACE,
+	.bDeviceSubClass = 0, /*0x02:CDC-modem , 0x00:CDC-serial*/

Have you tested if this patch is not introducing any regression on Linux and Windows?

Quoted 4 lines
drivers/usb/gadget/g_dnl.c +0 -0
 	.idVendor = __constant_cpu_to_le16(CONFIG_G_DNL_VENDOR_NUM),
 	.idProduct =
 __constant_cpu_to_le16(CONFIG_G_DNL_PRODUCT_NUM),
Signature · 5 lines
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
#2 lore raw

PATCH 1/1 USB: g_dnl: Change device class

Hi Lukas,

Quoted 18 lines · Lukasz Majewski

Hi John,

Quoted 16 lines

The USB Mass Storage (ums) works in Windows, Linux and OS X (EL Capitan). But, not in OS X (Yosemite). By applying the said patch, it extends the ums support.

---
 drivers/usb/gadget/g_dnl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/gadget/g_dnl.c +0 -0
index 2fa6da4..bd3aad9 100644
@@ -58,8 +58,8 @@ static struct usb_device_descriptor device_desc = {
      .bDescriptorType = USB_DT_DEVICE,
 
Quoted 9 lines

drivers/usb/gadget/g_dnl.c static struct usb_device_descriptor device_desc = { · line 62

Quoted 5 lines
drivers/usb/gadget/g_dnl.c +2 -2
      .bcdUSB = __constant_cpu_to_le16(0x0200),
-     .bDeviceClass = USB_CLASS_COMM,
-     .bDeviceSubClass = 0x02, /*0x02:CDC-modem , 0x00:CDC-serial*/
+     .bDeviceClass = USB_CLASS_PER_INTERFACE,
+     .bDeviceSubClass = 0, /*0x02:CDC-modem , 0x00:CDC-serial*/

Have you tested if this patch is not introducing any regression on Linux and Windows?

The test what I did is like this:

Linux:
- Run ums to expose all my eMMC partition - shows all correctly
- Run ums to expose only 1 partition of my eMMC - show correctly

Windows:
- Run ums to expose all my eMMC partition - it detects but it prompts,
if I want to format it (due to a non windows partition)
- Run ums to expose only the FAT32 partition - it show the partition
correctly.

Note: I have a patch to expose only 1 partition:
e.g: ums 0 mmc 1:8

Quoted 8 lines

drivers/usb/gadget/g_dnl.c static struct usb_device_descriptor device_desc = { · line 65

Quoted 5 lines
drivers/usb/gadget/g_dnl.c +0 -0
      .idVendor = __constant_cpu_to_le16(CONFIG_G_DNL_VENDOR_NUM),
      .idProduct =
 __constant_cpu_to_le16(CONFIG_G_DNL_PRODUCT_NUM),
Quoted 7 lines

--
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group

Regards,

John

#3 lore raw

PATCH 1/1 USB: g_dnl: Change device class

Quoted 41 lines · On Fri, 8 Apr 2016 08:41:14 -0700 John Tobias <[email protected]> wrote:

Hi Lukas,

Quoted 18 lines · Lukasz Majewski

Hi John,

Quoted 16 lines

The USB Mass Storage (ums) works in Windows, Linux and OS X (EL Capitan). But, not in OS X (Yosemite). By applying the said patch, it extends the ums support.

---
 drivers/usb/gadget/g_dnl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/drivers/usb/gadget/g_dnl.c index 2fa6da4..bd3aad9 100644

drivers/usb/gadget/g_dnl.c +0 -0
@@ -58,8 +58,8 @@ static struct usb_device_descriptor device_desc
 = { .bDescriptorType = USB_DT_DEVICE,
 
Quoted 10 lines

drivers/usb/gadget/g_dnl.c static struct usb_device_descriptor device_desc = { · line 62

Quoted 6 lines
drivers/usb/gadget/g_dnl.c +0 -2
      .bcdUSB = __constant_cpu_to_le16(0x0200),
-     .bDeviceClass = USB_CLASS_COMM,
-     .bDeviceSubClass = 0x02, /*0x02:CDC-modem ,

0x00:CDC-serial*/

drivers/usb/gadget/g_dnl.c +2 -0
+     .bDeviceClass = USB_CLASS_PER_INTERFACE,
+     .bDeviceSubClass = 0, /*0x02:CDC-modem , 0x00:CDC-serial*/

Have you tested if this patch is not introducing any regression on Linux and Windows?

The test what I did is like this:

Linux:
- Run ums to expose all my eMMC partition - shows all correctly
- Run ums to expose only 1 partition of my eMMC - show correctly

Quoted 6 lines

Windows:
- Run ums to expose all my eMMC partition - it detects but it
prompts, if I want to format it (due to a non windows partition)
- Run ums to expose only the FAT32 partition - it show the
partition correctly.

Ok, I see. Thanks for your effort on testing. I do appreciate it.

Quoted 3 lines

Note: I have a patch to expose only 1 partition:
e.g: ums 0 mmc 1:8

Yes, I've just received it. I will provide feedback shortly.

Quoted 18 lines
Quoted 10 lines
Quoted 7 lines



      .idVendor = __constant_cpu_to_le16(CONFIG_G_DNL_VENDOR_NUM),
      .idProduct =

__constant_cpu_to_le16(CONFIG_G_DNL_PRODUCT_NUM),

Quoted 7 lines

--
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group

Quoted 7 lines

Regards,

John
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160408/ab9e0bea/attachment.sig>

#4 lore raw

PATCH 1/1 USB: g_dnl: Change device class

In reply to John Tobias

Hi John,

Quoted 5 lines

The USB Mass Storage (ums) works in Windows, Linux and OS X (EL Capitan). But, not in OS X (Yosemite). By applying the said patch, it extends the ums support.

Test HW: Odroid XU3 with test/py for UMS, DFU

Applied to u-boot-dfu branch

Signature · 5 lines
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group