Commit Graph

50033 Commits

Author SHA1 Message Date
alc
b36ed839e4 Assert that the containing object is locked in vm_page_io_start() and
vm_page_io_finish().  The motivation being to transition synchronization of
the vm_page's busy field from the global page queues lock to the per-object
lock.
2004-10-17 22:33:40 +00:00
glebius
7a507d9524 Use cluster if data >= MINCLSIZE.
Reviewed by:	mdodd
Approved by:	julian (mentor)
MFC after:	1 month
2004-10-17 21:44:11 +00:00
alc
46e3ee9584 Remove unnecessary check for curthread == NULL. 2004-10-17 20:29:28 +00:00
alc
b5407c1588 When sf_buf_alloc() replaces a virtual-to-physical mapping, it needn't
invalidate the TLB(s) if the old mapping wasn't used by the CPU.  With
network interfaces that implement checksum off-loading, the old mapping is
almost never used by the CPU, only by the device driver for setting up the
DMA operation.

Reviewed by: tegge@
2004-10-16 22:32:50 +00:00
le
5c9ce88de1 Add support for the Vodafone Mobile Connect 3G datacard. 2004-10-16 21:27:28 +00:00
scottl
e049505e4b If a process needs to be swapped in, wakeup the swapper from within
critical_exit as the process is getting scheduled to run.  This is subotimal
but for now avoid the LOR between the scheduler and the sleepq systems.
This is a 5.3 candidate.

Submitted by: davidxu
MFC After: 3 days
2004-10-16 06:38:22 +00:00
gibbs
3f3b293e16 Skip probe attempts for ISA PnP devices.
Pointed out by: imp
2004-10-15 23:39:52 +00:00
phk
745ab1a9bf Make pty's always come up in echo mode. 2004-10-15 09:03:07 +00:00
nyan
30582f9b3d Merged from sys/dev/sio/sio.c (Use generic tty code). 2004-10-15 08:22:37 +00:00
imp
2756c19f61 document host_start_mem.
# feel free to wordsmith.

Suggested by: ru@
2004-10-15 06:59:07 +00:00
ru
29e5c34577 Polish the last change. 2004-10-15 06:44:13 +00:00
njl
552da4a9e9 Re-add an acpi attachment for the legacy probe that was inadvertently
removed.
2004-10-15 05:13:25 +00:00
njl
1c1fb6558d Remove unused variable. 2004-10-15 04:59:21 +00:00
njl
01775978b7 Remove unused variable. Pointy hat candidate. 2004-10-15 04:54:16 +00:00
sam
96cc112091 add missing ';' that didn't show up with INVARIANTS enabled 2004-10-15 03:54:56 +00:00
yongari
20da9f17e3 Plug possible memory leak in sound DMA buffer handling. It also
changes return code to ENOMEM in case of allocation failure.

Approved by:	jake (mentor), scottl (co-mentor)
Reviewed by:	truckman, matk
2004-10-15 03:50:04 +00:00
kan
00b5d02fd0 Use a taskqueue rather than an swi to handle deferred notifications.
Obtained from:	same change for umct(4) driver.
2004-10-15 03:44:56 +00:00
sam
daa06a78b6 Move session state from on-card memory to host memory so we no longer are
constrained to a small number of sessions by the small on-card memories found
in newer devices.  This is really a stopgap solution as having session state
in main memory incurs a (small but noticeable) performance penalty. The better
solution is to manage session state so that it's cached on chip.

Obtained from:	openbsd
2004-10-15 00:36:07 +00:00
imp
a76b21d1d4 Document hw.{pci,acpi}.host_start_mem
Requested by: ru@
2004-10-15 00:15:07 +00:00
njl
2049409c03 Let nexus print our flags for us. Also, clean up an obfuscated if stmt. 2004-10-14 22:37:51 +00:00
njl
2982f3e0a0 Print flags in the nexus for child devices. 2004-10-14 22:36:47 +00:00
njl
48e4157e91 Remove local hacks to set flags now that the device probe does this for us.
Tested on every device except sio_pci and the pc98 fd.c.  Perhaps something
similar should be done for the "disabled" hints also.

