]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[SCSI] edd: Treat "XPRS" host bus type the same as "PCI"
authorMichael Chan <mchan@broadcom.com>
Fri, 28 Oct 2011 18:34:07 +0000 (11:34 -0700)
committerJames Bottomley <JBottomley@Parallels.com>
Mon, 31 Oct 2011 09:26:19 +0000 (13:26 +0400)
PCI Express devices will return "XPRS" host bus type during BIOS EDD
call.  "XPRS" should be treated just like "PCI" so that the proper
pci_dev symlink will be created.  Scripts such as fcoe_edd.sh will
then work correctly.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/firmware/edd.c

index f1b7f659d3c988d74d1453533ff75bd078c04ba9..e22957665808799a8d8459acea84c7aebbae396d 100644 (file)
@@ -151,7 +151,8 @@ edd_show_host_bus(struct edd_device *edev, char *buf)
                p += scnprintf(p, left, "\tbase_address: %x\n",
                             info->params.interface_path.isa.base_address);
        } else if (!strncmp(info->params.host_bus_type, "PCIX", 4) ||
-                  !strncmp(info->params.host_bus_type, "PCI", 3)) {
+                  !strncmp(info->params.host_bus_type, "PCI", 3) ||
+                  !strncmp(info->params.host_bus_type, "XPRS", 4)) {
                p += scnprintf(p, left,
                             "\t%02x:%02x.%d  channel: %u\n",
                             info->params.interface_path.pci.bus,
@@ -159,7 +160,6 @@ edd_show_host_bus(struct edd_device *edev, char *buf)
                             info->params.interface_path.pci.function,
                             info->params.interface_path.pci.channel);
        } else if (!strncmp(info->params.host_bus_type, "IBND", 4) ||
-                  !strncmp(info->params.host_bus_type, "XPRS", 4) ||
                   !strncmp(info->params.host_bus_type, "HTPT", 4)) {
                p += scnprintf(p, left,
                             "\tTBD: %llx\n",
@@ -668,7 +668,7 @@ edd_get_pci_dev(struct edd_device *edev)
 {
        struct edd_info *info = edd_dev_get_info(edev);
 
-       if (edd_dev_is_type(edev, "PCI")) {
+       if (edd_dev_is_type(edev, "PCI") || edd_dev_is_type(edev, "XPRS")) {
                return pci_get_bus_and_slot(info->params.interface_path.pci.bus,
                                     PCI_DEVFN(info->params.interface_path.pci.slot,
                                               info->params.interface_path.pci.