Google
  Web www.spinics.net

Re: The problems of OHCI driver for Winbond W90N740.

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


Dear Alan,

If I add the following code to usb/host/ohci-hcd.c or define the flag
OHCI_VERBOSE_DEBUG, then the usb subsystem will work and there are no
errors. But it's very slowly. :(
If the delay value is smaller than 350, system will hang up.
So I think this problem is a timing problem, I don't know how to fix the
problem. Could you give me some suggestions? 
 
static int ohci_urb_enqueue (
	struct usb_hcd	*hcd,
	struct usb_host_endpoint *ep,
	struct urb	*urb,
	gfp_t		mem_flags
) {
	struct ohci_hcd	*ohci = hcd_to_ohci (hcd);
	struct ed	*ed;
	urb_priv_t	*urb_priv;
	unsigned int	pipe = urb->pipe;
	int		i, size = 0;
	unsigned long	flags;
	int		retval = 0;

	mdelay(350);	//delay 350 ms. This code will make the code worked.

#ifdef OHCI_VERBOSE_DEBUG
	urb_print (urb, "SUB", usb_pipein (pipe));
#endif

	/* every endpoint has a ed, locate and maybe (re)initialize it */
	if (! (ed = ed_get (ohci, ep, urb->dev, pipe, urb->interval)))
		return -ENOMEM;

Darwin Chen <PStudio@xxxxxxx>

> What should I do in next steps?
>
> Try to find out what's wrong with the way your device or driver handles 
> bulk-IN endpoints.  For example, you might add a printk statement to 
> ohci_irq, so you can see if the controller sends an interrupt request.  
> You might print out the values stored in the TD when the URB is 
> unlinked, so you can see if the controller received any bulk data.
>
> Alan Stern



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Linux-usb-users@xxxxxxxxxxxxxxxxxxxxx
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

[Linux USB]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Video Projectors]     [PDAs]     [Free Online Dating]     [Hacking TiVo]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Devices]     [Big List of Linux Books]     [16.7MP]