提交 cdd5a8fd 编写于 作者: P Pete Zaitcev 提交者: Greg Kroah-Hartman

usbmon: Drop DMA mapping for setup packet

Setup packet must be visible in virtual space. There's absolutely no
good reason to implement any kind of zero-copy transfer of 8 bytes, and
the documentation in usb.h is explicit about it. So, drop DMA remapping.
Signed-off-by: NPete Zaitcev <zaitcev@redhat.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 30c7431d
...@@ -361,10 +361,6 @@ static inline char mon_bin_get_setup(unsigned char *setupb, ...@@ -361,10 +361,6 @@ static inline char mon_bin_get_setup(unsigned char *setupb,
if (!usb_endpoint_xfer_control(&urb->ep->desc) || ev_type != 'S') if (!usb_endpoint_xfer_control(&urb->ep->desc) || ev_type != 'S')
return '-'; return '-';
if (urb->dev->bus->uses_dma &&
(urb->transfer_flags & URB_NO_SETUP_DMA_MAP)) {
return mon_dmapeek(setupb, urb->setup_dma, SETUP_LEN);
}
if (urb->setup_packet == NULL) if (urb->setup_packet == NULL)
return 'Z'; return 'Z';
......
...@@ -127,10 +127,6 @@ static inline char mon_text_get_setup(struct mon_event_text *ep, ...@@ -127,10 +127,6 @@ static inline char mon_text_get_setup(struct mon_event_text *ep,
if (ep->xfertype != USB_ENDPOINT_XFER_CONTROL || ev_type != 'S') if (ep->xfertype != USB_ENDPOINT_XFER_CONTROL || ev_type != 'S')
return '-'; return '-';
if (urb->dev->bus->uses_dma &&
(urb->transfer_flags & URB_NO_SETUP_DMA_MAP)) {
return mon_dmapeek(ep->setup, urb->setup_dma, SETUP_MAX);
}
if (urb->setup_packet == NULL) if (urb->setup_packet == NULL)
return 'Z'; /* '0' would be not as pretty. */ return 'Z'; /* '0' would be not as pretty. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册