History

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley: "24 fixes, all in drivers. The lion's share (16) are qla2xxx and the rest are iscsi (3), ufs (2), smarpqi, lpfc and libsas" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (24 commits) scsi: iscsi: Avoid potential deadlock in iscsi_if_rx func scsi: iscsi: Fix a potential deadlock in the timeout handler scsi: smartpqi: Update attribute name to `driver_version` scsi: libsas: stop discovering if oob mode is disconnected scsi: ufs: Disable autohibern8 feature in Cadence UFS scsi: iscsi: qla4xxx: fix double free in probe scsi: ufs: Give an unique ID to each ufs-bsg scsi: qla2xxx: Add debug dump of LOGO payload and ELS IOCB scsi: qla2xxx: Ignore PORT UPDATE after N2N PLOGI scsi: qla2xxx: Don't defer relogin unconditonally scsi: qla2xxx: Send Notify ACK after N2N PLOGI scsi: qla2xxx: Configure local loop for N2N target scsi: qla2xxx: Fix PLOGI payload and ELS IOCB dump length scsi: qla2xxx: Don't call qlt_async_event twice scsi: qla2xxx: Allow PLOGI in target mode scsi: qla2xxx: Change discovery state before PLOGI scsi: qla2xxx: Drop superfluous INIT_WORK of del_work scsi: qla2xxx: Initialize free_work before flushing it scsi: qla2xxx: Use explicit LOGO in target mode scsi: qla2xxx: Ignore NULL pointer in tcm_qla2xxx_free_mcmd ...

Linus Torvalds committed 6 years ago

Commit 07c4b9e2 parents f61cf8d bba340c19 files · +111 −46Browse files

Unified · Split

19 files
  1. Documentation/scsi/smartpqi.txt +1 −1
  2. drivers/scsi/libiscsi.c +2 −2
  3. drivers/scsi/libsas/sas_discover.c +10 −1
  4. drivers/scsi/lpfc/lpfc_bsg.c +9 −6
  5. drivers/scsi/qla2xxx/qla_attr.c +1 −0
  6. drivers/scsi/qla2xxx/qla_bsg.c +1 −1
  7. drivers/scsi/qla2xxx/qla_def.h +1 −0
  8. drivers/scsi/qla2xxx/qla_fw.h +4 −0
  9. drivers/scsi/qla2xxx/qla_init.c +10 −11
  10. drivers/scsi/qla2xxx/qla_iocb.c +25 −6
  11. drivers/scsi/qla2xxx/qla_isr.c +0 −4
  12. drivers/scsi/qla2xxx/qla_mbx.c +2 −1
  13. drivers/scsi/qla2xxx/qla_sup.c +26 −9
  14. drivers/scsi/qla2xxx/qla_target.c +2 −2
  15. drivers/scsi/qla2xxx/tcm_qla2xxx.c +3 −0
  16. drivers/scsi/qla4xxx/ql4_os.c +0 −1
  17. drivers/scsi/scsi_transport_iscsi.c +7 −0
  18. drivers/scsi/ufs/cdns-pltfrm.c +6 −0
  19. drivers/scsi/ufs/ufs_bsg.c +1 −1
