summaryrefslogtreecommitdiff
path: root/sys/scsi
AgeCommit message (Collapse)Author
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.
2006-11-27more magic removalBob Beck
ok miod@, deraadt@
2006-11-27get rid of the rest of the asc/ascq magic codes in scsiBob Beck
ok marco@, deraadt@
2006-11-27add bio code to do hotplug of devices on the scsibus.David Gwynne
thumbs up deraadt@
2006-11-27rework asc/ascq handling to get rid of "magic" 0x values in the code, changesBob Beck
asc/ascq handling to deal with the pair together rather than seperately, since modern scsi has long since polluted the "categories" of asc enough that you pretty much need to always look as ascq. ok krw@ deraadt@, dlg@
2006-11-27hook scsibus up to bio.David Gwynne
ok deraadt@ krw@ an earlier diff was ok marco@ too
2006-11-27if there are no luns on a target, then say there were no devices,David Gwynne
otherwise return any error we find during detach of the luns.
2006-11-26no argument names in prototypes plsDavid Gwynne
2006-11-26provide scsi_detach_bus, _target, and _lun to wrap up config_detach forDavid Gwynne
scsi devices. the midlayer keeps some state for each device that is attached which needs to be cleaned up on detach, hence this wrapper.
2006-11-04kthread_create returns an int, not a pointer. compare the return value toDavid Gwynne
0, not NULL.
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-10-08Something more closely resembling english in this comment.Bob Beck