Re: [PATCH 2/2 v3] usb:gadget:dummy_hcd : Detect port and link state correctly to avoid unreachable code

2013-09-01 Thread Alan Stern
On Sun, 1 Sep 2013, Philippe De Swert wrote: > Since USB_SS_PORT_LS_U0 is 0x the & operation with the port state would > always be 0. Thus the if would never be true. Moreover USB_PORT_STAT_ENABLE > is 0x0002 and as such would never equal to 1. What we actually look for is a > port that is ena

[PATCH 2/2 v3] usb:gadget:dummy_hcd : Detect port and link state correctly to avoid unreachable code

2013-09-01 Thread Philippe De Swert
Since USB_SS_PORT_LS_U0 is 0x the & operation with the port state would always be 0. Thus the if would never be true. Moreover USB_PORT_STAT_ENABLE is 0x0002 and as such would never equal to 1. What we actually look for is a port that is enabled and in U0/link active state. Thanks to Alan Ster