diff options
author | Jamie Wellnitz <Jamie.Wellnitz@emulex.com> | 2006-03-01 04:33:05 +0100 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-03-06 16:46:10 +0100 |
commit | 719396b48ce6310ab43d7432b6d7f2a330a831b3 (patch) | |
tree | 0cbd685cea4896cc3b703268fbcabe0dd8fc1014 /drivers/scsi/lpfc | |
parent | [PATCH] lpfc 8.1.3: Derive supported speeds from LMT field in the READ_CONFIG (diff) | |
download | linux-719396b48ce6310ab43d7432b6d7f2a330a831b3.tar.xz linux-719396b48ce6310ab43d7432b6d7f2a330a831b3.zip |
[PATCH] lpfc 8.1.3: PCI hrd_type should be obtained with pci_read_config_byte() macro
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: Jamie Wellnitz <Jamie.Wellnitz@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 5fd98a345347..71d2c8d3b001 100644 --- 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 * phba, uint8_t * mdp, uint8_t * descp) 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 * phba, uint8_t * mdp, uint8_t * descp) 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; |