The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.175 / (download) - annotate - [select for diffs], Mon Nov 6 12:16:52 2023 UTC (4 months, 1 week ago) by hannken
Branch: MAIN
CVS Tags: triaxx-drm, thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.174: +4 -4 lines
Diff to previous 1.174 (colored)

Undo the DPRINTFN part of the last commit.  It breaks i386 at least
when KERNHIST_LOG casts the pointer to uintmax_t.

Kernel ALL/i386 compiles again.

Revision 1.174 / (download) - annotate - [select for diffs], Tue Oct 10 10:58:03 2023 UTC (5 months, 1 week ago) by simonb
Branch: MAIN
Changes since 1.173: +6 -6 lines
Diff to previous 1.173 (colored)

Debug printf tidy up, KNF comma,space nits.

Revision 1.173 / (download) - annotate - [select for diffs], Mon Jul 31 17:41:18 2023 UTC (7 months, 2 weeks ago) by christos
Branch: MAIN
Changes since 1.172: +4 -4 lines
Diff to previous 1.172 (colored)

Don't call versioned stuff "old". Follow the naming convention for versioning
and name them after the last version of the OS they appeared on.

Revision 1.172 / (download) - annotate - [select for diffs], Thu Jul 20 20:00:34 2023 UTC (7 months, 4 weeks ago) by mrg
Branch: MAIN
Changes since 1.171: +61 -49 lines
Diff to previous 1.171 (colored)

various debug updates for some usb drivers

- several new *_DEBUG_DEFAULT options that allow usb debug values to
  be set to a default that is non-zero:
  EHCI_DEBUG_DEFAULT, UGEN_DEBUG_DEFAULT, URTWN_DEBUG_DEFAULT,
  UMS_DEBUG_DEFAULT, and USB_DEBUG_DEFAULT
- ugen debug uses fewer usbhist lines for the same info
- ums.c converted from printf() to usbhist

Revision 1.171 / (download) - annotate - [select for diffs], Sun Oct 23 11:06:37 2022 UTC (16 months, 3 weeks ago) by riastradh
Branch: MAIN
CVS Tags: 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
Changes since 1.170: +3 -3 lines
Diff to previous 1.170 (colored)

ugen(4): Make sure opened is initialized in ugenopen.

Otherwise the error branch is based on garbage.

Revision 1.170 / (download) - annotate - [select for diffs], Sun Oct 23 06:27:26 2022 UTC (16 months, 3 weeks ago) by skrll
Branch: MAIN
Changes since 1.169: +16 -16 lines
Diff to previous 1.169 (colored)

Fix USBDEBUG build on ILP32

Revision 1.169 / (download) - annotate - [select for diffs], Fri Oct 21 04:55:11 2022 UTC (16 months, 4 weeks ago) by mrg
Branch: MAIN
Changes since 1.168: +136 -79 lines
Diff to previous 1.168 (colored)

ugen(4): convert to USBHIST style debugging.

Revision 1.168 / (download) - annotate - [select for diffs], Sun Sep 26 01:16:09 2021 UTC (2 years, 5 months ago) by thorpej
Branch: MAIN
CVS Tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.167: +6 -6 lines
Diff to previous 1.167 (colored)

Change the kqueue filterops::f_isfd field to filterops::f_flags, and
define a flag FILTEROP_ISFD that has the meaning of the prior f_isfd.
Field and flag name aligned with OpenBSD.

This does not constitute a functional or ABI change, as the field location
and size, and the value placed in that field, are the same as the previous
code, but we're bumping __NetBSD_Version__ so 3rd-party module source code
can adapt, as needed.

NetBSD 9.99.89

Revision 1.167 / (download) - annotate - [select for diffs], Tue Sep 7 10:44:04 2021 UTC (2 years, 6 months ago) by riastradh
Branch: MAIN
Changes since 1.166: +27 -11 lines
Diff to previous 1.166 (colored)

ugen(4): Keep fields null when not allocated; kassert on close.

This avoids silent leaks in DIAGNOSTIC kernels.

Revision 1.166 / (download) - annotate - [select for diffs], Tue Sep 7 10:43:51 2021 UTC (2 years, 6 months ago) by riastradh
Branch: MAIN
Changes since 1.165: +11 -4 lines
Diff to previous 1.165 (colored)

ugen(4): Use cv_wait loop for draining reference count on detach.

- Should be no need to use cv_timedwait because all users have now
  been given a wakeup (previously writers were not, so we relied on
  the timeouts to work out).

- Need to run this in a loop or else a spurious wakeup could cause us
  to free data structures before the users have actually drained.

Revision 1.165 / (download) - annotate - [select for diffs], Tue Sep 7 10:43:34 2021 UTC (2 years, 6 months ago) by riastradh
Branch: MAIN
Changes since 1.164: +3 -3 lines
Diff to previous 1.164 (colored)

ugen(4): Use cv_broadcast to wake all I/O operations on detach.

Nothing prevents two concurrent reads or two concurrent writes on any
particular ugen endpoint, as far as I can tell, and we need to wake
all of them, so use cv_broadcast rather than cv_signal on detach.

XXX It's not clear to me that cv_signal in the xfer completion
callbacks is correct either: any one consumer might use less than the
full buffer.  So I think either we should use cv_broadcast, or
consumers that don't use the whole buffer need to issue cv_signal too
to wake up another consumer even if we want to avoid a thundering
herd.

Revision 1.164 / (download) - annotate - [select for diffs], Tue Sep 7 10:43:21 2021 UTC (2 years, 6 months ago) by riastradh
Branch: MAIN
Changes since 1.163: +7 -5 lines
Diff to previous 1.163 (colored)

ugen(4): Issue explicit wakeup on detach for OUT endpoints too.

Writers can be blocked in cv_timedwait_sig too.

While here, fix comment: aborting the pipes does not cause all
waiters to wake, because the xfer completion callbacks sometimes skip
the notification.  We should maybe change that, but this is a simpler
fix to ensure everyone waiting on I/O is woken to notice sc_dying.

Revision 1.163 / (download) - annotate - [select for diffs], Tue Sep 7 10:43:11 2021 UTC (2 years, 6 months ago) by riastradh
Branch: MAIN
Changes since 1.162: +43 -21 lines
Diff to previous 1.162 (colored)

ugen(4): Ensure we close pipes on detach.

Calling vdevgone has the effect of VOP_REVOKE -> spec_node_revoke ->
VOP_CLOSE -> spec_close -> cdev_close -> ugenclose, but:

(a) the flags passed to VOP_CLOSE don't have FREAD or FWRITE, and
(b) ugenclose has no effect when sc_dying is set anyway.

So create another path into the close logic, ugen_do_close.  We have
to do this in detach _after_ the references have drained because we
may free buffers that other users are still using while the reference
count is nonzero.

Revision 1.162 / (download) - annotate - [select for diffs], Tue Sep 7 10:42:59 2021 UTC (2 years, 6 months ago) by riastradh
Branch: MAIN
Changes since 1.161: +20 -2 lines
Diff to previous 1.161 (colored)

ugen(4): Refuse non-forced detach with EBUSY if endpoints are open.

Sprinkle some comments.

Revision 1.161 / (download) - annotate - [select for diffs], Tue Sep 7 10:42:48 2021 UTC (2 years, 6 months ago) by riastradh
Branch: MAIN
Changes since 1.160: +25 -7 lines
Diff to previous 1.160 (colored)

ugen(4): Prevent ugenopen while ugen_set_config is in progress.

(except on the control endpoint)

Although we hold the kernel lock (which we should eventually change),
we may sleep in usbd_set_config_no at which point ugenopen might
happen and start making use of endpoint state which we'll stomp all
over once usbd_set_config_no returns.  Setting sc_is_open[endpt]
while we wait prevents this.

Revision 1.160 / (download) - annotate - [select for diffs], Tue Sep 7 10:42:34 2021 UTC (2 years, 6 months ago) by riastradh
Branch: MAIN
Changes since 1.159: +8 -5 lines
Diff to previous 1.159 (colored)

ugen(4): Fix race of ugenopen against itself.

Even though we have the kernel lock held, a sleep during kmem_alloc
or usbd_open_pipe could allow another ugenopen to run concurrently
before we have marked the endpoint opened.

