summaryrefslogtreecommitdiffstats
path: root/sys/dev/ic/mpi.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* 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.
* fix the reply handling on crazy machines that give me bits in the high partdlg2006-06-011-11/+12
| | | | of the address.
* 64 bit dva addresses so we can >> 32 later; ok dlgderaadt2006-06-011-3/+3
|
* byteswap the ioc_status field so we can respond to scsi things properly ondlg2006-05-311-2/+2
| | | | bigendian archs. this lets ses attach now.
* remove the fetching of the manufacturing page. it was just there to see ifdlg2006-05-311-28/+1
| | | | | i got the page fetching right, its not really useful for anything in the real world.
* mpi hardware uses an 8 bit field to describe the number of devices it hasdlg2006-05-311-3/+3
| | | | | | | | | on a port. since 256 wont fit into 8 bits they say 0 means 256. this diff does the appropriate interpretation. it also avoids a divide by zero when we figure the openings out by dividing the number of commands the controller can support by the number of devices it supports. panic found while testing the fc controller at home.
* dont display the first manufacturing pagedlg2006-05-311-6/+1
|
* c++ style comments shouldnt be in the treedlg2006-05-311-3/+5
|
* int32 i >> 32 is undefined, so cast to unsigned long long first, ok dlgderaadt2006-05-311-4/+4
|
* implement chained scatter gather lists.dlg2006-05-311-23/+76
|
* raise the timeout on the init commands (especially port enable) to givedlg2006-05-301-7/+5
| | | | | the sas controller currently being used in jasons blade 2000 a chance to respond.
* hush; ok dlgjason2006-05-301-2/+2
|
* increase the timeout on the enabling commands during attach so that sasdlg2006-05-291-5/+5
| | | | controllers have a chance to respond.
* limit the number of scatter gather entries sent with the scsi_io commandsdlg2006-05-291-3/+8
| | | | | so it fits in the maximum request frame size. this will do until i can write sgl chaining in a nice way.
* put the 64bit flag in the right place on the scatter gather list.dlg2006-05-291-4/+3
|
* split mpi_poll out into mpi_complete, and rewrite poll to use start anddlg2006-05-291-18/+36
| | | | | complete to do its job. enforce the use of a timeout on polled commands and make the callers check if the timeout happened.
* remove some if 0 codedlg2006-05-291-7/+1
|
* bump mpi up to using 64bit for all dvadlg2006-05-291-41/+72
|