dragonfly.git
16 years ago(camperiphdone): When the cam_periph layer performs sense recovery,
Peter Avalos [Mon, 26 Nov 2007 01:08:42 +0000 (01:08 +0000)]
(camperiphdone): When the cam_periph layer performs sense recovery,
 completion of recovery is indicated by positioning the CAM_AUTOSNS_VALID
 bit in the status field of the CCB, not in the flags field.
This fixes an endless loop of sense recovery actions.

Obtained-from: FreeBSD

16 years agoOnly set single initiator buffered mode if we've recorded in our softc
Peter Avalos [Mon, 26 Nov 2007 00:40:08 +0000 (00:40 +0000)]
Only set single initiator buffered mode if we've recorded in our softc
that we should set it.

Obtained-from: FreeBSD

16 years agoMinor debug output changes.
Peter Avalos [Sun, 25 Nov 2007 18:32:29 +0000 (18:32 +0000)]
Minor debug output changes.

Also, the previous fallthrough was not intentional, so move the code
around to perform correctly.

Obtained-from: FreeBSD

16 years agoRemove unused variables.
Peter Avalos [Sun, 25 Nov 2007 18:14:26 +0000 (18:14 +0000)]
Remove unused variables.
Remove break after return.
Add XXX comment where intent is unclear.

Obtained-from: FreeBSD

16 years agoFix some mis-usages of NULL.
Sascha Wildner [Sun, 25 Nov 2007 18:10:07 +0000 (18:10 +0000)]
Fix some mis-usages of NULL.

16 years agoRemove unused variable.
Peter Avalos [Sun, 25 Nov 2007 18:03:43 +0000 (18:03 +0000)]
Remove unused variable.

Obtained-from: FreeBSD

16 years agoUse symbolic constants instead of "4".
Peter Avalos [Sun, 25 Nov 2007 17:59:22 +0000 (17:59 +0000)]
Use symbolic constants instead of "4".
Use arrays instead of relying on struct packing.

Obtained-from: FreeBSD

16 years agoDon't use return(foo(...)); in a function returning void.
Peter Avalos [Sun, 25 Nov 2007 17:09:06 +0000 (17:09 +0000)]
Don't use return(foo(...)); in a function returning void.

Obtained-from: FreeBSD

16 years agoRemove unused ioctl routine.
Peter Avalos [Sun, 25 Nov 2007 16:49:48 +0000 (16:49 +0000)]
Remove unused ioctl routine.

Obtained-from: FreeBSD

16 years agoMerge from vendor branch LESS:
Peter Avalos [Sun, 25 Nov 2007 15:10:30 +0000 (15:10 +0000)]
Merge from vendor branch LESS:
Import less-416:

Fix crash when searching text with invalid UTF-8 sequences.

16 years agoImport less-416:
Peter Avalos [Sun, 25 Nov 2007 15:10:30 +0000 (15:10 +0000)]
Import less-416:

Fix crash when searching text with invalid UTF-8 sequences.

16 years agoRemove (now) bogus prototype.
Sascha Wildner [Sun, 25 Nov 2007 14:48:30 +0000 (14:48 +0000)]
Remove (now) bogus prototype.

16 years ago* Add prototype for callrpc()
Sascha Wildner [Sun, 25 Nov 2007 14:33:02 +0000 (14:33 +0000)]
* Add prototype for callrpc()

* Fix function type for callrpc() in rpc(3)

* Raise WARNS to 2 for librpcsvc, fix warnings and ansify

16 years ago- Cache PCI-X capability PTR.
Sepherosa Ziehau [Sun, 25 Nov 2007 10:31:41 +0000 (10:31 +0000)]
- Cache PCI-X capability PTR.
- Add IVARs to read PCI Express and PCI-X capability PTR.
- Add convenient functions to test whether a device is PCI Express based
  or is PCI-X based.

