mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Michael Chan" <mchan@broadcom.com>
To: Matt_Domsch@dell.com, linux-kernel@vger.kernel.org
Cc: devel@open-fcoe.org, "Michael Chan" <mchan@broadcom.com>
Subject: [PATCH] drivers/firmware/edd: Treat "XPRS" host bus type the same as "PCI"
Date: Tue, 27 Sep 2011 15:32:08 -0700	[thread overview]
Message-ID: <1317162728-14488-1-git-send-email-mchan@broadcom.com> (raw)

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



             reply	other threads:[~2011-09-27 23:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-27 22:32 Michael Chan [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1317162728-14488-1-git-send-email-mchan@broadcom.com \
    --to=mchan@broadcom.com \
    --cc=Matt_Domsch@dell.com \
    --cc=devel@open-fcoe.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®