summaryrefslogtreecommitdiffstats
path: root/sys/dev/isp
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)
* 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
|
* some minor error message cleanupsmjacob2007-03-291-4/+4
|
* Don't derference a pointer before setting it.mjacob2007-03-281-2/+2
| | | | | | Very Pointy Dunce Cap T o: me. Submitted by: Marcel MFC after: 3 days
* MFP4: a) Some constification from NetBSD (gcc 4.1.2)mjacob2007-03-225-125/+142
| | | | | | | 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
* Move bus_space_tag and bus_space_handle register accessmjacob2007-03-133-86/+79
| | | | | | | | | | tokens into the common isp_osinfo structure instead of being in bus specific structures. This allows us to implement a SYNC_REG MEMORYBARRIER call (using bus_space_barrier) and also reduce the amount of bus specific wrapper structure usages in isp_pci && isp_sbus. MFC after: 3 days
* 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-124-11/+27
| | | | diffs back to -current to keep versions identical.
* Fix some stupid copyright mistakes that have been there for quite some time.mjacob2007-03-1013-255/+255
|
* Redo previous newbus related change to be kinder tomjacob2007-02-233-2/+9
| | | | multi-release support.
* Don't attempt to load illegal hard loop addresses intomjacob2007-02-233-49/+31
| | | | | | | | | | | | 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.
* o break newbus api: add a new argument of type driver_filter_t topiso2007-02-232-2/+2
| | | | | | | | | | | | | bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Reviewed by: many Approved by: re@
* Use the new xpt_rescan function to truly now have dynamicmjacob2007-02-231-11/+34
| | | | | | | | | | attachment of new devices that arrive (and we notice them via async Fibre Channel events). We've always had the right thing (of sorts) happen when devices go away- this is the corollary function that makes multipath failover actually work. MFC after: 2 weeks
* There is a problem in setting/getting 'options'- if we check thingsmjacob2007-02-231-111/+133
| | | | | | | | | | | early, we haven't set board type, so we can't correctly check for some options. Fix this by splitting option setting/getting into generic, pci and then later board specific, option setting/getting. This was noticed when setting 'iid' (or 'hard loop id') didn't work all of a sudden. Noticed by: Mike Drangula (thanks!) via Jung-uk Kim (thanks!)
* 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.
* Cleanup and document the implementation of firmware(9) based onluigi2007-02-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a version that i posted earlier on the -current mailing list, and subsequent feedback received. The core of the change is just in sys/firmware.h and kern/subr_firmware.c, while other files are just adaptation of the clients to the ABI change (const-ification of some parameters and hiding of internal info, so this is fully compatible at the binary level). In detail: - reduce the amount of information exported to clients in struct firmware, and constify the pointer; - internally, document and simplify the implementation of the various functions, and make sure error conditions are dealt with properly. The diffs are large, but the code is really straightforward now (i hope). Note also that there is a subtle issue with the implementation of firmware_register(): currently, as in the previous version, we just store a reference to the 'imagename' argument, but we should rather copy it because there is no guarantee that this is a static string. I realised this while testing this code, but i prefer to fix it in a later commit -- there is no regression with respect to the past. Note, too, that the version in RELENG_6 has various bugs including missing locks around the module release calls, mishandling of modules loaded by /boot/loader, and so on, so an MFC is absolutely necessary there. I was just postponing it until this cleanup to avoid doing things twice. MFC after: 1 week
* add a missing piece for 2432mjacob2007-02-101-0/+1
|
* Putative untested 2432 (PCI-E) support.mjacob2007-02-101-1/+12
|
* Clean up some of the various platform and release specific dma tagmjacob2007-01-233-47/+36
| | | | | | | stuff so it is centralized in isp_freebsd.h. Take out PCI posting flushed in qla2100/2200 register reads except for 2100s.
* Change the remainder of the drivers for DMA'ing devices enabled in themarius2007-01-211-2/+14
| | | | | | | | sparc64 GENERIC and the sound device drivers known working on sparc64 to use bus_get_dma_tag() to obtain the parent DMA tag so we can get rid of the sparc64_root_dma_tag kludge eventually. Except for ath(4), sk(4), stge(4) and ti(4) these changes are runtime tested (unless I booted up the wrong kernels again...).
* Grumble- let a linux-ism slip in and had an llx whichmjacob2007-01-201-9/+12
| | | | then choked on a 64 bit platforms. Oops.
* MFP4: Move default setting to the end of isp_reset instead of themjacob2007-01-207-93/+138
| | | | | | | | | | 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.
* RELENG_6 compilationmjacob2007-01-051-1/+1
|
* error print cleanup && turn off ints if RISC is pausedmjacob2007-01-051-1/+2
|
* 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.
OpenPOWER on IntegriCloud