16 years agoDon't use the devstat->busy_count for state decisions in the device
Peter Avalos [Sun, 25 Nov 2007 04:42:38 +0000 (04:42 +0000)]
Don't use the devstat->busy_count for state decisions in the device
drivers.  Doing so imposes atomicity and locking constraints.

Obtained-from: FreeBSD

16 years agoCache following information for PCI Express capability:
Sepherosa Ziehau [Sun, 25 Nov 2007 04:08:42 +0000 (04:08 +0000)]
Cache following information for PCI Express capability:
- Capability PTR
- PCI Express Capabilities register
- Slot Capabilities register
Print them if 'bootverbose'.

Above information should be enough for identifying PCI Express hot-plug
support, e.g. ExpressCard

16 years agoFix typo.
Peter Avalos [Sun, 25 Nov 2007 02:21:30 +0000 (02:21 +0000)]
Fix typo.

Obtained-from: FreeBSD

16 years agoFactor out a function to read power management capability
Sepherosa Ziehau [Sun, 25 Nov 2007 02:17:56 +0000 (02:17 +0000)]
Factor out a function to read power management capability

16 years agopanic() shouldn't have a \n.
Peter Avalos [Sun, 25 Nov 2007 01:30:55 +0000 (01:30 +0000)]
panic() shouldn't have a \n.

Obtained-from: FreeBSD

16 years agopanic() shouldn't have a \n.
Peter Avalos [Sun, 25 Nov 2007 01:29:57 +0000 (01:29 +0000)]
panic() shouldn't have a \n.

Obtained-from: FreeBSD

16 years agoAdd some #include's to fix 'implicit declaration of...' warnings.
Sascha Wildner [Sun, 25 Nov 2007 01:28:24 +0000 (01:28 +0000)]
Add some #include's to fix 'implicit declaration of...' warnings.

16 years agoUse parens for arguments in macro.
Peter Avalos [Sun, 25 Nov 2007 01:21:42 +0000 (01:21 +0000)]
Use parens for arguments in macro.

Obtained-from: FreeBSD

16 years agoAdjust acpi.c and bios.c to use kfreeenv()/ktestenv() and remove the
Sascha Wildner [Sun, 25 Nov 2007 00:13:28 +0000 (00:13 +0000)]
Adjust acpi.c and bios.c to use kfreeenv()/ktestenv() and remove the
freeenv/testenv compatibility defines.

16 years agoBe consistent about "static" functions: if the function is marked
Peter Avalos [Sat, 24 Nov 2007 23:12:51 +0000 (23:12 +0000)]
Be consistent about "static" functions: if the function is marked
static in its prototype, mark it static at the definition too.

Obtained-from: FreeBSD

16 years agoRemove old prototypes of consinit() (which was removed along with pcvt(4))
Sascha Wildner [Sat, 24 Nov 2007 23:12:36 +0000 (23:12 +0000)]
Remove old prototypes of consinit() (which was removed along with pcvt(4))
and usrinfoinit() (which was removed from FreeBSD before we forked).

16 years agoA SCSI_DELAY of zero is a legitimate value to have in some cases.
Peter Avalos [Sat, 24 Nov 2007 19:57:01 +0000 (19:57 +0000)]
A SCSI_DELAY of zero is a legitimate value to have in some cases.

Obtained-from: FreeBSD

16 years agoDon't call dkpart() just to print the result, it is constant.
Peter Avalos [Sat, 24 Nov 2007 19:41:39 +0000 (19:41 +0000)]
Don't call dkpart() just to print the result, it is constant.

Obtained-from: FreeBSD

16 years agoDocument camcontrol load.
Peter Avalos [Sat, 24 Nov 2007 19:22:51 +0000 (19:22 +0000)]
Document camcontrol load.

Obtained-from: FreeBSD

16 years agoMake SCSI_DELAY setable at boot time and runtime via the
Peter Avalos [Sat, 24 Nov 2007 19:19:43 +0000 (19:19 +0000)]
Make SCSI_DELAY setable at boot time and runtime via the
kern.cam.scsi_delay tunable/sysctl.

