Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[SCSI] edd: Treat "XPRS" host bus type the same as "PCI"

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>

authored by

Michael Chan and committed by
James Bottomley
044aceef 7000f7c7

+3 -3
+3 -3
drivers/firmware/edd.c
··· 151 151 p += scnprintf(p, left, "\tbase_address: %x\n", 152 152 info->params.interface_path.isa.base_address); 153 153 } else if (!strncmp(info->params.host_bus_type, "PCIX", 4) || 154 - !strncmp(info->params.host_bus_type, "PCI", 3)) { 154 + !strncmp(info->params.host_bus_type, "PCI", 3) || 155 + !strncmp(info->params.host_bus_type, "XPRS", 4)) { 155 156 p += scnprintf(p, left, 156 157 "\t%02x:%02x.%d channel: %u\n", 157 158 info->params.interface_path.pci.bus, ··· 160 159 info->params.interface_path.pci.function, 161 160 info->params.interface_path.pci.channel); 162 161 } else if (!strncmp(info->params.host_bus_type, "IBND", 4) || 163 - !strncmp(info->params.host_bus_type, "XPRS", 4) || 164 162 !strncmp(info->params.host_bus_type, "HTPT", 4)) { 165 163 p += scnprintf(p, left, 166 164 "\tTBD: %llx\n", ··· 668 668 { 669 669 struct edd_info *info = edd_dev_get_info(edev); 670 670 671 - if (edd_dev_is_type(edev, "PCI")) { 671 + if (edd_dev_is_type(edev, "PCI") || edd_dev_is_type(edev, "XPRS")) { 672 672 return pci_get_bus_and_slot(info->params.interface_path.pci.bus, 673 673 PCI_DEVFN(info->params.interface_path.pci.slot, 674 674 info->params.interface_path.pci.