summaryrefslogtreecommitdiff
path: root/sys/scsi/sd.c
AgeCommit message (Collapse)Author
2003-06-24try to devise drive's rpm and default to 3600 should we fail miserably.Michael Shalayeff
derived from pr2815 from Marco Peereboom krw@ deraadt@ ok
2003-05-21Make sure that the first scsi command issued to a device duringKenneth R Westerback
sdattach() has the flag SCSI_IGNORE_MEDIA_CHANGE set. This was not true for devices with the quirk SDEV_NOSTARTUNIT, such as some umass devices. This fixes the display of the disk parameters for any loaded media. Previously the displayed parameters would show 0 size, 0 sectors and a faked number of cylinders, etc. By ignoring the error generated by devices trying to tell us the media may have changed since the last command the SCSI command completes correctly and valid values are obtained/displayed. We are interested in the current values and unconcerned about any previous ones. Tested by drahn@.
2003-05-18constify the quirck tables and fix the scsi_inqmatch() proto accordingly; ↵Michael Shalayeff
krw@ ok
2003-05-16Provide most if not all the support required for the usb changes NateKenneth R Westerback
is trying to bring in. 1) Change name of SDEV_NOCDB6 to SDEV_ONLYBIG to align it with the same quirk in NetBSD, and make it more clear what it is trying to do. i.e. force the use of READ_BIG/WRITE_BIG commands, not suppress all use of 6 byte CDB's. 2) Check SDEV_ONLYBIG in cd.c as well as sd.c. i.e. both places where a choice is made to use the 6 or 10 byte versions of READ/WRITE. 3) Actually make use of the ADEV_NOTUR (No TEST UNIT READY) quirk to suppress the emission of TEST UNIT READY commands. 4) Add some explanatory comments from NetBSD to scsiconf.h so that the use of the quirks is made clear. ok miod@ tdeval@ nate@
2003-05-06sprintf -> snprintf. strncpy -> bcopy since d_packname is not really aKenneth R Westerback
string. Ensure that all of d_packname is used by not null-terminating string that is put in it. Suggestions and motivation to remove strncpy() from deraadt@. ok deraadt@ tedu@.
2003-04-06The disklabel fields d_packname and d_typename are not null terminated stringsKenneth R Westerback
and should not be created or used as such. This fixes some instances of both behaviours, and sets the stage for some strcpy -> strncpy fixup. ok tdeval@ millert@ deraadt@
2002-12-30Add new parameter to scsi_test_unit_ready(): retries number.Alexander Yurchenko
Use increased retries number and don't ignore SCSI_IGNORE_NOT_READY when call scsi_test_unit_ready() for cd-rom, this makes system wait if drive is loading media. Tested by millert@ and fgsch@; some input and ok from krw@. Problem reported by The lord of the CD-writers Igor Grabin <violent@death.kiev.ua>.
2002-09-04Add support for RBC (simplified direct) devices.Thierry Deval
ok costa@, krw@
2002-08-12initialize part earlier in case of debugging.Federico G. Schwindt
2002-06-09More (the last round?) of splasserts and splbio around biodone.Artur Grabowski
2002-03-14First round of __P removal in sysTodd C. Miller
2001-10-08Add a new quirk type, SDEV_NOCDB6, some USB devices like ATAPIDale Rahn
do not support 6 byte CDBs. This quirk is used for OLYMPUS USB cameras. Loosely based on code in FreeBSD. ok costa@
2001-08-26remove useless INUSE references from scsi_xfer->flags; art@ miod@ ok.Federico G. Schwindt
2001-08-06Remove legacy __BDEVSW_DUMP_OLD_TYPE code.Miod Vallat
2001-06-22KNFTheo de Raadt
2000-12-13move back to unlimitted openingsMichael Shalayeff
2000-10-13Matthew Jacob <mjacob@feral.com>:Michael Shalayeff
Mickey did the right thing, but we'll have to figure out what that broke as well.
2000-09-21do not limit openings to defined SDOUTSTANDING value of 4, since many ↵Michael Shalayeff
controllers can do more; presumably all the cotrollers initialize openings to the right value; also replace some spaces w/ tabs
2000-09-20make SDOUTSTANDING redefinable, since some controller can handle more than 4 ↵Michael Shalayeff
xfers simultaneously; deraadt@ ok
2000-04-18sd and scsibus detachConstantine Sapuntzakis
cdlock/cdunlock now through disk_lock/disk_unlock
2000-04-08These days, attach can occur outside the tsleep-restricted world ofConstantine Sapuntzakis
BSD autoconf. Don't use POLL & NOSLEEP mode if attaching after autoconf
1999-12-05correct printout labelsTheo de Raadt
1999-08-24Added type field to scsi_addr to reflect bus/device type (ATAPI or SCSI).Constantine Sapuntzakis
Updated ioctls to match Minor patches in anticipation of wd->sd translation layer
1999-08-10support DIOCRLDINFOTheo de Raadt
1999-07-25gets even worse..Theo de Raadt
1999-07-25another costa bug.. erkTheo de Raadt
1999-07-25Merge sd stuff from NetBSD-current. Helps with LS-120, ZIPConstantine Sapuntzakis
More SCSI logic from NetBSD-current Some tape fixes. ATAPI tapes do not work yet for most operations.
1999-07-23use READ_BIG for atapi; LS-120 works nowTheo de Raadt
1999-07-22for drives <10MB of so, print #.##MB for the sizeTheo de Raadt
1999-05-09Fix sdsize() to not call sdopen()/sdclose() unless it is needed.Tobias Weingartner
1998-10-04Add DIOCGPDINFO supportTodd C. Miller
1998-10-03Add a "spoofonly" argument to readdisklabel() which will be used toTodd C. Miller
implement an ioctl to get a spoofed label even for disks that have a label on them.
1998-10-01Put vendor + model in spoofed label, not 'fictious'Todd C. Miller
1998-05-02Set blksize to DEV_BSIZE, not 512.Todd C. Miller
1998-04-25set d_bbsize and d_sbsize in spoofed label to values correct for ffsTodd C. Miller
1998-03-27Fix strncpy usage and call a cdrom a cdrom in the fake labelTodd C. Miller
1997-10-18avoid "no disklabel" error messagesTheo de Raadt
1997-08-08Change the bounds_check_with_label API to also take a cpu_disklabelNiklas Hallqvist
reference for making transferral of meta-information possible from readdisklabel to bounds_check_with_label. The first (and maybe only) thing that will use this is the multi-disklabel-format code on the alpha where the labelsector is passed via cpu_disklabel so the label write-protection can work correctly no matter what label was found. Also use a new macro DKBAD to get at the dkbad field of the cpu_disklabel implementations that contain it. This too is for multi-disklabel architectures where the "bad" field can be inside a union. Use this macro as a means for a driver to check if an architecture supports dkbad constructs. Remove proto of bounds_check_with_label from all MD disklabel.h as it is in sys/disklabel.h. I have not been able to test the changes everywhere, if I break anything I apologize, and promise to fix it as soon as I become aware of it.
1997-07-26Report total number of blocks for a scsi disk since on modern drivesTodd C. Miller
total sectors > cyl * head * sec/head. Inspired by der Mouse <mouse@rodents.montreal.qc.ca>
1997-04-14Merge in various pieces of current NetBSD scsi code, including but not limitedJason Downs
to: * New changer driver. * Better optical support. * Different `done' semantics. * New quirks for SCSI QIC tape driver, SCSI floppy drives. * Better support for SCSI-I devices. Everybody needs to test this.
1997-01-04readdisklabel() with correct dev_tTheo de Raadt
1996-12-11b_resid cleanups, pointed out by minoura@kw.netlaputa.or.jp in netbsd pr#3007Theo de Raadt
1996-12-03clear sense buffer for mode sense 4, dms@celtech.comTheo de Raadt
1996-10-31$OpenBSD RCSIDs + comment fix in sd.cNiklas Hallqvist
1996-08-07disk_unbusy if op failed to enqueueTheo de Raadt
1996-07-12Fixed wrong type of argument passing for SCIOCREASSIGN.Per Fogelstrom
(thanks Theo).
1996-07-11Make use of existing SCSI block reassign code.Per Fogelstrom
1996-06-16NetBSD PR#2535: add mode sense 5 and floppy support in our framework.Jason Downs
1996-06-10do not check SDEV_MEDIA_LOADED because it does not matterTheo de Raadt
1996-06-10Several changes:Jason Downs
* Implemented NetBSD PR#2529, adding ZIP 100. * Added MTIOCTOP support to acd, cd, and sd. * Implemented eject on close for acd, cd, and sd. `mt -f /dev/rcd0d offline' now ejects a mounted {acd|cd|sd} when it is unmounted.