To avoid this, mark the endpoint open immediately (while we still
have the kernel lock held and before any sleeps, so there is no
TOCTOU error here), and then revert on unwind in the event of
failure.

Revision 1.159 / (download) - annotate - [select for diffs], Tue Sep 7 10:42:22 2021 UTC (2 years, 6 months ago) by riastradh
Branch: MAIN
Changes since 1.158: +10 -2 lines
Diff to previous 1.158 (colored)

ugen(4): Sprinkle KERNEL_LOCKED_P assertions around sc_is_open.

Revision 1.158 / (download) - annotate - [select for diffs], Fri Dec 18 01:40:20 2020 UTC (3 years, 3 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.157: +7 -7 lines
Diff to previous 1.157 (colored)

Use sel{record,remove}_knote().

Revision 1.157 / (download) - annotate - [select for diffs], Tue Aug 18 14:32:34 2020 UTC (3 years, 7 months ago) by riastradh
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.156: +12 -9 lines
Diff to previous 1.156 (colored)

Fix ugen detach after partial attach.

While here, register null pmf handler even for partially attached
devices so they don't needlessly interfere with suspend.

Reported-by: syzbot+5a091d2e62da20b77259@syzkaller.appspotmail.com

Revision 1.156 / (download) - annotate - [select for diffs], Sun Aug 16 06:17:31 2020 UTC (3 years, 7 months ago) by riastradh
Branch: MAIN
Changes since 1.155: +17 -14 lines
Diff to previous 1.155 (colored)

Fix sloppy mistakes in previous.

1. Give the offset of the rbnode, not some other random members to
   overwrite with garbage.

2. Don't try to unlock a mutex at NULL.

3. Make sure all paths out after ugenif_acquire go via
   ugenif_release.

Revision 1.155 / (download) - annotate - [select for diffs], Sun Aug 16 02:37:19 2020 UTC (3 years, 7 months ago) by riastradh
Branch: MAIN
Changes since 1.154: +213 -82 lines
Diff to previous 1.154 (colored)

Share unit numbering for ugen and ugenif.

This way putting ugenif in kernel config actually works to wire it to
the /dev/ugenN.MM device nodes in userland.

Not a fully fleshed out solution to the ugen problem -- there's no
way for a userland driver to kick out a kernel driver and take over,
but this will let us, e.g., use uhidev(4) for Yubikey OTP/U2F/FIDO2
but ugen(4), with pcscd(8), for Yubikey CCID.

Fix various MP-safety issues while here (still not MPSAFE, but more
progress).

Revision 1.154 / (download) - annotate - [select for diffs], Sun Aug 16 02:34:54 2020 UTC (3 years, 7 months ago) by riastradh
Branch: MAIN
Changes since 1.153: +9 -41 lines
Diff to previous 1.153 (colored)

Convert DIAGNOSTIC prints to KASSERTs.

Revision 1.153 / (download) - annotate - [select for diffs], Sun Aug 16 02:34:20 2020 UTC (3 years, 7 months ago) by riastradh
Branch: MAIN
Changes since 1.152: +53 -37 lines
Diff to previous 1.152 (colored)

Hold the lock over access to the data structures it covers.

Still not MPSAFE, but progress.

Revision 1.152 / (download) - annotate - [select for diffs], Sun Aug 16 02:33:17 2020 UTC (3 years, 7 months ago) by riastradh
Branch: MAIN
Changes since 1.151: +20 -47 lines
Diff to previous 1.151 (colored)

Remove UGEN_ASLP microoptimization.

cv_signal already has this microoptimization.

While here, make the lock cover the relevant things we're issuing
cv_signal about -- progress toward real MP-safety.

Revision 1.151 / (download) - annotate - [select for diffs], Sat Mar 21 06:54:56 2020 UTC (3 years, 11 months ago) by skrll
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh
Changes since 1.150: +3 -3 lines
Diff to previous 1.150 (colored)

KNG

Revision 1.150 / (download) - annotate - [select for diffs], Sat Mar 14 02:35:33 2020 UTC (4 years ago) by christos
Branch: MAIN
Changes since 1.149: +3 -3 lines
Diff to previous 1.149 (colored)

revert the 0x% -> %# change for fixed width formats pointed out by uwe.

Revision 1.149 / (download) - annotate - [select for diffs], Fri Mar 13 18:17:40 2020 UTC (4 years ago) by christos
Branch: MAIN
Changes since 1.148: +3 -3 lines
Diff to previous 1.148 (colored)

PR/55068: sc.dying: Fix printf formats:
- no %s/%p for kernel log
- 0x% -> %#
- always %j for kernel log

Revision 1.148 / (download) - annotate - [select for diffs], Wed Dec 11 11:54:23 2019 UTC (4 years, 3 months ago) by bouyer
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Changes since 1.147: +4 -2 lines
Diff to previous 1.147 (colored)

reading usbdi.c it looks like usbd_get_config_descriptor() can actually
return NULL, so check for this.
I got NULL pointer dereference here with a device showing:
[   303.732632] ugen0: autoconfiguration error: setting configuration index 0 failed

Revision 1.147 / (download) - annotate - [select for diffs], Sun Dec 1 08:27:54 2019 UTC (4 years, 3 months ago) by maxv
Branch: MAIN
Changes since 1.146: +28 -28 lines
Diff to previous 1.146 (colored)

localify

Revision 1.146 / (download) - annotate - [select for diffs], Sun May 5 03:17:54 2019 UTC (4 years, 10 months ago) by mrg
Branch: MAIN
CVS Tags: phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-0-RC1
Branch point for: netbsd-9
Changes since 1.145: +5 -3 lines
Diff to previous 1.145 (colored)

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

Revision 1.145 / (download) - annotate - [select for diffs], Fri Mar 1 11:06:56 2019 UTC (5 years ago) by pgoyette
Branch: MAIN
CVS Tags: isaki-audio2-base, isaki-audio2
Changes since 1.144: +3 -3 lines
Diff to previous 1.144 (colored)

Rename the MODULE_*_HOOK() macros to MODULE_HOOK_*() as briefly
discussed on irc.

NFCI intended.

Ride the earlier kernel bump - it;s getting crowded.

Revision 1.144 / (download) - annotate - [select for diffs], Thu Feb 7 13:20:41 2019 UTC (5 years, 1 month ago) by skrll
Branch: MAIN
Changes since 1.143: +7 -6 lines
Diff to previous 1.143 (colored)

Remove (mostly useless) usb_detach_{broadcast,wait} and replace with
cv_{broadcast,timedwait}

Really should loop on conditon.

Revision 1.143 / (download) - annotate - [select for diffs], Tue Jan 29 09:28:50 2019 UTC (5 years, 1 month ago) by pgoyette
Branch: MAIN
Changes since 1.142: +3 -3 lines
Diff to previous 1.142 (colored)

Normalize all the compat hooks' names to the form

	<subsystem>_<function>_<version>_hook

NFCI

XXX Note that although this introduces a change in the kernel-to-
XXX module interface, we are NOT bumping the kernel version number.
XXX We will bump the version number once the interface stabilizes.

Revision 1.142 / (download) - annotate - [select for diffs], Sun Jan 27 02:08:42 2019 UTC (5 years, 1 month ago) by pgoyette
Branch: MAIN
Changes since 1.141: +13 -8 lines
Diff to previous 1.141 (colored)

Merge the [pgoyette-compat] branch

Revision 1.141 / (download) - annotate - [select for diffs], Thu Nov 8 01:59:53 2018 UTC (5 years, 4 months ago) by manu
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126
Changes since 1.140: +10 -10 lines
Diff to previous 1.140 (colored)

Enfore USB timeout on ugen(4) write operations

Revision 1.140 / (download) - annotate - [select for diffs], Mon Sep 3 16:29:34 2018 UTC (5 years, 6 months ago) by riastradh
Branch: MAIN
CVS Tags: pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906
Changes since 1.139: +22 -22 lines
Diff to previous 1.139 (colored)

Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int.  The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER!  Some subsystems have

	#define min(a, b)	((a) < (b) ? (a) : (b))
	#define max(a, b)	((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX.  Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate.  But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all.  (Who knows, maybe in some cases integer
truncation is actually intended!)

