public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Yi Zou <yi.zou@intel.com>
To: linux-scsi@vger.kernel.org
Cc: robert.w.love@intel.com, Michael Chan <mchan@broadcom.com>,
	Yi Zou <yi.zou@intel.com>
Subject: [PATCH 1/4] drivers/firmware/edd: Treat "XPRS" host bus type the same as "PCI"
Date: Fri, 28 Oct 2011 11:34:07 -0700	[thread overview]
Message-ID: <20111028183407.15165.37840.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20111028183305.15165.96974.stgit@localhost6.localdomain6>

From: Michael Chan <mchan@broadcom.com>

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>
---

 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.


  reply	other threads:[~2011-10-28 18:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-28 18:34 [PATCH 0/4] Open-FCoE.org libfc and fcoe updates for scsi-misc Yi Zou
2011-10-28 18:34 ` Yi Zou [this message]
2011-10-28 18:34 ` [PATCH 2/4] libfc: fix checking FC_TYPE_BLS Yi Zou
2011-10-28 18:34 ` [PATCH 3/4] libfc: avoid exchanges collision during lport reset Yi Zou
2011-10-28 18:34 ` [PATCH 4/4] libfc: improve flogi retries to avoid lport stuck Yi Zou

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=20111028183407.15165.37840.stgit@localhost6.localdomain6 \
    --to=yi.zou@intel.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mchan@broadcom.com \
    --cc=robert.w.love@intel.com \
    /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