summaryrefslogtreecommitdiff
path: root/sys/dev/isp/isp_library.c
Commit message (Collapse)AuthorAgeFilesLines
* This commit was manufactured by cvs2svn to create tagrelease/7.0.0_cvscvs2svn2008-02-241-1/+1
| | | | | | 'RELENG_7_0_0_RELEASE'. This commit was manufactured to restore the state of the 7.0-RELEASE image.
* Recover from some major omissions/problems with the 24XX port.Matt Jacob2007-07-021-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=171159
* Temporarily desupport simultaneous target and initiator mode.Matt Jacob2007-04-021-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | When the linux port changes were imported which split the target command list to be separate from the initiator command list and the handle format changed to encode a type in the handle the implications to the function isp_handle_index (which only the NetBSD/OpenBSD/FreeBSD ports use) were overlooked. The fault is twofold: first, the index into the DMA maps in isp_pci is wrong because a target command handle with the type bit left in place caused a bad index (and panic) into dma map. Secondly, the assumption of the array of DMA maps in either PCS or SBUS attachment structures is that there is a linear mapping between handle index and DMA map index. This can no longer be true if there are overlapping index spaces for initiator mode and target mode commands. These changes bandaid around the problem by forcing us to not have simultaneous dual roles and doing the appropriate masking to make sure things are indexed correctly. A longer term fix is being devloped. Notes: svn path=/head/; revision=168240
* MFP4: a) Some constification from NetBSD (gcc 4.1.2)Matt Jacob2007-03-221-1/+1
| | | | | | | | | | b) Split default param fetching/setting into scsi and fibre functions and retry the fibre fetch more than once. MFC after: 1 week Notes: svn path=/head/; revision=167821
* Fix some stupid copyright mistakes that have been there for quite some time.Matt Jacob2007-03-101-24/+26
| | | | Notes: svn path=/head/; revision=167403
* Make the SAN login/logout stuff more common between different chipsetsMatt Jacob2006-11-181-0/+60
| | | | | | | | | 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. Notes: svn path=/head/; revision=164370
* Increase the timeout for some SAN commands.Matt Jacob2006-11-161-3/+3
| | | | | | | | | | | | 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. Notes: svn path=/head/; revision=164318
* minor change to reduce some diff noiseMatt Jacob2006-11-161-1/+1
| | | | Notes: svn path=/head/; revision=164317
* Push things closer to path failover by implementing loop down andMatt Jacob2006-11-141-6/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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). Notes: svn path=/head/; revision=164272
* Add 4Gb (24XX) support and lay the foundation for a lot of new stuff.Matt Jacob2006-11-021-758/+1825
| | | | Notes: svn path=/head/; revision=163899
* Fix na_fcentry_t to not have a lun field. Fix indentation in handlyMatt Jacob2006-08-041-6/+6
| | | | | | | | | | | | the notify structs. Fix messages in isp_got_msg_fc to print out the loop id of the sender- not the wwpn which will be synthesized later, if possible, in the outer layers. Put in debug printouts to pair a notify ack to a notify so one can see the start/close of an immediate notify event. Put in spsace for TASK MANAGEMENT response flags (which we don't do yet). Notes: svn path=/head/; revision=160978
* Some rearrangement of headers to minimize diffs with outside ofMatt Jacob2006-07-161-7/+5
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=160410
* Redo some code based upon issues found by Coverity.Matt Jacob2006-04-211-1/+1
| | | | Notes: svn path=/head/; revision=157945
* a) clean up some declaration stuff (i.e., make more modern with respectMatt Jacob2006-02-151-79/+96
| | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=155704
* Remove use of inlines and use the functions as a library.Matt Jacob2006-02-021-0/+1710
Larger code space, possibly performance hit, but more portable. Certainly less questionable use of inlining. Suggested by: des Notes: svn path=/head/; revision=155228