Up to [local] / src / sys / scsi
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.7, Fri May 27 16:50:31 2005 UTC (19 years ago) by krw
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +1 -1 lines
FILE REMOVED
No longer used after merge of atapi/scsi cd code.
Revision 1.5.4.1 / (download) - annotate - [select for diffs], Wed Jul 4 11:00:04 2001 UTC (22 years, 11 months ago) by niklas
Branch: SMP
Changes since 1.5: +32 -32 lines
Diff to previous 1.5 (colored) next main 1.6 (colored)
Merge in -current from two days ago in the SMP branch. As usual with merges, they do not indicate progress, so do not hold your breath for working SMP, and do not mail me and ask about the state of it. It has not changed. There is work ongoing, but very, very slowly. The commit is done in parts as to not lock up the tree in too big chunks at a time.
Revision 1.6 / (download) - annotate - [select for diffs], Fri Jun 22 14:35:42 2001 UTC (22 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: UBC_SYNC_B,
UBC_SYNC_A,
UBC_BASE,
UBC,
SMP_SYNC_B,
SMP_SYNC_A,
OPENBSD_3_7_BASE,
OPENBSD_3_7,
OPENBSD_3_6_BASE,
OPENBSD_3_6,
OPENBSD_3_5_BASE,
OPENBSD_3_5,
OPENBSD_3_4_BASE,
OPENBSD_3_4,
OPENBSD_3_3_BASE,
OPENBSD_3_3,
OPENBSD_3_2_BASE,
OPENBSD_3_2,
OPENBSD_3_1_BASE,
OPENBSD_3_1,
OPENBSD_3_0_BASE,
OPENBSD_3_0
Changes since 1.5: +32 -32 lines
Diff to previous 1.5 (colored)
KNF
Revision 1.5 / (download) - annotate - [select for diffs], Tue Jul 20 06:21:59 1999 UTC (24 years, 10 months ago) by csapuntz
Branch: MAIN
CVS Tags: kame_19991208,
SMP_BASE,
OPENBSD_2_9_BASE,
OPENBSD_2_9,
OPENBSD_2_8_BASE,
OPENBSD_2_8,
OPENBSD_2_7_BASE,
OPENBSD_2_7,
OPENBSD_2_6_BASE,
OPENBSD_2_6
Branch point for: SMP
Changes since 1.4: +41 -173 lines
Diff to previous 1.4 (colored)
Make acd redundant. Mostly based on NetBSD-current
Revision 1.4 / (download) - annotate - [select for diffs], Thu Oct 31 01:09:21 1996 UTC (27 years, 7 months ago) by niklas
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE,
OPENBSD_2_5,
OPENBSD_2_4_BASE,
OPENBSD_2_4,
OPENBSD_2_3_BASE,
OPENBSD_2_3,
OPENBSD_2_2_BASE,
OPENBSD_2_2,
OPENBSD_2_1_BASE,
OPENBSD_2_1
Changes since 1.3: +1 -0 lines
Diff to previous 1.3 (colored)
$OpenBSD RCSIDs + comment fix in sd.c
Revision 1.3 / (download) - annotate - [select for diffs], Thu May 16 09:28:56 1996 UTC (28 years, 1 month ago) by mickey
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE,
OPENBSD_2_0
Changes since 1.2: +17 -0 lines
Diff to previous 1.2 (colored)
from NetBSD PR#812: 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); }
Revision 1.2 / (download) - annotate - [select for diffs], Sun Apr 21 22:30:52 1996 UTC (28 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.1: +82 -94 lines
Diff to previous 1.1 (colored)
partial sync with netbsd 960418, more to come
Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:53:24 1995 UTC (28 years, 8 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)
initial import of NetBSD tree
Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:53:24 1995 UTC (28 years, 8 months ago) by deraadt
Branch: MAIN
Initial revision