summaryrefslogtreecommitdiff
path: root/sys/scsi
AgeCommit message (Collapse)Author
1996-10-20Add quirk entries for 2 optical drives, NetBSD PR #2861Todd C. Miller
1996-10-05[a]cd_play -> [a]cd_play_big. Say hello to cdio(1).Jason Downs
1996-10-04Fixed prototype errors, reviewed & approved by deraadtNiklas Hallqvist
1996-08-30Add an IBM quirk.Jason Downs
1996-08-16only safe ioctlTheo de Raadt
1996-08-15for NEC 210 CD-ROM driversshawn
1996-08-13Remove unused variableNiklas Hallqvist
1996-08-12safe ioctl onlyTheo de Raadt
1996-08-11limit ioctl priviledgesTheo de Raadt
1996-08-07disk_unbusy if op failed to enqueueTheo de Raadt
1996-07-30patch for HP scanjet 4p; netbsd pr#2663; kstailey@dol-esa.govTheo de Raadt
1996-07-24for sun-modified maxtor XT-8760S drives; from ivanenko@ctpa03.mit.eduTheo 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-07-11some MUSTEKs fill with 0xff instead of 0x20; netbsd pr#2617; is@beverly.rhein.deTheo de Raadt
1996-07-02handle SCSI_QUEUE_FULL correctlyTheo de Raadt
1996-06-17SCIOCCOMMAND now requires that the device be open for writing.Jason Downs
1996-06-16netbsd pr#2220: add SCIOCRESET. I can't think of any reason not to.Jason Downs
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-22scsi attribute elsewhereTheo de Raadt
1996-05-22syncTheo de Raadt
1996-05-22unload after last closeTheo de Raadt
1996-05-16from NetBSD PR#812:Michael Shalayeff
allow CDDA disks to be read. not tested, anyone w/ SCSI CD is ought to. here is the test program (not tested too ;): #define CDDA #include <stdio.h> #include <unistd.h> #include <fcntl.h> #include <sys/types.h> #include <sys/param.h> #include <sys/scsiio.h> #include <sys/cdio.h> #include <scsi/scsi_all.h> #include <scsi/scsi_cd.h> #include <scsi/scsi_disk.h> extern int errno; void usage() { fprintf(stderr, "usage: cdda -d device -b blkcnt -o offset >output\n"); exit(1); } char databuf[CD_DA_BLKSIZ]; main(int argc, char *argv[]) { int ch; int fd; off_t offset = 0; int cnt = 0; char *dev = 0; struct scsi_rw_big read_cmd; struct scsi_mode_sense sense_cmd; struct cd_mode_data bdesc; scsireq_t req; while ((ch = getopt(argc, argv, "d:b:o:")) != -1) { switch (ch) { case 'd': dev = optarg; break; case 'b': cnt = atoi(optarg); if (cnt <= 0) usage(); break; case 'o': offset = atoi(optarg); break; case '?': default: usage(); } } if (dev == NULL || cnt == 0) usage(); fd = open(dev, O_RDONLY); if (fd == -1) err(1,"can't open device %s", dev); #ifdef DEBUG ch = SC_DB_FLOW; ioctl(fd, SCIOCDEBUG, &ch); #endif ch = 1; if (ioctl(fd, CDIOCSETCDDA, &ch) == -1) warn("can't set CDDA mode"); read_cmd.opcode = READ_BIG; /* READ10 */ read_cmd.byte2 = 0; /* no relative */ read_cmd.reserved = 0; read_cmd.length2 = 0; read_cmd.length1 = 1; /* read one block at a time. hope it caches! */ read_cmd.control = 0; /* LBA mode, leave flag & link zero */ for (; cnt > 0; cnt--, offset++) { read_cmd.addr_3 = (offset >> 24) & 0xff; read_cmd.addr_2 = (offset >> 16) & 0xff; read_cmd.addr_1 = (offset >> 8) & 0xff; read_cmd.addr_0 = offset & 0xff; memset(&req, 0, sizeof(req)); req.flags = SCCMD_READ; /* timeout is in milliseconds--not that it's obvious from the include files! */ req.timeout = 10000; /* 10 sec */ bcopy(&read_cmd, req.cmd, sizeof(read_cmd)); req.cmdlen = sizeof(read_cmd); req.databuf = databuf; req.datalen = sizeof(databuf); req.senselen = sizeof(req.sense); /* XXX */ if (ioctl(fd, SCIOCCOMMAND, &req) == -1) { fprintf(stderr, "bad ioctl: %d\n", errno); ch = 0; ioctl(fd, CDIOCSETCDDA, &ch); #ifdef DEBUG ioctl(fd, SCIOCDEBUG, &ch); #endif exit(1); } if (req.retsts != 0 || req.error != 0) { ch = 0; ioctl(fd, CDIOCSETCDDA, &ch); #ifdef DEBUG ioctl(fd, SCIOCDEBUG, &ch); #endif errx(1,"return status %d, error %d\n", req.retsts, req.error); } if (req.datalen_used != sizeof(databuf)) { ch = 0; ioctl(fd, CDIOCSETCDDA, &ch); #ifdef DEBUG ioctl(fd, SCIOCDEBUG, &ch); #endif errx(1,"didn't get full buffer back (%x)", req.datalen_used); } write(1, databuf, sizeof(databuf)); } ch = 0; if (ioctl(fd, CDIOCSETCDDA, &ch) == -1) warn("can't reset CDDA mode"); #ifdef DEBUG ioctl(fd, SCIOCDEBUG, &ch); #endif close(fd); exit(0); }
1996-05-10SC_DEBUG cleanupTheo de Raadt
1996-05-07Remove erroneously doubled text (patch can do that when a new fileNiklas Hallqvist
comes into existence simultaneously from two directions).
1996-05-06from netbsd; SCSIDEBUG printf() fixesTheo de Raadt
1996-05-06shinaken cd has lun problemTheo 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-29Fix typo in commentNiklas Hallqvist
1996-02-20Sync. with NetBSD:briggs
- scsi prototypes. - Add SCSI scanner support by Kenneth Stailey and Joachim Koenig-Baltes, hacked a but. Needs more work. ss.c: - Truncate to the window size in ssminphys(), not ssread(). - Missed some prototyping foo. - Minor tweak; make sure window size is 0 on close. - Change variable name to avoid GCC warning. - Handle EOF a little differently.
1996-02-20Sync w/ NetBSD:briggs
- Implement DIOCLOCK and DIOCEJECT. DIOCEJECT is limited to removable media. Fixes PR #1975. - scsi prototypes
1996-02-20Sync. w/ NetBSD: scsi prototypes.briggs
1996-02-20Sync. w/ NetBSD: scsi prototypes.briggs
1996-02-20Sync w/ NetBSD: scsi prototypes.briggs
1996-02-20Sync w/ NetBSD:briggs
- Accept DIOCEJECT as a synonym for CDIOCEJECT. Implement DIOCLOCK separately from CDIOCALLOW and CDIOCPREVENT, even though they perform basically the same function (with a different interface XXX). - scsi prototypes
1996-02-20Several changes from NetBSD:briggs
- scsi prototypes - remove #ifdef notdef made unnecessary by previous changes (PR#1597) put in missing "if (error)" that caused tape IO to always fail. (closes PR#2086) - Minor change.
1996-02-09NetBSD PR 2048. Prototype st_erase.briggs
1996-01-31COMMAND ABORTED sense key is 0xb, not 0xa. Also clean up diagnostic message.briggs
1996-01-16from netbsd:Theo de Raadt
Honor cache request and add the SCSI tape device configuration page. Fixes PRs 807, 1201, and 1705. From John Kohl <jtk@kolvir.blrc.ma.us>.
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-14Retry a command when we get a command aborted message for it.briggs
This might be a transient error. Do complain about it, though.
1996-01-12no luns on Tandberg 3600 w/ fake Archive Viper emulation roms; fromTheo de Raadt
raeburn@raeburn.org; netbsd pr#1934
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.
1996-01-10Save inquiry flags in sc_link so low-level drivers can use it.briggs
1996-01-01lun problem on Chinon CDS-525; from k125374@cs.tut.fi; netbsd pr#1686.Theo de Raadt