drivers/firmware/edd: Treat "XPRS" host bus type the same as "PCI"
PATCH 1/1 drivers/firmware/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.
--- drivers/firmware/edd.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/firmware/edd.c +3 -3
@@ -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.
Signature · 1 line
1.7.1.GIT
Quoted 8 lines
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_devsymlink will be created. Scripts such asfcoe-edd.shwill then work correctly.Cc Matt Domsch <[email protected]>Signed-off-by Michael Chan <[email protected]>
Patch looks good to me. Just a minor note, not to be picky, the script you mentioned is actually called 'fcoe_edd.sh', not '-'.
Quoted 46 lines
--- drivers/firmware/edd.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)drivers/firmware/edd.c +3
-3@@ -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-
Quoted 1 line
params.interface_path.pci.slot,
info->params.interface_path.pci.
--
1.7.1.GIT_______________________________________________
devel mailing list
[email protected]
https://lists.open-fcoe.org/mailman/listinfo/devel
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 6 lines · Matt Domsch
Quoted 5 lines · Michael Chan
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_devsymlink will be created. Scripts such asfcoe-edd.shwill then work correctly.
Quoted 8 lines
Quoted 2 lines
Cc Matt Domsch <[email protected]>Signed-off-by Michael Chan <[email protected]>Agreed, this looks correct. Thanks for the patch. Feel free to submit it through whichever maintainer tree is convenient for you.
Reviewed-by Matt Domsch <[email protected]>
Yi, could you submit this patch through the open-fcoe tree? Thanks.
Quoted 12 lines · Matt Domsch
Quoted 9 lines · Michael Chan
Quoted 7 lines
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_devsymlink will be created. Scripts such asfcoe-edd.shwill then work correctly.Cc Matt Domsch <[email protected]>Signed-off-by Michael Chan <[email protected]>
Quoted 8 lines
Quoted 5 lines
Agreed, this looks correct. Thanks for the patch. Feel free to submit it through whichever maintainer tree is convenient for you.
Reviewed-by Matt Domsch <[email protected]>Yi, could you submit this patch through the open-fcoe tree? Thanks.
Sure, I will pull this into open-fcoe.org's tree and queue it up for next push to scsi-misc as long as edd folks are ok with it. Just curious, this is from edd4.0, so might be helpful to point that out in description... I can fix that when I apply the patch to fcoe-next tree.
yi
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 30 lines · Yi
Quoted 3 lines
Quoted 3 lines · Matt Domsch
Quoted 2 lines · Michael Chan
Quoted 1 line
PCI Express devices will return "XPRS" host bus type during BIOS
EDD
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
call. "XPRS" should be treated just like "PCI" so that the
proper
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
pci_devsymlink will be created. Scripts such asfcoe-edd.shwill
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
then work correctly.
Cc Matt Domsch <[email protected]>Signed-off-by Michael Chan <[email protected]>Agreed, this looks correct. Thanks for the patch. Feel free to submit it through whichever maintainer tree is convenient for you.
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines
Reviewed-by Matt Domsch <[email protected]>Yi, could you submit this patch through the open-fcoe tree? Thanks.
Sure, I will pull this into open-fcoe.org's tree and queue it up for
next
Quoted 1 line
push to scsi-misc as long as edd folks are ok with it. Just curious,
this
Quoted 2 lines
is from edd4.0, so might be helpful to point that out in description... I can fix that when I apply the patch to fcoe-next tree.
Quoted 7 lines
It's actually a bug from when I first wrote the code. EDD 3.0 has the "XPRS" bus type defined.
--
Matt Domsch
Technology Strategist
Dell | Office of the CTO
Really, hmm...the one v3.0rev0.8 I have only has PCI/ISA, it's really old as 1998. I only found XPRS in the 4.0 draft. Anyway, I will apply as is then.
yi