Justin T. Gibbs [Fri, 5 Mar 1999 23:35:48 +0000 (23:35 +0000)]
Keep track of negotiated transfer parameters for each initiator<->target
connection.
Clean up support for devices featuring the multiple target SCSI ID feature.
On aic7890/91/96/97 chips, we can now assume the target role on multiple
target ids simultaneously. Although these chips also have sufficient
instruction space to hold to support the initiator and target role at the
same time, the initiator role is currently disabled as it will conflict
(chip design restriction) with the multi-tid feature. I'll probably add
a nob to enable the initiator (there-by disabling multi-tid) some time
in the future.
Return queue full or busy, depending on the tagged nature of the incoming
request, if our command input queue fills up in host memeory.
Deal with accept target I/O resource shortages.
If we get an underrun on a transaction that wasn't supposed to transmit
any data, don't attempt to print out the S/G list. The code would
run until hitting a non-present page. (oops)
Justin T. Gibbs [Fri, 5 Mar 1999 23:25:11 +0000 (23:25 +0000)]
Implement the control device for the "targ" target mode processor target
emulator so that instances can be dynamically added and removed from the
system.
Properly reference count peripheral instances so they are cleaned up when
destroyed by the control device.
Set a timeout for test unit ready commands. Before it was uninitialized
and could cause us to drop off the bus when no real timeout had occurred.
Justin T. Gibbs [Fri, 5 Mar 1999 23:18:16 +0000 (23:18 +0000)]
Protect access to the EDT with splcam() to protect against corruption
caused by temporary EDT allocations performed by controller drivers in
their interrupt routiens.
Reference count bus entries in the EDT in preparation for support for
dynamic controller arrival and departure.
Have children of the EDT hold references to their parents.
Correct routing of the XPT_IMMED_NOTIFY ccb type for use in
target mode applications.
Fix a few cases where the generation count for EDT data members was
not being updated when a modification occurred.
splcam() problem Noticed by: Tor Egge <tegge@FreeBSD.org>
Justin T. Gibbs [Fri, 5 Mar 1999 23:12:02 +0000 (23:12 +0000)]
Allocate a target mode instance to handle our target mode session, clean
it up on exit. The address for attaching the emulator (path, target id,
lun) is now specified on the command line. Some attempt at cathing
signals and cleaning up target mode instances is now made.
Bruce Evans [Fri, 5 Mar 1999 19:27:22 +0000 (19:27 +0000)]
Fixed bitrot in the types of fusword() and susword(). swords will
probably always be 16 bits if they exist at all, and fusword() and
susword() are only used in i386 code, so there aren't any portability
functions with them.
Bruce Evans [Fri, 5 Mar 1999 16:38:13 +0000 (16:38 +0000)]
The magic "no-cpu" cpu number is 0xff. Don't misrepresent cpu
numbers as chars or use bogus casts in an attempt to unmisrepresnt
them. In top, don't assume that 0xff is the only negative cpu
number when cpu numbers are (mis)represented.
Bruce Evans [Fri, 5 Mar 1999 14:43:29 +0000 (14:43 +0000)]
Don't use backslash-newline to split the too-long line for
".Fn dialog_ftree ...", since my synopsis checker doesn't support it
and no other too-long .Fn lines are split.
Bruce Evans [Fri, 5 Mar 1999 12:56:37 +0000 (12:56 +0000)]
The pseudocode in the synopsis didn't come close to actually
compiling, since <stdio.h> correctly doesn't declare off_t although
the pseudo-prototypes for the new fseeko() and ftello() functions
use it. Handle this like the corresponding problem for va_list
versus the vprintf() family.
Bruce Evans [Fri, 5 Mar 1999 11:25:31 +0000 (11:25 +0000)]
Moved kernel declarations inside the KERNEL ifdef, and removed
include of <sys/queue.h> in the !KERNEL case. The prerequisites
for <ufs/ufs/quota.h> were broken in Lite2 by converting some of
the kernel declarations to use queue macros without including
<sys/queue.h>. <sys/queue.h> was included in applications in
/usr/src instead. We polluted this file instead of merging the
changes in the applications.
Include <sys/queue.h> in the KERNEL case, and forward-declare all
structs that are used in prototypes, so that this file is almost
self-sufficient even in the kernel.
Bruce Evans [Fri, 5 Mar 1999 10:29:34 +0000 (10:29 +0000)]
Backed out most of rev.1.4. I didn't submit it; I only submitted a
request for it something like it. It was poorly worded and too
far from both POSIX wording and normal (mal)practice by referring to
sysconf(_SC_NGROUPS_MAX) instead of {NGROUPS_MAX} or NGROUPS. POSIX.1
uses curly braces to mark up "symbolic constants or limits [that may
be] defined in certain headers". Since we don't document this markup,
don't use it. Just use NGROUPS_MAX.
Søren Schmidt [Fri, 5 Mar 1999 09:43:30 +0000 (09:43 +0000)]
Now all actual probing of both ATA & ATAPI devices are done after
interrupts are enabled, this kills the last "unwanted interrupts"
(and there is no ugly hacks like in the old driver to avoid them).
COmmand interrupt devices are now supported, this applies mostly
to older CDROM's and apparently also the ZIP.
Fixed problems:
Number of total sectors wrong on some older drives.
Fixed by not using the LBA size unless we know its valid.
There has also been more general code clenaups, some reorgs also.
Bruce Evans [Fri, 5 Mar 1999 09:28:33 +0000 (09:28 +0000)]
Changed the type of quotactl()'s 4th arg from `char *' to `void *'
so that non-sloppy applications can call it without using disgusting
casts to avoid warnings. The 4th arg is sort of varargs -- it must
sometimes represent a filename, sometimes a struct pointer, and is
sometimes unused. The arg type is still caddr_t in the kernel.
Alan Cox [Fri, 5 Mar 1999 08:05:44 +0000 (08:05 +0000)]
Fix an SMP-only TLB invalidation bug. Specifically, disable
a TLB invalidation optimization that won't work given the
limitations of our current SMP support.
This patch should be applied to -stable ASAP.
Thanks to John Capo <jc@irbs.com>,
Steve Kargl <sgk@troutmask.apl.washington.edu>, and
Chuck Robey <chuckr@mat.net>
for testing.
Joerg Wunsch [Thu, 4 Mar 1999 10:50:36 +0000 (10:50 +0000)]
Adopt syscons's recent change from key_t to keyent_t (this part of
pcvt is plug-compatible to syscons to facilitate an identical
VT-switching interface), so PR misc/1247 can be closed.
Brian Somers [Wed, 3 Mar 1999 23:00:41 +0000 (23:00 +0000)]
Correct some ntohl/htonl bogons in the netmask handling.
This was pretty harmless as netmasks on a POINTOPOINT
interface are pretty much ignored, but it looked funny.
Mention the configured netmask in ``show ipcp''.
Describe in more detail what a proxy arp entry is.
Søren Schmidt [Wed, 3 Mar 1999 21:10:29 +0000 (21:10 +0000)]
Added driver to support ATAPI floppies ie LS-120 & ZIP drives.
Added "options ATA_STATIC_ID" that wires ATA disks like the old wd driver.
Fixed problems:
Dont use more sectors/intr than the drive supports.
Fix announce of > 8.4G disks.
Dont call ad_interrupt/ad_transfer when no disks config'd.
Use the right page# for CDR write mode params.
Fix breakage when no PCI support in kernel.
Implement DEVFS stuff.
Julian Elischer [Wed, 3 Mar 1999 18:15:29 +0000 (18:15 +0000)]
The tunable parameter for the scheduler quantum was inverted.
Higher numbers led to smaller quanta.
In discussion with BDE, change this parameter to be in uSecs
to make it machine independent,
and limit it to non zero multiples of 'tick' (rounding down).
Also make the variabel globally available so that the present function that
returns its value (used for posix scheduling I believe) can go away.
Joerg Wunsch [Wed, 3 Mar 1999 12:08:49 +0000 (12:08 +0000)]
Increase the vector that's used to look for free pty's. We go through
/dev/ttypv right now, but window(1) was only looking up to ttypf,
causing an `Out of pseudo-terminals' when i just tried on freefall.
Warner Losh [Wed, 3 Mar 1999 07:06:17 +0000 (07:06 +0000)]
Bring in initial libc support for mips. These files were taken from
the OpenBSD tree and should be considered preliminary. They are here
to facilitate building of the tree.
Alan Cox [Tue, 2 Mar 1999 22:55:02 +0000 (22:55 +0000)]
To avoid a conflict for the vm_map's lock with vm_fault, release
the read lock around the subyte operations in mincore. After the lock is
reacquired, use the map's timestamp to determine if we need to restart
the scan.
Joerg Wunsch [Tue, 2 Mar 1999 19:08:09 +0000 (19:08 +0000)]
Make window(1) actually work again. It has been broken for quite some
time now.
For whatever reason, the kernel seems to have generated SIGIOs
previously without an initial fcntl(...,F_SETOWN), but does no longer.
This caused window(1) to wait indefinitely for input.
Also, undo rev 1.3 of wwspawn.c, it was not well-thought, and
apparently not even tested at all. The blindly (even in a nonsensical
place like the comment on top of the function) applied replacement of
vfork() by fork() totally ignored that window(1) *does* abuse the
feature of vfork() where a modification of the parent's address space
is possible (in this case, to notify the parent of an erred exec*).
Also, with vfork(), it is guaranteed that the parent is only woken up
after the exec*() happened, where the replacement by fork() made the
parent to almost always become runnable again before the child, in
which case the parent simply told `subprocess died'. Unfortunately,
working around _this_ seems to be a lot more of redesign work compared
to little gained value, so i think relying on the specifics of vfork()
is the simpler way.
Submitted by: Philipp Mergenthaler <un1i@rz.uni-karlsruhe.de>
Greg Lehey [Tue, 2 Mar 1999 06:54:57 +0000 (06:54 +0000)]
Change printf() calls to log() calls.
Change VINUM_SAVECONFIG: it now requires a parameter. 0 means
"configuration updates are finished, please save", and 1 means "please
just save the config". This second meaning is invoked by the new
"saveconfig" command to vinum(8).
Greg Lehey [Tue, 2 Mar 1999 06:53:15 +0000 (06:53 +0000)]
change printf() calls to log() calls.
Don't save config while we're reading it from disk.
Change the way we handle the daemon: if we can't communicate with it
for 1 second (which is possible), start a new one. The daemon saves
its pid in daemonpid; on each iteration of the main loop the daemon
checks whether it's still in favour. If not, it silently exits.
Also, when trying to communicate with the daemon, check daemonpid
first. If it's set to 0, don't even try.
Greg Lehey [Tue, 2 Mar 1999 06:52:47 +0000 (06:52 +0000)]
Change printf() calls to log() calls.
Rename the VF_KERNELOP to VF_DISKCONFIG and checkkernel () to
checkdiskconfig (), which better describes their function.
Disable configuration updates if we have an error reading in the
configuration. This stops a "shoot-in-foot" problem where a mistake
can cause the configuration to be obliterated.
Tidy up some messages, which included superfluous \ns.
Recognize RAID-5 configuration information even in the non-RAID-5
version. This fixes shoot-in-foot problems where starting the wrong
version of vinum would kill RAID-5 plexes.
Recognize drives that have been referenced, but for which no physical
location is known. This is part of a modification which will
ultimately allow incrementally reading configurations. Such drives
will have a device name "unknown".
New function return_drive_space () returns space to a drive.
Previously this was part of free_sd ().
give_sd_to_drive: don't do it if the subdisk needs more space than the
drive has available.
config_sd: if reading config from disk, accept plex offset, drive
offset and length specs of -1 to indicate error conditions.
parse_config: return ENOENT if the "read" command doesn't find any
drives.
remove_sd_entry: don't do it, even by force, if it's open.
If the size of a striped or RAID-5 plex is not an integral multiple of
the stripe size, trim the size until it is.
reinstate update_volume_config, which had atrophied, to recalculate
the size of a volume if a plex has shrunk due to stripe size
considerations.
Greg Lehey [Tue, 2 Mar 1999 06:52:11 +0000 (06:52 +0000)]
Change printf() calls to log() calls.
vinumattach: Zero out tables after allocating them
Modify procedure at unload: if a vinum(8) has the superdev open, don't
close down. If only the daemon has it open, send the daemon a stop
request and wait for it to close the superdev, then unload.
In order to do this, create a second superdev which is opened by the
daemon. The open and close routines set a different bit in
vinum_conf.flags; otherwise the treatment is identical.
Remove opencount field in vol structure; replace by a flag bit, since
we can't count the number of opens.
Matt Jacob [Tue, 2 Mar 1999 06:27:59 +0000 (06:27 +0000)]
Print actual density code as well as string for density- I dunno about others,
but I sure remember 0x15 easier than 'ECMA 17'. Also handle density codes
0 (default) and 0x7f ('same') as special cases.
Warner Losh [Tue, 2 Mar 1999 05:31:47 +0000 (05:31 +0000)]
Merge patch to ufs_vnops.c's ufs_rename to the copy of ufs_rename that
lives in ext2_vnops.c for ext2fs. Also remove cast from comparision.
Bruce pointed out that it was bogus since we'd force a signed
comparision when we really wanted an unsigned comparison.