summaryrefslogtreecommitdiffstats
path: root/sys/dev/ic/mpi.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* deref the right rcb by using i as the index, not 1 all the time.dlg2006-09-211-2/+2
|
* start cleaning up the completion path for event notifications.dlg2006-09-211-19/+19
|
* add a debug flag type thing for event handlingdlg2006-09-211-1/+2
|
* wrap the hardware replies up in a structure called mpi_rcb which isdlg2006-09-211-37/+48
| | | | | | | | similair to the one used for requests. take the reply bits out of the ccb, but point it at the rcb instead. this lets us defer processing of the reply some time after we reuse or free the ccb.
* factor the common code out of mpi_intr and mpi_complete. they weredlg2006-09-211-98/+56
| | | | basically identical apart from the conditions they looped on.
* macros and types for event notifications from the hardware.dlg2006-09-181-2/+2
|
* There's no need to walk the list of devices to find the SCSI bus wepedro2006-09-181-10/+4
| | | | | should attach to, since config_found() already returns a pointer to it. Pointed out by Quentin Garnier, okay dlg@.
* rework the handling of the errors coming off the hardware at the bottom ofdlg2006-09-161-47/+2
| | | | | | mpi_scsi_cmd_done. this makes it more appropriate for our midlayer. ok beck@ deraadt@
* dont print debug output when the scsi completion path returns withdlg2006-08-241-29/+28
| | | | | | | something other than SCSI_OK. for example, SCSI_SENSE is returned when the device has sense data. this code was left in to help debug problems in the field, but noones had any problems with mpi apart from it being too chatty when a device returns sense data...
* always call scsi_done at splbio. issue found by pedro@dlg2006-08-031-4/+9
| | | | while here protect submission of the scsi command with splbio as well.
* set the tags on the scsi command according to what the midlayer says theydlg2006-07-151-1/+6
| | | | should be.
* have a go at configuring spi variants to only talk to the devices at thedlg2006-07-151-2/+40
| | | | | | lowest possible speeds during inquiry and attach. some devices, like tapes and enclosures, dont like being probed at high speeds and can attach as weird things. this seems to help those devices.
* spacingdlg2006-07-091-40/+12
|
* enabling interrupts doesnt deserve an XXX. i think we want to do that.dlg2006-07-091-2/+2
|
* implement firmware upload. this frees up memory on some controllers so theydlg2006-07-091-1/+83
| | | | | | can do more io at a time. tested on the onboard controllers of a dell 2850 (which can do it) and a pci controller on my home box (which doesnt). this was the last feature mpt had that mpi was behind on.
* fix debugging stuffdlg2006-07-061-2/+2
|
* after walking the attached devices and running ppr against them, then fetchdlg2006-07-061-16/+77
| | | | | | | the ioc page 3 for a list of all the physical disks behind any configured volumes and run ppr against them too. raid volumes on scsi mpi is fast now.
* do not stash pages 2 and 3 (the volume and physdisk pages respectively)dlg2006-07-061-55/+57
| | | | | | | | | | | of the ioc config in the softc. instead, we only walk page 2 when we get the raid config and mark each disks scsi_link structure with the SDEV_LOGICAL flag when we find volumes. while there we mark this instance of the driver as being capable of doing raid so later on we can conditionally hook up bio. when we walk the devices attached to mpi to do ppr, we now skip the logical disks.
* stash a pointer to the scsibus attached to us so we dont have to walk thedlg2006-07-061-18/+11
| | | | device tree all the time.
* check if the requests for the config pages were completed successful,dlg2006-07-051-15/+12
| | | | rather than just completed.
* Unbreak the tree; cast the result of sizeof() to u_int32_t before passing itkettenis2006-06-301-2/+2
| | | | | to htole32(). "go for it" miod@
* tabs, not spacesdlg2006-06-301-3/+3
|
* add mpi_inq. this is a custom io function that does an inquiry againstdlg2006-06-301-3/+82
| | | | | | | | | either a normal target, or against a physical disk using the raid passthru command. it is necessary since the normal io path can only be used by the midlayer, and only against normal targets. this will be used for ppr against the disks in raid volumes on scsi controllers. tested by marco@
* split some fields up in the spi port and dev config pages. makes the pprdlg2006-06-291-53/+46
| | | | | code easier since we dont have to byteswap and shift stuff around so much. no functional change though.
* theres a ton of 32bit fields in mpi messages that have subfields that liedlg2006-06-291-4/+4
| | | | | | | | on byte boundaries. so rather than byteswappping and bitshifting the values in these subfields around we can break them up into byte fields and access them directly. this breaks up the control field in the scsi io command.
* Everytime one forgets an argument in a printf-like function call, God killsmiod2006-06-191-2/+3
| | | | a kitten. Commiters, please think of the kittens when working on code.
* Make mpi not spit out WWNN and WWPN as requested by deraadt and dlg. Domarco2006-06-181-11/+16
| | | | | | store these values in the scsi_link structure for each device. ok dlg.
* Don't walk memory whenever there is nothing there. I ran into this whilemarco2006-06-181-1/+5
| | | | debugging FC stuff.
* Print World Wide Node Name and World Wide Port Name during dmesg so thatmarco2006-06-181-3/+71
| | | | | | | we can actually find the drives on the fabric. Requested by kettenis krw and brad. ok dlg
* vmware emulates mpi, but it does a half arsed job of it. half the fieldsdlg2006-06-161-2/+6
| | | | | | | | | | | | we read off the hardware and use to configure the driver with are set to zero, so things dont really work like we want them to. one of these fields is the pci subsystem id which is something we can fetch really early in the attach process. so if the subsys is 0 then we go on and fix up some of the values we get off the "hardware". now we can attach disks on vmware. "sneaky" and ok marco@ tested by and ok brad@
* Add detection of RAID volume during PPR. Doesn't fan out the ppr to individualmarco2006-06-151-2/+13
| | | | devices yet.
* Add IOC page 3 support. Needed for RAID and bio.marco2006-06-151-7/+33
|
* Print volume details in debug.marco2006-06-151-1/+12
|
* And now without a buffer overflow. Pointed out by dlg. No cookie for me.marco2006-06-151-5/+8
|
* Add structures and initial code to retrieve IOC page 2. We need this formarco2006-06-151-2/+34
| | | | RAID support and bio. "go at it" dlg
* Print some useful error information during failure. We need this to be ablemarco2006-06-151-39/+33
| | | | to diagnose field issues. Talked through with dlg.
* we sometimes bundle chunks that the ioc will write to in the request spacedlg2006-06-131-4/+7
| | | | | as well as the request itself, so we need to sync the memory in both directions for dma.
* i stashed the dva and kva of each request space in its ccb, so why am idlg2006-06-121-7/+7
| | | | | recalculating them whenever i want to use them? shorten code a bit by using the stored values.
* fix sgl loading. there were a few issues, the main ones being:dlg2006-06-121-9/+17
| | | | | | | | | | | - when the sgl grew too large it became bigger than the maximum frame size that the ioc would deal with, and then it would just stop doing io. i was using the wrong field from iocfacts to figure out how large an sgl should be. - chained sgls were broken cos i was including the current chain element in the calculation of the offset to the next chain element. big ok from marco@
* reset the reply pointer to NULL every time we get a context reply indlg2006-06-121-3/+7
| | | | | mpi_interrupt and mpi_completion. if we got an address reply followed by a context reply we used to pass that same reply to both completion routines.
* white space fixesdlg2006-06-121-29/+29
|
* Initial version of dv for scsi. Work based on dlg's code.marco2006-06-121-17/+310
| | | | ok dlg
* Make id in mpi_complete an unused value instead of random stack garbage.marco2006-06-101-2/+2
| | | | | | This was causing the "empty portfacts" issue since the IOC wasn't complete yet with the request however since the id would match the requested id the timeout was a terminal condition.
* if we're not reading a page then we're writing a page. stupid braino fromdlg2006-06-101-2/+2
| | | | me pointed out by marco.
* Redo debug prints to make it less loud and more granular.marco2006-06-101-237/+232
| | | | ok dlg
* unsigned long long -> u_int64_tdlg2006-06-081-3/+3
|
* dont panic on empty portfacts or portenable replies. we should probablydlg2006-06-081-5/+9
| | | | retry the init sequence if this happens.
* set the ccb state when it comes off the free list. this isnt used anywheredlg2006-06-061-1/+3
| | | | yet, but i like to be ready when the time comes.
* fix a panic string to mention the corrent place its freaking out in.dlg2006-06-061-2/+2
|
* leave the reply_dva address alone so we can post it back to the ioc ratherdlg2006-06-011-5/+7
| | | | | | | than posting back the offset of the reply frame to the start of the reply space. nobody likes panics, even if theyre free.