diff mbox

[2/3] usb: change VID/PID for usb-hub and usb-msd to prevent conflict

Message ID 1320159390-29797-3-git-send-email-kraxel@redhat.com
State New
Headers show

Commit Message

Gerd Hoffmann Nov. 1, 2011, 2:56 p.m. UTC
From: Roy Tam <roytam@gmail.com>

Some USB drivers, for example USBASPI.SYS, will skip different type of
device which has same VID/PID. The following patch helps preventing
usb-msd being skipped by the driver.

Sign-off-by: Roy Tam <roytam@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/usb-hub.c |    4 ++--
 hw/usb-msd.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

Comments

Andreas Färber Nov. 1, 2011, 3:29 p.m. UTC | #1
Am 01.11.2011 15:56, schrieb Gerd Hoffmann:
> From: Roy Tam <roytam@gmail.com>
> 
> Some USB drivers, for example USBASPI.SYS, will skip different type of
> device which has same VID/PID. The following patch helps preventing
> usb-msd being skipped by the driver.
> 

> Sign-off-by: Roy Tam <roytam@gmail.com>

Typo?

Andreas

> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  hw/usb-hub.c |    4 ++--
>  hw/usb-msd.c |    4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/hw/usb-hub.c b/hw/usb-hub.c
> index 7b47079..3eb0f1a 100644
> --- a/hw/usb-hub.c
> +++ b/hw/usb-hub.c
> @@ -127,8 +127,8 @@ static const USBDescDevice desc_device_hub = {
>  
>  static const USBDesc desc_hub = {
>      .id = {
> -        .idVendor          = 0,
> -        .idProduct         = 0,
> +        .idVendor          = 0x0409,
> +        .idProduct         = 0x55aa,
>          .bcdDevice         = 0x0101,
>          .iManufacturer     = STR_MANUFACTURER,
>          .iProduct          = STR_PRODUCT,
> diff --git a/hw/usb-msd.c b/hw/usb-msd.c
> index 1a0815a..b734177 100644
> --- a/hw/usb-msd.c
> +++ b/hw/usb-msd.c
> @@ -162,8 +162,8 @@ static const USBDescDevice desc_device_high = {
>  
>  static const USBDesc desc = {
>      .id = {
> -        .idVendor          = 0,
> -        .idProduct         = 0,
> +        .idVendor          = 0x46f4, /* CRC16() of "QEMU" */
> +        .idProduct         = 0x0001,
>          .bcdDevice         = 0,
>          .iManufacturer     = STR_MANUFACTURER,
>          .iProduct          = STR_PRODUCT,
Gerd Hoffmann Nov. 1, 2011, 3:40 p.m. UTC | #2
On 11/01/11 16:29, Andreas Färber wrote:
> Am 01.11.2011 15:56, schrieb Gerd Hoffmann:
>> From: Roy Tam <roytam@gmail.com>
>>
>> Some USB drivers, for example USBASPI.SYS, will skip different type of
>> device which has same VID/PID. The following patch helps preventing
>> usb-msd being skipped by the driver.
>>
> 
>> Sign-off-by: Roy Tam <roytam@gmail.com>
> 
> Typo?

Yea.  Updated comment, pushed to the same location.

thanks,
  Gerd
diff mbox

Patch

diff --git a/hw/usb-hub.c b/hw/usb-hub.c
index 7b47079..3eb0f1a 100644
--- a/hw/usb-hub.c
+++ b/hw/usb-hub.c
@@ -127,8 +127,8 @@  static const USBDescDevice desc_device_hub = {
 
 static const USBDesc desc_hub = {
     .id = {
-        .idVendor          = 0,
-        .idProduct         = 0,
+        .idVendor          = 0x0409,
+        .idProduct         = 0x55aa,
         .bcdDevice         = 0x0101,
         .iManufacturer     = STR_MANUFACTURER,
         .iProduct          = STR_PRODUCT,
diff --git a/hw/usb-msd.c b/hw/usb-msd.c
index 1a0815a..b734177 100644
--- a/hw/usb-msd.c
+++ b/hw/usb-msd.c
@@ -162,8 +162,8 @@  static const USBDescDevice desc_device_high = {
 
 static const USBDesc desc = {
     .id = {
-        .idVendor          = 0,
-        .idProduct         = 0,
+        .idVendor          = 0x46f4, /* CRC16() of "QEMU" */
+        .idProduct         = 0x0001,
         .bcdDevice         = 0,
         .iManufacturer     = STR_MANUFACTURER,
         .iProduct          = STR_PRODUCT,