All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@hp.com>
To: Alexander Graf <agraf@suse.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] ide: fix ATAPI read drive structure command (v3)
Date: Tue, 03 Jun 2008 08:21:50 -0600	[thread overview]
Message-ID: <1212502910.10496.7.camel@bling> (raw)
In-Reply-To: <2EA004FA-68CF-4989-BD54-42E3AA231C35@suse.de>

Hi Alex,

On Tue, 2008-06-03 at 15:48 +0200, Alexander Graf wrote:

> On Jun 3, 2008, at 12:12 AM, Alex Williamson wrote:

> > @@ -1741,16 +1845,11 @@
> >             /* 
> >              * the number of sectors from the media tells us which
> > profile
> >              * to use as current.  0 means there is no media
> > -             *
> > -             * XXX: fails to detect correctly DVDs with less data
> > burned
> > -             *      than what a CD can hold
> >              */
> > -            if (s -> nb_sectors) {
> > -                if (s -> nb_sectors > CD_MAX_SECTORS)
> > -                    cpu_to_ube16(buf + 6, MMC_PROFILE_DVD_ROM);
> > -                else
> > -                    cpu_to_ube16(buf + 6, MMC_PROFILE_CD_ROM);
> > -            }
> > +            if (media_is_dvd(s))
> > +                cpu_to_ube16(buf + 6, MMC_PROFILE_DVD_ROM);
> > +            else if (media_is_cd(s))
> > +                cpu_to_ube16(buf + 6, MMC_PROFILE_CD_ROM);
> 
> 
> After having looked at the spec and a real dvd rom output I got
> uncertain if this is correct. Shouldn't capabilities provide the
> capabilities of the drive and not the medium?

Yes, I agree, this is a pretty weak test, however, that's a topic for a
different patch.  I'm not changing the existing logic here with this
patch.

> Apart from that the patch looks fine to me.

Great, thanks for the review!  If there are no other comments, could
someone please apply this to the tree?  Thanks,

	Alex

-- 
Alex Williamson                             HP Open Source & Linux Org.

  reply	other threads:[~2008-06-03 14:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-27  5:25 [Qemu-devel] [PATCH] ide: fix ATAPI read drive structure command Alex Williamson
2008-05-27  7:46 ` Alexander Graf
2008-05-28 19:48   ` Alex Williamson
2008-06-02 10:33     ` Alexander Graf
2008-06-02 14:58       ` Alex Williamson
2008-06-02 15:42         ` Alexander Graf
2008-06-02 22:12           ` [Qemu-devel] [PATCH] ide: fix ATAPI read drive structure command (v3) Alex Williamson
2008-06-02 22:45             ` Alex Williamson
2008-06-03 13:48               ` Alexander Graf
2008-06-03 14:21                 ` Alex Williamson [this message]
2008-06-03 18:01                   ` Carlo Marcelo Arenas Belon
2008-06-03 16:59               ` Anthony Liguori
2008-06-04 12:30                 ` Alex Williamson
2008-06-04 14:35                   ` Anthony Liguori
2008-06-04 14:49                     ` Alex Williamson

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=1212502910.10496.7.camel@bling \
    --to=alex.williamson@hp.com \
    --cc=agraf@suse.de \
    --cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.