summaryrefslogtreecommitdiffstats
path: root/sys/dev/isp/isp.c
Commit message (Collapse)AuthorAgeFilesLines
* Don't try reading the SXP_PINS_DIFF on the 10160 and 12160 SCSImarius2008-12-151-4/+17
| | | | | | | | | | controllers. Reading this register, for which there are indications that it doesn't really exist, returns 0 on at least some 12160 and doing so on Sun Fire V880 causes a data access error exception. Reported and tested by: Beat Gaetzi Approved by: mjacob Obtained from: OpenBSD (modulo setting isp_lvdmode)
* Be more conservative- turn off fast posting and RIO for 22XX cards.mjacob2007-07-101-7/+2
| | | | | Approved by: re (ken) MFC after: 3 days
* Recover from some major omissions/problems with the 24XX port.mjacob2007-07-021-13/+38
| | | | | | | | | | | | | | | | | | | | | | | | First, we were never correctly checking for a 24XX Status Type 0 response- that cased us to fall through to evaluate status for commands as if this were a 2100/2200/2300 Status Type 0 response. This is *close*, but not quite the same. This has been reported to be apparent with some wierd lun configuration problems with some arrays. It became glaringly apparent on sparc64 where none of the correct byte swap things were done. Fixing this omission then caused a whole universe shifting debug cycle of endian issues for the 2400. The manual for 24XX f/w turns out to be wrong about the endianness of a couple of entities. The lun and cdb fields for the type 7 request are *not* unconditionally big endian- they happen to be opposite of whatever the endian of the current machine type is. Same with the sense data for the 24XX type 0 response. While we're at it investigate and resolve some NVRAM endian issues. Approved by: re (ken) MFC after: 3 days
* If we're going to (for 23XX and 24XX cards) DMA firmware from themjacob2007-06-241-2/+2
| | | | | | | | | | | request queues rather than shove it down a word at a time, we have to remember to put it into little endian format. Use the macros ISP_IOXPUT_{16,32} for this purpose. Otherwise, on sparc the firmware is loaded garbled and we get a (not surprisingly) firmware checksum failure and the card won't start and we don't attach it. Approved by: re (bruce) MFC after: 3 days
* Make this an MP safe driver but also still be multi-release.mjacob2007-05-051-17/+2
| | | | | | | | Seems to work on RELENG_4 through -current and also on sparc64 now. There may still be some issues with the auto attach/detach code to sort out. MFC after: 3 days
* some minor error message cleanupsmjacob2007-03-291-4/+4
|
* MFP4: a) Some constification from NetBSD (gcc 4.1.2)mjacob2007-03-221-113/+133
| | | | | | | b) Split default param fetching/setting into scsi and fibre functions and retry the fibre fetch more than once. MFC after: 1 week
* Don't call isp_intr from isp_start- this seems to, in rare cases,mjacob2007-03-141-7/+1
| | | | | | | cause confusion with at least the 23XX chipsets where the output queue index pointer just gets a bit whacko. MFC after: 1 day
* Restore optr if you trash it for 24XX target mode.mjacob2007-03-131-0/+1
| | | | MFC after: 3 days
* Fix compilation issues found in RELENG_4 port and merge themjacob2007-03-121-6/+10
| | | | diffs back to -current to keep versions identical.
* Fix some stupid copyright mistakes that have been there for quite some time.mjacob2007-03-101-23/+26
|
* Don't attempt to load illegal hard loop addresses intomjacob2007-02-231-40/+22
| | | | | | | | | | | | an ICB. This shows up on card restarts, and usually for 2200-2300 cards. What happens is that we start up, attempting to acquire a hard address. We end up instead being an F-port topology, which reports out a loop id of 0xff (or 0xffff for 2K Login f/w). Then, if we restart, we end up telling the card to go off an acquire this loop address, which the card then rejects. Bah. Compilation fixes from Solaris port.
* Be a bit more restrictive about printing out 'bad' pdb entriesmjacob2007-02-231-9/+11
| | | | | during loop rescans. They're not bad so much as unstable, so don't print this stuff out unless ISP_LOGSANCFG is set.
* MFP4: Move default setting to the end of isp_reset instead of themjacob2007-01-201-35/+44
| | | | | | | | | | front of isp_init so we can read NVRAM even if we're role ISP_NONE. Prepare for reintroduction of channels (for FC) for N-Port Virtualization. Fix a botch in handle assignment that caused us to nuke one device when a new one arrives and end up with two devices with the same identity in the virtual target mapping table.
* Check the return from registering FC4 types with the fabric namemjacob2007-01-051-11/+24
| | | | | | | | | server. Don't complain about a hard loop id of 0xffff- we get this in point-to-point topologies with the 2300 and 2K Login firmware. Up the timeout on register FC4 types commands.
* Try an experiment with using DMA to load firmware into a 2200- VERIFYmjacob2006-12-171-1/+1
| | | | | | CHECKSUM fails. Oh well, but keep a couple of the changes. Avoid overflow in usec counters when waiting for mailbox completion.
* Implement ISP_RESET0 for PCI and SBUS attachments- isp_reset hasmjacob2006-12-161-0/+17
| | | | | been modified to call ISP_RESET0 if it fails to do a reset. This gives us a chance to disable interrupts.
* Make ISPCTL_PLOGX find a handle to log into the management servermjacob2006-12-051-12/+36
| | | | | | with- not hope for the best. Change some things which were gated off of 24XX to be gated off of 2K login support. Convert some isp_prt calls to xpt_print calls.
* Make the SAN login/logout stuff more common between different chipsetsmjacob2006-11-181-68/+74
| | | | | | and provied an isp_control entry point so that the outer layers can do PLOGI/LOGO explicitly. Add MS IOCB support. This completes the cycle for base support for SMI-S.
* Increase the timeout for some SAN commands.mjacob2006-11-161-8/+14
| | | | | | | | | Only complain about FC Reponse errors if they're nonzero. Shorten some PortID printouts for local loop. Add an internal isp_xcmd_t data structure which we'll use for some CT-Passthru support as part of adding SMI-S.
* minor change to reduce some diff noisemjacob2006-11-161-1/+2
|
* Push things closer to path failover by implementing loop down andmjacob2006-11-141-226/+246
| | | | | | | | | | | | | | | | | | | | | | | | | gone device timers and zombie state entries. There are tunables that can be used to select a number of parameters. loop_down_limit - how long to wait for loop to come back up before declaring all devices dead (default 300 seconds) gone_device_time- how long to wait for a device that has appeared to leave the loop or fabric to reappear (default 30 seconds) Internal tunables include (which should be externalized): quick_boot_time- how long to wait when booting for loop to come up change_is_bad- whether or not to accept devices with the same WWNN/WWPN that reappear at a different PortID as being the 'same' device. Keen students of some of the subtle issues here will ask how one can keep devices from being re-accepted at all (the answer is to set a gone_device_time to zero- that effectively would be the same thing).
* Add 4Gb (24XX) support and lay the foundation for a lot of new stuff.mjacob2006-11-021-1776/+2998
|
* fix bug in 2322 receive sequencer f/w loadmjacob2006-09-011-3/+3
|
* Fix 2KLOGIN code to specify *ibits* (not *obits*) so that themjacob2006-08-141-60/+77
| | | | | | | | | | | | | | | | | | | | | | | | | options field in register 10 will be deterministic, not random. Correct the number of input bits for EXECUTE_FIRMWARE 0..1 to 0..2- the 2322 and 24XX cards use mailbox register 2 to specify whether the f/w being executed is freshly loaded or not. Correct the number of input bits for {READ,WRITE}_RAM_WORD_EXTENDED so that register 8 gets picked up. Fix the indexing and offset for the 2322 f/w download so that it correctly puts the different code segments where they belong. Move VERIFY_CHECKSUM to be the 'else' clause to 2322 f/w downloads- the EXECUTE_FIRMWARE command for 2322 and 24XX cards will tell you if the f/w checksum is incorrect and VERIFY_CHECKSUM only works for RISC SRAM address < 64K so you can only do a VERIFY_CHECKSUM on the first of the 3 f/w segments for the 2322. Shorten the delay for the continuation mailbox commands- 1ms is ridiculous (100us is more likely). All of the more or less is really only for the 2322/6322 cards.
* Remove reference to PTI cards. They haven't been functioningmjacob2006-08-051-15/+0
| | | | or around for probably at least 5 years.
* Initialize 2300 request/response pointers in isp_reset- not inmjacob2006-08-041-7/+4
| | | | isp_fibre_init.
* Some rearrangement of headers to minimize diffs with outside ofmjacob2006-07-161-44/+53
| | | | | | | | FreeBSD repository and to clean up the license header so as to not pollute the license with file function. Zero all mailbox structures prior to use (just in case). Change the outgoing mailbox count for INIT_FIRMWARE to be correct.
* Add some missing braces.mjacob2006-07-141-14/+30
| | | | | | Add MEMORY_BARRIER for the few scratch dma ops that were missing them plus add a couple of hi 32 bit dma ops (we could probably allow 64 bit scratch and request/response queue dma now).
* What the heck - make the last (most recent) 2200 f/w also domjacob2006-07-031-2/+6
| | | | Hard Loop acquisition.
* Do various fixes to support firmware loading for the 2322mjacob2006-07-031-124/+227
| | | | | | | | | | | (and by extension, the 2422). One peculiar thing I've found with the 2322 is that if you don't force it to do Hard LoopID acquisition, the firmware crashes. This took a while to figure out. While we're at it, fix various bugs having to do with NVRAM reading and option setting with respect to pieces of NVRAM.
* Redo some code based upon issues found by Coverity.mjacob2006-04-211-1/+4
|
* Some more gratuitous format and name changes.mjacob2006-04-211-75/+76
| | | | | | | Pull in some target mode changes from a private branch. Pull in some more RELENG_4 compilation changes. A lot of lines changed, but not much content change yet.
* a) clean up some declaration stuff (i.e., make more modern with respectmjacob2006-02-151-202/+203
| | | | | | | | | | | | | | | to getting rid u_int for uint and so on). b) Turn back on 64 bit DAC support. Cheeze it a bit in that we have two DMA callback functions- one when we have bus_addr_t > 4 bits in width and the other which should be normal. Even Cheezier in that we turn off setting up DMA maps to be BUS_SPACE_MAXADDR if we're in ISP_TARGET_MODE. More work on this in a week or so. c) Tested under amd64 and 1MB DFLTPHYS, sparc64, i386 (PAE, but insufficient memory to really test > 4GB). LINT check under amd64. MFC after: 1 month
* Make sure we don't pick up a loopid that's larger than ourmjacob2006-02-021-3/+12
| | | | | | | current portdb max (MAX_FC_TARG == 256) now that we support 2K Login f/w. MFC after: 3 days
* First of several commits as this driver is dusted off and maybe broughtmjacob2006-01-231-47/+136
| | | | | | | | | | | | | | | | | | up to date. Principle changes for this reelase is to support 2K Port Login firmware. This allows us to support the 2322 (and 2422 4Gb) cards which only come with the 2K Port Login firmware. The 2322 should now work- but we don't have firmware sets for it in ispfw (as the change to load 2K Port Login f/w hasn't been made- that f/w is so big it has to be loaded in more than one chunk). Other changes are the beginnings of cleaning up some long standing target mode issues. The next changes here will incorporate a lot of bug fixes from others. Finally, some copyright cleanup and attempts to make the parts of the driver that are FreeBSD specific start conforming more to FreeBSD style. MFC after: 1 month
* Add an ioctl framework for doing FC task management functions frommjacob2005-10-291-1/+1
| | | | a user space tool- useful for doing FC target mode certification.
* Don't set ZIO for 23XX for target mode (use fast posting instead).mjacob2005-01-231-7/+37
| | | | | | | | | | | Use the correct number of handles for multihandle returns. Very, very, rarely on some SMP systems we've seen an 'unstable' type in the response queue. I dunno whether or not it's a bug in our handling, or whether there's a cache incoherency issue, but try to guard against it. MFC after: 2 weeks
* 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-3/+5
| | | | | | CTIO fast post routine to handle CTIO completions. Submitted by: mjacob
* Add case to handle ISPCTL_GET_PDB.mjacob2004-02-071-0/+9
| | | | MFC after: 1 week
* If we have ISP_ROLE_INITIATOR set, make sure that we clear ICBOPT_INI_DISABLEmjacob2004-01-231-0/+6
| | | | | from the fwoptions. Likewise, we *set* ICBOPT_INI_DISABLE if we don't have initiator role.
* On reset, make sure that we have some parameters set correctly. Thismjacob2003-09-131-1/+18
| | | | | | | | | | | | fixes a longstanding issue WRT resetting the chip after startup- it would fail if we were connected as an F-port to a switch. If we were connected as an F-port, we got assigned a hard loop ID of 255, which is really a bogus loop id. Then when we turned around to reset ourselves, the firmware would reject the ICB_INIT request because the loop id was bogus. *sputter* Minor fixlet from somebody in NetBSD with too much time on their hands (dma -> DMA).
* Revert previous commit. Violates Maintainer (O'Brien knows how tomjacob2003-08-251-13/+24
| | | | | reach me directly), but more importantly, breaks compiles on non-FreeBSD platforms.
* Use __FBSDID().obrien2003-08-241-1/+3
| | | | Also some minor style cleanups.
* Restore parentheses removed inappropriately in last commit.mjacob2003-06-011-2/+3
|
* Remove unused variablesphk2003-05-311-6/+3
| | | | | | Add /* FALLTHROUGH */ Found by: FlexeLint
* Pick up some compilation warning fixes from NetBSD.mjacob2003-02-161-7/+7
| | | | | | If we don't have ISP_FW_CRASH_DUMP defined, we have to do a isp_reinit in the core code- not the platform code- so fix the ISP_CONN_FATAL case.
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,schweikh2003-01-011-1/+1
| | | | especially in troff files.
* Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/schweikh2002-12-301-1/+1
| | | | Add FreeBSD Id tag where missing.
OpenPOWER on IntegriCloud