diff options
| author | zhigang lu - Sun Microsystems - Beijing China <Zhigang.Lu@Sun.COM> | 2009-03-18 02:39:14 +0800 |
|---|---|---|
| committer | zhigang lu - Sun Microsystems - Beijing China <Zhigang.Lu@Sun.COM> | 2009-03-18 02:39:14 +0800 |
| commit | f91909144addd198e09d1842e5354bfa62d96691 (patch) | |
| tree | 302bb8fd6b59a02a42bfdd4f15acb7e078ffdf1f /usr/src/uts/common/io | |
| parent | 8002d4117c1ea26aff1f16f584ae97bdbd5b21d5 (diff) | |
| download | illumos-gate-f91909144addd198e09d1842e5354bfa62d96691.tar.gz | |
6673333 ohci shouldn't allocate memory with DDI_DMA_SLEEP while holding interrupt mutex
6576258 ehci shouldn't allocate memory with DDI_DMA_SLEEP while holding interrupt mutex
Diffstat (limited to 'usr/src/uts/common/io')
| -rw-r--r-- | usr/src/uts/common/io/usb/hcd/ehci/ehci_xfer.c | 13 | ||||
| -rw-r--r-- | usr/src/uts/common/io/usb/hcd/openhci/ohci.c | 11 | ||||
| -rw-r--r-- | usr/src/uts/common/io/usb/hcd/uhci/uhciutil.c | 11 |
3 files changed, 10 insertions, 25 deletions
diff --git a/usr/src/uts/common/io/usb/hcd/ehci/ehci_xfer.c b/usr/src/uts/common/io/usb/hcd/ehci/ehci_xfer.c index 2b8b395d68..d956029c61 100644 --- a/usr/src/uts/common/io/usb/hcd/ehci/ehci_xfer.c +++ b/usr/src/uts/common/io/usb/hcd/ehci/ehci_xfer.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -2998,14 +2998,9 @@ ehci_create_transfer_wrapper( ASSERT(mutex_owned(&ehcip->ehci_int_mutex)); - /* SLEEP flag should not be used in interrupt context */ - if (servicing_interrupt()) { - kmem_flag = KM_NOSLEEP; - dmamem_wait = DDI_DMA_DONTWAIT; - } else { - kmem_flag = KM_SLEEP; - dmamem_wait = DDI_DMA_SLEEP; - } + /* SLEEP flag should not be used while holding mutex */ + kmem_flag = KM_NOSLEEP; + dmamem_wait = DDI_DMA_DONTWAIT; /* Allocate space for the transfer wrapper */ tw = kmem_zalloc(sizeof (ehci_trans_wrapper_t), kmem_flag); diff --git a/usr/src/uts/common/io/usb/hcd/openhci/ohci.c b/usr/src/uts/common/io/usb/hcd/openhci/ohci.c index f66d2e7d1b..23943b1af9 100644 --- a/usr/src/uts/common/io/usb/hcd/openhci/ohci.c +++ b/usr/src/uts/common/io/usb/hcd/openhci/ohci.c @@ -6884,14 +6884,9 @@ ohci_create_transfer_wrapper( return (NULL); } - /* SLEEP flag should not be used in interrupt context */ - if (servicing_interrupt()) { - kmem_flag = KM_NOSLEEP; - dmamem_wait = DDI_DMA_DONTWAIT; - } else { - kmem_flag = KM_SLEEP; - dmamem_wait = DDI_DMA_SLEEP; - } + /* SLEEP flag should not be used while holding mutex */ + kmem_flag = KM_NOSLEEP; + dmamem_wait = DDI_DMA_DONTWAIT; /* Allocate space for the transfer wrapper */ tw = kmem_zalloc(sizeof (ohci_trans_wrapper_t), kmem_flag); diff --git a/usr/src/uts/common/io/usb/hcd/uhci/uhciutil.c b/usr/src/uts/common/io/usb/hcd/uhci/uhciutil.c index f885d2f612..27b4048506 100644 --- a/usr/src/uts/common/io/usb/hcd/uhci/uhciutil.c +++ b/usr/src/uts/common/io/usb/hcd/uhci/uhciutil.c @@ -1758,14 +1758,9 @@ uhci_create_transfer_wrapper( return (NULL); } - /* SLEEP flag should not be used in interrupt context */ - if (servicing_interrupt()) { - kmem_flag = KM_NOSLEEP; - dmamem_wait = DDI_DMA_DONTWAIT; - } else { - kmem_flag = KM_SLEEP; - dmamem_wait = DDI_DMA_SLEEP; - } + /* SLEEP flag should not be used while holding mutex */ + kmem_flag = KM_NOSLEEP; + dmamem_wait = DDI_DMA_DONTWAIT; /* Allocate space for the transfer wrapper */ if ((tw = kmem_zalloc(sizeof (uhci_trans_wrapper_t), kmem_flag)) == |
