Commit 934b1882 authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[PATCH] Re: PATCH: 2.5.8 ehci, submit errors

Oh, and for non-x86 platforms with interesting pci
mapping, this tweak to one new routine would be
important in a particular error path I've yet to see ... :)
parent f3f05300
...@@ -426,23 +426,25 @@ static void qtd_list_free ( ...@@ -426,23 +426,25 @@ static void qtd_list_free (
list_del (&qtd->qtd_list); list_del (&qtd->qtd_list);
if (unmapped != 2) { if (unmapped != 2) {
int direction; int direction;
size_t size;
/* for ctrl unmap twice: SETUP and DATA; /* for ctrl unmap twice: SETUP and DATA;
* else (bulk, intr) just once: DATA * else (bulk, intr) just once: DATA
*/ */
if (!unmapped++ && usb_pipecontrol (urb->pipe)) if (!unmapped++ && usb_pipecontrol (urb->pipe)) {
direction = PCI_DMA_TODEVICE; direction = PCI_DMA_TODEVICE;
else { size = sizeof (struct usb_ctrlrequest);
} else {
direction = usb_pipein (urb->pipe) direction = usb_pipein (urb->pipe)
? PCI_DMA_FROMDEVICE ? PCI_DMA_FROMDEVICE
: PCI_DMA_TODEVICE; : PCI_DMA_TODEVICE;
size = qtd->urb->transfer_buffer_length;
unmapped++; unmapped++;
} }
if (qtd->buf_dma) if (qtd->buf_dma)
pci_unmap_single (ehci->hcd.pdev, pci_unmap_single (ehci->hcd.pdev,
qtd->buf_dma, qtd->buf_dma,
qtd->urb->transfer_buffer_length, size, direction);
direction);
} }
ehci_qtd_free (ehci, qtd); ehci_qtd_free (ehci, qtd);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment