summaryrefslogtreecommitdiff
path: root/sys/dev/ic/ami.c
AgeCommit message (Collapse)Author
2010-01-09Zap all setting of ITSDONE in drivers that don't look at it. NobodyKenneth R Westerback
else cares so it's just noise. Drivers that actually look at ITSDONE are unchanged. ok marco@ (for his files) dlg@ beck@
2009-12-06change M_WAITOK --> M_WAITOK|M_CANFAILCharles Longeau
with input from marco@ "that i like" marco@ ok dlg@
2009-08-12though shalt complete the xs (ie, call scsi_done with it) before returningDavid Gwynne
COMPLETE in a scsi_cmd handler. found by thib when testing my midlayer changes.
2009-08-09Make ami(4) use NO_CCB at least some of the time.Kenneth R Westerback
"Should never happen but I like it" marco@
2009-06-11fix potential use of uninitialized value.Charles Longeau
found by LLVM/Clang Static Analyzer. ok marco@
2009-06-11remove dead assignment and newly created unused variable.Charles Longeau
Found by LLVM/Clang Static Analyzer. ok marco@
2009-06-04Add missing argument to printf statement.Ray Lai
Found with -Wformat. OK dlg
2009-02-16Extend the scsi_adapter minphys() callback to take a struct scsi_link *Miod Vallat
as additional argument. This will allow intermediate layers between scsi devices such as sd and scsi host adapters to take appropriate action if necessary.
2009-01-11Actual final round of timeout_add(to, n * hz) -> timeout_add_sec(to, n)Bret Lambert
conversions. ok kettenis@ ok krw@ (possibly for the second time :)
2008-10-28Shut splassert upMarco Peereboom
Fix an undo error in previous commit
2008-10-28Be nicer waking up.Marco Peereboom
prompted and ok dlg
2008-10-28Major overhaul of bio.Marco Peereboom
Fix set hotspare that didn't always work. Fix several very subtle bugs because of firmware lies Fix disk size that sometimes was incorrect Only poke drives if something changed so it makes bio way faster on subsequent calls Tested by several folks, thanks Ok dlg
2008-04-10the success of a command is reported in the mbox, but not passed on to theDavid Gwynne
completion routines to do anything useful with. this stashes the commands status in the ccb for the ccb_done handlers to use. the completion path for passthru commands now checks the mbox status to see if the command actually works. this prevents phantom devices from appearing on the passthru busses.
2007-12-28massage the way vpds are defined. rename the page used for the devicesDavid Gwynne
serial number and split the vpd header out for use in other places. while here define the device identification page bits too. ok krw@ marco@
2007-09-27M_ZERO changesCharles Longeau
ok dlg@
2007-06-24rework sensor tasks to use the kernels generic workq rather than a specialDavid Gwynne
kernel thread of its own. the api has changed (which will be fixed in the manpage shortly) so all the users of sensor tasks that i can find have been fixed too. noone tested, so its going in to force people to run with it. "put it in" deraadt@
2007-05-31erroneously EINVAL is always reported where the functionDavid Gwynne
actually produces the real errno for the problem. currently for kernel memory allocation failures bioctl would return EINVAL that makes no sense. another diff from mickey
2007-05-31if poking the controller fails for whatever reason the drives'David Gwynne
sensor status will still be marked as ok (or etc..) thus erroneously reporting value as valid. this nice diff was from mickey
2007-05-29sprinkle some SMALL_KERNEL to permit bio/softraid to run on boot mediaTodd T. Fries
ok marco@ then suggested deraadt@
2007-05-29Make stimeout a debug print. It has no value for users to see it.Marco Peereboom
prompted by deraadt ok dlg
2007-05-08ami chips have no mechanism to take commands off them once we've submittedDavid Gwynne
them. this means that we cant reliably complete an io before the chip says we can because it can possibly complete later and overwrite memory it no longer owns, or write garbage to disk. so this diff forces the timeout on a scsi io to be as long as the chip should ever take, which is sixty seconds. after much discussion with marco we also decided to add a bit more so the time spent in the software runq wouldnt affect the ios lifetime too much. instead of completing ios out of the timeout, this simply warns the operator to check the state of the volumes if things are starting to slow down. ok marco@
2007-04-26Improve debug statements. No binary change without AMI_DEBUG.Alexander Bluhm
ok marco
2007-03-22split userland & kernel struct sensor/sensordev so that the additionTheo de Raadt
of new fields in the future is less disruptive. This is done similar to how struct proc is handled for ps(1). ok jmc (man page changes) tested fkr simon, and more suggestions from millert
2007-01-27convert to our locks to rwlocks.David Gwynne
2006-12-23adapt to new two-level sensor api; Constantine A. MureninTheo de Raadt
2006-11-28give scsi controllers a real attach args to fill in when attaching scsibus.David Gwynne
ok miod@ marco@ deraadt@
2006-08-28bzero() the sensor memory after allocating it.Kenneth R Westerback
ok marco@
2006-08-03always call scsi_done at splbio. issue found by pedro@David Gwynne
while here try to avoid nesting splbio calls when dealing with the runqueue.
2006-06-28rewrite how the sensors are created. previously they would wait for io toDavid Gwynne
be done on the logical disks so ami_scsi_cmd can stash the name of the device doing the io. we now walk the device tree after the logical disks are attached and use the names of ami's child devices. ok marco@
2006-06-28put proto where it is because dlg says he is a dodoTheo de Raadt
2006-06-27unbreak builds without BIO by moving the sensor setup back under its ifdef.David Gwynne
i could move the shared code that the sensor and bio paths use, but this would add bloat i think. found by _mx, fix by deraadt@
2006-06-27we can do the sensors without BIODavid Gwynne
2006-06-27we cant do bioctl or sensors on broken controllers since they dont have theDavid Gwynne
spare ccbs for it and they dont understand the megaraid commands we use in those paths. initially found by jared rr spiegel
2006-06-09Simplify ami_disk by chaging some ifs around.Marco Peereboom
2006-06-09Add percentages for BGI and Rebuild. Example:Marco Peereboom
# bioctl -h ami0 Volume Status Size Device ami0 0 Rebuild 1000M sd1 RAID5 8% done
2006-05-28Remove dead code; free commit on behalf of dlg@Uwe Stuehler
2006-05-26Add dlg to copyright.Marco Peereboom
2006-05-21move the allocation of ccb out of ami_attach into a function of its ownDavid Gwynne
(aptly called ami_alloc_ccbs). allocate the ccbs after the firmware has been queried, but still for the full number of AMI_MAXCMDS. ok krw@
2006-05-21move variable declarations at the start of a block in ami_attach to the topDavid Gwynne
of the function and unindent that block. ok krw@
2006-05-21during attach use a static, spartan ccb with ami_poll to query to firmareDavid Gwynne
for its params. this means we can ask it how many ccbs it can deal with before we allocate them. ok krw@
2006-05-21the maximum possible number of ccbs that a megaraid can use (126 of them)David Gwynne
is preallocated in the softc, even if the driver is only ever going to use one of them when running. this allocates them separately during attach as a first step toward having the driver only allocate as many ccbs as the firmware can support. ok krw@
2006-05-21remove a chunk of code that was ifdefed out due to compat issues withDavid Gwynne
older firmwares. it was stagnating and now completely broken. if we need it back then we can poke around in cvs for it.
2006-05-21The SCSI command on the passthrough bus is handed to the firmware via aDavid Gwynne
structure not included in the MegaRAID command, so it needs to be synced before we submit it. Previously this was done only when the SCSI command had an associated data buffer. The syncing of the passthrough command is now done unconditionally. ok krw@ marco@
2006-05-12Fix a misreporting bug after bioctl -H is used to create a hotspare. This wasMarco Peereboom
reported by several people. What happens is that the firmware sometimes misreports what SCSI type a device is. The driver was only allowing a create hotspare function when the type was set to hard disk. Since the firmware will, obviously, not allow the driver to create a hotspare on any other type of device the driver doesn't need these smarts and now will ignore the type. Tested by henning todd and Ben Lovett. ok dlg
2006-04-26it turns out that a drivers interrupt handler is called at the spl it wasDavid Gwynne
established at. this means we dont need splbio() calls in ami_intr because its already been raised. this diff removes unneeded splbio calls from the interrupt handler path. it also sets it up so the completion paths are all called at splbio, so i can get rid of the spl calls inside those functions too. neither marco or pedro could see anything wrong with it
2006-04-25the error path for teh sync cache command should return, not try to blunderDavid Gwynne
on with the second half of the command.
2006-04-23Fix an embarrassing pasto that triggered a panic. Reported by henning.Marco Peereboom
ok dlg
2006-04-22Henning reported a crash I can't explain while using the new sensor code.Marco Peereboom
Disable until diagnosed and fixed.
2006-04-21remove the ami_inquire prototype. the function doesnt exist and its notDavid Gwynne
used anywhere. thanks lint. thint.
2006-04-20return after goto wont be reached, so remove it. found by lint.David Gwynne