On Mon, Feb 15, 2016 at 10:11 PM, Eric Snowberg <eric.snowb...@oracle.com> wrote: > Fix the open firmware path property for sun4v SPARC systems. These > platforms do not have a /sas/ within their path. Over time > different OF addressing schemes have been supported. There > is no generic addressing scheme that works across every HBA. > > Signed-off-by: Eric Snowberg <eric.snowb...@oracle.com> > --- > grub-core/osdep/linux/ofpath.c | 192 > +++++++++++++++++++++++++++++++++++++++- > 1 files changed, 190 insertions(+), 2 deletions(-) > > diff --git a/grub-core/osdep/linux/ofpath.c b/grub-core/osdep/linux/ofpath.c > index a79682a..de51c57 100644 > --- a/grub-core/osdep/linux/ofpath.c > +++ b/grub-core/osdep/linux/ofpath.c ... > @@ -444,6 +525,111 @@ of_path_of_scsi(const char *sys_devname > __attribute__((unused)), const char *dev > } > else > { > +#ifdef __sparc__ > + int vendor = 0, device_id = 0; > + check_hba_identifiers(sysfs_path, &vendor, &device_id); > + > + if (vendor == 0x1000) /* LSI Logic Vendor ID */ > + { > + /* Over time different OF addressing schemes have been supported > */ > + /* There is no generic addressing scheme that works across */ > + /* every HBA */ > + switch (device_id) > + { > + case 0x30: /* Rhea, Jasper 320, LSI53C1020/1030 */ > + case 0x50: /* SAS-1068E */ > + case 0x56: /* SAS-1064E */ > + case 0x58: /* Pandora SAS-1068E */ > + case 0x5d: /* Aspen, Invader, LSI SAS-3108 */ > + case 0x79: /* Niwot, SAS 2108 */
That really does not scale. Can we enumerate device aliases and take diskN and cdromN? So that we do not need to duplicate OBP logic? _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel