Commit Graph

287 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
Stanislaw Gruszka
f657ae2e93 Prevent to compile broken driver
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@286 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-13 16:28:35 +00:00
Stanislaw Gruszka
98eea4d65e Let's isp_scst.c compile, multichannel support will be added later.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@285 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 11:52:00 +00:00
Stanislaw Gruszka
11d433ade4 Synchronize with Feral CVS repository:
Clean up MSI-X implementation and make sure we snag at least *3* vectors
so that the ATIO-Q vector is snagged.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@284 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 11:10:16 +00:00
Stanislaw Gruszka
c5e240b44f Synchronize with Feral CVS repository:
- Add a missing MSI disable and provide for pre-2.6.8 kernels.
- Fix bugs- forgot to actually compile (shame on me).


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@283 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 11:08:06 +00:00
Stanislaw Gruszka
bdd6415a91 Synchronize with Feral CVS repository:
I don't know why I thought this would work- forcing a re-login to the fabric
controller just barfs.

Make down count reflect jiffies elapsed rather than depend on calls to
ISP_FC_RESCAN.

Shorten deadloop time default to 10 seconds.

At least enable MSI (if not MSI-X) for 24XX cards.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@282 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 11:05:04 +00:00
Stanislaw Gruszka
a090925a19 Synchronize with Feral CVS repository:
We can (somehow) get commands on an atio7 for which we've never had a PLOGI/PRLI.
How this happens, I don't know. Anyway, we stick a tentative entry in the PDB
and call the task thread to find the rest of the info. This includes, badly and
stupidly, searching for the N-port handle by asking the chip. Sometimes it's not
there. In that case, we terminate the command.

In restarting commands that arrive while we start up, have the watchdog
time call isp_task_thread- this gives us a bit of hysteresis.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@281 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 11:02:21 +00:00
Stanislaw Gruszka
ecd810bede Synchronize with Feral CVS repository:
- Need to include linux/vmalloc.h. Showed up on PPC port.
- Fix complaints about using an uninitialized pointer.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@280 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 10:59:43 +00:00
Stanislaw Gruszka
17be1044c5 Synchronize with Feral CVS repository:
Make 2100/2200 and 2300 cards also maintain a target mode port database.

For the 24XX, we have to find the IID, N-port handle and channel when we
get an ATIO7. For the other cards, we already have the channel and N-port
handle and Port IID of the initiator, but have to find the S_ID.

Do the isp_find_pdb_by_{sid,loopid} functions search backwards to minimize
search time.

Don't load fw images more than once per device type!


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@279 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 10:55:04 +00:00
Stanislaw Gruszka
2a806d5bb5 Synchronize with Feral CVS repository:
- Allow ISP_FC_GETDINFO callers to get target mode entries.
- Remove stray '`' from define and PPC is now working again.
- Fix a typo which had us loading 2322 f/w into a 2300. Oops.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@278 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 10:50:57 +00:00
Stanislaw Gruszka
ba3e4ca72f Synchronize with Feral CVS repository:
Put RISC_CODE define in the firmware files.

Use the Linux 2.6 firmware loader support if available. This saves
close to 700K of useless code getting loaded otherwise.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@277 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 10:48:35 +00:00
Stanislaw Gruszka
1d33858644 Synchronize with Feral CVS repository:
Set PCI-X and PCI-E readahead to what QLogic manuals recommend.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@276 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 10:46:32 +00:00
Stanislaw Gruszka
4bea275344 Synchronize with Feral CVS repository:
If we're in role=NONE, then make sure that isp_init code sets state to
INITSTATE anyway.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@275 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 10:44:49 +00:00
Stanislaw Gruszka
a13eae04d2 Synchronize with Feral CVS repository:
Note that asking for "prefer N-port and then Loop" with the 24XX seems to
cause the f/w to crash. So, don't do that.

Firmware crashes are now considered fatal and cause the HBA to be marked dead.

Now that we've avoided the f/w crash in isp_init_24xx, we can process
toplogy options.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@274 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 10:41:45 +00:00
Stanislaw Gruszka
c4b2403ead Synchronize with Feral CVS repository:
Add some code to do special IOCBs (that can just be ignored if they show
up as status IOCBs)- this is for some performance testing infrastructure.

Add some performance testing stuff.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@273 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 10:37:37 +00:00
Stanislaw Gruszka
81e3f89ae0 Synchronize with Feral CVS repository:
Don't use both WWNs in the ICB block unless they're not NAA==2. This makes us
more consistent with QLogic driver setups and thus more likely to fit into the
same zoning setups.

If we're getting a PDB and it's for the Fabric Controller, force a login
to it (just in case it logged out underneath us). Return 'not logged in'
for the 24XX in case the 24XX specific login state isn't in the range of
PLOGI_DONE to LOGGED IN.

Don't do local loop scans if we have more than one channel (NP-IV) and we're
in a FL-port topology- we just end up poking ourselves usually.

Make sure we set loopstate in a couple of places we missed so that we
try and get it again.

Add in the RESET DEVICE and ABORT COMMAND functions for the 24XX cards
(finally).

Fix a longstanding bug where were passing the wrong (off by one) output
pointer to isp_handle_other_response.

Change isp_async...ISPASYNC_CHANGE_NOTIFY to have N-port handle, nlstate and
reason included as we get these for free with PDB Changed stuff for the
24XX card. Eventually we should be able to edit single local PDB entry
states instead of doing a full eval.

Put in the put of a 24XX Task Management Function IOCB. There is no get because
the firmware doesn't return it when done- instead a status iocb is done.

There is no "FAST POST" flag for the 24XX- this is a NOACK flag which means
that there is no interrupt if all goes well.

Fix spelling mistakes.

In isp_add_wwn_entry, ahem, don't allocate PDB entries out of the 'rexerved
for chip' area.

Put more comments in as to why we're terminating an exchange (and make them
all ISP_LOGTINFO).

Add, finally, the correct handling for a QIN_NOTIFY_ACK for a task management
function- this means we construct a ct7_entry_t to get the firmware to send
an FC Response IU for it. So, finally LUN RESETS and TARGET RESETS and
ABORT TASK will actually work and, more importantly, be seen to be working
by initiators.

Fix WWN defaults/active generation and retrieval. It was broken.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@272 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 10:18:14 +00:00
Stanislaw Gruszka
798f5d1e5a Synchronize with Feral CVS repository:
Fix a comment typo. Force on HARD ADDRESS for the 24XX.

Fix retry on error case- most of the time we *don't* want to retry a command
sent back with TDFL_ERROR set- instead we want to set PARITY ERROR as a
CA condition and just FIN the cmd.

Comment for r270:

1. A major botch for local loop handling - we were never getting past loopid zero
in isp_scan_loop. Bad doggie!

2. *Do* scan our loopid- this seems to allow us to find entities which are there
and have a N-port handle that is identical to ours. I have no idea how the QLogic
sorts this out. At least, this is how it seems to work for the 24XX in local loop
mode.

Don't deadlock with the HBA lock when performing a rescan ioctl. Also,
mark the loop state as if we'd just received a PDB event- that way


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@271 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 10:02:35 +00:00
Stanislaw Gruszka
355bf5235d Synchronize with Feral CVS repository:
Fix a comment typo. Force on HARD ADDRESS for the 24XX.

Fix retry on error case- most of the time we *don't* want to retry a command
sent back with TDFL_ERROR set- instead we want to set PARITY ERROR as a
CA condition and just FIN the cmd.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@270 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 09:57:26 +00:00
Stanislaw Gruszka
f8e97ad7dd Synchronize with Feral CVS repository:
- fix comment


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@269 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 09:55:49 +00:00
Stanislaw Gruszka
609c5c6515 Synchronize with Feral CVS repository:
- Add ASYNC_RCV_ERR
- Allow LIP to have a (possible) channel.
- Update for some channel stuff.
- whitespace


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@268 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 09:53:27 +00:00
Stanislaw Gruszka
15d36dcaad Synchronize with Feral CVS repository:
- Clean up 24XX abort handling.
- Remove the response queue busy stuff and just have an in_intr flag to note
  interrupt recursion.
- Add a lower level error flag.
- Clarifiy a comment; make a definition for the 'no task' RX_ID.
- Change severity of f/w timeout message
- Do the wait for mbox0 clearing for 2312 cards > revision 1.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@267 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 09:51:21 +00:00
Stanislaw Gruszka
5373dc7666 Synchronize with Feral CVS repository:
- Make sure we set/clear TDFL_ERROR
- Make sure we set SENSE VALID when we do a synthetic CTIO that has status.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@266 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 09:43:44 +00:00
Stanislaw Gruszka
dc71cd464c Synchronize with Feral CVS repository:
Add unit attention injection. Fix some ridiculous Sense things.

Say why we couldn't pci register the driver.

Make isp_thread_event return an int if it fails to send the event. If it
fails to send the event, and this was for the 24XX card finding out the
initiator for a command, return the command with a BUSY status.

An N-port handle of zero is legal for a 24XX.

Add some more special N-Port handle definitions for 2K f/w.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@265 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 09:40:40 +00:00
Stanislaw Gruszka
4bfc86256a Synchronize with Feral CVS repository:
Warn about bogus sense data in isp_target_start_ctio. Remove some redundant
zero initializations.

Make more common and more useful the debug printouts for the
various target dma mapping routines.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@264 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 09:35:47 +00:00
Stanislaw Gruszka
3ce79239ac Synchronize with Feral CVS repository:
- Start checking for a couple of things for the type of SAN we're connected to.
- Remove restriction against 2.6.23.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@263 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 09:33:44 +00:00
Stanislaw Gruszka
94b2c5284a Synchronize with Feral CVS repository:
As of version 4.0.25 the vpindex is available for MID f/w on the 24XX
for ASYNC_CHANGE_NOTIFY in outgoing mailbox 3.

Per QLogic release notes, the immediate notify entry for the 24XX has
various other items of interest in it based upon the ELS code.

