RE: periodic schedule enabled during usb_disconnect

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

 



Hi, Alan,

> -----Original Message-----
> From: Alan Stern [mailto:stern@xxxxxxxxxxxxxxxxxxx]
> Sent: Friday, June 12, 2009 10:12 AM
> To: Julie Zhu
> Cc: USB list
> Subject: Re: periodic schedule enabled during usb_disconnect
> 
> On Fri, 12 Jun 2009, Julie Zhu wrote:
> 
> > Hello, all,
> >
> > We found this on a PowerPC embedded platform using an FPGA-based USB
> > host controller. The Linux kernel is 2.6.29.
> >
> > When disconnect the device during an interrupt transfer, we found
that
> > periodic schedule is disabled, but quickly enabled again. It is
later
> > disabled again. The bogus enable happens in ehci_urb_dequeue():
> >
> > 	/* reschedule QH iff another request is queued */
> > 	if (!list_empty (&qh->qtd_list)
> > 			&& HC_IS_RUNNING (hcd->state)) {
> > 		printk(KERN_INFO "qh_schedule in urb_dequeue %x\n",
> > hcd->state);
> >
> > 		rc = qh_schedule(ehci, qh);
> >
> > The qh_schedule() then calls qh_link_periodic(), which calls
> > enable_periodic().
> >
> > It is unclear how qh->qtd_list should be updated properly for the
> > disconnect, although ep->urb_list is cleared.
> 
> How can ep->urb_list be cleared without qh->qtd_list also getting
> cleared?
> 
> > Is this a bug?
> 
> Probably not.  The periodic schedule should be enabled as long as any
> periodic URBs are queued.  The fact that they are addressed to a
device
> which has been unplugged doesn't matter -- usb_disconnect() will
unlink
> the remaining URBs for the unplugged device quickly enough.
> 
> Alan Stern
> 

Well, it does happen, and printks show the path of periodic schedule
disable/enable/disable. Can you point me to where qh->qtd_list is
updated?

Thanks,
Julie.

This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.


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