summaryrefslogtreecommitdiff
path: root/sys/scsi
AgeCommit message (Collapse)Author
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
2007-02-21Add missing sensor description for temperature.Deanna Phillips
ok dlg
2007-02-21Don't unconditionally spin up SDEV_UMASS devices. They almostKenneth R Westerback
certainly don't need it, or are capable of reporting themselves in need of a spin up. Feedback from various agreeing it is unlikely such devices exist. Fixes devices found by Markus Bergkvist and Johan M:son Lindman. ok dlg@
2007-02-12Don't need a 'return' just before exiting a function.Kenneth R Westerback
2007-02-03Make comment match code. ok pedroAlexander Bluhm
2007-01-20Add media_fileno, media_blkno into st_softc and report their valuesKenneth R Westerback
back via MTIOCGET ioctl, rather than always reporting -1 (unknown). Simple 'Set to 0 on rewind, increment on file marks and positioning, and set back to -1 on any ambiguity' logic. No functional impact on current operation. Should allow things like Bacula to work much faster by keeping track of the current media position. Adapted from FreeBSD code. ok beck@
2007-01-16Report SDEV_UMASS devices as non-'SCSI', i.e. 'ATAPI', devices whenKenneth R Westerback
asked via SCIOCIDENTIFY. More closely emulates the Linux SCIOCIDENTIFY/SG_EMULATED_HOST combination used by cdparanoia (and god knows what other ports). Nothing in the tree itself uses SCIOCIDENTIFY. Fixes cdparanoia's handling of USB CD drives that can't handle the MODE SENSE command. cdparanoia sends 'ATAPI' devices only MODE SENSE BIG (0x5a) commands. Finding actual SCSI devices that might have trouble with MODE SENSE BIG (i.e. very old devices) behind USB is deemed highly unlikely. Problem reported, debugged and fix tested by bernd@. ok marco@ millert@ miod@
2007-01-05As first brought to my attention by Russel Sutherland, our deletion ofKenneth R Westerback
the mt_fileno and mt_blkno fields from the mtget struct was too hasty. Subsequent discussions with Kern Sibbold of the Bacula project revealed these are widely used by tape backup software on many unicies. The de facto standard is to return -1 if you can't determine the value. So add them back and always return -1 as their value. Should allow Bacula and similar software to at least compile while we investigate providing meaningful values. ok beck@
2006-12-29Avoid void * arithmetic, okay deraadt@, suggestions from millert@Pedro Martelletto
2006-12-23adapt to new two-level sensor api; Constantine A. MureninTheo de Raadt
2006-12-23Add the ability to issue GPCMD_REPORT_KEY and GPCMD_SEND_KEY scsiKenneth R Westerback
commands via the DVD_LU_SEND_RPC_STATE and DVD_HOST_SEND_RPC_STATE ioctls respectively. Thus allowing any region protected DVDs mistakenly delivered by Santa to the wrong region to be viewed on recalcitrant DVD drives (with the aid of an appropriate utility like regionset). No change to any current functions. Found in my hackers@ folder from August. From netbsd -> Kurt Miller -> jmc@.
2006-12-21Fix some comment typos. 'immediatly' -> 'immediately', 'tranfer' ->Kenneth R Westerback
'transfer', 'tranfered' -> 'transferred'.
2006-12-12Give the SCSI layer the ability to requeue i/o's rejected by a driverKenneth R Westerback
using the new NO_CCB result. Currently a no-op since no driver produces that result. ok dlg@ marco@ deraadt@
2006-11-28give scsi controllers a real attach args to fill in when attaching scsibus.David Gwynne
ok miod@ marco@ deraadt@
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-11-28remove a comment that was describing a behaviour that was changed over nineDavid Gwynne
years ago.