Obtained-from: FreeBSD

16 years agoAdd some \n's to kprintf()s.
Peter Avalos [Sat, 24 Nov 2007 18:55:27 +0000 (18:55 +0000)]
Add some \n's to kprintf()s.

Obtained-from: FreeBSD

16 years agos/Conatainer/Container/
Sascha Wildner [Sat, 24 Nov 2007 18:53:15 +0000 (18:53 +0000)]
s/Conatainer/Container/

Taken-from: FreeBSD

16 years agoUse .An
Sascha Wildner [Sat, 24 Nov 2007 18:47:07 +0000 (18:47 +0000)]
Use .An

16 years agoRename pci_read_extcap() to pci_read_capabilities() to avoid possible
Sepherosa Ziehau [Sat, 24 Nov 2007 13:21:32 +0000 (13:21 +0000)]
Rename pci_read_extcap() to pci_read_capabilities() to avoid possible
confusion between PCI "capability" and PCI Express "extended capability".

16 years agoWhite space
Sepherosa Ziehau [Sat, 24 Nov 2007 13:04:16 +0000 (13:04 +0000)]
White space

16 years ago- Factor out pci_fixup_nextptr().
Sepherosa Ziehau [Sat, 24 Nov 2007 06:47:37 +0000 (06:47 +0000)]
- Factor out pci_fixup_nextptr().
- The checking about whether 'data' register of power management capability
  exists or not is incorrect, according to PCI local bus spec:
    1) Next capability is not necessarily at a higher location than the
       current capability.
    2) Two capabilities are not necessarily consecutive.
  Set it to 0 for now (it is not used at all) and add comment about a possible
  way to test the existence of this register in power management capability.
- Clean up pci_read_extcap() a little bit.

16 years agoIf we boot verbose, then print out 'interesting' CAM errors that otherwise
Peter Avalos [Sat, 24 Nov 2007 05:18:35 +0000 (05:18 +0000)]
If we boot verbose, then print out 'interesting' CAM errors that otherwise
would hide problems (like Selection Timeout).

Obtained-from: FreeBSD

16 years agoAdd REPORT LUNS basic infrastructure.
Peter Avalos [Sat, 24 Nov 2007 03:48:31 +0000 (03:48 +0000)]
Add REPORT LUNS basic infrastructure.

Obtained-from: FreeBSD

16 years ago- Push PCI status "capability list bit" checking down into pci_read_extcap().
Sepherosa Ziehau [Sat, 24 Nov 2007 03:42:24 +0000 (03:42 +0000)]
- Push PCI status "capability list bit" checking down into pci_read_extcap().
- Mask bottom two bits of "next pointer", add comment about it.
- If "next pointer" is not 0 and is less than 0x40 (standard PCI configuration
  space size), then it is illegal, bark out loudly and terminate the capability
  iteration.

16 years agoDo not +1 with MAXPATHLEN.
Peter Avalos [Sat, 24 Nov 2007 03:13:03 +0000 (03:13 +0000)]
Do not +1 with MAXPATHLEN.

Obtained-from: FreeBSD

16 years agoRemove unused variable.
Peter Avalos [Sat, 24 Nov 2007 03:09:57 +0000 (03:09 +0000)]
Remove unused variable.

Obtained-from: FreeBSD

16 years agoRemove extra semicolon.
Peter Avalos [Sat, 24 Nov 2007 02:36:13 +0000 (02:36 +0000)]
Remove extra semicolon.

Obtained-from: FreeBSD

16 years agoRemove comment that doesn't seem to apply any more.
Peter Avalos [Sat, 24 Nov 2007 02:29:24 +0000 (02:29 +0000)]
Remove comment that doesn't seem to apply any more.

16 years agoStaticise a debugging variable.
Peter Avalos [Sat, 24 Nov 2007 02:08:50 +0000 (02:08 +0000)]
Staticise a debugging variable.

