Commit Graph

19 Commits

Author SHA1 Message Date
Vladislav Bolkhovitin
eec2a571dd - Fixed minor problem in iSCSI-SCST
- Important reference counting and barriers usage cleanups
 - Sense buffer made dynamic
 - Other minor improvements and cleanups
 - Docs updates


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@287 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-13 17:15:47 +00:00
Vladislav Bolkhovitin
af933af991 - Version protection added
- Cleanups


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@249 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-01-24 11:52:01 +00:00
Vladislav Bolkhovitin
d33edb6ba3 Simple bugfix for concurrent work of several targets, which eventually turned out in a massive cleanup and fixes.
Particularly:
 - Added ability for target drivers to set result of command's status delvery to initiator (see scst_set_delivery_status())
 - Added ability for user space devices set some mode page parameters to make SCST core behave correspondingly
 - TM improvements
 - Few possible crashes fixed
 - Logging improvements
 - Performance improvements
 - Docs updates


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@227 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-12-07 17:00:42 +00:00
Vladislav Bolkhovitin
4f79d58a3c - Patch from Aravind Parchuri <aravind.parchuri@gmail.com> with some my modifications:
* Allows LSI MPT target driver to compile on kernels >2.6.15
   * Changes the way how gettid() syscall gate implemented
 - Small doc update


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@189 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-09-19 09:19:29 +00:00
Vladislav Bolkhovitin
581cb5cd4f Support for per-target default security groups added
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@120 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-05-31 17:10:55 +00:00
Vladislav Bolkhovitin
d2536357bc From Erik Habbinga:
This patch fixes a race condition where a pointer to the just-finished SCST command would interfere with the incoming target
command.

Also, printing out TargetStatusSendReq IOCStatus is now done in debug/tracing mode if we're a SCSI device and the expected "error" case for attempting to send simultaneous status and sense is triggered.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@86 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-02-02 12:26:50 +00:00
Vladislav Bolkhovitin
a2d3812550 From Erik Habbinga:
- corrects the amount of data transferred when cached sense data is used to satisfy a REQUEST SENSE command.

- removes support for non scatterlist buffers in scst_cmd (sg_cnt == 0).



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@81 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-01-18 10:59:48 +00:00
Vladislav Bolkhovitin
73a0c8b152 From Erik Habbinga: added note on REQUEST SENSE implementation
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@79 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-01-16 17:51:48 +00:00
Vladislav Bolkhovitin
c7b6d79352 From Erik Habbinga:
This patch further fixes sense handling for the LSI driver in the non-packetized SCSI case:

- this version doesn't crash if a REQUEST SENSE command is sent.
- added a big comment explaining sense caching implementation.
- INQUIRY responses are inspected and tagged command queuing bits are cleared if LSI is a SCSI controller, per previous discussions.
- pending sense is cleared on a bus reset.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@78 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-01-16 14:23:44 +00:00
Vladislav Bolkhovitin
4a6c891705 Minor tracing cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@76 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-01-11 12:46:22 +00:00
Vladislav Bolkhovitin
5f81d67e70 Patch from Erik Habbinga:
There are a few minor changes:

- fix some 80 char line length issues
- fix some indenting
- change scst_to_dma_dir to scst_to_tgt_dma_dir

The big issue is fixing the sending of sense data.  The LSI chip, when talking to a non-packetized SCSI initiator, cannot send both
status (i.e. check condition) and sense data (from autosense) in the same transaction.  The result is a 006B
(MPI_IOC_STATUS_TARGET_STS_DATA_NOT_SENT) IOCStatus value when this is attempted.  The sense data doesn't get transmitted over the
SCSI cable in this case.  My fix, which is modeled on LSI's own SCSI target implementation, is to cache sense data before attempting
to send it.  If a REQUEST SENSE command comes in with pending sense, the LSI driver will handle the REQUEST SENSE command on it's
own without involving SCST.  Pending sense is cleared once the REQUEST SENSE command is handled, or if any other command comes in.
Sense data is cached per initiator.  Apparantely this problem is only related to non-packetized SCSI interfaces.  That's all I have
to test with, so I can't vouch for SAS or FC.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@75 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-01-11 12:39:10 +00:00
Vladislav Bolkhovitin
dc7b5d8684 From Erik Habbinga:
This patch allows reading and writing of the LSI SCSI target id via /proc/scsi_tgt/mpt_scst/x (where x is the controller number). Reading that file dumps various statistics as before:

# cat /proc/scsi_tgt/mpt_scst/0
ProductID        :0x020b (LSI53C1030)
Target Enable    :True
Target ID        :3
Capabilities     :0x7087fa0
PhysicalInterface:0x30000fe
Configuration    :0x3000800
OnBusTimerValue  :0x0
TargetConfig     :0x1
IDConfig         :0x0
PortFlags        :0x2000000
PortSettings     :0x37020000
  Device 00: 0x7087fa0, 0x0
  Device 01: 0x7087fa0, 0x0
  Device 02: 0x7087fa0, 0x0
  Device 03: 0x7087fa0, 0x0
  Device 04: 0x7087fa0, 0x0
  Device 05: 0x7087fa0, 0x0
  Device 06: 0x7087fa0, 0x0
  Device 07: 0x7087fa0, 0x0
  Device 08: 0x7087fa0, 0x0
  Device 09: 0x7087fa0, 0x0
  Device 10: 0x7087fa0, 0x0
  Device 11: 0x7087fa0, 0x0
  Device 12: 0x7087fa0, 0x0
  Device 13: 0x7087fa0, 0x0
  Device 14: 0x7087fa0, 0x0
  Device 15: 0x7087fa0, 0x0

Writing "target_id:n" will change the SCSI target id to n.


# echo "target_id:5" > /proc/scsi_tgt/mpt_scst/0
# cat /proc/scsi_tgt/mpt_scst/0
ProductID        :0x020b (LSI53C1030)
Target Enable    :True
Target ID        :5
Capabilities     :0x7087fa0
....


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@68 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2006-12-20 17:53:41 +00:00
Vladislav Bolkhovitin
ba4f29ee54 Update to allow SCST built inside Linux kernel. Done together with Erik Habbinga.
--This line, and below, will be ignored--

_M   trunk/mpt
_M   trunk/mpt/in-tree
M    trunk/mpt/in-tree/Makefile.diff
M    trunk/mpt/mpt_scst.c
M    trunk/mpt/Makefile
M    trunk/qla2x00t/qla2x00-target/qla2x00t.c
M    trunk/scst/kernel/in-tree/Makefile.scsi_tgt
D    trunk/scst/include/scst_debug.c
M    trunk/scst/include/scst_debug.h
M    trunk/scst/src/scst_proc.c
M    trunk/scst/src/scst_priv.h
A    trunk/scst/src/scst_debug.c
M    trunk/scst/src/scst_targ.c
M    trunk/scst/src/scst_mem.c
M    trunk/scst/src/Makefile
M    trunk/scst/src/scst.c
M    trunk/scst/src/dev_handlers/scst_cdrom.c
M    trunk/scst/src/dev_handlers/scst_modisk.c
M    trunk/scst/src/dev_handlers/scst_changer.c
M    trunk/scst/src/dev_handlers/scst_fileio.c
M    trunk/scst/src/dev_handlers/scst_tape.c
M    trunk/scst/src/dev_handlers/scst_disk.c
M    trunk/scst/src/dev_handlers/scst_processor.c
M    trunk/scst/src/dev_handlers/scst_raid.c
M    trunk/scst/src/dev_handlers/Makefile
M    trunk/scst/src/dev_handlers/scst_dev_handler.h
M    trunk/scst/README


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@62 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2006-12-15 15:59:21 +00:00
Vladislav Bolkhovitin
f1e2c33ac7 /proc implementation moved to seq_*() library. Mostly done by Ming Zhang.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@57 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2006-12-14 17:08:46 +00:00
Vladislav Bolkhovitin
f375c2e756 Various changes and fixes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@56 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2006-12-14 16:22:29 +00:00
Vladislav Bolkhovitin
b4d0d03e63 Kernel version specified
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@53 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2006-12-14 10:13:51 +00:00
Vladislav Bolkhovitin
e5843199f2 Building from the Linux kernel tree added
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@51 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2006-12-13 12:16:11 +00:00
Vladislav Bolkhovitin
7209d4b37f Minor cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@50 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2006-12-13 11:51:41 +00:00
Vladislav Bolkhovitin
58c3c9893a LSI/MPT target driver added
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@49 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2006-12-13 11:42:59 +00:00