summaryrefslogtreecommitdiff
path: root/sys/scsi/sd.c
AgeCommit message (Collapse)Author
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.
1996-06-01all ports have dk_establishTheo de Raadt
1996-05-22unload after last closeTheo de Raadt
1996-05-10SC_DEBUG cleanupTheo de Raadt
1996-05-06from netbsd; SCSIDEBUG printf() fixesTheo de Raadt
1996-05-02no sys/cpu.h, fix bugs in chTheo de Raadt
1996-04-21partial sync with netbsd 960418, more to comeTheo de Raadt
1996-04-19NetBSD 960317 mergeNiklas Hallqvist
1996-02-20Sync w/ NetBSD:briggs
- Implement DIOCLOCK and DIOCEJECT. DIOCEJECT is limited to removable media. Fixes PR #1975. - scsi prototypes
1996-01-14From NetBSD: (required for last change to scsi_base.c in case we getbriggs
"command aborted" status) Handle cases like the following: - controller calls scsi_done() with error XS_TIMEOUT - scsi_done() calls sddone() - sddone() calls disk_unbusy() - scsi_done() calls controller to retry command (missing the call to disk_busy()) - controller calls scsi_done() - scsi_done() calls sddone() - sddone() calls disk_busy(), which panics because of the imbalance. Bug noticed by Leo Weppleman, who also suggested this fix; pass an additional boolean argument ("complete") to the device's "done" routine, with a value of `0' passed from the previous call to "done", and add an additional call to "done" when the xfer resources are freed.
1996-01-12from netbsd;Theo de Raadt
New generic disk framework. Highlights: New metrics handling. Metrics are now kept in the new `struct disk'. Busy time is now stored as a timeval, and transfer count in bytes. Storage for disklabels is now dynamically allocated, so that the size of the disk structure is not machine-dependent. Several new functions for attaching and detaching disks, and handling metrics calculation. Old-style instrumentation is still supported in drivers that did it before. However, old-style instrumentation is being deprecated, and will go away once the userland utilities are updated for the new framework. For usage and architectural details, see the forthcoming disk(9) manual page.
1995-12-14from netbsd:Theo de Raadt
If the read or write request can fit into a 6-byte cdb, then use a 6-byte cdb, otherwise use the 10-byte as before. In sdattach(), make a note if the device is "ancient" (i.e. inqbuf.version & SID_ANSII == 0). Implement sdminphys(): if the device is "ancient", shorten the transfer so it will fit into a 6-byte cdb. In sdminphys(), add a comment about the semantics of the "length" field in a 6-byte read/write cdb (namely, length == 0 really means 256), and that we handle this conservatively by limiting the transfer to 255 blocks. *sigh* One just never knows how a pre-scsi-1 device is going to behave. Remove a couple of now unneeded assignments.
1995-10-18initial import of NetBSD treeTheo de Raadt