Revision 1.139 / (download) - annotate - [select for diffs], Mon Mar 5 09:35:01 2018 UTC (6 years ago) by ws
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-base, pgoyette-compat-0728, 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, jdolecek-ncqfixes-base, jdolecek-ncqfixes
Branch point for: phil-wifi, pgoyette-compat
Changes since 1.138: +4 -6 lines
Diff to previous 1.138 (colored)

Fix last:

Since config(1) could not distinguish between device and
interface attachments, it was generating only the latter.
Thus devices without their own driver wouldn't match the
ugen driver anymore.

Fix this by using a different device name for interface attachments.

Revision 1.138 / (download) - annotate - [select for diffs], Tue Feb 20 15:48:37 2018 UTC (6 years ago) by ws
Branch: MAIN
Changes since 1.137: +71 -32 lines
Diff to previous 1.137 (colored)

Attach uftdi to each interface found in the device separately.
This allows for other drivers (e.g. ugen) to attach to some of
the other interfaces.

Allow ugen to attach only to some of the interfaces found in a device.

Revision 1.137 / (download) - annotate - [select for diffs], Sun Jan 21 13:57:12 2018 UTC (6 years, 1 month ago) by skrll
Branch: MAIN
Changes since 1.136: +4 -6 lines
Diff to previous 1.136 (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.136 / (download) - annotate - [select for diffs], Wed Oct 25 08:12:39 2017 UTC (6 years, 4 months ago) by maya
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.135: +26 -10 lines
Diff to previous 1.135 (colored)

Use C99 initializer for filterops

Mostly done with spatch with touchups for indentation

@@
expression a;
identifier b,c,d;
identifier p;
@@
const struct filterops p =
- 	{ a, b, c, d
+ 	{
+ 	.f_isfd = a,
+ 	.f_attach = b,
+ 	.f_detach = c,
+ 	.f_event = d,
};

Revision 1.135 / (download) - annotate - [select for diffs], Tue Sep 5 05:03:02 2017 UTC (6 years, 6 months ago) by mrg
Branch: MAIN
Changes since 1.134: +24 -20 lines
Diff to previous 1.134 (colored)

remove redundant checks against sc and sc->sc_dying.
check sc_dying in more places.

Revision 1.134 / (download) - annotate - [select for diffs], Thu Jul 7 06:55:42 2016 UTC (7 years, 8 months ago) by msaitoh
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: netbsd-8
Changes since 1.133: +10 -11 lines
Diff to previous 1.133 (colored)

KNF. Remove extra spaces. No functional change.

Revision 1.133 / (download) - annotate - [select for diffs], Sat Apr 23 10:15:32 2016 UTC (7 years, 10 months ago) by skrll
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529
Changes since 1.132: +289 -309 lines
Diff to previous 1.132 (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.132 / (download) - annotate - [select for diffs], Sun Mar 13 07:01:43 2016 UTC (8 years ago) by skrll
Branch: MAIN
CVS Tags: nick-nhusb-base-20160422, nick-nhusb-base-20160319
Changes since 1.131: +4 -4 lines
Diff to previous 1.131 (colored)

KNF

Revision 1.131 / (download) - annotate - [select for diffs], Mon Feb 22 08:06:47 2016 UTC (8 years ago) by skrll
Branch: MAIN
Changes since 1.130: +3 -2 lines
Diff to previous 1.130 (colored)

Provide a ugen_clear_endpoints declaration

Revision 1.130 / (download) - annotate - [select for diffs], Mon Feb 22 07:46:00 2016 UTC (8 years ago) by skrll
Branch: MAIN
Changes since 1.129: +20 -20 lines
Diff to previous 1.129 (colored)

Only clear the endpoint information in ugen_set_interface only if setting
the new altno suceeds.

Avoids the null de-ref in PR/50597 and PR/50810

Revision 1.129 / (download) - annotate - [select for diffs], Sun Feb 21 09:50:10 2016 UTC (8 years ago) by skrll
Branch: MAIN
Changes since 1.128: +5 -5 lines
Diff to previous 1.128 (colored)

Remove always true conditional

Revision 1.128 / (download) - annotate - [select for diffs], Sat Feb 20 17:07:32 2016 UTC (8 years ago) by skrll
Branch: MAIN
Changes since 1.127: +3 -3 lines
Diff to previous 1.127 (colored)

One more s/0/NULL/

Revision 1.127 / (download) - annotate - [select for diffs], Sat Feb 20 09:38:28 2016 UTC (8 years ago) by skrll
Branch: MAIN
Changes since 1.126: +5 -5 lines
Diff to previous 1.126 (colored)

s/0/NULL/

Revision 1.126 / (download) - annotate - [select for diffs], Sat Sep 20 08:45:23 2014 UTC (9 years, 6 months ago) by gson
Branch: MAIN
CVS Tags: nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.125: +3 -2 lines
Diff to previous 1.125 (colored)

Include opt_usb.h to make "options UGEN_DEBUG" work.

Revision 1.125 / (download) - annotate - [select for diffs], Fri Sep 5 05:31:15 2014 UTC (9 years, 6 months ago) by matt
Branch: MAIN
Changes since 1.124: +10 -8 lines
Diff to previous 1.124 (colored)

Don't nest structure definitions.

Revision 1.124 / (download) - annotate - [select for diffs], Fri Jul 25 08:10:39 2014 UTC (9 years, 7 months ago) by dholland
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-base, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1
Branch point for: netbsd-7-0, netbsd-7
Changes since 1.123: +3 -2 lines
Diff to previous 1.123 (colored)

Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.

Revision 1.123 / (download) - annotate - [select for diffs], Sun Mar 16 05:20:29 2014 UTC (10 years ago) by dholland
Branch: MAIN
CVS Tags: yamt-pagecache-base9, 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.122: +13 -4 lines
Diff to previous 1.122 (colored)

Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.

Revision 1.122 / (download) - annotate - [select for diffs], Sat Jan 5 01:30:16 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.121: +12 -10 lines
Diff to previous 1.121 (colored)

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

Revision 1.121 / (download) - annotate - [select for diffs], Tue Dec 4 05:50:57 2012 UTC (11 years, 3 months ago) by riastradh
Branch: MAIN
CVS Tags: yamt-pagecache-base7
Changes since 1.120: +30 -20 lines
Diff to previous 1.120 (colored)

Fix some error branches in ugen.

There remains some cruft that should perhaps be better organized, but
at least this should reduce some memory leaks in screw cases, and at
least this does fix panics when plugging in and unplugging a USB
device with a botched configuration (a beaglebone with a hosed sd
card).

Revision 1.120 / (download) - annotate - [select for diffs], Sun Jun 10 06:15:53 2012 UTC (11 years, 9 months ago) by mrg
Branch: MAIN
CVS Tags: yamt-pagecache-base6
Branch point for: tls-maxphys
Changes since 1.119: +95 -47 lines
Diff to previous 1.119 (colored)

merge the jmcneill-usbmp branch.  many thanks to jared for the
initial work, and every one else who has tested things for me.
this is largely my fault at this point :-)

the main changes are something like:

        - usbd_bus_methods{} gains a get_lock() to enable the
          host controller to provide a lock for the USB code.
          if the lock isn't provided, old-style protection is
          (partially) applied.

        - ehci/ohci/uhci have been converted to the new
          interfaces, including mutex/cv/etc conversion.

        - usbdivar.h contains a discussion about locking and
          what locks are held for which method calls.  more
          to come for usbdi(9) here.

        - audio drivers (uaudio, umidi, auvitek) have been
          properly SMPified now that USB is ready.

        - scsi drivers have been modified to take the kernel
          lock explicitly before calling into scsi code.

        - usb pipes are associated with a lock, that is the
          same as the controller lock.  (this could be split
          up further in the future.)

        - several usbfoo_locked() or usbfoo_unlocked()
          functions have been added to the usbdi(9) to
          enable functionality with or without the USB
          lock (per controller) already being held.

the TODO.usbmp file has specific details on what is left to
do, including what device-specific changes should be done now
that the whole framework is ready.

Revision 1.119 / (download) - annotate - [select for diffs], Wed Apr 25 07:57:15 2012 UTC (11 years, 10 months ago) by dholland
Branch: MAIN
CVS Tags: yamt-pagecache-base5, jmcneill-usbmp-base9, jmcneill-usbmp-base10
Changes since 1.118: +2 -3 lines
Diff to previous 1.118 (colored)

Remove duplicate break. PR 46368 from Henning Petersen.

Revision 1.118 / (download) - annotate - [select for diffs], Tue Mar 6 03:35:29 2012 UTC (12 years ago) by mrg
Branch: MAIN
CVS Tags: yamt-pagecache-base4, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6
Changes since 1.117: +6 -6 lines
Diff to previous 1.117 (colored)

pull down from usbmp branch:

- rename usb_detach_{wake,waitup}() to usb_detach_{wake,waitup}old()
- use some c99 struct .initialisers

Revision 1.117 / (download) - annotate - [select for diffs], Fri Feb 24 06:48:25 2012 UTC (12 years ago) by mrg
Branch: MAIN
CVS Tags: jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3
Changes since 1.116: +2 -70 lines
Diff to previous 1.116 (colored)

remove any remnants of freebsd/openbsd code.

Revision 1.116 / (download) - annotate - [select for diffs], Fri Dec 23 00:51:46 2011 UTC (12 years, 2 months ago) by jakllsch
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-base2
Changes since 1.115: +11 -11 lines
Diff to previous 1.115 (colored)

Revert previous due to active usbmp branch(es).

Revision 1.115 / (download) - annotate - [select for diffs], Thu Dec 22 20:07:01 2011 UTC (12 years, 2 months ago) by jakllsch
Branch: MAIN
Changes since 1.114: +11 -11 lines
Diff to previous 1.114 (colored)

Adjust-away inconsistent and trailing whitespace.

Revision 1.114 / (download) - annotate - [select for diffs], Thu Dec 1 22:42:41 2011 UTC (12 years, 3 months ago) by jakllsch
Branch: MAIN
CVS Tags: mrg-ohci-jmcneill-usbmp-base, mrg-ohci-jmcneill-usbmp, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base
Branch point for: jmcneill-usbmp
Changes since 1.113: +2 -3 lines
Diff to previous 1.113 (colored)

Don't double clfree() when closing an interrupt endpoint.
From Geoff C. Wing in PR#37934.

Revision 1.113 / (download) - annotate - [select for diffs], Fri Nov 25 02:59:54 2011 UTC (12 years, 3 months ago) by jakllsch
Branch: MAIN
Changes since 1.112: +8 -2 lines
Diff to previous 1.112 (colored)

Prevent poll and kqueue on the control endpoint.
Addresses PR#33352.

(The control endpoint doesn't support pipes, so this would be of dubious
usefulness even if it didn't expose bugs.)

Revision 1.112 / (download) - annotate - [select for diffs], Sun Nov 20 22:27:39 2011 UTC (12 years, 4 months ago) by gavan
Branch: MAIN
Changes since 1.111: +6 -6 lines
Diff to previous 1.111 (colored)

Implement timeouts when blocking the calling process with tsleep.

Fixes PR kern/33452

Revision 1.111 / (download) - annotate - [select for diffs], Wed Nov 3 22:34:23 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, matt-mips64-premerge-20101231, jruoho-x86intr-base, jruoho-x86intr, jmcneill-audiomp3-base, jmcneill-audiomp3, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: yamt-pagecache
Changes since 1.110: +56 -33 lines
Diff to previous 1.110 (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

Revision 1.110 / (download) - annotate - [select for diffs], Tue Jul 27 20:20:46 2010 UTC (13 years, 7 months ago) by jakllsch
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base3, uebayasi-xip-base2
Changes since 1.109: +5 -5 lines
Diff to previous 1.109 (colored)

Tune ugen(4) isochronous parameters to better support high speed pipes.

Fixes PR#43159.

Justification:

UGEN_NISORFRMS, previously 4, is now 8 because that's the number of
microframes per frame on a high speed bus.  This allows data to be
transfered every microframe if necessary.

UGEN_NISOREQS, previously 6, is now 4.  This is harder to justify,
but I didn't think the total number of buffer frames needed to be
much more than it was.

UGEN_NISOFRAMES, previously 500, is now (UGEN_NISORFRMS * UGEN_NISOREQS)
(32 with values as above).  This is all the more we've actually used.

Revision 1.109 / (download) - annotate - [select for diffs], Fri Feb 19 12:40:47 2010 UTC (14 years, 1 month ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base1
Branch point for: rmind-uvmplock
Changes since 1.108: +8 -8 lines
Diff to previous 1.108 (colored)

Replace USB_GET_SC() instances with USB_GET_SC_OPEN().  The latter
is exactly like the former, except it returns with ENXIO if sc is
NULL instead of continuing on to use it.  Most of the time this is
handled by the fd layer and you get EBADF, but sometimes it's
possible to race into the device method for whatever reason and
you get a kernel panic.  I have no idea what the "whatever reason"
might be.

Revision 1.108 / (download) - annotate - [select for diffs], Thu Dec 24 01:32:22 2009 UTC (14 years, 2 months ago) by jakllsch
Branch: MAIN
CVS Tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Changes since 1.107: +2 -3 lines
Diff to previous 1.107 (colored)

defflag UGEN_BULK_RA_WB is no more.
Hi pooka

Revision 1.107 / (download) - annotate - [select for diffs], Wed Dec 23 01:04:45 2009 UTC (14 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.106: +2 -59 lines
Diff to previous 1.106 (colored)

unifdef -D UGEN_BULK_RA_WB

Default behaviour unchanged, the feature must still be explicitly
enabled for a ugen fd.

Revision 1.106 / (download) - annotate - [select for diffs], Sun Dec 6 21:40:31 2009 UTC (14 years, 3 months ago) by dyoung
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.105: +5 -7 lines
Diff to previous 1.105 (colored)

Simplify device-activation hooks.

Revision 1.105 / (download) - annotate - [select for diffs], Thu Sep 24 22:33:04 2009 UTC (14 years, 5 months ago) by pooka
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.104: +12 -3 lines
Diff to previous 1.104 (colored)

Add a simple kvm integer toggle to control ugen priority and override
the autoconf flags value.  This helps to change the priority at
runtime.  (XXX: is there a better way to do this?)

Revision 1.104 / (download) - annotate - [select for diffs], Thu Sep 24 15:36:59 2009 UTC (14 years, 5 months ago) by pooka
Branch: MAIN
Changes since 1.103: +4 -2 lines
Diff to previous 1.103 (colored)

ugen_get_cdesc() can return NULL.  When this happens, return the
karmic EINVAL error instead of crashing.

Revision 1.103 / (download) - annotate - [select for diffs], Wed Sep 23 19:07:19 2009 UTC (14 years, 5 months ago) by plunky
Branch: MAIN
Changes since 1.102: +5 -3 lines
Diff to previous 1.102 (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.102 / (download) - annotate - [select for diffs], Fri Mar 20 20:47:43 2009 UTC (15 years ago) by drochner
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, 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-base, jymxensuspend-base, jym-xensuspend-base
Changes since 1.101: +5 -3 lines
Diff to previous 1.101 (colored)

Putting a device into the unconfigured state by an ioctl seems legitimate,
so check for a non-NULL configuration descriptor before dereferencing.
Should fix a crash reported by Nicolas Joly per PR kern/41048.
(It still doesn't look good that the ioctl which unconfigures the device
returns EIO -- either it is legitimate or it isn't -- but since this
is a pullup candidate I don't dare to change user visible behaviour.)

Revision 1.101 / (download) - annotate - [select for diffs], Tue Jan 20 18:20:48 2009 UTC (15 years, 2 months ago) by drochner
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Branch point for: jym-xensuspend
Changes since 1.100: +3 -3 lines
Diff to previous 1.100 (colored)

Change major()/minor() to return 32-bit types again, called
devmajor_t/devminor_t, as proposed on tech-kern.
This avoids 64-bit arithmetics and 64-bit printf formats in parts
of the kernel where it is not really useful, and helps clarity.

Revision 1.100 / (download) - annotate - [select for diffs], Sun Jan 11 10:56:27 2009 UTC (15 years, 2 months ago) by cegger
Branch: MAIN
CVS Tags: mjf-devfs2-base
Changes since 1.99: +3 -3 lines
Diff to previous 1.99 (colored)

make this compile

Revision 1.99 / (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-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, haad-dm, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.98: +9 -8 lines
Diff to previous 1.98 (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.98 / (download) - annotate - [select for diffs], Mon Apr 28 20:23:59 2008 UTC (15 years, 10 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pf42-base2, yamt-nfs-mp-base2, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Changes since 1.97: +2 -9 lines
Diff to previous 1.97 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.97 / (download) - annotate - [select for diffs], Sat Mar 1 14:16:51 2008 UTC (16 years ago) by rmind
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-nfs-mp-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, ad-socklock-base1
Branch point for: yamt-pf42, yamt-nfs-mp
Changes since 1.96: +22 -7 lines
Diff to previous 1.96 (colored)

Welcome to 4.99.55:

- Add a lot of missing selinit() and seldestroy() calls.

- Merge selwakeup() and selnotify() calls into a single selnotify().

- Add an additional 'events' argument to selnotify() call.  It will
  indicate which event (POLL_IN, POLL_OUT, etc) happen.  If unknown,
  zero may be used.

Note: please pass appropriate value of 'events' where possible.
Proposed on: <tech-kern>

Revision 1.96 / (download) - annotate - [select for diffs], Mon Dec 24 14:41:19 2007 UTC (16 years, 2 months ago) by smb
Branch: MAIN
CVS Tags: vmlocking2-base3, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-base, hpcarm-cleanup-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.95: +3 -2 lines
Diff to previous 1.95 (colored)

Add missing call to pmf_deregister() in the USB_DETACH routine.

Revision 1.95 / (download) - annotate - [select for diffs], Sun Dec 9 20:28:24 2007 UTC (16 years, 3 months ago) by jmcneill
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Changes since 1.94: +5 -2 lines
Diff to previous 1.94 (colored)

Merge jmcneill-pm branch.

Revision 1.94 / (download) - annotate - [select for diffs], Wed Dec 5 17:19:55 2007 UTC (16 years, 3 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-kmem-base, vmlocking2-base2, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base
Branch point for: yamt-kmem
Changes since 1.93: +9 -9 lines
Diff to previous 1.93 (colored)

Do not "return 1" from kqfilter for errors.  That value is passed
directly to the userland caller and results in a mysterious EPERM.
Instead, return EINVAL or something else sensible depending on the
case.

Revision 1.93 / (download) - annotate - [select for diffs], Sat Dec 1 14:45:41 2007 UTC (16 years, 3 months ago) by jmcneill
Branch: MAIN
CVS Tags: vmlocking2-base1, vmlocking-nbase
Branch point for: vmlocking2
Changes since 1.92: +5 -5 lines
Diff to previous 1.92 (colored)

aprintify

Revision 1.92 / (download) - annotate - [select for diffs], Sun Mar 4 06:02:49 2007 UTC (17 years ago) by christos
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, yamt-idlelwp-base8, vmlocking-base, vmlocking, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup, nick-csl-alignment-base5, nick-csl-alignment-base, nick-csl-alignment, mjf-ufs-trans-base, mjf-ufs-trans, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, jmcneill-base, hpcarm-cleanup, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: mjf-devfs, matt-armv6, jmcneill-pm
Changes since 1.91: +7 -7 lines
Diff to previous 1.91 (colored)

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

Revision 1.91 / (download) - annotate - [select for diffs], Mon Feb 26 13:28:56 2007 UTC (17 years ago) by drochner
Branch: MAIN
CVS Tags: itohy-usb1-base, ad-audiomp-base, ad-audiomp
Branch point for: itohy-usb1
Changes since 1.90: +4 -4 lines
Diff to previous 1.90 (colored)

The manpage promises not to touch the device on USB_GET_DEVICEINFO.
Make it so.

Revision 1.90 / (download) - annotate - [select for diffs], Wed Feb 21 15:42:07 2007 UTC (17 years, 1 month ago) by wiz
Branch: MAIN
Changes since 1.89: +4 -4 lines
Diff to previous 1.89 (colored)

Fix debug format strings (found on amd64).

Revision 1.89 / (download) - annotate - [select for diffs], Sun Dec 3 22:34:58 2006 UTC (17 years, 3 months ago) by pavel
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, post-newlock2-merge, newlock2-nbase, newlock2-base
Branch point for: yamt-idlelwp
Changes since 1.88: +10 -2 lines
Diff to previous 1.88 (colored)

Restore compatibility of USB_DEVICEINFO ioctl and reads from /dev/usb with
NetBSD 3.x. Patch from Stephan Thesing provided in
http://mail-index.netbsd.org/current-users/2006/03/21/0002.html, with some
modifications by me.
See also
http://mail-index.netbsd.org/current-users/2006/08/29/0017.html

The code is conditionally compiled depending on COMPAT_30.

Also fix a leak of struct usb_event in usbread() introduced while converting
on-stack variables to dynamic allocation.

Reviewed by martin@.

Revision 1.88 / (download) - annotate - [select for diffs], Thu Nov 16 01:33:26 2006 UTC (17 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-4-base
Branch point for: netbsd-4
Changes since 1.87: +7 -7 lines
Diff to previous 1.87 (colored)

__unused removal on arguments; approved by core.

Revision 1.87 / (download) - annotate - [select for diffs], Thu Oct 12 17:50:07 2006 UTC (17 years, 5 months ago) by xtraeme
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.86: +4 -3 lines
Diff to previous 1.86 (colored)

sigh, another missing __unused.

Revision 1.86 / (download) - annotate - [select for diffs], Thu Oct 12 01:31:59 2006 UTC (17 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.85: +6 -6 lines
Diff to previous 1.85 (colored)

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

Revision 1.85 / (download) - annotate - [select for diffs], Sun Sep 3 07:14:47 2006 UTC (17 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, rpaulo-netinet-merge-pcb-base
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.84: +3 -3 lines
Diff to previous 1.84 (colored)

add missing initializer

Revision 1.84 / (download) - annotate - [select for diffs], Mon Jul 24 14:24:50 2006 UTC (17 years, 7 months ago) by gdt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base7, abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.83: +639 -38 lines
Diff to previous 1.83 (colored)

Add UGEN_BULK_RA_WB, which allows users of ugen(4) to request read
ahead and write behind, improving performance for the Universal
Software Radio Peripheral (USRP) used with GNU Radio.

Enable UGEN_BULK_RA_WB in GENERIC and GENERIC_LAPTOP; behavior is
unchanged unless the new ioctl is called.

This code was written by Joanne Mikkelson under funding from DARPA's
ACERT program.

ok'd by christos@, tested by Berndt Josef Wulf

Revision 1.83 / (download) - annotate - [select for diffs], Fri Jun 9 21:34:19 2006 UTC (17 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base
Changes since 1.82: +13 -15 lines
Diff to previous 1.82 (colored)

stack police: Don't allocate large buffers on the stack for I/O. Put the
buffer in the softc instead.

Revision 1.82 / (download) - annotate - [select for diffs], Fri Apr 14 16:41:53 2006 UTC (17 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5, simonb-timecounters-base, elad-kernelauth-base
Branch point for: chap-midi
Changes since 1.81: +3 -2 lines
Diff to previous 1.81 (colored)

Coverity CID 1354: Add a KASSERT to convince coverity that there is no NULL
pointer dereference.

Revision 1.81 / (download) - annotate - [select for diffs], Fri Apr 14 16:39:33 2006 UTC (17 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.80: +3 -2 lines
Diff to previous 1.80 (colored)

Coverity CID 1355: Add a KASSERT to convince coverity that this is not NULL.

Revision 1.80 / (download) - annotate - [select for diffs], Tue Mar 28 17:38:35 2006 UTC (17 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4, yamt-pdpolicy-base3
Changes since 1.79: +3 -3 lines
Diff to previous 1.79 (colored)

Use device_unit().

Revision 1.79 / (download) - annotate - [select for diffs], Wed Mar 1 12:38:13 2006 UTC (18 years ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base
Branch point for: yamt-pdpolicy, peter-altq, elad-kernelauth
Changes since 1.78: +4 -6 lines
Diff to previous 1.78 (colored)

merge yamt-uio_vmspace branch.

- use vmspace rather than proc or lwp where appropriate.
  the latter is more natural to specify an address space.
  (and less likely to be abused for random purposes.)
- fix a swdmover race.

Revision 1.78 / (download) - annotate - [select for diffs], Sun Dec 11 12:24:01 2005 UTC (18 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5
Branch point for: yamt-uio_vmspace, simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.77: +13 -13 lines
Diff to previous 1.77 (colored)

merge ktrace-lwp.

Revision 1.77 / (download) - annotate - [select for diffs], Mon Nov 28 13:14:48 2005 UTC (18 years, 3 months ago) by augustss
Branch: MAIN
CVS Tags: yamt-readahead-base3, ktrace-lwp-base
Changes since 1.76: +3 -3 lines
Diff to previous 1.76 (colored)

Add a new match level, UMATCH_HIGHEST.

Revision 1.76 / (download) - annotate - [select for diffs], Wed Nov 23 08:54:47 2005 UTC (18 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.75: +5 -7 lines
Diff to previous 1.75 (colored)

Normally a ugen device only attaches if no other driver wants the device.
Add the ability to force ugen to attach with very high priority if "flags 1"
is specified.  This can be used with the vendor and product locators to
force ugen to be used for certain devices.
Similarly, uhid only attaches if no other HID driver (ums or ukbd) wants it.
Again, "flags 1" will force uhid to attach anyway.

Revision 1.75 / (download) - annotate - [select for diffs], Tue Jun 21 14:01:12 2005 UTC (18 years, 9 months ago) by ws
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.74: +6 -6 lines
Diff to previous 1.74 (colored)

PR-30566: Poll must not return <sys/errno.h> values.
Start with those places I can easily test.

Revision 1.74 / (download) - annotate - [select for diffs], Mon May 30 04:21:39 2005 UTC (18 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.73: +20 -20 lines
Diff to previous 1.73 (colored)

- const poisoning
- eliminate variable shadowing

Revision 1.73 / (download) - annotate - [select for diffs], Tue May 17 14:53:06 2005 UTC (18 years, 10 months ago) by augustss
Branch: MAIN
Changes since 1.72: +6 -5 lines
Diff to previous 1.72 (colored)

Allow multiple opens of the control endpoint.  This is unproblematic since
the control endpoint is in some sense always open to the device.

From wulf@ping.net.au.

Revision 1.72 / (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.71: +6 -5 lines
Diff to previous 1.71 (colored)

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

Revision 1.71 / (download) - annotate - [select for diffs], Wed Mar 2 11:37:27 2005 UTC (19 years ago) by mycroft
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, 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
Changes since 1.70: +3 -3 lines
Diff to previous 1.70 (colored)

Copyright maintenance.

Revision 1.70 / (download) - annotate - [select for diffs], Sun Feb 27 00:27:51 2005 UTC (19 years ago) by perry
Branch: MAIN
Changes since 1.69: +3 -3 lines
Diff to previous 1.69 (colored)

nuke trailing whitespace

Revision 1.69 / (download) - annotate - [select for diffs], Fri Dec 3 08:53:40 2004 UTC (19 years, 3 months ago) by augustss
Branch: MAIN
CVS Tags: yamt-km-base2, yamt-km-base, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, kent-audio2
Changes since 1.68: +33 -3 lines
Diff to previous 1.68 (colored)

Allow interrupt output devices.  From FreeBSD.

Revision 1.68 / (download) - annotate - [select for diffs], Wed Jun 23 02:30:52 2004 UTC (19 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.67: +6 -4 lines
Diff to previous 1.67 (colored)

Yes, some devices return incorrect lengths in their string descriptors.  Rather
than losing, do what Windows does: just request the maximum size, and allow a
shorter response.  Obsoletes the need for UQ_NO_STRINGS, and therefore these
"quirks" are removed.

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

use bounded string ops (snprintf, strl*)

Revision 1.66 / (download) - annotate - [select for diffs], Thu Sep 4 03:47:03 2003 UTC (20 years, 6 months ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.65: +4 -4 lines
Diff to previous 1.65 (colored)

Cast a printf() arg so that USB_DEBUG compiles on multiple platforms.

Revision 1.65 / (download) - annotate - [select for diffs], Sun Jun 29 22:30:56 2003 UTC (20 years, 8 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.64: +11 -11 lines
Diff to previous 1.64 (colored)

Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.

Revision 1.64 / (download) - annotate - [select for diffs], Sat Jun 28 14:21:46 2003 UTC (20 years, 8 months ago) by darrenr
Branch: MAIN
Changes since 1.63: +13 -13 lines
Diff to previous 1.63 (colored)

Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V

Revision 1.63 / (download) - annotate - [select for diffs], Tue Nov 26 18:49:48 2002 UTC (21 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Changes since 1.62: +5 -5 lines
Diff to previous 1.62 (colored)

si_ -> sel_

Revision 1.62 / (download) - annotate - [select for diffs], Wed Oct 23 09:13:59 2002 UTC (21 years, 5 months ago) by jdolecek
Branch: MAIN
CVS Tags: kqueue-aftermerge
Changes since 1.61: +127 -5 lines
Diff to previous 1.61 (colored)

merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe

Revision 1.61 / (download) - annotate - [select for diffs], Mon Sep 23 05:51:20 2002 UTC (21 years, 6 months ago) by simonb
Branch: MAIN
CVS Tags: kqueue-beforemerge, kqueue-base
Changes since 1.60: +2 -3 lines
Diff to previous 1.60 (colored)

Remove breaks after returns, unreachable returns and returns after
returns(!).

Revision 1.60 / (download) - annotate - [select for diffs], Fri Sep 6 13:18:43 2002 UTC (21 years, 6 months ago) by gehenna
Branch: MAIN
Changes since 1.59: +19 -3 lines
Diff to previous 1.59 (colored)

Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.

Revision 1.59 / (download) - annotate - [select for diffs], Thu Jul 11 21:14:28 2002 UTC (21 years, 8 months ago) by augustss
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.58: +8 -8 lines
Diff to previous 1.58 (colored)

Get rid of trailing white space.

Revision 1.58 / (download) - annotate - [select for diffs], Wed Feb 20 20:30:12 2002 UTC (22 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: newlock-base, newlock, 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, ifpoll-base, eeh-devprop-base, eeh-devprop
Branch point for: gehenna-devsw
Changes since 1.57: +45 -43 lines
Diff to previous 1.57 (colored)

Prefix structure members to protect them against clashes with eg. c++ keywords.
Suggested by Alfred Perlstein, from FreeBSD, ok'd by augustss

Revision 1.57 / (download) - annotate - [select for diffs], Mon Feb 11 15:11:49 2002 UTC (22 years, 1 month ago) by augustss
Branch: MAIN
Changes since 1.56: +10 -8 lines
Diff to previous 1.56 (colored)

Give usbd_do_request_flags() an extra argument for the timeout.

Revision 1.56 / (download) - annotate - [select for diffs], Wed Jan 2 16:20:14 2002 UTC (22 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.55: +17 -18 lines
Diff to previous 1.55 (colored)

More whitespace fixes from FreeBSD.

Revision 1.55 / (download) - annotate - [select for diffs], Mon Dec 31 12:37:13 2001 UTC (22 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.54: +31 -31 lines
Diff to previous 1.54 (colored)

Whitespace fixes (from FreeBSD).

Revision 1.54 / (download) - annotate - [select for diffs], Mon Dec 31 12:15:21 2001 UTC (22 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.53: +8 -8 lines
Diff to previous 1.53 (colored)

Make a typedef for struct proc to make portingeasier.

Revision 1.53 / (download) - annotate - [select for diffs], Mon Dec 31 11:56:37 2001 UTC (22 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.52: +22 -3 lines
Diff to previous 1.52 (colored)

Don't allow setting the configuration when an endpoint is open. From
FreeBSD.

Revision 1.52 / (download) - annotate - [select for diffs], Mon Dec 31 11:54:06 2001 UTC (22 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.51: +4 -3 lines
Diff to previous 1.51 (colored)

Only clear stall if endpoint is stalled.  From FreeBSD.

Revision 1.51 / (download) - annotate - [select for diffs], Tue Nov 13 07:59:32 2001 UTC (22 years, 4 months ago) by augustss
Branch: MAIN
Changes since 1.50: +9 -17 lines
Diff to previous 1.50 (colored)

More test for NULL pipes.

Revision 1.50 / (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.49: +4 -1 lines
Diff to previous 1.49 (colored)

add RCSIDs

Revision 1.49 / (download) - annotate - [select for diffs], Wed Oct 24 22:31:04 2001 UTC (22 years, 4 months ago) by augustss
Branch: MAIN
CVS Tags: thorpej-mips-cache-base
Changes since 1.48: +5 -1 lines
Diff to previous 1.48 (colored)

Add commented out match level feature.

Revision 1.48 / (download) - annotate - [select for diffs], Sun Sep 16 18:06:32 2001 UTC (22 years, 6 months ago) by yamt
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2
Branch point for: thorpej-mips-cache
Changes since 1.47: +21 -10 lines
Diff to previous 1.47 (colored)

make ugen use updated frlengths.

Revision 1.47 / (download) - annotate - [select for diffs], Sun Sep 16 16:34:39 2001 UTC (22 years, 6 months ago) by wiz
Branch: MAIN
Changes since 1.46: +2 -2 lines
Diff to previous 1.46 (colored)

Spell 'occurred' with two 'r's.

Revision 1.46 / (download) - annotate - [select for diffs], Sat Sep 15 16:16:27 2001 UTC (22 years, 6 months ago) by yamt
Branch: MAIN
CVS Tags: pre-chs-ubcperf, post-chs-ubcperf
Changes since 1.45: +3 -3 lines
Diff to previous 1.45 (colored)

correct debug messages.

Revision 1.45 / (download) - annotate - [select for diffs], Wed Dec 13 04:05:14 2000 UTC (23 years, 3 months ago) by augustss
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base, thorpej-devvp-base
Branch point for: thorpej-devvp, nathanw_sa, kqueue
Changes since 1.44: +2 -2 lines
Diff to previous 1.44 (colored)

Don't try to access a device that is being disconnected when generating
the detach event.  Fixes (I hope) PR 11713 from itohy@netbsd.org (ITOH Yasufumi).

Revision 1.44 / (download) - annotate - [select for diffs], Sun Nov 26 21:05:02 2000 UTC (23 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.43: +2 -4 lines
Diff to previous 1.43 (colored)

Improve a debug message.

Revision 1.43 / (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.42: +2 -2 lines
Diff to previous 1.42 (colored)

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

Revision 1.42 / (download) - annotate - [select for diffs], Fri Sep 8 01:27:12 2000 UTC (23 years, 6 months ago) by augustss
Branch: MAIN
Changes since 1.41: +6 -9 lines
Diff to previous 1.41 (colored)

ANSIfy last patch.

Revision 1.41 / (download) - annotate - [select for diffs], Fri Sep 8 00:55:26 2000 UTC (23 years, 6 months ago) by augustss
Branch: MAIN
Changes since 1.40: +183 -9 lines
Diff to previous 1.40 (colored)

Add isoc support.  From FreeBSD via Berndt Josef Wulf <wulf@ping.net.au>

Revision 1.40 / (download) - annotate - [select for diffs], Thu Jun 1 14:28:59 2000 UTC (23 years, 9 months ago) by augustss
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, netbsd-1-5
Changes since 1.39: +28 -77 lines
Diff to previous 1.39 (colored)

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

Revision 1.39 / (download) - annotate - [select for diffs], Wed May 31 16:16:49 2000 UTC (23 years, 9 months ago) by augustss
Branch: MAIN
Changes since 1.38: +3 -2 lines
Diff to previous 1.38 (colored)

Add a comment.

Revision 1.38 / (download) - annotate - [select for diffs], Thu Apr 27 15:26:47 2000 UTC (23 years, 10 months ago) by augustss
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.37: +2 -2 lines
Diff to previous 1.37 (colored)

Change my email address.

Revision 1.37 / (download) - annotate - [select for diffs], Mon Mar 27 12:33:55 2000 UTC (23 years, 11 months ago) by augustss
Branch: MAIN
Changes since 1.36: +18 -18 lines
Diff to previous 1.36 (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.36 / (download) - annotate - [select for diffs], Mon Mar 6 20:59:17 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.35: +4 -2 lines
Diff to previous 1.35 (colored)

Generate better error codes on bulk write.

Revision 1.35 / (download) - annotate - [select for diffs], Tue Feb 29 21:37:01 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.34: +2 -1 lines
Diff to previous 1.34 (colored)

Distinguish between device and interface classes.
(I finally found a document that said that they were different.)

Revision 1.34 / (download) - annotate - [select for diffs], Tue Feb 8 18:45:27 2000 UTC (24 years, 1 month ago) by augustss
Branch: MAIN
CVS Tags: chs-ubc2-newbase
Changes since 1.33: +2 -2 lines
Diff to previous 1.33 (colored)

Use NULL instead of 0.

Revision 1.33 / (download) - annotate - [select for diffs], Wed Feb 2 13:20:59 2000 UTC (24 years, 1 month ago) by augustss
Branch: MAIN
Changes since 1.32: +7 -1 lines
Diff to previous 1.32 (colored)

Generate usb events on attach and detach.

Revision 1.32 / (download) - annotate - [select for diffs], Wed Jan 19 00:23:58 2000 UTC (24 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.31: +3 -2 lines
Diff to previous 1.31 (colored)

Add an argument to usbd_open_pipe_intr() to specify the polling interval
for an interrupt pipe in case we don't what what the descriptor suggests.

Revision 1.31 / (download) - annotate - [select for diffs], Sat Dec 18 23:22:54 1999 UTC (24 years, 3 months ago) by augustss
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221
Changes since 1.30: +16 -4 lines
Diff to previous 1.30 (colored)

Change the way the initial configuration value is picked.
Idea from Matthias Drochner <M.Drochner@fz-juelich.de>

Revision 1.30 / (download) - annotate - [select for diffs], Thu Nov 18 23:32:27 1999 UTC (24 years, 4 months ago) by augustss
Branch: MAIN
Changes since 1.29: +36 -24 lines
Diff to previous 1.29 (colored)

Cosmetic changes and some small improvements.  From FreeBSD and Nick Hibma.

Revision 1.29 / (download) - annotate - [select for diffs], Wed Nov 17 23:00:50 1999 UTC (24 years, 4 months ago) by augustss
Branch: MAIN
Changes since 1.28: +6 -6 lines
Diff to previous 1.28 (colored)

A few more purely stylistic changes that I missed in the last round.

Revision 1.28 / (download) - annotate - [select for diffs], Fri Nov 12 00:34:57 1999 UTC (24 years, 4 months ago) by augustss
Branch: MAIN
CVS Tags: fvdl-softdep-base
Changes since 1.27: +125 -126 lines
Diff to previous 1.27 (colored)

A number of stylistic changes to increase readability (many suggested
by Nick Hibma):
	use NULL not 0
	declare all local definitions static
	rename s/usbd_request/usbd_xfer/ s/reqh/xfer/
	rename s/r/err/
	use implicit test for no err
	KNF

Revision 1.27 / (download) - annotate - [select for diffs], Thu Oct 28 12:08:38 1999 UTC (24 years, 4 months ago) by augustss
Branch: MAIN
CVS Tags: comdex-fall-1999-base, comdex-fall-1999
Changes since 1.26: +7 -1 lines
Diff to previous 1.26 (colored)

Add a few more tests for safety.

Revision 1.26 / (download) - annotate - [select for diffs], Thu Oct 28 07:28:51 1999 UTC (24 years, 4 months ago) by augustss
Branch: MAIN
Changes since 1.25: +12 -4 lines
Diff to previous 1.25 (colored)

Make sure read() and write() fails on the control pipe.

Revision 1.25 / (download) - annotate - [select for diffs], Wed Oct 13 08:10:55 1999 UTC (24 years, 5 months ago) by augustss
Branch: MAIN
Branch point for: thorpej_scsipi, fvdl-softdep
Changes since 1.24: +16 -17 lines
Diff to previous 1.24 (colored)

Merge in a large batch of changes from Nick Hibma <hibma@skylink.it> so
the USB stack compiles on FreeBSD again.

Revision 1.24 / (download) - annotate - [select for diffs], Tue Oct 12 11:54:56 1999 UTC (24 years, 5 months ago) by augustss
Branch: MAIN
Changes since 1.23: +12 -6 lines
Diff to previous 1.23 (colored)

Add an event mechanism so that a userland process can watch devices come
and go.

Revision 1.23 / (download) - annotate - [select for diffs], Thu Sep 9 12:26:44 1999 UTC (24 years, 6 months ago) by augustss
Branch: MAIN
Branch point for: wrstuden-devbsize
Changes since 1.22: +3 -3 lines
Diff to previous 1.22 (colored)

Change the internal API to allow DMA buffers to be pre-allocated by
the device driver instead of happening automagically in the HC driver.
This affects both the HC-USBD interface as well as the USBD-device
interface.
This change will allow DMA buffers to be reused e.g. in isochronous
traffic.

Add isochronous support to the UHCI driver (not for OHCI yet).

Revision 1.22 / (download) - annotate - [select for diffs], Sun Sep 5 19:32:18 1999 UTC (24 years, 6 months ago) by augustss
Branch: MAIN
Changes since 1.21: +10 -8 lines
Diff to previous 1.21 (colored)

Change the way the `struct device' base part of all driver softc are
declared and accessed to make it more portable.  Idea from Nick Hibma, FreeBSD.
No functional changes.

Revision 1.21 / (download) - annotate - [select for diffs], Sat Sep 4 22:26:11 1999 UTC (24 years, 6 months ago) by augustss
Branch: MAIN
Changes since 1.20: +12 -8 lines
Diff to previous 1.20 (colored)

Change the way the direction is extracted from the endpoint descriptor.
No functional changes to the drivers.  From Nick Hibma, FreeBSD.

Revision 1.20 / (download) - annotate - [select for diffs], Sat Aug 28 21:42:35 1999 UTC (24 years, 6 months ago) by augustss
Branch: MAIN
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored)

Change some 'struct device' to 'bdevice'.  From FreeBSD.

Revision 1.19 / (download) - annotate - [select for diffs], Sat Aug 28 10:01:59 1999 UTC (24 years, 6 months ago) by augustss
Branch: MAIN
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

Change a type name.

Revision 1.18 / (download) - annotate - [select for diffs], Mon Aug 23 22:55:14 1999 UTC (24 years, 7 months ago) by augustss
Branch: MAIN
Changes since 1.17: +12 -1 lines
Diff to previous 1.17 (colored)

Make sure to mark the device as dying already in the (de)activate routine.
This avoids access to it before the detach routine has blown it away.

Revision 1.17 / (download) - annotate - [select for diffs], Sun Aug 22 20:12:39 1999 UTC (24 years, 7 months ago) by augustss
Branch: MAIN
Changes since 1.16: +21 -10 lines
Diff to previous 1.16 (colored)

Move more of the transfer completion processing to HC independent code.
Fix some problems with transfer abort & timeout.

Revision 1.16 / (download) - annotate - [select for diffs], Thu Aug 19 19:57:21 1999 UTC (24 years, 7 months ago) by augustss
Branch: MAIN
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored)

Use the right type for the size argument when calling usbd_bulk_transfer().

Revision 1.15 / (download) - annotate - [select for diffs], Tue Aug 17 16:06:21 1999 UTC (24 years, 7 months ago) by augustss
Branch: MAIN
Changes since 1.14: +6 -6 lines
Diff to previous 1.14 (colored)

Make some small changes to make it compile on OpenBSD.

Revision 1.14 / (download) - annotate - [select for diffs], Sat Aug 14 14:49:31 1999 UTC (24 years, 7 months ago) by augustss
Branch: MAIN
Changes since 1.13: +39 -10 lines
Diff to previous 1.13 (colored)

Some changes from FreeBSD (no functional differences).

Revision 1.13 / (download) - annotate - [select for diffs], Mon Aug 2 19:32:56 1999 UTC (24 years, 7 months ago) by augustss
Branch: MAIN
Changes since 1.12: +58 -44 lines
Diff to previous 1.12 (colored)

Change it so that a pipe can be open RW instead of just R or W.
This makes close() work properly, but it is still not ideal.  Perhaps
there should be different device nodes for input and output on to
and endpoint with the same number?
Pay attention to the SHORT_XFER_OK ioctl().

Revision 1.12 / (download) - annotate - [select for diffs], Wed Jun 30 06:44:23 1999 UTC (24 years, 8 months ago) by augustss
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.11: +150 -64 lines
Diff to previous 1.11 (colored)

Totally redo the way device detach is done.  It now uses a kernel event
thread and the config detach method.
Squish a number of space leaks on detach.

Revision 1.11 / (download) - annotate - [select for diffs], Fri Jan 8 11:58:25 1999 UTC (25 years, 2 months ago) by augustss
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame
Branch point for: chs-ubc2
Changes since 1.10: +30 -19 lines
Diff to previous 1.10 (colored)

Various little fixes from the FreeBSD version.

Revision 1.10 / (download) - annotate - [select for diffs], Thu Jan 7 02:22:20 1999 UTC (25 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.9: +5 -4 lines
Diff to previous 1.9 (colored)

Fix some pastos.

Revision 1.9 / (download) - annotate - [select for diffs], Sun Jan 3 01:03:22 1999 UTC (25 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.8: +57 -22 lines
Diff to previous 1.8 (colored)

Add an ugly workaround for a bug (feature) in the NetBSD open()/close()
protocol.

Revision 1.8 / (download) - annotate - [select for diffs], Fri Jan 1 15:31:24 1999 UTC (25 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.7: +43 -34 lines
Diff to previous 1.7 (colored)

Fix bug in reading from interrupt pipe.
Make read and write on bulk pipes interruptible.

Revision 1.7 / (download) - annotate - [select for diffs], Tue Dec 29 15:33:10 1998 UTC (25 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.6: +12 -7 lines
Diff to previous 1.6 (colored)

Don't set configuration unnecessarily, some (broken) devices seem to break
if you do.

Revision 1.6 / (download) - annotate - [select for diffs], Tue Dec 29 03:13:10 1998 UTC (25 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.5: +3 -2 lines
Diff to previous 1.5 (colored)

Make it possible to specify the request flags when issuing a raw USB request.

Revision 1.5 / (download) - annotate - [select for diffs], Sat Dec 26 12:53:01 1998 UTC (25 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.4: +30 -26 lines
Diff to previous 1.4 (colored)

Merge changes to make the USB stack work with FreeBSD.  The original
diffs from Nick Hibma <n_hibma@freebsd.org>, but with substantial
changes from me.
XXX Not tested on FreeBSD yet.

Revision 1.4 / (download) - annotate - [select for diffs], Sat Dec 12 11:59:28 1998 UTC (25 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.3: +3 -2 lines
Diff to previous 1.3 (colored)

Move initialization of sce around.

Revision 1.3 / (download) - annotate - [select for diffs], Thu Dec 10 23:16:47 1998 UTC (25 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.2: +11 -6 lines
Diff to previous 1.2 (colored)

Take care of some lines > 80 chars.

Revision 1.2 / (download) - annotate - [select for diffs], Wed Dec 9 00:18:10 1998 UTC (25 years, 3 months ago) by augustss
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach
Changes since 1.1: +56 -34 lines
Diff to previous 1.1 (colored)

Improvement to the ugen driver.
Better error checking.
Some code rearrengment.

Revision 1.1 / (download) - annotate - [select for diffs], Tue Dec 8 15:39:00 1998 UTC (25 years, 3 months ago) by augustss
Branch: MAIN

Add a generic USB driver.  It allows easy access to descriptors, the
control pipe via ioctl() and read() and write() access to bulk and
interrupt pipes.

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>