Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 155937 Details for
Bug 236922
DMA: Out of SW-IOMMU space
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Candidate patch 1 - free DMA mappings upon a submission error
linux-2.6.18-16.el5-236922-3.diff (text/plain), 2.91 KB, created by
Pete Zaitcev
on 2007-06-01 20:41:30 UTC
(
hide
)
Description:
Candidate patch 1 - free DMA mappings upon a submission error
Filename:
MIME Type:
Creator:
Pete Zaitcev
Created:
2007-06-01 20:41:30 UTC
Size:
2.91 KB
patch
obsolete
>diff -urp -X dontdiff linux-2.6.18-16.el5/drivers/usb/core/hcd.c linux-2.6.18-16.el5-230427/drivers/usb/core/hcd.c >--- linux-2.6.18-16.el5/drivers/usb/core/hcd.c 2006-09-19 20:42:06.000000000 -0700 >+++ linux-2.6.18-16.el5-230427/drivers/usb/core/hcd.c 2007-06-01 13:30:38.000000000 -0700 >@@ -1090,9 +1090,10 @@ EXPORT_SYMBOL (usb_release_bandwidth); > > /*-------------------------------------------------------------------------*/ > >-static void urb_unlink (struct urb *urb) >+static void urb_unlink(struct usb_hcd *hcd, struct urb *urb) > { > unsigned long flags; >+ int at_root_hub = (urb->dev == hcd->self.root_hub); > > /* Release any periodic transfer bandwidth */ > if (urb->bandwidth) >@@ -1100,12 +1101,27 @@ static void urb_unlink (struct urb *urb) > usb_pipeisoc (urb->pipe)); > > /* clear all state linking urb to this dev (and hcd) */ >- > spin_lock_irqsave (&hcd_data_lock, flags); > list_del_init (&urb->urb_list); > spin_unlock_irqrestore (&hcd_data_lock, flags); >-} > >+ /* lower level hcd code should use *_dma exclusively */ >+ if (hcd->self.controller->dma_mask && !at_root_hub) { >+ if (usb_pipecontrol (urb->pipe) >+ && !(urb->transfer_flags & URB_NO_SETUP_DMA_MAP)) >+ dma_unmap_single (hcd->self.controller, urb->setup_dma, >+ sizeof (struct usb_ctrlrequest), >+ DMA_TO_DEVICE); >+ if (urb->transfer_buffer_length != 0 >+ && !(urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP)) >+ dma_unmap_single (hcd->self.controller, >+ urb->transfer_dma, >+ urb->transfer_buffer_length, >+ usb_pipein (urb->pipe) >+ ? DMA_FROM_DEVICE >+ : DMA_TO_DEVICE); >+ } >+} > > /* may be called in any context with a valid urb->dev usecount > * caller surrenders "ownership" of urb >@@ -1208,7 +1224,7 @@ doit: > status = hcd->driver->urb_enqueue (hcd, ep, urb, mem_flags); > done: > if (unlikely (status)) { >- urb_unlink (urb); >+ urb_unlink(hcd, urb); > atomic_dec (&urb->use_count); > if (urb->reject) > wake_up (&usb_kill_urb_queue); >@@ -1612,28 +1628,7 @@ static struct usb_operations usb_hcd_ope > */ > void usb_hcd_giveback_urb (struct usb_hcd *hcd, struct urb *urb, struct pt_regs *regs) > { >- int at_root_hub; >- >- at_root_hub = (urb->dev == hcd->self.root_hub); >- urb_unlink (urb); >- >- /* lower level hcd code should use *_dma exclusively */ >- if (hcd->self.controller->dma_mask && !at_root_hub) { >- if (usb_pipecontrol (urb->pipe) >- && !(urb->transfer_flags & URB_NO_SETUP_DMA_MAP)) >- dma_unmap_single (hcd->self.controller, urb->setup_dma, >- sizeof (struct usb_ctrlrequest), >- DMA_TO_DEVICE); >- if (urb->transfer_buffer_length != 0 >- && !(urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP)) >- dma_unmap_single (hcd->self.controller, >- urb->transfer_dma, >- urb->transfer_buffer_length, >- usb_pipein (urb->pipe) >- ? DMA_FROM_DEVICE >- : DMA_TO_DEVICE); >- } >- >+ urb_unlink(hcd, urb); > usbmon_urb_complete (&hcd->self, urb); > /* pass ownership to the completion handler */ > urb->complete (urb, regs);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 236922
:
154418
| 155937