Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753207Ab2HBOsa (ORCPT ); Thu, 2 Aug 2012 10:48:30 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:59500 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752664Ab2HBOs2 (ORCPT ); Thu, 2 Aug 2012 10:48:28 -0400 Date: Thu, 2 Aug 2012 10:48:27 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Virupax Sadashivpetimath cc: balbi@ti.com, , , , Subject: Re: [PATCH] usb:musb:musb_host: Handle highmem in PIO mode In-Reply-To: <1343889402-7826-1-git-send-email-virupax.sadashivpetimath@stericsson.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1268 Lines: 36 On Thu, 2 Aug 2012, Virupax Sadashivpetimath wrote: > In case of USB bulk transfer, when himem page > is received, the usb_sg_init function sets the > urb transfer buffer to NULL. When such URB > transfer is handled, kernel crashes in PIO mode. > Handle this by mapping the highmem buffer in PIO mode. > --- a/include/linux/usb.h > +++ b/include/linux/usb.h > @@ -21,6 +21,7 @@ > #include /* for current && schedule_timeout */ > #include /* for struct mutex */ > #include /* for runtime PM */ > +#include > > struct usb_device; > struct usb_driver; > @@ -1309,6 +1310,7 @@ struct urb { > usb_complete_t complete; /* (in) completion routine */ > struct usb_iso_packet_descriptor iso_frame_desc[0]; > /* (in) ISO ONLY */ > + struct sg_mapping_iter sg_miter; /* handling highmem data in PIO mode */ > }; This is unacceptable. Fields like this should be stored in the URB's hcpriv structure, not in the URB itself. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/