freebsd-nq/sys/compat
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
..
freebsd32 Regen (FWIW) 2004-02-21 23:38:58 +00:00
ia32 Add a note about the landmine in the middle of struct ia32_sigframe. 2004-02-21 23:36:31 +00:00
linprocfs Remove VFS_STATFS() call which violated the lock order and wasn't 2004-02-09 20:33:42 +00:00
linux Device megapatch 5/6: 2004-02-21 21:32:15 +00:00
ndis Fix the problem with the Cisco Aironet 340 PCMCIA card. Most newer drivers 2004-03-11 09:40:00 +00:00
netbsd Don't include <sys/buf.h> needlessly. 2003-04-01 09:02:58 +00:00
pecoff Add sysentvec->sv_fixlimits() hook so that we can catch cases on 64 bit 2003-09-25 01:10:26 +00:00
svr4 I guess nobody has needed to use the SVR4olator to create device 2004-02-07 18:54:34 +00:00