History log of /freebsd-9.3-release/sys/dev/advansys/advlib.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 251164 30-May-2013 scottl

MFC 241492, 241588, 241589, 241590, 241592, 241593, 241603, 241605

Modernize and lock the aha, ahb, adv, adw, bt, and dpt drivers.

Submitted by: jhb
Obtained from: Netflix


# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 163896 01-Nov-2006 mjacob

2nd and final commit that moves us to CAM_NEW_TRAN_CODE
as the default.

Reviewed by multitudes.


# 163816 31-Oct-2006 mjacob

The first of 3 major steps to move the CAM layer forward to using
the CAM_NEW_TRAN_CODE that has been in the tree for some years now.

This first step consists solely of adding to or correcting
CAM_NEW_TRAN_CODE pieces in the kernel source tree such
that a both a GENERIC (at least on i386) and a LINT build
with CAM_NEW_TRAN_CODE as an option will compile correctly
and run (at least with some the h/w I have).

After a short settle time, the other pieces (making
CAM_NEW_TRAN_CODE the default and updating libcam
and camcontrol) will be brought in.

This will be an incompatible change in that the size of structures
related to XPT_PATH_INQ and XPT_{GET,SET}_TRAN_SETTINGS change
in both size and content. However, basic system operation and
basic system utilities work well enough with this change.

Reviewed by: freebsd-scsi and specific stakeholders


# 153072 04-Dec-2005 ru

Fix -Wundef.


# 146734 29-May-2005 nyan

Remove bus_{mem,p}io.h and related code for a micro-optimization on i386
and amd64. The optimization is a trivial on recent machines.

Reviewed by: -arch (imp, marcel, dfr)


# 139749 05-Jan-2005 imp

Start each of the license/copyright comments with /*-, minor shuffle of lines


# 119418 24-Aug-2003 obrien

Use __FBSDID().
Also some minor style cleanups.


# 111409 24-Feb-2003 obrien

Wrap the static endian functions to shutup GCC.


# 111342 23-Feb-2003 obrien

Add adv_adj_endian_qdone_info() & adv_adj_scsiq_endian()
so this at least compiles on big-endian machines.


# 110232 02-Feb-2003 alfred

Consolidate MIN/MAX macros into one place (param.h).

Submitted by: Hiten Pandya <hiten@unixdaemons.com>


# 67164 15-Oct-2000 phk

Remove unneeded #include <machine/clock.h>


# 59082 07-Apr-2000 nyan

Newbusify adv driver.

Reviewed by: imp


# 55945 14-Jan-2000 gibbs

adv_pci.c:
Update list of supported products.
Adjust probe message to include the ASC3030.

advansys.c:
Fix a long standing bug in the error recovery strategy. In order
to keep recovery simple, we freeze the SIMQ, stopping the XPT from
submitting new requests. Unfortunately, we also will freeze the
SIMQ if bus_dmamap_load blocks or we run out of controller resources.
On cards with limited resources it was possible to freeze the
SIM a second time and never unfreeze it. Now we more carefully
track our exception state so we never freeze the SIMQ more than
once.

Don't rely on pointers fitting in a 32bit field stored in the
per-transaction data structures on the card. Use an index to
an array of transaction mapping structures instead. This should
allow this driver to work on the Alpha.

Deal with the ASC3030 which is almost idistinguishable from the
ASC3050. Unfortunately the ASC3030 does not work at Ultra speeds,
so if we can't find an eeprom, we must assume that ultra is disabled.
The SIIG cards using the 3030 do not have eeproms. As a side effect,
we now honor the ultra disable bit in the eeprom if it is present.

Don't bother attempting to write corrected eeprom data back to the
eeprom. We can function just fine if the data is corrupted and
I'd rather not risk messing up the user's eeprom.

Modify the interrupt handler to catch latched external bus rests.

Dynamically determine the maximum number of S/G elements we can
map at a single time. The nature of the firmware interface for
these cards makes this value dependent on the number of "queues"
the card can support.

advlib.c:
advlib.h:
advmcode.c:
advmcode.h:
Synchronize with the latest firmware image released in the
Linux Advansys driver.


# 50477 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 46581 06-May-1999 ken

Add a number of interrelated CAM feature enhancements and bug fixes.

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)


# 45846 19-Apr-1999 gibbs

Handle the case when auto sense retrieval fails.
Give automatic request sense operations a 5 second timeout.


# 45575 11-Apr-1999 eivind

Staticize.


# 41591 07-Dec-1998 archie

The "easy" fixes for compiling the kernel -Wunused: remove unreferenced static
and local variables, goto labels, and functions declared but not defined.


# 40733 29-Oct-1998 gibbs

Correct the reporting of the queue full condition so that the XPT layer
can properly throttle tags.

Add diagnostic printfs for firmware result codes that we encounter but
don't know anything about.


# 40133 09-Oct-1998 gibbs

Only pull 16 bits of residual information from completing queues. This
is a work-around from an LRAM access bug on the 940UA. In a future
microcode revision, the high 16bits of residual information will be moved
to a safe location and we'll return to 32bit residuals. Since we only
allow 64KB I/O, 16bits is enough.


# 40027 07-Oct-1998 gibbs

Don't set the active flag on a transaction resource until it has been
queued.

Perform dma segment setup outside of splcam protection as this can take
some time and the protection is not necessary.

Inline a function.

Clean up some whitespace.


# 39505 20-Sep-1998 gibbs

Correct compilation with option DIAGNOSTIC set.

Upgrade to the latest firmware.


# 39217 15-Sep-1998 gibbs

Advance Systems SCSI Host Adapter driver for CAM. Currently only support
the 8bit SCSI AdvanSys products.


# 22975 22-Feb-1997 peter

Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not
ready for it yet.


# 21673 14-Jan-1997 jkh

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


# 19426 05-Nov-1996 gibbs

A little 80 column cleanup.


# 18782 07-Oct-1996 gibbs

This commit was generated by cvs2svn to compensate for changes in r18781,
which included commits to RCS files with non-trunk default branches.


# 18781 07-Oct-1996 gibbs

Advanced Systems Inc. SCSI Controller driver and ISA/VL front end.

I have only tested the ABP5140 card and only with a single CDROM drive
but it seems to work fine. This driver relies on features found only in
the SCSI branch so will not work in -current until those changes
are brought in. It also doesn't have any error handling code *yet*.
The goal is to use this driver as the development platform for the new
generic SCSI layer error recovery/handling code.

PCI and EISA front ends will show up as soon as I get my hands on
the cards. There are also a few issues in the driver that I need
to clear up with AdvanSys before I can suggest sticking one of
these cards in your server. 8-)

Thanks to AdvanSys for releasing this code under a suitable copyright.

Obtained from: Ported from the Linux driver writen by
bobf@advansys.com (Bob Frey).