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
--=-wvT94fWRxwx3tIJ3Na0z Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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; =20 +#if 0 cmd[0] =3D 0x35; // FLUSH CACHE cmd[1] =3D 0x02; // "IMMED" cmd[9] =3D 0; @@ -949,6 +950,7 @@ wait_for_unit (cmd); else perror (":-( unable to FLUSH CACHE"); +#endif // XXX PAV XXX =20 #if 1 // Pioneer apparently needs this, non-IMMED FLUSH that is... cmd[0] =3D 0x35; // FLUSH CACHE @@ -1019,7 +1021,7 @@ =20 fprintf (stderr,"%s: writing lead-out\n",ioctl_device); cmd[0] =3D 0x5B; // CLOSE TRACK/SESSION - cmd[1] =3D 0x01; // "IMMED" + // XXX PAV XXX cmd[1] =3D 0x01; // "IMMED" cmd[2] =3D 0x02; // "Close session" cmd[9] =3D 0; if ((errcode=3Dcmd.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. --=20 Pav Lucistnik <pav@oook.cz> <pav@FreeBSD.org> Me go and see Elves and all! Hooray! --=-wvT94fWRxwx3tIJ3Na0z Content-Type: application/pgp-signature; name=signature.asc Content-Description: Toto je =?iso-8859-2?Q?digit=E1ln=EC?= =?ISO-8859-1?Q?_podepsan=E1?= =?iso-8859-2?Q?_=E8=E1st?= =?ISO-8859-1?Q?_zpr=E1vy?= -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQA/4kIMntdYP8FOsoIRAhU1AJ9OSCUjVsMSAg9d3prssEJL62LFrQCbB3Ab gq/ZhixKR+S0s1G6ssvMn8I= =Tasw -----END PGP SIGNATURE----- --=-wvT94fWRxwx3tIJ3Na0z--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1071792652.3356.23.camel>