commands are outstanding. You'd think they'd just clear the IDLE bit,
but alas, no. Delay until all pending mailbox commands have completed
in aha_cmd to work around this.
Report sync rates correctly on Fast Adaptec cards. Clones may still be
reported incorrectly since there is no documenation on how they report
extended sync values.
Clean up some unused fields in the aha softc.
docs don't seem to shed light on why this is needed, but reports from
the field indicate this helps prevent problems in this area. Ken's
changes seem to have exposed this bug, rather than caused it, as far
as I can tell.
Thanks to Jack O'Neill for tracking this down.
Submitted by: jack@germanium.xtalwind.net
Very strong 3.2 merge candidate.
some aha 1542B cards will return 0x7f for the unimplemented GEOMETRY
register.
This is a good 3.2 candidate.
PR: 11469
Submitted by: Thomas David Rivers
NOTE: These changes will require recompilation of any userland
applications, like cdrecord, xmcd, etc., that use the CAM passthrough
interface. A make world is recommended.
camcontrol.[c8]:
- We now support two new commands, "tags" and "negotiate".
- The tags commands allows users to view the number of tagged
openings for a device as well as a number of other related
parameters, and it allows users to set tagged openings for
a device.
- The negotiate command allows users to enable and disable
disconnection and tagged queueing, set sync rates, offsets
and bus width. Note that not all of those features are
available for all controllers. Only the adv, ahc, and ncr
drivers fully support all of the features at this point.
Some cards do not allow the setting of sync rates, offsets and
the like, and some of the drivers don't have any facilities to
do so. Some drivers, like the adw driver, only support enabling
or disabling sync negotiation, but do not support setting sync
rates.
- new description in the camcontrol man page of how to format a disk
- cleanup of the camcontrol inquiry command
- add support in the 'devlist' command for skipping unconfigured devices if
-v was not specified on the command line.
- make use of the new base_transfer_speed in the path inquiry CCB.
- fix CCB bzero cases
cam_xpt.c, cam_sim.[ch], cam_ccb.h:
- new flags on many CCB function codes to designate whether they're
non-immediate, use a user-supplied CCB, and can only be passed from
userland programs via the xpt device. Use these flags in the transport
layer and pass driver to categorize CCBs.
- new flag in the transport layer device matching code for device nodes
that indicates whether a device is unconfigured
- bump the CAM version from 0x10 to 0x11
- Change the CAM ioctls to use the version as their group code, so we can
force users to recompile code even when the CCB size doesn't change.
- add + fill in a new value in the path inquiry CCB, base_transfer_speed.
Remove a corresponding field from the cam_sim structure, and add code to
every SIM to set this field to the proper value.
- Fix the set transfer settings code in the transport layer.
scsi_cd.c:
- make some variables volatile instead of just casting them in various
places
- fix a race condition in the changer code
- attach unless we get a "logical unit not supported" error. This should
fix all of the cases where people have devices that return weird errors
when they don't have media in the drive.
scsi_da.c:
- attach unless we get a "logical unit not supported" error
scsi_pass.c:
- for immediate CCBs, just malloc a CCB to send the user request in. This
gets rid of the 'held' count problem in camcontrol tags.
scsi_pass.h:
- change the CAM ioctls to use the CAM version as their group code.
adv driver:
- Allow changing the sync rate and offset separately.
adw driver
- Allow changing the sync rate and offset separately.
aha driver:
- Don't return CAM_REQ_CMP for SET_TRAN_SETTINGS CCBs.
ahc driver:
- Allow setting offset and sync rate separately
bt driver:
- Don't return CAM_REQ_CMP for SET_TRAN_SETTINGS CCBs.
NCR driver:
- Fix the ultra/ultra 2 negotiation bug
- allow setting both the sync rate and offset separately
Other HBA drivers:
- Put code in to set the base_transfer_speed field for
XPT_GET_TRAN_SETTINGS CCBs.
Reviewed by: gibbs, mjacob (isp), imp (aha)
i386 platform boots, it is no longer ISA-centric, and is fully dynamic.
Most old drivers compile and run without modification via 'compatability
shims' to enable a smoother transition. eisa, isapnp and pccard* are
not yet using the new resource manager. Once fully converted, all drivers
will be loadable, including PCI and ISA.
(Some other changes appear to have snuck in, including a port of Soren's
ATA driver to the Alpha. Soren, back this out if you need to.)
This is a checkpoint of work-in-progress, but is quite functional.
The bulk of the work was done over the last few years by Doug Rabson and
Garrett Wollman.
Approved by: core
pnp system in freebsd, I'm not sure how useful this will be, but my
1542CP seems to work well in plug and play mode and does seem to
probe correctly at all the oddball addresses/irq/drqs that I tried.
[[
I was unable to get /kernel.conf or /kernel.config to read in, so
I wasn't able to verify that this method of userconfig works. that's
one thing that makes pnp so hard to use in the current scheme.
Pointers to the right new way of doing this accepted.
]]
o Add some kludges to maybe bring support for 1540A/1542A into the
driver. Since I have no 154xA cards, and the only person I know
that has them hasn't given me feedback, I'm making this commit
blind.
o Honor unit numbers that are in the config file now. This allows one
to hard wire the unit numbers (and have high unit numbers for plug
and pray devices, which can't seem to be hardwired) and have the
cards not migrate from aha1 -> aha0 should aha0 go on the fritz. I
didn't verify that hard wired scsi busses would work, but did verify
that hard wired aha addresses did work to a limited extent. Both
aha0 and aha1 must be hardwired, or when the card that was in aha0
goes away, the probe for aha0 might pick up the card that otherwise
would have been aha1.
pointed this out, but I've not seen a manifestation of this.
o Check against 0x00 as well as 0xff for geometry register, as some clone
cards don't return 0xff. Vadim Mikhailov pointed this out in PR
8743 for his Dell SCSI Array controller working in AHA-1540
emulation mode. Note that this test is likely to go away in the
future in favor of a better one Justin has recommended.
- For transactions of 0 length, us a non-residual checking CCB type.
- Preserve command status if our interrupt handler completes a command
while we are polling for completion in aha_cmd.
for possible buffer overflow problems. Replaced most sprintf()'s
with snprintf(); for others cases, added terminating NUL bytes where
appropriate, replaced constants like "16" with sizeof(), etc.
These changes include several bug fixes, but most changes are for
maintainability's sake. Any instance where it wasn't "immediately
obvious" that a buffer overflow could not occur was made safer.
Reviewed by: Bruce Evans <bde@zeta.org.au>
Reviewed by: Matthew Dillon <dillon@apollo.backplane.com>
Reviewed by: Mike Spengler <mks@networkcs.com>
cards. My machine didn't tickle this problem, so I can't tell if
it fixed anything or not. However, it didn't break my already working
1542-{B,C,CF,CP} probes.
o Minor comment correction
o Minor correction in printf
If the next available mailbox is not in the free state, print a warning
and handle the condition as a temporary resource shortage. The condition
should never happen, but we shouldn't panic since recovery is possible.
Convert from BT'isms to AHA'isms
Don't fail the probe if the illegal command bit is set in the status
register. If the BusLogic MultiMaster probe preceeded us, it may well
have determined that the card we are attaching to was not a true MultiMaster
by sending us a command that fails on the 154X.
Reset the adapter before doing the inquiry. This provides extra sanity
and will also clear the illegal command status bit that my be left over
from the MultiMaster probe.
bogus comment to proper place.
This should fix the hangs people are seeing under very heavy load, at
least it does for me. Please let me know if you continue to have
problems.
hasseen_isadev so this will be less noisy when conflicts do exist.
Also eliminate redundant warnings about conflicts.
Requested by: bde
Reviewed by: gibbs
o For bt and aha only probe the one I/O range if a specific I/O is specified
in the config file.
o Don't even try to probe I/O ranges that have been seen already.
o If we conflict with an IRQ or DRQ, then fail the probe.
Requested by: bde, gibbs
Approved by: jkh
o Use the board id command to find out what kind of board
we're talking to. If we're talking to a board that is has
an ID that is shared between boards supported by the aha
driver and the bt driver, then use the bt's geometry
register to weed out the bt cards. Otherwise assume that we
support this card.
o Remove bt esetup command sending to the card. It seems to
wedge too many cards.
o Revert to doing a soft reset after an invalid command. This
change didn't fix anything, so I'm backing it out. The
whole issue of card resetting needs to be revisisted at some
point so that we can do it properly on all hardware.
o GC unused stuff in some places.
o Unlock mailbox interface if we have a new card. Before only newer cards
(B or newer) that had the BIOS disabled would probe. Cards with the
BIOS enabled would fail to probe in the mailbox initialization code.
o Increase the number of ccbs and sg to 17 from 16 to support 64k I/O
on a non page aligned boundary. Ideas for dynamic determination of this
value welcomed, as more of these are better.
o Took credit for this driver, even though I derived it from Justin's code.
Made sure that Justin's copyright from bt.c was preserved, along with
his name, since the error handling code is nearly identical. Add my
own, identical copyright. Point people to aha_isa.c.
Cards tested: 1542C and 1542CF. The B and CP might work now as well,
but logistical problems precluded me from testing them this evening
(if you have jumper settings for the B card, please send me private
mail).