cvs commit: src/sys/dev/an if_an.c if_an_pci.c if_anreg.h
Doug Ambrisko
ambrisko at FreeBSD.org
Fri Jan 18 08:31:25 PST 2008
ambrisko 2008-01-18 16:31:24 UTC
FreeBSD src repository
Modified files:
sys/dev/an if_an.c if_an_pci.c if_anreg.h
Log:
First real attempt at proper locking. The locking is a little complicated
since the the command and data that is being built to be sent to or read
from the HW lives in the softc. Commands are later run via an_setdef etc.
In the ioctl path various references are kept to the data stored in
the softc so it needs to be protected. Almost think of the command
in the softc a global variable since it essentially is. Since locking
wasn't done in this type of context the commands would get corrupted.
Thanks to avatar@ for catching some lock issues and dhw@ for testing.
Things are a lot more stable except for the MPI-350 cards. My an(4)
remote laptop stays on the network now.
The driver should be changed so that it uses private memory that is passed
to the functions that talk to the card. Then only those functions would
really need to grab locks.
Reviewed by: avatar@
Revision Changes Path
1.87 +248 -121 src/sys/dev/an/if_an.c
1.29 +4 -1 src/sys/dev/an/if_an_pci.c
1.25 +1 -0 src/sys/dev/an/if_anreg.h
More information about the cvs-src
mailing list