qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/2] Add bootindex handling into usb storage dev


From: Gleb Natapov
Subject: Re: [Qemu-devel] [PATCH 1/2] Add bootindex handling into usb storage device.
Date: Fri, 28 Jan 2011 17:48:44 +0200

On Fri, Jan 28, 2011 at 02:34:19PM +0100, Markus Armbruster wrote:
> Gleb Natapov <address@hidden> writes:
> 
> > Signed-off-by: Gleb Natapov <address@hidden>
> > ---
> >  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, 
> > "/address@hidden,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         /address@hidden
>     scsi-disk       disk        ,0
>     ide-drive       drive       /address@hidden
>     usb-storage     storage     /address@hidden,0
>     virtio-blk-pci  virtio-blk  /address@hidden,0
virtio-blk-pci will be seen as scsi since it uses scsi pci class for pci
device.

--
                        Gleb.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]