summaryrefslogtreecommitdiff
path: root/sys/dev/usb/if_aue.c
Commit message (Collapse)AuthorAgeFilesLines
* Move usb to a graveyard location under sys/legacy/dev, it is intended that theAndrew Thompson2009-02-231-1498/+0
| | | | | | | | | | new USB2 stack will fully replace this for 8.0. Remove kernel modules, a subsequent commit will update conf/files. Unhook usbdevs from the build. Notes: svn path=/head/; revision=188939
* Add a quirk for Belkin USB Bluetooth adapters (F8T012xx1 series)Giorgos Keramidas2008-11-121-0/+9
| | | | | | | | | | | | | | The same (vendor, product) tuple is used for aue(4) adapters, but I am not sure if the quirk is correct. I'm using the USB device 'release' info to skip aue(4) detection right now, but if there's a better way to differentiate between USB-LAN and USB Bluetooth we should update the quirk. Reviewed by: imp, rink MFC after: 2 weeks Notes: svn path=/head/; revision=184882
* Replace callout_init(..., 1) with callout_init(..., CALLOUT_MPSAFE) forKris Kennaway2008-04-161-1/+1
| | | | | | | | | | better grep-compliance and to standardize with the rest of the kernel. Reviewed by: jhb MFC after: 1 week Notes: svn path=/head/; revision=178250
* Remove duplicate ID and recall that I comes after E in alphabeticalWarner Losh2007-06-231-2/+1
| | | | | | | | | listings. Approved by: re@ Notes: svn path=/head/; revision=171001
* Merge some device IDs from OpenBSD for aue. Minor sorting of usbdevsWarner Losh2007-06-231-0/+9
| | | | | | | | | | to fix disorder. Obtained from: OpenBSD Approved by: re@ (blanket) Notes: svn path=/head/; revision=171000
* USB Ethernet Adaptor "ELECOM LD-USB20"Warner Losh2007-06-221-0/+1
| | | | | | | | | PR: 86195 Submitted by: kato <redzonemiata@yahoo.co.jp> Approved by: re (kensmith) Notes: svn path=/head/; revision=170981
* Fix two PRs by adding vendor IDs:Warner Losh2007-06-211-0/+1
| | | | | | | | | | | PR 108097: ADMtek 851X USB-to-LAN adapter PR 74849: Samsung SPH-i500 does not attach properly as usb modem/Palm device PR: 108097, 74849 Approved by: re@ (kensmith trivial usb blanket) Notes: svn path=/head/; revision=170971
* Use device_foo_t to declare kobj methodsWarner Losh2007-06-181-9/+9
| | | | | | | Fix shutdown type to return int rather than void. Notes: svn path=/head/; revision=170935
* Remove USBGETSOFTC, USB_ATTACH_START, USB_DETACH_START andWarner Losh2007-06-171-4/+5
| | | | | | | USB_DECLARE_DRIVER_INIT from the usb network drivers. Notes: svn path=/head/; revision=170892
* Expand USB_MATCH_STARTWarner Losh2007-06-171-1/+1
| | | | Notes: svn path=/head/; revision=170886
* Expand USB_DETACH, USB_ATTACH and USB_MATCH inline. No functionalWarner Losh2007-06-131-2/+4
| | | | | | | change, and MD5's appear to be the same. Notes: svn path=/head/; revision=170655
* Expand USB_ATTACH_{ERROR,SUCCESS}_RETURN inline and eliminate fromWarner Losh2007-06-121-6/+6
| | | | | | | usb_port.h. They aren't needed, and are a legacy of this code's past. Notes: svn path=/head/; revision=170612
* Get rid of useless devinfo stuffWarner Losh2007-06-111-40/+28
| | | | | | | | | | Kill bogus bzero prefer device_printf to printf Reviewed by: alfred@ Notes: svn path=/head/; revision=170540
* Optimize sx locks to use simple atomic operations for the common cases ofJohn Baldwin2007-03-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | obtaining and releasing shared and exclusive locks. The algorithms for manipulating the lock cookie are very similar to that rwlocks. This patch also adds support for exclusive locks using the same algorithm as mutexes. A new sx_init_flags() function has been added so that optional flags can be specified to alter a given locks behavior. The flags include SX_DUPOK, SX_NOWITNESS, SX_NOPROFILE, and SX_QUITE which are all identical in nature to the similar flags for mutexes. Adaptive spinning on select locks may be enabled by enabling the ADAPTIVE_SX kernel option. Only locks initialized with the SX_ADAPTIVESPIN flag via sx_init_flags() will adaptively spin. The common cases for sx_slock(), sx_sunlock(), sx_xlock(), and sx_xunlock() are now performed inline in non-debug kernels. As a result, <sys/sx.h> now requires <sys/lock.h> to be included prior to <sys/sx.h>. The new kernel option SX_NOINLINE can be used to disable the aforementioned inlining in non-debug kernels. The size of struct sx has changed, so the kernel ABI is probably greatly disturbed. MFC after: 1 month Submitted by: attilio Tested by: kris, pjd Notes: svn path=/head/; revision=168191
* Add ALTQ support for aue(4).Max Laier2007-02-031-5/+7
| | | | | | | | Tested by: Greg Hennessy, Volker MFC after: 1 week Notes: svn path=/head/; revision=166464
* Remove my "custom" locks that allow for lock acquire abort, they areAlfred Perlstein2007-01-081-168/+45
| | | | | | | | | | | | | not needed if the proper ordering is done in attach and shutdown. Remove usage of if_timer/watchdog and roll my own by piggybacking off the tick() function. Use the new usb system to allocate task queues instead of using the system wide thread for taskqueues. Notes: svn path=/head/; revision=165902
* Fix a deadlock in detach/shutdown.Alfred Perlstein2006-12-231-15/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that I was acquiring the driver sx lock and then waiting for a taskqueue to drain, however the taskqueue itself would try to acquire the lock as well leading to a deadlock. To fix the problem roll my own exclusive lock that allows for lock cancellation. This is a normal exclusive lock, however if someone marks it as "dead" then all waiters who request an error return will get back an error instead of continuing to wait for the lock. In this particular case, the shutdown and detach functions kill the lock while the async task thread tries to acquire the lock but will abort if the lock returns an error. The other option was to drop the driver lock mid-detach and mid-shutdown, mid-detach was a ok, however mid-shutdown was not. While I'm here, fix a bug in what appears to be the mii link status word in the softc going out to lunch. Explicitly set the status word to 1 after initializing the mii. This would result in an interface that would never respond to "if_start" requests as the mii interface would always look down. Notes: svn path=/head/; revision=165497
* Use callouts to prevent races.Alfred Perlstein2006-12-131-6/+9
| | | | | | | Cleanup debug code. Notes: svn path=/head/; revision=165191
* defer all processing to a full fledged thread.Alfred Perlstein2006-12-111-172/+155
| | | | | | | | once usb is SMP safe, this should be the first SMPsafe usb ethernet driver. Notes: svn path=/head/; revision=165094
* Stop INVARIANTS panics in if_aue with a stopgap.Alfred Perlstein2006-11-291-7/+31
| | | | | | | | | | | | aue_tick calls several synchronous usb functions from a timeout(9), this is very broken since a timeout(9) is run as an interrupt and the usb functions tsleep. A stopgap fix is to schedule a taskqueue task from the timeout and defer work to that taskqueue task. Notes: svn path=/head/; revision=164756
* Add support for Netgear FA101 ethernet USB NIC.Florent Thoumie2006-10-071-0/+1
| | | | | | | | | PR: usb/102286 Submitted by: Volker <volker@vwsoft.com> MFC after: 3 days Notes: svn path=/head/; revision=163093
* More removing compatibility macros.Warner Losh2006-09-071-2/+2
| | | | | | | | | md5 still the same. "Dave, stop. I feel my mind slipping away." -- hal Notes: svn path=/head/; revision=162097
* s/Static/static/gWarner Losh2006-09-061-69/+69
| | | | | | | | | | | | | s/device_ptr_t/device_t/g No md5 changes in the .o's # Note to the md5 tracking club: $FreeBSD$ changes md5 after every commit # so you need to checkout -kk to get $FreeBSD$ instead of the actual value # of the keyword. Notes: svn path=/head/; revision=162095
* Change the multicast calculation to be the same as the other usb drivers andAndrew Thompson2006-07-051-5/+6
| | | | | | | | avoid calling into the usb code with the lock held. This doenst fix the fundamental usb sleeping problem but at least the adapter can be used. Notes: svn path=/head/; revision=160101
* Do not touch ifp->if_baudrate in miibus aware drivers.Gleb Smirnoff2006-02-141-1/+0
| | | | Notes: svn path=/head/; revision=155671
* - Store pointer to the link-level address right in "struct ifnet"Ruslan Ermilov2005-11-111-1/+1
| | | | | | | | | | | | | rather than in ifindex_table[]; all (except one) accesses are through ifp anyway. IF_LLADDR() works faster, and all (except one) ifaddr_byindex() users were converted to use ifp->if_addr. - Stop storing a (pointer to) Ethernet address in "struct arpcom", and drop the IFP2ENADDR() macro; all users have been converted to use IF_LLADDR() instead. Notes: svn path=/head/; revision=152315
* Replace FreeBSD 3.x syntax (controller miibus0) with 4.x syntaxWarner Losh2005-10-221-1/+1
| | | | | | | (device miibus) in time for 7.0 :-) Notes: svn path=/head/; revision=151545
* Add missing mtx_destroy() when if_alloc() fails.Ruslan Ermilov2005-09-161-1/+6
| | | | | | | | Add missing if_free() when mii_phy_probe() fails. Put if_free() into the correct #ifdef in detach(). Notes: svn path=/head/; revision=150211
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andRobert Watson2005-08-091-14/+14
| | | | | | | | | | | | | | | | | IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to ifnet.if_drv_flags. Device drivers are now responsible for synchronizing access to these flags, as they are in if_drv_flags. This helps prevent races between the network stack and device driver in maintaining the interface flags field. Many __FreeBSD__ and __FreeBSD_version checks maintained and continued; some less so. Reviewed by: pjd, bz MFC after: 7 days Notes: svn path=/head/; revision=148887
* Modify device drivers supporting multicast addresses to lock if_addr_mtxRobert Watson2005-08-031-0/+2
| | | | | | | | | | | over iteration of their multicast address lists when synchronizing the hardware address filter with the network stack-maintained list. Problem reported by: Ed Maste (emaste at phaedrus dot sandvine dot ca> MFC after: 1 week Notes: svn path=/head/; revision=148654
* Stop embedding struct ifnet at the top of driver softcs. Instead theBrooks Davis2005-06-101-13/+17
| | | | | | | | | | | | | | | | | | | | | | | struct ifnet or the layer 2 common structure it was embedded in have been replaced with a struct ifnet pointer to be filled by a call to the new function, if_alloc(). The layer 2 common structure is also allocated via if_alloc() based on the interface type. It is hung off the new struct ifnet member, if_l2com. This change removes the size of these structures from the kernel ABI and will allow us to better manage them as interfaces come and go. Other changes of note: - Struct arpcom is no longer referenced in normal interface code. Instead the Ethernet address is accessed via the IFP2ENADDR() macro. To enforce this ac_enaddr has been renamed to _ac_enaddr. - The second argument to ether_ifattach is now always the mac address from driver private storage rather than sometimes being ac_enaddr. Reviewed by: sobomax, sam Notes: svn path=/head/; revision=147256
* Fix breakage in the previous commit caused by the last-minute change.Maxim Sobolev2005-03-251-3/+2
| | | | Notes: svn path=/head/; revision=144106
* Move Rx/Tx lists management routines into central location.Maxim Sobolev2005-03-251-126/+50
| | | | Notes: svn path=/head/; revision=144104
* Move xxx_newbuf() function, which was the same in all drivers into centralMaxim Sobolev2005-03-251-39/+5
| | | | | | | location. Notes: svn path=/head/; revision=144086
* Mark USB ethernet devices as IFF_NEEDSGIANT, since the USB frameworkRobert Watson2004-08-111-1/+2
| | | | | | | | | | | | if_start routines cannot currently be entered without Giant. When the kernel is running with debug.mpsafenet != 0, this will defer if_start execution to a task queue thread holding Giant, which may introduce additional latency, but avoid incorrect execution. Suggested by: dfr Notes: svn path=/head/; revision=133466
* MFp4: First batch of dev/usb/usbdevs.h -> usbdevs.h changes.Warner Losh2004-06-271-1/+1
| | | | Notes: svn path=/head/; revision=131187
* Replace handrolled CRC calculation with ether_crc32_[lb]e().Christian Weisgerber2004-06-091-21/+2
| | | | Notes: svn path=/head/; revision=130270
* Add missing <sys/module.h> includesPoul-Henning Kamp2004-05-301-0/+1
| | | | Notes: svn path=/head/; revision=129879
* We don't need to initialize if_output, ether_ifattach() does itMaxime Henrion2004-05-231-1/+0
| | | | | | | for us. Notes: svn path=/head/; revision=129616
* Replace the static "qdat" structure with a per-instance softc fieldIan Dowse2004-05-231-5/+3
| | | | | | | | | | | | | | | | in all USB ethernet drivers. The qdat structure contains a pointer to the interface's struct ifnet and is used to process incoming packets, so simultaneous use of two similar devices caused crashes and confusion. The if_udav driver appeared in the tree since Daan's PR, so I made similar changes to that driver too. PR: kern/59290 Submitted by: Daan Vreeken <Danovitsch@Vitsch.net> Notes: svn path=/head/; revision=129607
* Add support for the ADMtek AN8513 USB Ethernet adapter.David E. O'Brien2004-04-161-0/+1
| | | | | | | Submitted by: taxman <taxman@freedombi.com> Notes: svn path=/head/; revision=128303
* Announce ethernet MAC addresss in ether_ifattach().Matthew N. Dodd2004-03-141-5/+0
| | | | Notes: svn path=/head/; revision=126966
* Add support HP hn210e usb ethernetMIHIRA Sanpei Yoshiro2003-12-171-0/+1
| | | | | | | | PR: kern/60156 Submitted by: M. L. Dodson <bdodson@scms.utmb.edu> Notes: svn path=/head/; revision=123605
* Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones.David E. O'Brien2003-12-081-5/+5
| | | | | | | Requested by: bde,imp Notes: svn path=/head/; revision=123289
* Remove duplicateJohan Karlsson2003-11-141-3/+0
| | | | | | | | | | #include <sys/cdefs.h> __FBSDID(...); Leave the one matching the other files in this directory. Notes: svn path=/head/; revision=122655
* Try to create some sort of consistency in how the routings to find theDavid E. O'Brien2003-11-131-5/+7
| | | | | | | | | | multicast hash are written. There are still two distinct algorithms used, and there actually isn't any reason each driver should have its own copy of this function as they could all share one copy of it (if it grew an additional argument). Notes: svn path=/head/; revision=122625
* Replace the if_name and if_unit members of struct ifnet with new membersBrooks Davis2003-10-311-2/+1
| | | | | | | | | | | | | | | | if_xname, if_dname, and if_dunit. if_xname is the name of the interface and if_dname/unit are the driver name and instance. This change paves the way for interface renaming and enhanced pseudo device creation and configuration symantics. Approved By: re (in principle) Reviewed By: njl, imp Tested On: i386, amd64, sparc64 Obtained From: NetBSD (if_xname) Notes: svn path=/head/; revision=121816
* Make it easier to run this code on RELENG_4.Josef Karthauser2003-10-041-1/+23
| | | | | | | Submitted by: luoqi Notes: svn path=/head/; revision=120765
* Support the Hawking Technology's UF100 Pegasus II 10/100 USB Ethernet.David E. O'Brien2003-09-181-0/+1
| | | | Notes: svn path=/head/; revision=120199
* Use __FBSDID().David E. O'Brien2003-08-241-0/+3
| | | | | | | Also some minor style cleanups. Notes: svn path=/head/; revision=119418