From owner-freebsd-current@FreeBSD.ORG Thu Dec 18 16:10:56 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9866316A4CE for ; Thu, 18 Dec 2003 16:10:56 -0800 (PST) Received: from hood.oook.cz (hood.oook.cz [212.27.205.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E86343D53 for ; Thu, 18 Dec 2003 16:10:54 -0800 (PST) (envelope-from pav@FreeBSD.org) Received: from hood.oook.cz (localhost.oook.cz [127.0.0.1]) by hood.oook.cz (8.12.10/8.12.10) with ESMTP id hBJ0ArQD073735 for ; Fri, 19 Dec 2003 01:10:53 +0100 (CET) (envelope-from pav@FreeBSD.org) Received: (from pav@localhost) by hood.oook.cz (8.12.10/8.12.10/Submit) id hBJ0AqRZ073734 for freebsd-current@freebsd.org; Fri, 19 Dec 2003 01:10:52 +0100 (CET) (envelope-from pav@FreeBSD.org) X-Authentication-Warning: hood.oook.cz: pav set sender to pav@FreeBSD.org using -f From: Pav Lucistnik To: freebsd-current@FreeBSD.org Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-wvT94fWRxwx3tIJ3Na0z" Message-Id: <1071792652.3356.23.camel@hood.oook.cz> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Fri, 19 Dec 2003 01:10:52 +0100 Subject: atapicam: flag IMMED broken X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: pav@FreeBSD.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Dec 2003 00:10:56 -0000 --=-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 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--