Commit 4c147dd8 authored by Krishna Gudipati's avatar Krishna Gudipati Committed by James Bottomley

[SCSI] bfa: Added separate MSI-X module parameters.

Added separate MSI-X module parameters to selectively
enable / disable MSI-X interrupts for both Brocade HBA and CNA's.
Signed-off-by: default avatarKrishna Gudipati <kgudipat@brocade.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent fac829fd
...@@ -229,7 +229,9 @@ bfad_im_get_host_speed(struct Scsi_Host *shost) ...@@ -229,7 +229,9 @@ bfad_im_get_host_speed(struct Scsi_Host *shost)
(struct bfad_im_port_s *) shost->hostdata[0]; (struct bfad_im_port_s *) shost->hostdata[0];
struct bfad_s *bfad = im_port->bfad; struct bfad_s *bfad = im_port->bfad;
struct bfa_pport_attr_s attr; struct bfa_pport_attr_s attr;
unsigned long flags;
spin_lock_irqsave(shost->host_lock, flags);
bfa_pport_get_attr(&bfad->bfa, &attr); bfa_pport_get_attr(&bfad->bfa, &attr);
switch (attr.speed) { switch (attr.speed) {
case BFA_PPORT_SPEED_8GBPS: case BFA_PPORT_SPEED_8GBPS:
...@@ -248,6 +250,7 @@ bfad_im_get_host_speed(struct Scsi_Host *shost) ...@@ -248,6 +250,7 @@ bfad_im_get_host_speed(struct Scsi_Host *shost)
fc_host_speed(shost) = FC_PORTSPEED_UNKNOWN; fc_host_speed(shost) = FC_PORTSPEED_UNKNOWN;
break; break;
} }
spin_unlock_irqrestore(shost->host_lock, flags);
} }
/** /**
......
...@@ -23,8 +23,10 @@ BFA_TRC_FILE(LDRV, INTR); ...@@ -23,8 +23,10 @@ BFA_TRC_FILE(LDRV, INTR);
/** /**
* bfa_isr BFA driver interrupt functions * bfa_isr BFA driver interrupt functions
*/ */
static int msix_disable; static int msix_disable_cb;
module_param(msix_disable, int, S_IRUGO | S_IWUSR); static int msix_disable_ct;
module_param(msix_disable_cb, int, S_IRUGO | S_IWUSR);
module_param(msix_disable_ct, int, S_IRUGO | S_IWUSR);
/** /**
* Line based interrupt handler. * Line based interrupt handler.
*/ */
...@@ -141,6 +143,7 @@ bfad_setup_intr(struct bfad_s *bfad) ...@@ -141,6 +143,7 @@ bfad_setup_intr(struct bfad_s *bfad)
int error = 0; int error = 0;
u32 mask = 0, i, num_bit = 0, max_bit = 0; u32 mask = 0, i, num_bit = 0, max_bit = 0;
struct msix_entry msix_entries[MAX_MSIX_ENTRY]; struct msix_entry msix_entries[MAX_MSIX_ENTRY];
struct pci_dev *pdev = bfad->pcidev;
/* Call BFA to get the msix map for this PCI function. */ /* Call BFA to get the msix map for this PCI function. */
bfa_msix_getvecs(&bfad->bfa, &mask, &num_bit, &max_bit); bfa_msix_getvecs(&bfad->bfa, &mask, &num_bit, &max_bit);
...@@ -148,7 +151,9 @@ bfad_setup_intr(struct bfad_s *bfad) ...@@ -148,7 +151,9 @@ bfad_setup_intr(struct bfad_s *bfad)
/* Set up the msix entry table */ /* Set up the msix entry table */
bfad_init_msix_entry(bfad, msix_entries, mask, max_bit); bfad_init_msix_entry(bfad, msix_entries, mask, max_bit);
if (!msix_disable) { if ((pdev->device == BFA_PCI_DEVICE_ID_CT && !msix_disable_ct) ||
(pdev->device != BFA_PCI_DEVICE_ID_CT && !msix_disable_cb)) {
error = pci_enable_msix(bfad->pcidev, msix_entries, bfad->nvec); error = pci_enable_msix(bfad->pcidev, msix_entries, bfad->nvec);
if (error) { if (error) {
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment