All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/firmware/edd: Treat "XPRS" host bus type the same as "PCI"
@ 2011-09-27 22:32 Michael Chan
  2011-09-28  4:34 ` [Open-FCoE] " Zou, Yi
       [not found] ` <20110928162815.GA14031@emperor.us.dell.com>
  0 siblings, 2 replies; 5+ messages in thread
From: Michael Chan @ 2011-09-27 22:32 UTC (permalink / raw)
  To: Matt_Domsch, linux-kernel; +Cc: devel, 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_dev symlink will be created.  Scripts such as fcoe-edd.sh will
then work correctly.

Cc: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
---
 drivers/firmware/edd.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/firmware/edd.c b/drivers/firmware/edd.c
index f1b7f65..e229576 100644
--- a/drivers/firmware/edd.c
+++ b/drivers/firmware/edd.c
@@ -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.
-- 
1.7.1.GIT



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* RE: [Open-FCoE] [PATCH] drivers/firmware/edd: Treat "XPRS" host bus type the same as "PCI"
  2011-09-27 22:32 [PATCH] drivers/firmware/edd: Treat "XPRS" host bus type the same as "PCI" Michael Chan
@ 2011-09-28  4:34 ` Zou, Yi
       [not found] ` <20110928162815.GA14031@emperor.us.dell.com>
  1 sibling, 0 replies; 5+ messages in thread
From: Zou, Yi @ 2011-09-28  4:34 UTC (permalink / raw)
  To: Michael Chan, Matt_Domsch@dell.com, linux-kernel@vger.kernel.org
  Cc: devel@open-fcoe.org

> 
> 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.
> 
> Cc: Matt Domsch <Matt_Domsch@dell.com>
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Patch looks good to me. Just a minor note, not to be picky, the script
you mentioned is actually called 'fcoe_edd.sh', not '-'.

Reviewed-by: Yi Zou <yi.zou@intel.com>


> ---
>  drivers/firmware/edd.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/firmware/edd.c b/drivers/firmware/edd.c
> index f1b7f65..e229576 100644
> --- a/drivers/firmware/edd.c
> +++ b/drivers/firmware/edd.c
> @@ -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.
> --
> 1.7.1.GIT
> 
> 
> _______________________________________________
> devel mailing list
> devel@open-fcoe.org
> https://lists.open-fcoe.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drivers/firmware/edd: Treat "XPRS" host bus type the same as "PCI"
       [not found] ` <20110928162815.GA14031@emperor.us.dell.com>
@ 2011-09-28 17:51   ` Michael Chan
  2011-09-28 18:56     ` Zou, Yi
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Chan @ 2011-09-28 17:51 UTC (permalink / raw)
  To: Matt Domsch, yi.zou; +Cc: linux-kernel@vger.kernel.org, devel@open-fcoe.org


On Wed, 2011-09-28 at 09:28 -0700, Matt Domsch wrote:
> On Tue, Sep 27, 2011 at 05:32:08PM -0500, Michael Chan wrote:
> > 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.
> > 
> > Cc: Matt Domsch <Matt_Domsch@dell.com>
> > Signed-off-by: Michael Chan <mchan@broadcom.com>
> 
> 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 <Matt_Domsch@dell.com>
> 

Yi, could you submit this patch through the open-fcoe tree?  Thanks.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] drivers/firmware/edd: Treat "XPRS" host bus type the same as "PCI"
  2011-09-28 17:51   ` Michael Chan
@ 2011-09-28 18:56     ` Zou, Yi
       [not found]       ` <20110928190028.GA15935@emperor.us.dell.com>
  0 siblings, 1 reply; 5+ messages in thread
From: Zou, Yi @ 2011-09-28 18:56 UTC (permalink / raw)
  To: Michael Chan, Matt Domsch
  Cc: linux-kernel@vger.kernel.org, devel@open-fcoe.org

> 
> 
> On Wed, 2011-09-28 at 09:28 -0700, Matt Domsch wrote:
> > On Tue, Sep 27, 2011 at 05:32:08PM -0500, Michael Chan wrote:
> > > 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.
> > >
> > > Cc: Matt Domsch <Matt_Domsch@dell.com>
> > > Signed-off-by: Michael Chan <mchan@broadcom.com>
> >
> > 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 <Matt_Domsch@dell.com>
> >
> 
> 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 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] drivers/firmware/edd: Treat "XPRS" host bus type the same as "PCI"
       [not found]       ` <20110928190028.GA15935@emperor.us.dell.com>
@ 2011-09-28 19:07         ` Zou, Yi
  0 siblings, 0 replies; 5+ messages in thread
From: Zou, Yi @ 2011-09-28 19:07 UTC (permalink / raw)
  To: Matt Domsch
  Cc: Michael Chan, linux-kernel@vger.kernel.org, devel@open-fcoe.org

> 
> On Wed, Sep 28, 2011 at 01:56:42PM -0500, Zou, Yi wrote:
> > > On Wed, 2011-09-28 at 09:28 -0700, Matt Domsch wrote:
> > > > On Tue, Sep 27, 2011 at 05:32:08PM -0500, Michael Chan wrote:
> > > > > 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.
> > > > >
> > > > > Cc: Matt Domsch <Matt_Domsch@dell.com>
> > > > > Signed-off-by: Michael Chan <mchan@broadcom.com>
> > > >
> > > > 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 <Matt_Domsch@dell.com>
> > > >
> > >
> > > 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.
> 
> 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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-09-28 19:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-27 22:32 [PATCH] drivers/firmware/edd: Treat "XPRS" host bus type the same as "PCI" Michael Chan
2011-09-28  4:34 ` [Open-FCoE] " Zou, Yi
     [not found] ` <20110928162815.GA14031@emperor.us.dell.com>
2011-09-28 17:51   ` Michael Chan
2011-09-28 18:56     ` Zou, Yi
     [not found]       ` <20110928190028.GA15935@emperor.us.dell.com>
2011-09-28 19:07         ` Zou, Yi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.