summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/isp_pci.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* remove isp(4) now that the ql* family have replaced itjmatthew2015-06-191-1385/+0
|
* yet more mallocarray() changes.doug2014-12-131-5/+8
| | | | ok tedu@ deraadt@
* Some reallocarray() use; review Jean-Philippe Ouellet, patrick keshishianderaadt2014-07-131-4/+4
| | | | ok tedu
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-121-11/+11
| | | | after discussions with beck deraadt kettenis.
* remove isp24xx-related code. it doesn't work, qle(4) replaces it, andjmatthew2014-02-141-207/+3
| | | | | | we need the space in the i386 ramdisks. ok dlg@, krw@
* Build isp2xxx firmware into separate object files so we only includejmatthew2014-02-101-4/+4
| | | | | | | one copy when both isp(4) and qla(4) are enabled. This is a temporary measure until qla(4) takes over completely. looked at by miod@ and kettenis@
* make malloc calls in isp_pci_mbxdma NOWAIT to match the bus_dma calls that areoga2011-06-231-14/+20
| | | | | | | | | | | | | | all nowait. While here, plug a memory leak if one of the bus_dma calls near the bottom of the function fails because it would fail to free the dmamap, unmap the memory and free the memory. make that part of the code use the standard list of goto labels for error handling that most callers of bus_dmamem_alloc; bus_dmamem_map; bus_dmamap_creat; bus_dmamap_load() use to clean up. ok miod@
* M_WAITOK cleanup of two cases:mk2011-06-171-3/+5
| | | | | | | | | | | | | | | | 1) Allocating with M_WAITOK, checking for NULL, and calling panic() is pointless (malloc() will panic if it can't allocate) so remove the check and the call. 2) Allocating with M_WAITOK, checking for NULL, and then gracefully handling failure to allocate is pointless. Instead also pass M_CANFAIL so malloc() doesn't panic so we can actually handle it gracefully. 1) was done using Coccinelle. Input from oga. ok miod.
* Turning on SCSIDEBUG (for debugging other drivers, of course) shouldderaadt2011-04-221-2/+2
| | | | | not make these drivers spew millions of lines of output. ok krw
* use nitems(); no binary change for drivers that are compiled on amd64.jasper2011-04-031-2/+2
| | | | ok claudio@
* Change sgi system identification from a single system type list, to a smallermiod2009-11-071-3/+3
| | | | | | system type list (which really is the system family) and a subsystem type. No functional change yet.
* Get node and port WWN's from the Open Firmware tree on sparc64 if they arekettenis2009-08-091-3/+16
| | | | | | provided. ok dlg@, krw@
* the data which is read is never used; ok krwderaadt2009-06-291-4/+1
|
* since we link in the 24xx firmware, might as well point to it; ok krw kettenisderaadt2009-06-291-2/+3
|
* Restore lost string constant, make DEBUG kernels compile.krw2009-06-281-1/+6
| | | | Noticed by deraadt@.
* for the isp(4) driver, invert the meaning of the options which pullderaadt2009-06-241-9/+57
| | | | | firmwares into the smaller (and larger) media ok krw
* Major update to isp driver, mostly from mjacob via FreeBSD.krw2009-06-241-266/+501
| | | | | | | | | Everything that worked before should still work so in it goes. Newer boards (2300, 2400) may now work but are still a work in progress. Thanks to many testers but especially kettenis@ for finding a show stopper bug and stomping it. ok deraadt@
* Remove BUS_DMAMEM_NOSYNC definition. Its name is not consistent withmiod2009-05-311-5/+1
| | | | | | other BUS_DMA_xxx flag names, and nothing uses it. ok many@
* The default initiator value is 0 on sgi IP27, IP30 and IP35 systems. Sincemiod2009-05-081-1/+17
| | | | they don't seem to have a valid NVRAM either, override the default value.
* Make SCSI isp(4) use the same SCSI initiator ID as the prom on sparc/sparc64.kettenis2008-06-011-1/+23
| | | | ok marco@, krw@, deraadt@
* Turns out I have an ISP 12160 myself, and it works fine on sparc64. Sincekettenis2008-05-281-3/+1
| | | | | | a fix has been made that might make the 10160 work too, enable support again. ok miod@
* Disable ISP10160 and ISP12160. They don't quite work yet, and people withkettenis2008-04-131-1/+3
| | | | | | another (working) isp(4) get hurt by this. ok krw@, deraadt@
* use the right capitalization for `QLogic'sobrado2008-01-211-3/+3
| | | | ok jsing@
* Obvious M_ZERO/bzero() change. Note that isp_param is void *, so thekrw2007-09-221-24/+20
| | | | | | | idiom 'malloc(sizeof(*isp_param) ...' is not possible. May even fix a couple of bugs. In two places 2*n was malloc'd, but only n was bzero'd.
* Set ISP_CFG_NOVRAM for Sun-branded ISP2200's that don't have an NVRAM fitted.kettenis2007-02-281-2/+18
| | | | | | | Avoids the "invalid NVRAM" message on the Blade 1000 and other machines with onboard isp(4). ok deraadt@
* do not inline pci_mapreg_map() anymore as it is olrite now; brad@ okmickey2005-09-111-22/+9
|
* do not set PCI_COMMAND_MASTER_ENABLE explicitly as it's already set in pcisubmatch(); kettenis@ testing; brad@ okmickey2005-08-091-2/+2
|
* recognize Dell OEM 2312 card.brad2005-04-081-2/+12
| | | | From FreeBSD
* Mark u_int64_t constants with ULL to make gcc3 happy.grange2003-12-061-3/+3
| | | | ok drahn@
* fix probing for ami raid owned hba properly; mjacob@ okmickey2003-06-261-2/+2
|
* Use new pci_matchbyid routine. Add (unable to test, no h/w) 10160 support.mjacob2003-03-031-32/+53
| | | | | | | Use correct size to zero sdparam area for 12160. Compile tested: sparc64, sparc run tested: sparc64 (2200, 1040), sparc (sbus isp)
* take too. patch ahs to screw up once in a whilemickey2003-02-281-9/+1
|
* remove non-typo changes. sorry folksmickey2003-02-281-1/+4
|
* typo; from weissmanndudemickey2003-02-281-1/+6
|
* Set all 23XX cards as 'touched' (we have trouble, unpredictably, aboutmjacob2002-08-171-2/+17
| | | | | | | | | running ABOUT FIRMWARE with some that were started by BIOS downloads). Fix the incorrect parsing of the Risc2Host isr. For RIO_16, fast posting command completion, and fast post CTIO completion, the upper half of Risc2Host is a copy of mailbox #1- *not* mailbox #0.
* Handle the removal of 'const' from structure definition.mjacob2002-05-171-9/+33
| | | | | | | | | | | | Do not attach to AMI Raid Units (known via Sub Vendor ID) because they really *aren't* quite a QLogic ISP device, now are they? Split 2300 from 2312 types. Turn off pci parity for 2300s (per QLogic errata). Add missing ISPR2HST_RIO_16 case. At isp_pci_reset1 time, turn on interrupts if we say it's okay to do so.
* Major restructuring for swizzling to the request queue and unswizzling frommjacob2001-12-141-89/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the response queue. Instead of the ad hoc ISP_SWIZZLE_REQUEST, we now have a complete set of inline functions in isp_inline.h. Each platform is responsible for providing just one of a set of ISP_IOX_{GET,PUT}{8,16,32} macros. The reason this needs to be done is that we need to have a single set of functions that will work correctly on multiple architectures for both little and big endian machines. It also needs to work correctly in the case that we have the request or response queues in memory that has to be treated specially (e.g., have ddi_dma_sync called on it for Solaris after we update it or before we read from it). One thing that falls out of this is that we no longer build requests in the request queue itself. Instead, we build the request locally (e.g., on the stack) and then as part of the swizzling operation, copy it to the request queue entry we've allocated. I thought long and hard about whether this was too expensive a change to make as it in a lot of cases requires an extra copy. On balance, the flexbility is worth it. With any luck, the entry that we build locally stays in a processor writeback cache (after all, it's only 64 bytes) so that the cost of actually flushing it to the memory area that is the shared queue with the PCI device is not all that expensive. We may examine this again and try to get clever in the future to try and avoid copies. Another change that falls out of this is that MEMORYBARRIER should be taken a lot more seriously. The macro ISP_ADD_REQUEST does a MEMORYBARRIER on the entry being added. But there had been many other places this had been missing. It's now very important that it be done. For OpenSD, it does a ddi_dmamap_sync as appropriate. This gets us out of the explicit ddi_dmamap_sync on the whole response queue that we did for SBus cards at each interrupt. Now, because SBus/sparc doesn't use bus_dma, some shenanigans were done to support this. But Jason was nice enough to test the SBus/sparcv9 changes for me, and they did the right thing as well. Set things up so that platforms that cannot have an SBus don't get a lot of the SBus code checks (dead coded out). Additional changes: Fix a longstanding buglet of sorts. When we get an entry via isp_getrqentry, the iptr value that gets returned is the value we intend to eventually plug into the ISP registers as the entry *one past* the last one we've written- *not* the current entry we're updating. All along we've been calling sync functions on the wrong index value. Argh. The 'fix' here is to rename all 'iptr' variables as 'nxti' to remember that this is the 'next' pointer- not the current pointer. Devote a single bit to mboxbsy- and set aside bits for output mbox registers that we need to pick up- we can have at least one command which does not have any defined output registers (MBOX_EXECUTE_FIRMWARE). Explicitly decode GetAllNext SNS Response back *as* a GetAllNext response. Otherwise, we won't unswizzle it correctly. Nuke some additional __P macros.
* Switch everything to the new bus_dmamap_sync API.art2001-11-051-13/+5
| | | | | Most work by Wilbern Cobb <vedge@csoft.org> with some fixes from me, mickey@ and drahn@.
* Fix various 2300 (2Gb) last minute errata. Keep up with the jones' formjacob2001-10-061-1/+5
| | | | the target mode code.
* If we field an interrupt, return to the caller that we did so. Otherwise,mjacob2001-09-291-2/+2
| | | | | | | on some platforms, after a while they'll think it's all spurious and disconnect the interrupt routing. Thereupon Bad Things Happen (tm). Approved by: Theo.
* Catch up with mainline of code development.mjacob2001-09-011-68/+221
| | | | | | | | | | | | | Add support for 2 Gigabit cards (2300/2312). This necessitated a change in how interrupts are down- the 23XX has not only a different place to check for an interrupt, but unlike all other QLogic cards, you have to read the status as a 32 bit word- not 16 bit words. Rather than have device specific functions as called from the core module (in isp_intr), it makes more sense to have the platform/bus modules do the gruntwork of splitting out the isr, semaphore register and the first outgoing mailbox register (if needed) *prior* to calling isp_intr (if calling isp_intr is necessary at all). Rearchitect how regular SCSI parameters are stored or used.
* Yup, I managed to fat finger all three of these while doing bus_dmamap_sync()jason2001-08-261-3/+3
| | | | conversion (luckily only sparc64 uses the 5 arg form so far =)
* deal with 5 arg for of bus_dmamap_sync() if availablejason2001-08-251-6/+16
|
* Change pci_intr_map to take pci_attach_args as an argument.art2001-08-251-3/+2
| | | | | | | | | | | All callers actually took all arguments to pci_intr_map from pci_attach_args structs, so this simplifies code. This also allows more complicated interrupt assignment schemes like the one on sparc64. This makes sparc64 pci interrupts work. Inspired by the same change in NetBSD.
* No need to check M_WAIT/M_WAITOK malloc return values. (art@ ok)ho2001-05-161-9/+1
|
* Ansify. Fix botch that kept ISP 1020 firmware from being compiled in.mjacob2001-04-041-56/+29
| | | | Handles are 16 bits now.
* On alpha, we want to memory map. ok mjacob@nate2001-03-091-1/+5
|
* print the interrupt, and pack to one linederaadt2001-03-021-13/+15
|
* Sync up with other platforms - use a common string to complain aboutmjacob2001-02-121-48/+46
| | | | | | lack of parameter memory. Set logging defaults sanely. Set default node && port WWNs separate from other platforms. Make sure we set up HBA role correctly.
* quiet these puppies down- this OpenBSD, not some callow system like NetBSDmjacob2000-10-161-7/+4
|