DragonFly BSD

CVS log for src/sys/dev/netif/aue/if_aue.c

[BACK] Up to [DragonFly] / src / sys / dev / netif / aue

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.38.2.1: download - view: text, markup, annotated - select for diffs
Mon Sep 1 13:09:02 2008 UTC (6 years, 1 month ago) by sephe
Branches: DragonFly_RELEASE_2_0
CVS tags: DragonFly_RELEASE_2_0_Slip
Diff to: previous 1.38: preferred, unified; next MAIN 1.39: preferred, unified
Changes since revision 1.38: +52 -50 lines
MFC if_aue.c rev1.39:
  In aue(4) txeof, differ ifnet.if_start to ifnet's CPU to:
  1) Keep if_start serialized
  2) Avoid deadlock between USB sync operations and holding serializer in
     USB task thread (e.g. in txeof callback)

  Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1123>
  Tested-by: Tim <t-df@timdarby.net>

Revision 1.39: download - view: text, markup, annotated - select for diffs
Mon Sep 1 13:05:42 2008 UTC (6 years, 1 month ago) by sephe
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.38: preferred, unified
Changes since revision 1.38: +52 -50 lines
In aue(4) txeof, differ ifnet.if_start to ifnet's CPU to:
1) Keep if_start serialized
2) Avoid deadlock between USB sync operations and holding serializer in
   USB task thread (e.g. in txeof callback)

Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1123>
Tested-by: Tim <t-df@timdarby.net>

Revision 1.38: download - view: text, markup, annotated - select for diffs
Wed May 14 11:59:18 2008 UTC (6 years, 5 months ago) by sephe
Branches: MAIN
CVS tags: DragonFly_Preview
Branch point for: DragonFly_RELEASE_2_0
Diff to: previous 1.37: preferred, unified
Changes since revision 1.37: +8 -6 lines
Reduce ifnet.if_serializer contention on output path:
- Push ifnet.if_serializer holding down into each ifnet.if_output implementation
- Add a serializer into ifaltq, which is used to protect send queue instead of
  its parent's if_serializer.  This change has following implication:
  o  On output path, enqueueing packets and calling ifnet.if_start are decoupled
  o  In device drivers, poll->dev_encap_ok->dequeue operation sequence is no
     longer safe, instead dequeue->dev_encap_fail->prepend should be used
  This serializer will be held by using lwkt_serialize_adaptive_enter()
- Add altq_started field into ifaltq, which is used to interlock the calling
  of its parent's if_start, to reduce ifnet.if_serializer contention.
  if_devstart(), a helper function which utilizes ifaltq.altq_started, is added
  to reduce code duplication in ethernet device drivers.
- Add if_cpuid into ifnet.  This field indicates on which CPU device driver's
  interrupt will happen.
- Add ifq_dispatch().  This function will try to hold ifnet.if_serializer in
  order to call ifnet.if_start.  If this attempt fails, this function will
  schedule ifnet.if_start to be called on CPU located by ifnet.if_start_cpuid
  if_start_nmsg, which is per-CPU netmsg, is added to ifnet to facilitate
  ifnet.if_start scheduling.  ifq_dispatch() is called by ether_output_frame()
  currently
- Use ifq_classic_ functions, if altq is not enabled
- Fix various device drivers bugs in their if_start implementation
- Add ktr for ifq classic enqueue and dequeue
- Add ktr for ifnet.if_start

Revision 1.37: download - view: text, markup, annotated - select for diffs
Sun Jan 6 16:55:50 2008 UTC (6 years, 9 months ago) by swildner
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_12_Slip, DragonFly_RELEASE_1_12
Diff to: previous 1.36: preferred, unified
Changes since revision 1.36: +0 -2 lines
Remove bogus checks after kmalloc(M_WAITOK) which never returns NULL.

Reviewed-by: hasso

