Commit Graph

51224 Commits

Author SHA1 Message Date
Warner Losh
61522a4654 Finish merging usb vendors from NetBSD. 2004-12-31 18:37:49 +00:00
Warner Losh
89dd5535b8 Bump to 2005 for the new year. 2004-12-31 18:06:45 +00:00
Robert Watson
96979ee67d Marginally reformat copyright statements to remove an excess ','. 2004-12-31 17:05:37 +00:00
John Baldwin
8f11becb12 Add usbdevs_data.h to the SRCS list since usb_subr.c needs it. This forces
old usbdevs_data.h files to be updated as well as fixing the standalone
usb module build.
2004-12-31 16:05:07 +00:00
Pawel Jakub Dawidek
46003fb337 Be consistent and always use form 'return (value);' instead of 'return value;'.
We had (before this change) 84 lines where it was style(9)-clean and 15 lines
where it was not.
2004-12-31 14:52:53 +00:00
Robert Watson
502c374fea Add 'struct ipxpcb' forward declaration to ipx_var.h. I had this in
the netperf branch but for some reason didn't trigger a build failure
locally when I merged to CVS and omitted it.  Presumably driver error.

Pointed out by:	cperciva, tinderbox
2004-12-31 11:54:39 +00:00
Julian Elischer
6379133df2 Roger is away, note that his maintainership is
on vacation until he gets back. (hopefully next year)

Submitted by:	linimon
2004-12-31 09:18:29 +00:00
Warner Losh
4e91eaf278 Remove special case from *devs2h loop for usb
Move usb out of the loop since the other devs2h programs don't grok -h
Add new rule for usbdevs_data.h
2004-12-30 23:22:08 +00:00
Warner Losh
2c3bc7b9f4 Call usbdevs2h with -h for .h file
Explicitly generate usbdevs_data.h for usb kernels with new -d switch
2004-12-30 23:19:40 +00:00
Warner Losh
2fe2cbd59b Allow -d and -h as command line flags. These are used to generate
only the .h or _data.h files respectively.  Restructure code to allow
for this.
2004-12-30 23:18:34 +00:00
John Baldwin
50aaa791ba Fix a typo and two whitespace nits. 2004-12-30 22:17:00 +00:00
John Baldwin
f5c157d986 Rework the interface between priority propagation (lending) and the
schedulers a bit to ensure more correct handling of priorities and fewer
priority inversions:
- Add two functions to the sched(9) API to handle priority lending:
  sched_lend_prio() and sched_unlend_prio().  The turnstile code uses these
  functions to ask the scheduler to lend a thread a set priority and to
  tell the scheduler when it thinks it is ok for a thread to stop borrowing
  priority.  The unlend case is slightly complex in that the turnstile code
  tells the scheduler what the minimum priority of the thread needs to be
  to satisfy the requirements of any other threads blocked on locks owned
  by the thread in question.  The scheduler then decides where the thread
  can go back to normal mode (if it's normal priority is high enough to
  satisfy the pending lock requests) or it it should continue to use the
  priority specified to the sched_unlend_prio() call.  This involves adding
  a new per-thread flag TDF_BORROWING that replaces the ULE-only kse flag
  for priority elevation.
- Schedulers now refuse to lower the priority of a thread that is currently
  borrowing another therad's priority.
- If a scheduler changes the priority of a thread that is currently sitting
  on a turnstile, it will call a new function turnstile_adjust() to inform
  the turnstile code of the change.  This function resorts the thread on
  the priority list of the turnstile if needed, and if the thread ends up
  at the head of the list (due to having the highest priority) and its
  priority was raised, then it will propagate that new priority to the
  owner of the lock it is blocked on.

Some additional fixes specific to the 4BSD scheduler include:
- Common code for updating the priority of a thread when the user priority
  of its associated kse group has been consolidated in a new static
  function resetpriority_thread().  One change to this function is that
  it will now only adjust the priority of a thread if it already has a
  time sharing priority, thus preserving any boosts from a tsleep() until
  the thread returns to userland.  Also, resetpriority() no longer calls
  maybe_resched() on each thread in the group. Instead, the code calling
  resetpriority() is responsible for calling resetpriority_thread() on
  any threads that need to be updated.
- schedcpu() now uses resetpriority_thread() instead of just calling
  sched_prio() directly after it updates a kse group's user priority.
- sched_clock() now uses resetpriority_thread() rather than writing
  directly to td_priority.
- sched_nice() now updates all the priorities of the threads after the
  group priority has been adjusted.

