Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge patch series "Misc. qla2xxx driver bug fixes"

Nilesh Javali <njavali@marvell.com> says:

Please apply the miscellaneous qla2xxx driver bug fixes to the SCSI
tree at your earliest convenience.

Link: https://lore.kernel.org/r/20221219110748.7039-1-njavali@marvell.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

+188 -69
+5 -4
drivers/scsi/qla2xxx/qla_bsg.c
··· 278 278 const char *type; 279 279 int req_sg_cnt, rsp_sg_cnt; 280 280 int rval = (DID_ERROR << 16); 281 - uint16_t nextlid = 0; 282 281 uint32_t els_cmd = 0; 282 + int qla_port_allocated = 0; 283 283 284 284 if (bsg_request->msgcode == FC_BSG_RPT_ELS) { 285 285 rport = fc_bsg_to_rport(bsg_job); ··· 329 329 /* make sure the rport is logged in, 330 330 * if not perform fabric login 331 331 */ 332 - if (qla2x00_fabric_login(vha, fcport, &nextlid)) { 332 + if (atomic_read(&fcport->state) != FCS_ONLINE) { 333 333 ql_dbg(ql_dbg_user, vha, 0x7003, 334 - "Failed to login port %06X for ELS passthru.\n", 334 + "Port %06X is not online for ELS passthru.\n", 335 335 fcport->d_id.b24); 336 336 rval = -EIO; 337 337 goto done; ··· 348 348 goto done; 349 349 } 350 350 351 + qla_port_allocated = 1; 351 352 /* Initialize all required fields of fcport */ 352 353 fcport->vha = vha; 353 354 fcport->d_id.b.al_pa = ··· 433 432 goto done_free_fcport; 434 433 435 434 done_free_fcport: 436 - if (bsg_request->msgcode != FC_BSG_RPT_ELS) 435 + if (qla_port_allocated) 437 436 qla2x00_free_fcport(fcport); 438 437 done: 439 438 return rval;
+5 -1
drivers/scsi/qla2xxx/qla_def.h
··· 660 660 661 661 struct iocb_resource { 662 662 u8 res_type; 663 - u8 pad; 663 + u8 exch_cnt; 664 664 u16 iocb_cnt; 665 665 }; 666 666 ··· 3721 3721 u16 iocbs_limit; 3722 3722 u16 iocbs_qp_limit; 3723 3723 u16 iocbs_used; 3724 + u16 exch_total; 3725 + u16 exch_limit; 3726 + u16 exch_used; 3727 + u16 pad; 3724 3728 }; 3725 3729 3726 3730 #define QLA_IOCB_PCT_LIMIT 95
+8 -2
drivers/scsi/qla2xxx/qla_dfs.c
··· 235 235 uint16_t mb[MAX_IOCB_MB_REG]; 236 236 int rc; 237 237 struct qla_hw_data *ha = vha->hw; 238 - u16 iocbs_used, i; 238 + u16 iocbs_used, i, exch_used; 239 239 240 240 rc = qla24xx_res_count_wait(vha, mb, SIZEOF_IOCB_MB_REG); 241 241 if (rc != QLA_SUCCESS) { ··· 263 263 if (ql2xenforce_iocb_limit) { 264 264 /* lock is not require. It's an estimate. */ 265 265 iocbs_used = ha->base_qpair->fwres.iocbs_used; 266 + exch_used = ha->base_qpair->fwres.exch_used; 266 267 for (i = 0; i < ha->max_qpairs; i++) { 267 - if (ha->queue_pair_map[i]) 268 + if (ha->queue_pair_map[i]) { 268 269 iocbs_used += ha->queue_pair_map[i]->fwres.iocbs_used; 270 + exch_used += ha->queue_pair_map[i]->fwres.exch_used; 271 + } 269 272 } 270 273 271 274 seq_printf(s, "Driver: estimate iocb used [%d] high water limit [%d]\n", 272 275 iocbs_used, ha->base_qpair->fwres.iocbs_limit); 276 + 277 + seq_printf(s, "estimate exchange used[%d] high water limit [%d] n", 278 + exch_used, ha->base_qpair->fwres.exch_limit); 273 279 } 274 280 275 281 return 0;
+4 -3
drivers/scsi/qla2xxx/qla_edif.c
··· 2989 2989 tot_dsds = nseg; 2990 2990 req_cnt = qla24xx_calc_iocbs(vha, tot_dsds); 2991 2991 2992 - sp->iores.res_type = RESOURCE_INI; 2992 + sp->iores.res_type = RESOURCE_IOCB | RESOURCE_EXCH; 2993 + sp->iores.exch_cnt = 1; 2993 2994 sp->iores.iocb_cnt = req_cnt; 2994 - if (qla_get_iocbs(sp->qpair, &sp->iores)) 2995 + if (qla_get_fw_resources(sp->qpair, &sp->iores)) 2995 2996 goto queuing_error; 2996 2997 2997 2998 if (req->cnt < (req_cnt + 2)) { ··· 3186 3185 mempool_free(sp->u.scmd.ct6_ctx, ha->ctx_mempool); 3187 3186 sp->u.scmd.ct6_ctx = NULL; 3188 3187 } 3189 - qla_put_iocbs(sp->qpair, &sp->iores); 3188 + qla_put_fw_resources(sp->qpair, &sp->iores); 3190 3189 spin_unlock_irqrestore(lock, flags); 3191 3190 3192 3191 return QLA_FUNCTION_FAILED;
+19 -1
drivers/scsi/qla2xxx/qla_init.c
··· 128 128 sp->cmd_sp)) { 129 129 qpair->req->outstanding_cmds[handle] = NULL; 130 130 cmdsp_found = 1; 131 + qla_put_fw_resources(qpair, &sp->cmd_sp->iores); 131 132 } 132 133 133 134 /* removing the abort */ 134 135 if (qpair->req->outstanding_cmds[handle] == sp) { 135 136 qpair->req->outstanding_cmds[handle] = NULL; 136 137 sp_found = 1; 138 + qla_put_fw_resources(qpair, &sp->iores); 137 139 break; 138 140 } 139 141 } ··· 390 388 fcport->flags &= ~FCF_ASYNC_SENT; 391 389 done: 392 390 fcport->flags &= ~FCF_ASYNC_ACTIVE; 391 + 392 + /* 393 + * async login failed. Could be due to iocb/exchange resource 394 + * being low. Set state DELETED for re-login process to start again. 395 + */ 396 + qla2x00_set_fcport_disc_state(fcport, DSC_DELETED); 393 397 return rval; 394 398 } 395 399 ··· 2008 2000 for (h = 1; h < sp->qpair->req->num_outstanding_cmds; h++) { 2009 2001 if (sp->qpair->req->outstanding_cmds[h] == sp) { 2010 2002 sp->qpair->req->outstanding_cmds[h] = NULL; 2003 + qla_put_fw_resources(sp->qpair, &sp->iores); 2011 2004 break; 2012 2005 } 2013 2006 } ··· 2082 2073 done_free_sp: 2083 2074 /* ref: INIT */ 2084 2075 kref_put(&sp->cmd_kref, qla2x00_sp_release); 2085 - fcport->flags &= ~FCF_ASYNC_SENT; 2086 2076 done: 2087 2077 return rval; 2088 2078 } ··· 3951 3943 ha->base_qpair->fwres.iocbs_limit = limit; 3952 3944 ha->base_qpair->fwres.iocbs_qp_limit = limit / num_qps; 3953 3945 ha->base_qpair->fwres.iocbs_used = 0; 3946 + 3947 + ha->base_qpair->fwres.exch_total = ha->orig_fw_xcb_count; 3948 + ha->base_qpair->fwres.exch_limit = (ha->orig_fw_xcb_count * 3949 + QLA_IOCB_PCT_LIMIT) / 100; 3950 + ha->base_qpair->fwres.exch_used = 0; 3951 + 3954 3952 for (i = 0; i < ha->max_qpairs; i++) { 3955 3953 if (ha->queue_pair_map[i]) { 3956 3954 ha->queue_pair_map[i]->fwres.iocbs_total = ··· 3965 3951 ha->queue_pair_map[i]->fwres.iocbs_qp_limit = 3966 3952 limit / num_qps; 3967 3953 ha->queue_pair_map[i]->fwres.iocbs_used = 0; 3954 + ha->queue_pair_map[i]->fwres.exch_total = ha->orig_fw_xcb_count; 3955 + ha->queue_pair_map[i]->fwres.exch_limit = 3956 + (ha->orig_fw_xcb_count * QLA_IOCB_PCT_LIMIT) / 100; 3957 + ha->queue_pair_map[i]->fwres.exch_used = 0; 3968 3958 } 3969 3959 } 3970 3960 }
+38 -17
drivers/scsi/qla2xxx/qla_inline.h
··· 380 380 381 381 enum { 382 382 RESOURCE_NONE, 383 - RESOURCE_INI, 383 + RESOURCE_IOCB = BIT_0, 384 + RESOURCE_EXCH = BIT_1, /* exchange */ 385 + RESOURCE_FORCE = BIT_2, 384 386 }; 385 387 386 388 static inline int 387 - qla_get_iocbs(struct qla_qpair *qp, struct iocb_resource *iores) 389 + qla_get_fw_resources(struct qla_qpair *qp, struct iocb_resource *iores) 388 390 { 389 391 u16 iocbs_used, i; 392 + u16 exch_used; 390 393 struct qla_hw_data *ha = qp->vha->hw; 391 394 392 395 if (!ql2xenforce_iocb_limit) { 393 396 iores->res_type = RESOURCE_NONE; 394 397 return 0; 395 398 } 399 + if (iores->res_type & RESOURCE_FORCE) 400 + goto force; 396 401 397 - if ((iores->iocb_cnt + qp->fwres.iocbs_used) < qp->fwres.iocbs_qp_limit) { 398 - qp->fwres.iocbs_used += iores->iocb_cnt; 399 - return 0; 400 - } else { 402 + if ((iores->iocb_cnt + qp->fwres.iocbs_used) >= qp->fwres.iocbs_qp_limit) { 401 403 /* no need to acquire qpair lock. It's just rough calculation */ 402 404 iocbs_used = ha->base_qpair->fwres.iocbs_used; 403 405 for (i = 0; i < ha->max_qpairs; i++) { ··· 407 405 iocbs_used += ha->queue_pair_map[i]->fwres.iocbs_used; 408 406 } 409 407 410 - if ((iores->iocb_cnt + iocbs_used) < qp->fwres.iocbs_limit) { 411 - qp->fwres.iocbs_used += iores->iocb_cnt; 412 - return 0; 413 - } else { 408 + if ((iores->iocb_cnt + iocbs_used) >= qp->fwres.iocbs_limit) { 414 409 iores->res_type = RESOURCE_NONE; 415 410 return -ENOSPC; 416 411 } 417 412 } 413 + 414 + if (iores->res_type & RESOURCE_EXCH) { 415 + exch_used = ha->base_qpair->fwres.exch_used; 416 + for (i = 0; i < ha->max_qpairs; i++) { 417 + if (ha->queue_pair_map[i]) 418 + exch_used += ha->queue_pair_map[i]->fwres.exch_used; 419 + } 420 + 421 + if ((exch_used + iores->exch_cnt) >= qp->fwres.exch_limit) { 422 + iores->res_type = RESOURCE_NONE; 423 + return -ENOSPC; 424 + } 425 + } 426 + force: 427 + qp->fwres.iocbs_used += iores->iocb_cnt; 428 + qp->fwres.exch_used += iores->exch_cnt; 429 + return 0; 418 430 } 419 431 420 432 static inline void 421 - qla_put_iocbs(struct qla_qpair *qp, struct iocb_resource *iores) 433 + qla_put_fw_resources(struct qla_qpair *qp, struct iocb_resource *iores) 422 434 { 423 - switch (iores->res_type) { 424 - case RESOURCE_NONE: 425 - break; 426 - default: 435 + if (iores->res_type & RESOURCE_IOCB) { 427 436 if (qp->fwres.iocbs_used >= iores->iocb_cnt) { 428 437 qp->fwres.iocbs_used -= iores->iocb_cnt; 429 438 } else { 430 - // should not happen 439 + /* should not happen */ 431 440 qp->fwres.iocbs_used = 0; 432 441 } 433 - break; 442 + } 443 + 444 + if (iores->res_type & RESOURCE_EXCH) { 445 + if (qp->fwres.exch_used >= iores->exch_cnt) { 446 + qp->fwres.exch_used -= iores->exch_cnt; 447 + } else { 448 + /* should not happen */ 449 + qp->fwres.exch_used = 0; 450 + } 434 451 } 435 452 iores->res_type = RESOURCE_NONE; 436 453 }
+83 -12
drivers/scsi/qla2xxx/qla_iocb.c
··· 1589 1589 tot_dsds = nseg; 1590 1590 req_cnt = qla24xx_calc_iocbs(vha, tot_dsds); 1591 1591 1592 - sp->iores.res_type = RESOURCE_INI; 1592 + sp->iores.res_type = RESOURCE_IOCB | RESOURCE_EXCH; 1593 + sp->iores.exch_cnt = 1; 1593 1594 sp->iores.iocb_cnt = req_cnt; 1594 - if (qla_get_iocbs(sp->qpair, &sp->iores)) 1595 + if (qla_get_fw_resources(sp->qpair, &sp->iores)) 1595 1596 goto queuing_error; 1596 1597 1597 1598 if (req->cnt < (req_cnt + 2)) { ··· 1679 1678 if (tot_dsds) 1680 1679 scsi_dma_unmap(cmd); 1681 1680 1682 - qla_put_iocbs(sp->qpair, &sp->iores); 1681 + qla_put_fw_resources(sp->qpair, &sp->iores); 1683 1682 spin_unlock_irqrestore(&ha->hardware_lock, flags); 1684 1683 1685 1684 return QLA_FUNCTION_FAILED; ··· 1794 1793 tot_prot_dsds = nseg; 1795 1794 tot_dsds += nseg; 1796 1795 1797 - sp->iores.res_type = RESOURCE_INI; 1796 + sp->iores.res_type = RESOURCE_IOCB | RESOURCE_EXCH; 1797 + sp->iores.exch_cnt = 1; 1798 1798 sp->iores.iocb_cnt = qla24xx_calc_iocbs(vha, tot_dsds); 1799 - if (qla_get_iocbs(sp->qpair, &sp->iores)) 1799 + if (qla_get_fw_resources(sp->qpair, &sp->iores)) 1800 1800 goto queuing_error; 1801 1801 1802 1802 if (req->cnt < (req_cnt + 2)) { ··· 1885 1883 } 1886 1884 /* Cleanup will be performed by the caller (queuecommand) */ 1887 1885 1888 - qla_put_iocbs(sp->qpair, &sp->iores); 1886 + qla_put_fw_resources(sp->qpair, &sp->iores); 1889 1887 spin_unlock_irqrestore(&ha->hardware_lock, flags); 1890 1888 1891 1889 return QLA_FUNCTION_FAILED; ··· 1954 1952 tot_dsds = nseg; 1955 1953 req_cnt = qla24xx_calc_iocbs(vha, tot_dsds); 1956 1954 1957 - sp->iores.res_type = RESOURCE_INI; 1955 + sp->iores.res_type = RESOURCE_IOCB | RESOURCE_EXCH; 1956 + sp->iores.exch_cnt = 1; 1958 1957 sp->iores.iocb_cnt = req_cnt; 1959 - if (qla_get_iocbs(sp->qpair, &sp->iores)) 1958 + if (qla_get_fw_resources(sp->qpair, &sp->iores)) 1960 1959 goto queuing_error; 1961 1960 1962 1961 if (req->cnt < (req_cnt + 2)) { ··· 2044 2041 if (tot_dsds) 2045 2042 scsi_dma_unmap(cmd); 2046 2043 2047 - qla_put_iocbs(sp->qpair, &sp->iores); 2044 + qla_put_fw_resources(sp->qpair, &sp->iores); 2048 2045 spin_unlock_irqrestore(&qpair->qp_lock, flags); 2049 2046 2050 2047 return QLA_FUNCTION_FAILED; ··· 2174 2171 tot_prot_dsds = nseg; 2175 2172 tot_dsds += nseg; 2176 2173 2177 - sp->iores.res_type = RESOURCE_INI; 2174 + sp->iores.res_type = RESOURCE_IOCB | RESOURCE_EXCH; 2175 + sp->iores.exch_cnt = 1; 2178 2176 sp->iores.iocb_cnt = qla24xx_calc_iocbs(vha, tot_dsds); 2179 - if (qla_get_iocbs(sp->qpair, &sp->iores)) 2177 + if (qla_get_fw_resources(sp->qpair, &sp->iores)) 2180 2178 goto queuing_error; 2181 2179 2182 2180 if (req->cnt < (req_cnt + 2)) { ··· 2264 2260 } 2265 2261 /* Cleanup will be performed by the caller (queuecommand) */ 2266 2262 2267 - qla_put_iocbs(sp->qpair, &sp->iores); 2263 + qla_put_fw_resources(sp->qpair, &sp->iores); 2268 2264 spin_unlock_irqrestore(&qpair->qp_lock, flags); 2269 2265 2270 2266 return QLA_FUNCTION_FAILED; ··· 3817 3813 logio->vp_index = sp->fcport->vha->vp_idx; 3818 3814 } 3819 3815 3816 + static int qla_get_iocbs_resource(struct srb *sp) 3817 + { 3818 + bool get_exch; 3819 + bool push_it_through = false; 3820 + 3821 + if (!ql2xenforce_iocb_limit) { 3822 + sp->iores.res_type = RESOURCE_NONE; 3823 + return 0; 3824 + } 3825 + sp->iores.res_type = RESOURCE_NONE; 3826 + 3827 + switch (sp->type) { 3828 + case SRB_TM_CMD: 3829 + case SRB_PRLI_CMD: 3830 + case SRB_ADISC_CMD: 3831 + push_it_through = true; 3832 + fallthrough; 3833 + case SRB_LOGIN_CMD: 3834 + case SRB_ELS_CMD_RPT: 3835 + case SRB_ELS_CMD_HST: 3836 + case SRB_ELS_CMD_HST_NOLOGIN: 3837 + case SRB_CT_CMD: 3838 + case SRB_NVME_LS: 3839 + case SRB_ELS_DCMD: 3840 + get_exch = true; 3841 + break; 3842 + 3843 + case SRB_FXIOCB_DCMD: 3844 + case SRB_FXIOCB_BCMD: 3845 + sp->iores.res_type = RESOURCE_NONE; 3846 + return 0; 3847 + 3848 + case SRB_SA_UPDATE: 3849 + case SRB_SA_REPLACE: 3850 + case SRB_MB_IOCB: 3851 + case SRB_ABT_CMD: 3852 + case SRB_NACK_PLOGI: 3853 + case SRB_NACK_PRLI: 3854 + case SRB_NACK_LOGO: 3855 + case SRB_LOGOUT_CMD: 3856 + case SRB_CTRL_VP: 3857 + push_it_through = true; 3858 + fallthrough; 3859 + default: 3860 + get_exch = false; 3861 + } 3862 + 3863 + sp->iores.res_type |= RESOURCE_IOCB; 3864 + sp->iores.iocb_cnt = 1; 3865 + if (get_exch) { 3866 + sp->iores.res_type |= RESOURCE_EXCH; 3867 + sp->iores.exch_cnt = 1; 3868 + } 3869 + if (push_it_through) 3870 + sp->iores.res_type |= RESOURCE_FORCE; 3871 + 3872 + return qla_get_fw_resources(sp->qpair, &sp->iores); 3873 + } 3874 + 3820 3875 int 3821 3876 qla2x00_start_sp(srb_t *sp) 3822 3877 { ··· 3890 3827 return -EIO; 3891 3828 3892 3829 spin_lock_irqsave(qp->qp_lock_ptr, flags); 3830 + rval = qla_get_iocbs_resource(sp); 3831 + if (rval) { 3832 + spin_unlock_irqrestore(qp->qp_lock_ptr, flags); 3833 + return -EAGAIN; 3834 + } 3835 + 3893 3836 pkt = __qla2x00_alloc_iocbs(sp->qpair, sp); 3894 3837 if (!pkt) { 3895 3838 rval = EAGAIN; ··· 3996 3927 wmb(); 3997 3928 qla2x00_start_iocbs(vha, qp->req); 3998 3929 done: 3930 + if (rval) 3931 + qla_put_fw_resources(sp->qpair, &sp->iores); 3999 3932 spin_unlock_irqrestore(qp->qp_lock_ptr, flags); 4000 3933 return rval; 4001 3934 }
+2 -4
drivers/scsi/qla2xxx/qla_isr.c
··· 3112 3112 } 3113 3113 bsg_reply->reply_payload_rcv_len = 0; 3114 3114 3115 + qla_put_fw_resources(sp->qpair, &sp->iores); 3115 3116 done: 3116 3117 /* Return the vendor specific reply to API */ 3117 3118 bsg_reply->reply_data.vendor_reply.vendor_rsp[0] = rval; ··· 3198 3197 } 3199 3198 return; 3200 3199 } 3201 - qla_put_iocbs(sp->qpair, &sp->iores); 3200 + qla_put_fw_resources(sp->qpair, &sp->iores); 3202 3201 3203 3202 if (sp->cmd_type != TYPE_SRB) { 3204 3203 req->outstanding_cmds[handle] = NULL; ··· 3362 3361 ql_log(ql_log_warn, fcport->vha, 0x301d, 3363 3362 "Dropped frame(s) detected (0x%x of 0x%x bytes).\n", 3364 3363 resid, scsi_bufflen(cp)); 3365 - 3366 - vha->interface_err_cnt++; 3367 3364 3368 3365 res = DID_ERROR << 16 | lscsi_status; 3369 3366 goto check_scsi_status; ··· 3617 3618 default: 3618 3619 sp = qla2x00_get_sp_from_handle(vha, func, req, pkt); 3619 3620 if (sp) { 3620 - qla_put_iocbs(sp->qpair, &sp->iores); 3621 3621 sp->done(sp, res); 3622 3622 return 0; 3623 3623 }
+15 -19
drivers/scsi/qla2xxx/qla_nvme.c
··· 170 170 qla2xxx_rel_qpair_sp(sp->qpair, sp); 171 171 } 172 172 173 - static void qla_nvme_ls_unmap(struct srb *sp, struct nvmefc_ls_req *fd) 174 - { 175 - if (sp->flags & SRB_DMA_VALID) { 176 - struct srb_iocb *nvme = &sp->u.iocb_cmd; 177 - struct qla_hw_data *ha = sp->fcport->vha->hw; 178 - 179 - dma_unmap_single(&ha->pdev->dev, nvme->u.nvme.cmd_dma, 180 - fd->rqstlen, DMA_TO_DEVICE); 181 - sp->flags &= ~SRB_DMA_VALID; 182 - } 183 - } 184 - 185 173 static void qla_nvme_release_ls_cmd_kref(struct kref *kref) 186 174 { 187 175 struct srb *sp = container_of(kref, struct srb, cmd_kref); ··· 187 199 188 200 fd = priv->fd; 189 201 190 - qla_nvme_ls_unmap(sp, fd); 191 202 fd->done(fd, priv->comp_status); 192 203 out: 193 204 qla2x00_rel_sp(sp); ··· 352 365 nvme->u.nvme.rsp_len = fd->rsplen; 353 366 nvme->u.nvme.rsp_dma = fd->rspdma; 354 367 nvme->u.nvme.timeout_sec = fd->timeout; 355 - nvme->u.nvme.cmd_dma = dma_map_single(&ha->pdev->dev, fd->rqstaddr, 356 - fd->rqstlen, DMA_TO_DEVICE); 368 + nvme->u.nvme.cmd_dma = fd->rqstdma; 357 369 dma_sync_single_for_device(&ha->pdev->dev, nvme->u.nvme.cmd_dma, 358 370 fd->rqstlen, DMA_TO_DEVICE); 359 - 360 - sp->flags |= SRB_DMA_VALID; 361 371 362 372 rval = qla2x00_start_sp(sp); 363 373 if (rval != QLA_SUCCESS) { ··· 363 379 wake_up(&sp->nvme_ls_waitq); 364 380 sp->priv = NULL; 365 381 priv->sp = NULL; 366 - qla_nvme_ls_unmap(sp, fd); 367 382 qla2x00_rel_sp(sp); 368 383 return rval; 369 384 } ··· 428 445 goto queuing_error; 429 446 } 430 447 req_cnt = qla24xx_calc_iocbs(vha, tot_dsds); 448 + 449 + sp->iores.res_type = RESOURCE_IOCB | RESOURCE_EXCH; 450 + sp->iores.exch_cnt = 1; 451 + sp->iores.iocb_cnt = req_cnt; 452 + if (qla_get_fw_resources(sp->qpair, &sp->iores)) { 453 + rval = -EBUSY; 454 + goto queuing_error; 455 + } 456 + 431 457 if (req->cnt < (req_cnt + 2)) { 432 458 if (IS_SHADOW_REG_CAPABLE(ha)) { 433 459 cnt = *req->out_ptr; 434 460 } else { 435 461 cnt = rd_reg_dword_relaxed(req->req_q_out); 436 - if (qla2x00_check_reg16_for_disconnect(vha, cnt)) 462 + if (qla2x00_check_reg16_for_disconnect(vha, cnt)) { 463 + rval = -EBUSY; 437 464 goto queuing_error; 465 + } 438 466 } 439 467 440 468 if (req->ring_index < cnt) ··· 594 600 qla24xx_process_response_queue(vha, rsp); 595 601 596 602 queuing_error: 603 + if (rval) 604 + qla_put_fw_resources(sp->qpair, &sp->iores); 597 605 spin_unlock_irqrestore(&qpair->qp_lock, flags); 598 606 599 607 return rval;
+6 -3
drivers/scsi/qla2xxx/qla_os.c
··· 7094 7094 } 7095 7095 } 7096 7096 loop_resync_check: 7097 - if (test_and_clear_bit(LOOP_RESYNC_NEEDED, 7097 + if (!qla2x00_reset_active(base_vha) && 7098 + test_and_clear_bit(LOOP_RESYNC_NEEDED, 7098 7099 &base_vha->dpc_flags)) { 7099 - 7100 + /* 7101 + * Allow abort_isp to complete before moving on to scanning. 7102 + */ 7100 7103 ql_dbg(ql_dbg_dpc, base_vha, 0x400f, 7101 7104 "Loop resync scheduled.\n"); 7102 7105 ··· 7450 7447 7451 7448 /* if the loop has been down for 4 minutes, reinit adapter */ 7452 7449 if (atomic_dec_and_test(&vha->loop_down_timer) != 0) { 7453 - if (!(vha->device_flags & DFLG_NO_CABLE)) { 7450 + if (!(vha->device_flags & DFLG_NO_CABLE) && !vha->vp_idx) { 7454 7451 ql_log(ql_log_warn, vha, 0x6009, 7455 7452 "Loop down - aborting ISP.\n"); 7456 7453
+3 -3
drivers/scsi/qla2xxx/qla_version.h
··· 6 6 /* 7 7 * Driver version 8 8 */ 9 - #define QLA2XXX_VERSION "10.02.07.900-k" 9 + #define QLA2XXX_VERSION "10.02.08.100-k" 10 10 11 11 #define QLA_DRIVER_MAJOR_VER 10 12 12 #define QLA_DRIVER_MINOR_VER 2 13 - #define QLA_DRIVER_PATCH_VER 7 14 - #define QLA_DRIVER_BETA_VER 900 13 + #define QLA_DRIVER_PATCH_VER 8 14 + #define QLA_DRIVER_BETA_VER 100