Skip to content

Commit

Permalink
[PATCH] lpfc 8.1.3: PCI hrd_type should be obtained with pci_read_con…
Browse files Browse the repository at this point in the history
…fig_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 <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
  • Loading branch information
Jamie Wellnitz authored and James Bottomley committed Mar 6, 2006
1 parent 74b72a5 commit 719396b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/scsi/lpfc/lpfc_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -796,16 +796,18 @@ 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;
char * ports;
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;
Expand Down

0 comments on commit 719396b

Please sign in to comment.