usbmon: don't call mon_dmapeek if DMA isn't being used
This patch (as755b) fixes a bug in usbmon. Rather than assuming all USB host controllers use DMA, the code will check the usb_bus data structure. If DMA isn't used, we don't want to try peeking into a non-existent DMA buffer! Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
1720058343
commit
4d6cd48380
@ -301,6 +301,7 @@ static void mon_bus_init(struct dentry *mondir, struct usb_bus *ubus)
|
||||
*/
|
||||
mbus->u_bus = ubus;
|
||||
ubus->mon_bus = mbus;
|
||||
mbus->uses_dma = ubus->uses_dma;
|
||||
|
||||
rc = snprintf(name, NAMESZ, "%dt", ubus->busnum);
|
||||
if (rc <= 0 || rc >= NAMESZ)
|
||||
|
Reference in New Issue
Block a user