summaryrefslogtreecommitdiff
path: root/sys/scsi
AgeCommit message (Collapse)Author
2007-12-29the scsi layer always had function pointers for asking the hba about aDavid Gwynne
device before issuing scsi commands to it, but it was never implemented, never used, and no hba actually filled them in. i came along and added another two function pointers for the same thing. this cleans up the extra pointers. ok krw@ marco@ miod@ deraadt@
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-11-27typos; ok jmc@Martynas Venckus
sys/dev/pci/pciide.c from naddy@
2007-11-26let scsibus ask the adapter about a device before probing it. also allowDavid Gwynne
the adapter to be notified when a device goes away so it can free any state it maintains about that device. ok deraadt@ marco@
2007-11-25dont use the adapter_softc member of scsi_link as a softc anymore. theDavid Gwynne
"adapter_softc" is simply a way for the adapter to determine what scsibus it is now dealing with, not a pointer back to the adapters device struct. ok deraadt@ marco@
2007-11-23if we cant fetch the serial then fill it with "(unknown)".David Gwynne
2007-11-22Ansi-fy.Kenneth R Westerback
2007-11-22Ooops. Don't de-reference st until after it has been pointed at theKenneth R Westerback
correct st_softc. Fixes 'mt rewoffl' panics, as reported on misc@ by Jeff Ross and reproduced on my tape machine.
2007-11-16convert code over from sd.c, to let tapes discollect. Lucas StefanuttiTheo de Raadt
of pr 5635 confirms this works for him. similar diff authored by krw who was unaware i wrote this and mailed it to Lucas...
2007-11-11Revert useless textual optimization that resulted in 16 bytes beingKenneth R Westerback
sent to the adapter instead of the 10 bytes the scsi_sychronize_cache command actually occupies. This freaked out the ahc on jsing@'s SGI and probably others. Found, isolated, fix tested, and ok jsing@
2007-11-06Fix SDF_DIRTY handling, eliminate useless SDF_FLUSHING. The sd_flush()Kenneth R Westerback
called from the last sdclose() on a device will now reset SDF_DIRTY after submitting the SYNCHRONIZE CACHE command. sddone() need not worry about SDF_DIRTY since it was never called for the SYNCHRONIZE CACHE command anyway. This eliminates a spurious SYNCHRONIZE CACHE command being issued for every sd device from sd_shutdown(). ok dlg@
2007-09-16A couple of obvious bzero() -> M_ZERO changes I missed.Kenneth R Westerback
2007-09-16MALLOC/FREE -> malloc/free, M_ZERO, extraneous casts,Kenneth R Westerback
extraneous #include <malloc.h>
2007-09-15Allow to pull out an usb stick with ffs filesystem while mountedAlexander Bluhm
and a file is written onto the stick. Without these fixes the machine panics or hangs. The usb fix calls the callback when the stick is pulled out to free the associated buffers. Otherwise we have busy buffers for ever and the automatic unmount will panic. The change in the scsi layer prevents passing down further dirty buffers to usb after the stick has been deactivated. In vfs the automatic unmount has moved from the function vgonel() to vop_generic_revoke(). Both are called when the sd device's vnode is removed. In vgonel() the VXLOCK is already held which can cause a deadlock. So call dounmount() earlier. ok krw@, I like this marco@, tested by ian@
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-06-23Implement disk sizes > 2^32-1. Code modelled on NetBSD.Kenneth R Westerback
Tested, tweaked and ok otto@
2007-06-20b_cylinder does not need to be set on the callpath down into drivers.Theo de Raadt
cpu_disklabel can go away, since nothing anymore needs to use it; ok miod
2007-06-18avoid modification race in DIOCRLDINFO; ok krw miodTheo de Raadt
2007-06-08all drivers should spoof version 1 labelsTheo de Raadt
2007-06-07in OpenBSD as all old BSD unix, RAW_PART always starts at 0, so noTheo de Raadt
need for special case code; ok krw
2007-06-06now that all partition size/offsets are potentially 64-bit, change theTheo de Raadt
type of all variables to daddr64_t. this includes the APIs for XXsize() and XXdump(), all range checks inside bio drivers, internal variables for disklabel handling, and even uvm's swap offsets. re-read numerous times by otto, miod, krw, thib to look for errors
2007-06-05use six new macros to access & store the 48-bit disklabel fields relatedTheo de Raadt
to size. tested on almost all machines, double checked by miod and krw next comes the type handling surrounding these values
2007-06-01backout r1.33: temperature sensor description was removed on purpose,Constantine A. Murenin
because it started to be part of the sysctl variable name ok deanna@, dlg@
2007-06-01Fix snprintf(9) truncation check and skip the check for -1 becauseMoritz Jodeit
only the libc snprintf(3) could return this. ok krw@
2007-06-01No need for tape fields to be daddr_t. int will do.Kenneth R Westerback
ok beck@ deraadt@
2007-06-01Don't initialize d_partitions[RAW_DISK] just before callingKenneth R Westerback
readdisklabel(), since all readdisklabel()'s do that already. ok deraadt@
2007-05-31ckuethe found i missed a file in the workq update. my badTed Unangst
2007-05-31remove the scsi task thread, and replace it with the system workq.David Gwynne
"just :wq and do it" tedu@
2007-05-31Use 12 and 16 byte read/write commands as required by the size/lengthKenneth R Westerback
of the I/O being attempted. Throw in a comment typo fix to properly refer to sectors and not blocks. ok marco@
2007-05-27add more struct/define stuff for use in cdioMichael Coulter
ok krw@
2007-05-25ANSI-fication, minor KNF. No code change. My plane had power outletsKenneth R Westerback
this time!
2007-05-08all scsidebug_*-using code is under #ifdef, so the variables themselves ↵Theo de Raadt
should be too
2007-05-04lockmgr -> rwlock.Kenneth R Westerback
"reads good" art@ ok marco@
2007-04-28Fix comments above DISKMINOR uses. DISKMINOR provides minor not majorKenneth R Westerback
number (wd.c), and the uses are to find the minimum minor to be detached.
2007-04-26Use the standard DISKPART/DISKUNIT/etc. defines rather than identicalKenneth R Westerback
but differently named SD/CD ones. No change to .o files. ok deraadt@ dlg@
2007-04-14For devices unwilling or unable to report geometry, change the 'fake'Kenneth R Westerback
geometry used to 255 heads and 63 sectors/track from 64 heads and 32 sectors. 255/63 makes the cylinders as large as PC/BIOS compatibility allows, increasing the size of devices that can be supported. ok pedro@ (long ago) marco@ millert@ weingart@
2007-04-13If a removable device refuses to process PREVENT_ALLOW to lock theKenneth R Westerback
media in while the device is open, allow the open anyway. Fixes some USB devices which do odd things when presented by PREVENT_ALLOW. Suggestion from mickey@. ok millert@ marco@
2007-04-12The beginnings of support for 16-byte cdb's in the scsi code. This isTobias Weingartner
so we will be able to address devices larger than the 10-byte cdb's allow us to do. ok krw@, dlg@
2007-04-12Add cd_kill_buffers() as a separate function, like sd_kill_buffers()Kenneth R Westerback
and for the same reason of preparing for safer handling of users yanking usb devices out. No functional change. Copied from bluhm@'s change to sd.c.
2007-04-11Use a separate function to remove the buffers in sddetach.Alexander Bluhm
No functional change. ok krw
2007-04-10``it's'' -> ``its'' when the grammar gods require this change.Miod Vallat
2007-04-10Name and cast all struct sd_softc *sd the same way. No binary change.Alexander Bluhm
ok krw
2007-04-10Always use idiom 'struct cd_softc *cd = (struct cd_softc *)self'. SpottedKenneth R Westerback
by bluhm@ for sd. No change to cd.o.
2007-04-04sprinkle some ansification around.David Gwynne
no binary change, and ok krw@ marco@
2007-04-03implement the DK INFO ioctl so userland can query the disks product,David Gwynne
vendor, etc details.
2007-04-03define the vpd inquiry page code.David Gwynne
2007-04-03add a wrapper for querying vpd inquiry pagesDavid Gwynne
2007-04-03modernise scsi_inquiry. the length field has grown and now theres pages toDavid Gwynne
query. ok krw@
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