Commit Graph

45274 Commits

Author SHA1 Message Date
Peter Grehan
80bd99be33 Bring to working PIO state.
- use correct rid when allocating PCI mem resource
 - ATA taskfile registers are indeed spaced 0x10 apart just like
 the Macio ATA cell. Adjust offsets in ATA channel struct.

Tested by:  Suleiman Souhlal <ssouhlal@vt.edu>
2004-02-29 06:01:16 +00:00
Marcel Moolenaar
b55a929477 uteval.c gained a warning (cast discards qualifiers from pointer target
type) after vendor import of ACPICA 20040220. Add nowerror.
2004-02-28 23:04:45 +00:00
Nate Lawson
2881b39793 Call _INI on Thermal Zones as well as devices. 2004-02-28 22:43:18 +00:00
Poul-Henning Kamp
961af6677b Add support for the watchdog in Geode SC1100 which is used in embedded
systems like the Soekris NET4801
2004-02-28 22:33:28 +00:00
Poul-Henning Kamp
3d6e5ccb06 Make sure to disable the watchdog if we cannot honour the timeout. 2004-02-28 22:01:19 +00:00
Poul-Henning Kamp
4103b7652d Rename the WATCHDOG option to SW_WATCHDOG and make it use the
generic watchdoc(9) interface.

Make watchdogd(8) perform as watchdog(8) as well, and make it
possible to specify a check command to run, timeout and sleep
periods.

Update watchdog(4) to talk about the generic interface and add
new watchdog(8) page.
2004-02-28 20:56:35 +00:00
Nate Lawson
2676fbe88c Strip out new, unused file acnetbsd.h 2004-02-28 20:56:25 +00:00
Nate Lawson
fd73230997 This commit was generated by cvs2svn to compensate for changes in r126380,
which included commits to RCS files with non-trunk default branches.
2004-02-28 20:42:10 +00:00
Nate Lawson
0161891aa1 Fix an off-by-one in the compiler path. Originally from iwasaki-san's
patches for the pmtools port.  This change has been submitted to Intel.
2004-02-28 20:42:10 +00:00
Nate Lawson
4c80f45557 Local change: emulate a ReturnOp if the AML expects one but it isn't
present.  Some buggy BIOSs do not have a ReturnOp even though it is
required for a function to return a value.
2004-02-28 20:40:24 +00:00
Nate Lawson
e222f620d1 Local change: In the resume path, give up after waiting for a while
for WAK_STS to be set.  Some BIOSs never set it.
2004-02-28 20:39:50 +00:00
Nate Lawson
56491b7ba0 Local change: Allow access to the field if it is within the region
size rounded up to a multiple of the access byte width.  This overcomes
"off-by-one" programming errors in the AML often found in Toshiba
laptops.
2004-02-28 20:39:09 +00:00
Nate Lawson
7420bf68bb Local change: Put various debugging options under ACPI_DISASSEMBLER. 2004-02-28 20:38:40 +00:00
Nate Lawson
96f2784ee5 Unchanged files from ACPICA 20040220 that are off the vendor branch. 2004-02-28 20:35:57 +00:00
Nate Lawson
2a2a3f2735 Vendor import of ACPICA 20040220 2004-02-28 20:23:30 +00:00
Nate Lawson
6a5f0d2f49 This commit was generated by cvs2svn to compensate for changes in r126372,
which included commits to RCS files with non-trunk default branches.
2004-02-28 20:23:30 +00:00
Poul-Henning Kamp
3e2c971172 Add a generic watchdog facility which through a single device entry
in /dev controls all available watchdog implementations.
2004-02-28 20:06:59 +00:00
Nate Lawson
e8577ac876 Clean all the object files whether or not ACPI_DEBUG is specified. 2004-02-28 19:51:44 +00:00
Robert Watson
768bbd68cc Remove unneeded {} originally used to hold local variables for dummynet
in a code block, as the variable is now gone.

Submitted by:	sam
2004-02-28 19:50:43 +00:00
Don Lewis
a3193a9ca3 Create a new mutex type for virtual channels. This allows us to get
rid of the MTX_DUPOK flag on channel mutexes, which allows witness to
do a better job of lock order checking.  Nuke snd_chnmtxcreate() since
it is no longer needed.

Tested by:	matk
2004-02-28 19:47:02 +00:00
Don Lewis
466f31e55b Lock channels only as necessary in dsp_ioctl(), and only lock one
channel at a time unless it is actually necessary to lock both.
This avoids problems with lock order reversal and malloc() calls
with a mutex held when lower level code unlocks a channel, calls malloc(),
and relocks the channel.  This also avoids the cost of some  unnecessary
locking and unlocking.

Tested by:	matk
2004-02-28 19:42:48 +00:00
Scott Long
b234a120c8 Switch from using mutexes to using semaphores to protect against early
completion of synchronous commands.  Also switch to a per-array bioq as it
appears to improve performance.

