Date: Sun, 2 Nov 97 18:20:34 +0100 From: Jean-Marc Zucconi <jmz@cabri.obs-besancon.fr> To: michael_class@bbn.hp.com Cc: freebsd-scsi@freebsd.org Subject: Re: Burning Audio-CD on HP4020i does not work Message-ID: <9711021720.AA05572@cabri.obs-besancon.fr> In-Reply-To: <345C64B2.2ED68420@hpbbse.bbn.hp.com> (message from Micha Class on Sun, 02 Nov 1997 12:32:02 %2B0100)
next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> Micha Class writes:
> Symtom:
> Burning does not start, I get the following error-messages:
> Nov 2 12:20:40 pc-micha /kernel: worm0: ILLEGAL REQUEST asc:2c,0
> Command sequence error
> Nov 2 12:20:42 pc-micha last message repeated 2 times
Try the patch below (which is in -current now). However I am surprised
that you were able to burn audio CDs with your script, because audio
burning requires a bloc size which is a multiple of 2352.
Index: worm.c
===================================================================
RCS file: /home/ncvs/src/sys/scsi/worm.c,v
retrieving revision 1.46
diff -u -r1.46 worm.c
--- worm.c 1997/09/21 22:03:22 1.46
+++ worm.c 1997/10/11 05:32:04
@@ -139,6 +139,7 @@
static errval worm_rezero_unit(struct scsi_link *sc_link);
static errval worm_read_session_info(struct scsi_link *, struct wormio_session_info *);
static int worm_sense_handler(struct scsi_xfer *);
+static errval worm_set_blksize(struct scsi_link *sc_link, int size);
/* XXX should be moved out to an LKM */
static errval rf4100_prepare_disk(struct scsi_link *, int dummy, int speed);
@@ -957,6 +958,31 @@
return SCSIRET_CONTINUE;
}
+static errval
+worm_set_blksize(struct scsi_link *sc_link, int size)
+{
+ struct scsi_mode_select scsi_cmd;
+ struct {
+ struct scsi_mode_header header;
+ struct blk_desc desc;
+ } dat;
+ bzero(&scsi_cmd, sizeof(scsi_cmd));
+ bzero(&dat, sizeof(dat));
+ scsi_cmd.op_code = MODE_SELECT;
+ scsi_cmd.length = sizeof(dat);
+ dat.header.blk_desc_len = sizeof(struct blk_desc);
+ scsi_uto3b(size, dat.desc.blklen);
+ return scsi_scsi_cmd(sc_link,
+ (struct scsi_generic *) &scsi_cmd,
+ sizeof(scsi_cmd),
+ (u_char *) &dat,
+ sizeof(dat),
+ /*WORM_RETRIES*/ 4,
+ 5000,
+ NULL,
+ SCSI_DATA_OUT);
+}
+
static void
worm_drvinit(void *unused)
{
@@ -1230,12 +1256,9 @@
60000, /* this may take a while */
NULL,
0);
- if (!error) {
- struct wormio_prepare_track t;
- bzero (&t, sizeof (t));
- t.track_type = BLOCK_MODE_1;
- error = rf4100_prepare_track(sc_link, &t);
- }
+ if (!error)
+ error = worm_set_blksize(sc_link, 2048);
+
return error;
}
@@ -1532,12 +1555,9 @@
60000, /* this may take a while */
NULL,
0);
- if (!error) {
- struct wormio_prepare_track t;
- bzero (&t, sizeof (t));
- t.track_type = BLOCK_MODE_1;
- error = hp4020i_prepare_track(sc_link, &t);
- }
+ if (!error)
+ error = worm_set_blksize(sc_link, 2048);
+
return error;
}
Jean-Marc
_____________________________________________________________________________
Jean-Marc Zucconi Observatoire de Besancon F 25010 Besancon cedex
PGP Key: finger jmz@cabri.obs-besancon.fr
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9711021720.AA05572>