Discussed with:	bde
Reviewed by:	ups, jeffr
Tested on:	4bsd, ule
Tested on:	i386, alpha, sparc64
2004-12-30 20:52:44 +00:00
John Baldwin
99b808f461 Whitespace fix. 2004-12-30 20:30:58 +00:00
John Baldwin
63710c4d35 Stop explicitly touching td_base_pri outside of the scheduler and simply
set a thread's priority via sched_prio() when that is the desired action.
The schedulers will start managing td_base_pri internally shortly.
2004-12-30 20:29:58 +00:00
John Baldwin
753d1af165 Use NULL instead of 0 in a few places as well as various whitespace fixes. 2004-12-30 19:26:23 +00:00
John Baldwin
9e6c867ccc Call tty_close() at the very end of ttyclose() since otherwise NULL
deferences can occur since tty_close() may end up freeing the tty structure
if it drops the last reference to it.

Glanced at by:	phk
2004-12-30 19:24:49 +00:00
John Baldwin
1c622ae41e Small whitespace fixes. 2004-12-30 19:14:48 +00:00
John Baldwin
118ef86edc Minor sync to i386 GENERIC in the form of comments and whitespace. 2004-12-30 18:51:23 +00:00
John Baldwin
944039bc08 Minor sync to alpha and i386:
- Add ADAPTIVE_GIANT and AHC_REG_PRETTY_PRINT.
- Indent SMP to match other options.
2004-12-30 18:31:53 +00:00
Robert Watson
08e044cb89 Use a global variable, ipxpcb_lport_cache, to cache the most recently
used IPX port number, rather than using the global ipxpcb list head.
2004-12-30 17:54:53 +00:00
Robert Watson
80a4dabe7d Convert netipx to use queue(9) doubly-linked lists instead of home-brew
linked lists for ipxpcb's.
2004-12-30 17:49:40 +00:00
Robert Watson
ffeb1a497a Garbage collect unused (and incompletely implemented) functions:
- ipx_pcbnotify(), which is never called.
- ipx_rtchange(), which is never called, is incomplete inplemented, and
  also #ifdef notdef.
- spx_fixmtu(), which is never called, is incompletely implemented, and
  also #ifdef notdef.
