Age | Commit message (Collapse) | Author |
|
ok jsing@
|
|
|
|
and cast arg to ulong.
OK jsg@ and krw@.
|
|
|
|
time a scsi_request is processed. Crude but effective until a more
elegant solution is found. This allows the boot drive to be found on
fibre channel booting machines.
ok jason@ deraadt@
|
|
order reversed, wrong modifiers. ok deraadt@ marco@ mickey@
|
|
|
|
Tom: I did not commit a couple of your changes.
i did not include some punctuation fixes (full stops, etc.)
mnemorable -> mnemonic: i decided memorable was probably better
instrunctions -> instruction: i kept the plural
|
|
|
|
wrt bogus identity assignments.
|
|
Add back in merged 'mhz' change.
Use A64 variants to initialize ULTRA2 or better && 1240 cards. If PAE
is ever implemented for *BSD, we'll be closer to being ready to go.
Add in a commented out example for how to adjust idelaytimer on 2300s.
If we have ISP_FW_CRASH_DUMP defined, then don't reinit the isp in
ISP_CONN_FATAL case- that's up to the platform outer layer to do after
it finishes saving a f/w crashdump.
Replaces STRNCAT with SNPRINTF.
|
|
Baloney gratuitous changes to comments w/o even a headsup to the author
will be reverted.
|
|
|
|
|
|
Don't whine if the name server returns "no such registered type"
when we ask it for all FC-SCSI objects.
Fix a few typos.
If we get a f/w crash, if ISP_FW_CRASH_DUMP is *not* defined, do
the isp_reinit inline, otherwise, let the platform isp_async
drive things. This is because, typically, the platform isp_async
will freeze things and wake up a thread to do the actual f/w
crash dump (really *can't* be done on the interrupt stack- the
23XX has one move on the order of 500KBytes of crash dump data).
Set up to handle default framsize && exec_throttle and iid/loopid
overrides.
If we're using ancient (pre 1.17.0) 2100 f/w (for the cards that cannot
load f/w images > 0x7fff words), set ISP_FW_ATTR_SCCLUN. We explicitly
don't believe we can find attributes if f/w is < 1.17.0, so we have to
set SCCLUN for the 1.15.37 f/w we're using manually- otherwise every
target will replicate itself across all 16 supported luns for non-SCCLUN
f/w.
Correctly set things up for 23XX and either fast posting or ZIO. The
23XX, it turns out, does not support RIO. If you put a non-zero value
in xfwoptions, this will disable fast posting. If you put ICBXOPT_ZIO
in xfwoptions, then the 23XX will do interrupt delays but post to the
response queue- apparently QLogic *now* believes that reading multiple
handles from registers is less of a win than writing (and delaying)
multiple 64 byte responses to the response queue.
At the end of taking a a good f/w crash dump, send the ISPASYNC_FW_DUMPED
event to the outer layers (who can then do things like wake a user
daemon to *fetch* the crash image, etc.).
|
|
vendors really don't like to support GET ALL NEXT, so we use a different,
larger memory footprint, method.
Split 2300/2312 support so we distinguish between the two.
Correctly identify that SCC Luns are 16384 luns for us, not 65536.
Turn on Reduced Interrupt Operation for LVD SCSI cards, which rocks.
Do 'mailbox continuations' in some cases- this batches repeated mailbox
commands so we don't have to wake the invokee until we're done with the
N thousand or so mailbox commands we needed to do.
Put in firmware dump code (optioned out for now- but there if needed to
capture issues for QLogic).
Fix a boatload of bugs- like handling cases of dropped frames that show
up as 'bogus' residuals (i.e., we get a a DATA UNDERRUN as reported by
the f/w, but there is no RESPONSE UNDERRUN in the FCP RSPNS IU, or the
residual is bogus- this led to a lot of silent data corruption cases).
|
|
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 OpenSD, 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. Now, because SBus/sparc doesn't use bus_dma, some
shenanigans were done to support this. But Jason was nice enough to test the
SBus/sparcv9 changes for me, and they did the right thing as well.
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.
|
|
Correct the # of output mailboxes for EXECUTE IOCB A64.
Comment out some redundant initialization to zero.
If we get ISP_QUEUES_FULL status, remember to actually set SCSI_QFULL
since the QLogic f/w, on some cards, doesn't do so. Grumble.
|
|
the target mode code.
|
|
Add support for 2 Gigabit cards (2300/2312). This necessitated a change
in how interrupts are down- the 23XX has not only a different place to check
for an interrupt, but unlike all other QLogic cards, you have to read the
status as a 32 bit word- not 16 bit words. Rather than have device specific
functions as called from the core module (in isp_intr), it makes more sense
to have the platform/bus modules do the gruntwork of splitting out the
isr, semaphore register and the first outgoing mailbox register (if needed)
*prior* to calling isp_intr (if calling isp_intr is necessary at all).
Rearchitect how regular SCSI parameters are stored or used.
|
|
ICBOPT_PORTNAME to ICBOPT_BOTH_WWNS as being more descriptive.
Change handles to 16 bits. Add ISPCTL_RUN_MBOXCMD control function.
|
|
isp_getmap helper function (for getting Loop Position map). Make
sure we (for our own benefit) mark req_state_flags with RQSF_GOT_SENSE
for Fibre Channel if we got sense data- the !*$)!*$)~*$)*$ Qlogic
f/w doesn't do so. Add ISPCTL_SCAN_FABRIC, ISPCTL_SCAN_LOOP, ISPCTL_SEND_LIP,
and ISPCTL_GET_POSMAP isp_control functions. Correctly send async notifications
upstream for changes in the name server, changes in the port database, and
f/w crashes. Correctly set topology when we get a ASYNC_PTPMODE event.
Quite massively redo how we handle Loop events- we've now added several
intermediate states between LOOP_PDB_RCVD and LOOP_READY. This allows us
a lot finer control about how we scan fabric, whether we go further
than scanning fabric, how we look at the local loop, and whether we
merge entries at the level or not. This is the next to last step for
moving managing loop state out of the core module entirely (whereupon
loop && fabric events will simply freeze the command queue and a thread
will run to figure out what's changed and *it* will re-enable the queu).
This fine amount of control also gets us closer to having an external
policy engine decide which fabric devices we really want to log into.
When resetting the Qlogic 2X00 units, reset the FPM (Fibre Protocol
Module) and FBM (Fibre Buffer Modules). Also remember to clear the
semaphore registers. Tell the RISC processor to not halt on FPM
parity errors.
Throw out the ISP_CFG_NOINIT silliness and instead go to the use of
adapter 'roles' to see whether one completes initialization or not
(mostly for Fibre Channel). The ultimate intent, btw, of all of this
is to have a warm standby adapter for failover reasons. Because
we do roles now, setting of Target Capable Class 3 service parameters
in the ICB for the 2x00 cards reflects from role. Also, in isp_start,
if we're not supporting an initiator role, we bounce outgoing commands
with a Selection Timeout error. Also clean out the TOGGLE_TMODE
goop for FC- there is no toggling of target mode like there is
for parallel SCSI cards.
Do more cleanup with respect to using target ids 0..125 in F-port
topologies. Also keep track of things which *were* fabric devices
so that when you rescan the fabric you can notify the outer layers
when fabric devices go away.
Only force a LOGOUT for fabric devices if they're still logged in
(i.e., you cat their Port Database entry. Clean up the Get All Next
scanning.
Finally, use a new tag in the softc to store the opcode for the
last mailbox command used so we can report which opcode timed
out.
|
|
wwn handling. Do a Register FC4 Type (so that we can work with McData
switches). Allow F-port topologies to use the target range 0..125 for
logging in fabric devices. We changed ISPASYNC_PDB_CHANGED to
ISPASYNC_LOGGED_INOUT and now use ISPASYNC_CHANGE_NOTIFY for both
loop && fabric events.
|
|
instrumentation for interrupts, specific topology preferences for
the 2200. Fix the hole in the OpenBSD port becuause there'd been
no maxluns limit from the midlayer and have the command routine
bounce commands > the maxluns for a particular controller (in
particular, Qlogic FC cards where we can't tell when it hasn't been
us that have loaded the F/W whether or not SCCLUN is in effect
or not).
|
|
Major rewrite of a lot of internals- far too many to list. Cleaner
locking, more paramaterization, an isp_prt logging function that
handles debugging as well as error printouts. We also should no
longer hang if there is no Loop for Fibre Channel when booting.
The file ispvar.h now contains a list of all platform required macros
and explanation as to what they're for. This should make maintenance
easier.
|
|
routines are not necessarily polled now- this should cut down on some of
the spurious lost commands that have occurred. Also, we now watchdog each
command and make sure that command constipation doesn't occur (which it
has been documented to do on the QLA2100 cards).
|
|
against targets < 129 if we're on a Public Loop- we can have those, yes.
Fix all the settings isp_sendmarker all throughout this file to OR in
the bus that we are trying to synchronize (e.g., after a bus reset)- this
way we don't wipe out pending sendmarker settings that haven't been done
yet.
|
|
wipe out the whole marker flag when a bus event happens on one channel- just
or in the channel that needs to have a marker sent. Correctly mark a
PORT CHANGED error with a 'selection timeout'.
|
|
Do some SNS fabric suppor tchanges. Roll revision levels. Tested on
GENERIC i386 && sparc.
|
|
so that a SCSIDEBUG kernel doesn't completely overrun the
console.
|
|
against f/w revision because we'll now use initiator only mode f/w
(if loading f/w) because we get more commands active in this case (and
avoid some apparent sloppiness wrt Qlogic's f/w release practices).
|
|
|
|
|
|
FABRIC support...
|
|
settings you've just sent them and return random values if you follow
the set by a get. This causes problems when you latter run a Tag-enabled
command when you've command tagged mode off.
|
|
|
|
|
|
|
|
|
|
|
|
|