From 962deac027254499c17c57845161992231762d89 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Mon, 14 Oct 2002 23:58:46 +0000 Subject: [PATCH] Turn off the premature locking in xl. The driver tries to use the mutexes as spl replacements, but you cant sleep while holding mutexes. This change has been made on many other drivers. --- sys/pci/if_xlreg.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/pci/if_xlreg.h b/sys/pci/if_xlreg.h index 5e1b9204b8da..d2557529e667 100644 --- a/sys/pci/if_xlreg.h +++ b/sys/pci/if_xlreg.h @@ -589,8 +589,14 @@ struct xl_softc { struct mtx xl_mtx; }; +#if 0 +/* These are a bit premature. The driver still tries to sleep with locks. */ #define XL_LOCK(_sc) mtx_lock(&(_sc)->xl_mtx) #define XL_UNLOCK(_sc) mtx_unlock(&(_sc)->xl_mtx) +#else +#define XL_LOCK(x) do { } while (0) +#define XL_UNLOCK(x) do { } while (0) +#endif #define xl_rx_goodframes(x) \ ((x.xl_upper_frames_ok & 0x03) << 8) | x.xl_rx_frames_ok