public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Steve deRosier <derosier@pianodisc.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: CDROMREADAUDIO ioctl EINVAL error with 2.6.1; it works with 2.4.21
Date: Fri, 30 Jan 2004 12:11:05 +0100	[thread overview]
Message-ID: <20040130111105.GM11683@suse.de> (raw)
In-Reply-To: <4019A35E.5050000@pianodisc.com>

On Thu, Jan 29 2004, Steve deRosier wrote:
> All,
> 
> We have a CDROM audio application that works properly with 2.4.21, but when 
> we try to run it under 2.6.1 it receives an error (EINVAL) from the ioctl 
> CDROMREADAUDIO call.
> 
> Details:
> It is a via-based mini-ITX format computer using a USB CDROM drive.  The 
> kernel is 2.4.21 for the working version of the program (referred 
> henceforth as "pdcd").  The 2.6.1 kernel causes pdcd to fail on the call to 
> ioctl with a return of '22':
> if( (err = ioctl( mCDh, CDROMREADAUDIO, &mCDAudio)) >= 0 )
> 
> with the following declarations:
> int err;
> int mCDh;
> struct cdrom_read_audio mCDAudio;
> 
> Example fragment (we do more, I trimmed it to show the immediate data going 
> into the ioctl call):
> ----
> // Open the CDROM 
> mCDh = open( "/dev/cdrom", O_RDONLY | O_NONBLOCK );
> if( mCDh < 0 )
> {
>  return false;
> }
> 
> // Prepare to read audio directly
> mCDAudio.addr_format = CDROM_MSF;
> mCDAudio.addr.msf.minute = mCDMSF.cdmsf_min0;
> mCDAudio.addr.msf.second = mCDMSF.cdmsf_sec0;
> mCDAudio.addr.msf.frame = mCDMSF.cdmsf_frame0;
> mCDAudio.nframes = CD_FRAMES;

CD_FRAMES is too big, 2.6 will reject this (where 2.4 silently allowed
it, but allocated smaller chunks in the loop). Use 64 for now.

-- 
Jens Axboe


  reply	other threads:[~2004-01-30 11:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-30  0:20 CDROMREADAUDIO ioctl EINVAL error with 2.6.1; it works with 2.4.21 Steve deRosier
2004-01-30 11:11 ` Jens Axboe [this message]
2004-02-02 19:09   ` Steve deRosier
2004-02-03  9:08     ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040130111105.GM11683@suse.de \
    --to=axboe@suse.de \
    --cc=derosier@pianodisc.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox