From: Petko Manolov 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 --- drivers/net/usb/pegasus.c | 601 +++++++++++++++++++++++++++++++--------------------------------------------------------------------------- drivers/net/usb/pegasus.h | 10 +- 2 files changed, 177 insertions(+), 434 deletions(-)