diff options
author | wpaul <wpaul@FreeBSD.org> | 2000-10-24 22:38:54 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 2000-10-24 22:38:54 +0000 |
commit | deefde18d945622194e19ab0449141b879104d9b (patch) | |
tree | 27821821a225a50037f2e42bb26e3efea97acf15 /sys/dev/usb/if_auereg.h | |
parent | 46334203c117eda9e89c8f885354dfc350035a21 (diff) | |
download | FreeBSD-src-deefde18d945622194e19ab0449141b879104d9b.zip FreeBSD-src-deefde18d945622194e19ab0449141b879104d9b.tar.gz |
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.
Diffstat (limited to 'sys/dev/usb/if_auereg.h')
-rw-r--r-- | sys/dev/usb/if_auereg.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/usb/if_auereg.h b/sys/dev/usb/if_auereg.h index 9e4d546..5558b50 100644 --- a/sys/dev/usb/if_auereg.h +++ b/sys/dev/usb/if_auereg.h @@ -246,8 +246,12 @@ struct aue_softc { int aue_if_flags; struct aue_cdata aue_cdata; struct callout_handle aue_stat_ch; + struct mtx aue_mtx; }; +#define AUE_LOCK(_sc) mtx_enter(&(_sc)->aue_mtx, MTX_DEF) +#define AUE_UNLOCK(_sc) mtx_exit(&(_sc)->aue_mtx, MTX_DEF) + #define AUE_TIMEOUT 1000 #define ETHER_ALIGN 2 #define AUE_BUFSZ 1536 |