From: Jussi Kivilinna Date: Mon, 18 Feb 2013 08:29:30 +0000 (+0200) Subject: rtlwifi: usb: allocate URB control message setup_packet and data buffer separately X-Git-Tag: v3.9-rc1~139^2~2^2^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc6b89237acb3dee6af6e64e51a18255fef89cc2;p=pandora-kernel.git rtlwifi: usb: allocate URB control message setup_packet and data buffer separately rtlwifi allocates both setup_packet and data buffer of control message urb, using shared kmalloc in _usbctrl_vendorreq_async_write. Structure used for allocating is: struct { u8 data[254]; struct usb_ctrlrequest dr; }; Because 'struct usb_ctrlrequest' is __packed, setup packet is unaligned and DMA mapping of both 'data' and 'dr' confuses ARM/sunxi, leading to memory corruptions and freezes. Patch changes setup packet to be allocated separately. [v2]: - Use WARN_ON_ONCE instead of WARN_ON Cc: Signed-off-by: Jussi Kivilinna Signed-off-by: John W. Linville --- Reading git-diff-tree failed