Commit Graph

50433 Commits

Author SHA1 Message Date
pjd
64bf081bc3 Before trying to update metadata (so open consumer for writing), be sure
that the events queue is empty. In other case we're able to hit the race
where for example da0s1 is tasted by some other class, which means that
da0 is open with exclusive bit set, which means that we can't open da0
for writing if it is our component.

Reported by:	Attila Nagy <bra@fsn.hu> (and somebody else sometime ago,
		                          but I cannot find who it was)
2004-11-09 23:27:21 +00:00
pjd
412bff1f39 Introduce g_waitidlelock() function which is simlar to g_waitidle(),
but should be called with the topology lock held and returns with the
topology lock held and empty event queue.

Approved by:	phk (sometime ago)
2004-11-09 23:20:50 +00:00
trhodes
37a1084115 Remove stale comment after previous commit.
Noticed by:	pjd
2004-11-09 23:19:21 +00:00
pjd
a2d5ae235d Don't rely on DIRTY flag to be sure that consumer if open, because
DIRTY flag can be removed in idle process. Use consumer's acw field
instead to avoid opening consumer twice.
2004-11-09 23:15:40 +00:00
phk
8fe1c85657 Stop pretending to have a vm_object backing the underlying disk vnode:
it isn't used for anything anywhere and the vnode_pager would explode
if we attempted to.
2004-11-09 23:12:45 +00:00
pjd
5cac522046 For BIO_READ check if provider is open for reading and for BIO_WRITE,
check if provider is open for writing.
This fixes panic when device is open only for writing and we send write
request.
2004-11-09 23:04:45 +00:00
phk
6f9f259ced Make getdiskbyname() static to vfs_mount.c.
Eliminate use of vn_todev() while here.
2004-11-09 23:03:34 +00:00
phk
7bef55364a Remove vnode->v_cachedfs.
It was only used for the highly dangerous "export all vnodes with a sysctl"
function.
2004-11-09 22:51:03 +00:00
wilko
d6ff934045 Get in sync with reality: TurboLaser was never really well supported to
start with, so let it die in peace.  While there, remove Multia-class
as 486-like performance will not buy us much when 6.x arrives.
2004-11-09 22:24:47 +00:00
phk
5eae02ee76 Detect root mount attempts on the flag, not on the NULL path. 2004-11-09 22:21:52 +00:00
phk
37ad4f1923 Refuse attempts to mount root filesystem 2004-11-09 22:21:10 +00:00
phk
921930c585 Refuse attemps to mount root filesystem 2004-11-09 22:14:57 +00:00
mlaier
b188666781 Remove the #if 0 wrapping around !ALTQ stuff that can't be used due to ABI
stability anyway.
2004-11-09 21:29:28 +00:00
iedowse
3e514b9f37 Attempt to fix a number of race conditions in the handling of
transfer timeouts that typically cause a transfer to be completed
twice, resulting in panics and page faults:

 o A transfer completion interrupt could arrive while an abort_task
   event was set up, so the transfer would be aborted after it had
   completed. This is very easy to reproduce. Fix this by setting
   the transfer status to USBD_TIMEOUT before scheduling the
   abort_task so that the transfer completion code will ignore it.

 o The transfer completion code could execute concurrently with the
   timeout callout, leaving the callout blocked (e.g. waiting for
   Giant) while the transfer completion code runs. In this case,
   callout_stop() does not prevent the callout from running, so
   again the timeout code would run after the transfer was complete.
   Handle this case by checking the return value from callout_stop(),
   and ignoring the transfer if the callout could not be removed.

 o Finally, protect against a timeout callout occurring while a
   transfer is being aborted by another process. Here we arrange
   for the timeout processing to ignore the transfer, and use
   callout_drain() to ensure that the callout has really gone before
   completing the transfer.

This was tested by repeatedly performing USB transfers with a timeout
set to approximately the same as the normal transfer completion
time. In the PR below, apparently this occurred by accident with a
particular printer and the default timeout.

