qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/2] Add bootindex handling into usb storage device.
Date: Fri, 28 Jan 2011 17:48:44 +0200	[thread overview]
Message-ID: <20110128154844.GB2086@redhat.com> (raw)
In-Reply-To: <m3d3nhjgo4.fsf@blackfin.pond.sub.org>

On Fri, Jan 28, 2011 at 02:34:19PM +0100, Markus Armbruster wrote:
> Gleb Natapov <gleb@redhat.com> writes:
> 
> > Signed-off-by: Gleb Natapov <gleb@redhat.com>
> > ---
> >  hw/usb-msd.c |    2 ++
> >  1 files changed, 2 insertions(+), 0 deletions(-)
> >
> > diff --git a/hw/usb-msd.c b/hw/usb-msd.c
> > index 0a95d8d..46642a8 100644
> > --- a/hw/usb-msd.c
> > +++ b/hw/usb-msd.c
> > @@ -560,6 +560,7 @@ static int usb_msd_initfn(USBDevice *dev)
> >          }
> >      }
> >  
> > +    add_boot_device_path(s->conf.bootindex, &dev->qdev, "/disk@0,0");
> >      return 0;
> >  }
> >  
> > @@ -624,6 +625,7 @@ static USBDevice *usb_msd_init(const char *filename)
> >  static struct USBDeviceInfo msd_info = {
> >      .product_desc   = "QEMU USB MSD",
> >      .qdev.name      = "usb-storage",
> > +    .qdev.fw_name      = "storage",
> >      .qdev.size      = sizeof(MSDState),
> >      .init           = usb_msd_initfn,
> >      .handle_packet  = usb_generic_handle_packet,
> 
> Out of curiosity, could you explain the logic behind fw name (as
> returned by qdev_fw_name()) and suffix (as passed to
> add_boot_device_path())?
They are defined by open firmware bus binding specs. You can find most
of them here: http://playground.sun.com/1275/bindings/. FW name is not
terribly important for SeaBIOS though. SeaBIOS ignores this part of
device name when it matches device path.

> 
>     qdev            fw name     suffix
>     ----------------------------------------
>     isa-fdc         fdc         /floppy@0
>     scsi-disk       disk        ,0
>     ide-drive       drive       /disk@0
>     usb-storage     storage     /disk@0,0
>     virtio-blk-pci  virtio-blk  /disk@0,0
virtio-blk-pci will be seen as scsi since it uses scsi pci class for pci
device.

--
			Gleb.

  reply	other threads:[~2011-01-28 15:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-02 15:07 [Qemu-devel] [PATCH 1/2] Add bootindex handling into usb storage device Gleb Natapov
2011-01-02 15:07 ` [Qemu-devel] [PATCH 2/2] Add boot index documentation Gleb Natapov
2011-01-28 13:17   ` Markus Armbruster
2011-01-26 13:01 ` [Qemu-devel] [PATCH 1/2] Add bootindex handling into usb storage device Gleb Natapov
2011-01-28 13:34 ` Markus Armbruster
2011-01-28 15:48   ` Gleb Natapov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-01-02 15:04 Gleb Natapov
2011-01-02 15:07 ` Gleb Natapov

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=20110128154844.GB2086@redhat.com \
    --to=gleb@redhat.com \
    --cc=armbru@redhat.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).