• Bug#265229: cdrecord: add support for using sane device-name on kernel

    From Timo Aaltonen@1:229/2 to All on Thu Aug 12 12:00:11 2004
    From: [email protected]

    Package: cdrecord
    Version: 4:2.0+a34-1
    Severity: wishlist
    Tags: patch

    Please add the following patch from LMKL. It allows to use
    "dev=/dev/hd*" instead of cryptic "dev=ATAPI:x,x,x" when using
    ATAPI-burning. Nautilus-cd-burner is broken because of this behaviour,
    and this patch makes n-c-b to work as well.

    Using ide-scsi and allowing access to /dev/sg* is _not_ an option for us..


    --- cdrtools-2.01.orig/libscg/scsi-linux-ata.c Sat Jun 12 12:48:12 2004
    +++ cdrtools-2.01/libscg/scsi-linux-ata.c Wed Aug 4 14:19:31 2004
    @@ -42,6 +42,11 @@
    * You should have received a copy of the GNU General Public License along with * this program; see the file COPYING. If not, write to the Free Software
    * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    + *
    + * Sat Jun 12 12:48:12 CEST 2004 herp - Herbert Rosmanith
    + * Force ATAPI driver if dev= starts with /dev/hd and device
    + * is present in /proc/ide/hdX
    + *
    */

    #ifdef USE_ATA
    @@ -60,7 +65,7 @@
    LOCAL int scgo_areset __PR((SCSI *scgp, int what));
    LOCAL int scgo_asend __PR((SCSI *scgp));

    -LOCAL scg_ops_t ata_ops = {
    +EXPORT scg_ops_t scg_ata_ops = {
    scgo_asend,
    scgo_aversion,
    scgo_ahelp,
    diff -ru cdrtools-2.01.orig/libscg/scsi-linux-sg.c cdrtools-2.01/libscg/scsi-linux-sg.c
    --- cdrtools-2.01.orig/libscg/scsi-linux-sg.c Thu May 20 15:42:12 2004
    +++ cdrtools-2.01/libscg/scsi-linux-sg.c Wed Aug 4 14:20:56 2004
  • From Andreas Metzler@1:229/2 to [email protected] on Thu Aug 12 12:40:14 2004
    From: [email protected]

    On 2004-08-12 Timo Aaltonen <[email protected]> wrote:
    Package: cdrecord
    Version: 4:2.0+a34-1
    Severity: wishlist
    Tags: patch

    Please add the following patch from LMKL. It allows to use
    "dev=/dev/hd*" instead of cryptic "dev=ATAPI:x,x,x" when using
    ATAPI-burning. Nautilus-cd-burner is broken because of this behaviour,
    and this patch makes n-c-b to work as well.
    [...]

    You should never use dev=ATAPI:x,x,x. This is _not_ the same as
    "dev=/dev/hd*" it is a slow, potentially broken interface which is
    only there because there are difficulties with ide-scsi and PCMCIA
    cd-writers.

    You want dev=ATA=x,y,z for kernel 2.6, if n-c-b is using dev=ATAPI it
    is broken.

    Note that this does not include any decision on the patch, just
    pointing you in the right direction.
    cu andreas
    --
    "See, I told you they'd listen to Reason," [SPOILER] Svfurlr fnlf,
    fuhggvat qbja gur juveyvat tha.
    Neal Stephenson in "Snow Crash"


    --
    To UNSUBSCRIBE, email to [email protected]
    with a subject of "unsubscribe". Trouble? Contact [email protected]

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Timo Aaltonen@1:229/2 to Andreas Metzler on Thu Aug 12 13:00:09 2004
    From: [email protected]

    On Thu, 12 Aug 2004, Andreas Metzler wrote:

    On 2004-08-12 Timo Aaltonen <[email protected]> wrote:
    Package: cdrecord
    Version: 4:2.0+a34-1
    Severity: wishlist
    Tags: patch

    Please add the following patch from LMKL. It allows to use
    "dev=/dev/hd*" instead of cryptic "dev=ATAPI:x,x,x" when using ATAPI-burning. Nautilus-cd-burner is broken because of this behaviour,
    and this patch makes n-c-b to work as well.
    [...]

    You should never use dev=ATAPI:x,x,x. This is _not_ the same as "dev=/dev/hd*" it is a slow, potentially broken interface which is
    only there because there are difficulties with ide-scsi and PCMCIA cd-writers.

    it is the only one that works for me without ide-scsi with kernel 2.4.x

    You want dev=ATA=x,y,z for kernel 2.6, if n-c-b is using dev=ATAPI it
    is broken.

    n-c-b tries /dev/hd* if it is found, but because cdrecord doesn't support
    it on 2.4.x it fails.

    Note that this does not include any decision on the patch, just
    pointing you in the right direction.
    cu andreas

    we'll, applying it would maybe "upset" upstream, but probably make many 2.4.x-users happy ;)

    t


    --
    To UNSUBSCRIBE, email to [email protected]
    with a subject of "unsubscribe". Trouble? Contact [email protected]

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Eduard Bloch@1:229/2 to All on Thu Aug 12 14:00:15 2004
    From: [email protected]

    #include <hallo.h>
    * Timo Aaltonen [Thu, Aug 12 2004, 01:40:38PM]:

    You should never use dev=ATAPI:x,x,x. This is _not_ the same as "dev=/dev/hd*" it is a slow, potentially broken interface which is
    only there because there are difficulties with ide-scsi and PCMCIA cd-writers.

    it is the only one that works for me without ide-scsi with kernel 2.4.x

    Correct me if I am wrong, but IMO this patch won't help you with kernel
    2.4.x. It does not introduce a new driver, it simply changes the
    automatic change of a driver. The drivers are: SCSI (pure SCSI on any
    kernel; ide-scsi with 2.4, 2.6, both without proper DMA and broken on
    early 2.6.x versions), ATAPI (bad hackish interface, not blessed by
    kernel developers, existing on latest 2.4 versions and 2.6) and ATA
    (2.6, good, DMA).

    By default, libscg (cdrecord) chooses the ATAPI driver if you specify dev=/dev/name, with this patch it chooses ATA on kernel 2.6 and maps the
    device name to the Joerg-Schilling-SCSI syntax. I don't think it will
    work this way on kernel 2.4, and this patch was not accepted well by the
    kernel developers since it works with too many assumptions, abusing
    procfs data.

    Regards,
    Eduard.
    --
    <smuuth> ich habe M�rder in meinen Aquarium
    <nobse> Killerguppies?
    <smuuth> Skalare
    <smuuth> Mehr fehlen 15 Fische
    <Madkiss> krass
    <nobse> Die sind vermutlich nur abgehauen. Hatten die Schnauze voll von dir.

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Timo Aaltonen@1:229/2 to Eduard Bloch on Thu Aug 12 16:20:06 2004
    From: [email protected]

    On Thu, 12 Aug 2004, Eduard Bloch wrote:

    By default, libscg (cdrecord) chooses the ATAPI driver if you specify dev=/dev/name, with this patch it chooses ATA on kernel 2.6 and maps the device name to the Joerg-Schilling-SCSI syntax. I don't think it will
    work this way on kernel 2.4, and this patch was not accepted well by the kernel developers since it works with too many assumptions, abusing
    procfs data.

    well, this is still the only way to use cdrecord on 2.4 with /dev/name.
    Maybe the correct way would be to make it use ATA as J.Axboe suggested,
    but that might take some time..

    I've now tested this patch and it works. We'll probably make a package of
    our own for now.


    t


    --
    To UNSUBSCRIBE, email to [email protected]
    with a subject of "unsubscribe". Trouble? Contact [email protected]

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)