Files
scst/mpt
Vladislav Bolkhovitin ecb27e7444 Patch from Bart Van Assche <bart.vanassche@gmail.com>:
The patch below fixes the checkpatch complaints on kfree():
WARNING: kfree(NULL) is safe this check is probabally not required

This patch has been verified as follows:
- Verified that checkpatch does no longer complain about kfree().
- Verified that make -s clean && make -s iscsi scst && make -s -C srpt
  still works and does not trigger any new compiler warnings.
- Checked that the patch generated by generate-kernel-patch still applies
  cleanly to the 2.6.25.4 kernel, and that the patched kernel tree still
  compiles, installs and boots fine, and that the iscsi-scst, ib_srpt,
  scst_disk and scst_vdisk modules still load.

Note: I'm not sure any of the above verifications did trigger the code paths
changed by this patch.

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@402 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-29 17:24:18 +00:00
..
2006-12-13 11:42:59 +00:00

Target driver for LSI/MPT XXX cards
===================================

Version X.X.X, XX XXX 200X
--------------------------

This driver was originally developed by Hu Gang and then is developed by
Erik Habbinga <erikhabbinga@inphase-tech.com>. It is on the early stage
of development.

The current maintainer of this driver is Erik. Please send him all
question related to it (CC: scst-devel@lists.sourceforge.net).

This driver tested only on Linux kernel versions 2.6.15.x.

Building from the Linux kernel tree
-----------------------------------

To build from the kernel tree, you should:

1. Link drivers/message/fusion/mpt_scst to $(SCST_DIR)/mpt.

2. Copy or link Makefile and Kconfig from $(SCST_DIR)/mpt/in-tree to
$(SCST_DIR)/mpt (Makefile will be replaced).

3. Patch drivers/message/fusion/Makefile and
drivers/message/fusion/Kconfig by diffs from $(SCST_DIR)/mpt/in-tree

4. Correct in drivers/message/fusion/Makefile SCST_INC_DIR variable so
it points to correct directory with SCST include files.

Building outside the Linux kernel tree
--------------------------------------

Edit Makefile, comment there line 

obj-$(CONFIG_FUSION_SCST) += mpt_scst.o

and uncomment line

obj-m += mpt_scst.o

Notes on implementation
-----------------------
The driver takes the mptstm target driver implemented by LSI
and ports it to the SCST architecture.

The LSI hardware returns an error when it realizes that command
status and sense data cannot be sent in the same transaction.
This happens during non-packetized SCSI command handling (not FC or
SAS).  For SCSI implementations, the driver speculatively caches
sense data.  If the hardware reports that the sense data could not
be sent, the driver will return the cached sense data without
involving SCST if the next command is REQUEST SENSE.  Cached sense
data is discarded on bus reset or if the next command after sense
send failure was not REQUEST SENSE.

Caching sense data in this fashion probably won't work in a tagged
command queuing environment.  If SCSI hardware is being used, the
driver inspects responses to the INQUIRY command and clears the
BQUE and CMDQUE bits in the standard INQUIRY response to disable
tagged command queuing.