Documentation/scsi/smartpqi.txt+1−1
@@ -29,7 +29,7 @@ smartpqi specific entries in /sys · 28 unmodified lines
2929 smartpqi host attributes:
3030 -------------------------
3131 /sys/class/scsi_host/host*/rescan
32− /sys/class/scsi_host/host*/version
32+ /sys/class/scsi_host/host*/driver_version
3333
3434 The host rescan attribute is a write only attribute. Writing to this
3535 attribute will trigger the driver to scan for new, changed, or removed
drivers/scsi/libiscsi.c+2−2
@@ -1945,7 +1945,7 @@ enum blk_eh_timer_return iscsi_eh_cmd_timed_out(struct scsi_cmnd *sc) · 1944 unmodified lines
19451945
19461946 ISCSI_DBG_EH(session, "scsi cmd %p timedout\n", sc);
19471947
1948− spin_lock(&session->frwd_lock);
1948+ spin_lock_bh(&session->frwd_lock);
19491949 task = (struct iscsi_task *)sc->SCp.ptr;
19501950 if (!task) {
19511951 /*
@@ -2072,7 +2072,7 @@ enum blk_eh_timer_return iscsi_eh_cmd_timed_out(struct scsi_cmnd *sc) · 120 unmodified lines
20722072 done:
20732073 if (task)
20742074 task->last_timeout = jiffies;
2075− spin_unlock(&session->frwd_lock);
2075+ spin_unlock_bh(&session->frwd_lock);
20762076 ISCSI_DBG_EH(session, "return %s\n", rc == BLK_EH_RESET_TIMER ?
20772077 "timer reset" : "shutdown or nh");
20782078 return rc;
drivers/scsi/libsas/sas_discover.c+10−1
@@ -81,12 +81,21 @@ static int sas_get_port_device(struct asd_sas_port *port) · 80 unmodified lines
8181 else
8282 dev->dev_type = SAS_SATA_DEV;
8383 dev->tproto = SAS_PROTOCOL_SATA;
84− } else {
84+ } else if (port->oob_mode == SAS_OOB_MODE) {
8585 struct sas_identify_frame *id =
8686 (struct sas_identify_frame *) dev->frame_rcvd;
8787 dev->dev_type = id->dev_type;
8888 dev->iproto = id->initiator_bits;
8989 dev->tproto = id->target_bits;
90+ } else {
91+ /* If the oob mode is OOB_NOT_CONNECTED, the port is
92+ * disconnected due to race with PHY down. We cannot
93+ * continue to discover this port
94+ */
95+ sas_put_device(dev);
96+ pr_warn("Port %016llx is disconnected when discovering\n",
97+ SAS_ADDR(port->attached_sas_addr));
98+ return -ENODEV;
9099 }
91100
92101 sas_init_dev(dev);
drivers/scsi/lpfc/lpfc_bsg.c+9−6
@@ -4489,12 +4489,6 @@ lpfc_bsg_write_ebuf_set(struct lpfc_hba *phba, struct bsg_job *job, · 4488 unmodified lines
44894489 phba->mbox_ext_buf_ctx.seqNum++;
44904490 nemb_tp = phba->mbox_ext_buf_ctx.nembType;
44914491
4492− dd_data = kmalloc(sizeof(struct bsg_job_data), GFP_KERNEL);
4493− if (!dd_data) {
4494− rc = -ENOMEM;
4495− goto job_error;
4496− }
4497−
44984492 pbuf = (uint8_t *)dmabuf->virt;
44994493 size = job->request_payload.payload_len;
45004494 sg_copy_to_buffer(job->request_payload.sg_list,
@@ -4531,6 +4525,13 @@ lpfc_bsg_write_ebuf_set(struct lpfc_hba *phba, struct bsg_job *job, · 30 unmodified lines
45314525 "2968 SLI_CONFIG ext-buffer wr all %d "
45324526 "ebuffers received\n",
45334527 phba->mbox_ext_buf_ctx.numBuf);
4528+
4529+ dd_data = kmalloc(sizeof(struct bsg_job_data), GFP_KERNEL);
4530+ if (!dd_data) {
4531+ rc = -ENOMEM;
4532+ goto job_error;
4533+ }
4534+
45344535 /* mailbox command structure for base driver */
45354536 pmboxq = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
45364537 if (!pmboxq) {
@@ -4579,6 +4580,8 @@ lpfc_bsg_write_ebuf_set(struct lpfc_hba *phba, struct bsg_job *job, · 42 unmodified lines
45794580 return SLI_CONFIG_HANDLED;
45804581
45814582 job_error:
4583+ if (pmboxq)
4584+ mempool_free(pmboxq, phba->mbox_mem_pool);
45824585 lpfc_bsg_dma_page_free(phba, dmabuf);
45834586 kfree(dd_data);
45844587
drivers/scsi/qla2xxx/qla_attr.c+1−0
@@ -178,6 +178,7 @@ qla2x00_sysfs_read_nvram(struct file *filp, struct kobject *kobj, · 177 unmodified lines
178178
179179 faddr = ha->flt_region_nvram;
180180 if (IS_QLA28XX(ha)) {
181+ qla28xx_get_aux_images(vha, &active_regions);
181182 if (active_regions.aux.vpd_nvram == QLA27XX_SECONDARY_IMAGE)
182183 faddr = ha->flt_region_nvram_sec;
183184 }
drivers/scsi/qla2xxx/qla_bsg.c+1−1
@@ -2399,7 +2399,7 @@ qla2x00_get_flash_image_status(struct bsg_job *bsg_job) · 2398 unmodified lines
23992399 struct qla_active_regions regions = { };
24002400 struct active_regions active_regions = { };
24012401
2402− qla28xx_get_aux_images(vha, &active_regions);
2402+ qla27xx_get_active_image(vha, &active_regions);
24032403 regions.global_image = active_regions.global;
24042404
24052405 if (IS_QLA28XX(ha)) {
drivers/scsi/qla2xxx/qla_def.h+1−0
@@ -2401,6 +2401,7 @@ typedef struct fc_port { · 2400 unmodified lines
24012401 unsigned int id_changed:1;
24022402 unsigned int scan_needed:1;
24032403 unsigned int n2n_flag:1;
2404+ unsigned int explicit_logout:1;
24042405
24052406 struct completion nvme_del_done;
24062407 uint32_t nvme_prli_service_param;
drivers/scsi/qla2xxx/qla_fw.h+4−0
@@ -1523,6 +1523,10 @@ struct qla_flt_header { · 1522 unmodified lines
15231523 #define FLT_REG_NVRAM_SEC_28XX_1 0x10F
15241524 #define FLT_REG_NVRAM_SEC_28XX_2 0x111
15251525 #define FLT_REG_NVRAM_SEC_28XX_3 0x113
1526+#define FLT_REG_MPI_PRI_28XX 0xD3
1527+#define FLT_REG_MPI_SEC_28XX 0xF0
1528+#define FLT_REG_PEP_PRI_28XX 0xD1
1529+#define FLT_REG_PEP_SEC_28XX 0xF1
15261530
15271531 struct qla_flt_region {
15281532 uint16_t code;
drivers/scsi/qla2xxx/qla_init.c+10−11
@@ -533,6 +533,7 @@ static int qla_post_els_plogi_work(struct scsi_qla_host *vha, fc_port_t *fcport) · 532 unmodified lines
533533
534534 e->u.fcport.fcport = fcport;
535535 fcport->flags |= FCF_ASYNC_ACTIVE;
536+ fcport->disc_state = DSC_LOGIN_PEND;
536537 return qla2x00_post_work(vha, e);
537538 }
538539
@@ -1526,8 +1527,8 @@ int qla24xx_fcport_handle_login(struct scsi_qla_host *vha, fc_port_t *fcport) · 987 unmodified lines
15261527 }
15271528 }
15281529
1529− /* for pure Target Mode. Login will not be initiated */
1530− if (vha->host->active_mode == MODE_TARGET)
1530+ /* Target won't initiate port login if fabric is present */
1531+ if (vha->host->active_mode == MODE_TARGET && !N2N_TOPO(vha->hw))
15311532 return 0;
15321533
15331534 if (fcport->flags & FCF_ASYNC_SENT) {
@@ -1719,6 +1720,10 @@ void qla24xx_handle_relogin_event(scsi_qla_host_t *vha, · 185 unmodified lines
17191720 void qla_handle_els_plogi_done(scsi_qla_host_t *vha,
17201721 struct event_arg *ea)
17211722 {
1723+ /* for pure Target Mode, PRLI will not be initiated */
1724+ if (vha->host->active_mode == MODE_TARGET)
1725+ return;
1726+
17221727 ql_dbg(ql_dbg_disc, vha, 0x2118,
17231728 "%s %d %8phC post PRLI\n",
17241729 __func__, __LINE__, ea->fcport->port_name);
@@ -4852,6 +4857,7 @@ qla2x00_alloc_fcport(scsi_qla_host_t *vha, gfp_t flags) · 3127 unmodified lines
48524857 }
48534858
48544859 INIT_WORK(&fcport->del_work, qla24xx_delete_sess_fn);
4860+ INIT_WORK(&fcport->free_work, qlt_free_session_done);
48554861 INIT_WORK(&fcport->reg_work, qla_register_fcport_fn);
48564862 INIT_LIST_HEAD(&fcport->gnl_entry);
48574863 INIT_LIST_HEAD(&fcport->list);
@@ -4930,14 +4936,8 @@ qla2x00_configure_loop(scsi_qla_host_t *vha) · 72 unmodified lines
49304936 set_bit(RSCN_UPDATE, &flags);
49314937 clear_bit(LOCAL_LOOP_UPDATE, &flags);
49324938
4933− } else if (ha->current_topology == ISP_CFG_N) {
4934− clear_bit(RSCN_UPDATE, &flags);
4935− if (qla_tgt_mode_enabled(vha)) {
4936− /* allow the other side to start the login */
4937− clear_bit(LOCAL_LOOP_UPDATE, &flags);
4938− set_bit(RELOGIN_NEEDED, &vha->dpc_flags);
4939− }
4940− } else if (ha->current_topology == ISP_CFG_NL) {
4939+ } else if (ha->current_topology == ISP_CFG_NL ||
4940+ ha->current_topology == ISP_CFG_N) {
49414941 clear_bit(RSCN_UPDATE, &flags);
49424942 set_bit(LOCAL_LOOP_UPDATE, &flags);
49434943 } else if (!vha->flags.online ||
@@ -5054,7 +5054,6 @@ qla2x00_configure_local_loop(scsi_qla_host_t *vha) · 110 unmodified lines
50545054 memcpy(&ha->plogi_els_payld.data,
50555055 (void *)ha->init_cb,
50565056 sizeof(ha->plogi_els_payld.data));
5057− set_bit(RELOGIN_NEEDED, &vha->dpc_flags);
50585057 } else {
50595058 ql_dbg(ql_dbg_init, vha, 0x00d1,
50605059 "PLOGI ELS param read fail.\n");
drivers/scsi/qla2xxx/qla_iocb.c+25−6
@@ -2405,11 +2405,19 @@ qla2x00_login_iocb(srb_t *sp, struct mbx_entry *mbx) · 2404 unmodified lines
24052405 static void
24062406 qla24xx_logout_iocb(srb_t *sp, struct logio_entry_24xx *logio)
24072407 {
2408+ u16 control_flags = LCF_COMMAND_LOGO;
24082409 logio->entry_type = LOGINOUT_PORT_IOCB_TYPE;
2409− logio->control_flags =
2410− cpu_to_le16(LCF_COMMAND_LOGO|LCF_IMPL_LOGO);
2411− if (!sp->fcport->keep_nport_handle)
2412− logio->control_flags |= cpu_to_le16(LCF_FREE_NPORT);
2410+
2411+ if (sp->fcport->explicit_logout) {
2412+ control_flags |= LCF_EXPL_LOGO|LCF_FREE_NPORT;
2413+ } else {
2414+ control_flags |= LCF_IMPL_LOGO;
2415+
2416+ if (!sp->fcport->keep_nport_handle)
2417+ control_flags |= LCF_FREE_NPORT;
2418+ }
2419+
2420+ logio->control_flags = cpu_to_le16(control_flags);
24132421 logio->nport_handle = cpu_to_le16(sp->fcport->loop_id);
24142422 logio->port_id[0] = sp->fcport->d_id.b.al_pa;
24152423 logio->port_id[1] = sp->fcport->d_id.b.area;
@@ -2617,6 +2625,10 @@ qla24xx_els_dcmd_iocb(scsi_qla_host_t *vha, int els_opcode, · 201 unmodified lines
26172625
26182626 memcpy(elsio->u.els_logo.els_logo_pyld, &logo_pyld,
26192627 sizeof(struct els_logo_payload));
2628+ ql_dbg(ql_dbg_disc + ql_dbg_buffer, vha, 0x3075, "LOGO buffer:");
2629+ ql_dump_buffer(ql_dbg_disc + ql_dbg_buffer, vha, 0x010a,
2630+ elsio->u.els_logo.els_logo_pyld,
2631+ sizeof(*elsio->u.els_logo.els_logo_pyld));
26202632
26212633 rval = qla2x00_start_sp(sp);
26222634 if (rval != QLA_SUCCESS) {
@@ -2676,7 +2688,8 @@ qla24xx_els_logo_iocb(srb_t *sp, struct els_entry_24xx *els_iocb) · 53 unmodified lines
26762688 ql_dbg(ql_dbg_io + ql_dbg_buffer, vha, 0x3073,
26772689 "PLOGI ELS IOCB:\n");
26782690 ql_dump_buffer(ql_log_info, vha, 0x0109,
2679− (uint8_t *)els_iocb, 0x70);
2691+ (uint8_t *)els_iocb,
2692+ sizeof(*els_iocb));
26802693 } else {
26812694 els_iocb->control_flags = 1 << 13;
26822695 els_iocb->tx_byte_count =
@@ -2688,6 +2701,11 @@ qla24xx_els_logo_iocb(srb_t *sp, struct els_entry_24xx *els_iocb) · 5 unmodified lines
26882701 els_iocb->rx_byte_count = 0;
26892702 els_iocb->rx_address = 0;
26902703 els_iocb->rx_len = 0;
2704+ ql_dbg(ql_dbg_io + ql_dbg_buffer, vha, 0x3076,
2705+ "LOGO ELS IOCB:");
2706+ ql_dump_buffer(ql_log_info, vha, 0x010b,
2707+ els_iocb,
2708+ sizeof(*els_iocb));
26912709 }
26922710
26932711 sp->vha->qla_stats.control_requests++;
@@ -2934,7 +2952,8 @@ qla24xx_els_dcmd2_iocb(scsi_qla_host_t *vha, int els_opcode, · 240 unmodified lines
29342952
29352953 ql_dbg(ql_dbg_disc + ql_dbg_buffer, vha, 0x3073, "PLOGI buffer:\n");
29362954 ql_dump_buffer(ql_dbg_disc + ql_dbg_buffer, vha, 0x0109,
2937− (uint8_t *)elsio->u.els_plogi.els_plogi_pyld, 0x70);
2955+ (uint8_t *)elsio->u.els_plogi.els_plogi_pyld,
2956+ sizeof(*elsio->u.els_plogi.els_plogi_pyld));
29382957
29392958 rval = qla2x00_start_sp(sp);
29402959 if (rval != QLA_SUCCESS) {
drivers/scsi/qla2xxx/qla_isr.c+0−4
@@ -1061,8 +1061,6 @@ global_port_update: · 1060 unmodified lines
10611061 ql_dbg(ql_dbg_async, vha, 0x5011,
10621062 "Asynchronous PORT UPDATE ignored %04x/%04x/%04x.\n",
10631063 mb[1], mb[2], mb[3]);
1064−
1065− qlt_async_event(mb[0], vha, mb);
10661064 break;
10671065 }
10681066
@@ -1079,8 +1077,6 @@ global_port_update: · 10 unmodified lines
10791077 set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags);
10801078 set_bit(LOCAL_LOOP_UPDATE, &vha->dpc_flags);
10811079 set_bit(VP_CONFIG_OK, &vha->vp_flags);
1082−
1083− qlt_async_event(mb[0], vha, mb);
10841080 break;
10851081
10861082 case MBA_RSCN_UPDATE: /* State Change Registration */
drivers/scsi/qla2xxx/qla_mbx.c+2−1
@@ -3921,6 +3921,7 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha, · 3920 unmodified lines
39213921 vha->d_id.b24 = 0;
39223922 vha->d_id.b.al_pa = 1;
39233923 ha->flags.n2n_bigger = 1;
3924+ ha->flags.n2n_ae = 0;
39243925
39253926 id.b.al_pa = 2;
39263927 ql_dbg(ql_dbg_async, vha, 0x5075,
@@ -3931,6 +3932,7 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha, · 4 unmodified lines
39313932 "Format 1: Remote login - Waiting for WWPN %8phC.\n",
39323933 rptid_entry->u.f1.port_name);
39333934 ha->flags.n2n_bigger = 0;
3935+ ha->flags.n2n_ae = 1;
39343936 }
39353937 qla24xx_post_newsess_work(vha, &id,
39363938 rptid_entry->u.f1.port_name,
@@ -3942,7 +3944,6 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha, · 5 unmodified lines
39423944 /* if our portname is higher then initiate N2N login */
39433945
39443946 set_bit(N2N_LOGIN_NEEDED, &vha->dpc_flags);
3945− ha->flags.n2n_ae = 1;
39463947 return;
39473948 break;
39483949 case TOPO_FL:
drivers/scsi/qla2xxx/qla_sup.c+26−9
@@ -847,15 +847,15 @@ qla2xxx_get_flt_info(scsi_qla_host_t *vha, uint32_t flt_addr) · 846 unmodified lines
847847 ha->flt_region_img_status_pri = start;
848848 break;
849849 case FLT_REG_IMG_SEC_27XX:
850− if (IS_QLA27XX(ha) && !IS_QLA28XX(ha))
850+ if (IS_QLA27XX(ha) || IS_QLA28XX(ha))
851851 ha->flt_region_img_status_sec = start;
852852 break;
853853 case FLT_REG_FW_SEC_27XX:
854− if (IS_QLA27XX(ha) && !IS_QLA28XX(ha))
854+ if (IS_QLA27XX(ha) || IS_QLA28XX(ha))
855855 ha->flt_region_fw_sec = start;
856856 break;
857857 case FLT_REG_BOOTLOAD_SEC_27XX:
858− if (IS_QLA27XX(ha) && !IS_QLA28XX(ha))
858+ if (IS_QLA27XX(ha) || IS_QLA28XX(ha))
859859 ha->flt_region_boot_sec = start;
860860 break;
861861 case FLT_REG_AUX_IMG_PRI_28XX:
@@ -2725,8 +2725,11 @@ qla28xx_write_flash_data(scsi_qla_host_t *vha, uint32_t *dwptr, uint32_t faddr, · 1863 unmodified lines
27252725 ql_log(ql_log_warn + ql_dbg_verbose, vha, 0xffff,
27262726 "Region %x is secure\n", region.code);
27272727
2728− if (region.code == FLT_REG_FW ||
2729− region.code == FLT_REG_FW_SEC_27XX) {
2728+ switch (region.code) {
2729+ case FLT_REG_FW:
2730+ case FLT_REG_FW_SEC_27XX:
2731+ case FLT_REG_MPI_PRI_28XX:
2732+ case FLT_REG_MPI_SEC_28XX:
27302733 fw_array = dwptr;
27312734
27322735 /* 1st fw array */
@@ -2757,9 +2760,23 @@ qla28xx_write_flash_data(scsi_qla_host_t *vha, uint32_t *dwptr, uint32_t faddr, · 24 unmodified lines
27572760 buf_size_without_sfub += risc_size;
27582761 fw_array += risc_size;
27592762 }
2760− } else {
2761− ql_log(ql_log_warn + ql_dbg_verbose, vha, 0xffff,
2762− "Secure region %x not supported\n",
2763+ break;
2764+
2765+ case FLT_REG_PEP_PRI_28XX:
2766+ case FLT_REG_PEP_SEC_28XX:
2767+ fw_array = dwptr;
2768+
2769+ /* 1st fw array */
2770+ risc_size = be32_to_cpu(fw_array[3]);
2771+ risc_attr = be32_to_cpu(fw_array[9]);
2772+
2773+ buf_size_without_sfub = risc_size;
2774+ fw_array += risc_size;
2775+ break;
2776+
2777+ default:
2778+ ql_log(ql_log_warn + ql_dbg_verbose, vha,
2779+ 0xffff, "Secure region %x not supported\n",
27632780 region.code);
27642781 rval = QLA_COMMAND_ERROR;
27652782 goto done;
@@ -2880,7 +2897,7 @@ qla28xx_write_flash_data(scsi_qla_host_t *vha, uint32_t *dwptr, uint32_t faddr, · 114 unmodified lines
28802897 "Sending Secure Flash MB Cmd\n");
28812898 rval = qla28xx_secure_flash_update(vha, 0, region.code,
28822899 buf_size_without_sfub, sfub_dma,
2883− sizeof(struct secure_flash_update_block));
2900+ sizeof(struct secure_flash_update_block) >> 2);
28842901 if (rval != QLA_SUCCESS) {
28852902 ql_log(ql_log_warn, vha, 0xffff,
28862903 "Secure Flash MB Cmd failed %x.", rval);
drivers/scsi/qla2xxx/qla_target.c+2−2
@@ -1104,6 +1104,7 @@ void qlt_free_session_done(struct work_struct *work) · 1103 unmodified lines
11041104 }
11051105 }
11061106
1107+ sess->explicit_logout = 0;
11071108 spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
11081109 sess->free_pending = 0;
11091110
@@ -1160,7 +1161,6 @@ void qlt_unreg_sess(struct fc_port *sess) · 50 unmodified lines
11601161 sess->last_rscn_gen = sess->rscn_gen;
11611162 sess->last_login_gen = sess->login_gen;
11621163
1163− INIT_WORK(&sess->free_work, qlt_free_session_done);
11641164 queue_work(sess->vha->hw->wq, &sess->free_work);
11651165 }
11661166 EXPORT_SYMBOL(qlt_unreg_sess);
@@ -1265,7 +1265,6 @@ void qlt_schedule_sess_for_deletion(struct fc_port *sess) · 98 unmodified lines
12651265 "Scheduling sess %p for deletion %8phC\n",
12661266 sess, sess->port_name);
12671267
1268− INIT_WORK(&sess->del_work, qla24xx_delete_sess_fn);
12691268 WARN_ON(!queue_work(sess->vha->hw->wq, &sess->del_work));
12701269 }
12711270
@@ -4804,6 +4803,7 @@ static int qlt_handle_login(struct scsi_qla_host *vha, · 3532 unmodified lines
48044803
48054804 switch (sess->disc_state) {
48064805 case DSC_DELETED:
4806+ case DSC_LOGIN_PEND:
48074807 qlt_plogi_ack_unref(vha, pla);
48084808 break;
48094809
drivers/scsi/qla2xxx/tcm_qla2xxx.c+3−0
@@ -246,6 +246,8 @@ static void tcm_qla2xxx_complete_mcmd(struct work_struct *work) · 245 unmodified lines
246246 */
247247 static void tcm_qla2xxx_free_mcmd(struct qla_tgt_mgmt_cmd *mcmd)
248248 {
249+ if (!mcmd)
250+ return;
249251 INIT_WORK(&mcmd->free_work, tcm_qla2xxx_complete_mcmd);
250252 queue_work(tcm_qla2xxx_free_wq, &mcmd->free_work);
251253 }
@@ -348,6 +350,7 @@ static void tcm_qla2xxx_close_session(struct se_session *se_sess) · 96 unmodified lines
348350 target_sess_cmd_list_set_waiting(se_sess);
349351 spin_unlock_irqrestore(&vha->hw->tgt.sess_lock, flags);
350352
353+ sess->explicit_logout = 1;
351354 tcm_qla2xxx_put_sess(sess);
352355 }
353356
drivers/scsi/qla4xxx/ql4_os.c+0−1
@@ -4275,7 +4275,6 @@ static int qla4xxx_mem_alloc(struct scsi_qla_host *ha) · 4274 unmodified lines
42754275 return QLA_SUCCESS;
42764276
42774277 mem_alloc_error_exit:
4278− qla4xxx_mem_free(ha);
42794278 return QLA_ERROR;
42804279 }
42814280
drivers/scsi/scsi_transport_iscsi.c+7−0
@@ -24,6 +24,8 @@ · 23 unmodified lines
2424
2525 #define ISCSI_TRANSPORT_VERSION "2.0-870"
2626
27+#define ISCSI_SEND_MAX_ALLOWED 10
28+
2729 #define CREATE_TRACE_POINTS
2830 #include <trace/events/iscsi.h>
2931
@@ -3682,6 +3684,7 @@ iscsi_if_rx(struct sk_buff *skb) · 3652 unmodified lines
36823684 struct nlmsghdr *nlh;
36833685 struct iscsi_uevent *ev;
36843686 uint32_t group;
3687+ int retries = ISCSI_SEND_MAX_ALLOWED;
36853688
36863689 nlh = nlmsg_hdr(skb);
36873690 if (nlh->nlmsg_len < sizeof(*nlh) + sizeof(*ev) ||
@@ -3712,6 +3715,10 @@ iscsi_if_rx(struct sk_buff *skb) · 24 unmodified lines
37123715 break;
37133716 err = iscsi_if_send_reply(portid, nlh->nlmsg_type,
37143717 ev, sizeof(*ev));
3718+ if (err == -EAGAIN && --retries < 0) {
3719+ printk(KERN_WARNING "Send reply failed, error %d\n", err);
3720+ break;
3721+ }
37153722 } while (err < 0 && err != -ECONNREFUSED && err != -ESRCH);
37163723 skb_pull(skb, rlen);
37173724 }
drivers/scsi/ufs/cdns-pltfrm.c+6−0
@@ -99,6 +99,12 @@ static int cdns_ufs_link_startup_notify(struct ufs_hba *hba, · 98 unmodified lines
9999 */
100100 ufshcd_dme_set(hba, UIC_ARG_MIB(PA_LOCAL_TX_LCC_ENABLE), 0);
101101
102+ /*
103+ * Disabling Autohibern8 feature in cadence UFS
104+ * to mask unexpected interrupt trigger.
105+ */
106+ hba->ahit = 0;
107+
102108 return 0;
103109 }
104110
drivers/scsi/ufs/ufs_bsg.c+1−1
@@ -203,7 +203,7 @@ int ufs_bsg_probe(struct ufs_hba *hba) · 202 unmodified lines
203203 bsg_dev->parent = get_device(parent);
204204 bsg_dev->release = ufs_bsg_node_release;
205205
206− dev_set_name(bsg_dev, "ufs-bsg");
206+ dev_set_name(bsg_dev, "ufs-bsg%u", shost->host_no);
207207
208208 ret = device_add(bsg_dev);
209209 if (ret)