Obtained-from: FreeBSD

16 years agoConst'ify the CDB format string passed to the CDB parsing routines
Peter Avalos [Sat, 24 Nov 2007 01:53:50 +0000 (01:53 +0000)]
Const'ify the CDB format string passed to the CDB parsing routines
(csio_decode_visit() and family).

Obtained-from: FreeBSD

16 years agoFix breakage in 'camcontrol defects' introduced in last commit.
Peter Avalos [Sat, 24 Nov 2007 01:38:46 +0000 (01:38 +0000)]
Fix breakage in 'camcontrol defects' introduced in last commit.

Obtained-from: FreeBSD

16 years agoBe very generous with timeouts for synchronize cache. We may wait a very long
Peter Avalos [Sat, 24 Nov 2007 01:31:39 +0000 (01:31 +0000)]
Be very generous with timeouts for synchronize cache. We may wait a very long
time in the cases where it really sends the drive out to lunch, but it also
allows us to catch very weird edge cases of strange drives that might take
a very long time.

Obtained-from: FreeBSD

16 years agoAdd llabs(3).
Simon Schubert [Sat, 24 Nov 2007 00:55:10 +0000 (00:55 +0000)]
Add llabs(3).

16 years agoAdd llabs(3).
Simon Schubert [Sat, 24 Nov 2007 00:54:25 +0000 (00:54 +0000)]
Add llabs(3).

Obtained-From:  FreeBSD

16 years agoUniformly refer to RFCs as 'RFC xxxx' and not 'RFCxxxx' or 'RFC-xxxx'.
Sascha Wildner [Fri, 23 Nov 2007 23:16:37 +0000 (23:16 +0000)]
Uniformly refer to RFCs as 'RFC xxxx' and not 'RFCxxxx' or 'RFC-xxxx'.

16 years agoFix a number of typos in defined values (ioctls and others).
Sascha Wildner [Fri, 23 Nov 2007 23:03:57 +0000 (23:03 +0000)]
Fix a number of typos in defined values (ioctls and others).

16 years agoRemove debugging printfs.
Matthew Dillon [Fri, 23 Nov 2007 22:29:51 +0000 (22:29 +0000)]
Remove debugging printfs.

16 years agoProperly use .Ar
Sascha Wildner [Fri, 23 Nov 2007 20:08:35 +0000 (20:08 +0000)]
Properly use .Ar

16 years agoAdd comment about pcicfgregs.pmgt field
Sepherosa Ziehau [Fri, 23 Nov 2007 14:41:56 +0000 (14:41 +0000)]
Add comment about pcicfgregs.pmgt field

16 years agoCreate structure to group PCI power management configuration
Sepherosa Ziehau [Fri, 23 Nov 2007 14:36:17 +0000 (14:36 +0000)]
Create structure to group PCI power management configuration

Obtained-from: FreeBSD

16 years ago- Add CAP_PTR macro for type 2 devices (cardbus)
Sepherosa Ziehau [Fri, 23 Nov 2007 13:40:58 +0000 (13:40 +0000)]
- Add CAP_PTR macro for type 2 devices (cardbus)
- Less magic values in pci_read_extcap()

Obtained-from: FreeBSD

16 years agoUse .Ev
Sascha Wildner [Thu, 22 Nov 2007 21:17:55 +0000 (21:17 +0000)]
Use .Ev

16 years agoFix typos.
Hasso Tepper [Thu, 22 Nov 2007 20:19:43 +0000 (20:19 +0000)]
Fix typos.

Obtained-from: NetBSD

16 years agoRemove comments about 0x2 flags value and FDC_YE option of which there
Sascha Wildner [Thu, 22 Nov 2007 20:13:38 +0000 (20:13 +0000)]
Remove comments about 0x2 flags value and FDC_YE option of which there
are no traces in the code.

Found-in: FreeBSD

16 years agoReplace the very predictable 'random' IP sequence number generator with
Matthew Dillon [Thu, 22 Nov 2007 19:57:14 +0000 (19:57 +0000)]
Replace the very predictable 'random' IP sequence number generator with
something far less predictable.  Use DragonFly's built-in PRNG and add a
shuffle algorithm.  We eat 128KB of ram for the shuffle array but I've
pretty much had it with roll-your-own PRNGs.  At least this way any PRNG
issues can be corrected in one place -- our system PRNG.

Turn net.inet.ip.random_id on by default.  Eat the minor loss in performance.
On the bright side, our PRNG is very fast, so this should not represent
a burden.

References: Analysis of BSD ip randomizer algorithm by "Amit Klein"
    <amit.klein@trusteer.com> showing serious vulnerabilities in
    the algorithm.

16 years agoFix bug in scsi_read_write() where it might use 6-byte commands when
Peter Avalos [Thu, 22 Nov 2007 17:35:12 +0000 (17:35 +0000)]
Fix bug in scsi_read_write() where it might use 6-byte commands when
10/12-byte-specific flags were specified.

Obtained-from: FreeBSD

16 years agoFix typo in comment.
Peter Avalos [Thu, 22 Nov 2007 17:11:43 +0000 (17:11 +0000)]
Fix typo in comment.

Obtained-from: FreeBSD

16 years agoAdd interfaces for SCSI LOG SELECT and LOG SENSE commands.
Peter Avalos [Thu, 22 Nov 2007 16:34:25 +0000 (16:34 +0000)]
Add interfaces for SCSI LOG SELECT and LOG SENSE commands.

Obtained-from: FreeBSD

16 years agoMark some functions as __printflike().
Peter Avalos [Thu, 22 Nov 2007 15:53:16 +0000 (15:53 +0000)]
Mark some functions as __printflike().

Obtained-from: FreeBSD

16 years agoUse .Ev
Sascha Wildner [Thu, 22 Nov 2007 08:40:03 +0000 (08:40 +0000)]
Use .Ev

