summaryrefslogtreecommitdiff
path: root/sys/dev/ic/mpi.c
AgeCommit message (Collapse)Author
2006-08-03always call scsi_done at splbio. issue found by pedro@David Gwynne
while here protect submission of the scsi command with splbio as well.
2006-07-15set the tags on the scsi command according to what the midlayer says theyDavid Gwynne
should be.
2006-07-15have a go at configuring spi variants to only talk to the devices at theDavid Gwynne
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.
2006-07-09spacingDavid Gwynne
2006-07-09enabling interrupts doesnt deserve an XXX. i think we want to do that.David Gwynne
2006-07-09implement firmware upload. this frees up memory on some controllers so theyDavid Gwynne
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.
2006-07-06fix debugging stuffDavid Gwynne
2006-07-06after walking the attached devices and running ppr against them, then fetchDavid Gwynne
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.
2006-07-06do not stash pages 2 and 3 (the volume and physdisk pages respectively)David Gwynne
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.
2006-07-06stash a pointer to the scsibus attached to us so we dont have to walk theDavid Gwynne
device tree all the time.
2006-07-05check if the requests for the config pages were completed successful,David Gwynne
rather than just completed.
2006-06-30Unbreak the tree; cast the result of sizeof() to u_int32_t before passing itMark Kettenis
to htole32(). "go for it" miod@
2006-06-30tabs, not spacesDavid Gwynne
2006-06-30add mpi_inq. this is a custom io function that does an inquiry againstDavid Gwynne
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@
2006-06-29split some fields up in the spi port and dev config pages. makes the pprDavid Gwynne
code easier since we dont have to byteswap and shift stuff around so much. no functional change though.
2006-06-29theres a ton of 32bit fields in mpi messages that have subfields that lieDavid Gwynne
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.
2006-06-19Everytime one forgets an argument in a printf-like function call, God killsMiod Vallat
a kitten. Commiters, please think of the kittens when working on code.
2006-06-18Make mpi not spit out WWNN and WWPN as requested by deraadt and dlg. DoMarco Peereboom
store these values in the scsi_link structure for each device. ok dlg.
2006-06-18Don't walk memory whenever there is nothing there. I ran into this whileMarco Peereboom
debugging FC stuff.
2006-06-18Print World Wide Node Name and World Wide Port Name during dmesg so thatMarco Peereboom
we can actually find the drives on the fabric. Requested by kettenis krw and brad. ok dlg
2006-06-16vmware emulates mpi, but it does a half arsed job of it. half the fieldsDavid Gwynne
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@
2006-06-15Add detection of RAID volume during PPR. Doesn't fan out the ppr to individualMarco Peereboom
devices yet.
2006-06-15Add IOC page 3 support. Needed for RAID and bio.Marco Peereboom
2006-06-15Print volume details in debug.Marco Peereboom
2006-06-15And now without a buffer overflow. Pointed out by dlg. No cookie for me.Marco Peereboom
2006-06-15Add structures and initial code to retrieve IOC page 2. We need this forMarco Peereboom
RAID support and bio. "go at it" dlg
2006-06-15Print some useful error information during failure. We need this to be ableMarco Peereboom
to diagnose field issues. Talked through with dlg.
2006-06-13we sometimes bundle chunks that the ioc will write to in the request spaceDavid Gwynne
as well as the request itself, so we need to sync the memory in both directions for dma.
2006-06-12i stashed the dva and kva of each request space in its ccb, so why am iDavid Gwynne
recalculating them whenever i want to use them? shorten code a bit by using the stored values.
2006-06-12fix sgl loading. there were a few issues, the main ones being:David Gwynne
- 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@
2006-06-12reset the reply pointer to NULL every time we get a context reply inDavid Gwynne
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.
2006-06-12white space fixesDavid Gwynne
2006-06-12Initial version of dv for scsi. Work based on dlg's code.Marco Peereboom
ok dlg
2006-06-10Make id in mpi_complete an unused value instead of random stack garbage.Marco Peereboom
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.
2006-06-10if we're not reading a page then we're writing a page. stupid braino fromDavid Gwynne
me pointed out by marco.
2006-06-10Redo debug prints to make it less loud and more granular.Marco Peereboom
ok dlg
2006-06-08unsigned long long -> u_int64_tDavid Gwynne
2006-06-08dont panic on empty portfacts or portenable replies. we should probablyDavid Gwynne
retry the init sequence if this happens.
2006-06-06set the ccb state when it comes off the free list. this isnt used anywhereDavid Gwynne
yet, but i like to be ready when the time comes.
2006-06-06fix a panic string to mention the corrent place its freaking out in.David Gwynne
2006-06-01leave the reply_dva address alone so we can post it back to the ioc ratherDavid Gwynne
than posting back the offset of the reply frame to the start of the reply space. nobody likes panics, even if theyre free.
2006-06-01fix the reply handling on crazy machines that give me bits in the high partDavid Gwynne
of the address.
2006-06-0164 bit dva addresses so we can >> 32 later; ok dlgTheo de Raadt
2006-05-31byteswap the ioc_status field so we can respond to scsi things properly onDavid Gwynne
bigendian archs. this lets ses attach now.
2006-05-31remove the fetching of the manufacturing page. it was just there to see ifDavid Gwynne
i got the page fetching right, its not really useful for anything in the real world.
2006-05-31mpi hardware uses an 8 bit field to describe the number of devices it hasDavid Gwynne
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.
2006-05-31dont display the first manufacturing pageDavid Gwynne
2006-05-31c++ style comments shouldnt be in the treeDavid Gwynne
2006-05-31int32 i >> 32 is undefined, so cast to unsigned long long first, ok dlgTheo de Raadt
2006-05-31implement chained scatter gather lists.David Gwynne