summaryrefslogtreecommitdiffstats
path: root/sys/dev/isp/isp_inline.h
Commit message (Collapse)AuthorAgeFilesLines
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-061-1/+1
|
* Store the target handles in a separate list from normal commands. Add anjl2004-05-241-4/+61
| | | | | | CTIO fast post routine to handle CTIO completions. Submitted by: mjacob
* Some canonicalization function cleanups based upon some target modemjacob2003-09-131-13/+2
| | | | structure cleanups.
* Fix buglet in A64 CTIO3 structure copy.mjacob2002-09-231-1/+1
|
* 'Support' for ISP SBus cards.mjacob2002-07-111-0/+1
| | | | | | | | | | This code does not imply that SBus cards work yet. They hang for me. But I can't netboot the latest snapshot on my ultra1e, and things hang at bus_setup_intr time. Since I'm offline for a while, I thought I'd toss this in in case somebody else who has a bit better luck wants to fart around with it. Please try and wait until I get back to check things in.
* Force commit (last CVS comment was wrong).mjacob2002-06-161-1/+0
| | | | | Go back to *not* fully evaluating loop/fabric state if our role is ISP_ROLE_NONE.
* Add ISP_FC_GETHINFO ioctl.mjacob2002-06-161-1/+1
| | | | MFC after: 1 week
* Scale back # of luns supported for SCC to 16384- oops- top 3 bits are amjacob2002-04-161-0/+15
| | | | | | | | | | | | lun address modifier of sorts. Only an HP XP-512 seems to have cared. Fix a few misplaced pointers for the new fabric goop, which has been demonstrated to work on newer Brocades and McData switches now. Put in commented out code which would run GFF_ID if the QLogic f/w allowed it. Don't whine about not being able to find a handle for a command if it was a command aborted (by us).
* Send 32 bytes out for fc4_types... Interestingly enough the Solaris/Sparcmjacob2002-04-051-1/+1
| | | | | | version worked fine, but Linux/Sparc && FreeBSD/Sparc choked. MFC after: 1 week
* Fix bus dma segment count to be based off of MAXPHYS, not BUS_SPACE_MAXSIZE.mjacob2002-04-041-7/+120
| | | | | | | | | | | | | | | | | | | | | | | Grumble. I've seen better documented architectures out of Redmond. Redo fabric evaluation to not use GET ALL NEXT (GA_NXT). Switches seem to be trying to wriggle out of supporting this well. Instead, use GID_FT to get a list of Port IDs and then use GPN_ID/GNN_ID to find the port and node wwn. This should make working on fabrics a bit cleaner and more stable. This also caused some cleanup of SNS subcommand canonicalization so that we can actually check for FS_ACC and FS_RJT, and if we get an FS_RJT, print out the reason and explanation codes. We'll keep the old GA_NXT method around if people want to uncomment a controlling definition in ispvar.h. This also had us clean up ISPASYNC_FABRICDEV to use a local lportdb argument and to have the caller explicitly say that a device is at the end of the fabric list. MFC after: 1 week
* + A variety of 23XX changes:mjacob2002-02-041-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | disable MWI on 2300 based on function code, set an 'isp_port' for the 2312- it's a separate instance, but the NVRAM is shared, and the second port's NVRAM is at offset 256. + Enable RIO operation for LVD SCSI cards. This makes a *big* difference as even under reasonable load we get batched completions of about 30 commands at a time on, say, an ISP1080. + Do 'continuation' mailbox commands- this allows us to specify a work area within the softc and 'continue' repeated mailbox commands. This is more or less on an ad hoc basis and is currently only used for firmware loading (which f/w now loads substantially faster becuase the calling thread is only woken when all the f/w words are loaded- not for each one of the 40000 f/w words that gets loaded). + If we're about to return from isp_intr with a 'bogus interrupt' indication, and we're not a 23XX card, check to see whether the semaphore register is currently *2* (not *1* as it should be) and whether there's an async completion sitting in outgoing mailbox0. This seems to capture cases of lost fast posting and RIO interrupts that the 12160 && 1080 have been known to pump out under extreme load (extreme, as in > 250 active commands). + FC_SCRATCH_ACQUIRE/FC_SCRATCH_RELEASE macros. + Endian correct swizzle/unswizzle of an ATIO2 that has a WWPN in it. MFC after: 1 week
* Add missing move of relative offset for CTIO2 updates.mjacob2002-01-111-0/+1
|
* Implement REDUCED INTERRUPT OPERATION usage form FC cards- this allows themjacob2002-01-031-1/+19
| | | | | | | | | | | | | | | | | firmware to delay completion of commands so that it can attempt to batch a bunch of completions at once- either returning 16 bit handles in mailbox registers, or in a resposne queue entry that has a whole wad of 16 bit handles. Distinguish between 2300 and 2312 chipsets- if only because the revisions on the chips have different meanings. Add more instrumentation plus ISP_GET_STATS and ISP_CLR_STATS ioctls. Run up the maximum number of response queue entities we'll look at per interrupt. If we haven't set HBA role yet, always return success from isp_fc_runstate. MFC after: 2 weeks
* Explicitly decode GetAllNext SNS Response back *as*mjacob2001-12-111-0/+55
| | | | | | | a GetAllNext response. Otherwise, we won't unswizzle it correctly. This was found on linux/PPC. This mandated creating another inline: isp_get_gan_response.
* Major restructuring for swizzling to the request queue and unswizzling frommjacob2001-12-111-0/+1048
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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). It also has to handle the SBus cards (for platforms that have them) which, while on a Big Endian machine, do *not* require *most* of the request/response queue entry fields to be swizzled or unswizzled. 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. 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). MFC after: 2 weeks
* Macroize request/response in/out queue pointer access.mjacob2001-07-041-1/+1
|
* In order to save ourselves grief with the SUNPRO compiler undermjacob2001-03-141-59/+21
| | | | | | Solaris (which, for reasons unknown to me, chokes on u_int16_t as a typedef of unsigned short if used in a transitional (mixed K&R and ANSI) way), we'll go the extra mile and fully ANSIfy things.
* Switch to using 16 bit handles instead of 32 bit handles.mjacob2001-03-021-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix isp_print_qentry to print all four lines- it's been broken for months.mjacob2001-03-021-2/+3
|
* Add isp_fc_runstate function- this function's purpose is to, in stages,mjacob2001-02-111-0/+54
| | | | | | | | and depending on role, make sure link is up, scan the fabric (if we're connected to a fabric), scan the local loop (if appropriate), merge the results into the local port database then, check once again to make sure we have f/w at FW_READY state and the the loopstate is LOOP_READY.
* some copyright cleanupsmjacob2000-09-211-5/+2
|
* various fixesmjacob2000-08-271-4/+6
|
* Remove isp_prtstst (now in case statement in isp.c). Removemjacob2000-08-011-116/+47
| | | | | | | isp2100_fw_statename as an INLINE (now a function in isp.c). Remove isp2100_pdb_statename (unused). Redo all ISP_SCSI_XFER_T as XS_T types. Change all RQUEST_QUEUE_LEN/RESULT_QUEUE_LEN macros to take a parameter. Add isp_print_bytes function.
* Fix completely stupid and idiotiuc sprintfs in isp_inline.h withmjacob2000-07-041-36/+19
| | | | with the STRNCAT function.
* Add an isp_handle_index function- this is prepatory to loading more intomjacob2000-06-271-3/+15
| | | | | | | the handle (i.e., generation number), so we will now need a function that will take a handle and return a flat index [ 0 .. maxhandles-1 ] for auxillary routines that need an index to get at buddy store values (like dma maps or xflist pointers).
* tighten up printoutmjacob2000-01-151-4/+2
|
* oop, use PRINTF not printf in MI codemjacob2000-01-041-1/+1
|
* add isp_print_qentry inline functionmjacob2000-01-031-0/+23
|
* clean up sprintf and have buffer that won't overflowmjacob1999-12-031-34/+66
|
* Add a isp_getrqentry inline function (that is, find the next availablemjacob1999-11-211-0/+24
| | | | request queue entry if any are left).
* Add a file where inline functions for the Qlogic isp cards can go. This reducesmjacob1999-10-171-0/+220
duplication in all the platform specific header files.
OpenPOWER on IntegriCloud