MFC after:	2 weeks
2004-10-14 22:21:59 +00:00
pjd
5515efcf61 Add a missing newline character. 2004-10-14 19:00:44 +00:00
phk
7706490f31 Remove unused ttys field.
Spotted by:	Peter Jeremy <PeterJeremy@optushome.com.au>
2004-10-14 18:37:59 +00:00
phk
f2eeaa890f Add missing chunk of code to enforce the lock-bits of termios.
This solves the problem where serial consoles suddenly required
DCD to be asserted.

Reported by:	Randy Bush <randy@psg.com>
2004-10-14 18:30:24 +00:00
njl
846d39b0ea Update flags patch for the !ISA case.
* Get flags first, in case there is no devclass.
* Reset flags after each probe in case the next driver has no hints so it
  doesn't inherit the old ones.
* Set them again before the winning probe.

Tested ok both with and without ACPI for ISA device flags.

Reviewed by:	imp
MFC after:	1 day
2004-10-14 17:14:56 +00:00
phk
f3d4cd1ba7 Add missing flag to userland_sysctl() 2004-10-14 10:43:47 +00:00
phk
735fb5416e Fix echo in console mode. 2004-10-14 08:58:28 +00:00
pjd
ae8741cdf4 Ehh. Introduce a hack: Wait for 3 seconds, so GEOM is able to give us
providers for tasting. Before this hack, race below is possible:
	SI_SUB_RAID (no not-fully-configured geoms, so don't block)
	GEOM tasting (now geoms are created)
	SI_SUB_MOUNT_ROOT (if root file system is placed on a mirror, it is
		possible that this mirror is not fully configured yet)
There is a lot of work to do to avoid such hacks and I need a working
solution before 5.3, sorry.

Reported by:	John Hay <jhay@icomtek.csir.co.za>
2004-10-14 07:55:29 +00:00
pjd
c06dbb0415 Only allow for unloading when there are no geoms in LABEL GEOM class.
We have to use our own destroy_geom method, because default one, which
is a part of geom_slice is broken.
MT5 candidate.

PR:		kern/72467
Submitted by:	Vladimir Novoseltsev
2004-10-14 07:46:13 +00:00
jmg
5e499ab698 /me gets the wrong patch out of the pr :(
/me had the write patch w/o comments on his test system.

Pointed out by:	kuriyama and ache
Pointy hat to:	jmg
2004-10-14 03:26:50 +00:00
green
b72634a4d8 Fix a spelling error in a panic string. 2004-10-14 03:05:39 +00:00
simokawa
4255df54a6 Fix warnings on non-i386 arch.
Submitted by: keramida
2004-10-14 00:21:32 +00:00
ups
02ee911318 Fix maybe_preempt_in_ksegrp for !SMP.
Tested   by: tegge
Reviewed by: julian
Approved by: sam (mentor)
MFC after: 3 days
2004-10-13 22:07:04 +00:00
jmg
c2f8b4377e fix a bug where signal events didn't set the flags for attach/detach..
PR:		72234
MFC after:	2 days
2004-10-13 20:55:19 +00:00
sos
b9ce738620 Refine locking so it covers the "running" variable as well.
Adjust comments etc to fit the new locking system.
2004-10-13 15:16:35 +00:00
le
4f70db40fc Add device IDs for Intel ICH6.
PR:             kern/72492
Submitted by:   Florian Le Goff <madflo@beertech.org>
2004-10-13 14:51:42 +00:00
bms
2d923cd7cb Remove references to the second byte of a CCB containing the LUN, as this
is valid only for SCSI-2 and older devices.
Rename the second byte of the VERIFY CCB from 'lun' to 'byte2'.

Submitted by:	ken
MFC after:	2 weeks
2004-10-13 09:31:04 +00:00
phk
47c2584ada Use generic tty code instead of local copy. 2004-10-13 09:27:18 +00:00
phk
55f592519e Use generic tty code instead of local stuff.
NB:  device names are now consistent:  {cua,tty}d$(port)[.lock,.init]
2004-10-13 08:27:20 +00:00
njl
0749ec30a6 Print before the footer, not after. 2004-10-13 07:29:29 +00:00
njl
bb55da4e20 If flags are present, print them like ISA does.
MFC after:	1 day
2004-10-13 07:27:21 +00:00
njl
a39c5fd2f1 Set flags for devices before probing them. In the non-ISA case, flags set
via hints were not getting passed to the child.

PR:		kern/72489
MFC after:	1 day
2004-10-13 07:10:41 +00:00
phk
e35c2bf38e First half of tty code rework: unifdef -D__FreeBSD_Version=600000
The changes in the next commit would make the code totally unreadable
if the #ifdef'ing were maintained.

It might make a lot of sense to split if_cx.c in a netgraph related
and in a tty related file but I will not attempt that without hardware.
2004-10-13 07:02:56 +00:00
yongari
f8db072728 Limit DMA address space to 1GB since the trident audio cards can't
handle DMA addresses located above 1GB. The LBA(loop begin address)
register which holds DMA base address is 32bits register. But the
MSB 2bits are used for other purposes. This effectivly limits the
DMA address space up to 1GB.

Approved by:	jake (mentor)
Reviewed by:	truckman, matk
2004-10-13 06:04:01 +00:00
yongari
5cef8d8d29 Audio drivers failed to detect failure condition and attempted to
assign DMA address to the wrong address. It can cause system lockup
or other mysterious errors. Since most sound cards requires low DMA
address(BUS_SPACE_MAXADDR_24BIT) sndbuf_alloc() would fail when the
audio driver is loaded after long running of operations.

Approved by:	jake (mentor)
Reviewed by:	truckman, matk
2004-10-13 05:45:16 +00:00
simokawa
4da86ae4d2 Add dcons_os.{c,h}. 2004-10-13 05:41:09 +00:00
simokawa
bc246db21d - Split dcons core code and OS dependent code.
- Implement dcons_ischar() and dcons_load_buffer().
- If loader passed a dcons buffer address, keep using it.
	(We still need a patch to cheat memory management system.)
2004-10-13 05:38:42 +00:00
green
d57c0d7415 Permit fcntl(F_SETFL) to work on a ugen(4) device by not returning failure
for FIOASYNC.
2004-10-13 04:13:05 +00:00
green
051e32299e Back out rev.1.91 which implemented bulk read transfers in ugen(4) as
asynchronous.  I realize that this means the custom application will
not work as written, but it is not okay to break most users of ugen(4).

The major problem is that a bulk read transfer is not an interrupt
saying that X bytes are available -- it is a request to be able to
receive up to X bytes, with T timeout, and S short-transfer-okayness.

The timeout is a software mechanism that ugen(4) provides and cannot
be implemented using asynchronous reads -- the timeout must start at
the time a read is done.

The status of up to how many bytes can be received in this transfer
and whether a short transfer returns data or error is also encoded
at least in ohci(4)'s requests to the controller.  Trying to detect
the "maximum width" results in using a single buffer of far too
small when an application requests a large read.

Even if you combat this by replacing all buffers again with the
maximal sized read buffer (1kb) that ugen(4) would allow you to
use before, you don't get the right semantics -- you have to
throw data away or make all the timeouts invalid or make the
short-transfer settings invalid.

There is no way to do this right without extending the ugen(4) API
much further -- it breaks the USB camera interfaces used because
they need a chain of many maximal-width transfers, for example, and
it makes cross-platform support for all the BSDs gratuitously hard.

Instead of trying to do select(2) on a bulk read pipe -- which has
neither the information on desired transfer length nor ability to
implement timeout -- an application can simply use a kernel thread
and pipe to turn that endpoint into something poll-able.

It is unfortunate that bulk endpoints cannot provide the same semantics
that interrupt and isochronous endpoints can, but it is possible to just
use ioctl(USB_GET_ENDPOINT_DESC) to find out when different semantics
must be used without preventing the normal users of the ugen(4) device
from working.
2004-10-13 04:12:20 +00:00