Revision 1.36: download - view: text, markup, annotated - select for diffs
Tue Nov 6 07:37:00 2007 UTC (6 years, 11 months ago) by hasso
Branches: MAIN
Diff to: previous 1.35: preferred, unified
Changes since revision 1.35: +0 -7 lines
Kill devinfo handling in drivers, set device description in one place -
usbd_probe_and_attach() and let generic device code to output descriptions.

Obtained-from: FreeBSD with modifications

Revision 1.35: download - view: text, markup, annotated - select for diffs
Mon Nov 5 19:09:43 2007 UTC (6 years, 11 months ago) by hasso
Branches: MAIN
Diff to: previous 1.34: preferred, unified
Changes since revision 1.34: +0 -1 lines
Nuke usbdevs and references to it.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Mon Nov 5 13:32:27 2007 UTC (6 years, 11 months ago) by hasso
Branches: MAIN
Diff to: previous 1.33: preferred, unified
Changes since revision 1.33: +58 -59 lines
Kill usage of USB_VENDOR_FOO and USB_PRODUCT_BAR defines mostly using two
methods:

  - USB_DEVICE(vendor_id, product_id) macro.
  - Using C99 structure initialisers.

While at it, kill all custom "vendor and product id pair" structures and
custom walkthrough methods for these structures.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Sun Jul 1 21:24:02 2007 UTC (7 years, 3 months ago) by hasso
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_10_Slip, DragonFly_RELEASE_1_10
Diff to: previous 1.32: preferred, unified
Changes since revision 1.32: +12 -9 lines
Nuke USB_MATCH*, USB_ATTACH* and USB_DETACH* macros.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Thu Jun 28 06:32:31 2007 UTC (7 years, 4 months ago) by hasso
Branches: MAIN
Diff to: previous 1.31: preferred, unified
Changes since revision 1.31: +78 -78 lines
Nuke device_ptr_t, USBBASEDEVICE, USBDEVNAME(), USBDEVUNIT(), USBGETSOFTC(),
USBDEVPTRNAME() and Static with help from sed(1).

Revision 1.31: download - view: text, markup, annotated - select for diffs
Wed Oct 25 20:55:56 2006 UTC (8 years ago) by dillon
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_8_Slip, DragonFly_RELEASE_1_8
Diff to: previous 1.30: preferred, unified
Changes since revision 1.30: +1 -4 lines
Do a major clean-up of the BUSDMA architecture.  A large number of
essentially machine-independant drivers use the structures and definitions
in machine-dependant directories that are really machine-independant in
nature.

Split <machine/bus_dma.h> into machine-depdendant and machine-independant parts
and make the primary access run through <sys/bus_dma.h>.

Remove <machine/bus.h>, <machine/bus_memio.h> and <machine/bus_pio.h>.  The
optimizations related to bus_memio.h and bus_pio.h made a huge mess,
introduced machine-specific knowledge into essentially machine-independant
drivers, and required specific #include file orderings to do their job.
They may be reintroduced in some other form later on.

Move <machine/resource.h> to <sys/bus_resource.h>.  The contents of the file
is machine-independant or can be made a superset across many platforms.

Make <sys/bus.h> include <sys/bus_dma.h> and <sys/bus_resource.h> and
include <sys/bus.h> where necessary. Remove all #include's of
<machine/resource.h> and <machine/bus.h>.  That is, make the BUSDMA
infrastructure integral to I/O-mapped and memory-mapped accesses to devices
and remove a large chunk of machine-specific dependancies from drivers.
bus_if.h and device_if.h are now required to be present when using <sys/bus.h>.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Tue Sep 5 00:55:39 2006 UTC (8 years, 1 month ago) by dillon
Branches: MAIN
Diff to: previous 1.29: preferred, unified
Changes since revision 1.29: +5 -5 lines
Rename malloc->kmalloc, free->kfree, and realloc->krealloc.  Pass 1

Revision 1.29: download - view: text, markup, annotated - select for diffs
Mon Nov 28 17:13:41 2005 UTC (8 years, 10 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_6_Slip, DragonFly_RELEASE_1_6, DragonFly_RELEASE_1_4_Slip, DragonFly_RELEASE_1_4
Diff to: previous 1.28: preferred, unified
Changes since revision 1.28: +1 -1 lines
Make all network interrupt service routines MPSAFE part 1/3.

Replace the critical section that was previously used to serialize access
with the LWKT serializer.  Integrate the serializer into the IFNET structure.
Note that kern.intr_mpsafe must be set to 1 for network interrupts to actually
run MPSAFE.  Also note that any interrupts shared with othre non-MP drivers
will cause all drivers on that interrupt to run with the Big Giant Lock.

Network interrupt - Each network driver then simply passes that serializer
to bus_setup_intr() so only a single serializer is required to process the
entire interrupt path.  LWKT serialization support is already 100% integrated
into the interrupt subsystem so it will already be held as of when the
registered interrupt procedure is called.

Ioctl and if_* functions - All callers of if_* functions (such as if_start,
if_ioctl, etc) now obtain the IFNET serializer before making the call.  Thus
all of these entry points into the driver will now be serialized.

if_input - All code that calls if_input now ensures that the serializer
is held.  It will either already be held (when called from a driver), or
the serializer will be wrapped around the call.  When packets are forwarded
or bridged between interfaces, the target interface serializer will be
dropped temporarily to avoid a deadlock.

Device Driver access - dev_* entry points into certain pseudo-network
devices now obtain and release the serializer.  This had to be done on
a device-by-device basis (but there are only a few such devices).

Thanks to several people for helping test the patch, in particular
Sepherosa Ziehau.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Tue Nov 22 00:24:15 2005 UTC (8 years, 11 months ago) by dillon
Branches: MAIN
Diff to: previous 1.27: preferred, unified
Changes since revision 1.27: +1 -1 lines
Fix the design of ifq_dequeue/altq_dequeue by adding an mbuf pointer and
requiring that a polled mbuf be passed as an argument to the dequeue
function.  Assert that the passed argument matches the mbuf that is actually
dequeued.  Also remove assignments of the return value from ifq_dequeue()
in such cases which implied that the mbuf might be different when, in fact,
it had better not be.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Tue Sep 20 07:17:37 2005 UTC (9 years, 1 month ago) by sephe
Branches: MAIN
Diff to: previous 1.26: preferred, unified
Changes since revision 1.26: +4 -2 lines
check pointer for NULL before calling free()

Revision 1.26: download - view: text, markup, annotated - select for diffs
Mon Aug 29 10:19:51 2005 UTC (9 years, 1 month ago) by sephe
Branches: MAIN
Diff to: previous 1.25: preferred, unified
Changes since revision 1.25: +0 -2 lines
Remove unnecessary bzero(softc).
With following exceptions:
  - ed(4) if_ed_cbus.c
  - snc(4)
They are PC-98 only.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Mon Jul 25 12:46:59 2005 UTC (9 years, 3 months ago) by joerg
Branches: MAIN
Diff to: previous 1.24: preferred, unified
Changes since revision 1.24: +1 -0 lines
Add support for HP hn210e usb ethernet.

Submitted-by: Sepherosa Ziehau <sepherosa@gmail.com>
Obtained-from: FreeBSD

Revision 1.24: download - view: text, markup, annotated - select for diffs
Sat Jun 11 04:26:53 2005 UTC (9 years, 4 months ago) by hsu
Branches: MAIN
Diff to: previous 1.23: preferred, unified
Changes since revision 1.23: +3 -11 lines
Deprecate MCLGET() in favor of m_getcl() or m_getl() in order to
take advantage of cluster caching.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Tue May 24 07:56:30 2005 UTC (9 years, 5 months ago) by joerg
Branches: MAIN
Diff to: previous 1.22: preferred, unified
Changes since revision 1.22: +3 -22 lines
Use ether_crc32_le.

Obtained-from: FreeBSD

Revision 1.22: download - view: text, markup, annotated - select for diffs
Tue May 24 07:54:49 2005 UTC (9 years, 5 months ago) by joerg
Branches: MAIN
Diff to: previous 1.21: preferred, unified
Changes since revision 1.21: +0 -1 lines
No machine/clock.h needed.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Tue May 24 07:54:18 2005 UTC (9 years, 5 months ago) by joerg
Branches: MAIN
Diff to: previous 1.20: preferred, unified
Changes since revision 1.20: +0 -14 lines
No FreeBSD 5/6 support here.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Tue May 24 07:36:29 2005 UTC (9 years, 5 months ago) by joerg
Branches: MAIN
Diff to: previous 1.19: preferred, unified
Changes since revision 1.19: +46 -56 lines
if_printf / device_printf.

Submitted-by: Sepherosa Ziehau <sepherosa@gmail.com>

Revision 1.19: download - view: text, markup, annotated - select for diffs
Mon Feb 28 19:53:31 2005 UTC (9 years, 7 months ago) by joerg
Branches: MAIN
CVS tags: DragonFly_Stable, DragonFly_RELEASE_1_2_Slip, DragonFly_RELEASE_1_2
Diff to: previous 1.18: preferred, unified
Changes since revision 1.18: +3 -1 lines
Rearm receiver, it was lost in the conversion.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Mon Feb 21 18:40:36 2005 UTC (9 years, 8 months ago) by joerg
Branches: MAIN
Diff to: previous 1.17: preferred, unified
Changes since revision 1.17: +0 -2 lines
Remove some duplicate FreeBSD CVS IDs, move some IDs to better places.

Submitted-by: Sarunas Vancevicius <svan@redbrick.dcu.ie>

Revision 1.17: download - view: text, markup, annotated - select for diffs
Wed Feb 16 22:50:28 2005 UTC (9 years, 8 months ago) by joerg
Branches: MAIN
Diff to: previous 1.16: preferred, unified
Changes since revision 1.16: +6 -8 lines
The old USB ethernet code utilized a netisr to hand packets over
the ether_input and cleanup after txeof. This was broken some
time ago and is a workaround for the different IPL of USB and
the network stack.

Reduce the amount of hacks by removing usb_tx_done, it can be
done mostly in-place with a slight race-condition in the enqueue
code. usb_ether_input now directly calls ether_input, the caller
is responsible for rearming the receiver. That's doesn't open
a race since the receiver doesn't have to handle the interface
queues, for the driver state is the driver responsible.

The IPL protection of the USB ethernet drivers has to be reviewed,
it's mostly not existing.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Tue Feb 15 16:44:23 2005 UTC (9 years, 8 months ago) by joerg
Branches: MAIN
Diff to: previous 1.15: preferred, unified
Changes since revision 1.15: +7 -5 lines
ALTQ support.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Thu Oct 14 18:31:00 2004 UTC (10 years ago) by dillon
Branches: MAIN
Diff to: previous 1.14: preferred, unified
Changes since revision 1.14: +0 -1 lines
Remove the 'ether' module dependancy, it is not defined anywhere and will
prevent the loader from pre-loading the modules in question.

Do not partially initialize the related struct sockaddr_in when a
non-existant or "0.0.0.0" pxe related kenv is found.  In particular, if
the gateway is not specified by the DHCP server we avoid attempting to add
a bad default route (which results in a panic) later on.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Tue Sep 14 21:48:53 2004 UTC (10 years, 1 month ago) by joerg
Branches: MAIN
CVS tags: DragonFly_Snap29Sep2004
Diff to: previous 1.13: preferred, unified
Changes since revision 1.13: +5 -5 lines
timeout/untimeout ==> callout_*

Revision 1.13: download - view: text, markup, annotated - select for diffs
Fri Jul 23 07:16:24 2004 UTC (10 years, 3 months ago) by joerg
Branches: MAIN
CVS tags: DragonFly_Snap13Sep2004
Diff to: previous 1.12: preferred, unified
Changes since revision 1.12: +0 -1 lines
Unify the input handling of the low-level network stack by introducing
a new field if_input in struct ifnet.

Initialize if_input and if_output in the low-level _ifattach routines.

Make the _output and _input routines static, they are now called via
(*ifp->if_input) and (*ifp->if_output) accordingly. The exception is
ether_input which is still used with the second argument, the pointer
to the Ethernet header instead of always taking it from the mbuf.

Move the if_attach and bpfattach from the devices into fddi_ifattach,
atm_ifattach.

Remove the first argument to VLAN_INPUT_TAG, the pointer to the
Ethernet header. Expect it at the beginning of the mbuf.

Adjust the network for the changed API. Exceptions are wl(4), le(4),
ie(4), el(4), ed(4) and de(4), because they use a on-stack Ethernet
header. Another exception is the ATM stack, which uses a fourth argument
to atm_input.

Inspired-by: NetBSd net/if.h, rev 1.36

Revision 1.12: download - view: text, markup, annotated - select for diffs
Fri Jul 2 17:42:15 2004 UTC (10 years, 3 months ago) by joerg
Branches: MAIN
CVS tags: DragonFly_1_0_REL, DragonFly_1_0A_REL
Diff to: previous 1.11: preferred, unified
Changes since revision 1.11: +0 -7 lines
Announce MAC address in ether_ifattach, not in each NIC indepently.

aue(4), axe(4), cue(4), kue(4), pcn(4):
- Don't bcopy the MAC address, ether_ifattach does it.
lnc(4):
- sc->arpcom.ac_if ==> ifp in lnc_attach_common, more changes coming.
awi(4):
- Nuke local copy of ether_sprintf, use %6D directly.
- Use if_printf instead of printf("%s: ...", sc->sc_dev.dv_xname, ...).

Revision 1.11: download - view: text, markup, annotated - select for diffs
Wed Jun 2 14:42:49 2004 UTC (10 years, 4 months ago) by eirikn
Branches: MAIN
CVS tags: DragonFly_1_0_RC1
Diff to: previous 1.10: preferred, unified
Changes since revision 1.10: +2 -2 lines
Change mbug allocation flags from M_ to MB_ to avoid confusion with malloc
flags.

Requested by: Jeffrey Hsu

Revision 1.10: download - view: text, markup, annotated - select for diffs
Wed Apr 7 05:45:25 2004 UTC (10 years, 6 months ago) by dillon
Branches: MAIN
Diff to: previous 1.9: preferred, unified
Changes since revision 1.9: +2 -2 lines
General netif malloc() flags cleanup.  Use M_INTWAIT or M_WAITOK instead
of M_NOWAIT.  Generally use M_WAITOK in the attach code or ioctl code
typically called from userland, and M_INTWAIT for routines that might
be called during non-boot operations.  Since M*WAIT flags guarentee a
non-NULL result, also remove now-unnecessary NULL checks.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Tue Mar 23 22:18:58 2004 UTC (10 years, 7 months ago) by hsu
Branches: MAIN
Diff to: previous 1.8: preferred, unified
Changes since revision 1.8: +2 -2 lines
Eliminate use of curthread in if_ioctl functions by passing down the
ucred structure.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Sun Mar 14 15:36:48 2004 UTC (10 years, 7 months ago) by joerg
Branches: MAIN
Diff to: previous 1.7: preferred, unified
Changes since revision 1.7: +0 -8 lines
BPF has been in the kernel for ages and is supported by all NICs but I4B.

This removes the second argument of ether_ifattach and ether_ifdetach as
done by sam in FreeBSD's rev. 1.130 of net/if_ethersubr.c.

Add an argument for the link layer address to ether_ifattach as done by
is in NetBSD's rev 1.21.4.1 of the same file.

Adjust if_ef.c based on FreeBSD's version of that file.

Remove the now unused ETHER_BPF_[UN]SUPPORTED define from ethernet.h.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Wed Feb 11 15:05:03 2004 UTC (10 years, 8 months ago) by joerg
Branches: MAIN
Diff to: previous 1.6: preferred, unified
Changes since revision 1.6: +7 -7 lines
Fix gcc3 compilation

Revision 1.6: download - view: text, markup, annotated - select for diffs
Tue Dec 30 01:01:45 2003 UTC (10 years, 9 months ago) by dillon
Branches: MAIN
Diff to: previous 1.5: preferred, unified
Changes since revision 1.5: +357 -344 lines
Bring in the entire FreeBSD-5 USB infrastructure.  As of this commit my
USB camera, Hard Drive, Mouse, and Sony memory key all work and I can even
unplug and replug them in without crashing the port.

Not all drivers and subsystems compile as of this commit, but the ones that
do not are very close.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Thu Nov 20 22:07:26 2003 UTC (10 years, 11 months ago) by dillon
Branches: MAIN
Diff to: previous 1.4: preferred, unified
Changes since revision 1.4: +1 -0 lines
Add a DECLARE_DUMMY_MODULE() so we can get linker_set module names
for modules that normally use DRIVER_MODULE().  The problem is that
DRIVER_MODULE() will define names that do not match the module name,
so a DECLARE_DUMMY_MODULE() is needed for the kernel to be able to
figure out that a module has been statitically compiled in.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Thu Aug 7 21:16:59 2003 UTC (11 years, 2 months ago) by dillon
Branches: MAIN
Diff to: previous 1.3: preferred, unified
Changes since revision 1.3: +9 -9 lines
kernel tree reorganization stage 1: Major cvs repository work (not logged as
commits) plus a major reworking of the #include's to accomodate the
relocations.

    * CVS repository files manually moved.  Old directories left intact
      and empty (temporary).

    * Reorganize all filesystems into vfs/, most devices into dev/,
      sub-divide devices by function.

    * Begin to move device-specific architecture files to the device
      subdirs rather then throwing them all into, e.g. i386/include

    * Reorganize files related to system busses, placing the related code
      in a new bus/ directory.  Also move cam to bus/cam though this may
      not have been the best idea in retrospect.

    * Reorganize emulation code and place it in a new emulation/ directory.

    * Remove the -I- compiler option in order to allow #include file
      localization, rename all config generated X.h files to use_X.h to
      clean up the conflicts.

    * Remove /usr/src/include (or /usr/include) dependancies during the
      kernel build, beyond what is normally needed to compile helper
      programs.

    * Make config create 'machine' softlinks for architecture specific
      directories outside of the standard <arch>/include.

    * Bump the config rev.

    WARNING! after this commit /usr/include and /usr/src/sys/compile/*
    should be regenerated from scratch.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sat Jul 26 14:25:26 2003 UTC (11 years, 3 months ago) by rob
Branches: MAIN
Diff to: previous 1.2: preferred, unified
Changes since revision 1.2: +3 -3 lines
Register keyword removal

Approved by: Matt Dillon

Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue Jun 17 04:28:32 2003 UTC (11 years, 4 months ago) by dillon
Branches: MAIN
CVS tags: PRE_MP
Diff to: previous 1.1: preferred, unified
Changes since revision 1.1: +3 -5 lines
Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids.  Most
ids have been removed from !lint sections and moved into comment sections.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Tue Jun 17 02:54:29 2003 UTC (11 years, 4 months ago) by dillon
Branches: MAIN
CVS tags: FREEBSD_4_FORK
import from FreeBSD RELENG_4 1.19.2.18

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options