summaryrefslogtreecommitdiff
path: root/sys/dev/ic/mpi.c
AgeCommit message (Collapse)Author
2007-09-12always tag fibre channel commands.David Gwynne
ok marco@
2007-09-11KNFGilles Chehade
prompted and "much better" by marco@, ok pyr@
2007-09-07take advantage of the new M_ZERO malloc flag.David Gwynne
2007-06-12add M_CANFAIL to malloc() flags, requested byThordur I. Bjornsson
marco after I showed him a diff to remove the malloc retun values since they are all called with M_WAITOK. ok marco@
2007-05-31remove the scsi task thread, and replace it with the system workq.David Gwynne
"just :wq and do it" tedu@
2007-04-03modernise scsi_inquiry. the length field has grown and now theres pages toDavid Gwynne
query. ok krw@
2007-03-17replace the VMWARE quirk that restricts the bus width to 16 targets withDavid Gwynne
one for all SPI controllers. krw has a sun machine with a 1030 that gets the bus width wrong too, so since vmware emulates that type of hardware too, we can just limit the lot of them and forget about it.
2006-11-28give scsi controllers a real attach args to fill in when attaching scsibus.David Gwynne
ok miod@ marco@ deraadt@
2006-11-28unhandled ioctls return ENOTTY, not 0David Gwynne
2006-11-28remove dead codeDavid Gwynne
2006-11-26use scsi_detach_target when a device dissapears, rather than usingDavid Gwynne
config_detach and cleaning the midlayer up ourselves.
2006-11-25remove a comment which is now untrue after i fixed itDavid Gwynne
2006-10-22oops, the eventnotify stuff was accidentally enabled with the scsiconfDavid Gwynne
changes. its not ready yet, so disable it again.
2006-10-21rework the bus scanning code by splitting it out into separate functionsDavid Gwynne
for walking the bus and targets, and probing the luns. this removes the need to use magic numbers to wildcard each of these, which in turn makes the code a lot easier to read. as a bonus we get some more space to work in (80 chars isnt that much somtimes). note that this code wont probe high luns if lun 0 doesnt exist. ok krw@
2006-09-22add support for hotplugging devices on sas controllers. this is disabledDavid Gwynne
for now until we deal more appropriately with events generated by other variants of mpi controllers.
2006-09-21code for acking event notifications that require acks.David Gwynne
2006-09-21deref the right rcb by using i as the index, not 1 all the time.David Gwynne
2006-09-21start cleaning up the completion path for event notifications.David Gwynne
2006-09-21add a debug flag type thing for event handlingDavid Gwynne
2006-09-21wrap the hardware replies up in a structure called mpi_rcb which isDavid Gwynne
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.
2006-09-21factor the common code out of mpi_intr and mpi_complete. they wereDavid Gwynne
basically identical apart from the conditions they looped on.
2006-09-18macros and types for event notifications from the hardware.David Gwynne
2006-09-18There's no need to walk the list of devices to find the SCSI bus wePedro Martelletto
should attach to, since config_found() already returns a pointer to it. Pointed out by Quentin Garnier, okay dlg@.
2006-09-16rework the handling of the errors coming off the hardware at the bottom ofDavid Gwynne
mpi_scsi_cmd_done. this makes it more appropriate for our midlayer. ok beck@ deraadt@
2006-08-24dont print debug output when the scsi completion path returns withDavid Gwynne
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...
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