From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na3sys009aog110.obsmtp.com ([74.125.149.203]:47569 "EHLO na3sys009aog110.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751246Ab0LPIKU (ORCPT ); Thu, 16 Dec 2010 03:10:20 -0500 Date: Thu, 16 Dec 2010 10:10:16 +0200 From: Felipe Balbi Subject: Re: [RFC 2/5] USB: core: OTG Supplement Revision 2.0 updates Message-ID: <20101216081016.GC2601@legolas.emea.dhcp.ti.com> Reply-To: balbi@ti.com References: <20101215121616.GO2997@legolas.emea.dhcp.ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: Sender: linux-arm-msm-owner@vger.kernel.org List-ID: To: Alan Stern Cc: Felipe Balbi , Pavankumar Kondeti , linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org 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