2004-12-30 17:21:07 +00:00
Robert Watson
05b4b08b61 Constify ipx_zeronet, ipx_zerohost, ipx_broadnet, ipx_broadhost.
Remove 'allones' since the values of the broadcast network and
host variables are set statically.
2004-12-30 16:56:07 +00:00
Robert Watson
7665f445d0 Enable NCP build in NOTES so that it is visible in LINT. 2004-12-30 16:53:20 +00:00
John Baldwin
a0ede505d3 Sync with i386 GENERIC some:
- Update comments to newer style (space after #)
- Bring across various comment updates.
- Add AHC_REG_PRETTY_PRINT, ADAPTIVE_GIANT, and rue(4).
2004-12-30 15:32:31 +00:00
John Baldwin
7174b63b19 - Indent the comments beside the SMP options to the same level as all the
other comments.  Clarify that the next two things needed for SMP are
  two lines.
- Expand mii abbreviation to miibus for clarity in the USB ethernet
  comment.
2004-12-30 15:30:23 +00:00
Robert Watson
b36aab857b Make the sysctls kern.ipc.msgmnb and kern.ipc.msgtql into tunables as
is the case for most other sysctls in the System V IPC message queue
implementation.

PR:		75541
Submitted by:	Sergiy Vyshnevetskiy <serg at vostok dot net>
MFC after:	2 weeks
2004-12-30 13:56:34 +00:00
Robert Watson
d7df32073b mac_portacl.c no longer references vnode_if.h. 2004-12-30 13:49:01 +00:00
Gleb Smirnoff
3cbbee76f8 Remove a check that never returns true, because in this case we have panic
before the check.
2004-12-30 12:22:51 +00:00
Eric Anholt
124cfec04a [1] Remove the generic bridge support from those drivers that had it. The
generic bridge support was biting us more than it helped, whenever a new chipset
came out from a vendor and misprogramming it caused strange hangs or corruption.
[2] Add a large number of PCI IDs based on what the linux drivers support.
Note that the new PCI IDs haven't been tested, they're just *likely* to work.
In particular the VIA AGP 8x chipsets are concerning, due to lack of testing,
possible issues (kern/69953), and not having a nice "does this bridge say it
would do 8x" function.  However, this shouldn't make the situation worse, since
these chips would have probed in the past anyway.
2004-12-30 07:18:58 +00:00
David Xu
cc1000ac5b Make umtx_wait and umtx_wake more like linux futex does, it is
more general than previous. It also lets me implement cancelable point
in thread library. Also in theory, umtx_lock and umtx_unlock can
be implemented by using umtx_wait and umtx_wake, all atomic operations
can be done in userland without kernel's casuptr() function.
2004-12-30 02:56:17 +00:00
David E. O'Brien
1ab9fa6c26 Remove vnode_if.h for rev 1.14. 2004-12-29 21:50:44 +00:00
Julian Elischer
3331831fd8 Don't call ugen_destroy_devnodes(). it is called from ugen_set_config()
which is the very next line.

Submitted by:	stefanf
MFC after: 3 days
2004-12-29 21:36:43 +00:00
Peter Grehan
22f2fe59b9 Correctly initialise the 2nd kernel segment, and don't
forget to actually install it in the segment register.
This may fix some of the weird panics seen when kernel VM
is heavily used.
2004-12-29 09:41:40 +00:00
Warner Losh
a4aef7f9a4 We don't need to generate vnode_if.h anymore 2004-12-29 08:50:35 +00:00
Warner Losh
4c16ce4d87 No need to generate vnode_if.h anymore 2004-12-29 08:44:30 +00:00
Warner Losh
7fcb3efbe0 Move WINBOND 4 port hub to its proper location in the file. It belongs
in a section of its own, not arbitrarily grouped in the hawking section
just because hawking sells it...
2004-12-29 06:21:41 +00:00
Alan Cox
956d03da83 Eliminate (now) unnecessary acquisition and release of the global page
queues lock.
2004-12-29 04:49:10 +00:00
Alan Cox
7aa2190c8e Access to the page's busy field is (now) synchronized by the containing
object's lock.  Therefore, the assertion that the page queues lock is held
can be removed from vm_page_io_start().
2004-12-29 04:18:22 +00:00
David E. O'Brien
51799eec6c Add the Winbond made Hawking UH104 4-port hub.
Add a note where to find the offical USB assigned numbers.
2004-12-29 02:09:19 +00:00
Julian Elischer
2f37e02978 Rewrite ehci_abort_xfer() to use the method hinted at in the EHCI spec.
to remove a transaction from the async schedule. The previous method didn't
work well and led to the hardware writing to free'd buffers etc, as
it didn't always know that the transaction had been aborted.

Written after consultation with David Brownell who wrote the Linux
EHCI driver.

As part of this give the sqh structure a "previous" pointer.

MFC after:	1 week
2004-12-29 01:21:18 +00:00
John Birrell
4f2a7ca189 Pass an explicit pointer to the bus structure in the 'usb' device ivar
rather than a softc pointer (with the bus structure at the start).

This is a non-functional change. It just helps when reading the code to
know that the ehci, ohci and uhci drivers share the bus structure, not the
entire softc.
2004-12-28 22:17:10 +00:00
Pawel Jakub Dawidek
7f456a7d61 Remove debug code. 2004-12-28 21:52:45 +00:00
John Baldwin
83ae089aab - Up the WITNESS_COUNT macro from 200 to 1024 to support the growing number
of lock types in the kernel.  This results in an increase of witness
  data usage from ~145k to ~280k on i386 for kernels with
  'options WITNESS'.
- Remove the unused witness malloc bucket.

Submitted by:	Michal Mertl mime at traveller dot cz (1)
2004-12-28 21:21:27 +00:00
Gleb Smirnoff
92d7d5b445 - Plug a memory leak in ng_netflow_cache_init().
- Initialize error to 0 in ng_netflow_flow_add() (a nop change).
- Update cache statistics holding workqueue mutex.

MFC after:	3 days
2004-12-28 12:11:32 +00:00
Peter Grehan
b8e106eadd Don't probe for a disk unless explicitly enabled by a tunable.
This allows boot to proceed on a real system until the issue
of calling back into certain OpenFirmware calls (e.g. finddevice)
in thread context is understood.

(this commit only affects psim users, of which I think I am the
only one...)
2004-12-28 05:07:49 +00:00
Roman Kurakin
d676cb6fad Add FR support to sppp (MFCronyx).
Silence on: net@, current@, hackers@.
No objections: joerg

Requested by: by many (mostly Cronyx) users for a long long time.
MFC after:	10 days

PR:		kern/21771, kern/66348
2004-12-28 00:07:57 +00:00
Warner Losh
ece5e04f54 nos->now typo reported by njl 2004-12-27 18:58:57 +00:00
Warner Losh
0441898817 Add note about where major numbers are now assigned 2004-12-27 18:21:39 +00:00
Warner Losh
9b01161ec3 Formatting nits 2004-12-27 18:18:38 +00:00