[lkml]   [2013]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2 1/3] net/usb/r815x: replace USB buffer from stack to DMA-able
From: Hayes Wang <>
Date: Thu, 25 Jul 2013 15:59:02 +0800

> Some USB buffers use stack which may not be DMA-able.
> Use the buffers from kmalloc to replace those one.
> Signed-off-by: Hayes Wang <>

I don't think it's reasonable to kmalloc() a small integer every time
you want to use a USB message transfer to read or write chip

Instead, add a scratch buffer to struct r8152 which is allocated once
at driver attach time and which you can use for the transfers.

I think you only need an array of two u32's so something like:

u32 transfer_buf[2];

ought to be sufficient.

 \ /
  Last update: 2013-07-28 05:41    [W:2.112 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog