The NetBSD Project

CVS log for src/sys/dev/usb/if_kue.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / dev / usb

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.119 / (download) - annotate - [select for diffs], Sat Aug 20 14:08:59 2022 UTC (18 months, 4 weeks ago) by riastradh
Branch: MAIN
CVS Tags: triaxx-drm, thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, netbsd-10-base, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm, HEAD
Changes since 1.118: +4 -4 lines
Diff to previous 1.118 (colored)

usbnet(9): New usbnet_ispromisc(un).

Replaces ifp->if_flags & IFF_PROMISC in multicast filter updates.

Revision 1.118 / (download) - annotate - [select for diffs], Thu Mar 3 05:56:28 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.117: +3 -3 lines
Diff to previous 1.117 (colored)

usbnet: Omit needless detachcv name parameter to usbnet_attach.

Revision 1.117 / (download) - annotate - [select for diffs], Thu Mar 3 05:56:09 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.116: +3 -3 lines
Diff to previous 1.116 (colored)

usbnet: Factor usbnet_init_rx_tx out into usbnet_if_init.

Make it private; no need for drivers to call it any more.

Revision 1.116 / (download) - annotate - [select for diffs], Thu Mar 3 05:55:29 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.115: +2 -5 lines
Diff to previous 1.115 (colored)

usbnet drivers: From *_uno_init, call *_uno_stop, not usbnet_stop.

Make usbnet_stop private now that no drivers use it.

None of the driver-independent logic in usbnet_stop has any effect at
this point because we are guaranteed not to be running, so only the
driver-dependent logic in *_uno_stop (at most) is needed.

For drivers with no *_uno_stop, just omit the call to usbnet_stop
altogether.

Some of this logic is obviously redundant with the subsequent call to
*_reset -- to be addressed in a subsequent commit.

Revision 1.115 / (download) - annotate - [select for diffs], Thu Mar 3 05:55:01 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.114: +2 -5 lines
Diff to previous 1.114 (colored)

usbnet drivers: Omit needless isdying tests in *_uno_init.

usbnet(9) already checks this immediately before calling *_uno_init.

Revision 1.114 / (download) - annotate - [select for diffs], Thu Mar 3 05:53:33 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.113: +2 -5 lines
Diff to previous 1.113 (colored)

usbnet drivers: Omit redundant multicast filter update on init.

Revision 1.113 / (download) - annotate - [select for diffs], Thu Mar 3 05:53:14 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.112: +6 -6 lines
Diff to previous 1.112 (colored)

usbnet drivers: Stop abusing ifp->if_flags & IFF_ALLMULTI.

This legacy flag is a figment of userland's imagination.  The actual
kernel state is ec->ec_flags & ETHER_F_ALLMULTI, protected by the
ETHER_LOCK, so that multicast filter updates -- which run without
IFNET_LOCK -- need not attempt to write racily to ifp->if_flags.

Revision 1.112 / (download) - annotate - [select for diffs], Thu Mar 3 05:53:04 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.111: +5 -13 lines
Diff to previous 1.111 (colored)

usbnet drivers: Omit needless uno_mcast locked subroutines.

uno_mcast is now called with the core lock already held so there is
no need for a separate locked subroutine.

Revision 1.111 / (download) - annotate - [select for diffs], Thu Mar 3 05:52:46 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.110: +2 -6 lines
Diff to previous 1.110 (colored)

usbnet: Take the core lock around uno_mcast.

Every driver does this already.  This will enable us to change the
lock that serializes access to the registers so we can go back to
doing this synchronously in SIOCADDMULTI/SIOCDELMULTI.

Revision 1.110 / (download) - annotate - [select for diffs], Thu Mar 3 05:52:35 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.109: +3 -13 lines
Diff to previous 1.109 (colored)

usbnet drivers: Omit needless uno_init locked subroutines.

uno_init is now called with the core lock already held so there is no
need for a separate locked subroutine.

Revision 1.109 / (download) - annotate - [select for diffs], Thu Mar 3 05:51:27 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.108: +2 -4 lines
Diff to previous 1.108 (colored)

usbnet drivers: No need for usbnet_busy in uno_mcast.

This callback always runs with IFNET_LOCK held, and during a task
that usbnet_detach prevents scheduling anew and waits for finishing
before completing the detach, so there is no need to hang onto a
reference count here.

Revision 1.108 / (download) - annotate - [select for diffs], Thu Mar 3 05:51:17 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.107: +2 -5 lines
Diff to previous 1.107 (colored)

usbnet drivers: No need for usbnet_busy in uno_init.

This callback always runs with the IFNET_LOCK held, and the interface
cannot be detached until the IFNET_LOCK is released, so there is no
need to hang onto a reference count here.  (None of the usbnet
drivers touch the IFNET_LOCK except to verify it is held sometimes.)

Revision 1.107 / (download) - annotate - [select for diffs], Thu Mar 3 05:51:06 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.106: +7 -16 lines
Diff to previous 1.106 (colored)

usbnet: Split multicast filter reprogramming into separate operation.

Revision 1.106 / (download) - annotate - [select for diffs], Thu Mar 3 05:50:22 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.105: +2 -4 lines
Diff to previous 1.105 (colored)

usbnet: Enter uno_init with the core lock held.

This reduces code in all drivers except urndis(4) and aue(4).

However, it's still safe for urndis to drop the core lock because the
ifnet is locked, and the ifnet lock covers the DOWN->UP (uno_init)
and UP->DOWN (uno_stop) transitions.

Revision 1.105 / (download) - annotate - [select for diffs], Sun Jun 13 09:26:24 2021 UTC (2 years, 9 months ago) by mlelstv
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base, thorpej-cfargs2
Changes since 1.104: +3 -3 lines
Diff to previous 1.104 (colored)

Align product name.

Revision 1.104 / (download) - annotate - [select for diffs], Sat Mar 21 06:55:22 2020 UTC (3 years, 11 months ago) by skrll
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-futex, thorpej-cfargs-base, thorpej-cfargs, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh
Branch point for: thorpej-i2c-spi-conf
Changes since 1.103: +3 -3 lines
Diff to previous 1.103 (colored)

KNF

Revision 1.103 / (download) - annotate - [select for diffs], Sun Mar 15 23:04:50 2020 UTC (4 years ago) by thorpej
Branch: MAIN
Changes since 1.102: +28 -22 lines
Diff to previous 1.102 (colored)

Define and implement a locking protocol for the ifmedia / mii layers:
- MP-safe drivers provide a mutex to ifmedia that is used to serialize
  access to media-related structures / hardware regsiters.  Converted
  drivers use the new ifmedia_init_with_lock() function for this.  The
  new name is provided to ease the transition.
- Un-converted drivers continue to call ifmedia_init(), which will supply
  a compatibility lock to be used instead.  Several media-related entry
  points must be aware of this compatibility lock, and are able to acquire
  it recursively a limited number of times, if needed.  This is a SPIN
  mutex with priority IPL_NET.
- This same lock is used to serialize access to PHY registers and other
  MII-related data structures.

The PHY drivers are modified to acquire and release the lock, as needed,
and assert the lock is held as a diagnostic aid.

The "usbnet" framework has had an overhaul of its internal locking
protocols to fit in with the media / mii changes, and the drivers adapted.

USB wifi drivers have been changed to provide their own adaptive mutex
to the ifmedia later via a new ieee80211_media_init_with_lock() function.
This is required because the USB drivers need an adaptive mutex.

Besised "usbnet", a few other drivers are converted: vmx, wm, ixgbe / ixv.

mcx also now calls ifmedia_init_with_lock() because it needs to also use
an adaptive mutex.  The mcx driver still needs to be fully converted to
NET_MPSAFE.

Revision 1.102 / (download) - annotate - [select for diffs], Wed Jan 29 06:26:32 2020 UTC (4 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp, ad-namecache-base3
Changes since 1.101: +3 -3 lines
Diff to previous 1.101 (colored)

Adopt <net/if_stats.h>.

Revision 1.101 / (download) - annotate - [select for diffs], Tue Jan 7 06:42:26 2020 UTC (4 years, 2 months ago) by maxv
Branch: MAIN
CVS Tags: ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Changes since 1.100: +9 -9 lines
Diff to previous 1.100 (colored)

Localify, constify.

Revision 1.100 / (download) - annotate - [select for diffs], Tue Aug 20 06:37:06 2019 UTC (4 years, 7 months ago) by mrg
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.99: +4 -4 lines
Diff to previous 1.99 (colored)

couple more changes to usbnet(9):

- MII read/write reg return int instead of usbd_status (requested by skrll)
- usbnet_attach_ifp(9) changes arg, two mii-specific flags are placed by a
  pointer to new struct usbnet_mii.  if not NULL, then attach an MII to this
  interface like previous have_mii parameter.  use this to allow ure(4) to
  properly pass PHY location to mii_attach().

welcome netbsd 9.99.10.

Revision 1.99 / (download) - annotate - [select for diffs], Sun Aug 18 11:46:38 2019 UTC (4 years, 7 months ago) by mrg
Branch: MAIN
Changes since 1.98: +5 -2 lines
Diff to previous 1.98 (colored)

regen and add kue adapters:

ACTIONTEC KL5KUSB101 USB Ethernet adapter
ALLIEDTELESYN AT-USB10 USB Ethernet Adapter
SILICOM Psion Gold Port Ethernet (existing usbdevs entry)

Revision 1.98 / (download) - annotate - [select for diffs], Fri Aug 16 08:51:09 2019 UTC (4 years, 7 months ago) by mrg
Branch: MAIN
Changes since 1.97: +190 -678 lines
Diff to previous 1.97 (colored)

port kue(4) to usbnet(9).  interesting notes:
- move KUE_RXFILT_PROMISC setting into kue_setiff() from kue_init()
  to avoid multiple setting KUE_CMD_SET_PKT_FILTER reg multiple times
- software-only constructs moved from if_kuereg.h into if_kue.c
- kue is the first (umb(4) will need it to, i think) to have its own
  autoconf detach routine remain
- un_tx_xfer_flags is 0 here, not USBD_FORCE_SHORT_XFER
- fix a potential data exposure (but probably not without a USB
  protocol tap).  kue needs the transfers to be 64-byte aligned, and
  while i doubt it sends more than the frame provided, were sending
  random kernel data (whatever was the 0-63 bytes to alignment) to
  the device.

diffstat says:
2 files changed, 189 insertions(+), 739 deletions(-)

Revision 1.97 / (download) - annotate - [select for diffs], Thu Aug 1 00:10:22 2019 UTC (4 years, 7 months ago) by mrg
Branch: MAIN
Changes since 1.96: +2 -4 lines
Diff to previous 1.96 (colored)

remove unused code and use common ethernet media code where equivalent.

Revision 1.96 / (download) - annotate - [select for diffs], Tue May 28 07:41:50 2019 UTC (4 years, 9 months ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-20190609, netbsd-9-base
Branch point for: netbsd-9
Changes since 1.95: +9 -4 lines
Diff to previous 1.95 (colored)

 Use ETHER_LOCK()/ETHER_UNLOCK() for all ethernet drivers to protect ec_multi*.

Revision 1.95 / (download) - annotate - [select for diffs], Thu May 23 13:10:52 2019 UTC (4 years, 9 months ago) by msaitoh
Branch: MAIN
Changes since 1.94: +3 -3 lines
Diff to previous 1.94 (colored)

 Whitespace fix (mainly tabify).

Revision 1.94 / (download) - annotate - [select for diffs], Thu May 23 10:57:29 2019 UTC (4 years, 9 months ago) by msaitoh
Branch: MAIN
Changes since 1.93: +5 -5 lines
Diff to previous 1.93 (colored)

-No functional change:
  - KNF
  - u_int*_t -> uint*_t.

Revision 1.93 / (download) - annotate - [select for diffs], Sun May 5 03:17:54 2019 UTC (4 years, 10 months ago) by mrg
Branch: MAIN
Changes since 1.92: +3 -3 lines
Diff to previous 1.92 (colored)

remove explicit 'extern struct cfdriver <my>_cd;' and use ioconf.h

Revision 1.92 / (download) - annotate - [select for diffs], Tue Jun 26 06:48:02 2018 UTC (5 years, 8 months ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, jdolecek-ncqfixes-base, jdolecek-ncqfixes, isaki-audio2-base, isaki-audio2
Branch point for: phil-wifi
Changes since 1.91: +3 -3 lines
Diff to previous 1.91 (colored)

 Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

 This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.

Revision 1.91 / (download) - annotate - [select for diffs], Sun Jan 21 13:57:12 2018 UTC (6 years, 1 month ago) by skrll
Branch: MAIN
CVS Tags: pgoyette-compat-base, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Changes since 1.90: +3 -3 lines
Diff to previous 1.90 (colored)

PR kern/52931 Kernel panics with Atheros usb wireless interface

Audit the flags to usbd_create_xfer so that USBD_FORCE_SHORT_XFER is
supplied wherever such a transfer is setup.  We can drop
USBD_SHORT_XFER_OK as it has not bearing on number of TDs

Revision 1.90 / (download) - annotate - [select for diffs], Thu Jun 1 02:45:11 2017 UTC (6 years, 9 months ago) by chs
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek
Branch point for: netbsd-8
Changes since 1.89: +2 -7 lines
Diff to previous 1.89 (colored)

remove checks for failure after memory allocation calls that cannot fail:

  kmem_alloc() with KM_SLEEP
  kmem_zalloc() with KM_SLEEP
  percpu_alloc()
  pserialize_create()
  psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.

Revision 1.89 / (download) - annotate - [select for diffs], Thu Jan 12 18:26:08 2017 UTC (7 years, 2 months ago) by maya
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, pgoyette-localcount-20170320, nick-nhusb-base-20170204, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Changes since 1.88: +3 -3 lines
Diff to previous 1.88 (colored)

Appease coverity which is having nightmares about strings not being
null-terminated by using strlcpy rather than strncpy when it doesn't
matter.

ok christos.

Revision 1.88 / (download) - annotate - [select for diffs], Thu Dec 15 09:28:06 2016 UTC (7 years, 3 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107
Changes since 1.87: +2 -11 lines
Diff to previous 1.87 (colored)

Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input

The benefits of the change are:
- We can reduce codes
- We can provide the same behavior between drivers
  - Where/When if_ipackets is counted up
  - Note that some drivers still update packet statistics in their own
    way (periodical update)
- Moved bpf_mtap run in softint
  - This makes it easy to MP-ify bpf

Proposed on tech-kern and tech-net

Revision 1.87 / (download) - annotate - [select for diffs], Fri Nov 25 12:56:29 2016 UTC (7 years, 3 months ago) by skrll
Branch: MAIN
CVS Tags: nick-nhusb-base-20161204
Changes since 1.86: +3 -2 lines
Diff to previous 1.86 (colored)

+#include "opt_usb.h"

Revision 1.86 / (download) - annotate - [select for diffs], Thu Jul 7 06:55:42 2016 UTC (7 years, 8 months ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20161004, nick-nhusb-base-20160907, localcount-20160914
Branch point for: pgoyette-localcount
Changes since 1.85: +3 -4 lines
Diff to previous 1.85 (colored)

KNF. Remove extra spaces. No functional change.

Revision 1.85 / (download) - annotate - [select for diffs], Fri Jun 10 13:27:15 2016 UTC (7 years, 9 months ago) by ozaki-r
Branch: MAIN
Changes since 1.84: +3 -3 lines
Diff to previous 1.84 (colored)

Introduce m_set_rcvif and m_reset_rcvif

The API is used to set (or reset) a received interface of a mbuf.
They are counterpart of m_get_rcvif, which will come in another
commit, hide internal of rcvif operation, and reduce the diff of
the upcoming change.

No functional change.

Revision 1.84 / (download) - annotate - [select for diffs], Sat Apr 23 10:15:31 2016 UTC (7 years, 10 months ago) by skrll
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529
Changes since 1.83: +99 -97 lines
Diff to previous 1.83 (colored)

Merge nick-nhusb

- API / infrastructure changes to support memory management changes.
- Memory management improvements and bug fixes.
- HCDs should now be MP safe
- conversion to KERNHIST based debug
- FS/LS isoc support on ehci(4).
- conversion to kmem(9)
- Some USB 3 support - mostly from Takahiro HAYASHI (t-hash).
- interrupt transfers now get proper DMA operations
- general bug fixes
    - kern/48308
    - uhub status notification improvements
    - umass(4) probe fix (applied to HEAD already)
    - ohci(4) short transfer fix

Revision 1.83 / (download) - annotate - [select for diffs], Tue Feb 9 08:32:12 2016 UTC (8 years, 1 month ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20160422, nick-nhusb-base-20160319
Changes since 1.82: +3 -3 lines
Diff to previous 1.82 (colored)

Introduce softint-based if_input

This change intends to run the whole network stack in softint context
(or normal LWP), not hardware interrupt context. Note that the work is
still incomplete by this change; to that end, we also have to softint-ify
if_link_state_change (and bpf) which can still run in hardware interrupt.

This change softint-ifies at ifp->if_input that is called from
each device driver (and ieee80211_input) to ensure Layer 2 runs
in softint (e.g., ether_input and bridge_input). To this end,
we provide a framework (called percpuq) that utlizes softint(9)
and percpu ifqueues. With this patch, rxintr of most drivers just
queues received packets and schedules a softint, and the softint
dequeues packets and does rest packet processing.

To minimize changes to each driver, percpuq is allocated in struct
ifnet for now and that is initialized by default (in if_attach).
We probably have to move percpuq to softc of each driver, but it's
future work. At this point, only wm(4) has percpuq in its softc
as a reference implementation.

Additional information including performance numbers can be found
in the thread at tech-kern@ and tech-net@:
http://mail-index.netbsd.org/tech-kern/2016/01/14/msg019997.html

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!

Revision 1.82 / (download) - annotate - [select for diffs], Mon Apr 13 16:33:25 2015 UTC (8 years, 11 months ago) by riastradh
Branch: MAIN
CVS Tags: nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606
Changes since 1.81: +3 -3 lines
Diff to previous 1.81 (colored)

Convert sys/dev to use <sys/rndsource.h>.

Revision 1.81 / (download) - annotate - [select for diffs], Sun Aug 10 16:44:36 2014 UTC (9 years, 7 months ago) by tls
Branch: MAIN
CVS Tags: tls-maxphys-base, nick-nhusb-base-20150406, nick-nhusb-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-base, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0
Branch point for: nick-nhusb, netbsd-7-nhusb, netbsd-7
Changes since 1.80: +3 -3 lines
Diff to previous 1.80 (colored)

Merge tls-earlyentropy branch into HEAD.

Revision 1.80 / (download) - annotate - [select for diffs], Wed Oct 16 07:34:20 2013 UTC (10 years, 5 months ago) by skrll
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-earlyentropy-base, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Changes since 1.79: +8 -4 lines
Diff to previous 1.79 (colored)

Apply patch from PR/48310 - kue(4) cannot receive multicast packets.

Revision 1.79 / (download) - annotate - [select for diffs], Sat Jan 5 01:30:15 2013 UTC (11 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base8, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, agc-symver-base, agc-symver
Branch point for: rmind-smpnet
Changes since 1.78: +4 -2 lines
Diff to previous 1.78 (colored)

- need opt_usb.h if depending on USB_DEBUG
- remove trailing whitespace
- add missing KERNEL_RCSID

Revision 1.78 / (download) - annotate - [select for diffs], Thu Dec 27 16:42:32 2012 UTC (11 years, 2 months ago) by skrll
Branch: MAIN
Changes since 1.77: +4 -3 lines
Diff to previous 1.77 (colored)

Consistent/Correct error message from failing usbd_set_config.

Use aprint_error_dev.

Revision 1.77 / (download) - annotate - [select for diffs], Sun Mar 11 01:06:06 2012 UTC (12 years ago) by mrg
Branch: MAIN
CVS Tags: yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base10
Branch point for: tls-maxphys
Changes since 1.76: +5 -6 lines
Diff to previous 1.76 (colored)

minor cleanups from usbmp:
- move usbd_delay_ms() into usbdivar.h in the usb_subr.c section
- minor rcsid fixes
- copyright maintenence

Revision 1.76 / (download) - annotate - [select for diffs], Sat Mar 10 23:01:07 2012 UTC (12 years ago) by mrg
Branch: MAIN
Changes since 1.75: +2 -9 lines
Diff to previous 1.75 (colored)

remove checks against "!curproc".

Revision 1.75 / (download) - annotate - [select for diffs], Thu Feb 2 19:43:07 2012 UTC (12 years, 1 month ago) by tls
Branch: MAIN
CVS Tags: netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2
Changes since 1.74: +2 -9 lines
Diff to previous 1.74 (colored)

Entropy-pool implementation move and cleanup.

1) Move core entropy-pool code and source/sink/sample management code
   to sys/kern from sys/dev.

2) Remove use of NRND as test for presence of entropy-pool code throughout
   source tree.

3) Remove use of RND_ENABLED in device drivers as microoptimization to
   avoid expensive operations on disabled entropy sources; make the
   rnd_add calls do this directly so all callers benefit.

4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might
   have lead to slight entropy overestimation for some sources.

5) Add new source types for environmental sensors, power sensors, VM
   system events, and skew between clocks, with a sample implementation
   for each.

ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files).  Tested with release
builds on amd64 and evbarm and live testing on amd64.

Revision 1.74 / (download) - annotate - [select for diffs], Wed Nov 3 22:28:31 2010 UTC (13 years, 4 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, uebayasi-xip-base4, rmind-uvmplock-nbase, rmind-uvmplock-base, mrg-ohci-jmcneill-usbmp-base, mrg-ohci-jmcneill-usbmp, matt-mips64-premerge-20101231, jruoho-x86intr-base, jruoho-x86intr, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: yamt-pagecache, jmcneill-usbmp
Changes since 1.73: +81 -71 lines
Diff to previous 1.73 (colored)

Stop using the compatibility macros USB_ATTACH(), USB_DETACH(),
USB_MATCH(), et cetera.  These files produce the same assembly
(according to objdump -d) before and after the change, except for
if_cue.c where two adjacent instructions inexplicably change order.

Revision 1.73 / (download) - annotate - [select for diffs], Mon Aug 16 11:21:43 2010 UTC (13 years, 7 months ago) by tsutsui
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, uebayasi-xip-base3, uebayasi-xip-base2
Changes since 1.72: +41 -86 lines
Diff to previous 1.72 (colored)

Misc cleanup:
- no need to keep TX/RX mbufs during xfers in struct kue_chain
- check RX packet length more strictly in kue_rxeof()
- make some TX/RX handling in kue_send() and kue_rxeof() more readable
  with proper functions

Tested on:
kue0: LINKSYS USB  Network Adapter, rev 1.00/2.02, addr 5

Revision 1.72 / (download) - annotate - [select for diffs], Mon Aug 16 09:52:11 2010 UTC (13 years, 7 months ago) by tsutsui
Branch: MAIN
Changes since 1.71: +37 -37 lines
Diff to previous 1.71 (colored)

Static -> static

We can still preserve static function symbols for debug.
(they're also likely inlined but we can specify -fno-inline on debug)

Revision 1.71 / (download) - annotate - [select for diffs], Mon Aug 16 09:44:01 2010 UTC (13 years, 7 months ago) by tsutsui
Branch: MAIN
Changes since 1.70: +18 -18 lines
Diff to previous 1.70 (colored)

- u_intNN_t -> uintNN_t
- use uint8_t for binary data
- use bool for boolean vaules
No binary change.

Revision 1.70 / (download) - annotate - [select for diffs], Mon Aug 16 09:34:43 2010 UTC (13 years, 7 months ago) by tsutsui
Branch: MAIN
Changes since 1.69: +2 -33 lines
Diff to previous 1.69 (colored)

Unifdef defined(__NetBSD__) part. No binary change.

Revision 1.69 / (download) - annotate - [select for diffs], Mon Apr 5 07:21:48 2010 UTC (13 years, 11 months ago) by joerg
Branch: MAIN
CVS Tags: yamt-nfs-mp-base10, uebayasi-xip-base1
Changes since 1.68: +4 -6 lines
Diff to previous 1.68 (colored)

Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.

Revision 1.68 / (download) - annotate - [select for diffs], Tue Jan 19 22:07:43 2010 UTC (14 years, 2 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.67: +4 -11 lines
Diff to previous 1.67 (colored)

Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client.  This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached.  However, callers of bpf can
now be modularized.

Dynamically loadable bpf could probably be done fairly easily with
coordination from the stub driver and the real driver by registering
attachments in the stub before the real driver is loaded and doing
a handoff.  ... and I'm not going to ponder the depths of unload
here.

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.

Revision 1.67 / (download) - annotate - [select for diffs], Sun Dec 6 20:20:12 2009 UTC (14 years, 3 months ago) by dyoung
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.66: +5 -10 lines
Diff to previous 1.66 (colored)

Simplify several device-activation hooks.

Revision 1.66 / (download) - annotate - [select for diffs], Wed Sep 23 19:07:19 2009 UTC (14 years, 5 months ago) by plunky
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.65: +5 -3 lines
Diff to previous 1.65 (colored)

fix up USB drivers printing of autoconf information

1. expand the USB_ATTACH_SETUP macro (requested by jmcneill)

2. reorder the attach function so that the first thing it does is print
   newlines.

3. after this, we can call usbd_devinfo_alloc(), which polls the device
   allowing a context switch, and aprint_normal() the device information.

this avoids problems where autoconf messages are getting mixed up.

Revision 1.65 / (download) - annotate - [select for diffs], Fri Sep 4 18:10:08 2009 UTC (14 years, 6 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8
Changes since 1.64: +8 -8 lines
Diff to previous 1.64 (colored)

Change spaces to tabs and remove some unnecessary parentheses.  No
functional change intended.

Revision 1.64 / (download) - annotate - [select for diffs], Fri Nov 7 00:20:12 2008 UTC (15 years, 4 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base2, nick-hppapmap-base, mjf-devfs2-base, jymxensuspend-base, jym-xensuspend-base, jym-xensuspend, haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Changes since 1.63: +6 -4 lines
Diff to previous 1.63 (colored)

*** Summary ***

When a link-layer address changes (e.g., ifconfig ex0 link
02:de:ad:be:ef:02 active), send a gratuitous ARP and/or a Neighbor
Advertisement to update the network-/link-layer address bindings
on our LAN peers.

Refuse a change of ethernet address to the address 00:00:00:00:00:00
or to any multicast/broadcast address.  (Thanks matt@.)

Reorder ifnet ioctl operations so that driver ioctls may inherit
the functions of their "class"---ether_ioctl(), fddi_ioctl(), et
cetera---and the class ioctls may inherit from the generic ioctl,
ifioctl_common(), but both driver- and class-ioctls may override
the generic behavior.  Make network drivers share more code.

Distinguish a "factory" link-layer address from others for the
purposes of both protecting that address from deletion and computing
EUI64.

Return consistent, appropriate error codes from network drivers.

Improve readability.  KNF.

*** Details ***

In if_attach(), always initialize the interface ioctl routine,
ifnet->if_ioctl, if the driver has not already initialized it.
Delete if_ioctl == NULL tests everywhere else, because it cannot
happen.

In the ioctl routines of network interfaces, inherit common ioctl
behaviors by calling either ifioctl_common() or whichever ioctl
routine is appropriate for the class of interface---e.g., ether_ioctl()
for ethernets.

Stop (ab)using SIOCSIFADDR and start to use SIOCINITIFADDR.  In
the user->kernel interface, SIOCSIFADDR's argument was an ifreq,
but on the protocol->ifnet interface, SIOCSIFADDR's argument was
an ifaddr.  That was confusing, and it would work against me as I
make it possible for a network interface to overload most ioctls.
On the protocol->ifnet interface, replace SIOCSIFADDR with
SIOCINITIFADDR.  In ifioctl(), return EPERM if userland tries to
invoke SIOCINITIFADDR.

In ifioctl(), give the interface the first shot at handling most
interface ioctls, and give the protocol the second shot, instead
of the other way around. Finally, let compatibility code (COMPAT_OSOCK)
take a shot.

Pull device initialization out of switch statements under
SIOCINITIFADDR.  For example, pull ..._init() out of any switch
statement that looks like this:

        switch (...->sa_family) {
        case ...:
                ..._init();
                ...
                break;
        ...
        default:
                ..._init();
                ...
                break;
        }

Rewrite many if-else clauses that handle all permutations of IFF_UP
and IFF_RUNNING to use a switch statement,

        switch (x & (IFF_UP|IFF_RUNNING)) {
        case 0:
                ...
                break;
        case IFF_RUNNING:
                ...
                break;
        case IFF_UP:
                ...
                break;
        case IFF_UP|IFF_RUNNING:
                ...
                break;
        }

unifdef lots of code containing #ifdef FreeBSD, #ifdef NetBSD, and
#ifdef SIOCSIFMTU, especially in fwip(4) and in ndis(4).

In ipw(4), remove an if_set_sadl() call that is out of place.

In nfe(4), reuse the jumbo MTU logic in ether_ioctl().

Let ethernets register a callback for setting h/w state such as
promiscuous mode and the multicast filter in accord with a change
in the if_flags: ether_set_ifflags_cb() registers a callback that
returns ENETRESET if the caller should reset the ethernet by calling
if_init(), 0 on success, != 0 on failure.  Pull common code from
ex(4), gem(4), nfe(4), sip(4), tlp(4), vge(4) into ether_ioctl(),
and register if_flags callbacks for those drivers.

Return ENOTTY instead of EINVAL for inappropriate ioctls.  In
zyd(4), use ENXIO instead of ENOTTY to indicate that the device is
not any longer attached.

Add to if_set_sadl() a boolean 'factory' argument that indicates
whether a link-layer address was assigned by the factory or some
other source.  In a comment, recommend using the factory address
for generating an EUI64, and update in6_get_hw_ifid() to prefer a
factory address to any other link-layer address.

Add a routing message, RTM_LLINFO_UPD, that tells protocols to
update the binding of network-layer addresses to link-layer addresses.
Implement this message in IPv4 and IPv6 by sending a gratuitous
ARP or a neighbor advertisement, respectively.  Generate RTM_LLINFO_UPD
messages on a change of an interface's link-layer address.

In ether_ioctl(), do not let SIOCALIFADDR set a link-layer address
that is broadcast/multicast or equal to 00:00:00:00:00:00.

Make ether_ioctl() call ifioctl_common() to handle ioctls that it
does not understand.

In gif(4), initialize if_softc and use it, instead of assuming that
the gif_softc and ifp overlap.

Let ifioctl_common() handle SIOCGIFADDR.

Sprinkle rtcache_invariants(), which checks on DIAGNOSTIC kernels
that certain invariants on a struct route are satisfied.

In agr(4), rewrite agr_ioctl_filter() to be a bit more explicit
about the ioctls that we do not allow on an agr(4) member interface.

bzero -> memset.  Delete unnecessary casts to void *.  Use
sockaddr_in_init() and sockaddr_in6_init().  Compare pointers with
NULL instead of "testing truth".  Replace some instances of (type
*)0 with NULL.  Change some K&R prototypes to ANSI C, and join
lines.

Revision 1.63 / (download) - annotate - [select for diffs], Sat May 24 16:40:58 2008 UTC (15 years, 9 months ago) by cube
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, haad-dm-base1
Branch point for: nick-hppapmap, haad-dm
Changes since 1.62: +16 -20 lines
Diff to previous 1.62 (colored)

Split device_t and softc for all USB device drivers, and related cosmetic
changes.

Matthias Drochner kindly reviewed this patch, and tested ums, ubt, uaudio
and ral.  I tested umass myself.

Revision 1.62 / (download) - annotate - [select for diffs], Thu Feb 7 01:21:59 2008 UTC (16 years, 1 month ago) by dyoung
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base2, yamt-pf42-base, yamt-nfs-mp-base2, yamt-nfs-mp-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-nbase, hpcarm-cleanup-base, ad-socklock-base1
Branch point for: yamt-pf42, yamt-nfs-mp, wrstuden-revivesa, mjf-devfs2
Changes since 1.61: +5 -5 lines
Diff to previous 1.61 (colored)

Start patching up the kernel so that a network driver always has
the opportunity to handle an ioctl before generic ifioctl handling
occurs.  This will ease extending the kernel and sharing of code
between drivers.

First steps:  Make the signature of ifioctl_common() match struct
ifinet->if_ioctl.  Convert SIOCSIFCAP and SIOCSIFMTU to the new
ifioctl() regime, throughout the kernel.

Revision 1.61 / (download) - annotate - [select for diffs], Thu Dec 20 21:08:19 2007 UTC (16 years, 3 months ago) by dyoung
Branch: MAIN
CVS Tags: vmlocking2-base3, matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.60: +4 -8 lines
Diff to previous 1.60 (colored)

Constify struct ifnet->if_sadl and every use throughout the tree.
Add if_set_sadl() that both sets the link-layer address length and
replaces the current link-layer address with a new one, and use it
throughout the tree.

Revision 1.60 / (download) - annotate - [select for diffs], Tue Mar 13 13:51:54 2007 UTC (17 years ago) by drochner
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, yamt-idlelwp-base8, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, vmlocking-base, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, reinoud-bufcleanup, nick-csl-alignment-base5, nick-csl-alignment-base, nick-csl-alignment, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, jmcneill-pm-base, jmcneill-pm, jmcneill-base, hpcarm-cleanup, cube-autoconf-base, cube-autoconf, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: vmlocking2, mjf-devfs, matt-armv6, bouyer-xeni386
Changes since 1.59: +2 -5 lines
Diff to previous 1.59 (colored)

Introduce different autoconf interface attributes for USB drivers
matching (and handling) a whole device and those which match an
interface only. This will allow to enforce some rules, eg that
the former don't use interface information for matching or that the
latter don't modify global device state.
The previous way left too much freedom do the drivers which led to
inconsistencies and abuse.
For now, I've not changed locators and submatch rules, this will
happen later.
There should not be any change in behaviour, except in the case of
some drivers which did behave inconsistently:
if_atu, if_axe, uep: matched the configured device in the interface
 stage, but did configuration again. I've converted them to match
 in the device stage.
ustir, utoppy: matched in the interface stage, but only against
 vendor/device information, and used any configuration/interface
 without checking. Changed to match in device stage, and added
 some simple code to configure and use the first interface.
If you have one of those devices, please test!

Revision 1.59 / (download) - annotate - [select for diffs], Sun Mar 4 06:02:48 2007 UTC (17 years ago) by christos
Branch: MAIN
Branch point for: vmlocking, mjf-ufs-trans
Changes since 1.58: +4 -4 lines
Diff to previous 1.58 (colored)

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.58 / (download) - annotate - [select for diffs], Thu Nov 16 01:33:26 2006 UTC (17 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, post-newlock2-merge, newlock2-nbase, newlock2-base, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-nb4-arm-base, matt-nb4-arm, itohy-usb1-base, ad-audiomp-base, ad-audiomp
Branch point for: yamt-idlelwp, itohy-usb1
Changes since 1.57: +3 -3 lines
Diff to previous 1.57 (colored)

__unused removal on arguments; approved by core.

Revision 1.57 / (download) - annotate - [select for diffs], Thu Oct 12 01:31:59 2006 UTC (17 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.56: +4 -3 lines
Diff to previous 1.56 (colored)

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.56 / (download) - annotate - [select for diffs], Thu Sep 7 02:40:33 2006 UTC (17 years, 6 months ago) by dogcow
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, rpaulo-netinet-merge-pcb-base
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.55: +2 -22 lines
Diff to previous 1.55 (colored)

remove more vestiges of CCITT, LLC, HDLC, NS, and NSIP.

Revision 1.55 / (download) - annotate - [select for diffs], Mon Nov 28 13:31:09 2005 UTC (18 years, 3 months ago) by augustss
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-readahead-base3, yamt-pdpolicy-base8, yamt-pdpolicy-base7, yamt-pdpolicy-base6, yamt-pdpolicy-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, simonb-timecounters-base, simonb-timecounters, simonb-timcounters-final, peter-altq-base, peter-altq, ktrace-lwp-base, gdamore-uart-base, gdamore-uart, elad-kernelauth-base, elad-kernelauth, chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-pdpolicy, rpaulo-netinet-merge-pcb
Changes since 1.54: +4 -4 lines
Diff to previous 1.54 (colored)

Use usbd_clear_endpoint_stall_async() when clearing endpoint stalls in
an interrupt context.  From kern/32172 by darkstar@city-net.com.

Revision 1.54 / (download) - annotate - [select for diffs], Mon May 30 04:21:39 2005 UTC (18 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base2, yamt-readahead-base, thorpej-vnode-attr-base, thorpej-vnode-attr
Branch point for: yamt-readahead, yamt-lazymbuf
Changes since 1.53: +8 -5 lines
Diff to previous 1.53 (colored)

- const poisoning
- eliminate variable shadowing

Revision 1.53 / (download) - annotate - [select for diffs], Wed May 11 10:02:28 2005 UTC (18 years, 10 months ago) by augustss
Branch: MAIN
Changes since 1.52: +6 -5 lines
Diff to previous 1.52 (colored)

Don't keep the devinfo string on the stack, instead use malloc/free.
This should cure some rare stack overflows.

Revision 1.52 / (download) - annotate - [select for diffs], Fri Oct 22 09:41:01 2004 UTC (19 years, 5 months ago) by augustss
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, yamt-km-base2, yamt-km-base, yamt-km, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3, kent-audio2-base, kent-audio2, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Changes since 1.51: +3 -2 lines
Diff to previous 1.51 (colored)

Add a device.  From OpenBSD.

Revision 1.51 / (download) - annotate - [select for diffs], Fri Apr 23 17:25:25 2004 UTC (19 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.50: +3 -3 lines
Diff to previous 1.50 (colored)

use bounded string ops (snprintf, strl*)

Revision 1.50 / (download) - annotate - [select for diffs], Tue Jul 16 22:00:31 2002 UTC (21 years, 8 months ago) by augustss
Branch: MAIN
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2, nathanw_sa_before_merge, nathanw_sa_base, kqueue-beforemerge, kqueue-base, kqueue-aftermerge, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, gehenna-devsw-base, fvdl_fs64_base
Branch point for: ktrace-lwp
Changes since 1.49: +5 -6 lines
Diff to previous 1.49 (colored)

Refetch interface handle on reset.  Avoids potential access to freed memory.
Fix from FreeBSD.

Revision 1.49 / (download) - annotate - [select for diffs], Thu Jul 11 21:14:26 2002 UTC (21 years, 8 months ago) by augustss
Branch: MAIN
Changes since 1.48: +7 -7 lines
Diff to previous 1.48 (colored)

Get rid of trailing white space.

Revision 1.48 / (download) - annotate - [select for diffs], Mon Jul 8 17:46:24 2002 UTC (21 years, 8 months ago) by augustss
Branch: MAIN
Changes since 1.47: +25 -25 lines
Diff to previous 1.47 (colored)

s/__FUNCTION__/__func__/

Revision 1.47 / (download) - annotate - [select for diffs], Sun Mar 17 18:02:52 2002 UTC (22 years ago) by augustss
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6, eeh-devprop-base, eeh-devprop
Branch point for: gehenna-devsw
Changes since 1.46: +3 -3 lines
Diff to previous 1.46 (colored)

Whitespace fixes.

Revision 1.46 / (download) - annotate - [select for diffs], Wed Dec 12 15:36:09 2001 UTC (22 years, 3 months ago) by augustss
Branch: MAIN
CVS Tags: newlock-base, newlock, ifpoll-base
Changes since 1.45: +3 -3 lines
Diff to previous 1.45 (colored)

Remove some stupid casts.

Revision 1.45 / (download) - annotate - [select for diffs], Mon Dec 3 01:47:12 2001 UTC (22 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.44: +6 -10 lines
Diff to previous 1.44 (colored)

Handle vendor/product lookup with a common routine.

Revision 1.44 / (download) - annotate - [select for diffs], Tue Nov 13 06:24:54 2001 UTC (22 years, 4 months ago) by lukem
Branch: MAIN
Changes since 1.43: +4 -1 lines
Diff to previous 1.43 (colored)

add RCSIDs

Revision 1.43 / (download) - annotate - [select for diffs], Mon Oct 8 03:37:53 2001 UTC (22 years, 5 months ago) by augustss
Branch: MAIN
CVS Tags: thorpej-mips-cache-base, thorpej-mips-cache, thorpej-devvp-base3
Changes since 1.42: +15 -1 lines
Diff to previous 1.42 (colored)

Add some more Ethernet adapters (info gleaned from Linux).

Revision 1.42 / (download) - annotate - [select for diffs], Mon Jul 16 13:54:23 2001 UTC (22 years, 8 months ago) by augustss
Branch: MAIN
CVS Tags: thorpej-devvp-base2, thorpej-devvp-base, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-devvp
Changes since 1.41: +11 -11 lines
Diff to previous 1.41 (colored)

Alphabetize.

Revision 1.41 / (download) - annotate - [select for diffs], Fri Apr 13 23:30:09 2001 UTC (22 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Branch point for: kqueue
Changes since 1.40: +6 -6 lines
Diff to previous 1.40 (colored)

Remove the use of splimp() from the NetBSD kernel.  splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.

Revision 1.40 / (download) - annotate - [select for diffs], Sun Apr 8 02:10:57 2001 UTC (22 years, 11 months ago) by augustss
Branch: MAIN
Changes since 1.39: +2 -1 lines
Diff to previous 1.39 (colored)

Add a Peracom adapter.

Revision 1.39 / (download) - annotate - [select for diffs], Tue Jan 30 15:04:23 2001 UTC (23 years, 1 month ago) by augustss
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.38: +2 -1 lines
Diff to previous 1.38 (colored)

Add Abocom URE450 Ethernet adapter.

Revision 1.38 / (download) - annotate - [select for diffs], Mon Jan 29 01:24:43 2001 UTC (23 years, 1 month ago) by enami
Branch: MAIN
Changes since 1.37: +14 -19 lines
Diff to previous 1.37 (colored)

Handle allmulti case correctly as a NetBSD network driver;
if we are requested range of multicast address or too many multicast address,
program multicast filter to receive all multicast address.   And set/clear
IFF_ALLMULTI flag properly.

Revision 1.37 / (download) - annotate - [select for diffs], Sun Jan 21 15:55:05 2001 UTC (23 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.36: +35 -232 lines
Diff to previous 1.36 (colored)

Several changes:
 * Get rid of `#ifdef FreeBSD'; they seem to maintain their own version.
 * Change watchdog code (from FreeBSD).
 * Get rid of the horrible USBD_NO_TSLEEP hack.
 * Repair some const damage.

Revision 1.36 / (download) - annotate - [select for diffs], Sun Jan 21 02:33:52 2001 UTC (23 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.35: +11 -25 lines
Diff to previous 1.35 (colored)

Use a better way to test if we are cold starting the device. (From FreeBSD)

Revision 1.35 / (download) - annotate - [select for diffs], Thu Jan 18 20:28:23 2001 UTC (23 years, 2 months ago) by jdolecek
Branch: MAIN
Changes since 1.34: +7 -7 lines
Diff to previous 1.34 (colored)

constify

Revision 1.34 / (download) - annotate - [select for diffs], Thu Dec 14 07:51:36 2000 UTC (23 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.33: +8 -5 lines
Diff to previous 1.33 (colored)

ALTQ'ify.

Revision 1.33 / (download) - annotate - [select for diffs], Wed Dec 6 21:44:08 2000 UTC (23 years, 3 months ago) by jdolecek
Branch: MAIN
Changes since 1.32: +2 -1 lines
Diff to previous 1.32 (colored)

add I/O Data USB-ET/T (which uses KL5KUSB101B) to the list
Patch sent in kern/11635 by ORI Manabu

Revision 1.32 / (download) - annotate - [select for diffs], Wed Nov 15 01:02:19 2000 UTC (23 years, 4 months ago) by thorpej
Branch: MAIN
Branch point for: thorpej_scsipi
Changes since 1.31: +1 -9 lines
Diff to previous 1.31 (colored)

Move bpfattach()/bpfdetach() calls into ether_ifattach()/ether_ifdetach().

Revision 1.31 / (download) - annotate - [select for diffs], Tue Oct 24 14:53:59 2000 UTC (23 years, 4 months ago) by augustss
Branch: MAIN
Changes since 1.30: +3 -3 lines
Diff to previous 1.30 (colored)

Tell usbd_set_config_no() to be verbose.  It's nice to know whyit fails.

Revision 1.30 / (download) - annotate - [select for diffs], Sun Oct 1 23:32:45 2000 UTC (23 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.29: +2 -15 lines
Diff to previous 1.29 (colored)

Move the check for "promisc + unicast + not for us" into ether_input(),
and change Ethernet drivers to always pass all received frames to
ether_input() (with a few exceptions, which are documented in the
code).

Revision 1.29 / (download) - annotate - [select for diffs], Thu Jun 1 14:28:58 2000 UTC (23 years, 9 months ago) by augustss
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2
Branch point for: netbsd-1-5
Changes since 1.28: +46 -87 lines
Diff to previous 1.28 (colored)

Bring the coding style into the 80s, i.e., get rid of __P and use
ANSI prototypes and declarations.

Revision 1.28 / (download) - annotate - [select for diffs], Sun Apr 2 21:25:41 2000 UTC (23 years, 11 months ago) by augustss
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.27: +3 -3 lines
Diff to previous 1.27 (colored)

Generate an error message if starting a transfer fails.

Revision 1.27 / (download) - annotate - [select for diffs], Thu Mar 30 00:18:17 2000 UTC (23 years, 11 months ago) by augustss
Branch: MAIN
Changes since 1.26: +7 -2 lines
Diff to previous 1.26 (colored)

Afew more OpenBSD portability fixes.

Revision 1.26 / (download) - annotate - [select for diffs], Wed Mar 29 18:24:53 2000 UTC (23 years, 11 months ago) by augustss
Branch: MAIN
Changes since 1.25: +37 -9 lines
Diff to previous 1.25 (colored)

Some OpenBSD portability fixes.

Revision 1.25 / (download) - annotate - [select for diffs], Mon Mar 27 22:44:01 2000 UTC (23 years, 11 months ago) by augustss
Branch: MAIN
Changes since 1.24: +4 -3 lines
Diff to previous 1.24 (colored)

Use default timeout for transfers.

Revision 1.24 / (download) - annotate - [select for diffs], Mon Mar 27 12:33:54 2000 UTC (23 years, 11 months ago) by augustss
Branch: MAIN
Changes since 1.23: +46 -46 lines
Diff to previous 1.23 (colored)

Change (almost) all static to Static.  The symbol `Static' can then be defined
to `' or `static' depending on if you want to debug or not.

Revision 1.23 / (download) - annotate - [select for diffs], Sun Mar 26 15:08:44 2000 UTC (23 years, 11 months ago) by augustss
Branch: MAIN
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored)

Regen & adjust name.

Revision 1.22 / (download) - annotate - [select for diffs], Sat Mar 25 17:59:34 2000 UTC (23 years, 11 months ago) by augustss
Branch: MAIN
Changes since 1.21: +22 -4 lines
Diff to previous 1.21 (colored)

Change the test for cold boot slightly to avoid a long busy wait with UHCI.

Revision 1.21 / (download) - annotate - [select for diffs], Fri Mar 24 22:03:30 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.20: +1 -2 lines
Diff to previous 1.20 (colored)

Some cleanup and renaming of the callouts used in USB drivers.

Revision 1.20 / (download) - annotate - [select for diffs], Thu Mar 23 07:01:45 2000 UTC (24 years ago) by thorpej
Branch: MAIN
Changes since 1.19: +2 -1 lines
Diff to previous 1.19 (colored)

New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.

Revision 1.19 / (download) - annotate - [select for diffs], Mon Mar 20 01:31:10 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.18: +2 -1 lines
Diff to previous 1.18 (colored)

Some new devices.  From FreeBSD.

Revision 1.18 / (download) - annotate - [select for diffs], Mon Mar 20 00:41:55 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.17: +13 -61 lines
Diff to previous 1.17 (colored)

Clean up code a little.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Mar 20 00:27:11 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.16: +6 -17 lines
Diff to previous 1.16 (colored)

Switch method for determing if we are cold booting.  The driver now works
with OHCI adapters.

Revision 1.16 / (download) - annotate - [select for diffs], Wed Mar 15 22:40:30 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.15: +1 -2 lines
Diff to previous 1.15 (colored)

Fix some uninitialized variables.  From Krister Walfridsson <cato@df.lth.se>

Revision 1.15 / (download) - annotate - [select for diffs], Sun Mar 12 21:59:38 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.14: +13 -10 lines
Diff to previous 1.14 (colored)

Avoid accessing the device if it is dying.

Revision 1.14 / (download) - annotate - [select for diffs], Wed Mar 8 15:33:38 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.13: +5 -1 lines
Diff to previous 1.13 (colored)

Add a debug message.

Revision 1.13 / (download) - annotate - [select for diffs], Mon Mar 6 21:02:03 2000 UTC (24 years ago) by thorpej
Branch: MAIN
Changes since 1.12: +1 -3 lines
Diff to previous 1.12 (colored)

No longer necessary to futz with ifp->if_baudrate here.

Revision 1.12 / (download) - annotate - [select for diffs], Mon Mar 6 20:58:18 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.11: +4 -4 lines
Diff to previous 1.11 (colored)

Use macros from usb.h instead masking out bit explicitely.

Revision 1.11 / (download) - annotate - [select for diffs], Thu Mar 2 12:37:51 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.10: +8 -3 lines
Diff to previous 1.10 (colored)

Use ratecheck() to limit error messages on disconnect.
Break out some common functionality.

Revision 1.10 / (download) - annotate - [select for diffs], Wed Mar 1 19:00:51 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.9: +5 -1 lines
Diff to previous 1.9 (colored)

Protect the use of bpf_mtap so bpf isn't needed.
aue: Limit the number of error messages at disconnect by using ratecheck().

Revision 1.9 / (download) - annotate - [select for diffs], Tue Feb 29 19:08:09 2000 UTC (24 years ago) by hubertf
Branch: MAIN
Changes since 1.8: +2 -1 lines
Diff to previous 1.8 (colored)

This driver also handles the 3COM 3COM HomeConnect Ethernet USB Adapter
(3C460), rev 1.00/2.05

Revision 1.8 / (download) - annotate - [select for diffs], Thu Feb 17 18:42:21 2000 UTC (24 years, 1 month ago) by augustss
Branch: MAIN
Changes since 1.7: +14 -4 lines
Diff to previous 1.7 (colored)

Handle detach that happens before attach has finished.  (Reported by mycroft.)

Revision 1.7 / (download) - annotate - [select for diffs], Thu Feb 17 05:41:41 2000 UTC (24 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.6: +6 -6 lines
Diff to previous 1.6 (colored)

Use bpf_mtap() correctly.

Revision 1.6 / (download) - annotate - [select for diffs], Wed Feb 2 13:21:25 2000 UTC (24 years, 1 month ago) by augustss
Branch: MAIN
CVS Tags: chs-ubc2-newbase
Changes since 1.5: +42 -19 lines
Diff to previous 1.5 (colored)

Generate usb events on attach and detach.
Clean up detach a little.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Feb 1 22:53:14 2000 UTC (24 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.4: +13 -22 lines
Diff to previous 1.4 (colored)

Add support for detaching the interface.

Revision 1.4 / (download) - annotate - [select for diffs], Mon Jan 24 08:47:43 2000 UTC (24 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.3: +2 -1 lines
Diff to previous 1.3 (colored)

Recognize Linksys USB10T.

Revision 1.3 / (download) - annotate - [select for diffs], Tue Jan 18 19:46:55 2000 UTC (24 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.2: +2 -3 lines
Diff to previous 1.2 (colored)

Pretend we can detach.  Then we can at least the detach the device
if the attach fails in the middle.

Revision 1.2 / (download) - annotate - [select for diffs], Mon Jan 17 13:25:22 2000 UTC (24 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.1: +2 -9 lines
Diff to previous 1.1 (colored)

Remove some unnecessary cleanup.

Revision 1.1 / (download) - annotate - [select for diffs], Mon Jan 17 01:38:43 2000 UTC (24 years, 2 months ago) by augustss
Branch: MAIN

Add Bill Paul's FreeBSD driver for the Kawasaki LSI KL5KUSB101B USB Ethernet
chip.

This form allows you to request diff's 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.




CVSweb <webmaster@jp.NetBSD.org>