Commit Graph

706 Commits

Author SHA1 Message Date
Vladislav Bolkhovitin
0733627b2c Fixed depmod to work for the necessary kernel, not the current one
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@106 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-04-03 14:49:33 +00:00
Vladislav Bolkhovitin
3c1cf6c033 Parse() functions made generic
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@105 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-04-03 14:47:47 +00:00
Vladislav Bolkhovitin
3b449d4705 Copyrights updated, "-g" added in DEBUG mode
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@104 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-04-03 14:42:47 +00:00
Vladislav Bolkhovitin
d88d3897b5 Minor fixes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@103 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-04-02 10:55:55 +00:00
Vladislav Bolkhovitin
b61ab2848d - D_SENSE value corrected
- REPORT DENSITY SUPPORT command added


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@102 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-03-07 17:10:45 +00:00
Vladislav Bolkhovitin
8e69f4349a - BLOCKIO made async
- Docs updates

- Debug logging improvements


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@101 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-03-02 16:29:36 +00:00
Vladislav Bolkhovitin
5b4909133d Fixed case, when resid == cmd->resp_data_len for real devices
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@100 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-03-02 15:06:55 +00:00
Vladislav Bolkhovitin
e94515231d Mostly from Vu Pham:
- Use submit_bio() instead of generic_make_request

- Fixes case, when exported device blocksize >512

Seems, BLOCKIO works now, although the following not done yet:

1. BLOCKIO version vdisk_exec_verify(). It is basically the same as for the plain read, but it should read in own local data buffer and compare data with the command's ones, if requested.

2. There is a need for test on the underlying device with blocksize >512.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@99 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-02-28 12:55:35 +00:00
Vladislav Bolkhovitin
6e1cb95cce Minor cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@98 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-02-22 11:53:35 +00:00
Vladislav Bolkhovitin
873d818cb8 BLOCKIO doc updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@97 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-02-22 10:54:32 +00:00
Vladislav Bolkhovitin
b4faadac03 Minor fixes from/inspired by Vu Pham
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@96 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-02-22 10:34:18 +00:00
Vladislav Bolkhovitin
d175ce127d Adding blockio mode support to scst_vdisk
Signed-of-by: Vu Pham <huongvp@yahoo.com>

Merged by me.

Don't use it, currently it corrupts transferred data


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@95 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-02-21 18:15:19 +00:00
Vladislav Bolkhovitin
683431eb89 Rename FILEIO -> VDISK, part 2
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@94 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-02-21 16:44:59 +00:00
Vladislav Bolkhovitin
0faa1e3de3 Rename FILEIO -> VDISK, part 1
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@93 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-02-21 15:48:58 +00:00
Vladislav Bolkhovitin
8af49e310d Version 0.4.
- Support for partial data transfers added

 - Support asynchronous commands completions added

 - Few important notes added



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@92 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-02-21 15:09:25 +00:00
Vladislav Bolkhovitin
b3aaaed00d Execution context cleanup. Completed full support for SCSI task attributes (SIMPLE, ORDERED, etc.)
+ minor cleanups


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@91 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-02-21 12:50:48 +00:00
Vladislav Bolkhovitin
e5c4ac05f6 A major locking and general code cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@90 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-02-21 11:43:22 +00:00
Vladislav Bolkhovitin
76b6ad80ff Oops, the previous commit was wrong. Fix it.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@89 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-02-19 12:55:54 +00:00
Vladislav Bolkhovitin
48bf0d2bf7 Minor fix for ABORTed on SIRQ commands
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@88 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-02-19 10:46:53 +00:00
Vladislav Bolkhovitin
0c0c6850ac Update to work on 2.6.20 + minor fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@87 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-02-16 11:11:18 +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
d8bd3482e1 Here is a patch to the scstadmin script that solves my startup problems, when
initiator doesn't see the target and puts in the kernel log messages like that:

qla2300 0000:02:03.0: scsi(6:0:0): Abort command issued -- a 2002.
 6:0:0:0: scsi: Device offlined - not ready after error recovery
 6:0:0:0: rejecting I/O to offline device

All it does is move the enabling of target mode to the end of the
applyConfiguration subroutine. The key seems to be that target mode must
be enabled after SCST device and group assignments are configured. 

From Brad Johnson <bjohnson@proficientsolutionsinc.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@85 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-01-24 13:31:00 +00:00
Vladislav Bolkhovitin
a0867f49fc In Qlogic initiator driver (version 8.01.04) in qla2x00_rff_id() BIT_1 of the RFF_ID
Feature bits is set, indicating to the name server that this is an
initiator. The attached patch sets BIT_0 instead if target mode is
enabled, indicating target mode support to the name server. (See the
INCITS FC-GS-4 document). This fixed many of my problems relating to
working with a switch fabric, including the discovery and addition of
the initiator ports in the fcports list.

