Date: Fri, 19 Dec 2003 01:10:52 +0100 From: Pav Lucistnik <pav@FreeBSD.org> To: freebsd-current@FreeBSD.org Subject: atapicam: flag IMMED broken Message-ID: <1071792652.3356.23.camel@hood.oook.cz>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Hi, I was playing with a DVD writer on -CURRENT again today,
this time with growisofs utility from dvd+rw-tools package.
It's "almost" working, but sometimes it fails on a SCSI command with
IMMED (0x01) flag set. The problems demonstrates with this error
message:
653580288/4658987008 (99.9%) @2.4x, remaining 0:01
/dev/pass1: flushing cache
/dev/pass1: writing lead-out
- [unable to TEST UNIT READY]: Input/output error
I was able to get it fully working on DVD+RW with this patch:
--- dvd+rw-tools-5.13.4.7.4-orig/growisofs_mmc.cpp Fri Sep 19 13:21:27 2003
+++ dvd+rw-tools-5.13.4.7.4/growisofs_mmc.cpp Fri Dec 19 00:46:31 2003
@@ -942,6 +942,7 @@
static int flush_cache (Scsi_Command &cmd)
{ int err;
+#if 0
cmd[0] = 0x35; // FLUSH CACHE
cmd[1] = 0x02; // "IMMED"
cmd[9] = 0;
@@ -949,6 +950,7 @@
wait_for_unit (cmd);
else
perror (":-( unable to FLUSH CACHE");
+#endif // XXX PAV XXX
#if 1 // Pioneer apparently needs this, non-IMMED FLUSH that is...
cmd[0] = 0x35; // FLUSH CACHE
@@ -1019,7 +1021,7 @@
fprintf (stderr,"%s: writing lead-out\n",ioctl_device);
cmd[0] = 0x5B; // CLOSE TRACK/SESSION
- cmd[1] = 0x01; // "IMMED"
+ // XXX PAV XXX cmd[1] = 0x01; // "IMMED"
cmd[2] = 0x02; // "Close session"
cmd[9] = 0;
if ((errcode=cmd.transport()))
It's not a clean solution, but it points into one exact thing that is
broken in atapicam after ATAng - IMMED flagged commands. My guess is
that it's the periodical checking of the unit for completion of this
command which is failing.
I'd really appreciate if someone skilled in this area looks into the
issue - I'm ready to test any patches, as I'm planning on keeping DVD
writer hooked to my -CURRENT box over the holidays.
--
Pav Lucistnik <pav@oook.cz>
<pav@FreeBSD.org>
Me go and see Elves and all! Hooray!
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)
iD8DBQA/4kIMntdYP8FOsoIRAhU1AJ9OSCUjVsMSAg9d3prssEJL62LFrQCbB3Ab
gq/ZhixKR+S0s1G6ssvMn8I=
=Tasw
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1071792652.3356.23.camel>
