Commit Graph

62 Commits

Author SHA1 Message Date
Peter Wemm
c447342094 Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"
is an application space macro and the applications are supposed to be free
to use it as they please (but cannot).  This is consistant with the other
BSD's who made this change quite some time ago.  More commits to come.
1999-12-29 05:07:58 +00:00
Kenneth D. Merry
273a1a3da7 Get rid of some trailing commas in enumerated types that cause gcc to
complain when some warnings are turned on.

Requested by:	Bertrand Petit <elrond@phoe.frmug.org>
1999-11-17 05:06:52 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Justin T. Gibbs
e414ac576f Bump CAM version number. 1999-08-16 23:18:24 +00:00
Justin T. Gibbs
bf8bb7acc0 Add another command characteristic flag for commands that are queued
on physical devices as oposed to just in the XPT.  This is used to
mark XPT_SCSI_IO, XPT_RESET_DEV, XPT_ENG_EXEC, XPT_TARGET_IO, and
XPT_CONT_TARGET_IO function codes.

Change tag_id and init_id to be u_int from u_int8_t.  Some topologies
supported by CAM support much larger ID and tag ID address spaces
than parallel SCSI.

Kill some unused fields in the IMMED_NOTIFY ccb type.
1999-08-16 22:14:47 +00:00
Justin T. Gibbs
8281556234 Rely on the statistics in XPT_GDEV_STATS instead of the versions still
retained in XPT_GDEV_TYPE for binary compatibility.  Mark the legacy
structure values for removal when we bump the major CAM revision.
1999-05-23 18:57:29 +00:00
Justin T. Gibbs
87cfaf0e1f Add the XPT_PATH_STATS and XPT_GDEV_STATS function codes. These ccb
types allow the reporting of error counts and other statistics.  Currently
we provide information on the last BDR or bus reset as well as active
transaction inforamtion, but this will be expanded as more information is
added to aid in error recovery.

Use the 'last reset' information to better handle bus settle delays.
Peripheral drivers now control whether a bus settle delay occurs and
for how long.  This allows target mode peripheral drivers to avoid
having their device queue frozen by the XPT for what shoudl only be
initiator type behavior.

Don't perform a bus reset if the target device is incapable of performing
transfer negotiation (e.g. Fiber Channel).

If we don't perform a bus reset but the controller is capable of transfer
negotiations, force negotiations on the first transaction to go to the
device.  This ensures that we aren't tripped up by a left over negotiation
from the prom, BIOS, loader, etc.

Add a default async handler funstion to cam_periph.c to remove duplicated
code in all initiator type peripheral drivers.

Allow mapping of XPT_CONT_TARGET_IO ccbs from userland.  They are
itentical to XPT_SCSI_IO ccbs as far as data mapping is concerned.
1999-05-22 21:58:47 +00:00
Kenneth D. Merry
9deea8574e 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)
1999-05-06 20:16:39 +00:00
Justin T. Gibbs
a89bb8b406 Add constants and macros for dealing with XPT opcode group types. 1999-03-05 23:13:20 +00:00
Justin T. Gibbs
9819265820 Expand the hba_misc fied in the Path Inquiry ccb to allow a controller driver
to specify that it does not provide initiator services (PIM_NOINITIATOR)
and that the initial bus reset for device probing should be avoided
(PIM_NOBUSRESET).

Modify the XPT layer to honor these flags.
1998-12-10 04:05:49 +00:00
Justin T. Gibbs
bb1f2fe47f Add a mechanism to send a non-tagged transaction even if a device is
currently operating in a tagged mode.  The SIM driver should determine
if a device is in tag mode by looking at the CAM_TAG_ACTION_VALID flag
in the ccb header.  If the flag is set, the tag_action field is either
a SCSI II tag message (simple, ordered, head) or CAM_TAG_ACTION_NONE
to specify that no tagging should be performed.
1998-10-15 23:17:35 +00:00
Justin T. Gibbs
8b8a9b1d3e CAM Transport Layer (XPT).
Submitted by:	The CAM Team
1998-09-15 06:33:23 +00:00