From Brad Johnson <bjohnson@proficientsolutionsinc.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@84 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-01-24 13:17:20 +00:00
Vladislav Bolkhovitin
c8a47b0753 Bugfix for Fedora 6 kernel where GFP_ATOMIC constant is redefined, which lead to massive commands data
buffers memory allocations failures.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@83 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-01-22 10:38:18 +00:00
Vladislav Bolkhovitin
cebd38b37e - shutdown_mutex was replaced by shutdown_compl in hope that it will
remove the lockdep's warning about "trying to register
 - Ability to trace SYNCHRONIZE_CACHE, FUA and ORDERED commands added to
FILEIO
 - NULLIO for FILEIO doesn't require anymore path to a real file/device


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@82 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-01-18 11:30:05 +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
13ef297e76 Minor TM-related fixes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@80 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-01-17 14:47:21 +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
4b84541a21 Some cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@77 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-01-12 15:42:31 +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
9bb1f8eefe Atomic memory barriers cleanup. Inspired by Ming Zhang.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@74 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-01-09 14:52:16 +00:00
Vladislav Bolkhovitin
a0ef0b8fb2 Minor fixes and cleanups from Ming Zhang:
- Fixed scst_cur_cmd_mem leak for real devices
 - Since scst_unregister_target_template() returnes void it should use down() instead of down_interruptible()
 - Cleanups


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@73 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-01-08 17:56:35 +00:00
Vladislav Bolkhovitin
b09e1e7d46 Call graphs from Ming
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@72 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-01-08 14:05:24 +00:00
Vladislav Bolkhovitin
046ffc3d09 A bunch of cleanups and minor fixes by Ming:
- Dead code removed from scst_prepare_space()
 - LUN and CDB check moved out of EXTRACHECKS section
 - Fixed error processing in scst_register_dev_driver(), scst_sgv_pools_init() and scst_register()
 - Since scst_unregister_dev_driver() returnes void it should use down() instead of down_interruptible()
 - Clean out scst_num_cpus
 - Fixed race in scst_register_target_template()


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@71 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2006-12-29 11:38:43 +00:00
Vladislav Bolkhovitin
c116ec22f4 SCST user space device handler. User space interface description. Version 0.3.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@70 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2006-12-28 11:10:22 +00:00
Vladislav Bolkhovitin
fc5236bf09 - Cleanup: masked_status deleted, use status instead
- In FILEIO report in MODE SENSE if NV_CACHE enabled that no commands reordering is possible


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@69 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2006-12-21 11:04:34 +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
3eb6d67674 This patch removes usage of bexx_to_cpu() on lba and len conversion, because possible unalined access, + some cosmetics. From Ming Zhang.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@67 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2006-12-19 18:07:56 +00:00
Vladislav Bolkhovitin
b3e2455cb2 Not debug compilation fixed
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@66 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2006-12-18 15:07:12 +00:00
Vladislav Bolkhovitin
59fb188c83 ChangeLog updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@65 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2006-12-15 16:49:15 +00:00
Vladislav Bolkhovitin
2348328a45 - Patch from Ming Zhang <blackmagic02881@gmail.com>:
Small patch to enhance the 2TB support. MS Windows only like a 12 byte
response. It seems to still follow the sbc2r10 spec instead of the r16
spec we use.

detailed info can be found at
http://sourceforge.net/mailarchive/forum.php?thread_id=31236894&forum_id=40837

 - Small cleanup


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@64 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2006-12-15 16:30:30 +00:00
Vladislav Bolkhovitin
c2fafc2cf2 Small cleanup to the prev. commit
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@63 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2006-12-15 16:14:04 +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
32c3fd4e19 - Minor cleanup
- Corrected definition PERSISTENT_RESERV_IN and PERSISTENT_RESERV_OUT


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@61 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2006-12-15 11:45:24 +00:00
Vladislav Bolkhovitin
0e04ac351a Update to work on 2.6.19. Mostly done by Ming Zhang.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@60 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2006-12-14 18:10:39 +00:00
Vladislav Bolkhovitin
bf30ca2c93 - First step to SCSI_ID support
- Set correct response data length for emulated commands.
Mostly done by Ming Zhang.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@59 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2006-12-14 17:53:01 +00:00
Vladislav Bolkhovitin
b4e6b71a90 Internal threads management reimplemented based on kthread*() API. Mostly done by Ming Zhang.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@58 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2006-12-14 17:50:57 +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