aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb/if_cuereg.h
diff options
context:
space:
mode:
authorBill Paul <wpaul@FreeBSD.org>2000-10-24 22:38:54 +0000
committerBill Paul <wpaul@FreeBSD.org>2000-10-24 22:38:54 +0000
commitf709eddf9f659d547c5b75b659863bf98e422ba8 (patch)
treed45d37c7e54d8abe8101129adfaedb70ab43ae11 /sys/dev/usb/if_cuereg.h
parentf6ee793a3c33d4aaaaff00dd22abc63deab6426e (diff)
downloadsrc-f709eddf9f659d547c5b75b659863bf98e422ba8.tar.gz
src-f709eddf9f659d547c5b75b659863bf98e422ba8.zip
Convert the USB ethernet drivers to use mutexes. Also convert
usb_ethersubr.c. This module maintains two queues for packets which are each protected with one mutex. These are all the changes I can do for now. Removing the USBD_NO_TSLEEP flag doesn't work yet: when I tried it, the system would usually freeze up after a NIC had been operating for a while. The usb_ethersubr module itself ought to go away; this is the next thing I need to test.
Notes
Notes: svn path=/head/; revision=67530
Diffstat (limited to 'sys/dev/usb/if_cuereg.h')
-rw-r--r--sys/dev/usb/if_cuereg.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/usb/if_cuereg.h b/sys/dev/usb/if_cuereg.h
index ca90383ccf49..5d043e4d7ad8 100644
--- a/sys/dev/usb/if_cuereg.h
+++ b/sys/dev/usb/if_cuereg.h
@@ -179,4 +179,8 @@ struct cue_softc {
u_int16_t cue_rxfilt;
struct cue_cdata cue_cdata;
struct callout_handle cue_stat_ch;
+ struct mtx cue_mtx;
};
+
+#define CUE_LOCK(_sc) mtx_enter(&(_sc)->cue_mtx, MTX_DEF)
+#define CUE_UNLOCK(_sc) mtx_exit(&(_sc)->cue_mtx, MTX_DEF)