summaryrefslogtreecommitdiffstats
path: root/sys/dev/isp/ispvar.h
Commit message (Collapse)AuthorAgeFilesLines
* This should enable 10160 support. As best as I can tell, the samemjacob2002-10-111-3/+6
| | | | | | | f/w as 12160 is used, and otherwise, this is just a single channel variant of the 10160. MFC after: 0 days
* Remove ISP_DMA_ADDR_T definition.mjacob2002-09-231-10/+17
| | | | | | | | Instead, based upon whether ISP_DAC_SUPPORTED is defined, typedef isp_dma_addr_t appropriately. If ISP_DAC_SUPPORTRED is defined, the DMA_WD2/DMA_WD3 macros do something useful, else they define to '0'.
* Remove STRNCAT (==>strncat) usage. Apparently I never read the manmjacob2002-09-061-1/+0
| | | | | | page correctly and it wasn't doing what I thought it was. Noticed by: Brooks Davis <brooks@one-eyed-alien.net>
* Add ISPASYNC_FW_DUMPED async event.mjacob2002-08-171-0/+3
| | | | add ISP_FW_NEWER_THAN macro- makes the code easier to read.
* Roll minor version. Add ISPASYNC_FW_RESTARTED async event. Addmjacob2002-06-161-4/+11
| | | | | | DEFAULT_FRAMESIZE && DEFAULT_EXEC_THROTTLE references. MFC after: 1 week
* Fix bus dma segment count to be based off of MAXPHYS, not BUS_SPACE_MAXSIZE.mjacob2002-04-041-3/+11
| | | | | | | | | | | | | | | | | | | | | | | 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
* Redo stuff for sparc64- primarily fix bus dma implementation. The endianmjacob2002-04-021-0/+4
| | | | | | | | | stuff was right, but the busdma stuff was massively not right. Didn't really test on ia64 or i386- don't have the former h/w and my FreeBSD-current disk is unwell right now. Hope that this is okay. MFC after: 1 week
* Limit fabric search to a default 256 entries. This will all go awaymjacob2002-03-211-1/+3
| | | | | | | | | | | | | | | | | | | soon because it's just getting harder and harder to find switches that correctly implement the GET ALL NEXT subcommands for the SNS protocol. Latch up result out pointer and set a busy flag when we're looking at the response queue. This allows for a cleaner way to make sure we don't get multiple CPUs trying to read the same response queue entries. Change how isp_handle_other_response returns values (clarity). Make PORT UNAVAILABLE the same as PORT LOGOUT (force a LIP). Do some formatting changes. MFC after: 0 days
* Add in support firmware crash dumps. Change CFG options to splitmjacob2002-02-171-2/+13
| | | | | | WWN into WWNN and WWPN. MFC after: 1 week
* + A variety of 23XX changes:mjacob2002-02-041-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Implement REDUCED INTERRUPT OPERATION usage form FC cards- this allows themjacob2002-01-031-1/+10
| | | | | | | | | | | | | | | | | 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
* Major restructuring for swizzling to the request queue and unswizzling frommjacob2001-12-111-21/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Implement a call to get the actual link data rate (if 23XX) so we canmjacob2001-10-011-1/+3
| | | | | | set whether it's a 2Gps or 1Gps link. MFC after: 1 week
* Add some more firmware revision macros. Add firmware attributes fieldmjacob2001-09-031-1/+7
| | | | | to fcparam structure. MFC after: 4 weeks
* Add 2 Gigabit Fibre Channel support (2300 && 2312 cards). This requiredmjacob2001-08-311-17/+42
| | | | | | | | | | some reworking (and consequent cleanup) of the interrupt service code. Also begin to start a cleanup of target mode support that will (eventually) not require more inforamtion routed with the ATIO to come back with the CTIO other than tag. MFC after: 4 weeks
* Fix a spelling error in a comment.mjacob2001-08-161-1/+1
|
* Redo how we manage SCSI device settings- have a 3rd flags (nvram) that recordsmjacob2001-07-301-9/+13
| | | | | | | | | either what's in NVRAM or what the safe defaults would be if we lack NVRAM. Then we rename cur_XXXX to actv_XXXX (these are the currently active settings) and the dev_XXX settings to goal_XXXX (these are the settings which we want cur_XXXX to converge to). Roll core minor.
* Firmware crashes handled in platform specific code (isp_async call).mjacob2001-07-041-3/+5
| | | | Fix longstanding silly buglet that left a hole in the debug log defines.
* Fix botch for state levels. Role minor release. Start adding code for amjacob2001-06-051-6/+7
| | | | | | 'force logout' path. MFC after: 4 weeks
* Spring MegaChange #1.mjacob2001-05-281-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ---- 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
* In order to save ourselves grief with the SUNPRO compiler undermjacob2001-03-141-19/+19
| | | | | | 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.
* More 32 to 16 bit handle stuff. Roll core minor version.mjacob2001-03-041-2/+2
|
* Fix a longstanding bug- we had the sense of what bit 14mjacob2001-02-231-1/+9
| | | | | | | | | | | | | | | for the ICB firmware options meant- *I* had taken it to mean that if you set it, Node Name would be ignored and derived from Port Name. Actually, it meant the opposite. As a consequence- change ICBOPT_USE_PORTNAME to the define ICBOPT_BOTH_WWNS- makes more sense. Fix wrong input bitmap for MBOX_DUMP_RAM command. Call ISP_DUMPREGS if we get a f/w crash. Add ISPCTL_RUN_MBOXCMD control command (so outer layers can run a mailbox command directly) and add a ISPASYNC_UNHANDLED_RESPONSE hook so outer layers can understand response queue entries we might not know about.
* Eliminate ISP2100_FABRIC- we always allow for fabric now. Add anmjacob2001-02-111-19/+86
| | | | | | | | | isp_iid_set/isp_iid for fibre channel- this is because we now fake a port database entry for ourselves. Add the additional loop states between LOOP_PDB_RCVD and LOOP_READY. Change and comment on a wad of Fibre Channel isp_control functions. Change and comment on some of the ISPASYNC Fibre Channel events.
* Add was_fabric_dev/fabric_dev tags to our local FC database structuremjacob2001-01-151-9/+45
| | | | | | | | | | | | | (so we can see rapidly whether something was a fabric device but is now gone). Add a tag which says what role this adapter should take. It can take on the value of None, Target, Initiator or Both. None is useful for warm failover purposes. Remove the ISP_CFG_NOINIT silliness since a role of "None" does this. Add a isp_lastmbxcmd tag to store the opcode for the last mailbox command used.
* ISPASYNC_PDB_CHANGED -> ISPASYNC_LOGGED_INOUT.mjacob2001-01-091-4/+3
|
* Add in Bill Sommerfeld's -Wformat stuff. Add a ISP_CFG_NOINIT optionmjacob2000-12-291-0/+7
| | | | to keep from completing initialization when isp_init is called.
* Add interrupt instrumentation. Change ISP_CFG_NPORT config option tomjacob2000-12-021-1/+11
| | | | | a set of options that allows specific loop, loop-only, nport, nport-only topology settings. Define a required macro for all platforms (USEC_SLEEP).
* Change some default macro usages/definitions/requirements.mjacob2000-10-121-11/+16
|
* some copyright cleanupsmjacob2000-09-211-6/+2
|
* various fixesmjacob2000-08-271-10/+15
|
* Rewrite for version 2.0. Some structural changes, but alsomjacob2000-08-011-34/+189
| | | | | a substantial amount of commenting about what each platform specific definitions are supposed to be.
* Remove obsolete isp_dogactive tag.mjacob2000-07-041-1/+1
|
* Add 8 bits of volatile mailbox busy mask- this will be the bitmask ofmjacob2000-06-271-3/+5
| | | | | | | | output mailbox values we want to get back out of the chip once a mailbox command is done. Add storage for the maximum number of output mailbox registers to the softc. Roll minor version number.
* Roll core minor version. Set ISP_MAX_LUNS to be off of new isp_maxlunsmjacob2000-06-181-11/+4
| | | | tag in softc.
* Roll core minor version. Change our 'fabdev' tag to 'loggedin'.mjacob2000-05-091-6/+6
|
* Roll minor version. Increase size (and add defines for) topology storage.mjacob2000-04-211-2/+9
|
* Add 12160 (Ultra3) defines. Add config option flag for forcing point-to-pointmjacob2000-02-111-5/+12
| | | | | | instead of FC-AL (2200 only). Approved: jkh@freebsd.org
* include public target mode functionsmjacob2000-01-151-0/+3
|
* Roll minor revision number and add a more finalized listmjacob2000-01-031-8/+7
| | | | of target mode related enums.
* Add Dual LVD bus (1280) supportmjacob1999-12-161-3/+10
|
* Fix some includes for when we (eventually) get target mode working again.mjacob1999-11-211-54/+77
| | | | | | | Role the core version minor number. Change the arguments to the dma setup function to use a u_int16_t for the output request loop pointer (truly amazing that this hasn't blown up in anyones face so far). Do some shuffling around of some items.
* Roll core version number. Do some stylistic changes. Ensure thatmjacob1999-10-171-112/+49
| | | | | | | | | | | the result queue length is never less than 64. Move (ick) temp port database used for post-LIP merging off the kernel stack and put it into the softc. Remove some target mode stuff which will come back later in a different file. Change how the list of outstanding commands are stored (now allocated at mailbox setup time to be just enough for the max for a specific HBA which can vary). Keep a rotating seed of the last index for this in the softc. Increase the count of active commands from 10 to 16 bits.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Clarify lun limits for FC && SCSI.mjacob1999-08-161-3/+16
|
* add 2200 f/w; fix botched definemjacob1999-07-051-2/+2
|
* Roll revision levels. Move DEFAULT_LOOPID definition to platform files.mjacob1999-07-021-40/+63
| | | | | | | | | | | | | | | | | | | | | | | Change some fcp parameter structures such that we can get the portid (24 bit value), get both node and port WWN, know whether we're on a fabric or not, note whether we've ever seen the loop up, and note the current state of the loop. Replace the isp_pdb_t structure in fcparams with a reduced cost structure that maintains a static relationship to 'Target', but can have the actual loop ID used change (in case, post LIP, we discover things have moved around). This also retains portid and node/port WWNs. This array gets larger if we have fabric support compiled in. Note special loop IDs that are invariate for this device- FL_PORT_ID (0x7e) which tells us if there's a fabric controller present, FC_PORT_ID and FC_SNS_ID (fabric controller port and fabric SNS server port). We don't use the latter two for anything. IDs above FC_SNS_ID up through 255 are available for mapping fabric devices to 'target' ids. Add in a config define to set FC full duplex mode. Add in a define to recognize the Qlogic 2200 boards. Add comments about ISPCTL commands. Add and change some ISPASYNC enumes.
* Bruce pointed out I was being silly with volatile.mjacob1999-06-241-5/+5
| | | | Submitted by: bde@freebsd.org
* Roll core minor number. Re-layout a lot of SCSI fields to accomodate multiplemjacob1999-05-111-21/+23
| | | | bus adapters.
* Change f/w revision to major,minor,micro version. Add in ISP1040C definition.mjacob1999-04-041-5/+8
|
OpenPOWER on IntegriCloud