summaryrefslogtreecommitdiffstats
path: root/sys/dev/an/if_anreg.h
diff options
context:
space:
mode:
authorambrisko <ambrisko@FreeBSD.org>2008-01-18 16:31:24 +0000
committerambrisko <ambrisko@FreeBSD.org>2008-01-18 16:31:24 +0000
commit22d76bf90958438be196e171ba26c47a2893217b (patch)
tree9d767f04c28d898a4047e90e47cc5f000de30fec /sys/dev/an/if_anreg.h
parentae86af8218f9798ff70696ccc00d8f840fe386e0 (diff)
downloadFreeBSD-src-22d76bf90958438be196e171ba26c47a2893217b.zip
FreeBSD-src-22d76bf90958438be196e171ba26c47a2893217b.tar.gz
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@
Diffstat (limited to 'sys/dev/an/if_anreg.h')
-rw-r--r--sys/dev/an/if_anreg.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/dev/an/if_anreg.h b/sys/dev/an/if_anreg.h
index 0a96ee3..fb2d6a7 100644
--- a/sys/dev/an/if_anreg.h
+++ b/sys/dev/an/if_anreg.h
@@ -509,6 +509,7 @@ int an_alloc_port (device_t, int, int);
int an_alloc_memory (device_t, int, int);
int an_alloc_aux_memory (device_t, int, int);
int an_alloc_irq (device_t, int, int);
+int an_pci_probe (device_t);
int an_probe (device_t);
void an_shutdown (device_t);
void an_resume (device_t);
OpenPOWER on IntegriCloud