[SCSI] qla2xxx: Correct pci_set_msi() usage semantics.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
committed by
James Bottomley
parent
75edf81d33
commit
a157b1014f
@@ -130,18 +130,17 @@ qla2x00_initialize_adapter(scsi_qla_host_t *ha)
|
|||||||
int
|
int
|
||||||
qla2100_pci_config(scsi_qla_host_t *ha)
|
qla2100_pci_config(scsi_qla_host_t *ha)
|
||||||
{
|
{
|
||||||
uint16_t w, mwi;
|
int ret;
|
||||||
|
uint16_t w;
|
||||||
uint32_t d;
|
uint32_t d;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;
|
struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;
|
||||||
|
|
||||||
pci_set_master(ha->pdev);
|
pci_set_master(ha->pdev);
|
||||||
mwi = 0;
|
ret = pci_set_mwi(ha->pdev);
|
||||||
if (pci_set_mwi(ha->pdev))
|
|
||||||
mwi = PCI_COMMAND_INVALIDATE;
|
|
||||||
|
|
||||||
pci_read_config_word(ha->pdev, PCI_COMMAND, &w);
|
pci_read_config_word(ha->pdev, PCI_COMMAND, &w);
|
||||||
w |= mwi | (PCI_COMMAND_PARITY | PCI_COMMAND_SERR);
|
w |= (PCI_COMMAND_PARITY | PCI_COMMAND_SERR);
|
||||||
pci_write_config_word(ha->pdev, PCI_COMMAND, w);
|
pci_write_config_word(ha->pdev, PCI_COMMAND, w);
|
||||||
|
|
||||||
/* Reset expansion ROM address decode enable */
|
/* Reset expansion ROM address decode enable */
|
||||||
@@ -166,22 +165,22 @@ qla2100_pci_config(scsi_qla_host_t *ha)
|
|||||||
int
|
int
|
||||||
qla2300_pci_config(scsi_qla_host_t *ha)
|
qla2300_pci_config(scsi_qla_host_t *ha)
|
||||||
{
|
{
|
||||||
uint16_t w, mwi;
|
int ret;
|
||||||
|
uint16_t w;
|
||||||
uint32_t d;
|
uint32_t d;
|
||||||
unsigned long flags = 0;
|
unsigned long flags = 0;
|
||||||
uint32_t cnt;
|
uint32_t cnt;
|
||||||
struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;
|
struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;
|
||||||
|
|
||||||
pci_set_master(ha->pdev);
|
pci_set_master(ha->pdev);
|
||||||
mwi = 0;
|
ret = pci_set_mwi(ha->pdev);
|
||||||
if (pci_set_mwi(ha->pdev))
|
|
||||||
mwi = PCI_COMMAND_INVALIDATE;
|
|
||||||
|
|
||||||
pci_read_config_word(ha->pdev, PCI_COMMAND, &w);
|
pci_read_config_word(ha->pdev, PCI_COMMAND, &w);
|
||||||
w |= mwi | (PCI_COMMAND_PARITY | PCI_COMMAND_SERR);
|
w |= (PCI_COMMAND_PARITY | PCI_COMMAND_SERR);
|
||||||
|
|
||||||
if (IS_QLA2322(ha) || IS_QLA6322(ha))
|
if (IS_QLA2322(ha) || IS_QLA6322(ha))
|
||||||
w &= ~PCI_COMMAND_INTX_DISABLE;
|
w &= ~PCI_COMMAND_INTX_DISABLE;
|
||||||
|
pci_write_config_word(ha->pdev, PCI_COMMAND, w);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If this is a 2300 card and not 2312, reset the
|
* If this is a 2300 card and not 2312, reset the
|
||||||
@@ -210,7 +209,7 @@ qla2300_pci_config(scsi_qla_host_t *ha)
|
|||||||
ha->fb_rev = RD_FB_CMD_REG(ha, reg);
|
ha->fb_rev = RD_FB_CMD_REG(ha, reg);
|
||||||
|
|
||||||
if (ha->fb_rev == FPM_2300)
|
if (ha->fb_rev == FPM_2300)
|
||||||
w &= ~PCI_COMMAND_INVALIDATE;
|
pci_clear_mwi(ha->pdev);
|
||||||
|
|
||||||
/* Deselect FPM registers. */
|
/* Deselect FPM registers. */
|
||||||
WRT_REG_WORD(®->ctrl_status, 0x0);
|
WRT_REG_WORD(®->ctrl_status, 0x0);
|
||||||
@@ -227,7 +226,6 @@ qla2300_pci_config(scsi_qla_host_t *ha)
|
|||||||
|
|
||||||
spin_unlock_irqrestore(&ha->hardware_lock, flags);
|
spin_unlock_irqrestore(&ha->hardware_lock, flags);
|
||||||
}
|
}
|
||||||
pci_write_config_word(ha->pdev, PCI_COMMAND, w);
|
|
||||||
|
|
||||||
pci_write_config_byte(ha->pdev, PCI_LATENCY_TIMER, 0x80);
|
pci_write_config_byte(ha->pdev, PCI_LATENCY_TIMER, 0x80);
|
||||||
|
|
||||||
@@ -253,19 +251,18 @@ qla2300_pci_config(scsi_qla_host_t *ha)
|
|||||||
int
|
int
|
||||||
qla24xx_pci_config(scsi_qla_host_t *ha)
|
qla24xx_pci_config(scsi_qla_host_t *ha)
|
||||||
{
|
{
|
||||||
uint16_t w, mwi;
|
int ret;
|
||||||
|
uint16_t w;
|
||||||
uint32_t d;
|
uint32_t d;
|
||||||
unsigned long flags = 0;
|
unsigned long flags = 0;
|
||||||
struct device_reg_24xx __iomem *reg = &ha->iobase->isp24;
|
struct device_reg_24xx __iomem *reg = &ha->iobase->isp24;
|
||||||
int pcix_cmd_reg, pcie_dctl_reg;
|
int pcix_cmd_reg, pcie_dctl_reg;
|
||||||
|
|
||||||
pci_set_master(ha->pdev);
|
pci_set_master(ha->pdev);
|
||||||
mwi = 0;
|
ret = pci_set_mwi(ha->pdev);
|
||||||
if (pci_set_mwi(ha->pdev))
|
|
||||||
mwi = PCI_COMMAND_INVALIDATE;
|
|
||||||
|
|
||||||
pci_read_config_word(ha->pdev, PCI_COMMAND, &w);
|
pci_read_config_word(ha->pdev, PCI_COMMAND, &w);
|
||||||
w |= mwi | (PCI_COMMAND_PARITY | PCI_COMMAND_SERR);
|
w |= (PCI_COMMAND_PARITY | PCI_COMMAND_SERR);
|
||||||
w &= ~PCI_COMMAND_INTX_DISABLE;
|
w &= ~PCI_COMMAND_INTX_DISABLE;
|
||||||
pci_write_config_word(ha->pdev, PCI_COMMAND, w);
|
pci_write_config_word(ha->pdev, PCI_COMMAND, w);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user