On Wed, Dec 15, 2010 at 04:39:13PM -0500, Alan Stern wrote:
On Wed, 15 Dec 2010, Felipe Balbi wrote:>+{ >+ int ret; >+ struct usb_bus *bus = >+ container_of(work, struct usb_bus, hnp_polling.work); >+ struct usb_device *udev = bus->root_hub->children[bus->otg_port - 1]; >+ u8 *status = kmalloc(sizeof(*status), GFP_KERNEL); how about: u8 status; and... >+ if (!status) >+ return; >+ >+ ret = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), >+ USB_REQ_GET_STATUS, USB_DIR_IN | USB_RECIP_DEVICE, >+ 0, OTG_STATUS_SELECTOR, status, sizeof(*status), 0, OTG_STATUS_SELECTOR, &status, sizeof(status); ??You mustn't do DMA to addresses on the stack.
oh, ok. Forgot other controllers will do DMA for control message too. MUSB won't. -- balbi -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
