Re: EHCI and HCD_LOCAL_MEM

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

 



On Mon, 4 May 2009, Chris Leahy wrote:

> I'm currently working on a EHCI glue driver for Oxford OXU210HP
> controller. The current driver copies a lot of code from EHCI. I am
> currently having two issues with my driver. The first is that since
> this driver uses HCD_LOCAL_MEM, dma_free_coherent() is getting called
> with irqs_disabled.
> 
> The second issue is that mass storage devices will not work with this
> driver. When I plug a mass storage device in, the device scan
> completes and then I get these messages:
> 
> [  624.070000] hub 1-1:1.0: state 7 ports 4 chg 0000 evt 0008
> [  624.090000] usb 1-1.3: reset full speed USB device using
> oxu210-ehci and address 3
> [  629.100000] usb 1-1.3: usb-storage timed out on ep0in len=0/64
> [  634.100000] usb 1-1.3: usb-storage timed out on ep0in len=0/64
> [  639.100000] usb 1-1.3: usb-storage timed out on ep0in len=0/64
> [  639.180000] usb 1-1.3: device descriptor read/64, error -110
> 
> Any ideas?

No, sorry.

> WIP driver is attached.

This part of the driver is wrong:

> +	/* and add the hcds to the Linux USB core */
> +	retval = usb_add_hcd(otg_hcd, irq, IRQF_SHARED);
> +	retval |= usb_add_hcd(sph_hcd, irq, IRQF_SHARED);
> +	if (retval)
> +		goto fail_add_hcd;

If adding one of the HCs succeeds and adding the other fails, you end 
up doing an extra usb_put_hcd() for the one that succeeded.  And you 
return an error code even though one of the probes worked.

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