summaryrefslogtreecommitdiff
path: root/sys/scsi/ses.c
AgeCommit message (Collapse)Author
2011-03-17use dma_alloc/dma_free instead of malloc to allocate buffers which needTheo de Raadt
to be in the right address space. help from matthew and krw
2010-08-30Avoid possible aliasing-related compiler issues by always writing toMatthew Dempsky
cmd->opcode through the type casted command pointer rather than through xs->cmd->opcode. Requested by deraadt@; ok krw@.
2010-08-02Don't refer to xs->cmd, even via a pointer to xs->cmd, after xs hasKenneth R Westerback
been put back in the pool. Fixes Daniel Dickman's ses device. ok matthew@ deraadt@
2010-07-22Eliminate scsi_scsi_cmd() now that ss(4) is gone and with it theKenneth R Westerback
last bastardized sync and buf call through scsi_scsi_cmd(). Flatten code to call scsi_xs_sync() directly for all commands. Airplane typos shaken out by various. ok dlg@ matthew@ deraadt@
2007-09-16MALLOC/FREE -> malloc/free, M_ZERO, extraneous casts,Kenneth R Westerback
extraneous #include <malloc.h>
2007-09-07The obvious bzero/memset -> M_ZERO changes.Kenneth R Westerback
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-04lockmgr -> rwlock.Kenneth R Westerback
"reads good" art@ 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
2006-12-23adapt to new two-level sensor api; Constantine A. MureninTheo de Raadt
2006-11-28rename scsibus_attach_args to scsi_attach_args. this can help avoidDavid Gwynne
confusing when trying to attach scsibus to a hba, since it is really meant for attaching scsi devices to scsibus. ok deraadt@ marco@
2006-10-01Free sensors on detach.Alexander Yurchenko
ok dlg@
2006-07-29The version field of scsi_inquiry_data is not a simple numeric valueKenneth R Westerback
that specifies the version of SCSI being supported. Even the ANSI part that we use is complex. 4 means 2, 5 means 3 and 6 means 4. Translate and use the value correctly. Fixes SCSI5 and SCSI6 in dmesg. And properly protects SCSI2 devices from getting SCSI3 commands. "seems like an elegant solution to me" millert@ ok dlg@ marco@
2006-07-16take a 1k array off the stack by using malloc to get it. found by miod.David Gwynne
2006-05-11Zap trailing whitespace.Kenneth R Westerback
2006-05-09make sensor names look more normal; ok dlgTheo de Raadt
2006-04-20Fix various printf() issues: too many arguments, not enough arguments, argumentMiod Vallat
order reversed, wrong modifiers. ok deraadt@ marco@ mickey@
2006-01-19Replace SENSOR_ADD() macro with a pair of functionsAlexander Yurchenko
sensor_add()/sensor_del() so that sensors can be attached and detached dynamicaly. ok kettenis@ deraadt@ dlg@
2006-01-11dont print anything if we're unable to read the status pageDavid Gwynne
requested by deraadt@
2005-11-19Remove unnecessary lockmgr() archaism that was costing too much in termsPedro Martelletto
of panics and bugfixes. Access curproc directly, do not expect a process pointer as an argument. Should fix many "process context required" bugs. Incentive and okay millert@, okay marc@. Various testing, thanks.
2005-11-13lock accesses to the buffer so that it wont get confused between theDavid Gwynne
multiple processes using it
2005-11-13if the particular ses device has no slots or sensors to handle, then freeDavid Gwynne
all the resources.
2005-11-12clean up unused includesDavid Gwynne
2005-11-12remove the ses kthread goop and use the sensor kthread for updates insteadDavid Gwynne
tested by deraadt@
2005-09-29fix the check for the type of enclosureDavid Gwynne
2005-08-23setting the FAULT flag on a device so the alarm led blinks may haveDavid Gwynne
unwanted side effects, eg, disabling both fc ports and powering the disk down. so remove this knob for now. ok deraadt@
2005-08-23Test for cold and apply relevant flags for all scsi commands.Marco Peereboom
ok dlg@ krw@ deraadt@
2005-08-22check for scsi_autoconf state, spotted by marco; ok krwTheo de Raadt
2005-08-18Silly dlg did not read my old code careful enough. Missed 2 bits that areMarco Peereboom
necessary for the blinkenlight magic. Also removed some XXX cruft that was misleading.
2005-08-18infrastructure to support blinking controlled via /dev/bio ioctls. theDavid Gwynne
code to do the actual blink is ifdefed out till marco can figure out what im doing wrong.
2005-08-13let safte match on dell enclosures too. ses takes precedence thoughDavid Gwynne
ok marco@ deraadt@
2005-08-10use the appropriate flags to scsi_scsi_cmd during autoconf so we dont spinDavid Gwynne
forever on mp kernels problem reported by matthieu baptiste
2005-08-09normalise the fan speed outputDavid Gwynne
ok marco@
2005-08-08Fill in device structure, bad dlg@Marco Peereboom
2005-08-05report the fan speed as a percentage since it seems all the enclosures weDavid Gwynne
fill in the rpm fields. your call deraadt@
2005-08-05reorder the allocation of bits in attach to make cleaning up on an errorDavid Gwynne
shorter and less prone to mistakes ok marco@
2005-08-04the generic scsi attach line already says we're an enclosure, so why didDavid Gwynne
i make it say the second line that says the same thing?
2005-08-04be nicer to the controller the ses device is attached to by doing the scsiDavid Gwynne
commands in a kernel thread, not out of softclock with a timeout. help from pascoe@ ok marco@
2005-08-04Add support for dell enclosures that do both SES and SAF-TE. ok dlg@Marco Peereboom
2005-08-03report the state of the power supplies. the value shows if the psu is onDavid Gwynne
or off, but sysctl doesnt know how to display it (yet). requested by marco@
2005-08-03take advantage of the new ability of the sensors framework to report theDavid Gwynne
status ok marco@ beck@ henning@ deraadt@
2005-08-02read the rpm of the fansDavid Gwynne
2005-08-01a new scsi enclosure services driver. this and safte replace the old sesDavid Gwynne
driver. rather than relying on its own set of tools, ses reports the enclosure status via the hw.sensors sysctl tree. so far only temperature is reported ok marco@ deraadt@ krw@
2005-07-31remove the ses driver. it has never been enabled in GENERIC on any archDavid Gwynne
in openbsds lifetime so noone is going to miss it. if you did enable it, it either didnt work or the data was hard to read and usually wrong. ok deraadt@ marco@
2004-05-09Add missing <cr>'s to various SC_DEBUG() calls, along with a few otherKenneth R Westerback
SC_DEBUG() spacing tweaks. ok deraadt@
2004-01-03put an mi wrapper around stdarg.h/varargs.h. gcc3 moved stdarg/varargs macrosMarc Espie
to built-ins, so eventually we will have one version of these files. Special adjustments for the kernel to cope: machine/stdarg.h -> sys/stdarg.h and machine/ansi.h needs to have a _BSD_VA_LIST_ for syslog* prototypes. okay millert@, drahn@, miod@.
2003-08-06Remove some double semicolons (hmm, do two semis equal a maxi?).Todd C. Miller
I've skipped the GNU stuff for now. From Patrick Latifi.
2002-03-15Kill #if __STDC__ used to do K&R vs. ANSI varargs/stdarg; just do thingsTodd C. Miller
the ANSI way.
2002-03-14First round of __P removal in sysTodd C. Miller
2001-06-22KNFTheo de Raadt