Commit Graph

706 Commits

Author SHA1 Message Date
Stanislaw Gruszka
db1399ff87 Bugfix: put initiator reference counter when finish task management.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@356 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-24 09:31:02 +00:00
Stanislaw Gruszka
9252bb3170 Synchronize with Feral CVS repository:
- use kthread
- MBOX_ACQUIRE macro redefined


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@355 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-24 06:34:08 +00:00
Stanislaw Gruszka
1b384e9234 Remove unnecessary variables.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@354 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-23 11:17:33 +00:00
Stanislaw Gruszka
6d004ffe91 - Compile time conditinal debug.
- Initialize variable.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@353 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-23 09:23:43 +00:00
Stanislaw Gruszka
8cfda488ba - Avoid tmd's leakage when disable target mode when pending I/O (some work still
needed in low level driver).
- Properly free channels on error case.
- Start HBA unregistation after proc file is removed.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@352 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-23 09:15:14 +00:00
Vladislav Bolkhovitin
be9a66547f Fixed wrong state assigmnent in scst_xmit_response()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@351 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-22 15:04:09 +00:00
Vladislav Bolkhovitin
925fbcdda3 The bunch of pending changes. Sorry, it's quite big.
- "RECEIVE DIAGNOSTIC RESULTS" command handling fixed
 - Obtaining device queue parameters in scst_obtain_device_parameters() changed to handle NOT READY sense
 - Fixed possible dev_cmd_count underflow
 - Minor iSCSI-SCST connection closing cleanups and fixes
 - Semantic of other *_atomic flags changed a bit. Now they are intended only to allow SCST to optimize execution context. The corresponing functions now can *always* be called on atomic context and, if necessary, should manually determine that using scst_cmd_atomic() function and restart using corresponding *_NEED_THREAD_* return value.
 - scst_cmd_get_tgt_resp_flags() and SCST_TSC_FLAG_STATUS flag made obsolete and replaced by scst_cmd_get_is_send_status(). All in-tree drivers updated accordingly
 - Cleanup: preprocessing_done_atomic removed, now preprocessing_done() callback always called on thread context
 - 64-bit cleanups
 - Documented that iscsi-scst-adm is currently broken and explained why
 - In user space Makefile's added possibility to specify external linker flags
 - Minor performance optimizations
 - Other minor cleanups


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@350 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-22 10:30:53 +00:00
Stanislaw Gruszka
56382c20ac Type fix.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@349 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-21 17:37:43 +00:00
Stanislaw Gruszka
9be327002c Remove not necessary headers and definitions.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@348 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-21 17:34:42 +00:00
Vladislav Bolkhovitin
0480442bed Fixes compilation brokenness on kernels below 2.6.24
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@347 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-21 16:34:55 +00:00
Vladislav Bolkhovitin
eaf21084d9 Added possibility to create virtual removable devices
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@346 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-21 15:04:10 +00:00
Stanislaw Gruszka
9696649c7c Limit scatter/gather table size (need to be reviewed).
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@345 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-21 10:45:22 +00:00
Stanislaw Gruszka
1399e8e64c - bug fix: pass error to scst_rx_data
- set transfer length for SPI transport
- add unlikely()/likely()
- print error when don't know what to do with tmd


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@344 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-21 10:37:35 +00:00
Stanislaw Gruszka
c921c18c13 Remove obsolete kernel_thread and use kthread API.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@343 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-21 10:31:16 +00:00
Stanislaw Gruszka
5b11d67e24 Change proc interface to SCST like. Allow to enable/disable each lun for SPI device.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@342 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-21 10:27:59 +00:00
Stanislaw Gruszka
a437da7b02 Logout implementation, reference counting to protect initiator data.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@341 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-21 08:36:14 +00:00
Vladislav Bolkhovitin
72528747b3 Forgotten in r338 patches
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@340 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-21 07:01:13 +00:00
Vladislav Bolkhovitin
d1598c4d3c More svn:ignore fixes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@339 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-18 16:42:10 +00:00
Vladislav Bolkhovitin
25b29b701a Update for 2.6.25
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@338 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-18 16:38:39 +00:00
Vladislav Bolkhovitin
fa84d540ef scsi_tgt.h renamed to scst.h
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@337 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-17 17:35:37 +00:00
Vladislav Bolkhovitin
b95fae3220 - Fixes scst_user brokennesses in various modes, especially in iSCSI-SCST
- Minor debug logging fixes
 - Minor cleanups


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@336 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-17 15:25:39 +00:00
Stanislaw Gruszka
67ea9c1d0a Remove unintended change from r334, added there only for testing TM.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@335 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-11 08:18:02 +00:00
Stanislaw Gruszka
83c63625e6 Fixes for task management:
- abort only tasks from initiator, which send TM function
- check LUN for LUN_RESET function
- schedule tasklet to free aborted command from tmd's queue
- call scst_tgt_cmd_done() to free aborted command from SCST


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@334 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-11 07:34:07 +00:00
Vladislav Bolkhovitin
c3a77a0d45 Critical fix:
- Fixes hang on HEAD OF QUEUE commands under high load


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@333 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-10 10:57:30 +00:00
Stanislaw Gruszka
aaa202a398 Fix bug when checking tmd flags against bidirectional transfer.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@332 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-08 09:11:10 +00:00
Stanislaw Gruszka
21850b4dca Pass expected transfer length and direction to SCST for fibre channel devices.
Fix bug when using SCST_DATA_UNKNOWN insted of SCST_DATA_NONE.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@331 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-08 06:47:30 +00:00
Stanislaw Gruszka
94eeba176d We need only 2 debug level, one for error situations, second for normal
data flow. Print only in debug mode about sense buffer cutting.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@330 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-04 12:18:00 +00:00
Stanislaw Gruszka
5523441b4b Document changes about how to enable/disable target.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@329 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-04 12:02:20 +00:00
Stanislaw Gruszka
c4c19fa17f Fix bug when enabling target on nonzero channel.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@328 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-04 11:57:40 +00:00
Stanislaw Gruszka
19827957bb Fix bugs introduced in r325 and r324.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@327 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-04 11:53:01 +00:00
Stanislaw Gruszka
adb98e77c3 Remove trailing whitespaces.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@326 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-04 11:49:19 +00:00
Stanislaw Gruszka
16717c2bc9 Implement multichannel support in the way each channel is seen by SCST
as separate HBA.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@325 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-04 11:48:28 +00:00
Stanislaw Gruszka
be3bbaa220 Fix HBA registration / unregistration:
- not acknowledge when fail to register
- unregistration when no one can call functions from HBA


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@324 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-04 11:26:53 +00:00
Stanislaw Gruszka
09b77a6eeb Do not dump stack when data length is bigger than low level driver can handle.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@323 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-04 11:17:49 +00:00
Stanislaw Gruszka
f9af070111 Print error when we can not send all sense data (which is very unlikely).
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@322 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-01 13:51:07 +00:00
Stanislaw Gruszka
ca650f2bb6 Add missed things from Feral CVS repository.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@321 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-01 12:04:34 +00:00
Stanislaw Gruszka
802ee69a76 Stop setting command expected values for SCST,
as we can not assure values are right.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@320 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-01 07:14:26 +00:00
Stanislaw Gruszka
a5fb49273f - Update copyrights.
- Substitute scsi_tdebug to debug.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@319 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-01 06:47:11 +00:00
Stanislaw Gruszka
dd108f6edb Remove obsolete linux stuff.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@318 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-01 06:38:55 +00:00
Stanislaw Gruszka
2152c7ad20 Synchronize with Feral CVS repository:
- define an IS_1020 macro
- more dma mask cleanups


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@317 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-03-28 13:03:31 +00:00
Stanislaw Gruszka
e9b645432d Synchronize with Feral CVS repository:
- Make pre-1240 cards be able to do 64 bit dma as well, making sure that
  they don't cross a 16MB boundary.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@316 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-03-28 13:01:38 +00:00
