summaryrefslogtreecommitdiffstats
path: root/sys/dev/isp
Commit message (Collapse)AuthorAgeFilesLines
* Add support QLE220 card- an 2500 lookalike.mjacob2011-03-101-0/+15
| | | | | Obtained mostly from: Roman && Konstantin MFC after: 1 week
* Flush both reads *and* writes to registers.mjacob2011-03-051-1/+1
| | | | | Obtained from: Miod Vallat in OpenBSD MFC after: 1 week
* Sync FreeBSD ISP with mercurial tree. Minor changes having to do withmjacob2011-02-284-6/+9
| | | | a macro for minima.
* - Use the correct DMA tag/map pair for synchronize the FC scratch area.marius2011-02-147-49/+61
| | | | | | | | | | | - Allocate coherent DMA memory for the request/response queue area and and the FC scratch area. These changes allow isp(4) to work properly on sparc64 with usage of the IOMMU streaming buffers enabled. Approved by: mjacob MFC after: 2 weeks
* Partially revert 208119. We were overwriting tunable settings.mjacob2010-11-271-3/+0
| | | | | Obtained from: Oleg Sharoyko MFC after: 1 week
* Fix typos.brucec2010-11-091-7/+7
| | | | | PR: bin/148894 Submitted by: olgeni
* Don't pass a buffer directly as a printflike format string.mjacob2010-06-101-1/+1
| | | | | Found by: clang MFC after: 1 month
* Fix XPT_GET_TRAN_SETTING for FC which has been broken for while so thatmjacob2010-06-071-2/+4
| | | | | | | it will figure out the correct target to handle index and be able to find things like WWPN, etc. MFC after: 2 weeks
* Be more specific about which CDB length we're going to use. Not really a likelymjacob2010-06-051-4/+14
| | | | | | | | | bug but we might as well be clearer. Found with: Coverity Prevent(tm) CID: 3981 MFC after: 2 weeks
* Make the internal target > SPC2 (so REPORT LUNS can be tested).mjacob2010-06-051-2/+8
| | | | | | | Give the NIL inquiry data real values other than just plain 0x7f in the first byte. MFC after: 2 weeks
* I was getting panics in sleepq_add for the second sleep in isp_kthread.mjacob2010-06-051-1/+3
| | | | | | | I don't know why- but it occurred to me in looking at the second sleep is that all I want is a pause- not an actual sleep. So do that instead. MFC after: 2 weeks
* Various minor and not so minor fixes suggested by Coverity.mjacob2010-06-024-44/+52
| | | | | | | In at least one case, it's amazing that target mode worked at all. Found by: Coverity. MFC after: 2 weeks
* Add a new primitive, XPT_SCAN_TGT, to cover the range between scanning amjacob2010-05-261-7/+2
| | | | | | | | | | | whole bus (XPT_SCAN_BUS) and a single lun on that bus (XPT_SCAN_LUN). It's less resource comsumptive than scanning a whole bus when the caller knows only one target has changes. Reviewed by: scsi@ Sponsored by: Panasas MFC after: 1 month
* Don't leak CCBs for every ABORT.mjacob2010-05-251-1/+4
| | | | | Submitted by: Ken Merry MFC after: One week
* Remove extra break left by hand editing.mjacob2010-05-251-1/+0
| | | | | X-MFC: 208542 MFC after: One Month
* Treat PRLI the same as PLOGI and make a database entry for it (target mode).mjacob2010-05-251-3/+8
| | | | | Obtained from: Ken Merry MFC after: One Month
* Correct compilation error introduced in last commit.mjacob2010-05-161-2/+2
| | | | | | | | X-MFC: 208119 MFC after: 1 week Sponsored By: Panasas Pointy Hat to: Me Noticed by: Rob
* Whap. Hook up some wires that were forgotten a few months ago and restoremjacob2010-05-152-18/+15
| | | | | | | the zombie device timeout code and the loop down time code and the fabric hysteresis code. MFC after: 1 week Sponsored By: Panasas
* On sparc64 obtain the initiator ID from the Open Firmware device treemarius2010-05-032-5/+12
| | | | | | in order to match what the PROM built-in driver uses. Approved by: mjacob
* D'oh- isp_handle_index' logic was reversed (not used in FreeBSD).mjacob2010-03-261-2/+2
| | | | MFC after: 1 week
* Clean up some printing stuff so that we can have a bit finer controlmjacob2010-03-264-150/+100
| | | | | | | | | | on debug output. Add a new platform function requirement to allow for printing based upon the ITL nexus instead of the isp unit plus channel, target and lun. This allows some printouts and error messages from the core code to appear in the same format as the platform's subsystem (in FreeBSD's case, CAM path). MFC after: 1 week
* Put gone device timer into a structure tag that can hold more than 32 ↵mjacob2010-03-174-17/+24
| | | | | | | | | | seconds. Oops. Untangle some of the confusion about what role means when it's in the FCPARAM/SDPARAM or isp_fc/isp_spi structures. This fixed a problem about seeing targets appear if you've turned off autologin and find them, or rather don't, via camcontrol rescan. MFC after: 1 month
* Revamp the pieces of some of the stuff I forgot to do when shifting tomjacob2010-02-278-245/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | | 32 bit handles. The RIO (reduced interrupt operation) and fast posting for the parallel SCSI cards were all 16 bit handles. Furthermore, target mode parallel SCSI only can have 16 bit handles. Use part of a supplied patch to switch over to using 32 bit handles. Be a bit more conservative here and only do this for parallel SCSI for the 12160 (Ultra3) cards. There were a lot of marginal Ultra2 cards, and, frankly, few are findable now for testing. Fix the target handle routine to only do 16 bit handles for parallel SCSI cards. This is okay because the upper sixteen bits of the new 32 bit handles is a sequence number to help protect against duplicate completions. This would be very unlikely to happen with parallel SCSI target mode, and wasn't present before, so we're no worse off than we used to be. While we're at it, finally split the async mailbox completion handlers into FC and parallel SCSI functions. This makes it much cleaner and easier to figure out what is or isn't a legal async mailbox completion code for different card classes. PR: kern/144250 Submitted partially by: Charles D MFC after: 1 week
* Fix misallocation error in target mode.mjacob2010-02-271-1/+1
| | | | MFC after: 1 day
* xpt_rescan only honors a wildcard in the target field. Revert the previousmjacob2010-02-231-1/+6
| | | | | | | | | change and have isp_make_here scan the whole bus which will then scan all luns. I think xpt_rescan needs to be fixed, but that's a separable issue. Suggested by: Alexander
* When we rescan, just scan from logical unit 0. In other words, don'tmjacob2010-02-231-1/+1
| | | | | | | | specify a wildcard lun here. This unbreaks disk re-arrival. MFC after: 2 days
* Don't try and re-use a handle, even if the firmware tells you that's what is ↵mjacob2010-02-181-30/+33
| | | | | | | logged in. PR: kern/144026 MFC after: 1 week
* Yet another target mode compilation error.mjacob2010-02-041-1/+1
|
* Fix target mode compilation problem with previous deltamjacob2010-02-041-2/+2
|
* Redo how commands handles are created and managed and implement sequencemjacob2010-02-038-109/+186
| | | | | | | | | | | | numbers and handle types in rational way. This will better protect from (unwittingly) dealing with stale handles/commands. Fix the watchdog timeout code to better protect itself from mistakes. If we run an abort on a putatively timed out command, the command may in fact get completed, so check to make sure the command we're timing it out is still around. If the abort succeeds, btw, the command should get returned via a different path.
* Amazingly we've been freeing a handle and using that which it refers tomjacob2010-01-151-1/+1
| | | | | | for years. Bad! MFC after: 1 week
* Remove extraneous semicolons, no functional changes.mbr2010-01-072-4/+4
| | | | | Submitted by: Marc Balmer <marc@msys.ch> MFC after: 1 week
* Make sure that the WWNN is also created for 2100..2300 cards.mjacob2010-01-031-0/+2
| | | | MFC after: 1 day
* Create a Node WWN from the *Port* WWN, not vice versa, for 2400s.mjacob2009-12-311-5/+4
| | | | | | | If the NAA is type 2, the Node WWN is the Port WWN with the 12 bits of port (48..60) cleared. This iff a wwn fetched from NVRAM is zero. MFC after: 1 week
* Fix cases where we've managed to get a Loop UP event prior to initializingmjacob2009-12-042-43/+52
| | | | | | | | | the loop down counter, as well as other things. This was brought to my attention with a different fix, more for RELENG_7- this one covers the multiple channel case. PR: 140438 MFC after: 1 month
* Unbreak SBus cards which have been broken (apparently) for a while.mjacob2009-11-021-18/+8
| | | | | | | | | | Most of the pieces came from Marius- correct settings for channels and resource management. The one piece missing was that you cannot for SBus cards replace 32 bit operations with A64 operations- not supported. Submitted by: marius MFC after: 3 days
* (semiforced commit to add comment missed in last delta)mjacob2009-09-213-2/+1
| | | | | | | | | | Add a maximum response length for FCP RSPNS IUs. Clarify some of the FC option words for setting parameters and try and disable automatic PRLI when in target mode- this should correct some cases of N-port topologies with 23XX cards where we put out an illegal PRLI (in target mode only we're not supposed to put out a PRLI).
* Remove file unused in freebsd.mjacob2009-09-214-457/+66
|
* Accomodate old style XPT_IMMED_NOTIFY and XPT_NOTIFY_ACK so thatmjacob2009-09-152-27/+43
| | | | | | | | | we at least don't panic. We don't really support dual role mode (INITIATOR/TARGET) any more. We should but it's broken and will take a fair amount of effort to fix and correctly manage both initiator and target roles sharing the port database. So, for now, disallow it.
* Have at least *some* default WWN to fall back on,mjacob2009-08-131-0/+4
| | | | | | | otherwise Sun branded FC cards won't configure. Reviewed by: Ken, Scott Approved by: re
* Add 8Gb support (isp_2500). Fix a fair number of configuration andmjacob2009-08-0114-8141/+10486
| | | | | | | | | | | | | | | | | | | | | firmware loading bugs. Target mode support has received some serious attention to make it more usable and stable. Some backward compatible additions to CAM have been made that make target mode async events easier to deal with have also been put into place. Further refinement and better support for NP-IV (N-port Virtualization) is now in place. Code for release prior to RELENG_7 has been stripped away for code clarity. Sponsored by: Copan Systems Reviewed by: scottl, ken, jung-uk kim Approved by: re
* Separate the parallel scsi knowledge out of the core of the XPT, andscottl2009-07-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modularize it so that new transports can be created. Add a transport for SATA Add a periph+protocol layer for ATA Add a driver for AHCI-compliant hardware. Add a maxio field to CAM so that drivers can advertise their max I/O capability. Modify various drivers so that they are insulated from the value of MAXPHYS. The new ATA/SATA code supports AHCI-compliant hardware, and will override the classic ATA driver if it is loaded as a module at boot time or compiled into the kernel. The stack now support NCQ (tagged queueing) for increased performance on modern SATA drives. It also supports port multipliers. ATA drives are accessed via 'ada' device nodes. ATAPI drives are accessed via 'cd' device nodes. They can all be enumerated and manipulated via camcontrol, just like SCSI drives. SCSI commands are not translated to their ATA equivalents; ATA native commands are used throughout the entire stack, including camcontrol. See the camcontrol manpage for further details. Testing this code may require that you update your fstab, and possibly modify your BIOS to enable AHCI functionality, if available. This code is very experimental at the moment. The userland ABI/API has changed, so applications will need to be recompiled. It may change further in the near future. The 'ada' device name may also change as more infrastructure is completed in this project. The goal is to eventually put all CAM busses and devices until newbus, allowing for interesting topology and management options. Few functional changes will be seen with existing SCSI/SAS/FC drivers, though the userland ABI has still changed. In the future, transports specific modules for SAS and FC may appear in order to better support the topologies and capabilities of these technologies. The modularization of CAM and the addition of the ATA/SATA modules is meant to break CAM out of the mold of being specific to SCSI, letting it grow to be a framework for arbitrary transports and protocols. It also allows drivers to be written to support discrete hardware without jeopardizing the stability of non-related hardware. While only an AHCI driver is provided now, a Silicon Image driver is also in the works. Drivers for ICH1-4, ICH5-6, PIIX, classic IDE, and any other hardware is possible and encouraged. Help with new transports is also encouraged. Submitted by: scottl, mav Approved by: re
* Change uses of the struct ccb_hdr timeout_ch missed when isp(4) wasmarius2009-05-101-2/+3
| | | | | | | | | adapted to MPSAFE cam(4) to a isp(4) specific callout structure. Thanks to Florian Smeets for providing access to a machine exhibiting this problem for debugging. Approved by: mjacob MFC after: 3 days
* 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)
* Replace all calls to minor() with dev2unit().ed2008-09-271-1/+1
| | | | | | | | | | | | | | | After I removed all the unit2minor()/minor2unit() calls from the kernel yesterday, I realised calling minor() everywhere is quite confusing. Character devices now only have the ability to store a unit number, not a minor number. Remove the confusion by using dev2unit() everywhere. This commit could also be considered as a bug fix. A lot of drivers call minor(), while they should actually be calling dev2unit(). In -CURRENT this isn't a problem, but it turns out we never had any problem reports related to that issue in the past. I suspect not many people connect more than 256 pieces of the same hardware. Reviewed by: kib
* Add missing locking for SBus controllers.scottl2007-11-051-0/+5
|
* Rename the kthread_xxx (e.g. kthread_create()) callsjulian2007-10-201-2/+2
| | | | | | | | | | | to kproc_xxx as they actually make whole processes. Thos makes way for us to add REAL kthread_create() and friends that actually make theads. it turns out that most of these calls actually end up being moved back to the thread version when it's added. but we need to make this cosmetic change first. I'd LOVE to do this rename in 7.0 so that we can eventually MFC the new kthread_xxx() calls.
* Spelling fix for interupt -> interruptkevlo2007-10-121-2/+2
|
* Fix off-by-two errors.jkim2007-08-281-2/+2
| | | | | | | | | | Both WWNN and WWPN are 64-bit unsigned integers and they are prefixed with "0x", which requires two more bytes each. Submitted by: Danny Braniss (danny at cs dot huji dot ac dot il) via Matthew Jacob (lydianconcepts at gmail dot com) Approved by: re (bmah) MFC after: 3 days
* Export 4Gbps Fibre Channel link speed correctly with inquiry commands.jkim2007-08-231-9/+8
| | | | | Approved by: re (kensmith) MFC after: 3 days
OpenPOWER on IntegriCloud