On Wed, 11 Aug 2004, Pete Zaitcev wrote: > On Wed, 11 Aug 2004 11:42:48 -0400 (EDT) > Alan Stern <[EMAIL PROTECTED]> wrote: > > > This patch fixes the error in the UHCI driver found by Stuart Hayes. It > > adds the UHCI_PTR_QH bit into the initial entries stored in the hardware > > framelist. It's not entirely clear how the driver ever managed to work > > with these bits not set; apparently by coincidence the QH entries > > resembled TD entries sufficiently closely to fool the hardware. > > > /* Only place we don't use the frame list routines */ > > - uhci->fl->frame[i] = cpu_to_le32(uhci->skelqh[irq]->dma_handle); > > + uhci->fl->frame[i] = UHCI_PTR_QH | > > + cpu_to_le32(uhci->skelqh[irq]->dma_handle); > > What about uhci_insert_td_frame_list() and uhci_remove_td() ? > > -- Pete
Stuart's comments are correct. Going into more detail: uhci_insert_td_frame_list() is okay because: the new TD being added to the end of the list gets a copy of the link pointer from the formerly-last TD (or the framelist entry if the list was empty); the formerly-last TD (or the framelist entry) has its link pointer set to the new TD's DMA handle without UHCI_QH_PTR set, as it should be since the new entry is a TD and not a QH. uhci_remove_td() is okay becaue: the link pointer from the TD being removed is copied into the link pointer for the previous TD (or the framelist entry if the TD being removed was the first one). The only time a newly-created framelist entry points to a QH is during the initialization procedure, where the patch fixes it. Alan Stern ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel