summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usb_ethersubr.h
Commit message (Collapse)AuthorAgeFilesLines
* Update netisr handling; Each SWI now registers its queue, and all queuejlemon2003-03-041-4/+0
| | | | | | | | | | drain routines are done by swi_net, which allows for better queue control at some future point. Packets may also be directly dispatched to a netisr instead of queued, this may be of interest at some installations, but currently defaults to off. Reviewed by: hsu, silby, jayanth, sam Sponsored by: DARPA, NAI Labs
* Remove __P.alfred2002-03-201-4/+4
|
* Pull my head out of my ass and actually make the tx netisr stuff work right.wpaul2000-01-141-1/+1
| | | | | | | | | Do not not not call m_freem() in the txeof routines. Let the netisr routine do it. This also makes the tx netisr queuing much simpler (I can just use another ifqueue instead of the mess I had before.) Thanks to Bosko Milekic for making me actually think about what I was doing for a minute.
* Bunch of updates:wpaul2000-01-131-0/+5
| | | | | | | | | | | | | | | - Add vendor/device ID for Corega USB-T ethernet adapter to necessary places so that it will work with the kue driver. - Add vendor/device ID for CATC Netmate devices for driver to be added soon. - Get really crazy about netisr stuff: avoid doing any mbuf allocations or deallocations at splbio/splusb. - Fix if_aue driver so that it works with LinkSys USB100TX: you need to flip the GPIO bits just the right way to put the PHY in the right mode.
* Apply the same netisr mechanism to transmissions as well. In order towpaul2000-01-121-0/+1
| | | | | | | | | | drive the transmitter, we have to check the interface's send queue in the TX end of frame handler (i.e. the usb bulk out callback) and push out new transmissions if the queue has packets in it and the transmitter is ready. But the txeof handler is also called from a USB callback running at splusb() too. Grrr.
* Attempt to fix a problem with receiving packets on USB ethernet interfaces.wpaul2000-01-101-0/+45
Packets are received inside USB bulk transfer callbacks, which run at splusb() (actually splbio()). The packet input queues are meant to be manipulated at splimp(). However the locking apparently breaks down under certain circumstances and the input queues can get trampled. There's a similar problem with if_ppp, which is driven by hardware/tty interrupts from the serial driver, but which must also manipulate the packet input queues at splimp(). The fix there is to use a netisr, and that's the fix I used here. (I can hear you groaning back there. Hush up.) The usb_ethersubr module maintains a single queue of its own. When a packet is received in the USB callback routine, it's placed on this queue with usb_ether_input(). This routine also schedules a soft net interrupt with schednetisr(). The ISR routine then runs later, at splnet, outside of the USB callback/interrupt context, and passes the packet to ether_input(), hopefully in a safe manner. The reason this is implemented as a separate module is that there are a limited number of NETISRs that we can use, and snarfing one up for each driver that needs it is wasteful (there will be three once I get the CATC driver done). It also reduces code duplication to a certain small extent. Unfortunately, it also needs to be linked in with the usb.ko module in order for the USB ethernet drivers to share it. Also removed some uneeded includes from if_aue.c and if_kue.c Fix suggested by: peter Not rejected as a hairbrained idea by: n_hibma
OpenPOWER on IntegriCloud