aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/usb/pegasus.h
diff options
context:
space:
mode:
authorPetko Manolov <petkan@nucleusys.com>2013-04-25 22:41:50 +0000
committerDavid S. Miller <davem@davemloft.net>2013-04-29 13:57:50 -0400
commit323b34963d113efb566635f43858f40cce01d5f9 (patch)
treecce217081da276ac54ad37b3ffa78c2da9e54ae8 /drivers/net/usb/pegasus.h
parentdrivers: net: usb: pegasus: read/write_mii_word optimised (diff)
downloadwireguard-linux-323b34963d113efb566635f43858f40cce01d5f9.tar.xz
wireguard-linux-323b34963d113efb566635f43858f40cce01d5f9.zip
drivers: net: usb: pegasus: fix control urb submission
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. As a result of this change [get|set]_registers() are now 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 URBs. Signed-off-by: Petko Manolov <petkan@nucleusys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/pegasus.h')
-rw-r--r--drivers/net/usb/pegasus.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/usb/pegasus.h b/drivers/net/usb/pegasus.h
index 00d44e3ff744..d15646244fdf 100644
--- a/drivers/net/usb/pegasus.h
+++ b/drivers/net/usb/pegasus.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999-2003 Petko Manolov - Petkan (petkan@users.sourceforge.net)
+ * Copyright (c) 1999-2013 Petko Manolov (petkan@nucleusys.com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as published
@@ -33,8 +33,6 @@
#define CTRL_URB_SLEEP 0x00000020
#define PEGASUS_UNPLUG 0x00000040
#define PEGASUS_RX_URB_FAIL 0x00000080
-#define ETH_REGS_CHANGE 0x40000000
-#define ETH_REGS_CHANGED 0x80000000
#define RX_MULTICAST 2
#define RX_PROMISCUOUS 4
@@ -95,10 +93,8 @@ typedef struct pegasus {
int intr_interval;
struct tasklet_struct rx_tl;
struct delayed_work carrier_check;
- struct urb *ctrl_urb, *rx_urb, *tx_urb, *intr_urb;
+ struct urb *rx_urb, *tx_urb, *intr_urb;
struct sk_buff *rx_skb;
- struct usb_ctrlrequest dr;
- wait_queue_head_t ctrl_wait;
int chip;
unsigned char intr_buff[8];
__u8 tx_buff[PEGASUS_MTU];