aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/my/if_myreg.h
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2005-08-16 20:39:30 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2005-08-16 20:39:30 +0000
commitca5fc32d026f0d45fe9a00a51ce9c83cd547080f (patch)
tree7c3a3643ef8deb9e0e9e2696f1893ea56d236747 /sys/dev/my/if_myreg.h
parent52d71e1a859206a8f756b6ac953654946bc8c159 (diff)
Fixup locking in if_my(4) and mark it MPSAFE:
- Add locked variants of my_start() and my_init(). - Assert that the lock is held in several places rather than recursing. - Overhaul failure case handling in my_attach() so that it will actually clean up completely in each of the failure cases. - Setup the interrupt after ether_ifattach() in my_attach(). - Remove unused callout handle from softc. - Free the metadata for the descriptors my_in detach() (we leaked it before). - Fix locking in my_ioctl(). - Remove spls. Tested by: brueffer MFC after: 3 days
Notes
Notes: svn path=/head/; revision=149151
Diffstat (limited to 'sys/dev/my/if_myreg.h')
-rw-r--r--sys/dev/my/if_myreg.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/my/if_myreg.h b/sys/dev/my/if_myreg.h
index 7e65fda70a5b..a552de51cfd4 100644
--- a/sys/dev/my/if_myreg.h
+++ b/sys/dev/my/if_myreg.h
@@ -369,7 +369,6 @@ struct my_softc {
struct my_list_data *my_ldata;
struct my_chain_data my_cdata;
device_t my_miibus;
- struct callout_handle my_stat_ch;
/* Add by Surfer 2001/12/2 */
struct mtx my_mtx;
@@ -378,6 +377,7 @@ struct my_softc {
/* Add by Surfer 2001/12/2 */
#define MY_LOCK(_sc) mtx_lock(&(_sc)->my_mtx)
#define MY_UNLOCK(_sc) mtx_unlock(&(_sc)->my_mtx)
+#define MY_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->my_mtx, MA_OWNED)
/*
* register space access macros