Justin T. Gibbs [Sat, 1 Mar 1997 06:50:41 +0000 (06:50 +0000)]
When we perform an "automatic request sense", we issue an untagged command.
The sequencer expects untagged transactions to have the SCBID of the
transaction in the "busy target" array. So, ensure that the busy entry
is up to date for the target in this case. The new identify code in the
sequencer that performs additional sanity checking got caught up when a
tagged transaction created an untagged request sense.
In ahc_handle_seqint, ensure that the target ID is taken from the right
place. In the case of a selection, the ID is in SCSIID. In the case of
a reconnection it is found in SELID.
Bruce Evans [Fri, 28 Feb 1997 17:56:27 +0000 (17:56 +0000)]
Fixed a panic in nfs_writevp(). Lite2 provided a fix for a silly
missing-parentheses bug, but this exposed a misplaced vfs_busy_pages().
This bug cost a factor of 2.5-3 in nfsv3 write performance! It should
be fixed in 2.2.
Removed some debugging code that gets triggered often in normal
operation. There are still many backwards diagnostics (#define
DIAGNOSTIC gives no diagnostics).
Bruce Evans [Fri, 28 Feb 1997 12:36:18 +0000 (12:36 +0000)]
Print function args in the current radix instead of always in hex.
Print the stack pointer together with the frame pointer in the trap,
syscall and interrupt messages. The frame pointer is not very useful
for locating syscall args since syscall functions don't have a frame
pointer.
Print all the numbers in the trap, syscall and interrupt messages in
the default radix. The syscall number was confusing because it was
printed in decimal.
Use %#n format more and 0x%x less. 0x%x of course doesn't work with
a variable radix. ddb is now fairly consistent about using %+#n to
print all numbers. It omits the '+' for signed numbers the '#' in a
few cases (e.g., for function args) to save space.
Bruce Evans [Fri, 28 Feb 1997 09:24:11 +0000 (09:24 +0000)]
Changed the example copyright to be closer to the ones that we actually
use:
- don't put [your name] on a a separate line. Most authors have shorter
names than "The Regents of the University of California".
- don't repeat [your name].
Justin T. Gibbs [Fri, 28 Feb 1997 03:58:21 +0000 (03:58 +0000)]
Functionalize some code that was repeated throughout the driver.
Fix a bug in the initialization of the busreset_args that left the B channel
args unitialized and the A channel ones initialized to B's vales. Oops.
If we get a NO_IDENT sequencer interrupt (the reconnecting target didn't
issue an identify or botched it), reset the bus instead of panicing. We
should be able to recover from this error.
In the AWAITING_MSG handler, order messages by severity. Since the message
we send is based on a flag on the SCB, it is possible, during error recovery,
to get more than one flag set. This is fine since any time a new flag is
set, it is meant to take us to a more draconian level of recovery. This
also ensures that we don't lose any "history" of what the command has gone
through.
When we reset the bus, reset the "send ordered tag" bitmask.
Clear some additional interrupt status when we perform a bus reset.
Justin T. Gibbs [Fri, 28 Feb 1997 03:51:00 +0000 (03:51 +0000)]
No longer clear all interrupt status when the sequencer is reset. The only
time that we really want to do this is when a bus reset causes the sequencer
to be reset and the kernel driver now handles this case.
Remove some reordering in the select2 routine that wasn't necessary.
It was an experimental fix for a race condition I fixed elsewhere, and
confused the code flow.
Don't bother looping on a parity error in the mesgout loop since we can't
see parity errors on out phases.
Clean up the mesgin_identify code. In the old days, we "snooped" for tag
messages and used this as an indicator of whether or not the target was
using tagged transactions. This forced the sequencer to ack the identify
before determining if a valid SCB matched the target meaning that an abort
message to handle this case might not be seen before the target entered a
data phase. Since we can determin the "tagged-ness" of a target by looking
it up in the array of busy targets (recently introduced), we can determine
this up front simplifying the search code as well as ensuring we can follow
the SCSI specs method for rejecting a reselection.
When an SCB is placed on the free list, set its SCB_TAG to SCB_LIST_NULL.
This makes it much easier for the kernel driver to find active SCBs on the
card during error recovery.
Bruce Evans [Thu, 27 Feb 1997 16:40:20 +0000 (16:40 +0000)]
Fixed loading of vfs's. The Lite2 merge added unnecessary compatibility
cruft and resulted in loading usually following a null pointer. Use
something closer to the pre-Lite2 code, including not making a copy of
the new filesystem's config info. Not making a copy also fixes a race
for loading and a memory leak for unloading.
Fixed unloading of vfs's. maxvfsconf wasn't maintained.
Look up the vfs to unload by name instead of by number. The numbers
should go away as soon as all mount utilities are converted.
John Dyson [Thu, 27 Feb 1997 05:28:58 +0000 (05:28 +0000)]
Fix the previous simple_lock fix breakage in the combined
vput/vrele routine. Fix a panic message. Fix the vop_nounlock
routine so that "special" filesystems that use it work correctly.
John Dyson [Thu, 27 Feb 1997 02:57:03 +0000 (02:57 +0000)]
Fix the simple_lock problem with the physical I/O buffer code, and
also fix the missing simple_unlock in vrele, and improve vrele/vput
by merging them into one routine. BDE pointed these problems out.
Bruce Evans [Wed, 26 Feb 1997 15:35:42 +0000 (15:35 +0000)]
Fixed unmounting of the root fs. vfs_unmountroot() wasn't fully updated
to do Lite2 locking and vfs_unmountall() wasn't as simple as the Lite2
version.
Mike Pritchard [Wed, 26 Feb 1997 05:31:52 +0000 (05:31 +0000)]
If an administrator somehow manages to break the hardlinks
on chpass & passwd and turn the links into individual files
with the schg flag set, make install will fail to install all
of the proper links.
Fixed by removing the schg flag on all of the links before installing.
Bruce Evans [Tue, 25 Feb 1997 19:33:23 +0000 (19:33 +0000)]
Merged some missing locking from Lite2:
- getnewvnode() and vref() were missing one simple_unlock() each.
- the Lite2 locking changes weren't merged at all in
printlockedvnodes() or sysctl_vnode(). Merging these undid
some KNF style regressions.
Brian Somers [Tue, 25 Feb 1997 14:05:17 +0000 (14:05 +0000)]
osreldate.h stuff suggested by: Eivind Eklund
Remove #include's from sig.h and get dependant modules to include them
themselves. Make inclusion of if_var.h depend on __FreeBSD_version so
that the -current version of ppp can be used with 2.1.*
Mike Pritchard [Tue, 25 Feb 1997 06:11:19 +0000 (06:11 +0000)]
Don't set the umask until after we have processed the arguments
and opened the archive file. This allows "cpio -o -O output_file"
to create the output file with the callers proper umask.
Closes PR# 1391.
Justin T. Gibbs [Tue, 25 Feb 1997 03:05:35 +0000 (03:05 +0000)]
Fix numerous problems with the abort/recovery code. Highlights include fixing
a race condition in how SDTR and WDTR negotiation are handled, fixes for multi-lun
non-tagged device recovery, and ensuring that the timedout scbs in the waiting queue
are cleaned up.
Fix a problem with SCB paging that caused bogus residuals to be reported.
Justin T. Gibbs [Tue, 25 Feb 1997 03:02:58 +0000 (03:02 +0000)]
Leave reselections on all the time.
If we are aborting an SCB from findSCB, don't add it back to the free list -
the kernel driver will do this for us.
Warner Losh [Tue, 25 Feb 1997 02:25:02 +0000 (02:25 +0000)]
Fix a minor problem with restore from tapes from big endian machines.
This finishes the closing of PR2446 which J"org Wunsch pointed out to
me after I closed it.