[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1304102354010.9358@fry>
Date: Thu, 11 Apr 2013 00:05:50 +0300 (EEST)
From: Petko Manolov <petkan@...leusys.com>
To: "David S. Miller" <davem@...emloft.net>
cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Sarah Sharp <sarah.a.sharp@...ux.intel.com>
Subject: [PATCH] net: usb: active URB submitted multiple times
From: Petko Manolov <petkan@...leusys.com>
Pegasus driver used single callback for sync and async control URBs.
Special flags were employed to distinguish between both, but due to flawed
logic it didn't always work.
Now [get|set]_registers() are much simpler. Async write is also leaner
and does not use single, statically allocated memory for usb_ctrlrequest,
which is another potential race when asynchronously submitting control
URBs.
The socket buffer pool in the receive path is removed. It's existence
didn't make much difference (performance-wise) and the code is better off
without the spinlocks protecting it.
Largely duplicated code in routines reading and writing MII registers is
now packed in __mi_op().
The rest of the patch is pretty much Lindent's fault.
Signed-off-by: Petko Manolov <petkan@...leusys.com>
---
drivers/net/usb/pegasus.c | 601 +++++++++++++++++++++++++++++++---------------------------------------------------------------------------
drivers/net/usb/pegasus.h | 10 +-
2 files changed, 177 insertions(+), 434 deletions(-)
View attachment "pegasus.h.diff" of type "TEXT/X-DIFF" (1246 bytes)
View attachment "pegasus.c.diff" of type "TEXT/X-DIFF" (37138 bytes)
Powered by blists - more mailing lists