Per QLogic release notes, after 4.0.25 f/w the WWPN comes with the
PLOGI/PDISC/ADISC and LOGO ELS codes in the immediate notify structure.
This makes initiator WWN maintenance *way* easier.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@262 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 09:31:23 +00:00
Stanislaw Gruszka
4fa643c9f5 Synchronize with Feral CVS repository:
Hmm. Just in case INI_ANY and INI_NONE are not defined, define them here.
This is for the case of external software including isp_tpublic.h only.

Fix some misapplied flags.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@261 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 09:22:32 +00:00
Stanislaw Gruszka
698091ebcb Synchronize with Feral CVS repository:
Go for the gusto and merge multichan_development into the head branch. This
will break FreeBSD and NetBSD ports for a while (yawn) and solaris is dubious
anyway.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@260 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 09:18:28 +00:00
Stanislaw Gruszka
75428f7e2d Synchronize with Feral CVS repository:
- do not dereference a null pointer


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@259 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 09:11:30 +00:00
Stanislaw Gruszka
ac3090e2c9 Synchronize with Feral CVS repository:
Turn off, yet again, fast posting and RIO for 2200 cards. It just seems
to buggy in this driver to be used, and because of the age of the cards
not worth chasing down.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@258 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 09:08:33 +00:00
Stanislaw Gruszka
6a0dedb63d Synchronize with Feral CVS repository:
- whitespace


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@257 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 09:05:53 +00:00
Stanislaw Gruszka
bd61ebf496 Synchronize with Feral CVS repository:
-revert the part of 1.174 that stopped complaining about not finding
 fast posting handles.
-pull REPORT LUNS (and LUN INVENTORY MAY HAVE CHANGE CA condition) from
 multi-channel branch


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@256 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 08:58:04 +00:00
Stanislaw Gruszka
284d07c718 Synchronize with Feral CVS repository:
- clean up tpublic notes and change tmd_xfr_t to tmd_xact_t
- minor cleanups from mendocino


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@255 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-12 08:40:54 +00:00
Vladislav Bolkhovitin
2c7a042a89 Small typo noticed by Tomasz Chmielewski
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@254 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-08 16:20:27 +00:00
Vladislav Bolkhovitin
b1563d1ab0 Clustering statistic added
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@253 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-01 15:41:38 +00:00
Vladislav Bolkhovitin
17b8dd6a3a Forgotten in the previous commit kernel patches
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@252 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-02-01 10:33:47 +00:00
Vladislav Bolkhovitin
7d18a8a3e2 - Update to work on 2.6.24
- Minor cleanups


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@251 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-01-31 18:28:43 +00:00
Vladislav Bolkhovitin
d2d1b2ccf1 Web pages updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@250 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-01-24 12:21:45 +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
9847aa17ba - A bunch of minor, mostly stability related, fixes.
- Docs update


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@248 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-01-24 10:56:35 +00:00
Vladislav Bolkhovitin
87013ddcde Web pages updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@247 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-01-23 16:03:20 +00:00
Vladislav Bolkhovitin
1964293ff1 - Important iSCSI stability on connection close fixes.
- Latency measurements improvements
 - Minor improvements and logging changes


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@246 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-01-18 19:13:04 +00:00
Vladislav Bolkhovitin
7ab4d3e638 - Processing latency measurement facility added
- README updated
 - Minor fixes


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@245 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-01-14 18:21:01 +00:00
Vladislav Bolkhovitin
7412de833b Logging improvements
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@244 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-01-11 18:09:38 +00:00
Vladislav Bolkhovitin
0489f4287b - Fixed possible crash on SN slots overflow
- Docs updates
 - Other minor changes


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@243 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-01-11 10:03:48 +00:00
Vladislav Bolkhovitin
9fcc6e3a25 - Fixes two problems on connection closing, leading to crashes and memory corruptions
- Small logging improvements


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@242 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-01-04 17:29:58 +00:00
Vladislav Bolkhovitin
02ca798c81 Minor logging changes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@241 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-12-31 11:42:23 +00:00
Vladislav Bolkhovitin
e819486311 - Fixed huge iSCSI RFC violation, inherited from IET: incorrect commands ordering.
- TM fixes related to new commands serialization
 - Other TM improvements
 - Minor changes: likely/unlikely and priority of mgmt threads

Work not fully completed, still there are some rare issues.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@240 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-12-29 17:04:13 +00:00
Vladislav Bolkhovitin
1eb68c6f22 - Broken VERIFY commands fixed (hopefully; compile tested only)
- Mistyped spin_lock() instead spin_lock_bh() fixed
 - DEBUG_TM and small logging improvements
 - Docs update


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@239 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-12-24 19:22:02 +00:00
Vladislav Bolkhovitin
d0dcc1a584 Patches from Arne Redlich <agr@powerkom-dd.de>:
1. The kernel's log level is a string, so strcmp needs to be used for
comparisons.

2. Svn HEAD doesn't compile against kernel versions < 2.6.19 because
"bool" had its debut only in 2.6.19. Here's a quick fix.

3. Iscsi-scstd dies with SIGPIPE if run in foreground mode because the reading
end of the init_report_pipe is already closed in this mode.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@238 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-12-24 10:20:18 +00:00