Re: [PATCH v3 1/3] net/usb/r815x: replace USB buffer from stack to DMA-able

2013-07-31 Thread Ming Lei
On Wed, Jul 31, 2013 at 2:49 AM, David Miller wrote: > From: Joe Perches > Date: Tue, 30 Jul 2013 11:41:17 -0700 > >> On Tue, 2013-07-30 at 11:33 -0700, David Miller wrote: >>> From: Greg KH >>> Date: Tue, 30 Jul 2013 07:00:59 -0700 >>> >>> > This call is so slow, you can afford to make a call t

Re: [PATCH v3 1/3] net/usb/r815x: replace USB buffer from stack to DMA-able

2013-07-30 Thread Greg KH
On Tue, Jul 30, 2013 at 11:33:29AM -0700, David Miller wrote: > From: Greg KH > Date: Tue, 30 Jul 2013 07:00:59 -0700 > > > This call is so slow, you can afford to make a call to kmalloc for the > > data, as it sure just did for other structures it needed :) > > I told him to implement things th

Re: [PATCH v3 1/3] net/usb/r815x: replace USB buffer from stack to DMA-able

2013-07-30 Thread David Miller
From: Joe Perches Date: Tue, 30 Jul 2013 11:41:17 -0700 > On Tue, 2013-07-30 at 11:33 -0700, David Miller wrote: >> From: Greg KH >> Date: Tue, 30 Jul 2013 07:00:59 -0700 >> >> > This call is so slow, you can afford to make a call to kmalloc for the >> > data, as it sure just did for other stru

Re: [PATCH v3 1/3] net/usb/r815x: replace USB buffer from stack to DMA-able

2013-07-30 Thread Joe Perches
On Tue, 2013-07-30 at 11:33 -0700, David Miller wrote: > From: Greg KH > Date: Tue, 30 Jul 2013 07:00:59 -0700 > > > This call is so slow, you can afford to make a call to kmalloc for the > > data, as it sure just did for other structures it needed :) > > I told him to implement things this way,

Re: [PATCH v3 1/3] net/usb/r815x: replace USB buffer from stack to DMA-able

2013-07-30 Thread David Miller
From: Greg KH Date: Tue, 30 Jul 2013 07:00:59 -0700 > This call is so slow, you can afford to make a call to kmalloc for the > data, as it sure just did for other structures it needed :) I told him to implement things this way, to avoid calling kmalloc every single register access. Using kmallo

Re: [PATCH v3 1/3] net/usb/r815x: replace USB buffer from stack to DMA-able

2013-07-30 Thread Ming Lei
On Tue, Jul 30, 2013 at 4:28 PM, Hayes Wang wrote: > Allocate the transfer buffer in probe(), and use the buffer for > usb control transfer. Looks this is a usbnet device, so suggest to use usbnet command APIs (usbnet_read_cmd/usbnet_write_cmd) to do that, another advantage is you can avoid to ac

Re: [PATCH v3 1/3] net/usb/r815x: replace USB buffer from stack to DMA-able

2013-07-30 Thread Greg KH
On Tue, Jul 30, 2013 at 04:28:54PM +0800, Hayes Wang wrote: > Allocate the transfer buffer in probe(), and use the buffer for > usb control transfer. > > Signed-off-by: Hayes Wang > --- > drivers/net/usb/r815x.c | 117 > +--- > 1 file changed, 90 inse

Re: [PATCH v3 1/3] net/usb/r815x: replace USB buffer from stack to DMA-able

2013-07-30 Thread Greg KH
On Tue, Jul 30, 2013 at 04:28:54PM +0800, Hayes Wang wrote: > Allocate the transfer buffer in probe(), and use the buffer for > usb control transfer. > > Signed-off-by: Hayes Wang > --- > drivers/net/usb/r815x.c | 117 > +--- > 1 file changed, 90 inse

[PATCH v3 1/3] net/usb/r815x: replace USB buffer from stack to DMA-able

2013-07-30 Thread Hayes Wang
Allocate the transfer buffer in probe(), and use the buffer for usb control transfer. Signed-off-by: Hayes Wang --- drivers/net/usb/r815x.c | 117 +--- 1 file changed, 90 insertions(+), 27 deletions(-) diff --git a/drivers/net/usb/r815x.c b/drivers/ne