summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/if_cue.c
Commit message (Collapse)AuthorAgeFilesLines
* Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones.obrien2003-12-081-3/+3
| | | | Requested by: bde,imp
* Remove duplicatejohan2003-11-141-3/+0
| | | | | | | #include <sys/cdefs.h> __FBSDID(...); Leave the one matching the other files in this directory.
* Despam the const poisoningimp2003-11-141-5/+5
| | | | Despam the u_->u change
* Try to create some sort of consistency in how the routings to find theobrien2003-11-131-6/+8
| | | | | | | 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).
* Replace the if_name and if_unit members of struct ifnet with new membersbrooks2003-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)
* Const poison the crc calcuation routines so const data can be sent toimp2003-10-231-3/+3
| | | | it.
* Make it easier to run this code on RELENG_4.joe2003-10-041-1/+25
| | | | Submitted by: luoqi
* Use __FBSDID().obrien2003-08-241-0/+3
| | | | Also some minor style cleanups.
* add missing machine/bus.h headers that are now necessary because of thejmg2003-07-161-0/+1
| | | | bus_dma addition.
* WARNING: white space diffjmg2003-07-041-2/+2
| | | | | | This code reduces the number of trailing white space to be more in line w/ NetBSD. I don't regenerate usbdevs, saving that for when it really changes.
* Fix indentation.phk2003-05-311-2/+2
| | | | Found by: FlexeLint
* - Express hard dependencies on bus (pci, isa, pccard) andmdodd2003-04-151-2/+3
| | | | | | | | network layer (ether). - Don't abuse module names to facilitate ifconfig module loading; such abuse isn't really needed. (And if we do need type information associated with a module then we should make it explicit and not use hacks.)
* Use __FBSDID rather than rcsid[].obrien2003-04-031-7/+3
|
* - Use if_broadcastaddr from struct ifnet rather than relying onmdodd2003-03-211-1/+1
| | | | | | | extern 'etherbroadcastaddr'. - Make 'etherbroadcastaddr' static. Reviewed by: imp
* Back out M_* changes, per decision of the TRB.imp2003-02-191-2/+2
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-2/+2
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* network interface driver changes:sam2002-11-141-10/+4
| | | | | | | | | | | | | | o don't strip the Ethernet header from inbound packets; pass packets up the stack intact (required significant changes to some drivers) o reference common definitions in net/ethernet.h (e.g. ETHER_ALIGN) o track ether_ifattach/ether_ifdetach API changes o track bpf changes (use BPF_TAP and BPF_MTAP) o track vlan changes (ifnet capabilities, revised processing scheme, etc.) o use if_input to pass packets "up" o call ether_ioctl for default handling of ioctls Reviewed by: many Approved by: re
* We not long need to use USBD_NO_TSLEEP.joe2002-04-071-15/+7
|
* MFNetBSD: if_aue.c (1.26), if_auereg.h (1.6), if_cue.c (1.10),joe2002-04-071-2/+3
| | | | | | | | if_cuereg.h (1.5), if_kue.c (1.11), if_kuereg.h (1.5) date: 2000/03/02 12:37:51; author: augustss; Use ratecheck() to limit error messages on disconnect. Break out some common functionality.
* Use the UE_GET_XFERTYPE macro.joe2002-04-061-3/+3
|
* Rename csr_{read,write}_* to cue_csr_{read,write}_*.joe2002-04-061-21/+21
|
* Rename foo_gone to foo_dying, in keeping with the rest of the usb code.joe2002-04-061-9/+9
|
* Replace device_t with device_ptr_t.joe2002-04-061-6/+6
|
* Change callers of mtx_init() to pass in an appropriate lock type name. Injhb2002-04-041-2/+2
| | | | | | | most cases NULL is passed, but in some cases such as network driver locks (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used. Tested on: i386, alpha, sparc64
* Use ANSI prototypes and declarations.joe2002-04-021-99/+77
|
* Remove __P.alfred2002-03-201-33/+32
|
* Make these depend on the usb module so they can use its symbols if theypeter2001-08-221-1/+1
| | | | are loaded as seperate .ko files
* Since -CURRENT requires module dependencies to actually be correct forgreen2001-03-291-0/+1
| | | | linking to work, have cue(4) depend on usb so it actually works.
* Convert if_multiaddrs from LIST to TAILQ so that it can be traversedphk2001-02-061-1/+1
| | | | | | backwards in the three drivers which want to do that. Reviewed by: mikeh
* Use LIST_FOREACH() to traverse ifp->if_multiaddrs list, instead ofphk2001-02-031-2/+1
| | | | | | | <sys/queue.h> implementation details. Created with: /usr/sbin/sed Reviewed with: /sbin/md5
* Implement MTX_RECURSE flag for mtx_init().bmilekic2001-01-191-1/+2
| | | | | | | | | | | | | | | | | | | All calls to mtx_init() for mutexes that recurse must now include the MTX_RECURSE bit in the flag argument variable. This change is in preparation for an upcoming (further) mutex API cleanup. The witness code will call panic() if a lock is found to recurse but the MTX_RECURSE bit was not set during the lock's initialization. The old MTX_RECURSE "state" bit (in mtx_lock) has been renamed to MTX_RECURSED, which is more appropriate given its meaning. The following locks have been made "recursive," thus far: eventhandler, Giant, callout, sched_lock, possibly some others declared in the architecture-specific code, all of the network card driver locks in pci/, as well as some other locks in dev/ stuff that I've found to be recursive. Reviewed by: jhb
* Convert the USB ethernet drivers to use mutexes. Also convertwpaul2000-10-241-61/+66
| | | | | | | | | usb_ethersubr.c. This module maintains two queues for packets which are each protected with one mutex. These are all the changes I can do for now. Removing the USBD_NO_TSLEEP flag doesn't work yet: when I tried it, the system would usually freeze up after a NIC had been operating for a while. The usb_ethersubr module itself ought to go away; this is the next thing I need to test.
* Remove unneeded #include <machine/clock.h>phk2000-10-151-1/+0
|
* Make all Ethernet drivers attach using ether_ifattach() and detach usingarchie2000-07-131-6/+3
| | | | | | | | | ether_ifdetach(). The former consolidates the operations of if_attach(), ng_ether_attach(), and bpfattach(). The latter consolidates the corresponding detach operations. Reviewed by: julian, freebsd-net
* Handle watchdog timeouts better. We can't really call the foo_init()wpaul2000-06-011-4/+10
| | | | | | | | | | | | | routines from foo_watchdog() because foo_watchdog() is called at interrupt context, and that's a no-no due to the way the USB stack is currently set up. What we do now is call the TX end of frame handler manually to clear the completed transmission, then check the send queue and send off any frames that are pending. Also turned off the interrupt pipe stuff in if_aue, since it appears to tickle a bug in the USB stack that I haven't found yet.
* Add vendor/device codes for SmartBridges SmartLink USB ethernet adapterwpaul2000-04-141-0/+1
| | | | | | | (which is actually a CATC Netmate). Gee. I don't know why people make such a fuss over supporting USB ethernet NICs. This is easier than collecting graft.
* OpenBSD has a broken debugger that does not grok static. Use an_hibma2000-04-031-57/+57
| | | | | | #define Static static that the OpenBSD folks can define it to be empty if they like.
* Regenerate usbdevs files.wpaul2000-03-211-0/+1
| | | | | | Also add device entry in if_kue.c for the LINKSYS USB10T adapter. Also add calls to bpfdetach() in detach routines.
* Fix a bug in the uhci driver that breaks large bulk IN transfers. Thewpaul2000-01-281-28/+3
| | | | | | | | | | | | | | uhci_check_intr() routine needs to be more careful about deciding when the end of a transfer has been detected. This allows me to remove the nasty workaround code from if_aue and if_cue. Receive performance is now much better for these adapters (500KB/sec vs. 350KB/sec). Also removed unused KUE_CUTOFF define from if_kuereg.h. Submitted by: Lennart Augustsson Reviewed by: n_hibma
* More USB ethernet tweaks:wpaul2000-01-201-23/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Sync ohci, uhci and usbdi modules with NetBSD in order to obtain the following improvements: o New USBD_NO_TSLEEP flag can be used in place of UQ_NO_TSLEEP quirk. This allows drivers to specify busy waiting only for certain transfers (namely control transfers for reading/writing registers and stuff). o New USBD_FORCE_SHORT_XFER flag can be used to deal with devices like the ADMtek Pegasus that sense the end of bulk OUT transfers in a special way (if a transfer is exactly a multiple of 64 bytes in size, you need to send an extra empty packet to terminate the transfer). o usbd_open_pipe_intr() now accepts an interval argument which can be used to change the rate at which the interrupt callback routine is invoked. Specifying USBD_DEFAULT_INTERVAL uses the value specified in the device's config data, but drivers can override it if needed. - Change if_aue to use USBD_FORCE_SHORT_XFER for packet transmissions. - Change if_aue, if_kue and if_cue to use USBD_NO_TSLEEP for all control transfers. We no longer force the non-tsleep hack for bulk transfers since these are done asynchronously anyway. - Removed quirk entry fiddling from if_aue and if_kue since we don't need it anymore now that we have the USBD_NO_TSLEEP flag. - Tweak ulpt, uhid, ums and ukbd drivers to use the new arg to usbd_open_pipe_intr(). - Add a flag to the softc struct in the ethernet drivers to indicate when a device has been detached, and use this flag to perform tests to prevent the drivers from trying to do control transfers if this is the case. This is necessary because calling if_detach() with INET6 enabled will eventually result in a call to the driver's ioctl() routine to delete the multicast groups on the interface, which will result in attempts to perform control transfers. (It's possible this also happens even without INET6 support enabled.) This is pointless since we know that if the detach method has been called, the hardware has been unplugged. - Changed watchdog timeout routines to just call the driver init routines to initialize the device states without trying to close and re-open the pipes. This is partly because we don't want to frob things at interrupt context, but also because this doesn't seem to work right and I don't want to panic the system just because a USB device may have stopped responding. - Fix aue_rxeof() to be a little smarter about detecting when a double transfer is needed. Unfortunately, the design of the chip makes it hard to get this exactly right. Hopefully, this will go away once either Nick or Lennart finds the bug in the uhci driver that makes this ugly hack necessary. - Also sync usbdevs with NetBSD.
* The correct part number for the CATC ASIC is USB-EL1210A, notwpaul2000-01-171-2/+2
| | | | | | | USB-EL1201A or even USB-EL1202A. Wonder what drugs I was on when I made this mistake, and then propagated it to 6 different files. *sigh*
* Remove device name strings from vendor/product lists since we don't usewpaul2000-01-161-8/+12
| | | | | them (they're read from the device directly). Also do a set_config command for the ADMtek and CATC drivers.
* Fix multicast filter programming.wpaul2000-01-141-3/+5
|
* Do a few minor cleanups.wpaul2000-01-141-7/+3
|
* Add device driver support for USB ethernet adapters based on the CATCwpaul2000-01-141-0/+1230
USB-EL1202A chipset. Between this and the other two drivers, we should have support for pretty much every USB ethernet adapter on the market. The only other USB chip that I know of is the SMC USB97C196, and right now I don't know of any adapters that use it (including the ones made by SMC :/ ). Note that the CATC chip supports a nifty feature: read and write combining. This allows multiple ethernet packets to be transfered in a single USB bulk in/out transaction. However I'm again having trouble with large bulk in transfers like I did with the ADMtek chip, which leads me to believe that our USB stack needs some work before we can really make use of this feature. When/if things improve, I intend to revisit the aue and cue drivers. For now, I've lost enough sanity points.
OpenPOWER on IntegriCloud