Commit Graph

15 Commits

Author SHA1 Message Date
Matt Jacob
f0f4c8ae4b Add a microcomment about how you'd use ispds64_t or ispdlist_t
for CTIO3/CTIO4 entries.
2001-07-04 18:51:06 +00:00
Matt Jacob
5d57194434 Spring MegaChange #1.
----

Make a device for each ISP- really usable only with devfs and add an ioctl
entry point (this can be used to (re)set debug levels, reset the HBA,
rescan the fabric, issue lips, etc).

----

Add in a kernel thread for Fibre Channel cards. The purpose of this
thread is to be woken up to clean up after Fibre Channel events
block things.  Basically, any FC event that casts doubt on the
location or identify of FC devices blocks the queues. When, and
if, we get the PORT DATABASE CHANGED or NAME SERVER DATABASE CHANGED
async event, we activate the kthread which will then, in full thread
context, re-evaluate the local loop and/or the fabric. When it's
satisfied that things are stable, it can then release the blocked
queues and let commands flow again.

The prior mechanism was a lazy evaluation. That is, the next command
to come down the pipe after change events would pay the full price
for re-evaluation. And if this was done off of a softcall, it really
could hang up the system.

These changes brings the FreeBSD port more in line with the Solaris,
Linux and NetBSD ports. It also, more importantly, gets us being
more proactive about topology changes which could then be reflected
upwards to CAM so that the periph driver can be informed sooner
rather than later when things arrive or depart.

---

Add in the (correct) usage of locking macros- we now have lock transition
macros which allow us to transition from holding the CAM lock (Giant)
and grabbing the softc lock and vice versa. Switch over to having this
HBA do real locking. Some folks claim this won't be a win. They're right.
But you have to start somewhere, and this will begin to teach us how
to DTRT for HBAs, etc.

--

Start putting in prototype 2300 support.  Add back in LIP
and Loop Reset as async events that each platform will handle.
Add in another int_bogus instrumentation point.

Do some more substantial target mode cleanups.

MFC after:	8 weeks
2001-05-28 21:20:43 +00:00
Matt Jacob
b5da7b232e Amazing. The bits to enable tagged queing in target mode, grok that a
tag is active for an ATIO, and say that you want to reconnect with
a tag value in a CTIO have *never* been exercised until now. This lossage
derived from Solaris code where this stuff originally came from that is
about 7 years old. Amazing.

We now bundle the incoming tag (legal values are 0..256) as the low
16 bits of the ccb_accept_tio's at_tagid while we put the firmware
handle for this ATIO in the top 16 bits- define some macros to make
this cleaner.

Complete some Ansification.
2001-04-04 21:46:48 +00:00
Matt Jacob
f5a4462713 First cut of target mode swizzling for non-little endian machines.
It's probably wrong but it's a start.
2001-03-14 04:14:22 +00:00
Matt Jacob
5f5aafe1fc Switch to using 16 bit handles instead of 32 bit handles.
This is a pretty invasive change, but there are three good
reasons to do this:

1. We'll never have > 16 bits of handle.
2. We can (eventually) enable the RIO (Reduced Interrupt Operation)
bits which return multiple completing 16 bit handles in mailbox
registers.
3. The !)$*)$*~)@$*~)$* Qlogic target mode for parallel SCSI spec
changed such that at_reserved (which was 32 bits) was split into
two pieces- and one of which was a 16 bit handle id that functions
like the at_rxid for Fibre Channel (a tag for the f/w to correlate
CTIOs with a particular command). Since we had to muck with that
and this changed the whole handler architecture, we might as well...

Propagate new at_handle on through int ct_fwhandle. Follow
implications of changing to 16 bit handles.

These above changes at least get Qlogic 1040 cards working in target
mode again. 1080/12160 cards don't work yet.

In isp.c:
Prepare for doing all loop management in outer layers.
2001-03-02 06:28:55 +00:00
Matt Jacob
b0a3ba7e28 Fix at2_entry_t to reflect what the firmware actually writes (instead
of just deriving from SCSI at_entry_t). In this case, there is no
'suggested sense' for FC cards.
2001-02-27 00:14:39 +00:00
Matt Jacob
7325560821 add a couple off offset defines for ATIO2s 2000-12-28 23:27:54 +00:00
Matt Jacob
aa57fd6fa5 some copyright cleanups 2000-09-21 20:16:04 +00:00
Matt Jacob
69fbe07a2e Fix typo. Remove isp_tdebug (we'll use ISP_LOGTDEBUG2 in isp->isp_dblev
as a selector now). Change DFLT_CMD_CNT to a fixed amount for now.
2000-08-01 06:23:24 +00:00
Matt Jacob
482cf5c2e7 Add in some new IN_XXX and CT_XXXX flags in preparation
for the rototilling that !*$)~@!$_@*_(~@$*_(~@$*~@$*
Qlogic F/W changes will need.
2000-07-18 07:06:47 +00:00
Matt Jacob
d22fcb6b75 add "disable autodisconnect" flags 2000-06-18 04:44:41 +00:00
Matt Jacob
9dae880716 Some minor tweaklets. 2000-04-21 02:05:54 +00:00
Matt Jacob
b6f774e39b Fix ITDEBUG macro.
Approved: jkh
2000-02-15 00:54:26 +00:00
Matt Jacob
427469a4a8 cleanup 2000-01-15 01:48:24 +00:00
Matt Jacob
0615a54798 These are platform independent definitions for target mode support-
code gratefully borrowed from Patrick Stirling who did a lot of the
grunt work on this years ago. There are also some beginnings of
swizzle macros in case we go to a big endian machine. This is just
a first pass at this and is likely to change a bit over the next
2000-01-03 23:58:41 +00:00