Submitted by:	mbr, imp.ch (bioq change)
2004-02-28 19:14:41 +00:00
Søren Schmidt
dc7485d940 Issue a request sense command automagically when ATAPI commands fail
with a valid sense key.
2004-02-28 17:47:27 +00:00
Ken Smith
653700758e Previous commit mistakenly delayed cnadd() as well as make_dev().
Testing on cluster ref machine with just delaying make_dev() seems
to work, and results in printf() output appearing sooner in boot
cycle instead of going to /dev/null.

Caught by:	bde
Pointy hat:	kensmith
Approved by:	rwatson (mentor)
2004-02-28 16:36:14 +00:00
Robert Watson
a7b6a14aee Remove now unneeded arguments to tcp_twrespond() -- so and msrc. These
were needed by the MAC Framework until inpcbs gained labels.

Submitted by:	sam
2004-02-28 15:12:20 +00:00
Poul-Henning Kamp
1b4a8b8cfc Add support for /dev/led/error on Soekris Net4801. 2004-02-28 13:15:53 +00:00
Colin Percival
59e758846f Compare the *number* of patterns to zero, not the *pointer* to the
patterns.  (These lines are correct the other two times they appear.)

Reported by:	"Ted Unangst" <tedu@coverity.com>
Approved by:	rwatson (mentor), ken (scsi)
2004-02-28 12:59:56 +00:00
MIHIRA Sanpei Yoshiro
7f869e12d8 Sync to 1.163 of usbdevs 2004-02-28 00:15:08 +00:00
MIHIRA Sanpei Yoshiro
cdd40f3bd6 add support DM9601(DAVICOM USB to Ethernet MAC Controller with Integrated 10/100 PHY)
- Corega FEther USB-TXC

PR:		kern/62932
Submitted by:	HASHI Hiroaki <hashiz@tomba.cskk-sv.co.jp>
Obtained from:	NetBSD
2004-02-28 00:12:47 +00:00
Alexander Kabaev
c8daea132f Move the code dealing with vnode out of several functions into a single
helper function vm_mmap_vnode.

Discussed with:	jeffr,alc (a while ago)
2004-02-27 22:02:15 +00:00
Jim Rees
73c02c410e NFSv4 fixes from Connectathon 2004:
remove unused pid field of file context struct
map nfs4 error codes to errnos
eliminate redundant code from nfs4_request
use zero stateid on setattr that doesn't set file size
use same clientid on all mounts until reboot
invalidate dirty bufs in nfs4_close, to play it safe
open file for writing if truncating and it's not already open

Approved by:	alfred
2004-02-27 19:37:43 +00:00
Ken Smith
44bacdd9bc Fix -current builds on alpha. Recent changes in device handling caused
subtle problems with how alpha was handling the promcons device.  This
moves the call to make_dev() for the promcons device to a later point of
the boot-up sequence than where promcons initially gets attached, make_dev()
called during the first attach crashes due to kernel stack issues.

Reviewed by:	gallatin, marcel, phk
Discussed on:	-current@, -alpha@
Approved by:	rwatson (mentor)
2004-02-27 19:30:46 +00:00
John Baldwin
44f3b09204 Switch the sleep/wakeup and condition variable implementations to use the
sleep queue interface:
- Sleep queues attempt to merge some of the benefits of both sleep queues
  and condition variables.  Having sleep qeueus in a hash table avoids
  having to allocate a queue head for each wait channel.  Thus, struct cv
  has shrunk down to just a single char * pointer now.  However, the
  hash table does not hold threads directly, but queue heads.  This means
  that once you have located a queue in the hash bucket, you no longer have
  to walk the rest of the hash chain looking for threads.  Instead, you have
  a list of all the threads sleeping on that wait channel.
- Outside of the sleepq code and the sleep/cv code the kernel no longer
  differentiates between cv's and sleep/wakeup.  For example, calls to
  abortsleep() and cv_abort() are replaced with a call to sleepq_abort().
  Thus, the TDF_CVWAITQ flag is removed.  Also, calls to unsleep() and
  cv_waitq_remove() have been replaced with calls to sleepq_remove().
- The sched_sleep() function no longer accepts a priority argument as
  sleep's no longer inherently bump the priority.  Instead, this is soley
  a propery of msleep() which explicitly calls sched_prio() before
  blocking.
- The TDF_ONSLEEPQ flag has been dropped as it was never used.  The
  associated TDF_SET_ONSLEEPQ and TDF_CLR_ON_SLEEPQ macros have also been
  dropped and replaced with a single explicit clearing of td_wchan.
  TD_SET_ONSLEEPQ() would really have only made sense if it had taken
  the wait channel and message as arguments anyway.  Now that that only
  happens in one place, a macro would be overkill.
