RE: [PATCH 3/3] usb: gadget: g_ncm added

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Yauheni,

Patch heading says g_ncm, but file name is ncm.c. What was the
intention/correct file name?

> +/* Thanks to NetChip Technologies for donating this product ID.
> + * It's for devices with only CDC Ethernet configurations.
> + */
> +#define CDC_VENDOR_NUM		0x0525	/* NetChip */
> +#define CDC_PRODUCT_NUM		0xa4a1	/* Linux-USB Ethernet
> Gadget */

Could we use Linux Foundation USB Vendor ID instead of NetChip?
I hope Greg could allocate a new PID for ncm gadget.

> +static struct usb_configuration ncm_config_driver = {
> +	/* .label = f(hardware) */
> +	.label			= "CDC Ethernet (NCM)",
> +	.bConfigurationValue	= 1,
> +	/* .iConfiguration = DYNAMIC */
> +	.bmAttributes		= USB_CONFIG_ATT_SELFPOWER,

Not all devices would be self powered (for example, USB dongle). Is it
possible to make configuration option or should other implementation 
simply edit this file to suit the need?

> +
> +	gcnum = usb_gadget_controller_number(gadget);
> +	if (gcnum >= 0)
> +		device_desc.bcdDevice = cpu_to_le16(0x0300 | gcnum);
...
> +		dev_warn(&gadget->dev,
> +			 "controller '%s' not recognized; trying %s\n",
> +			 gadget->name,
> +			 ncm_config_driver.label);
> +		device_desc.bcdDevice =
> +			cpu_to_le16(0x0300 | 0x0099);

What is the meaning of the magic number 0x0300/0x0099?
Could you make/use #define instead?

Regards,
Alexey
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux