dragonfly.git
16 years agoWhen deregistering a bus, attempt to flush out all outstanding
Peter Avalos [Sun, 2 Dec 2007 00:30:35 +0000 (00:30 +0000)]
When deregistering a bus, attempt to flush out all outstanding
operations before returning. Point the bus at a dummy cam_sim
structure so that any CCBs will complete immediately with a
CAM_DEV_NOT_THERE status, and ensure that any xpt_schedule() calls
on the bus's devices will immediately call the peripheral's
periph_start() routine. Also repeat the async messages because
devices that were part of the way through being probed may appear
after the original AC_LOST_DEVICE was sent, and would otherwise
never go away.

Obtained-from: FreeBSD

16 years agoThere should be no need to retry when the CCB status code is
Peter Avalos [Sat, 1 Dec 2007 22:54:18 +0000 (22:54 +0000)]
There should be no need to retry when the CCB status code is
CAM_LUN_INVALID or CAM_TID_INVALID.

This avoids crashes in camisr() when umass devices are
unplugged during probing.

Obtained-from: FreeBSD

16 years agoMake the exploring of all luns supported by an HBA more of a tunable.
Peter Avalos [Sat, 1 Dec 2007 22:49:49 +0000 (22:49 +0000)]
Make the exploring of all luns supported by an HBA more of a tunable.

If we're probing luns, and each probe succeeds, we keep going past
lun 7 if we're a SCSI3 or better device (until we fail to probe).

If we're probing luns, and a probe fails, we only keep going if
we're quirked *for* it (CAM_QUIRK_HILUNS), and if we're not quirked
*against* it (CAM_QUIRK_NOHILUNS), or we're a SCSI3 or better device
and the tunable (kern.cam.cam_srch_hi) is set non-zero.

Obtained-from: FreeBSD

16 years agoFine-grained malloc statistics - replace some M_DEVBUF with module-specific
Peter Avalos [Sat, 1 Dec 2007 22:21:18 +0000 (22:21 +0000)]
Fine-grained malloc statistics - replace some M_DEVBUF with module-specific
types.

Obtained-from: FreeBSD

16 years agoRegenerate the pciconf(8) database from the following files:
Sascha Wildner [Sat, 1 Dec 2007 20:24:33 +0000 (20:24 +0000)]
Regenerate the pciconf(8) database from the following files:

Hart:    Oct 10, 2007 (version 657)
Boemler: Dec  1, 2007

16 years ago- Add missing MCP65 id which was accidentally removed in previous commit.
Hasso Tepper [Sat, 1 Dec 2007 08:32:11 +0000 (08:32 +0000)]
- Add missing MCP65 id which was accidentally removed in previous commit.
- Add Analog Devices AD1984 codec id.
- Enable pcbeep control for Acer + ALC268 (nid 29). Give enough (fake)
  hints so the parser will grab it and allocate "speaker" control.
- Fix regression while preparing DAC and ADC for multichannel
  format. Since playback policy is to output to every possible path,
  ensure that each DAC is started.

Obtained-from: FreeBSD

16 years agoClean up the manual pages of mount_hammer(8) and newfs_hammer(8) a bit.
Sascha Wildner [Fri, 30 Nov 2007 20:22:26 +0000 (20:22 +0000)]
Clean up the manual pages of mount_hammer(8) and newfs_hammer(8) a bit.

* In HISTORY, always refer to the (odd) development version numbers,
  not the (even) release ones.

* Start sentences on a new line, add some markup, comment out empty
  sections.

* Sort options.

* Fix typos.

16 years ago* Fix support for followings:
Hasso Tepper [Fri, 30 Nov 2007 08:06:00 +0000 (08:06 +0000)]
* Fix support for followings:
  o Acer Aspire 4520 laptop
    - jack sensing / automute
  o Toshiba Satellite A135-S4527 laptop
    - jack sensing / automute
  o Apple Macbook 3 (is it?)
    - require gpio0 (for speakers) and ovref50 (for headphone) to make it work
    - jack sensing / automute
* Add Nvidia MCP67 controller ids.
* Be sensible about similar controller with multiple pci ids.
* Connect unused DAC/ADC to stream#0 rather than forcing each of them
  managing their own stream.

Obtained-from: FreeBSD

16 years agoLimit total playback channels to just 1, for ALi M5451. The reliability
Hasso Tepper [Fri, 30 Nov 2007 08:03:17 +0000 (08:03 +0000)]
Limit total playback channels to just 1, for ALi M5451. The reliability
of it's multi DAC / playback channels is not that good. Enabling vchans
make the bug more visible since playback allocation will look for possible
free hardware channels first (i.e: the next DAC, the very first has been
consumed by vchan mixer) which in this case has been proven faulty.

Obtained-from: FreeBSD

16 years agoAdd support for trimmed down version of ATI SB600 AC97 audio
Hasso Tepper [Fri, 30 Nov 2007 08:01:43 +0000 (08:01 +0000)]
Add support for trimmed down version of ATI SB600 AC97 audio
controller.

Obtained-from: FreeBSD

16 years agoRemap and virtualize mixer controls for HP nx6110 with AD1981B AC97 codec,
Hasso Tepper [Fri, 30 Nov 2007 07:59:56 +0000 (07:59 +0000)]
Remap and virtualize mixer controls for HP nx6110 with AD1981B AC97 codec,
unifying master volume control.

  * Remap "phout" --> SOUND_MIXER_VOLUME (internal speakers)
  * Virtual "vol" --> { "phout", "ogain" (headphone) }

Obtained-from: FreeBSD

16 years agoEnable headphone jack-sense for HP nx6100 with AD1981B AC'97 codec,
Hasso Tepper [Fri, 30 Nov 2007 07:57:20 +0000 (07:57 +0000)]
Enable headphone jack-sense for HP nx6100 with AD1981B AC'97 codec,
automuting internal speakers.

Obtained-from: FreeBSD

16 years ago- Gigabyte G33-S2H fixup, due to the present of multiple competing
Hasso Tepper [Fri, 30 Nov 2007 07:53:53 +0000 (07:53 +0000)]
- Gigabyte G33-S2H fixup, due to the present of multiple competing
  codecs. Codec at address 0 seems purely digital, or perhaps an HDMI
  interface. Let the driver skip it and continue scanning the codecs
  starting with address 2 (Realtek ALC885).

- Trivial headphone / speaker automute fixup for Fujitsu-Siemens
  AMILO Si 1848 laptop.

- Trivial headphone / speaker automute fixup for Fujitsu-Siemens
  Lifebook S7020D laptop.

- Some smart vendor trying to create interplanetary wormhole by
  screwing pci config space during their BIOS update. The side effects
  of their failure attempt includes mutilated hardware id, broken
  speaker automuting and loosing the entire analog CD connectivity,
  thus causing enough collateral damages to collapse the entire
  universe.  Move along with it.
  Please exercise extra cautious when applying BIOS updates.

- Fix no sound issues (on headphones) for Lenovo ThinkCentre A55 due
  to global automute table entry which is not applicable for
  non-laptops.

- Speaker mute control for HP DC7700 since the front headphone jack
  does not generate any interesting unsolicited signal/response.

Obtained-from: FreeBSD

16 years ago- malloc M_NOWAIT -> M_WAITOK.
Hasso Tepper [Fri, 30 Nov 2007 07:48:57 +0000 (07:48 +0000)]
- malloc M_NOWAIT -> M_WAITOK.
- Protect against divide by zero while calculating bus speed due to
  possible broken kernel timecounter.

Obtained-from: FreeBSD

16 years ago- Add codec id for Realtek ALC268.
Hasso Tepper [Fri, 30 Nov 2007 07:47:44 +0000 (07:47 +0000)]
- Add codec id for Realtek ALC268.
- Add controller id for Intel 82801I (ICH9).
- MSI support, though commented out due to lack of support in DragonFly.

Obtained-from: FreeBSD

16 years ago- Merge input/microphone support for ASUS A8N-VMCSM series.
Hasso Tepper [Fri, 30 Nov 2007 07:41:28 +0000 (07:41 +0000)]
- Merge input/microphone support for ASUS A8N-VMCSM series.
- Defer flushing unsolicited response into taskqueue thread rather
  than handle it directly in interrupt handler, since few of its
  operations (like measuring/calibrating jack impedance) are quite
  expensive.
- Misc. debugging cleanups.

Obtained-from: FreeBSD

16 years agoFix no-sound issues with ASUS A9T notebook.
Hasso Tepper [Fri, 30 Nov 2007 07:38:39 +0000 (07:38 +0000)]
Fix no-sound issues with ASUS A9T notebook.

Note: The offending quirk should have been made model/codec specific,
but since there were no records / log which model requires it, the quirk
logic had to be inverted (blacklist instead of whitelist).

Obtained-from: FreeBSD

16 years agoHAMMER 9/many - btree removal cases, mount nohistory
Matthew Dillon [Fri, 30 Nov 2007 00:16:56 +0000 (00:16 +0000)]
HAMMER 9/many - btree removal cases, mount nohistory

Add a 'nohistory' mount option that will cause HAMMER to not retain any
history.  This option is primarily for testing of btree removal and hinted
radix tree bitmap frees and reallocations.

Flesh out the btree node removal code.  We don't try to rebalance the tree
yet but we do attempt to remove empty nodes.

Add workarounds for a GCC-4 bug involving overflow tests on integers.

16 years agoAdd support for Intel 7221's and 845M GMCH controllers.
Hasso Tepper [Thu, 29 Nov 2007 09:28:38 +0000 (09:28 +0000)]
Add support for Intel 7221's and 845M GMCH controllers.

Obtained-from: FreeBSD

16 years agoFixing a memory leak in xpt_release_device().
Peter Avalos [Thu, 29 Nov 2007 03:57:25 +0000 (03:57 +0000)]
Fixing a memory leak in xpt_release_device().

Obtained-from: FreeBSD

16 years agoDo not initialize path variable with useless value just before
Peter Avalos [Thu, 29 Nov 2007 03:40:09 +0000 (03:40 +0000)]
Do not initialize path variable with useless value just before
xpt_create_path overwrites it anyway.

Obtained-from: FreeBSD

16 years agoMake sure we look at the correct sub op codes when
Peter Avalos [Thu, 29 Nov 2007 03:31:15 +0000 (03:31 +0000)]
Make sure we look at the correct sub op codes when
deciding whether it's an operation we can perform
via the control device.

Obtained-from: FreeBSD

16 years agoProtect against dividing by zero.
Peter Avalos [Thu, 29 Nov 2007 03:10:24 +0000 (03:10 +0000)]
Protect against dividing by zero.

Obtained-from: FreeBSD

16 years agoavoid use after free
Peter Avalos [Thu, 29 Nov 2007 02:56:42 +0000 (02:56 +0000)]
avoid use after free

Obtained-from: FreeBSD

16 years agoavoid use after free
Peter Avalos [Thu, 29 Nov 2007 02:41:21 +0000 (02:41 +0000)]
avoid use after free

Obtained-from: FreeBSD

16 years agoFix a problem with the cd(4) driver -- the CAMGETPASSTHRU ioctl wouldn't
Peter Avalos [Thu, 29 Nov 2007 02:32:43 +0000 (02:32 +0000)]
Fix a problem with the cd(4) driver -- the CAMGETPASSTHRU ioctl wouldn't
succeed if there was no media in the drive.

For now, check the ioctl group to decide whether to check for media or not.
(We only need to check for media on CD-specific ioctls.)

Obtained-from: FreeBSD

16 years agoAdd "report only" functionality to 'camcontrol format', so users can get a
Peter Avalos [Thu, 29 Nov 2007 01:57:29 +0000 (01:57 +0000)]
Add "report only" functionality to 'camcontrol format', so users can get a
report on the status of a format already running on a drive.

Obtained-from: FreeBSD

16 years agoFix a place where we were referencing a pointer after it had been freed.
Peter Avalos [Thu, 29 Nov 2007 01:48:15 +0000 (01:48 +0000)]
Fix a place where we were referencing a pointer after it had been freed.

Obtained-from: FreeBSD

16 years agoRestore queue depth settings across tag disable events. The system often
Peter Avalos [Thu, 29 Nov 2007 01:32:16 +0000 (01:32 +0000)]
Restore queue depth settings across tag disable events.  The system often
disables tag queuing temporarily in order to allow controllers a window
to safely perform transfer negotiation with non-compliant devices.  Before
this change, CAM would restore the queue depth to the controller specified
maximum or device quirk level rather than any depth determined by reactions
to QUEUE FULL/BUSY events or an explicit user setting.

During device probe, initialize the flags field for XPT_SCAN_BUS.
The uninitialized value often confused CAM into not bothering to
issue an AC_FOUND_DEVICE async event for new devices.  The reason
this bug wasn't reported earlier is that CAM manually announces
devices after the initial system bus scans.

Obtained-from: FreeBSD

16 years agoTry to automatically scan and attach luns for modern storage
Peter Avalos [Wed, 28 Nov 2007 22:37:05 +0000 (22:37 +0000)]
Try to automatically scan and attach luns for modern storage
which has luns in the 0..1000 range, not 0..7.

Obtained-from: FreeBSD

16 years agoAgain, use offsetof() instead of a constant to enhance readability.
Peter Avalos [Wed, 28 Nov 2007 22:27:57 +0000 (22:27 +0000)]
Again, use offsetof() instead of a constant to enhance readability.

Obtained-from: FreeBSD

