linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Smart <James.Smart@Emulex.Com>
To: linux-scsi <linux-scsi@vger.kernel.org>
Subject: [PATCH 2/9] lpfc 8.1.3 : PCI hrd_type should be obtained with pci_read_config_byte() macro
Date: Wed, 22 Feb 2006 12:33:24 -0500	[thread overview]
Message-ID: <43FCA064.9020402@emulex.com> (raw)


PCI hrd_type should be obtained with pci_read_config_byte() macro

Driver keys off of this field to report the proper adapter type.
The pci subsystem explicitly clears the multiport bit in the copy of
the field given the driver. Thus, to properly name the card, obtain it
from config space.

Signed-off-by: James Smart <James.Smart@emulex.com>

--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -796,9 +796,9 @@ lpfc_get_hba_model_desc(struct lpfc_hba
  	lpfc_vpd_t *vp;
  	uint16_t dev_id = phba->pcidev->device;
  	uint16_t dev_subid = phba->pcidev->subsystem_device;
-	uint8_t hdrtype = phba->pcidev->hdr_type;
+	uint8_t hdrtype;
  	int max_speed;
-	char * ports = (hdrtype == 0x80) ? "2-port " : "";
+	char * ports;
  	struct {
  		char * name;
  		int    max_speed;
@@ -806,6 +806,8 @@ lpfc_get_hba_model_desc(struct lpfc_hba
  		char * bus;
  	} m;

+	pci_read_config_byte(phba->pcidev, PCI_HEADER_TYPE, &hdrtype);
+	ports = (hdrtype == 0x80) ? "2-port " : "";
  	if (mdp && mdp[0] != '\0'
  		&& descp && descp[0] != '\0')
  		return;


             reply	other threads:[~2006-02-22 17:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-22 17:33 James Smart [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-03-01  3:33 [PATCH 2/9] lpfc 8.1.3: PCI hrd_type should be obtained with pci_read_config_byte() macro Jamie Wellnitz

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=43FCA064.9020402@emulex.com \
    --to=james.smart@emulex.com \
    --cc=linux-scsi@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;
as well as URLs for NNTP newsgroup(s).