16 years agoKill the command (don't rerun it) if we had an AUTOSENSE failure.
Peter Avalos [Thu, 22 Nov 2007 00:59:49 +0000 (00:59 +0000)]
Kill the command (don't rerun it) if we had an AUTOSENSE failure.
If we had an AUTOSENSE failure, we don't know what SENSE DATA
we had for a CHECK CONDITION. It's far better to assume failure
in this case.

Obtained-from: FreeBSD

16 years agoPropagate CAM_DIS_DISCONNECT on through:
Peter Avalos [Wed, 21 Nov 2007 22:10:16 +0000 (22:10 +0000)]
Propagate CAM_DIS_DISCONNECT on through:

1. If we get frozen, unfreeze for disable disconnects.
2. Put CAM_DIS_DISCONNECT commands at the head of the work queue
(we have a target still connected and we can't run anything else
until this command completes).

If we had an error sending the last CTIO, unfreeze the queue anyway.

Obtained-from: FreeBSD

16 years agoFix .Dv abuse and use .Li instead.
Sascha Wildner [Wed, 21 Nov 2007 22:02:32 +0000 (22:02 +0000)]
Fix .Dv abuse and use .Li instead.

16 years agoCheck the void * argument in the AC_FOUND_DEV case against NULL.
Peter Avalos [Wed, 21 Nov 2007 21:28:41 +0000 (21:28 +0000)]
Check the void * argument in the AC_FOUND_DEV case against NULL.

Obtained-from: FreeBSD

16 years agoCleanup some of the XPORT_FC code (mostly whitespace)
Peter Avalos [Wed, 21 Nov 2007 20:29:34 +0000 (20:29 +0000)]
Cleanup some of the XPORT_FC code (mostly whitespace)

Obtained-from: FreeBSD

16 years agoAdd a transport settings variant for Fibre Channel.
Peter Avalos [Wed, 21 Nov 2007 20:07:31 +0000 (20:07 +0000)]
Add a transport settings variant for Fibre Channel.

Obtained-from: FreeBSD

16 years agoUniformly use .Pa for URLs.
Sascha Wildner [Wed, 21 Nov 2007 19:12:41 +0000 (19:12 +0000)]
Uniformly use .Pa for URLs.

16 years agoFix loc_seek - using lseek to acquire the directory cookie.
Matthew Dillon [Wed, 21 Nov 2007 05:48:31 +0000 (05:48 +0000)]
Fix loc_seek - using lseek to acquire the directory cookie.

Reminded-by: "Simon 'corecode' Schubert" <corecode@fs.ei.tum.de>
16 years agoHAMMER 5/many - in-memory cache and more vnops.
Matthew Dillon [Tue, 20 Nov 2007 22:55:40 +0000 (22:55 +0000)]
HAMMER 5/many - in-memory cache and more vnops.

Get more vnops working with the in-memory cache.  Files can now be created,
linked, and deleted.  Directories can be scanned.  NOTE: The topology is
not yet flushed to the media.

16 years agoBreak out the scan info structure's support routines so external code
Matthew Dillon [Tue, 20 Nov 2007 22:52:23 +0000 (22:52 +0000)]
Break out the scan info structure's support routines so external code
can use them directly.

16 years agomdoc(7) section order
Sascha Wildner [Tue, 20 Nov 2007 22:50:48 +0000 (22:50 +0000)]
mdoc(7) section order

16 years agoAdd vop_helper_create_uid() - roughly taken from UFS. Figure out special
Matthew Dillon [Tue, 20 Nov 2007 21:37:54 +0000 (21:37 +0000)]
Add vop_helper_create_uid() - roughly taken from UFS.  Figure out special
directory permissions given the directory mode, uid, cred, and other
information, and return the uid which should be used to create a new
file/node.

16 years agoClean up some missing 32->64 bit cookie conversions. Adjust the NFS server
Matthew Dillon [Tue, 20 Nov 2007 21:36:08 +0000 (21:36 +0000)]
Clean up some missing 32->64 bit cookie conversions.  Adjust the NFS server
to return 64 bit cookies (NFSv3 supports 64 bit cookies).

16 years agoMake necessary changes to readdir/getdirentries to support HAMMER. HAMMER
Matthew Dillon [Tue, 20 Nov 2007 21:03:51 +0000 (21:03 +0000)]
Make necessary changes to readdir/getdirentries to support HAMMER.  HAMMER
needs to use 64 bit directory cookies.

Adjust libc's DIR structure and change readdir to acquire the directory
position via lseek() instead of using the basep argument to getdirentries().
The basep argument is a long, which is 32 bits on IA32, and it just isn't
wide enough.  The seek position is 64 bits and is wide enough.

Sizeof(DIR) has changed, but hopefully won't cause any major issues since
libc is responsible for allocating it.  The APIs remain the same.

Adjust the VOP_READIR() VFS interface routine to return 64 bit cookies.
All VFSs have been reworked, requiring only minor adjustments.

16 years agoAdjust getdirentries() to allow basep to be NULL. Use off_t for the loff
Matthew Dillon [Tue, 20 Nov 2007 18:35:46 +0000 (18:35 +0000)]
Adjust getdirentries() to allow basep to be NULL.  Use off_t for the loff
calculation, but we can't change basep's documented type yet.

16 years agoAdd a helper function vop_helper_setattr_flags() modeled off of UFS's
Matthew Dillon [Tue, 20 Nov 2007 18:34:01 +0000 (18:34 +0000)]
Add a helper function vop_helper_setattr_flags() modeled off of UFS's
chflags checks.

16 years agoUpdate the documentation for getdirentries(2). Describe issues with using
Matthew Dillon [Tue, 20 Nov 2007 18:21:35 +0000 (18:21 +0000)]
Update the documentation for getdirentries(2).  Describe issues with using
long *basep (it not being wide enough) and suggest using lseek (with its 64
bit seek 'offset') instead.

16 years agoFix the fix.
Hasso Tepper [Tue, 20 Nov 2007 11:32:28 +0000 (11:32 +0000)]
Fix the fix.

Pointed-out-by: swildner@
16 years agoAdd SATA ATAPI support for AHCI controllers.
Hasso Tepper [Tue, 20 Nov 2007 09:25:21 +0000 (09:25 +0000)]
Add SATA ATAPI support for AHCI controllers.

Obtained-from: FreeBSD
Reviewed-by: tgen@
16 years agoFix typo.
Hasso Tepper [Tue, 20 Nov 2007 08:40:42 +0000 (08:40 +0000)]
Fix typo.

16 years agoHAMMER 4/many - more core infrastructure
Matthew Dillon [Tue, 20 Nov 2007 07:16:28 +0000 (07:16 +0000)]
HAMMER 4/many - more core infrastructure

* Add reserved areas for a boot area and a memory log.

* Add merged scan operations which are the core procedures used to execute
  most filesystem operations.  These functions will access both the
  in-memory tree of unsynchronized information and the on-disk topology
  to generate a 'merged' result.

  Amoung other things this allows the filesystem to hold operations in a
  memory cache without actually having to mess with the HAMMER topology
  on-disk.  The on-disk topology is then updated in a deferred manner.
  Disk I/O is entirely avoided for self contained operations which create,
  write, and delete related files quickly enough.

* Add unmount sequencing, make mount and df work again.

* Test the reference counting and flushing system on most primary
  structures.

* Test basic buffer cache interactions, reading, writing, and lazy
  synchronization.

* Start tying VNOPS into the infrastructure.  open/close/read/write works
  now via the in-memory cache (none of it is synched to the disk topology
  yet!).  readdir doesn't yet work... the 32 bit cookies are not large
  enough.

16 years agoFC path inquiry settings.
Peter Avalos [Tue, 20 Nov 2007 00:03:21 +0000 (00:03 +0000)]
FC path inquiry settings.

Obtained-from: FreeBSD

16 years agoFC path inquiry settings.
Peter Avalos [Mon, 19 Nov 2007 23:52:10 +0000 (23:52 +0000)]
FC path inquiry settings.

Obtained-from: FreeBSD

16 years agoPrint out the asc/ascq and description even when both the asc and ascq
Peter Avalos [Mon, 19 Nov 2007 23:29:13 +0000 (23:29 +0000)]
Print out the asc/ascq and description even when both the asc and ascq
are zero.  This is so that users will see the "no additional sense" printout
and know that they have the full sense information.

Obtained-from: FreeBSD

16 years agoRemove various references to sysinstall from the system.
Sascha Wildner [Mon, 19 Nov 2007 18:49:06 +0000 (18:49 +0000)]
Remove various references to sysinstall from the system.

Reported-by: Robert Gauthier <rg0@sympatico.ca>
16 years agoRemove old freebsd-tips fortune(6) datfile.
Sascha Wildner [Mon, 19 Nov 2007 18:23:36 +0000 (18:23 +0000)]
Remove old freebsd-tips fortune(6) datfile.

16 years agoHAMMER 3/many - more core infrastructure.
Matthew Dillon [Mon, 19 Nov 2007 00:53:40 +0000 (00:53 +0000)]
HAMMER 3/many - more core infrastructure.

* Add an in-memory B-Tree node abstraction
* Add an in-memory record abstraction.
* Put the B-Tree cursor code in its own source file.
* Fill in more of the VOP code.

* Do a major clean-up of all in-memory structures and some on-disk
  structures.  All the major in-memory structures now use similarly
  named functions.

* Move inter-cluster link from a B-Tree leaf node to a B-Tree internal
  node, giving us a left and right boundary to play with.  This simplifies
  the algorithms by quite a bit.
* Allow the B-Tree to be unbalanced by moving the sub-type from the B-Tree
  node header to the B-Tree element structure.

* Revamp the I/O infrastructure, in particular allow B-Tree nodes to be
  held passively.
* Implement a flexible B-Tree node cache.  References into the B-Tree can
  be cached by inodes.  If the related buffer is flushed by the system, the
  related cache pointers will be cleared.

16 years agoAdd quirk for SONY SMO drive. This (pre SCSI-2) drive returns a mystic
Peter Avalos [Sun, 18 Nov 2007 19:34:50 +0000 (19:34 +0000)]
Add quirk for SONY SMO drive.  This (pre SCSI-2) drive returns a mystic
code when the medium is inserted but not spun up.

Obtained-from: FreeBSD

16 years agoFix up unit attention and selection timeout handling.
Peter Avalos [Sun, 18 Nov 2007 19:27:29 +0000 (19:27 +0000)]
Fix up unit attention and selection timeout handling.

- change daprevent() to set CAM_RETRY_SELTO and SF_RETRY_UA when it calls
  cam_periph_runccb().
- change the pt(4) driver to ignore unit attentions

Obtained-from: FreeBSD

16 years agoAdd sense key table entries for DATA PROTECT and BLANK CHECK. This will
Peter Avalos [Sun, 18 Nov 2007 19:16:26 +0000 (19:16 +0000)]
Add sense key table entries for DATA PROTECT and BLANK CHECK.  This will
prevent scsi_sense_desc() from deferencing a NULL pointer when a drive
happens to return one of these sense keys.

Obtained-from: FreeBSD

16 years agoIn camperiphscsisenseerror(), don't return an error when the error action
Peter Avalos [Sun, 18 Nov 2007 19:11:23 +0000 (19:11 +0000)]
In camperiphscsisenseerror(), don't return an error when the error action
is SS_NOP.

Obtained-from: FreeBSD

16 years agoFix typo. SS_START is quite different than SSS_START.
Peter Avalos [Sun, 18 Nov 2007 19:04:08 +0000 (19:04 +0000)]
Fix typo.  SS_START is quite different than SSS_START.

16 years agoIf we have an error and are booting verbosely, don't be complaining
Peter Avalos [Sun, 18 Nov 2007 18:49:53 +0000 (18:49 +0000)]
If we have an error and are booting verbosely, don't be complaining
if this was a non-retryable selection timeout.

Obtained-from: FreeBSD

16 years agoFix typo.
Peter Avalos [Sun, 18 Nov 2007 17:59:54 +0000 (17:59 +0000)]
Fix typo.

Obtained-from: FreeBSD

16 years agoRewrite of the CAM error recovery code.
Peter Avalos [Sun, 18 Nov 2007 17:53:02 +0000 (17:53 +0000)]
Rewrite of the CAM error recovery code.

Some of the major changes include:

- The SCSI error handling portion of cam_periph_error() has
  been broken out into a number of subfunctions to better
  modularize the code that handles the hierarchy of SCSI errors.
  As a result, the code is now much easier to read.

- String handling and error printing has been significantly
  revamped.  We now use sbufs to do string formatting instead
  of using printfs (for the kernel) and snprintf/strncat (for
  userland) as before.

  There is a new catchall error printing routine,
  cam_error_print() and its string-based counterpart,
  cam_error_string() that allow the kernel and userland
  applications to pass in a CCB and have errors printed out
  properly, whether or not they're SCSI errors.  Among other
  things, this helped eliminate a fair amount of duplicate code
  in camcontrol.

  We now print out more information than before, including
  the CAM status and SCSI status and the error recovery action
  taken to remedy the problem.

Obtained-from: FreeBSD

16 years agoRemove <net/intrq.h> via 'make upgrade'.
Sascha Wildner [Sun, 18 Nov 2007 16:13:31 +0000 (16:13 +0000)]
Remove <net/intrq.h> via 'make upgrade'.