16 years agoUse offsetof() instead of a hard-coded constant for readability.
Peter Avalos [Wed, 28 Nov 2007 22:21:48 +0000 (22:21 +0000)]
Use offsetof() instead of a hard-coded constant for readability.

Round odd long inquiry lengths up so as to avoid tickling ignore
wide residue bugs in broken parallel SCSI devices running with a
wide transfer negotiation.

Obtained-from: FreeBSD

16 years agoAdd necessary data structures and definitions for the 12-byte SCSI
Peter Avalos [Wed, 28 Nov 2007 22:16:09 +0000 (22:16 +0000)]
Add necessary data structures and definitions for the 12-byte SCSI
commands READ_FORMAT_CAPACITIES, WRITE_AND_VERIFY, and VERIFY.

Obtained-from: FreeBSD

16 years agoRemove the camnet swi and CAM_PERIPH_NET. It has never been used, and
Peter Avalos [Wed, 28 Nov 2007 22:11:02 +0000 (22:11 +0000)]
Remove the camnet swi and CAM_PERIPH_NET.  It has never been used, and
given that network-over-scsi never really took off, there is little chance
that it will ever be needed.

Obtained-from: FreeBSD

16 years agoFix typo in comment.
Peter Avalos [Wed, 28 Nov 2007 21:55:59 +0000 (21:55 +0000)]
Fix typo in comment.

Obtained-from: FreeBSD

16 years agoWhen printing out an unknown sense code we should print it in hex, not
Peter Avalos [Wed, 28 Nov 2007 21:45:02 +0000 (21:45 +0000)]
When printing out an unknown sense code we should print it in hex, not
decimal.

Obtained-from: FreeBSD

16 years agoSync error messages w/ FreeBSD.
Peter Avalos [Wed, 28 Nov 2007 21:41:41 +0000 (21:41 +0000)]
Sync error messages w/ FreeBSD.

Obtained-from: FreeBSD

16 years agoMake the module return EOPNOTSUPP for unknown events.
Peter Avalos [Wed, 28 Nov 2007 21:29:18 +0000 (21:29 +0000)]
Make the module return EOPNOTSUPP for unknown events.

Obtained-from: FreeBSD

16 years agoWhitespace to make comments more legible.
Peter Avalos [Wed, 28 Nov 2007 21:20:25 +0000 (21:20 +0000)]
Whitespace to make comments more legible.

Obtained-from: FreeBSD

16 years agobzero the CCB header in getdevtree() and set the path properly, to
Peter Avalos [Wed, 28 Nov 2007 21:12:11 +0000 (21:12 +0000)]
bzero the CCB header in getdevtree() and set the path properly, to
avoid having random garbage in the CCB header.

if the lun isn't specified in a device specifier, it should default to
0, not whatever random data happens to be in the lun variable.

Obtained-from: FreeBSD

16 years agoCompare the *number* of patterns to zero, not the pointer to the patterns.
Peter Avalos [Wed, 28 Nov 2007 21:05:00 +0000 (21:05 +0000)]
Compare the *number* of patterns to zero, not the pointer to the patterns.

Obtained-from: FreeBSD

16 years agoSpelling fix in comment.
Peter Avalos [Wed, 28 Nov 2007 20:56:55 +0000 (20:56 +0000)]
Spelling fix in comment.

Obtained-from: FreeBSD

16 years agoSS_FATAL|ENXIO rather than SS_RDEF for illegal track mode.
Peter Avalos [Wed, 28 Nov 2007 20:55:37 +0000 (20:55 +0000)]
SS_FATAL|ENXIO rather than SS_RDEF for illegal track mode.

Obtained-from: FreeBSD

16 years ago- Factor out pcie_slotimpl() to check whether PCI Express slot is implemented.
Sepherosa Ziehau [Wed, 28 Nov 2007 11:35:40 +0000 (11:35 +0000)]
- Factor out pcie_slotimpl() to check whether PCI Express slot is implemented.
- Add external function to test whether PCI Express slot is implemented; this
  external function is sheer wrapper of pcie_slotimpl().
- Rename port type macros.
- Add some comment.
- Disable all hot-plug related interrupts on PCI Express root/downstream port.
  Add XXX comment about it.
Reminded-by: joerg@
16 years agoM_MCAST and M_BCAST are set before bridge_input() is executed, so use these
Sepherosa Ziehau [Tue, 27 Nov 2007 11:15:30 +0000 (11:15 +0000)]
M_MCAST and M_BCAST are set before bridge_input() is executed, so use these
two flags instead of conducting tests for them again.

16 years ago- Move IFF_UP checking to the beginning of ether_input().
Sepherosa Ziehau [Tue, 27 Nov 2007 11:06:31 +0000 (11:06 +0000)]
- Move IFF_UP checking to the beginning of ether_input().
- Move ethernet multicast/broadcast destination testing to ether_input(),
  before IFF_MONITOR testing.
- Use ETHER_IS_MULTICAST macro to test ethernet multicast/broadcast address.

Obtained-from: FreeBSD

- Nuke no longer needed 'pre_stats' label.
- In ether_input(), assert that the input mbuf contains pkthdr.

16 years agoHAMMER 8/many - A-list, B-Tree fixes. As-of queries
Matthew Dillon [Tue, 27 Nov 2007 07:48:52 +0000 (07:48 +0000)]
HAMMER 8/many - A-list, B-Tree fixes.  As-of queries

Fix numerous bugs in the A-list and B-Tree code, and a few other
calculations.  The maximum volume size had to be reduced to 8192 TB due
to an overflow in the A-list radix calculation.

Implement as-of name lookups using an @@<delta_seconds_old> name extension.
This is temporary.  Implelment as-of mounts.

16 years agoMake fixes to the A-list initialization and properly allocate records
Matthew Dillon [Tue, 27 Nov 2007 07:44:38 +0000 (07:44 +0000)]
Make fixes to the A-list initialization and properly allocate records
from the end of the cluster backwards.

16 years agoInitialize idx_ldata - a forward iterator for allocating large (16K) data
Matthew Dillon [Mon, 26 Nov 2007 21:39:09 +0000 (21:39 +0000)]
Initialize idx_ldata - a forward iterator for allocating large (16K) data
blocks.

16 years agoHAMMER 7/many - deletions, overwrites, B-Tree work.
Matthew Dillon [Mon, 26 Nov 2007 21:38:37 +0000 (21:38 +0000)]
HAMMER 7/many - deletions, overwrites, B-Tree work.

Fix numerous tag-ends related to file deletions and overwrites and get the
B-Tree insertion algorithm working properly.  Also get the memory cache
squared away, particularly when dealing with temporary files.

16 years agoFor ip_lengthcheck():
Sepherosa Ziehau [Mon, 26 Nov 2007 11:43:09 +0000 (11:43 +0000)]
For ip_lengthcheck():
- Centralize check failure processing.
- Set the passed in mbuf pointer to NULL, if check fails, so that callers won't
  need to do that.

16 years agoUse m_freem() instead of m_free()
Sepherosa Ziehau [Mon, 26 Nov 2007 11:05:58 +0000 (11:05 +0000)]
Use m_freem() instead of m_free()

16 years agoUse m_freem() to free the whole mbuf chain.
Sepherosa Ziehau [Mon, 26 Nov 2007 10:55:42 +0000 (10:55 +0000)]
Use m_freem() to free the whole mbuf chain.

Confirmed-by: hsu@
16 years agoAllow for any baud rate within a range rather than having a fixed list of
Hasso Tepper [Mon, 26 Nov 2007 10:52:33 +0000 (10:52 +0000)]
Allow for any baud rate within a range rather than having a fixed list of
rates.

Obtained-from: OpenBSD

16 years agoHAMMER 6/many - memory->disk flush, single-cluster sync to disk, more vnops.
Matthew Dillon [Mon, 26 Nov 2007 05:03:11 +0000 (05:03 +0000)]
HAMMER 6/many - memory->disk flush, single-cluster sync to disk, more vnops.

Get most operations within a single 64M cluster working.  There are still
numerous issues with the B-Tree algorithms so readbacks generate bad data at
the moment.

16 years agoCatch vkernel divide-by-0 traps a bit earlier so they are reported properly.
Matthew Dillon [Mon, 26 Nov 2007 04:14:01 +0000 (04:14 +0000)]
Catch vkernel divide-by-0 traps a bit earlier so they are reported properly.

16 years agoDrop into DDB if the vkernel hits a floting point exception (SIGFPE).
Matthew Dillon [Mon, 26 Nov 2007 03:57:58 +0000 (03:57 +0000)]
Drop into DDB if the vkernel hits a floting point exception (SIGFPE).

16 years agoDon't be so chatty when performing manual sense.
Peter Avalos [Mon, 26 Nov 2007 02:50:04 +0000 (02:50 +0000)]
Don't be so chatty when performing manual sense.

Obtained-from: FreeBSD

16 years agoIn camperiphdone(), make sure we check for fatal errors and bail out
Peter Avalos [Mon, 26 Nov 2007 02:24:49 +0000 (02:24 +0000)]
In camperiphdone(), make sure we check for fatal errors and bail out
instead of retrying them blindly.

Obtained-from: FreeBSD

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