Commit Graph

27 Commits

Author SHA1 Message Date
perry f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
keihan b8702f530b netbsd.org -> NetBSD.org
This was the last commit of this kind to src/sys, which is now totally
"NetBSD.org clean".  Thanks for the patiance, and sorry for all the commits.
2003-12-04 13:57:30 +00:00
wiz c5670263e0 Fix some typos. From Tom Cosgrove via jmc@openbsd. 2003-11-02 11:07:44 +00:00
mjacob 190eaf015f Various updates to sync with mainline code. Nothing of great significance
to NetBSD, yet.
2003-08-07 01:12:15 +00:00
mjacob 15332b558c Propagate iid && rxid when we're putting back an ATIO for FC.
Spelling fixes.
2003-03-03 20:54:12 +00:00
simonb 276fd1665c The Double-Semi-Colon Police. 2003-01-20 05:29:53 +00:00
wiz 7e681f7063 interrupt with two rs. 2003-01-06 13:04:54 +00:00
mjacob af03ded9f1 Some lint fixes. 2002-10-18 23:33:14 +00:00
mjacob 168ee5d9a6 keep target mode up to date. 2002-06-15 00:17:28 +00:00
mjacob 91f80cf3fc Implement F/W crashdumps for 2200 && 2300 cards (kernel compile option).
Distinguish between 2312 and 2300 cards (they *are* different). Enable
RIO (Reduced Interrupt Operation) for the LVD cards (hey- I've seen
batched completions of the 30 commands at a time with this,....)...

If we get a Port Logout on local loop topologies, we have to force the
f/w to log back in. The easiest way (for us) to do this is to force
a LIP. This also will wake up the disk that probably just had a f/w crash.

Implement mailbox 'continuations'- this allows interrupts to re-drive
a mailbox command if it's one that just essentially repeats the previous
mailbox command (e.g., f/w download). This saves a boatload of sleep/wakeup
twitches.

If we're not a 2300 and we're about to return with a 'bogus interrupt'- check
the semaphore register to be non-zero at all and outgoing mailbox 0- this
seems to be where some of the lost ISP1080 commands came from.
2002-02-21 22:32:40 +00:00
mjacob 219d22404b Major restructuring for swizzling to the request queue and unswizzling from
the response queue. Instead of the ad hoc ISP_SWIZZLE_REQUEST, we now have
a complete set of inline functions in isp_inline.h. Each platform is
responsible for providing just one of a set of ISP_IOX_{GET,PUT}{8,16,32}
macros.

The reason this needs to be done is that we need to have a single set of
functions that will work correctly on multiple architectures for both little
and big endian machines. It also needs to work correctly in the case that
we have the request or response queues in memory that has to be treated
specially (e.g., have ddi_dma_sync called on it for Solaris after we update
it or before we read from it).

One thing that falls out of this is that we no longer build requests in the
request queue itself. Instead, we build the request locally (e.g., on the
stack) and then as part of the swizzling operation, copy it to the request
queue entry we've allocated. I thought long and hard about whether this was
too expensive a change to make as it in a lot of cases requires an extra
copy. On balance, the flexbility is worth it. With any luck, the entry that
we build locally stays in a processor writeback cache (after all, it's only
64 bytes) so that the cost of actually flushing it to the memory area that is
the shared queue with the PCI device is not all that expensive. We may examine
this again and try to get clever in the future to try and avoid copies.

Another change that falls out of this is that MEMORYBARRIER should be taken
a lot more seriously. The macro ISP_ADD_REQUEST does a MEMORYBARRIER on the
entry being added. But there had been many other places this had been missing.
It's now very important that it be done.

For NetBSD, it does a ddi_dmamap_sync as appropriate. This gets us out of
the explicit ddi_dmamap_sync on the whole response queue that we did for SBus
cards at each interrupt.

Set things up so that platforms that cannot have an SBus don't get a lot of
the SBus code checks (dead coded out).

Additional changes:

Fix a longstanding buglet of sorts. When we get an entry via isp_getrqentry,
the iptr value that gets returned is the value we intend to eventually plug
into the ISP registers as the entry *one past* the last one we've written-
*not* the current entry we're updating. All along we've been calling sync
functions on the wrong index value. Argh. The 'fix' here is to rename all
'iptr' variables as 'nxti' to remember that this is the 'next' pointer-
not the current pointer.

Devote a single bit to mboxbsy- and set aside bits for output mbox registers
that we need to pick up- we can have at least one command which does not
have any defined output registers (MBOX_EXECUTE_FIRMWARE).

Explicitly decode GetAllNext SNS Response back *as* a GetAllNext response.
Otherwise, we won't unswizzle it correctly.

Nuke some additional __P macros.
2001-12-14 00:13:44 +00:00
lukem a4bae8b066 add/cleanup RCSID 2001-11-13 13:14:31 +00:00
mjacob 9e2fd2fee9 Synchronize with FreeBSD/Linux. 2001-09-05 22:32:38 +00:00
mjacob 9f2c2c7a8c Keep up with the Joneses.... further synchronization for the eventual
implementation in NetBSD for target mode.
2001-05-16 03:58:03 +00:00
mjacob ad454c818c Keep up with the Joneses: sync with common core target mode code. Eventually
we'll do something with it here.
2001-04-05 02:28:17 +00:00
mjacob 98381c7a2d ANSIfy source. 2001-03-14 05:44:46 +00:00
mjacob 928cef6eb8 Clean up license && copyright a tad. ct_reserved should now be more
properly called ct_syshandle.
2001-03-14 05:01:54 +00:00
wiz c8b0b91e7e Fix pathnames in comment. 2000-12-23 01:37:57 +00:00
mjacob ed05406b77 Add a maintenance note 2000-08-14 07:11:14 +00:00
mjacob 0dc8c1fb35 Remove ispcmd_slow routine- SCBUSACCEL routine will set/clear tag/wide/sync.
Make some changes about where some things sit in the softc.
2000-08-08 22:58:30 +00:00
mjacob 068c76fc80 Core version 2.0 (platform version 1.0) rewrite of ISP driver. Some
interace cleanups, some new common functions. The major impact that
will be noticeable right away is that if you boot with not Fibre connected
to the FC cards, you no longer hang indefinitely.
2000-08-01 23:55:09 +00:00
mjacob 0615788781 zero result queue entry when done if debugging.
don't do an isp_notify_ack if we're not at run state.
2000-07-19 22:19:00 +00:00
mjacob 93778c19b8 pick up FreeBSD changes 2000-07-05 22:25:34 +00:00
he 084953b8f7 Update from Matthew Jacob:
Correctly account for F-port vs. F-port (no FLOGI_ACC) topologies.
  Make sure we get a port database entry for the fabric name server.
  Preserve fabric logins if the device didn't change across fabric
  or port database changes, or the device has already logged into
  us (e.g., for target/initiator dual role devices like Veritas
  SANbox). Propagate class 3 service parameter changes where devices
  can change roles.

  Fix all occurrences of setting a sendmarker so that setting it
  for one bus on dual bus cards doesn't wipe a pending sendmarker
  for other busses on the same card :-;.

  Comments added and clarifications made in some of the target mode code.
2000-05-13 16:53:03 +00:00
mjacob 8c2e6c73e3 Handle dual bus cases for immediate notify and enable lun commands. 2000-02-19 01:50:57 +00:00
mjacob 3f96822c3b some minor cleanups 2000-02-12 02:24:20 +00:00
mjacob dc86769bb7 Add in MI target mode code modules 2000-01-05 19:50:05 +00:00