mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 18:51:27 +00:00
Merge branch 'svn-trunk'
This commit is contained in:
@@ -3451,28 +3451,6 @@ static const struct qla_init_msix_entry qla82xx_msix_entries[] = {
|
||||
{ "qla2xxx (rsp_q)", qla82xx_msix_rsp_q },
|
||||
};
|
||||
|
||||
#if !HAVE_PCI_IRQ_VECTOR
|
||||
static void
|
||||
qla24xx_disable_msix(struct qla_hw_data *ha)
|
||||
{
|
||||
int i;
|
||||
struct qla_msix_entry *qentry;
|
||||
scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev);
|
||||
|
||||
for (i = 0; i < ha->msix_count; i++) {
|
||||
qentry = &ha->msix_entries[i];
|
||||
if (qentry->have_irq)
|
||||
free_irq(qentry->vector, qentry->handle);
|
||||
}
|
||||
pci_disable_msix(ha->pdev);
|
||||
kfree(ha->msix_entries);
|
||||
ha->msix_entries = NULL;
|
||||
ha->flags.msix_enabled = 0;
|
||||
ql_dbg(ql_dbg_init, vha, 0x0042,
|
||||
"Disabled the MSI.\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
static int
|
||||
qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp)
|
||||
{
|
||||
@@ -3594,7 +3572,7 @@ msix_failed:
|
||||
ql_log(ql_log_fatal, vha, 0x00c8,
|
||||
"Failed to allocate memory for ha->msix_entries.\n");
|
||||
ret = -ENOMEM;
|
||||
goto msix_out;
|
||||
goto free_irqs;
|
||||
}
|
||||
ha->flags.msix_enabled = 1;
|
||||
|
||||
@@ -3688,6 +3666,14 @@ msix_out:
|
||||
kfree(entries);
|
||||
#endif
|
||||
return ret;
|
||||
|
||||
free_irqs:
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0)
|
||||
pci_disable_msix(ha->pdev);
|
||||
#else
|
||||
pci_free_irq_vectors(ha->pdev);
|
||||
#endif
|
||||
goto msix_out;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -3800,7 +3786,6 @@ qla2x00_free_irqs(scsi_qla_host_t *vha)
|
||||
goto free_irqs;
|
||||
rsp = ha->rsp_q_map[0];
|
||||
|
||||
#if HAVE_PCI_IRQ_VECTOR
|
||||
if (ha->flags.msix_enabled) {
|
||||
struct qla_msix_entry *qentry;
|
||||
int i;
|
||||
@@ -3809,7 +3794,12 @@ qla2x00_free_irqs(scsi_qla_host_t *vha)
|
||||
qentry = &ha->msix_entries[i];
|
||||
if (qentry->have_irq) {
|
||||
irq_set_affinity_notifier(qentry->vector, NULL);
|
||||
free_irq(pci_irq_vector(ha->pdev, i), qentry->handle);
|
||||
#if HAVE_PCI_IRQ_VECTOR
|
||||
free_irq(pci_irq_vector(ha->pdev, i),
|
||||
qentry->handle);
|
||||
#else
|
||||
free_irq(qentry->vector, qentry->handle);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
kfree(ha->msix_entries);
|
||||
@@ -3817,22 +3807,21 @@ qla2x00_free_irqs(scsi_qla_host_t *vha)
|
||||
ha->flags.msix_enabled = 0;
|
||||
ql_dbg(ql_dbg_init, vha, 0x0042,
|
||||
"Disabled MSI-X.\n");
|
||||
#if HAVE_PCI_IRQ_VECTOR
|
||||
} else {
|
||||
free_irq(pci_irq_vector(ha->pdev, 0), rsp);
|
||||
}
|
||||
#else
|
||||
if (ha->flags.msix_enabled)
|
||||
qla24xx_disable_msix(ha);
|
||||
else if (ha->flags.msi_enabled) {
|
||||
} else if (ha->flags.msi_enabled) {
|
||||
free_irq(ha->pdev->irq, rsp);
|
||||
pci_disable_msi(ha->pdev);
|
||||
} else
|
||||
} else {
|
||||
free_irq(ha->pdev->irq, rsp);
|
||||
#endif
|
||||
}
|
||||
|
||||
free_irqs:
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0)
|
||||
;
|
||||
pci_disable_msix(ha->pdev);
|
||||
#else
|
||||
pci_free_irq_vectors(ha->pdev);
|
||||
#endif
|
||||
|
||||
@@ -5881,7 +5881,11 @@ sub cacheAttributes {
|
||||
}
|
||||
} else {
|
||||
my $value = $$attributes{$attribute}->{'value'};
|
||||
$cache{$attribute}->{$value} = FALSE;
|
||||
# Write-only attributes (e.g. abort_isp) do not have
|
||||
# a value.
|
||||
if (defined($value)) {
|
||||
$cache{$attribute}->{$value} = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user