summaryrefslogtreecommitdiff
path: root/sys/dev/usb/if_cue.c
AgeCommit message (Collapse)Author
2015-02-04Kill annoying comments about ether_input()Martin Pieuchot
2014-12-22unifdef INETTed Unangst
2014-07-13No need for <netinet/in_systm.h> here.Martin Pieuchot
2014-07-12Kill a bunch of DVACT_DEACTIVATE handlers whose only purpose were toMartin Pieuchot
set the 'dying' flag of a device. Such handlers are useless now that usbd_detach() already set this flag. Even if the purpose of this flag is questionnable on OpenBSD because DVACT_DEACTIVATE acts as a pre-detach event, this is just a first small step towards the simplification of the autoconf(9) device states. This cleaning is now possible thanks to the work of pirofti@ to convert all the USB drivers to properly use usbd_is_dying(). Discussed many times with deraadt@
2013-11-15Clean-up usbd_abort_pipe() usage.Paul Irofti
This function never fails. So change it's return type to void and adjust the copy-pasted callers that were checking the return. "If it compiles, ok" mpi@
2013-11-05Instead of comparing the lower and higher addresses of all the multicastMartin Pieuchot
entries to decide if the IFF_ALLMULTI flag should be set, check if there is at least one real range between them. This should not introduce any behavior change but will help changing our representation of multicast entries.
2013-08-07Most network drivers include netinet/in_var.h, but apparently theyAlexander Bluhm
don't have to. Just remove these include lines. Compiled on amd64 i386 sparc64; OK henning@ mikeb@
2013-04-15Get rid of various 'typedef struct' definitions and use plain structureMarcus Glocker
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@
2011-07-03Remove config_activate() and DVACT_ACTIVATE. PCMCIA's the only thingMatthew Dempsky
that's ever used it, and it's long since been changed to use DVACT_{QUIESCE,SUSPEND,RESUME} instead. ok deraadt@, dlg@; miod@ also agreed with this idea when I brought it up a few weeks ago
2011-01-25garbage collect "usb events". without /dev/usb there is no way to accessJacob Meuser
them from userland, and nothing in the kernel uses them. ok krw@, miod@
2010-12-17- use usb_lookup() instead of handrolled macro.Jasper Lievisse Adriaanse
ok jakemsr@
2010-12-06* replace per-driver dying and/or other state variables with use ofJacob Meuser
usbd_deactivete() and usbd_is_dying() * use usbd_deactivate() in activate()/DEACTIVATE * convert a few more direct checks of the associated bus' dying flag with usbd_is_dying()
2010-10-27don't free network related resources if they were not allocatedJacob Meuser
2010-10-23check that a timeout(9) has been initialized before deleting itJacob Meuser
ok phessler
2010-10-23create another kthread to run xfer abort tasks. xfer abort tasks cannotJacob Meuser
be run from the generic task kthread, because xfers that need to be aborted block newly queued tasks from running (i.e. the xfer to be aborted blocks the abort of that task). as there are now three types of usb tasks, add an argument to usb_init_task() and another member to struct usb_task to specify the task type. fixes boot hangs that are showing up because we now use usb tasks to attach/detach usb devices.
2010-09-24remove dying flag in detach() function.Yojiro Uo
The dying flag will be set in activate()/DEACTIVATE. ok deraadt@
2009-10-13Get rid of devact enum, substitute it with an int and coresponding defines.Paul Irofti
This is needed for the addition of further suspend/resume actions. Okay deraadt@, marco@.
2008-11-28Eliminate the redundant bits of code for MTU and multicast handlingBrad Smith
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@
2008-10-02First step towards cleaning up the Ethernet driver ioctl handling.Brad Smith
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@
2008-09-10Convert timeout_add() calls using multiples of hz to timeout_add_sec()Bret Lambert
Really just the low-hanging fruit of (hopefully) forthcoming timeout conversions. ok art@, krw@
2007-11-23Sanitize the use of timeouts:Marc Balmer
Instead of calling timeout_set(..., NULL, NULL) in attach routines and later timeout_del(...) timeout_set(..., func, arg) timeout_add(..., time) set the function and argument in the initial timeout_set() call and only use timeout_add(..., time) later. ok dlg, fgsch, krw, winiger
2007-10-11treat usb vendor/product names as a locator, and have usbd_print handle it,Theo de Raadt
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
2007-09-17remove unneeded malloc.h include.Federico G. Schwindt
2007-06-14Remove the definition and usage of the USB_DECLARE_DRIVER_CLASS andMarc Balmer
USB_DECLARE_DRIVER macros. No binary change. ok dlg.
2007-06-14Move the inclusion of sys/timeout.h from usb_port.h to the drivers thatMarc Balmer
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.
2007-06-13Remove the definition and usage of the IF_INPUT macro which was definedMarc Balmer
as ether_input_mbuf which is itself a macro for ether_input. No binary change. ok dlg.
2007-06-12Remove the definition and use of the device_ptr_t which was a struct device *.Marc Balmer
No binary change. ok mk.
2007-06-10Remove the definition and use of the USBDEVNAME macro.Marc Balmer
(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.
2007-06-10Remove the definition and use of the USBDEV macro. It only created confusionMarc Balmer
and the address of it's argument: USBDEV(sc->sc_dev) yields &sc->sc_dev. No binary changes. ok jsg.
2007-06-10Remove definitions and usage of usb_callout and related macros. These macrosMarc Balmer
were used as a layer of confusion^Wabstraction around the timeout(9) API. No binary change. ok jsg.
2007-06-09Remove the definition and use of if_deactivate(). It was defined empty andMarc Balmer
thus produced no code at all. No binary change. ok jsg.
2007-06-05Remove the "Static" declaration of many functions. It was defined to be emptyMarc Balmer
and it was not consistently used. It was confusing as it suggested these functions were static, which they were not. discussed with dlg and jsg, ok jsg.
2007-06-04Last part of FreeBSD/NetBSD sepcific code removal.Marc Balmer
ok jsg@
2007-05-27Farewell USB_{ATTACH,MATCH,DETACH}* you will not be missed.Jonathan Gray
ok deraadt@ krw@ mbalmer@
2007-05-21Remove logprintf macroJonathan Gray
2007-05-21Remove Ether_ifattach macroJonathan Gray
2007-02-11Remove _KERNEL_OPT leftovers.Miod Vallat
2006-06-23In a drivers activate() entry point, if on DVACT_DEACTIVATE it doesMiod Vallat
something, then it MUST return zero on DVACT_ACTIVATE, not EOPNOTSUPP; this very popular bug has been cut and pasted a lot of times... ok deraadt@ mickey@
2006-03-25allow bpf(4) to ignore packets based on their direction (inbound orDamien Miller
outbound), using a new BIOCSDIRFILT ioctl; guidance, feedback and ok canacar@
2006-03-07Remove last NRND NetBSDisms from tree.Kenneth R Westerback
ok deraadt@ brad@
2006-01-29Use usbd_clear_endpoint_stall_async() when clearing endpoint stalls inBrad Smith
an interrupt context. From NetBSD ok dlg@
2005-08-01Don't keep the devinfo string on the stack, instead use malloc/free.Brad Smith
This should cure some rare stack overflows. From augustss NetBSD ok dlg@ pascoe@
2005-07-02clear IFF_RUNNING & IFF_OACTIVE in foo_stop() before de-allocating resources.Brad Smith
2005-06-08remove netns crud.Henning Brauer
some drivers actually had hooks for SIOCSIFADDR, most just useless includes "looks good" deraadt miod brad
2005-01-03- make sure int is in running state before touching the multicast filtersBrad Smith
- call foo_setmulti only instead of init'ing the chip - don't overwrite potential error return with success when calling ether_addmulti/ether_delmulti ok dlg@
2004-11-10strncpy->strlcpyAlexander Yurchenko
ok henning@
2004-09-23don't need to set ifp->if_mtu or ifp->if_output in each driver,Brad Smith
{ether,atm,fddi}_ifattach already does this. ok mcbride@ markus@ henning@
2004-07-08put "do { } while (0)" wrappers on all the debug maroc functionsTheo de Raadt
2004-06-06Multicast cleanupsRyan Thomas McBride
- make multicast ranges work - replace handrolled crc code with ether_crc32_{be,le}() - add missing calls to ether_{add,del}multi() ok deraadt@
2003-12-15Set devclass to DV_IFNET for all USB network drivers.Cedric Berger
ok deraadt@ nate@