Stanislaw Gruszka
ec367bff87 Synchronize with Feral CVS repository:
- remove the poorly thought out isp_in_intr goop


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@315 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-03-28 13:00:26 +00:00
Stanislaw Gruszka
d2303505f5 Synchronize with Feral CVS repository:
- Make FC_SCRATCH_ACQUIRE a macro that returns true/false
- Fixes from Stanislaw for 2.6.23 & 2.6.24. Many thanks.
- A quick hack to isp_kthread to use waitqueues instead of semaphores
  to have less blockage. More rewrites later


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@314 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-03-28 12:58:58 +00:00
Stanislaw Gruszka
d558c6d867 Synchronize with Feral CVS repository:
- Do some whitespace changes. Solaris related compilation fix. Remove
  XS_SET_STATE_STAT macro.
- Remove XS_SET_STATE_STATE macro.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@313 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-03-28 12:47:37 +00:00
Stanislaw Gruszka
c8998a3608 Synchronize with Feral CVS repository:
- update 24xx firmware to 4.03.00


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@312 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-03-28 12:44:16 +00:00
Stanislaw Gruszka
b3cbdff958 Synchronize with Feral CVS repository:
- whitespace and other minor fixes
- Remove F/W crash dump support. We only worked it out for 2200 and 2300
  cards. It's also true that QLogic would not support us even if we *did*
  give them a crash dump, so the usage here is not really worth it.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@311 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-03-28 12:42:36 +00:00
Stanislaw Gruszka
e9d1b2f52a Synchronize with Feral CVS repository:
- simplify: remove f/w crashdump stuff


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@310 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-03-28 12:38:10 +00:00
Stanislaw Gruszka
8ec477fea4 Synchronize with Feral CVS repository:
- Use a slightly cleaner macro.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@309 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-03-28 12:35:40 +00:00
Stanislaw Gruszka
7d98059854 Synchronize with Feral CVS repository:
- whitespace


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@308 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-03-28 12:33:36 +00:00
Stanislaw Gruszka
c2d9a1310f Synchronize with Feral CVS repository:
- Allow different platforms/environments to specificy the size of the
  high and low private storage for tmd_cmd_t structures
- Add a scan scsi thread event so that we can attach devices as we
  discover them
- Fix some tabs
- Make things work correctly when CONFIG_FW_LOADER is *not* defined
- Get rid of sema and use wait_interruptible


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@307 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-03-28 12:31:35 +00:00