PR:		kern/71491
2004-11-09 20:51:32 +00:00
iedowse
50d51dddeb When a port cannot be set up, report the error code in the `disabling
port X' message.
2004-11-09 19:46:57 +00:00
glebius
9e1a271f2f Since sb_timeo type was increased to int, use INT_MAX instead of SHRT_MAX.
This also gives us ability to close PR.

PR:		kern/42352
Approved by:	julian (mentor)
MFC after:	1 week
2004-11-09 18:35:26 +00:00
cognet
7e3e230230 Use the RET macro. 2004-11-09 16:47:47 +00:00
cognet
601293a498 Import a RET macro, that will use bx if the arch supports it.
Obtained from:	NetBSD
2004-11-09 16:45:55 +00:00
scottl
55a71798c5 Zero the tag when it's allocated. Also fix a printf format problem. This
should fix the problems introduced several hours ago.
2004-11-09 16:03:27 +00:00
nyan
749586a21a Fixed fd related tools on pc98.
Submitted by:	Watanabe Kazuhiro <CQG00620@nifty.ne.jp>
2004-11-09 14:10:18 +00:00
nyan
268ec4a834 Add FL_MFM flag to the fd_native_types structure.
Submitted by:	Watanabe Kazuhiro <CQG00620@nifty.ne.jp>
2004-11-09 14:08:21 +00:00
phk
d87333225e Improve readability with a bunch of typedefs for the pager ops.
These can also be used for prototypes in the pagers.
2004-11-09 13:43:20 +00:00
rwatson
bd4e6ffd55 Bump MAC Framework version to 2 in preparation for the upcoming API/ABI
changes associated with adding System V IPC support.  This will prevent
old modules from being used with the new kernel, and new modules from
being used with the old kernel.
2004-11-09 11:28:40 +00:00
andre
173ef4db97 Fix a double-free in the 'hlen > m->m_len' sanity check.
Bug report by:	<james@towardex.com>
MFC after:	2 weeks
2004-11-09 09:40:32 +00:00
scottl
fcb728b2a6 First pass at replacing the single global bounce pool with sub-pools that are
appropriate for different tag requirements.  With the former global pool,
bounce pages might get allocated that are appropriate for one tag, but not
appropriate for another, but the system had no way to distinguish between them.
Now zones with distinct attributes are created to hold pages, and each tag
that requires bouncing is associated with a zone.  New zones are created as
needed if no existing zones can meet the requirements of the tag.  Stats for
each zone are tracked via the hw.busdma sysctl node.

This should help drivers that are failing with mysterious data corruption.

MFC After: 1 week
2004-11-09 07:07:54 +00:00
njl
5ee1e26e00 unsigned long -> u_long 2004-11-09 07:02:33 +00:00
jmg
17a80e7f16 clean up some tunables that should of been removed a while ago... 2004-11-09 06:46:14 +00:00
njl
cca929cfa4 Tell the BIOS we want to handle brightness switching as well as output
switching.  Don't initialize variables in their declaration.  Reduce stack
usage for device names.  Minor style cleanups.

MFC after:	1 week
2004-11-09 04:41:30 +00:00
des
1322d561d7 Fix signedness idiocy in previous commit. Pass the pointy hat... 2004-11-09 01:33:58 +00:00
des
2136f86547 Back out previous commit; INT64_MAX (defined in <stdint.h>) is not always
visible when <sys/resource.h> is included.
2004-11-09 00:55:23 +00:00
pjd
592adb99c2 Drop Giant lock before grabbing the topology lock. 2004-11-09 00:35:08 +00:00
peter
19ec3de6fc Remove a pre-tier-1 kernel compatability helper. This means a 6.x loader
won't boot a pre-5.1 development amd64 kernel.  That's no big loss though.
2004-11-08 23:59:44 +00:00
ru
f4dd946343 Removed the remnants of gx(4). 2004-11-08 20:24:52 +00:00
pjd
b9bb54bcb8 If device is marked as beeing destroyed, deny all access requests. 2004-11-08 20:23:53 +00:00
phk
82ae7820c5 Save a pointless FILE_LOCK_ASSERT() call in fhold. 2004-11-08 19:51:48 +00:00
phk
f1183d1c29 Hide link up/down/media printfs behind bootverbose 2004-11-08 19:27:00 +00:00
phk
394b6c09a1 Hide link up/down/media printfs behind bootverbose 2004-11-08 19:21:57 +00:00
phk
4b9b2c36ee Remove the obsolete gx driver.
All the hardware is supported by the better maintained if_em driver.

Absentmindedly nodded vertical by:	people on #that_channel
2004-11-08 19:05:22 +00:00
phk
ee05a9050f Add the last missing bits to make this unloadable: Two wakeups and
calling of the GEOM modevent from the drivers modevent so we know the
order things happen.
2004-11-08 18:53:52 +00:00
suz
30108058ef support TCP-MD5(IPv4) in KAME-IPSEC, too.
MFC after: 3 week
2004-11-08 18:49:51 +00:00
des
fe29d052b3 Retire TUNABLE_QUAD_*. 2004-11-08 18:22:22 +00:00
des
e836fd23ea #include <vm/vm_param.h> instead of <machine/vmparam.h> (the former
includes the latter, but also declares variables which are defined
in kern/subr_param.c).

Change som VM parameters from quad_t to unsigned long.  They refer to
quantities (size limits for text, heap and stack segments) which must
necessarily be smaller than the size of the address space, so long is
adequate on all platforms.

MFC after:	1 week
2004-11-08 18:20:02 +00:00
des
aa1d435e3f Document why rlim_t needs to be a signed type.
Define RLIM_INFINITY as INT64_MAX instead of hand-rolling it.

MFC after:	1 week
2004-11-08 18:05:43 +00:00
philip
9c50035691 Add support for gadgets on Asus L4R and M6R notebooks. 2004-11-08 16:54:26 +00:00
mlaier
0447144e4c Another missing ! in front of IFQ_DRV_IS_EMPTY, this time in an even more
sensitive, but less excercised location (the watchdog). While here use the
*_start_locked function directly to avoid drop, grab, drop lock.

I have to be very careful with future ALTQ patches!

Found & reviewed by:	rwatson
MFC after:		3 days
2004-11-08 16:16:04 +00:00
phk
027fce30f5 Initialize struct pr_userreqs in new/sparse style and fill in common
default elements in net_init_domain().

This makes it possible to grep these structures and see any bogosities.
2004-11-08 14:44:54 +00:00
phk
d24107be6b Use more intuitive pointer for fdinit() and fdcopy().
Change fdcopy() to take unlocked filedesc.
2004-11-08 12:43:23 +00:00
phk
63cd9549c7 Add optional device vnode bypass to DEVFS.
The tunable vfs.devfs.fops controls this feature and defaults to off.

When enabled (vfs.devfs.fops=1 in loader), device vnodes opened
through a filedescriptor gets a special fops vector which instead
of the detour through the vnode layer goes directly to DEVFS.

Amongst other things this allows us to run Giant free read/write to
device drivers which have been weaned off D_NEEDGIANT.

Currently this means /dev/null, /dev/zero, disks, (and maybe the
random stuff ?)

On a 700MHz K7 machine this doubles the speed of
	dd if=/dev/zero of=/dev/null bs=1 count=1000000

This roughly translates to shaving 2usec of each read/write syscall.

The poll/kqfilter paths need more work before they are giant free,
this work is ongoing in p4::phk_bufwork

Please test this and report any problems, LORs etc.
2004-11-08 10:46:47 +00:00
alc
8461ec98de Eliminate an unused argument to vm_pgmoveco(). 2004-11-08 06:57:31 +00:00
alc
85ea5a98fc Correct a typo in the previous revision. 2004-11-08 06:01:39 +00:00