[regression] CD-DA delay needed after insertion - Kernel

This is a discussion on [regression] CD-DA delay needed after insertion - Kernel ; Fixed in SVN; pull a copy and try again. [Mein Gott, that bug was just embarrassing] Monty -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at ...

+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 21 to 30 of 30

Thread: [regression] CD-DA delay needed after insertion

  1. Re: [regression] CD-DA delay needed after insertion (http://bugzilla.kernel.org/show_bug.cgi?id=10974)

    Fixed in SVN; pull a copy and try again.

    [Mein Gott, that bug was just embarrassing]

    Monty
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  2. Re: [regression] CD-DA delay needed after insertion (http://bugzilla.kernel.org/show_bug.cgi?id=10974)

    Hi Monty,

    On Tue, 30 Sep 2008, Monty Montgomery wrote:
    > > | 0x0ffd5730 in cdda_read_timed () from /usr/lib/libcdda_interface.so.0
    > > | (gdb) bt
    > > | #0 0x0ffd5730 in cdda_read_timed () from /usr/lib/libcdda_interface.so.0
    > > | #1 0x0ffa7624 in i_read_c_block () from /usr/lib/libcdda_paranoia.so.0
    > > | #2 0x0ffa9114 in paranoia_read_limited () from /usr/lib/libcdda_paranoia.so.0
    > > | #3 0x10004da0 in ?? ()
    > > | #4 0x0fd46704 in ?? () from /lib/libc.so.6
    > > | #5 0x0fd468c0 in __libc_start_main () from /lib/libc.so.6
    > > | #6 0x00000000 in ?? ()
    > >
    > > due to the `buffer' parameter being NULL.

    >
    > Oh, good catch. Platform/drive combination that hadn't been tripped
    > here. Fixing in SVN now.


    OK, I'll take a look...

    > (you're on bigendian or using an old bigendian SCSI drive?)


    Yep. This is on PS3, which is ppc64 (albeit most userland is ppc32).

    With kind regards,

    Geert Uytterhoeven
    Software Architect

    Sony Techsoft Centre Europe
    The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

    Phone: +32 (0)2 700 8453
    Fax: +32 (0)2 700 8622
    E-mail: Geert.Uytterhoeven@sonycom.com
    Internet: http://www.sony-europe.com/

    A division of Sony Europe (Belgium) N.V.
    VAT BE 0413.825.160 · RPR Brussels
    Fortis · BIC GEBABEBB · IBAN BE41293037680010

  3. Re: [regression] CD-DA delay needed after insertion (http://bugzilla.kernel.org/show_bug.cgi?id=10974)

    On Tue, 30 Sep 2008, Monty Montgomery wrote:
    > Fixed in SVN; pull a copy and try again.
    >
    > [Mein Gott, that bug was just embarrassing]


    With latest cdparanoia git-^H^H^H^Hsvn, the problem still happens.
    After applying the patch below, there's no more crash thanks to your last
    commit, and It Just Works(tm):

    eject; sg_start -i -l /dev/scd0; cdparanoia -d /dev/scd0 -Z -q 1-1[:1] /dev/null || echo failed

    diff --git a/interface/scan_devices.c b/interface/scan_devices.c
    index bfe5403..df08906 100644
    --- a/interface/scan_devices.c
    +++ b/interface/scan_devices.c
    @@ -614,7 +614,7 @@ cdrom_drive *cdda_identify_scsi(const char *generic_device,

    if(specialized_device) {
    if(use_sgio)
    - i_fd=open(specialized_device,O_RDWR|O_NONBLOCK);
    + i_fd=open(specialized_device,O_RDONLY);
    else
    i_fd=open(specialized_device,O_RDONLY|O_NONBLOCK);
    }

    With kind regards,

    Geert Uytterhoeven
    Software Architect

    Sony Techsoft Centre Europe
    The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

    Phone: +32 (0)2 700 8453
    Fax: +32 (0)2 700 8622
    E-mail: Geert.Uytterhoeven@sonycom.com
    Internet: http://www.sony-europe.com/

    A division of Sony Europe (Belgium) N.V.
    VAT BE 0413.825.160 · RPR Brussels
    Fortis · BIC GEBABEBB · IBAN BE41293037680010

  4. Re: [regression] CD-DA delay needed after insertion (http://bugzilla.kernel.org/show_bug.cgi?id=10974)

    > With latest cdparanoia git-^H^H^H^Hsvn, the problem still happens.
    > After applying the patch below, there's no more crash thanks to your last
    > commit, and It Just Works(tm):


    Then I will be doing some headscratching over a copy of the kernel.
    Oh-- what *exact* kernel are you using? non-x86 trees don't always
    sync often with the 'official' mainline and I want to be sure I'm
    reading the correct thing. I was a longtime PPC user until about two
    years ago, and I'm used to there being several substantially different
    PPC kernel trees [just making sure].

    OTOH, if the kernel isn't even servicing the device as a block device
    until the drive returns a ready status and O_NONBLOCK thwarts waiting
    for that.... sigh. Nothing like a passthrough interface that still
    isn't a passthrough interface after fifteen years of dicking around.

    I'm not willing to cripple cdparanoia on more-than-one-cdrom systems
    because of an edge case due to yet another ill-considered block layer
    'feature'. For one thing *I* need to be able to scan devices without
    blocking on my own multiple drive systems. If there's a workaround to
    get both, I will find it.

    But it's too early to say for sure. I'll check again.

    (May I ask-- why the hard starting/stopping of the interface? Power saving?]

    Monty
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  5. Re: [regression] CD-DA delay needed after insertion (http://bugzilla.kernel.org/show_bug.cgi?id=10974)

    On Tue, 30 Sep 2008, Monty Montgomery wrote:
    > > With latest cdparanoia git-^H^H^H^Hsvn, the problem still happens.
    > > After applying the patch below, there's no more crash thanks to your last
    > > commit, and It Just Works(tm):

    >
    > Then I will be doing some headscratching over a copy of the kernel.
    > Oh-- what *exact* kernel are you using? non-x86 trees don't always
    > sync often with the 'official' mainline and I want to be sure I'm
    > reading the correct thing. I was a longtime PPC user until about two
    > years ago, and I'm used to there being several substantially different
    > PPC kernel trees [just making sure].


    It happens on anything after 2.6.24 (cfr.
    http://bugzilla.kernel.org/show_bug.cgi?id=10974).
    E.g. mainline 2.6.27-rc8.

    > OTOH, if the kernel isn't even servicing the device as a block device
    > until the drive returns a ready status and O_NONBLOCK thwarts waiting
    > for that.... sigh. Nothing like a passthrough interface that still
    > isn't a passthrough interface after fifteen years of dicking around.
    >
    > I'm not willing to cripple cdparanoia on more-than-one-cdrom systems
    > because of an edge case due to yet another ill-considered block layer
    > 'feature'. For one thing *I* need to be able to scan devices without
    > blocking on my own multiple drive systems. If there's a workaround to
    > get both, I will find it.
    >
    > But it's too early to say for sure. I'll check again.


    The difficult part is who's to blame: Linux commit
    38582a62ecd337de4212004c7d4844899dc57890 or cdparanoia?

    > (May I ask-- why the hard starting/stopping of the interface? Power saving?]


    Which hard starting/stopping do you mean?

    Thanks!

    With kind regards,

    Geert Uytterhoeven
    Software Architect

    Sony Techsoft Centre Europe
    The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

    Phone: +32 (0)2 700 8453
    Fax: +32 (0)2 700 8622
    E-mail: Geert.Uytterhoeven@sonycom.com
    Internet: http://www.sony-europe.com/

    A division of Sony Europe (Belgium) N.V.
    VAT BE 0413.825.160 · RPR Brussels
    Fortis · BIC GEBABEBB · IBAN BE41293037680010

  6. Re: [regression] CD-DA delay needed after insertion (http://bugzilla.kernel.org/show_bug.cgi?id=10974)

    On Tue, Sep 30, 2008 at 11:21 AM, Geert Uytterhoeven
    wrote:

    >> (May I ask-- why the hard starting/stopping of the interface? Power saving?]

    >
    > Which hard starting/stopping do you mean?


    why the calls to sg_start?

    Monty
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  7. Re: [regression] CD-DA delay needed after insertion (http://bugzilla.kernel.org/show_bug.cgi?id=10974)

    On Tue, Sep 30, 2008 at 11:41:51AM -0600, Matthew Wilcox wrote:
    > On Tue, Sep 30, 2008 at 01:32:15PM -0400, Monty Montgomery wrote:
    > > On Tue, Sep 30, 2008 at 11:21 AM, Geert Uytterhoeven
    > > wrote:
    > >
    > > >> (May I ask-- why the hard starting/stopping of the interface? Power saving?]

    > > why the calls to sg_start?

    >
    > In this case, sg means scatter/gather, and it's a purely internal
    > interface. It does not start/stop the drive, nor the scsi interface.


    That'll teach me to comment before reading the entire thread. Please
    ignore this mistaken explanation; I thought you were commenting on a
    patch, not on the commands used at the command line.

    --
    Matthew Wilcox Intel Open Source Technology Centre
    "Bill, look, we understand that you're interested in selling us this
    operating system, but compare it to ours. We can't possibly take such
    a retrograde step."
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  8. Re: [regression] CD-DA delay needed after insertion (http://bugzilla.kernel.org/show_bug.cgi?id=10974)

    On Tue, Sep 30, 2008 at 01:32:15PM -0400, Monty Montgomery wrote:
    > On Tue, Sep 30, 2008 at 11:21 AM, Geert Uytterhoeven
    > wrote:
    >
    > >> (May I ask-- why the hard starting/stopping of the interface? Power saving?]

    > why the calls to sg_start?


    In this case, sg means scatter/gather, and it's a purely internal
    interface. It does not start/stop the drive, nor the scsi interface.

    --
    Matthew Wilcox Intel Open Source Technology Centre
    "Bill, look, we understand that you're interested in selling us this
    operating system, but compare it to ours. We can't possibly take such
    a retrograde step."
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  9. Re: [regression] CD-DA delay needed after insertion (http://bugzilla.kernel.org/show_bug.cgi?id=10974)

    > It happens on anything after 2.6.24 (cfr.
    > http://bugzilla.kernel.org/show_bug.cgi?id=10974).
    > E.g. mainline 2.6.27-rc8.


    Ah.

    Geert, I'm sorry this has come up and thanks for bringing it to my attention.

    I'm relying on 15 year old behavior. It has always been the case that
    the packet pass-through interfaces treat O_NONBLOCK as 'don't wait for
    commands' (ie, classic async communication or, in the case of SGIO,
    don't block on mandatory locks) not 'change how you mediate the
    communication'. The whole point of the passthrough interface is
    'please don't **** with the packet stream. My userspace application
    knows better than the kernel in this case'. If the kernel has
    suddenly changed that, it is responsible for the loss of
    functionality, not cdparanoia.

    It is also the case that the kernel randomly interspersing its own
    packets, commands and setup would be yanking setup state out from
    under cdparanoia. What am I supposed to do if I set density and
    completely change the data mode of a cdrom drive (persistent across
    disc changes), or change the block descriptor caching extents, only to
    have the kernel decide to change them back without warning? If you
    eject media with one of these new kernels, do I still get any
    meaningful sense state, or is the sense key and all subsequent
    commands merely intercepted and refused? What happens on a timeout?
    A media error? A bus reset? Does any 'CHECK CONDITION' status
    completely yank the rug out from under the passthrough?

    The kernel must not interfere with the pass-through or cdparanoia is
    castrated. Or... I'm back to the era of enacting workarounds based on
    kernel dot-version. Regardless, this is a change to a longstanding
    behavior. Is it on purpose, unintentional or 'intentional but without
    realizing it was actually important'? Would be interesting to know.

    > In this case, sg means scatter/gather, and it's a purely internal
    > interface. It does not start/stop the drive, nor the scsi interface.


    Ah, I confused it with a much older utility that would up/down an SG
    device entirely.

    Monty
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  10. Re: [regression] CD-DA delay needed after insertion (http://bugzilla.kernel.org/show_bug.cgi?id=10974)

    On Tue, 30 Sep 2008, Monty Montgomery wrote:
    > > It happens on anything after 2.6.24 (cfr.
    > > http://bugzilla.kernel.org/show_bug.cgi?id=10974).
    > > E.g. mainline 2.6.27-rc8.

    >
    > Ah.
    >
    > Geert, I'm sorry this has come up and thanks for bringing it to my attention.


    The bugzilla link has been in the subjects of the emails all the time ;-)

    > > In this case, sg means scatter/gather, and it's a purely internal
    > > interface. It does not start/stop the drive, nor the scsi interface.

    >
    > Ah, I confused it with a much older utility that would up/down an SG
    > device entirely.


    It is the command line utility.
    James suggested to use it to load the CD.

    Before that, my test sequence was less deterministic and not fully automated
    (insert CD, wait until the blue LED is lit, launch cdparanoia).

    With kind regards,

    Geert Uytterhoeven
    Software Architect

    Sony Techsoft Centre Europe
    The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

    Phone: +32 (0)2 700 8453
    Fax: +32 (0)2 700 8622
    E-mail: Geert.Uytterhoeven@sonycom.com
    Internet: http://www.sony-europe.com/

    A division of Sony Europe (Belgium) N.V.
    VAT BE 0413.825.160 · RPR Brussels
    Fortis · BIC GEBABEBB · IBAN BE41293037680010

+ Reply to Thread
Page 2 of 2 FirstFirst 1 2