Re: SuperH 7760 OHCI

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

 



On Thu, 26 May 2016, Martin Townsend wrote:

> >> and setting the HCD_MEMORY_LOCAL flag in the HC driver.
> >
> > Did you do this correctly?  That is, in the correct driver?
> >
> I put the code for the declaring the DMA coherent memory into ohci-platform.c
> and set the flag in ohci-hcd.c

Okay.  It's not portable, but it's fine for a single system with only 
one controller.

> >> and I get the following error
> >
> > ...
> >> [    1.510000] usb 1-1: new full-speed USB device number 2 using ohci-platform
> >> [    1.690000] usb 1-1: device descriptor read/64, error -12
> >> [    1.980000] usb 1-1: device descriptor read/64, error -12
> >> [    2.270000] usb 1-1: new full-speed USB device number 3 using ohci-platform
> >> [    2.450000] usb 1-1: device descriptor read/64, error -12
> >> [    2.740000] usb 1-1: device descriptor read/64, error -12
> >> [    3.030000] usb 1-1: new full-speed USB device number 4 using ohci-platform
> >> [    3.450000] usb 1-1: device not accepting address 4, error -12
> >> [    3.630000] usb 1-1: new full-speed USB device number 5 using ohci-platform
> >> [    4.050000] usb 1-1: device not accepting address 5, error -12
> >> [    4.050000] usb usb1-port1: unable to enumerate USB device
> >
> > -12 is -ENOMEM on your system?
> Yes
> >
> > ...
> >> which looks good. Anyone have an idea as to what's wrong or what the
> >> error messages mean.  I have nothing plugged into the USB ports.
> >
> > Nothing plugged into the USB ports?  Then why does the system think
> > something is plugged in?  It sounds like the driver is not accessing
> > the right registers.
> >
> >>  Also
> >> any ideas on where to start with debugging this would be appreciated.
> >
> > What do you see in /sys/kernel/debug/usb/ohci/*/registers?
> >
> root@sh7760:~# cat /sys/kernel/debug/usb/ohci/ohci-platform/registers
> bus platform, device ohci-platform
> Generic Platform OHCI controller
> ohci_hcd
> OHCI 1.0, NO legacy support registers, rh state running
> control 0x083 HCFS=operational CBSR=3
> cmdstatus 0x00000 SOC=0
> intrstatus 0x00000024 FNO SF
> intrenable 0x8000005a MIE RHSC UE RD WDH
> hcca frame 0x0000
> fmintvl 0xa7782edf FIT FSMPS=0xa778 FI=0x2edf
> fmremaining 0x800008b0 FRT FR=0x08b0
> periodicstart 0x2a2f
> lsthresh 0x0628
> hub poll timer off
> roothub.a 02000202 POTPGT=2 NPS NDP=2(2)
> roothub.b 00000000 PPCM=0000 DR=0000
> roothub.status 00008002 DRWE OCI
> roothub.portstatus [0] 0x00000101 PPS CCS
> roothub.portstatus [1] 0x00000100 PPS
> 
> Does this look sane?

Yes, except for two things:

	The OCI bit in roothub.status indicates that an OverCurrent
	condition was present at some point.

	The CCS bit in roothub.portstats[0] indicates that something
	is plugged into port 1.  If there really is nothing plugged
	into that port then this is a hardware failure.

The reason for the ENOMEM errors isn't clear.  You could try adding 
some debugging statements to see exactly where it comes from.  A likely 
spot is the call to hcd_alloc_coherent() in usb_hcd_map_urb_for_dma().

Alan Stern

--
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