summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/if_cdcef.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Retire zaurus, as it hasn't made the EABI jump and will be permanently brokenguenther2016-09-031-557/+0
| | | | shortly when we use the hardware thread register in userland
* G/C IFQ_SET_READY().mpi2016-04-131-3/+1
|
* Call ether_fakeaddr() instead of faking Ethernet addresses manually.mpi2016-04-121-11/+3
| | | | Input from and ok jsg@
* replace IFF_OACTIVE manipulation with mpsafe operations.dlg2015-11-251-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | there are two things shared between the network stack and drivers in the send path: the send queue and the IFF_OACTIVE flag. the send queue is now protected by a mutex. this diff makes the oactive functionality mpsafe too. IFF_OACTIVE is part of if_flags. there are two problems with that. firstly, if_flags is a short and we dont have any MI atomic operations to manipulate a short. secondly, while we could make the IFF_OACTIVE operates mpsafe, all changes to other flags would have to be made safe at the same time, otherwise a read-modify-write cycle on their updates could clobber the oactive change. instead, this moves the oactive mark into struct ifqueue and provides an API for changing it. there's ifq_set_oactive, ifq_clr_oactive, and ifq_is_oactive. these are modelled on ifsq_set_oactive, ifsq_clr_oactive, and ifsq_is_oactive in dragonflybsd. this diff includes changes to all the drivers manipulating IFF_OACTIVE to now use the ifsq_{set,clr_is}_oactive API too. ok kettenis@ mpi@ jmatthew@ deraadt@
* too many arguments to function 'ifq_deq_begin'dlg2015-11-221-2/+2
| | | | found by deraadt@
* shuffle struct ifqueue so in flight mbufs are protected by a mutex.dlg2015-11-201-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the code is refactored so the IFQ macros call newly implemented ifq functions. the ifq code is split so each discipline (priq and hfsc in our case) is an opaque set of operations that the common ifq code can call. the common code does the locking, accounting (ifq_len manipulation), and freeing of the mbuf if the disciplines enqueue function rejects it. theyre kind of like bufqs in the block layer with their fifo and nscan disciplines. the new api also supports atomic switching of disciplines at runtime. the hfsc setup in pf_ioctl.c has been tweaked to build a complete hfsc_if structure which it attaches to the send queue in a single operation, rather than attaching to the interface up front and building up a list of queues. the send queue is now mutexed, which raises the expectation that packets can be enqueued or purged on one cpu while another cpu is dequeueing them in a driver for transmission. a lot of drivers use IFQ_POLL to peek at an mbuf and attempt to fit it on the ring before committing to it with a later IFQ_DEQUEUE operation. if the mbuf gets freed in between the POLL and DEQUEUE operations, fireworks will ensue. to avoid this, the ifq api introduces ifq_deq_begin, ifq_deq_rollback, and ifq_deq_commit. ifq_deq_begin allows a driver to take the ifq mutex and get a reference to the mbuf they wish to try and tx. if there's space, they can ifq_deq_commit it to remove the mbuf and release the mutex. if there's no space, ifq_deq_rollback simply releases the mutex. this api was developed to make updating the drivers using IFQ_POLL easy, instead of having to do significant semantic changes to avoid POLL that we cannot test on all the hardware. the common code has been tested pretty hard, and all the driver modifications are straightforward except for de(4). if that breaks it can be dealt with later. ok mpi@ jmatthew@
* arp_ifinit() is no longer needed.mpi2015-10-251-4/+1
|
* Increment if_ipackets in if_input().mpi2015-06-241-2/+1
| | | | | | | Note that pseudo-drivers not using if_input() are not affected by this conversion. ok mikeb@, kettenis@, claudio@, dlg@
* Convert remaining USB Ethernet adapter to if_input().mpi2015-04-101-13/+6
| | | | ok dlg@
* unifdef INETtedu2014-12-221-3/+1
|
* No need for <netinet/in_systm.h> here.mpi2014-07-131-3/+1
|
* Some cleaning up of the ioctl handling bits to bring things in linebrad2013-12-071-11/+11
| | | | with the other drivers. No functional change.
* use dv_unit rather than storing (or forgetting to store...) a localderaadt2013-12-041-3/+2
| | | | | version noted by uaa@
* Kill commented out code dealing with a non existent sc_dying variable.mpi2013-11-111-8/+1
|
* Kill sc_attached, attach and detach events for USB devices are triggeredmpi2013-10-291-3/+1
| | | | by the same explore task and cannot happen in parallel.
* Most network drivers include netinet/in_var.h, but apparently theybluhm2013-08-071-2/+1
| | | | | don't have to. Just remove these include lines. Compiled on amd64 i386 sparc64; OK henning@ mikeb@
* Get rid of various 'typedef struct' definitions and use plain structuremglocker2013-04-151-17/+17
| | | | | | | | | definitions instead. We don't change usb.h for now to stay compatible with userland. Tested by mpi@ on macppc and myself on i386. ok mpi@
* backout previous. this is not a regular usb device driver, and thusjakemsr2010-12-301-21/+2
| | | | | | has no usbd_device. found the hard way by deraadt
* * add cfattach activate functions and call usbd_deactivate() in thejakemsr2010-12-271-2/+21
| | | | | | | | DVACT_DEACTIVATE case for drivers that don't have activate finctions * fill out cfattach activate functions and call usbd_deactivate() in the DVACT_DEACTIVATE case for drivers that don't have a dying flag "ok with the intent" miod@
* Interface drivers should use DV_IFNET, not DV_DULL.matthew2010-06-291-2/+2
| | | | ok deraadt@
* typos in comments: recieve -> receive.matthieu2008-12-071-4/+4
|
* Fix damage done by brad@ and dlg@.matthieu2008-11-291-3/+4
|
* Eliminate the redundant bits of code for MTU and multicast handlingbrad2008-11-281-18/+4
| | | | | | | | | | | | | | from the individual drivers now that ether_ioctl() handles this. Shrinks the i386 kernels by.. RAMDISK - 2176 bytes RAMDISKB - 1504 bytes RAMDISKC - 736 bytes Tested by naddy@/okan@/sthen@/brad@/todd@/jmc@ and lots of users. Build tested on almost all archs by todd@/brad@ ok naddy@
* First step towards cleaning up the Ethernet driver ioctl handling.brad2008-10-021-4/+2
| | | | | | | | | | | | | | | | | | | | Move calling ether_ioctl() from the top of the ioctl function, which at the moment does absolutely nothing, to the default switch case. Thus allowing drivers to define their own ioctl handlers and then falling back on ether_ioctl(). The only functional change this results in at the moment is having all Ethernet drivers returning the proper errno of ENOTTY instead of EINVAL/ENXIO when encountering unknown ioctl's. Shrinks the i386 kernels by.. RAMDISK - 1024 bytes RAMDISKB - 1120 bytes RAMDISKC - 832 bytes Tested by martin@/jsing@/todd@/brad@ Build tested on almost all archs by todd@/brad@ ok jsing@
* spelling fixes, from Martynas Venckus;jmc2007-11-251-2/+2
|
* fix output after deraadts fixes in usb. prints attach and address info ondlg2007-11-131-11/+10
| | | | | | one line now. ok deraadt@
* treat usb vendor/product names as a locator, and have usbd_print handle it,deraadt2007-10-111-6/+1
| | | | | | so that it shows up before the :. as a result, all the usb devices do not need to have name printing code anymore. all this now works and prints nicely because usbd_probe_and_attach() is serialized. ok kettenis
* Move the inclusion of sys/timeout.h from usb_port.h to the drivers thatmbalmer2007-06-141-1/+2
| | | | | | | | | | | need it. If a USB driver uses timeout(9) functions, the header file sys/timeout.h must be included. Tested by me (i386, macppc, sparc64), ckuethe (amd64), & todd (sparc, zaurus). ok dlg.
* Remove the definition and usage of the IF_INPUT macro which was definedmbalmer2007-06-131-2/+2
| | | | | | | | as ether_input_mbuf which is itself a macro for ether_input. No binary change. ok dlg.
* Remove the definition and use of the USBDEVNAME macro.mbalmer2007-06-101-2/+2
| | | | | | | (This might look easy, but it was a big diff. Thanks to dlg and especially jsg for looking over it; we found at least four mistakes in the initial diff.) ok jsg.
* Some other missed bits.jsg2007-05-271-2/+2
|
* Farewell USB_{ATTACH,MATCH,DETACH}* you will not be missed.jsg2007-05-271-13/+13
| | | | ok deraadt@ krw@ mbalmer@
* Remove Ether_ifattach macrojsg2007-05-211-2/+2
|
* Fix typo, allowing this to compile again. Committed over cdcef0ckuethe2007-02-261-2/+2
| | | | ok millert
* Make the buffer size more reasonable, drop packets that dont fit in buffer.drahn2007-02-261-5/+8
|
* Add myself to copyright since I took the skeleton driver and made it complete.drahn2007-02-241-8/+26
| | | | | | Work around a transmit hang problem by setting a delay on transmitting back-to-back packets. Count dropped packets as input errors. Abort pipe if a watchdog occurs to clean up state better.
* Use FORCE_SHORT_XFER on tx, hardware driver doesn't use it yet, but will.drahn2007-02-231-2/+3
|
* Reorder endpoints so that endpoint numbers match, remove more debug.drahn2007-02-151-11/+5
|
* Dont hang completely on watchdog.drahn2007-02-151-1/+11
|
* It is not valid to have the input endpoint and output endpoint the same.drahn2007-02-151-2/+2
|
* USB host is not scanning for packets if attached but cdce is not up.drahn2007-02-151-2/+17
| | | | | As an initial workaround for this, do not attempt to send any packets until a packet has been recieved.
* USB client mode with cdce function driver is coming along, RX and TX kinda work.drahn2007-02-131-17/+330
| | | | | | Limitations include failing to recieve packets that are a multiple of 64 bytes and sending packets longer than 128 bytes appears to be messed up. Work in progress.
* Several improvements to the usb client code. Still not working.drahn2007-02-071-7/+12
|
* Initial USB device controller (UDC) and USB CDC Ethernet function supportuwe2006-11-251-0/+252
for PXA27x/Zaurus, not enabled yet; for dlg and dale :)