aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/isp
Commit message (Collapse)AuthorAgeFilesLines
* Add some SNS "Register FC4 type" subcommand defines. Add some definesMatt Jacob2001-01-091-1/+13
| | | | | | | | that are pertinetnt for state flags on Qlogic 2X00 status completion entries. Notes: svn path=/head/; revision=70824
* Up tsleep && poll time for mailbox commands from 2 to 10 seconds. PrintMatt Jacob2001-01-091-5/+9
| | | | | | | out the mailbox command opcode if the command times out. Notes: svn path=/head/; revision=70823
* Follow the ISPASYNC_PDB_CHANGED -> ISPASYNC_LOGGED_INOUT change. Also,Matt Jacob2001-01-091-2/+8
| | | | | | | ISPASYNC_NOTIFY_CHANGE now is for both local loop && fabric changes. Notes: svn path=/head/; revision=70822
* Add a isp_register_fc4_type function so that we work with McData switchesMatt Jacob2001-01-091-38/+107
| | | | | | | | | | | that require us to register our FC4 types of interest. Allow ourselves, in F-port topologies, to start logging in fabric devices in the target 0..125 range. Change ISPASYNC_PDB_CHANGED (misnamed) to ISPASYNC_LOGGED_INOUT. Fix (*SMACK*) again some default WWN stuff. This is *really* hard to get right across all the range of platforms. Notes: svn path=/head/; revision=70821
* add missing length argumentMatt Jacob2001-01-091-1/+1
| | | | Notes: svn path=/head/; revision=70820
* Fix problems with incomplete conversions from printf to isp_prt.Matt Jacob2000-12-311-5/+3
| | | | Notes: svn path=/head/; revision=70546
* Change the modification of what could be a const string. Apparently theMatt Jacob2000-12-301-3/+2
| | | | | | | | | | | | | | | | construct: char *foo; ... foo = "XXX"; ... foo[1] = 'Y'; is wrong. IT blew up on NetBSD-sparc64 because that platform write-protects constant strings. Notes: svn path=/head/; revision=70516
* Add in Bill Sommerfeld's -Wformat stuff. Add a ISP_CFG_NOINIT optionMatt Jacob2000-12-291-0/+7
| | | | | | | to keep from completing initialization when isp_init is called. Notes: svn path=/head/; revision=70490
* Add in Bill Sommerfelds -Wformat changes. Set up default node && portMatt Jacob2000-12-291-31/+35
| | | | | | | | | | | | WWNs correctly (Again!) - this time for the case that we're not going to fully init the adapter if isp_init is called (with ISP_CFG_NOINIT set in options). The pupose for this is to bring the adapter up to almost ready to go, get info out of NVRAM, but to not start it up- leaving it until later to actually start things up if wanted (and possibly with different roles selected). Notes: svn path=/head/; revision=70489
* Set up to do a local interrupt fielding before calling common code-Matt Jacob2000-12-291-8/+27
| | | | | | | allows us to grab lock as we should. Notes: svn path=/head/; revision=70488
* Make sure we do locking if we call isp_intr.Matt Jacob2000-12-291-1/+14
| | | | | | | Make sure we enter Giant for now if we call into cam for completion. Notes: svn path=/head/; revision=70487
* add a couple off offset defines for ATIO2sMatt Jacob2000-12-281-0/+3
| | | | Notes: svn path=/head/; revision=70457
* Convert more malloc+bzero to malloc+M_ZERO.David Malone2000-12-081-6/+3
| | | | | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Notes: svn path=/head/; revision=69781
* Only call ISP_UNLOCK/ISP_LOCK if isp->isp_osinfo.intsok in USEC_SLEEP.Matt Jacob2000-12-051-6/+10
| | | | | | | | | Add a test against isp->isp_osinfo.islocked prior to trying to see whether --isp->isp_osinfo.islocked is zero to cause us to unlock (non-SMPLOCK case). Notes: svn path=/head/; revision=69598
* Replace some more printfs with isp_prt's. Use isp_prt/ISP_LOGDEBUG0Matt Jacob2000-12-051-31/+31
| | | | | | | for rate setting/getting printouts. Notes: svn path=/head/; revision=69597
* Remove more printfs and use either isp_prt or device_printf. RememberMatt Jacob2000-12-051-34/+37
| | | | | | | to set ISP_LOGINFO if bootverbose is set. Notes: svn path=/head/; revision=69596
* More M_ZERO patches.David Malone2000-12-031-2/+1
| | | | | | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Approved by: mjacob Notes: svn path=/head/; revision=69557
* Add USEC_SLEEP macro support. Change the location at which we defineMatt Jacob2000-12-021-12/+17
| | | | | | | ISP_LOCK/ISP_UNLOCK macros. Notes: svn path=/head/; revision=69525
* Make the Not RESPONSE in RESPONSE QUEUE message have a bit more infoMatt Jacob2000-12-021-14/+36
| | | | | | | | | | | (specifically, how many entries we've looked at so far). Maintain interrupt instrumentation. Use USEC_SLEEP instead of USEC_DELAY in a number of places (this allows us to drop locks and sleep instead of spin). Track changes to configuration options for topology preference. Fix botched order of printout for Channel, Target, Lun. Notes: svn path=/head/; revision=69523
* Add interrupt instrumentation. Change ISP_CFG_NPORT config option toMatt Jacob2000-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). Notes: svn path=/head/; revision=69522
* I'm dropping the MAINTAINER request and see what happens. If it becomesMatt Jacob2000-10-311-2/+0
| | | | | | | | too hard for me to keep in sync with other platforms, FreeBSD will go it's own way. Notes: svn path=/head/; revision=68040
* Get rid of ridiculous ISP_PVS macro. Instead, just set anMatt Jacob2000-10-251-6/+7
| | | | | | | | ISP_SMPLOCK define based on the previous 5.4 major/minor release define of PVS- because this allows us to turn it off easier. Notes: svn path=/head/; revision=67550
* Whoops! Forgot to commit this when I committed the other (turnin on locks)Matt Jacob2000-10-251-13/+26
| | | | | | | change. Sorry about that. Notes: svn path=/head/; revision=67549
* Catch up to moving headers:John Baldwin2000-10-201-1/+1
| | | | | | | | - machine/ipl.h -> sys/ipl.h - machine/mutex.h -> sys/mutex.h Notes: svn path=/head/; revision=67365
* Roll minor revision- for once we'll use this because.... if revision >= 5.4,Matt Jacob2000-10-171-32/+30
| | | | | | | | | | | | | compile time will build in mutex locks, otherwise the old locking (splcam/splx with a recursion counter) will be compiled in. We still depend on config_intr_hook to tell us when it's okay to call msleep instead of polling. It'd be real nice if we could do this early enough to not hang up a machine struggling with a bad Fibre Channel loop, but that's still to come. Notes: svn path=/head/; revision=67258
* remove "SERVICING_INTERRUPT" nonsenseMatt Jacob2000-10-171-2/+0
| | | | Notes: svn path=/head/; revision=67257
* Remove unneeded #include <machine/clock.h>Poul-Henning Kamp2000-10-151-1/+0
| | | | Notes: svn path=/head/; revision=67164
* Make changes required by change in how default and usable node and portMatt Jacob2000-10-121-15/+3
| | | | | | | WWNS are made and used. Notes: svn path=/head/; revision=67049
* Redo how default Node and Port WWNs are determined (again!). This is soMatt Jacob2000-10-121-29/+66
| | | | | | | we don't stomp on the differences between ports for a Qlogic 2202. Notes: svn path=/head/; revision=67048
* Change some default macro usages/definitions/requirements.Matt Jacob2000-10-121-9/+14
| | | | Notes: svn path=/head/; revision=67047
* some copyright cleanupsMatt Jacob2000-09-2110-50/+21
| | | | Notes: svn path=/head/; revision=66189
* Inintialize the queue index stuff from what the f/w sends back- justMatt Jacob2000-09-211-3/+4
| | | | | | | | | in case it's insane enough to not do what you tell it to. Print out (LOGINFO level) initiator ID. Notes: svn path=/head/; revision=66173
* Per msmith's request, don't attach to Qlogic 12160 id'd cards that haveMatt Jacob2000-09-071-0/+8
| | | | | | | a certain SubVendorID. Notes: svn path=/head/; revision=65588
* * Completely rewrite the alpha busspace to hide the implementation fromDoug Rabson2000-08-281-9/+0
| | | | | | | | | | | | | | | the drivers. * Remove legacy inx/outx support from chipset and replace with macros which call busspace. * Rework pci config accesses to route through the pcib device instead of calling a MD function directly. With these changes it is possible to cleanly support machines which have more than one independantly numbered PCI busses. As a bonus, the new busspace implementation should be measurably faster than the old one. Notes: svn path=/head/; revision=65176
* remove clause 3 licenceMatt Jacob2000-08-271-7/+1
| | | | Notes: svn path=/head/; revision=65141
* various fixesMatt Jacob2000-08-277-241/+409
| | | | Notes: svn path=/head/; revision=65140
* Add a comment as to where stdarg.h applies.Matt Jacob2000-08-031-1/+1
| | | | Notes: svn path=/head/; revision=64176
* Use <machine/stdarg.h> instead of <stdarg.h> so that this will compile.John Baldwin2000-08-031-1/+1
| | | | | | | While I'm at it, move the #include line up to the top of the file. Notes: svn path=/head/; revision=64174
* Add in macros && masks so that mailbox command errors can beMatt Jacob2000-08-011-0/+3
| | | | | | | selectively printed/supressed in isp_mboxcmd. Notes: svn path=/head/; revision=64096
* Major whacking for core version 2.0. A major motivator for 2.0 and theseMatt Jacob2000-08-011-938/+980
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | changes is that there's now a Solaris port of this driver, so some things in the core version had to change (not much, but some). In order, from the top.....: A lot of error strings are gathered in one place at the head of the file. This caused me to rewrite them to look consistent (with respect to things like 'Port 0x%' and 'Target %d' and 'Loop ID 0x%x'. The major mailbox function, isp_mboxcmd, now takes a third argument, which is a mask that selectively says whether mailbox command failures will be logged. This will substantially reduce a lot of spurious noise from the driver. At the first run through isp_reset we used to try and get the current running firmware's revision by issuing a mailbox command. This would invariably fail on alpha's with anything but a Qlogic 1040 since SRM doesn't *start* the f/w on these cards. Instead, we now see whether we're sitting ROM state before trying to get a running BIOS loaded f/w version. All CFGPRINTF/PRINTF/IDPRINTF macros have been replaced with calls to isp_prt. There are seperate print levels that can be independently set (see ispvar.h), which include debugging, etc. All SYS_DELAY macros are now USEC_DELAY macros. RQUEST_QUEUE_LEN and RESULT_QUEUE_LEN now take ispsoftc as a parameter- the Fibre Channel cards and the Ultra2/Ultra3 cards can have 16 bit request queue entry indices, so we can make a 1024 entry index for them instead of the 256 entries we've had until now. A major change it to fix isp_fclink_test to actually only wait the delay of time specified in the microsecond argument being passed. The problem has always been that a call to isp_mboxcmd to get he current firmware state takes an unknown (sometimes long) amount of time- this is if the firmware is busy doing PLOGIs while we ask it what's up. So, up until now, the usdelay argument has been a joke. The net effect has been that if you boot without being plugged into a good loop or into a switch, you hang. Massively annonying, and hard to fix because the actual time delta was impossible to know from just guessing. Now, using the new GET_NANOTIME macros, a precise and measured amount of USEC_DELAY calls are done so that only the specified usecdelay is allowed to pass. This means that if the initial startup of the firmware if followed by a call from isp_freebsd.c:isp_attach to isp_control(isp, ISP_FCLINK_TEST, &tdelay) where tdelay is 2 * 1000000, no more than two seconds will actually elapse before we leave concluding that the cable is unhooked. Jeez. About time.... Change the ispscsicmd entry point to isp_start, and the XS_CMD_DONE macro to a call to the platform supplied isp_done (sane naming). Limit our size of request queue completions we'll look at at interrupt time. Since we've increased the size of the Request Queue (and the size of the Response Queue proportionally), let's not create an interrupt stack overflow by having to keep a max completion list (forw links are not an option because this is common code with some platforms that don't have link space in their XS_T structures). A limit of 32 is not unreasonable- I doubt there'd be even this many request queue completions at a time- remember, most boards now use fast posting for normal command completion instead of filling out response queue entries. In the isp_mboxcmd cleanup, also create an array of command names so that "ABOUT FIRMWARE" can be printed instead of "CMD #8". Remove the isp_lostcmd function- it's been deprecated for a while. Remove isp_dumpregs- the ISP_DUMPREGS goes to the specific bus register dump fucntion. Various other cleanups. Notes: svn path=/head/; revision=64095
* Core version 2.0 rewrite. In this file we replace isp_tdebug withMatt Jacob2000-08-011-118/+104
| | | | | | | | | isp_prt calls. We now use an argument to the ISPCTL_FCLINK_TEST call. We change all IDPRINTF macros to isp_prt calls. We add the isp_prt function here. Notes: svn path=/head/; revision=64093
* Core version 2.0 cleanup/rewrite. Things get rearranged and changedMatt Jacob2000-08-011-163/+232
| | | | | | | | | | | | | quite a bit so that all of the ports have a similar set of required macros/definitions (and in similar places in the isp_<platform>.h file). Some new macros/functions added- Mailbox Acquire/Relase macros, NANOTIME macros, SNPRINTf and STRNCAT. MemoryBarrier beomes MEMORYBARRIER with much stronger types. Notes: svn path=/head/; revision=64092
* Remove isp_prtstst (now in case statement in isp.c). RemoveMatt Jacob2000-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. Notes: svn path=/head/; revision=64091
* Remove isp_tdebug. Change all PRINTF macros to the now commonMatt Jacob2000-08-011-125/+117
| | | | | | | isp_prt logging function. Notes: svn path=/head/; revision=64090
* Fix typo. Remove isp_tdebug (we'll use ISP_LOGTDEBUG2 in isp->isp_dblevMatt Jacob2000-08-011-6/+3
| | | | | | | as a selector now). Change DFLT_CMD_CNT to a fixed amount for now. Notes: svn path=/head/; revision=64089
* Add in lengths of SBus or PCI registers.Matt Jacob2000-08-011-0/+3
| | | | Notes: svn path=/head/; revision=64088
* Rewrite for version 2.0. Some structural changes, but alsoMatt Jacob2000-08-011-34/+189
| | | | | | | | a substantial amount of commenting about what each platform specific definitions are supposed to be. Notes: svn path=/head/; revision=64087
* Part of major rewrite for core version 2.0- clarification ofMatt Jacob2000-08-011-99/+106
| | | | | | | | mdvec structure, removal of printf/CFGPRINTF in place of isp_prt calls. Parameterization of RQUEST_QUEUE_LEN/RESULT_QUEUE_LEN. Notes: svn path=/head/; revision=64086
* Add in some new IN_XXX and CT_XXXX flags in preparationMatt Jacob2000-07-181-0/+6
| | | | | | | | for the rototilling that !*$)~@!$_@*_(~@$*_(~@$*~@$* Qlogic F/W changes will need. Notes: svn path=/head/; revision=63390
* If debugging set, zero out an incoming response entryMatt Jacob2000-07-181-1/+5
| | | | | | | | | | when we're done reading it (makes checking things easier). Before calling isp_notify_ack make sure we're at RUNSTATE- elsewise we can be responding to LIPs or SCSI bus resets before we've finished some of the wiring. Notes: svn path=/head/; revision=63388