SCSI fixes on 20200908
Eleven fixes, mostly in drivers or minor fixes in driver related infrastructure libraries (target, libfc and libsas). Most of the bugs fixed only show up under rare circumstances, the exception being the endianness problem in qla2xxx which is used as a device on some sparc systems. Signed-off-by: James E.J. Bottomley <jejb@linux.ibm.com> -----BEGIN PGP SIGNATURE----- iJwEABMIAEQWIQTnYEDbdso9F2cI+arnQslM7pishQUCX1egVyYcamFtZXMuYm90 dG9tbGV5QGhhbnNlbnBhcnRuZXJzaGlwLmNvbQAKCRDnQslM7pishShgAP9McHKn 9T/m2mAjBr8IMZRlD4Y6nC+ToxDdRDsYT6iAOQD/ZO1FajxEcGC4xEtWznvXtqGk H1Lfr/ta19GSEPqaZ44= =rDo9 -----END PGP SIGNATURE----- Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Eleven fixes, mostly in drivers or minor fixes in driver related infrastructure libraries (target, libfc and libsas). Most of the bugs fixed only show up under rare circumstances, the exception being the endianness problem in qla2xxx which is used as a device on some sparc systems" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: mpt3sas: Don't call disable_irq from IRQ poll handler scsi: megaraid_sas: Don't call disable_irq from process IRQ poll scsi: target: iscsi: Fix hang in iscsit_access_np() when getting tpg->np_login_sem scsi: libsas: Set data_dir as DMA_NONE if libata marks qc as NODATA scsi: target: iscsi: Fix data digest calculation scsi: lpfc: Update lpfc version to 12.8.0.4 scsi: lpfc: Extend the RDF FPIN Registration descriptor for additional events scsi: lpfc: Fix FLOGI/PLOGI receive race condition in pt2pt discovery scsi: lpfc: Fix setting IRQ affinity with an empty CPU mask scsi: qla2xxx: Fix regression on sparc64 scsi: libfc: Fix for double free() scsi: pm8001: Fix memleak in pm8001_exec_internal_task_abort
This commit is contained in:
Коммит
d6dc7e0682
|
@ -634,8 +634,6 @@ free_fp:
|
|||
fc_frame_free(fp);
|
||||
out:
|
||||
kref_put(&rdata->kref, fc_rport_destroy);
|
||||
if (!IS_ERR(fp))
|
||||
fc_frame_free(fp);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -209,7 +209,10 @@ static unsigned int sas_ata_qc_issue(struct ata_queued_cmd *qc)
|
|||
task->num_scatter = si;
|
||||
}
|
||||
|
||||
task->data_dir = qc->dma_dir;
|
||||
if (qc->tf.protocol == ATA_PROT_NODATA)
|
||||
task->data_dir = DMA_NONE;
|
||||
else
|
||||
task->data_dir = qc->dma_dir;
|
||||
task->scatter = qc->sg;
|
||||
task->ata_task.retry_count = 1;
|
||||
task->task_state_flags = SAS_TASK_STATE_PENDING;
|
||||
|
|
|
@ -3517,6 +3517,9 @@ lpfc_issue_els_rdf(struct lpfc_vport *vport, uint8_t retry)
|
|||
FC_TLV_DESC_LENGTH_FROM_SZ(prdf->reg_d1));
|
||||
prdf->reg_d1.reg_desc.count = cpu_to_be32(ELS_RDF_REG_TAG_CNT);
|
||||
prdf->reg_d1.desc_tags[0] = cpu_to_be32(ELS_DTAG_LNK_INTEGRITY);
|
||||
prdf->reg_d1.desc_tags[1] = cpu_to_be32(ELS_DTAG_DELIVERY);
|
||||
prdf->reg_d1.desc_tags[2] = cpu_to_be32(ELS_DTAG_PEER_CONGEST);
|
||||
prdf->reg_d1.desc_tags[3] = cpu_to_be32(ELS_DTAG_CONGESTION);
|
||||
|
||||
lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_CMD,
|
||||
"Issue RDF: did:x%x",
|
||||
|
@ -4656,7 +4659,9 @@ lpfc_cmpl_els_rsp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
|
|||
out:
|
||||
if (ndlp && NLP_CHK_NODE_ACT(ndlp) && shost) {
|
||||
spin_lock_irq(shost->host_lock);
|
||||
ndlp->nlp_flag &= ~(NLP_ACC_REGLOGIN | NLP_RM_DFLT_RPI);
|
||||
if (mbox)
|
||||
ndlp->nlp_flag &= ~NLP_ACC_REGLOGIN;
|
||||
ndlp->nlp_flag &= ~NLP_RM_DFLT_RPI;
|
||||
spin_unlock_irq(shost->host_lock);
|
||||
|
||||
/* If the node is not being used by another discovery thread,
|
||||
|
|
|
@ -4800,7 +4800,7 @@ struct send_frame_wqe {
|
|||
uint32_t fc_hdr_wd5; /* word 15 */
|
||||
};
|
||||
|
||||
#define ELS_RDF_REG_TAG_CNT 1
|
||||
#define ELS_RDF_REG_TAG_CNT 4
|
||||
struct lpfc_els_rdf_reg_desc {
|
||||
struct fc_df_desc_fpin_reg reg_desc; /* descriptor header */
|
||||
__be32 desc_tags[ELS_RDF_REG_TAG_CNT];
|
||||
|
|
|
@ -11376,7 +11376,6 @@ lpfc_irq_clear_aff(struct lpfc_hba_eq_hdl *eqhdl)
|
|||
{
|
||||
cpumask_clear(&eqhdl->aff_mask);
|
||||
irq_clear_status_flags(eqhdl->irq, IRQ_NO_BALANCING);
|
||||
irq_set_affinity_hint(eqhdl->irq, &eqhdl->aff_mask);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* included with this package. *
|
||||
*******************************************************************/
|
||||
|
||||
#define LPFC_DRIVER_VERSION "12.8.0.3"
|
||||
#define LPFC_DRIVER_VERSION "12.8.0.4"
|
||||
#define LPFC_DRIVER_NAME "lpfc"
|
||||
|
||||
/* Used for SLI 2/3 */
|
||||
|
|
|
@ -3689,7 +3689,7 @@ int megasas_irqpoll(struct irq_poll *irqpoll, int budget)
|
|||
instance = irq_ctx->instance;
|
||||
|
||||
if (irq_ctx->irq_line_enable) {
|
||||
disable_irq(irq_ctx->os_irq);
|
||||
disable_irq_nosync(irq_ctx->os_irq);
|
||||
irq_ctx->irq_line_enable = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1733,7 +1733,7 @@ _base_irqpoll(struct irq_poll *irqpoll, int budget)
|
|||
reply_q = container_of(irqpoll, struct adapter_reply_queue,
|
||||
irqpoll);
|
||||
if (reply_q->irq_line_enable) {
|
||||
disable_irq(reply_q->os_irq);
|
||||
disable_irq_nosync(reply_q->os_irq);
|
||||
reply_q->irq_line_enable = false;
|
||||
}
|
||||
num_entries = _base_process_reply_queue(reply_q);
|
||||
|
|
|
@ -818,7 +818,7 @@ pm8001_exec_internal_task_abort(struct pm8001_hba_info *pm8001_ha,
|
|||
|
||||
res = pm8001_tag_alloc(pm8001_ha, &ccb_tag);
|
||||
if (res)
|
||||
return res;
|
||||
goto ex_err;
|
||||
ccb = &pm8001_ha->ccb_info[ccb_tag];
|
||||
ccb->device = pm8001_dev;
|
||||
ccb->ccb_tag = ccb_tag;
|
||||
|
|
|
@ -1626,7 +1626,7 @@ typedef struct {
|
|||
*/
|
||||
uint8_t firmware_options[2];
|
||||
|
||||
uint16_t frame_payload_size;
|
||||
__le16 frame_payload_size;
|
||||
__le16 max_iocb_allocation;
|
||||
__le16 execution_throttle;
|
||||
uint8_t retry_count;
|
||||
|
|
|
@ -4603,18 +4603,18 @@ qla2x00_nvram_config(scsi_qla_host_t *vha)
|
|||
nv->firmware_options[1] = BIT_7 | BIT_5;
|
||||
nv->add_firmware_options[0] = BIT_5;
|
||||
nv->add_firmware_options[1] = BIT_5 | BIT_4;
|
||||
nv->frame_payload_size = 2048;
|
||||
nv->frame_payload_size = cpu_to_le16(2048);
|
||||
nv->special_options[1] = BIT_7;
|
||||
} else if (IS_QLA2200(ha)) {
|
||||
nv->firmware_options[0] = BIT_2 | BIT_1;
|
||||
nv->firmware_options[1] = BIT_7 | BIT_5;
|
||||
nv->add_firmware_options[0] = BIT_5;
|
||||
nv->add_firmware_options[1] = BIT_5 | BIT_4;
|
||||
nv->frame_payload_size = 1024;
|
||||
nv->frame_payload_size = cpu_to_le16(1024);
|
||||
} else if (IS_QLA2100(ha)) {
|
||||
nv->firmware_options[0] = BIT_3 | BIT_1;
|
||||
nv->firmware_options[1] = BIT_5;
|
||||
nv->frame_payload_size = 1024;
|
||||
nv->frame_payload_size = cpu_to_le16(1024);
|
||||
}
|
||||
|
||||
nv->max_iocb_allocation = cpu_to_le16(256);
|
||||
|
|
|
@ -1389,14 +1389,27 @@ static u32 iscsit_do_crypto_hash_sg(
|
|||
sg = cmd->first_data_sg;
|
||||
page_off = cmd->first_data_sg_off;
|
||||
|
||||
if (data_length && page_off) {
|
||||
struct scatterlist first_sg;
|
||||
u32 len = min_t(u32, data_length, sg->length - page_off);
|
||||
|
||||
sg_init_table(&first_sg, 1);
|
||||
sg_set_page(&first_sg, sg_page(sg), len, sg->offset + page_off);
|
||||
|
||||
ahash_request_set_crypt(hash, &first_sg, NULL, len);
|
||||
crypto_ahash_update(hash);
|
||||
|
||||
data_length -= len;
|
||||
sg = sg_next(sg);
|
||||
}
|
||||
|
||||
while (data_length) {
|
||||
u32 cur_len = min_t(u32, data_length, (sg->length - page_off));
|
||||
u32 cur_len = min_t(u32, data_length, sg->length);
|
||||
|
||||
ahash_request_set_crypt(hash, sg, NULL, cur_len);
|
||||
crypto_ahash_update(hash);
|
||||
|
||||
data_length -= cur_len;
|
||||
page_off = 0;
|
||||
/* iscsit_map_iovec has already checked for invalid sg pointers */
|
||||
sg = sg_next(sg);
|
||||
}
|
||||
|
|
|
@ -1149,7 +1149,7 @@ void iscsit_free_conn(struct iscsi_conn *conn)
|
|||
}
|
||||
|
||||
void iscsi_target_login_sess_out(struct iscsi_conn *conn,
|
||||
struct iscsi_np *np, bool zero_tsih, bool new_sess)
|
||||
bool zero_tsih, bool new_sess)
|
||||
{
|
||||
if (!new_sess)
|
||||
goto old_sess_out;
|
||||
|
@ -1167,7 +1167,6 @@ void iscsi_target_login_sess_out(struct iscsi_conn *conn,
|
|||
conn->sess = NULL;
|
||||
|
||||
old_sess_out:
|
||||
iscsi_stop_login_thread_timer(np);
|
||||
/*
|
||||
* If login negotiation fails check if the Time2Retain timer
|
||||
* needs to be restarted.
|
||||
|
@ -1407,8 +1406,9 @@ static int __iscsi_target_login_thread(struct iscsi_np *np)
|
|||
new_sess_out:
|
||||
new_sess = true;
|
||||
old_sess_out:
|
||||
iscsi_stop_login_thread_timer(np);
|
||||
tpg_np = conn->tpg_np;
|
||||
iscsi_target_login_sess_out(conn, np, zero_tsih, new_sess);
|
||||
iscsi_target_login_sess_out(conn, zero_tsih, new_sess);
|
||||
new_sess = false;
|
||||
|
||||
if (tpg) {
|
||||
|
|
|
@ -22,8 +22,7 @@ extern int iscsit_put_login_tx(struct iscsi_conn *, struct iscsi_login *, u32);
|
|||
extern void iscsit_free_conn(struct iscsi_conn *);
|
||||
extern int iscsit_start_kthreads(struct iscsi_conn *);
|
||||
extern void iscsi_post_login_handler(struct iscsi_np *, struct iscsi_conn *, u8);
|
||||
extern void iscsi_target_login_sess_out(struct iscsi_conn *, struct iscsi_np *,
|
||||
bool, bool);
|
||||
extern void iscsi_target_login_sess_out(struct iscsi_conn *, bool, bool);
|
||||
extern int iscsi_target_login_thread(void *);
|
||||
extern void iscsi_handle_login_thread_timeout(struct timer_list *t);
|
||||
|
||||
|
|
|
@ -535,12 +535,11 @@ static bool iscsi_target_sk_check_and_clear(struct iscsi_conn *conn, unsigned in
|
|||
|
||||
static void iscsi_target_login_drop(struct iscsi_conn *conn, struct iscsi_login *login)
|
||||
{
|
||||
struct iscsi_np *np = login->np;
|
||||
bool zero_tsih = login->zero_tsih;
|
||||
|
||||
iscsi_remove_failed_auth_entry(conn);
|
||||
iscsi_target_nego_release(conn);
|
||||
iscsi_target_login_sess_out(conn, np, zero_tsih, true);
|
||||
iscsi_target_login_sess_out(conn, zero_tsih, true);
|
||||
}
|
||||
|
||||
struct conn_timeout {
|
||||
|
|
Загрузка…
Ссылка в новой задаче