[SeaBIOS] [PATCH] Support USB MSC devices with multiples LUNs
Paolo Bonzini
pbonzini at redhat.com
Tue Jun 12 18:21:39 CEST 2012
Il 12/06/2012 03:32, Kevin O'Connor ha scritto:
> -int bootprio_find_usb(struct usbdevice_s *usbdev)
> +int bootprio_find_usb(struct usbdevice_s *usbdev, int lun)
> {
> if (!CONFIG_BOOTORDER)
> return -1;
> - // Find usb - for example: /pci at i0cf8/usb at 1,2/hub at 1/network at 0/ethernet at 0
> + // Find usb - for example: /pci at i0cf8/usb at 1,2/storage at 1/channel at 0/disk at 0,0
> char desc[256], *p;
> p = build_pci_path(desc, sizeof(desc), "usb", usbdev->hub->cntl->pci);
> p = build_usb_path(p, desc+sizeof(desc)-p, usbdev->hub);
> - snprintf(p, desc+sizeof(desc)-p, "/*@%x", usbdev->port+1);
> + snprintf(p, desc+sizeof(desc)-p, "/*@%x/*@0/*@0,%d", usbdev->port+1, lun);
> return find_prio(desc);
This will not work if you're redirecting a USB device from the host,
because then you will not have the SCSI-specific elements of the path.
I suggest that you fall back to "/*@%x" if find_prio returns failure and
lun=0.
Paolo
More information about the SeaBIOS
mailing list