opnsense-src/sys
Bill Paul 1e35c8564a Fix the problem with the Cisco Aironet 340 PCMCIA card. Most newer drivers
for Windows are deserialized miniports. Such drivers maintain their own
queues and do their own locking. This particular driver is not deserialized
though, and we need special support to handle it correctly.

Typically, in the ndis_rxeof() handler, we pass all incoming packets
directly to (*ifp->if_input)(). This in turn may cause another thread
to run and preempt us, and the packet may actually be processed and
then released before we even exit the ndis_rxeof() routine. The
problem with this is that releasing a packet calls the ndis_return_packet()
function, which hands the packet and its buffers back to the driver.
Calling ndis_return_packet() before ndis_rxeof() returns will screw
up the driver's internal queues since, not being deserialized,
it does no locking.

To avoid this problem, if we detect a serialized driver (by checking
the attribute flags passed to NdisSetAttributesEx(), we use an alternate
ndis_rxeof() handler, ndis_rxeof_serial(), which puts the call to
(*ifp->if_input)() on the NDIS SWI work queue. This guarantees the
packet won't be processed until after ndis_rxeof_serial() returns.

Note that another approach is to always copy the packet data into
another mbuf and just let the driver retain ownership of the ndis_packet
structure (ndis_return_packet() never needs to be called in this
case). I'm not sure which method is faster.
2004-03-11 09:40:00 +00:00
..
alpha Retire pmap_pinit2(). Alpha was the last platform that used it. However, 2004-03-07 21:06:48 +00:00
amd64 Remove stale or broken call to kdb_trap() and protected by the non- 2004-03-11 00:17:45 +00:00
arm
boot Reset the text attributes when initializing the console. The EFI 2004-03-09 04:00:33 +00:00
cam Compare the *number* of patterns to zero, not the *pointer* to the 2004-02-28 12:59:56 +00:00
coda Device megapatch 5/6: 2004-02-21 21:32:15 +00:00
compat Fix the problem with the Cisco Aironet 340 PCMCIA card. Most newer drivers 2004-03-11 09:40:00 +00:00
conf Link pf to the build and install: 2004-03-08 22:03:29 +00:00
contrib Remove `$Name$' leftovers from the port version reporting. 2004-03-10 15:08:21 +00:00
crypto Fix a reentrancy issue in md5_calc(). 2004-01-27 18:57:21 +00:00
ddb Give DDB a "watchdog" command which disables all watchdogs. 2004-02-29 09:55:32 +00:00
dev Fix the problem with the Cisco Aironet 340 PCMCIA card. Most newer drivers 2004-03-11 09:40:00 +00:00
fs Don't call devsw() more than we need to, and in particular do not expose 2004-03-10 20:56:28 +00:00
geom Be more insistent on destroying geoms at unload time. Still not perfect, 2004-03-11 08:16:23 +00:00
gnu Enforce the file size limit in VOP_WRITE() as well as VOP_TRUNCATE(); 2004-02-19 09:06:06 +00:00
i4b Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
i386 Remove stale or broken call to kdb_trap() and protected by the non- 2004-03-11 00:17:45 +00:00
ia64 Identify the Deerfield processor. Deerfield is a low-voltage variant 2004-03-10 22:23:20 +00:00
isa Remove unused FDNUMTOUNIT() macro 2004-02-29 10:21:40 +00:00
isofs/cd9660 Fix comment containing vop_readdir_args contents: a_cookies is really 2004-02-23 01:43:00 +00:00
kern make sure we had the filedesc lock when calling fdinit when RFCFDG is set 2004-03-10 00:27:36 +00:00
libkern Remove register keyword and constify tmp values. This fixes 2004-02-12 03:23:13 +00:00
modules Link pf to the build and install: 2004-03-08 22:03:29 +00:00
net Fix handling of tap/vmnet flag in relation to cloning and properly enforce 2004-03-10 08:02:29 +00:00
net80211 Change WI_RID_SCAN_RES compatibility interface to return the result after 2004-01-19 05:25:43 +00:00
netatalk Rename dup_sockaddr() to sodupsockaddr() for consistency with other 2004-03-01 03:14:23 +00:00
netatm Don't remove the first mbuf in the chain if it got empty. 2004-02-21 12:55:07 +00:00
netgraph Add a netgraph node to handle ATM LLC encapsulation. This currently handles 2004-03-08 10:54:35 +00:00
netinet Lock down IP-layer encapsulation library: 2004-03-10 02:48:50 +00:00
netinet6 Move the AH algorithm list from a static local function variable to 2004-03-10 04:56:54 +00:00
netipsec Fix type in a sysctl. It used to be: net.key.prefered_oldsa 2004-02-16 17:09:53 +00:00
netipx Rename dup_sockaddr() to sodupsockaddr() for consistency with other 2004-03-01 03:14:23 +00:00
netkey avoid duplicate free. 2004-01-25 17:18:12 +00:00
netnatm Rename dup_sockaddr() to sodupsockaddr() for consistency with other 2004-03-01 03:14:23 +00:00
netncp Split the mlock() kernel code into two parts, mlock(), which unpacks 2004-02-26 00:27:04 +00:00
netsmb Rename dup_sockaddr() to sodupsockaddr() for consistency with other 2004-03-01 03:14:23 +00:00
nfs University of Michigan's Citi NFSv4 kernel client code. 2003-11-14 20:54:10 +00:00
nfs4client kthread_exit() no longer requires Giant, so don't force callers to acquire 2004-03-05 22:42:17 +00:00
nfsclient Rename dup_sockaddr() to sodupsockaddr() for consistency with other 2004-03-01 03:14:23 +00:00
nfsserver Convert from timeout to callout API. 2004-03-07 16:28:31 +00:00
opencrypto kthread_exit() no longer requires Giant, so don't force callers to acquire 2004-03-05 22:42:17 +00:00
pc98 Restore CDIOCREADAUDIO ioctl. 2004-03-07 14:16:42 +00:00
pccard Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
pci Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
posix4 The sem_timedwait() and ksem_timedwait() functions both 2004-02-03 22:27:03 +00:00
powerpc Retire pmap_pinit2(). Alpha was the last platform that used it. However, 2004-03-07 21:06:48 +00:00
rpc Convert from timeout to callout API. 2004-03-07 16:23:03 +00:00
security Define BPFD_LOCK_ASSERT() to assert the BPF descriptor lock. 2004-02-29 15:33:56 +00:00
sparc64 Change time_t from a 32-bit value to a 64-bit value, on FreeBSD/sparc64 2004-03-10 17:39:05 +00:00
sys Fix a long-standing deadlock issue with vnode backed md(4) devices: 2004-03-10 20:41:09 +00:00
tools Attempt to clean up the emu10k1-alsa.h stuff so that config doesn't 2004-02-05 22:51:16 +00:00
ufs A more accurate test in the new ufs_lock than that in 1.235. 2004-02-23 19:05:05 +00:00
vm - Make the acquisition of Giant in vm_fault_unwire() conditional on the 2004-03-10 04:44:43 +00:00
Makefile Replaced outdated comment. 2004-01-17 03:28:27 +00:00