summaryrefslogtreecommitdiffstats
path: root/sys/dev/isp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Get rid of a couple of Coverity found sign comparison errors.mjacob2007-07-101-3/+3
| | | | | Approved by: re (Ken) MFC after: 3 days
* 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-024-21/+57
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Pointy hat to me. Committed with building.mjacob2007-06-261-1/+1
| | | | Approved by: re (ken, implicit)
* Extension of previous commit- when we have 2k login firmware, we need tomjacob2007-06-261-1/+7
| | | | | | | | put out a ispreqt2e_t structure onto the request queue- not a ispreqt2_t structure. I forgot that the 23XX can use a t2 structure. Approved by: re (ken, implicitly) MFC after: 3 days
* Yet another bug- when we have 2k login firmware, we needmjacob2007-06-251-1/+7
| | | | | | | | | to put out a ispreqt3e_t structure onto the request queue- not a ispreqt3_t structure. We weren't. This turns out only to really matter for big endian machines. 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
* Prepare for future integration between CAM and newbus. xpt_bus_registerscottl2007-06-171-2/+3
| | | | | | | now takes a device_t to be the parent of the bus that is being created. Most SIMs have been updated with a reasonable argument, but a few exceptions just pass NULL for now. This argument isn't used yet and the newbus integration likely won't be ready until after 7.0-RELEASE.
* Remove some ioctls that were ill-thought out. There is no usermjacob2007-06-112-128/+14
| | | | | | impact as no softwware using these ioctls was ever committed. Redo locking for ispioctl.
* Only try and set a segment lim size to 1 << 32 iff bus_size_t > 4.mjacob2007-06-111-2/+6
|
* Quiet GCC 4.2 warning.mjacob2007-06-081-1/+1
|
* Temp workaround for config_intrhook_establish running the hookmjacob2007-05-131-0/+3
| | | | right away.
* Bad merge.mjacob2007-05-111-1/+1
|
* Fix pointy-hat problem with BUS_DMA_ROOTARG macro that caused problems for ↵mjacob2007-05-112-5/+5
| | | | | | | | sparc64. Candidate for immediate MFC. Noticed by: Everyone-maxim contacted.
* Make this an MP safe driver but also still be multi-release.mjacob2007-05-056-502/+441
| | | | | | | | 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
* Revert a driver API change to xpt_alloc_ccb that isn't necessary. Fix ascottl2007-04-181-1/+1
| | | | couple of associated error checks.
* Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM willscottl2007-04-151-3/+4
| | | | | | | | | | | use to synchornize and protect all data objects that are used for that SIM. Drivers that are not yet MPSAFE register Giant and operate as usual. RIght now, no drivers are MPSAFE, though a few will be changed in the coming week as this work settles down. The driver API has changed, so all CAM drivers will need to be recompiled. The userland API has not changed, so tools like camcontrol do not need to be recompiled.
* Temporarily desupport simultaneous target and initiator mode.mjacob2007-04-026-18/+38
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix compilation problem (add a const) for pre-7.0 compiles.mjacob2007-03-311-1/+1
|
OpenPOWER on IntegriCloud