2004-02-27 18:52:44 +00:00
John Baldwin
e5bb601d87 Drop sched_lock around the wakeup of the parent process after setting
the process state to zombie when a process exits to avoid a lock order
reversal with the sleepqueue locks.  This appears to be the only place
that we call wakeup() with sched_lock held.
2004-02-27 18:39:09 +00:00
John Baldwin
dd75b0a90d Add an implementation of a generic sleep queue abstraction that is used
to queue threads sleeping on a wait channel similar to how turnstiles are
used to queue threads waiting for a lock.  This subsystem will be used as
the backend for sleep/wakeup and condition variables initially.  Eventually
it will also be used to replace the ithread-specific iwait thread
inhibitor.

Sleep queues are also not locked by sched_lock, so this splits sched_lock
up a bit further increasing concurrency within the scheduler.  Sleep queues
also natively support timeouts on sleeps and interruptible sleeps allowing
for the reduction of a lot of duplicated code between the sleep/wakeup and
condition variable implementations.  For more details on the sleep queue
implementation, check the comments in sys/sleepqueue.h and
kern/subr_sleepqueue.c.
2004-02-27 18:33:09 +00:00
Dag-Erling Smørgrav
21885af505 Add sysctl_move_oid() which reparents an existing OID. 2004-02-27 17:13:23 +00:00
John Baldwin
b7db4d0723 Fix a few style nits. do { } while(0) are only used for compound
statements and nowhere else in the kernel seems to use them for single
statements.  Also, all other users of do { } while(0) use multiple lines
rather than cramming it all onto one line.
2004-02-27 16:25:05 +00:00
John Baldwin
5b7de7e19e Clarify and tweak some comments. 2004-02-27 16:14:27 +00:00
John Baldwin
03129ba97f Fix _sx_assert() to panic() rather than printf() when an assertion fails
and ignore assertions if we have already paniced.
2004-02-27 16:13:44 +00:00
Pawel Jakub Dawidek
0e2ff2832c Even if we're sure that we can't be orphaned here, we have to define
orphan field - we're enforcing it in GEOM. This will reach KASSERT
in INVARIANTS case.

Add missing space.

Approved by:	scottl (mentor)
2004-02-27 15:34:21 +00:00
Pawel Jakub Dawidek
0787ce83b2 Remove unused field.
Approved by:	scottl (mentor)
2004-02-27 15:32:49 +00:00
Ruslan Ermilov
eec24f3275 For some reason crt0.o needs to be linked first for pxeboot(8) to
work.  This is odd because loader(8) doesn't suffer from this problem.
Perhaps pxeboot bootstrap can be fixed to handle this better.
Anyway, PXE booting should work again.
2004-02-27 14:10:09 +00:00
Robert Watson
f97e834b02 Forward declare struct proc, struct sockaddr, and struct thread, which
are employed in entry points later in the same include file.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Air Force Research Laboratory, McAfee Research
2004-02-26 20:44:50 +00:00
John Baldwin
f4114c3d7f Replace the ktrace queue's semaphore with a condition variable instead as
it is slightly more efficient since we already have a mutex to protect the
queue.  Ktrace originally used a semaphore more as a proof of concept.
2004-02-26 19:30:22 +00:00
Dag-Erling Smørgrav
7636405322 Bump CTL_MAXNAME from 12 to 24. 2004-02-26 16:18:22 +00:00
Robert Watson
f47cb88655 Forward declare struct bpf_d, struct ifnet, struct image_params, and
struct vattr in mac_policy.h.  This permits policies not
implementing entry points using these types to compile without
including include files with these types.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Air Force Research Laboratory
2004-02-26 16:15:14 +00:00
Yoshihiro Takahashi
6cab36d49d Merged from sys/isa/fd.c revision 1.266. 2004-02-26 14:59:10 +00:00
Max Laier
25a4adcec4 Bring eventhandler callbacks for pf.
This enables pf to track dynamic address changes on interfaces (dailup) with
the "on (<ifname>)"-syntax. This also brings hooks in anticipation of
tracking cloned interfaces, which will be in future versions of pf.

Approved by: bms(mentor)
2004-02-26 04:27:55 +00:00
Max Laier
cc5934f5af Tweak existing header and other build infrastructure to be able to build
pf/pflog/pfsync as modules. Do not list them in NOTES or modules/Makefile
(i.e. do not connect it to any (automatic) builds - yet).

Approved by: bms(mentor)
2004-02-26 03:53:54 +00:00
Robert Watson
c66b4d8d26 Move inet and inet6 related MAC Framework entry points from mac_net.c
to a new mac_inet.c.  This code is now conditionally compiled based
on inet support being compiled into the kernel.

Move socket related MAC Framework entry points from mac_net.c to a new
mac_socket.c.

To do this, some additional _enforce MIB variables are now non-static.
In addition, mbuf_to_label() is now mac_mbuf_to_label() and non-static.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, McAfee Research
2004-02-26 03:51:04 +00:00