summaryrefslogtreecommitdiffstats
path: root/sys/dev/ic/qla.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Since dlg@'s 2009 scsi midlayer refactoring the 'struct scsi_generic *cmd'krw2020-09-221-2/+2
| | | | | | | | | | | | member of 'struct scsi_xfer' has always been pointed at the 'struct scsi_generic cmdstore' member of the same instance. So nuke 'cmdstore' and remove the '*' from cmd. Take the address of cmd as required by the various casts. No intentional functional change. luna88k test by aoyama@, sparc64 test by jmatthew@ Identification of 2009's last *cmd use and ok jmatthew@
* Move remaining scsi bus initialization info from "prototype scsi link"krw2020-07-201-15/+14
| | | | | | | fields to struct scsibus_attach_args. Nuke the struct scsi_link * (saa_sc_link) in scaibus_attach_args. Explicitly initialize each field in scsibus_attach_args variables.
* Move the adapter related items (luns, adapter, adapter_target,krw2020-07-191-9/+10
| | | | | | | adapter_buswidth, adapter_softc) from struct scsi_link to struct scsibus_attach_args. Additional compile tests by jmatthew@ (sparc64) and aoyam@ (luna88k).
* Access adapter softc via link->bus->sb_adapter_softc.krw2020-07-161-3/+3
| | | | | | | | In sparc64 autoconf access 'luns' via sb_luns and 'adapter_buswidth' via sb_adapter_buswidth. Removes last post-config uses of the copies of bus related information in scsi_link.
* Expunge some Captain Obvious comments, tweak whitespace a bit, move a debugkrw2020-07-111-3/+1
| | | | statement. All to make upcoming diff(s) smaller and easier to read.
* No need to bzero()/memset() 'struct scsibus_attach_args' variableskrw2020-06-271-2/+1
| | | | immediately before initializing the only field in the struct.
* Replace TAILQ concatenation loop with TAILQ_CONCATbket2020-06-271-8/+4
| | | | | | While here remove some whitespace. OK millert@
* Use SDEV_NO_ADAPTER_TARGET instead of the value of adapter_buswidth tokrw2020-06-241-2/+2
| | | | | | indicate the adapter is not a target on the bus. ok dlg@ as part of a larger diff.
* Nuke unnecessary abstraction 'scsi_minphys()' which just callskrw2020-02-051-2/+2
| | | | | | 'minphys()'. Just use & check for NULL instead, since 'minphys()' is always called on the code path ([cd|sd|st]minphys) that calls physio().
* Use a consistant idiom/format when declaring scsi_adapter structureskrw2020-01-231-6/+2
| | | | | | | | | | | in drivers. Terse one liners, NULLs instead of 0's, explicitly specify all members, etc. Nuke #ifdef notyet blocks related to the scsi_adapter in aic. No intentional functional change. ok tedu@
* convert infinite msleep(9) to msleep_nsec(9)jsg2019-12-311-3/+3
| | | | ok mpi@ bluhm@
* Use the defines DETACH_FORCE and DETACH_QUIET when constructing a valuekrw2019-08-201-3/+5
| | | | | | that will end up in config_detach() flags via scsi_detach_target(). ok jmatthew@ dlg@
* use byte swapping loads and stores.dlg2017-06-051-17/+26
| | | | | | shrinks the code a bit on sparc64. ok jmatthew@
* Use header <sys/atomic.h> rather than <machine/atomic.h> in MI code.visa2017-01-241-2/+2
| | | | OK mpi@ deraadt@
* make qla_iocb_seg structs 4 byte aligned and use htolem32 to set it.dlg2016-05-101-3/+6
| | | | | | shaves ~256 bytes off of qla_put_data_seg on sparc64 ok kettenis@ jmatthew@
* sizes for free(); ok jmatthewderaadt2015-09-071-12/+13
|
* fairly simple sizes for free(); ok teduderaadt2015-08-281-3/+3
|
* remove isp(4) now that the ql* family have replaced itjmatthew2015-06-191-4/+4
|
* Remove some includes include-what-you-use claims don'tjsg2015-03-141-2/+1
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* turn off QLA_DEBUG noise, requested by deraadt@jmatthew2015-02-091-3/+1
|
* we want to defer work traditionally (in openbsd) handled in andlg2015-02-091-2/+2
| | | | | | | | | | | | | | | | | | | | | interrupt context to a taskq running in a thread. however, there is a concern that if we do that then we allow accidental use of sleeping APIs in this work, which will make it harder to move the work back to interrupts in the future. guenther and kettenis came up with the idea of marking a proc with CANTSLEEP which the sleep paths can check and panic on. this builds on that so you create taskqs that run with CANTSLEEP set except when they need to sleep for more tasks to run. the taskq_create api is changed to take a flags argument so users can specify CANTSLEEP. MPSAFE is also passed via this flags field now. this means archs that defined IPL_MPSAFE to 0 can now create mpsafe taskqs too. lots of discussion at s2k15 ok guenther@ miod@ mpi@ tedu@ pelikan@
* remove the second void * argument on tasks.dlg2015-01-271-5/+5
| | | | | | | | | | | | | | | | | | | | | when workqs were introduced, we provided a second argument so you could pass a thing and some context to work on it in. there were very few things that took advantage of the second argument, so when i introduced pools i suggested removing it. since tasks were meant to replace workqs, it was requested that we keep the second argument to make porting from workqs to tasks easier. now that workqs are gone, i had a look at the use of the second argument again and found only one good use of it (vdsp(4) on sparc64 if you're interested) and a tiny handful of questionable uses. the vast majority of tasks only used a single argument. i have since modified all tasks that used two args to only use one, so now we can remove the second argument. so this is a mechanical change. all tasks only passed NULL as their second argument, so we can just remove it. ok krw@
* another handful of bcopy -> memcpy because there is no overlapderaadt2014-12-191-2/+2
|
* remove uneeded proc.h includesjsg2014-09-141-2/+2
| | | | ok mpi@ kspillner@
* Replace all queue *_END macro calls except CIRCLEQ_END with NULL.doug2014-09-131-2/+2
| | | | | | | | CIRCLEQ_* is deprecated and not called in the tree. The other queue types have *_END macros which were added for symmetry with CIRCLEQ_END. They are defined as NULL. There's no reason to keep the other *_END macro calls. ok millert@
* Some reallocarray() use; review Jean-Philippe Ouellet, patrick keshishianderaadt2014-07-131-2/+2
| | | | ok tedu
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-121-16/+16
| | | | after discussions with beck deraadt kettenis.
* We only have one possible location to use for a logged in port, so only setjmatthew2014-05-211-5/+2
| | | | it in one place.
* When the firmware tells us a loop id is already in use, add the devicejmatthew2014-05-171-29/+58
| | | | | | | | | there to our port lists, then find the next available loop id and carry on rather than restarting. This way, we're less likely to get stuck looping when the firmware behaves inconsistently. We also don't need to treat domain controller logins specially. additional complications discovered by deraadt@
* transplant hotplug code over from qle(4)jmatthew2014-04-271-104/+516
|
* In qla_get_port_name_list, handle malloc failure, skip special fabric ports,jmatthew2014-04-211-3/+27
| | | | and set location on ports as best we can. Take the port mutex too.
* Always copy out all mailbox registers and use msleep in a loop to ensure thatjmatthew2014-04-141-59/+59
| | | | post-attach mailbox operations work reliably.
* In debug output, print loop ids as decimals and port ids as 24bit hex.jmatthew2014-04-131-10/+9
| | | | Fix some parameters and wording too.
* When iterating through fabric ports, start at our own port ID. It doesn'tjmatthew2014-04-071-2/+3
| | | | | | matter if we don't see ourselves, and if we pick another starting point, the first port we see might disappear half way through (I have seen this happen), which makes it more complicated to identify when we're back at the start.
* ISP2322 chips need a different firmware image to other 2300s, so until wejmatthew2014-04-071-15/+38
| | | | add that, don't try loading firmware for them.
* set adapter buswidth according to the number of loop ids supported by thejmatthew2014-04-051-4/+8
| | | | | | firmware (2048 for 2k login firmware, 256 otherwise) pointed out by deraadt@, ok dlg@
* Rework the command polling loop so it can handle multiple responses in a singlejmatthew2014-04-041-29/+17
| | | | | | | | interrupt. With this we can talk to Hitachi disk arrays, which sometimes return so much sense data that a status continuation response is generated in addition to the normal status response. tested by deraadt@
* Rather than scanning local loop ids sequentially, just ask the chip whichjmatthew2014-03-311-14/+63
| | | | | local devices it has logged in to. This will also be useful for hotplug later on.
* when built without firmware, check that the chip already has firmwarejmatthew2014-02-231-32/+32
| | | | | before trying to boot it, so we can explain why it's not working rather than printing cryptic errors.
* refactor firmware loading with a function pointerderaadt2014-02-221-57/+25
| | | | ok jmatthew
* More turd shining; cleanup the message that prints the firmware revision andkettenis2014-02-201-3/+3
| | | | | | attributes. ok dlg@, jmatthew@
* Avoid printing the "nvram corrupt" message for onboard 2200s found on Sunkettenis2014-02-201-2/+8
| | | | | | hardware. ok dlg@, jmatthew@
* jsg@ pointed out i am bad at loops.dlg2014-02-201-6/+4
|
* knfdlg2014-02-201-2/+2
|
* pull the isr reads out into per chip variants we get to via pointersdlg2014-02-201-67/+69
| | | | | | | | in a per generation structure. this avoids code on every isr to figure out what version of the chip we are, which is silly since we know that at attach time. ok jmatthew@
* tweak the response queue handling so it looks like qle. the importantdlg2014-02-191-89/+74
| | | | | | | | | | | | | bit is to post to the resp_out register once outside the loop rather than inside every loop. rework the code for finding the queue registers so its done once on attach by pointing the sc at a map, rather than running big conditionals in code on every register operation based on teh chip version. tested on 2200s by me and 2312s by jmatthew@ ok jmatthew@
* remove some dead code - all the chips we handle can do type 4 commands,jmatthew2014-02-191-22/+1
| | | | | which means we don't need to use sgl continuation command buffers. this keeps things much simpler on the iopool side of things.
* convert printfs into a few different debug categories, leaving portjmatthew2014-02-181-64/+100
| | | | discovery stuff enabled for now.
* fix endianness of fc4 type registration (again), and don't bother printingjmatthew2014-02-111-4/+4
| | | | the fc4 types for fabric ports we find
* 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@