Replying to include I had with someone at synopsys, edited to remove their info as I don't think their email is public. > Hi Hal, > > Could you please apply this patch ([PATCH] usb: dwc2: Fix host exit from > hibernation flow.) from linux-usb mailing list. > > Let me know if this patch doesn't fix your issue. > > Regards, And what I sent back: > Hi, > > The patch did not fix my issue. > I don't think dwc2_host_enter_hibernation() is to blame, as it is never > called in any of my tests. > _dwc2_hcd_suspend() gets called, calling dwc2_enter_partial_power_down() > which calls the register backup functions. > After that, there are no more debug messages that refer to that > hsotg->dev until I plug a flash drive into the corresponding port. > When it is plugged in, I know dwc2_handle_common_inter() is called to > handle an interrupt, which calls dwc2_read_common_intr(), which prints > the > first of these two lines. > >>> dwc2 ff580000.usb: gintsts=40000001 gintmsk=f0000000 >>> dwc2 ff580000.usb: Session request interrupt - lx_state=2 > Because gintsts=40000001 or gintsts=01000000000000000000000000000001 > dwc2_handle_common_inter() calls dwc2_handle_session_req_intr() > > if (gintsts & GINTSTS_SESSREQINT) > dwc2_handle_session_req_intr(hsotg); > > which prints the second line, then returns as the controller is not in > device mode. dwc2_handle_common_inter() leaving the usb device in a > limbo state. > > > without the commit I specified in my original message, this is what > plugging in a flash drive to the same port looks like: > > [ 32.745159] dwc2 ff580000.usb: gintsts=05000021 gintmsk=f3000806 > [ 32.749192] dwc2 ff580000.usb: find > [ 32.856474] dwc2 ff580000.usb: SetPortFeature > [ 32.856533] dwc2 ff580000.usb: SetPortFeature - USB_PORT_FEAT_RESET > [ 32.856585] dwc2 ff580000.usb: In host mode, hprt0=00021501 > [ 32.908063] dwc2 ff580000.usb: gintsts=05000021 gintmsk=f3000806 > [ 32.959694] dwc2 ff580000.usb: DWC OTG HCD HUB STATUS DATA: Root port > status changed > [ 32.959748] dwc2 ff580000.usb: port_connect_status_change: 0 > [ 32.959770] dwc2 ff580000.usb: port_reset_change: 1 > [ 32.959790] dwc2 ff580000.usb: port_enable_change: 0 > [ 32.959808] dwc2 ff580000.usb: port_suspend_change: 0 > [ 32.959827] dwc2 ff580000.usb: port_over_current_change: 0 > [ 32.970274] dwc2 ff580000.usb: ClearPortFeature USB_PORT_FEAT_C_RESET > [ 33.021709] usb 2-1: new high-speed USB device number 2 using dwc2 > [ 33.024098] dwc2 ff580000.usb: SetPortFeature > [ 33.024109] dwc2 ff580000.usb: SetPortFeature - USB_PORT_FEAT_RESET > [ 33.024119] dwc2 ff580000.usb: In host mode, hprt0=00001101 > [ 33.024134] dwc2 ff580000.usb: gintsts=05000029 gintmsk=f3000806 > [ 33.076237] dwc2 ff580000.usb: gintsts=05000029 gintmsk=f3000806 > [ 33.137721] dwc2 ff580000.usb: ClearPortFeature USB_PORT_FEAT_C_RESET > [ 33.207735] dwc2 ff580000.usb: DWC OTG HCD HUB STATUS DATA: Root port > status changed > [ 33.207835] dwc2 ff580000.usb: port_connect_status_change: 0 > [ 33.207874] dwc2 ff580000.usb: port_reset_change: 0 > [ 33.207910] dwc2 ff580000.usb: port_enable_change: 1 > [ 33.207945] dwc2 ff580000.usb: port_suspend_change: 0 > [ 33.207979] dwc2 ff580000.usb: port_over_current_change: 0 > [ 33.328256] dwc2 ff580000.usb: DWC OTG HCD EP DISABLE: > bEndpointAddress=0x00, ep->hcpriv=e81e42ce > [ 33.328275] dwc2 ff580000.usb: DWC OTG HCD EP DISABLE: > bEndpointAddress=0x00, ep->hcpriv= (null) > [ 33.328287] dwc2 ff580000.usb: DWC OTG HCD EP RESET: > bEndpointAddress=0x00 > [ 33.347535] usb 2-1: New USB device found, idVendor=18a5, > idProduct=0302, bcdDevice= 1.00 > [ 33.347629] usb 2-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 33.347720] usb 2-1: Product: STORE N GO > [ 33.347767] usb 2-1: Manufacturer: Verbatim > [ 33.347815] usb 2-1: SerialNumber: 9E457CF1 > [ 33.348067] dwc2 ff580000.usb: DWC OTG HCD EP RESET: > bEndpointAddress=0x01 > [ 33.348072] dwc2 ff580000.usb: DWC OTG HCD EP RESET: > bEndpointAddress=0x82 > [ 33.348224] usb-storage 2-1:1.0: USB Mass Storage device detected > [ 33.354164] scsi host1: usb-storage 2-1:1.0 > [ 33.354905] dwc2 ff580000.usb: ClearPortFeature > USB_PORT_FEAT_C_ENABLE > [ 34.403547] scsi 1:0:0:0: Direct-Access Verbatim STORE N GO > 8.07 PQ: 0 ANSI: 4 > [ 34.414868] sd 1:0:0:0: [sdb] 15564800 512-byte logical blocks: (7.97 > GB/7.42 GiB) > [ 34.418173] sd 1:0:0:0: [sdb] Write Protect is off > [ 34.418270] sd 1:0:0:0: [sdb] Mode Sense: 23 00 00 00 > [ 34.418979] sd 1:0:0:0: [sdb] Write cache: disabled, read cache: > enabled, doesn't support DPO or FUA > [ 34.424606] sdb: sdb1 > [ 34.426850] sd 1:0:0:0: [sdb] Attached SCSI removable disk > > > Which the commit, the two lines I've included above are all that get > printed to dmesg. > All I can conclude is that gintsts and gintmsk are not in the correct > states when dwc2_handle_common_inter() is called > > I hope some of this is helpful, > > Hal -- 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