summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/qle.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* apply the loop settle delay to handling of loop up and loop reset events,jmatthew2018-07-301-4/+36
| | | | so hotplug can be more reliable too.
* extend the loop settle time to 200ms, and adjust the check so that we'lljmatthew2018-07-301-11/+11
| | | | actually break out once the loop has been up for that long.
* don't dump status iocbs twicejmatthew2018-07-261-2/+1
|
* remove "bad startup mboxes" printf - it never indicates a real problem,jmatthew2018-07-261-3/+1
| | | | and it always happens on 25xx controllers.
* During attach, give the loop a while to settle before we start lookingjmatthew2018-07-031-4/+9
| | | | | | for targets. With some combinations of controllers and targets, the loop seems to bounce a bit, but with a short delay we can attach targets more reliably.
* If we're not on a fabric, we may still need to attach and detach targetsjmatthew2018-07-031-1/+5
| | | | as part of processing port database changes.
* Use header <sys/atomic.h> rather than <machine/atomic.h> in MI code.visa2017-01-241-2/+2
| | | | OK mpi@ deraadt@
* Don't copy more sense data than we have space for, so we don't crash whenjmatthew2015-09-111-3/+4
| | | | | | trying to talk to a Sun STK6140. Still doesn't work though. ok dlg@
* sizes for free(); ok jmatthewderaadt2015-09-061-22/+22
|
* Overallocate the data segment lists to ensure there's always space for thejmatthew2015-07-081-20/+14
| | | | | | | | terminating entry, return all 8 bits of the scsi status code, only set xs->resid on underruns (it's not defined for overruns), and simplify how data segment lists are constructed. with lots of help from and ok dlg@
* 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@
* 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@
* 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-17/+17
| | | | after discussions with beck deraadt kettenis.
* When the firmware tells us a loop id is already in use, add the devicejmatthew2014-05-211-31/+54
| | | | | | | 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.
* When the firmware has already allocated the handle we want to use to log injmatthew2014-04-271-4/+52
| | | | | | to a port, restart the update process to keep things in sync. Domain controller logins get special handling here because they don't show up in the list of logged in ports.
* Simplify the update process a bit. Don't try to skip parts based on whatjmatthew2014-04-211-9/+5
| | | | | we think might have changed, since the update steps depend on each other too much for that to really work anyway.
* Update hotplug. Add qle_get_port_name_list, use it to discover localjmatthew2014-04-201-132/+267
| | | | | | | | loop ports and other fabric ports that have logged in to us, and check that we're still logged in to other fabric ports. Rearrange the update processing loop so we attach and detach targets last, since we need to get all the way through before we've identified what's gone missing. Handle fabric port login errors a bit more usefully too.
* Implement qle_fabric_plogo and let qle_fabric_plogi look at the response thatjmatthew2014-04-181-23/+69
| | | | comes back, so later on we can work out what to do when logins fail
* Rework the command polling loop so it can handle multiple responses in a singlejmatthew2014-04-181-28/+17
| | | | interrupt, as done in qla(4).
* When iterating through fabric ports, start at our own port ID, so we canjmatthew2014-04-171-2/+2
| | | | reliably tell when we've been through the whole list.
* Copy out all mbox registers after a mailbox operation completes.jmatthew2014-04-171-56/+42
| | | | | Simplifies things a bit and makes pre- and post- attach operations work the same.
* In debug output, print loop ids as decimals and port ids as 24bit hex.jmatthew2014-04-171-8/+8
| | | | Fix some parameters and wording too.
* qle dvas straddle 4 byte boundaries, so best to treat them as twodlg2014-03-311-6/+15
| | | | | | u_int32_ts rather than u_int64_ts. ok jmatthew@
* move to htolemXX and lemtohXX. interestingly, this caught a few typedlg2014-03-271-33/+31
| | | | | | errors which may have affected operation on BE archs. ok jmatthew@
* when working with the cdb its better to use cmdlen than datalen.dlg2014-03-251-2/+2
| | | | ok jmatthew@
* rework qle_put_cmd to use hto[lb]emXX as best it can.dlg2014-03-251-18/+23
| | | | ok jmatthew@
* use htolem32 to write out qle sg elements, and annotate the structure asdlg2014-03-251-24/+25
| | | | | | | | | | being 4 byte aligned. rewrite qle_put_data_seg so it takes an address and length rather than a dma descriptor so it can be used to write sges for arbitrary things rather than just dmamaps. use it to write out all sges. ok jmatthew@
* Print interrupt string *after* establishing it.kettenis2014-03-091-4/+9
| | | | | Requested by miod@ (since xbow(4) on sgi secretly modifies the string behind out back when interrupts get established).
* convert most printfs into DPRINTFs to cut down on dmesg spam, and addjmatthew2014-02-251-76/+120
| | | | some missing format arguments pointed out by jsg@
* rework firmware handling a bit. when built without firmware, check thatjmatthew2014-02-231-30/+71
| | | | | the chip already has firmware before trying to boot it, so we can explain why it's not working rather than printing cryptic errors.
* More turd shining; cleanup the message that prints the firmware revision andkettenis2014-02-201-3/+3
| | | | | | attributes. ok dlg@, jmatthew@
* Unbreak the tree; include <machine/atomic.h> instead of relying on somethingkettenis2014-02-191-1/+2
| | | | else bringing it in. Found out the hard way by florian@
* the RESP_IN register is 32bits, so consistently use a u_int32_t todlg2014-02-191-4/+4
| | | | | | handle it. ok jmatthew@
* massage the response queue handling a bit:dlg2014-02-191-17/+13
| | | | | | | | | break if we've already handled the queue rather than printf something. complete all the pending entries before posting what we've done instead of after each entry. ok jmatthew@
* qle seems fine with msi interruptsdlg2014-02-191-2/+2
| | | | ok jmatthew@
* use the DEVNAME macro to get the name of the interrupt rather than thedlg2014-02-171-2/+2
| | | | | | xname lookup by hand. for consistency. ok jmatthew@
* use a bus_space subregion to talk to the mbox registers so you candlg2014-02-171-13/+20
| | | | | | | do the maths for getting the different offset for 24xx and 25xx once in attach rather than on every read and write. ok jmatthew@
* make ISP_NOFIRMWARE work here toojmatthew2014-02-151-2/+9
|
* fix endianness of luns in iocbsjmatthew2014-02-151-3/+3
|
* isp25xx nvram is at a different base addressjmatthew2014-02-141-3/+11
|
* add isp25xx support. no real differences from 24xx, at least with the wayjmatthew2014-02-141-19/+30
| | | | | | we drive the card. tested with a card supplied by Mark Greenway at UQ.
* Introduce qle(4), a new driver for QLogic ISP24xx fibre channel HBAs.jmatthew2014-02-121-0/+2614
While this looks a lot like qla(4), there were a lot of minor changes between the 23xx and 24xx generations that mean that there isn't really all that much shared code.