--- R29/drivers/usb/host/ehci-q.c 2004-07-07 08:31:43.000000000 +0100 +++ R63/drivers/usb/host/ehci-q.c 2005-02-03 04:59:48.000000000 +0000 @@ -39,6 +39,22 @@ */ /*-------------------------------------------------------------------------*/ + +//pete +void ehci_urb_dma_sync(struct usb_hcd *hcd, struct urb *urb) +{ + if (urb->setup_dma) + pci_dma_sync_single(hcd->pdev, urb->setup_dma, + sizeof(struct usb_ctrlrequest), + PCI_DMA_TODEVICE); + if (urb->transfer_buffer_length != 0) + pci_dma_sync_single(hcd->pdev, urb->transfer_dma, + urb->transfer_buffer_length, + usb_pipein(urb->pipe) + ? PCI_DMA_FROMDEVICE + : PCI_DMA_TODEVICE); +} +// /* fill a qtd, returning how much of the buffer we were able to queue up */ @@ -205,7 +221,16 @@ qh_put (ehci, qh); } + + spin_lock (&urb->lock); + +//pete: This fix the 2.0hub + 1.1 udisks bug + /* only control transfer makes trouble */ + if (usb_pipecontrol (urb->pipe)){ + ehci_urb_dma_sync(&ehci->hcd, urb); + } + urb->hcpriv = 0; switch (urb->status) { case -EINPROGRESS: /* success */ @@ -799,6 +824,10 @@ { struct ehci_qh *qh = 0; + //pete + //printk("in qh_append_tds\n"); + //show_bytes((unsigned char *)&urb->dev->descriptor, 18); + qh = (struct ehci_qh *) *ptr; if (unlikely (qh == 0)) { /* can't sleep here, we have ehci->lock... */ @@ -903,6 +932,9 @@ dummy->hw_token = token; urb->hcpriv = qh_get (qh); + //pete + //show_bytes((unsigned char *)&urb->dev->descriptor, 18); + //show_bytes((unsigned char *)&dma, 18); } } return qh;