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 tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6

SCSI fixes on 20120224:
"This is a set of assorted bug fixes for power management, mpt2sas,
ipr, the rdac device handler and quite a big chunk for qla2xxx (plus a
use after free of scsi_host in scsi_scan.c). "

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
[SCSI] scsi_dh_rdac: Fix for unbalanced reference count
[SCSI] scsi_pm: Fix bug in the SCSI power management handler
[SCSI] scsi_scan: Fix 'Poison overwritten' warning caused by using freed 'shost'
[SCSI] qla2xxx: Update version number to 8.03.07.13-k.
[SCSI] qla2xxx: Proper detection of firmware abort error code for ISP82xx.
[SCSI] qla2xxx: Remove resetting memory during device initialization for ISP82xx.
[SCSI] qla2xxx: Complete mailbox command timedout to avoid initialization failures during next reset cycle.
[SCSI] qla2xxx: Remove check for null fcport from host reset handler.
[SCSI] qla2xxx: Correct out of bounds read of ISP2200 mailbox registers.
[SCSI] qla2xxx: Remove errant clearing of MBX_INTERRUPT flag during CT-IOCB processing.
[SCSI] qla2xxx: Clear options-flags while issuing stop-firmware mbx command.
[SCSI] qla2xxx: Add an "is reset active" helper.
[SCSI] qla2xxx: Add check for null fcport references in qla2xxx_queuecommand.
[SCSI] qla2xxx: Propagate up abort failures.
[SCSI] isci: Fix NULL ptr dereference when no firmware is being loaded
[SCSI] ipr: fix eeh recovery for 64-bit adapters
[SCSI] mpt2sas: Fix mismatch in mpt2sas_base_hard_reset_handler() mutex lock-unlock

+101 -100
+14 -11
drivers/scsi/device_handler/scsi_dh_rdac.c
··· 364 364 struct rdac_controller *ctlr; 365 365 ctlr = container_of(kref, struct rdac_controller, kref); 366 366 367 - flush_workqueue(kmpath_rdacd); 368 - spin_lock(&list_lock); 369 367 list_del(&ctlr->node); 370 - spin_unlock(&list_lock); 371 368 kfree(ctlr); 372 369 } 373 370 ··· 373 376 { 374 377 struct rdac_controller *ctlr, *tmp; 375 378 376 - spin_lock(&list_lock); 377 - 378 379 list_for_each_entry(tmp, &ctlr_list, node) { 379 380 if ((memcmp(tmp->array_id, array_id, UNIQUE_ID_LEN) == 0) && 380 381 (tmp->index == index) && 381 382 (tmp->host == sdev->host)) { 382 383 kref_get(&tmp->kref); 383 - spin_unlock(&list_lock); 384 384 return tmp; 385 385 } 386 386 } 387 387 ctlr = kmalloc(sizeof(*ctlr), GFP_ATOMIC); 388 388 if (!ctlr) 389 - goto done; 389 + return NULL; 390 390 391 391 /* initialize fields of controller */ 392 392 memcpy(ctlr->array_id, array_id, UNIQUE_ID_LEN); ··· 399 405 INIT_WORK(&ctlr->ms_work, send_mode_select); 400 406 INIT_LIST_HEAD(&ctlr->ms_head); 401 407 list_add(&ctlr->node, &ctlr_list); 402 - done: 403 - spin_unlock(&list_lock); 408 + 404 409 return ctlr; 405 410 } 406 411 ··· 510 517 index = 0; 511 518 else 512 519 index = 1; 520 + 521 + spin_lock(&list_lock); 513 522 h->ctlr = get_controller(index, array_name, array_id, sdev); 514 523 if (!h->ctlr) 515 524 err = SCSI_DH_RES_TEMP_UNAVAIL; 525 + spin_unlock(&list_lock); 516 526 } 517 527 return err; 518 528 } ··· 902 906 return 0; 903 907 904 908 clean_ctlr: 909 + spin_lock(&list_lock); 905 910 kref_put(&h->ctlr->kref, release_controller); 911 + spin_unlock(&list_lock); 906 912 907 913 failed: 908 914 kfree(scsi_dh_data); ··· 919 921 struct rdac_dh_data *h; 920 922 unsigned long flags; 921 923 922 - spin_lock_irqsave(sdev->request_queue->queue_lock, flags); 923 924 scsi_dh_data = sdev->scsi_dh_data; 925 + h = (struct rdac_dh_data *) scsi_dh_data->buf; 926 + if (h->ctlr && h->ctlr->ms_queued) 927 + flush_workqueue(kmpath_rdacd); 928 + 929 + spin_lock_irqsave(sdev->request_queue->queue_lock, flags); 924 930 sdev->scsi_dh_data = NULL; 925 931 spin_unlock_irqrestore(sdev->request_queue->queue_lock, flags); 926 932 927 - h = (struct rdac_dh_data *) scsi_dh_data->buf; 933 + spin_lock(&list_lock); 928 934 if (h->ctlr) 929 935 kref_put(&h->ctlr->kref, release_controller); 936 + spin_unlock(&list_lock); 930 937 kfree(scsi_dh_data); 931 938 module_put(THIS_MODULE); 932 939 sdev_printk(KERN_NOTICE, sdev, "%s: Detached\n", RDAC_NAME);
+18 -6
drivers/scsi/ipr.c
··· 4613 4613 ENTER; 4614 4614 ioa_cfg = (struct ipr_ioa_cfg *) scsi_cmd->device->host->hostdata; 4615 4615 4616 - dev_err(&ioa_cfg->pdev->dev, 4617 - "Adapter being reset as a result of error recovery.\n"); 4616 + if (!ioa_cfg->in_reset_reload) { 4617 + dev_err(&ioa_cfg->pdev->dev, 4618 + "Adapter being reset as a result of error recovery.\n"); 4618 4619 4619 - if (WAIT_FOR_DUMP == ioa_cfg->sdt_state) 4620 - ioa_cfg->sdt_state = GET_DUMP; 4620 + if (WAIT_FOR_DUMP == ioa_cfg->sdt_state) 4621 + ioa_cfg->sdt_state = GET_DUMP; 4622 + } 4621 4623 4622 4624 rc = ipr_reset_reload(ioa_cfg, IPR_SHUTDOWN_ABBREV); 4623 4625 ··· 4909 4907 struct ipr_ioa_cfg *ioa_cfg; 4910 4908 struct ipr_resource_entry *res; 4911 4909 struct ipr_cmd_pkt *cmd_pkt; 4912 - u32 ioasc; 4910 + u32 ioasc, int_reg; 4913 4911 int op_found = 0; 4914 4912 4915 4913 ENTER; ··· 4922 4920 */ 4923 4921 if (ioa_cfg->in_reset_reload || ioa_cfg->ioa_is_dead) 4924 4922 return FAILED; 4925 - if (!res || !ipr_is_gscsi(res)) 4923 + if (!res) 4924 + return FAILED; 4925 + 4926 + /* 4927 + * If we are aborting a timed out op, chances are that the timeout was caused 4928 + * by a still not detected EEH error. In such cases, reading a register will 4929 + * trigger the EEH recovery infrastructure. 4930 + */ 4931 + int_reg = readl(ioa_cfg->regs.sense_interrupt_reg); 4932 + 4933 + if (!ipr_is_gscsi(res)) 4926 4934 return FAILED; 4927 4935 4928 4936 list_for_each_entry(ipr_cmd, &ioa_cfg->pending_q, queue) {
+3 -1
drivers/scsi/isci/host.c
··· 1848 1848 if (state == SCIC_RESET || 1849 1849 state == SCIC_INITIALIZING || 1850 1850 state == SCIC_INITIALIZED) { 1851 + u8 oem_version = pci_info->orom ? pci_info->orom->hdr.version : 1852 + ISCI_ROM_VER_1_0; 1851 1853 1852 1854 if (sci_oem_parameters_validate(&ihost->oem_parameters, 1853 - pci_info->orom->hdr.version)) 1855 + oem_version)) 1854 1856 return SCI_FAILURE_INVALID_PARAMETER_VALUE; 1855 1857 1856 1858 return SCI_SUCCESS;
+2 -1
drivers/scsi/mpt2sas/mpt2sas_base.c
··· 4548 4548 printk(MPT2SAS_ERR_FMT "%s: pci error recovery reset\n", 4549 4549 ioc->name, __func__); 4550 4550 r = 0; 4551 - goto out; 4551 + goto out_unlocked; 4552 4552 } 4553 4553 4554 4554 if (mpt2sas_fwfault_debug) ··· 4604 4604 spin_unlock_irqrestore(&ioc->ioc_reset_in_progress_lock, flags); 4605 4605 mutex_unlock(&ioc->reset_in_progress_mutex); 4606 4606 4607 + out_unlocked: 4607 4608 dtmprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: exit\n", ioc->name, 4608 4609 __func__)); 4609 4610 return r;
+4 -9
drivers/scsi/qla2xxx/qla_attr.c
··· 1036 1036 vha->device_flags & DFLG_NO_CABLE) 1037 1037 len = snprintf(buf, PAGE_SIZE, "Link Down\n"); 1038 1038 else if (atomic_read(&vha->loop_state) != LOOP_READY || 1039 - test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || 1040 - test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags)) 1039 + qla2x00_reset_active(vha)) 1041 1040 len = snprintf(buf, PAGE_SIZE, "Unknown Link State\n"); 1042 1041 else { 1043 1042 len = snprintf(buf, PAGE_SIZE, "Link Up - "); ··· 1358 1359 return snprintf(buf, PAGE_SIZE, "\n"); 1359 1360 1360 1361 temp = frac = 0; 1361 - if (test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || 1362 - test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags)) 1362 + if (qla2x00_reset_active(vha)) 1363 1363 ql_log(ql_log_warn, vha, 0x707b, 1364 1364 "ISP reset active.\n"); 1365 1365 else if (!vha->hw->flags.eeh_busy) ··· 1377 1379 int rval = QLA_FUNCTION_FAILED; 1378 1380 uint16_t state[5]; 1379 1381 1380 - if (test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || 1381 - test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags)) 1382 + if (qla2x00_reset_active(vha)) 1382 1383 ql_log(ql_log_warn, vha, 0x707c, 1383 1384 "ISP reset active.\n"); 1384 1385 else if (!vha->hw->flags.eeh_busy) ··· 1690 1693 if (IS_FWI2_CAPABLE(ha)) { 1691 1694 rval = qla24xx_get_isp_stats(base_vha, stats, stats_dma); 1692 1695 } else if (atomic_read(&base_vha->loop_state) == LOOP_READY && 1693 - !test_bit(ABORT_ISP_ACTIVE, &base_vha->dpc_flags) && 1694 - !test_bit(ISP_ABORT_NEEDED, &base_vha->dpc_flags) && 1695 - !ha->dpc_active) { 1696 + !qla2x00_reset_active(vha) && !ha->dpc_active) { 1696 1697 /* Must be in a 'READY' state for statistics retrieval. */ 1697 1698 rval = qla2x00_get_link_status(base_vha, base_vha->loop_id, 1698 1699 stats, stats_dma);
+9 -41
drivers/scsi/qla2xxx/qla_bsg.c
··· 108 108 goto exit_fcp_prio_cfg; 109 109 } 110 110 111 - if (test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) || 112 - test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || 113 - test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) { 114 - ret = -EBUSY; 115 - goto exit_fcp_prio_cfg; 116 - } 117 - 118 111 /* Get the sub command */ 119 112 oper = bsg_job->request->rqst_data.h_vendor.vendor_cmd[1]; 120 113 ··· 639 646 dma_addr_t rsp_data_dma; 640 647 uint32_t rsp_data_len; 641 648 642 - if (test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) || 643 - test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || 644 - test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) { 645 - ql_log(ql_log_warn, vha, 0x7018, "Abort active or needed.\n"); 646 - return -EBUSY; 647 - } 648 - 649 649 if (!vha->flags.online) { 650 650 ql_log(ql_log_warn, vha, 0x7019, "Host is not online.\n"); 651 651 return -EIO; ··· 860 874 int rval = 0; 861 875 uint32_t flag; 862 876 863 - if (test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) || 864 - test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || 865 - test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) { 866 - ql_log(ql_log_warn, vha, 0x702e, "Abort active or needed.\n"); 867 - return -EBUSY; 868 - } 869 - 870 877 if (!IS_QLA84XX(ha)) { 871 878 ql_dbg(ql_dbg_user, vha, 0x702f, "Not 84xx, exiting.\n"); 872 879 return -EINVAL; ··· 900 921 uint16_t options; 901 922 uint32_t flag; 902 923 uint32_t fw_ver; 903 - 904 - if (test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) || 905 - test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || 906 - test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) 907 - return -EBUSY; 908 924 909 925 if (!IS_QLA84XX(ha)) { 910 926 ql_dbg(ql_dbg_user, vha, 0x7032, ··· 1009 1035 uint32_t sg_cnt; 1010 1036 uint32_t data_len = 0; 1011 1037 uint32_t dma_direction = DMA_NONE; 1012 - 1013 - if (test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) || 1014 - test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || 1015 - test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) { 1016 - ql_log(ql_log_warn, vha, 0x7039, 1017 - "Abort active or needed.\n"); 1018 - return -EBUSY; 1019 - } 1020 1038 1021 1039 if (!IS_QLA84XX(ha)) { 1022 1040 ql_log(ql_log_warn, vha, 0x703a, ··· 1211 1245 uint8_t *rsp_ptr = NULL; 1212 1246 1213 1247 bsg_job->reply->reply_payload_rcv_len = 0; 1214 - 1215 - if (test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) || 1216 - test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || 1217 - test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) { 1218 - ql_log(ql_log_warn, vha, 0x7045, "abort active or needed.\n"); 1219 - return -EBUSY; 1220 - } 1221 1248 1222 1249 if (!IS_IIDMA_CAPABLE(vha->hw)) { 1223 1250 ql_log(ql_log_info, vha, 0x7046, "iiDMA not supported.\n"); ··· 1625 1666 } else { 1626 1667 host = bsg_job->shost; 1627 1668 vha = shost_priv(host); 1669 + } 1670 + 1671 + if (qla2x00_reset_active(vha)) { 1672 + ql_dbg(ql_dbg_user, vha, 0x709f, 1673 + "BSG: ISP abort active/needed -- cmd=%d.\n", 1674 + bsg_job->request->msgcode); 1675 + bsg_job->reply->result = (DID_ERROR << 16); 1676 + bsg_job->job_done(bsg_job); 1677 + return -EBUSY; 1628 1678 } 1629 1679 1630 1680 ql_dbg(ql_dbg_user, vha, 0x7000,
+2 -1
drivers/scsi/qla2xxx/qla_dbg.c
··· 19 19 * | DPC Thread | 0x401c | | 20 20 * | Async Events | 0x5057 | 0x5052 | 21 21 * | Timer Routines | 0x6011 | 0x600e,0x600f | 22 - * | User Space Interactions | 0x709e | | 22 + * | User Space Interactions | 0x709e | 0x7018,0x702e | 23 + * | | | 0x7039,0x7045 | 23 24 * | Task Management | 0x803c | 0x8025-0x8026 | 24 25 * | | | 0x800b,0x8039 | 25 26 * | AER/EEH | 0x900f | |
+1
drivers/scsi/qla2xxx/qla_def.h
··· 44 44 * ISP2100 HBAs. 45 45 */ 46 46 #define MAILBOX_REGISTER_COUNT_2100 8 47 + #define MAILBOX_REGISTER_COUNT_2200 24 47 48 #define MAILBOX_REGISTER_COUNT 32 48 49 49 50 #define QLA2200A_RISC_ROM_VER 4
+13
drivers/scsi/qla2xxx/qla_inline.h
··· 131 131 } 132 132 return 0; 133 133 } 134 + 135 + static inline int 136 + qla2x00_reset_active(scsi_qla_host_t *vha) 137 + { 138 + scsi_qla_host_t *base_vha = pci_get_drvdata(vha->hw->pdev); 139 + 140 + /* Test appropriate base-vha and vha flags. */ 141 + return test_bit(ISP_ABORT_NEEDED, &base_vha->dpc_flags) || 142 + test_bit(ABORT_ISP_ACTIVE, &base_vha->dpc_flags) || 143 + test_bit(ISP_ABORT_RETRY, &base_vha->dpc_flags) || 144 + test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) || 145 + test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags); 146 + }
-1
drivers/scsi/qla2xxx/qla_isr.c
··· 2090 2090 break; 2091 2091 case CT_IOCB_TYPE: 2092 2092 qla24xx_els_ct_entry(vha, rsp->req, pkt, CT_IOCB_TYPE); 2093 - clear_bit(MBX_INTERRUPT, &vha->hw->mbx_cmd_flags); 2094 2093 break; 2095 2094 case ELS_IOCB_TYPE: 2096 2095 qla24xx_els_ct_entry(vha, rsp->req, pkt, ELS_IOCB_TYPE);
+6 -1
drivers/scsi/qla2xxx/qla_mbx.c
··· 342 342 343 343 set_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags); 344 344 clear_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); 345 + /* Allow next mbx cmd to come in. */ 346 + complete(&ha->mbx_cmd_comp); 345 347 if (ha->isp_ops->abort_isp(vha)) { 346 348 /* Failed. retry later. */ 347 349 set_bit(ISP_ABORT_NEEDED, ··· 352 350 clear_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags); 353 351 ql_dbg(ql_dbg_mbx, base_vha, 0x101f, 354 352 "Finished abort_isp.\n"); 353 + goto mbx_done; 355 354 } 356 355 } 357 356 } ··· 361 358 /* Allow next mbx cmd to come in. */ 362 359 complete(&ha->mbx_cmd_comp); 363 360 361 + mbx_done: 364 362 if (rval) { 365 363 ql_dbg(ql_dbg_mbx, base_vha, 0x1020, 366 364 "**** Failed mbx[0]=%x, mb[1]=%x, mb[2]=%x, cmd=%x ****.\n", ··· 2585 2581 ql_dbg(ql_dbg_mbx, vha, 0x10a1, "Entered %s.\n", __func__); 2586 2582 2587 2583 mcp->mb[0] = MBC_STOP_FIRMWARE; 2588 - mcp->out_mb = MBX_0; 2584 + mcp->mb[1] = 0; 2585 + mcp->out_mb = MBX_1|MBX_0; 2589 2586 mcp->in_mb = MBX_0; 2590 2587 mcp->tov = 5; 2591 2588 mcp->flags = 0;
+1 -14
drivers/scsi/qla2xxx/qla_nx.c
··· 1165 1165 qla82xx_wr_32(ha, QLA82XX_ROMUSB_GLB_SW_RESET, 0xfeffffff); 1166 1166 else 1167 1167 qla82xx_wr_32(ha, QLA82XX_ROMUSB_GLB_SW_RESET, 0xffffffff); 1168 - 1169 - /* reset ms */ 1170 - val = qla82xx_rd_32(ha, QLA82XX_CRB_QDR_NET + 0xe4); 1171 - val |= (1 << 1); 1172 - qla82xx_wr_32(ha, QLA82XX_CRB_QDR_NET + 0xe4, val); 1173 - msleep(20); 1174 - 1175 - /* unreset ms */ 1176 - val = qla82xx_rd_32(ha, QLA82XX_CRB_QDR_NET + 0xe4); 1177 - val &= ~(1 << 1); 1178 - qla82xx_wr_32(ha, QLA82XX_CRB_QDR_NET + 0xe4, val); 1179 - msleep(20); 1180 - 1181 1168 qla82xx_rom_unlock(ha); 1182 1169 1183 1170 /* Read the signature value from the flash. ··· 3379 3392 QLA82XX_CRB_PEG_NET_3 + 0x3c), 3380 3393 qla82xx_rd_32(ha, 3381 3394 QLA82XX_CRB_PEG_NET_4 + 0x3c)); 3382 - if (LSW(MSB(halt_status)) == 0x67) 3395 + if (((halt_status & 0x1fffff00) >> 8) == 0x67) 3383 3396 ql_log(ql_log_warn, vha, 0xb052, 3384 3397 "Firmware aborted with " 3385 3398 "error code 0x00006700. Device is "
+8 -11
drivers/scsi/qla2xxx/qla_os.c
··· 625 625 cmd->result = DID_NO_CONNECT << 16; 626 626 goto qc24_fail_command; 627 627 } 628 + 629 + if (!fcport) { 630 + cmd->result = DID_NO_CONNECT << 16; 631 + goto qc24_fail_command; 632 + } 633 + 628 634 if (atomic_read(&fcport->state) != FCS_ONLINE) { 629 635 if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD || 630 636 atomic_read(&base_vha->loop_state) == LOOP_DEAD) { ··· 883 877 884 878 spin_unlock_irqrestore(&ha->hardware_lock, flags); 885 879 if (ha->isp_ops->abort_command(sp)) { 880 + ret = FAILED; 886 881 ql_dbg(ql_dbg_taskm, vha, 0x8003, 887 882 "Abort command mbx failed cmd=%p.\n", cmd); 888 883 } else { ··· 1131 1124 qla2xxx_eh_host_reset(struct scsi_cmnd *cmd) 1132 1125 { 1133 1126 scsi_qla_host_t *vha = shost_priv(cmd->device->host); 1134 - fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; 1135 1127 struct qla_hw_data *ha = vha->hw; 1136 1128 int ret = FAILED; 1137 1129 unsigned int id, lun; ··· 1138 1132 1139 1133 id = cmd->device->id; 1140 1134 lun = cmd->device->lun; 1141 - 1142 - if (!fcport) { 1143 - return ret; 1144 - } 1145 - 1146 - ret = fc_block_scsi_eh(cmd); 1147 - if (ret != 0) 1148 - return ret; 1149 - ret = FAILED; 1150 1135 1151 1136 ql_log(ql_log_info, vha, 0x8018, 1152 1137 "ADAPTER RESET ISSUED nexus=%ld:%d:%d.\n", vha->host_no, id, lun); ··· 2044 2047 ha->nvram_data_off = ~0; 2045 2048 ha->isp_ops = &qla2100_isp_ops; 2046 2049 } else if (IS_QLA2200(ha)) { 2047 - ha->mbx_count = MAILBOX_REGISTER_COUNT; 2050 + ha->mbx_count = MAILBOX_REGISTER_COUNT_2200; 2048 2051 req_length = REQUEST_ENTRY_CNT_2200; 2049 2052 rsp_length = RESPONSE_ENTRY_CNT_2100; 2050 2053 ha->max_loop_id = SNS_LAST_LOOP_ID_2100;
+1 -1
drivers/scsi/qla2xxx/qla_version.h
··· 7 7 /* 8 8 * Driver version 9 9 */ 10 - #define QLA2XXX_VERSION "8.03.07.12-k" 10 + #define QLA2XXX_VERSION "8.03.07.13-k" 11 11 12 12 #define QLA_DRIVER_MAJOR_VER 8 13 13 #define QLA_DRIVER_MINOR_VER 3
+16
drivers/scsi/scsi_pm.c
··· 7 7 8 8 #include <linux/pm_runtime.h> 9 9 #include <linux/export.h> 10 + #include <linux/async.h> 10 11 11 12 #include <scsi/scsi.h> 12 13 #include <scsi/scsi_device.h> ··· 93 92 return err; 94 93 } 95 94 95 + static int scsi_bus_prepare(struct device *dev) 96 + { 97 + if (scsi_is_sdev_device(dev)) { 98 + /* sd probing uses async_schedule. Wait until it finishes. */ 99 + async_synchronize_full(); 100 + 101 + } else if (scsi_is_host_device(dev)) { 102 + /* Wait until async scanning is finished */ 103 + scsi_complete_async_scans(); 104 + } 105 + return 0; 106 + } 107 + 96 108 static int scsi_bus_suspend(struct device *dev) 97 109 { 98 110 return scsi_bus_suspend_common(dev, PMSG_SUSPEND); ··· 124 110 #else /* CONFIG_PM_SLEEP */ 125 111 126 112 #define scsi_bus_resume_common NULL 113 + #define scsi_bus_prepare NULL 127 114 #define scsi_bus_suspend NULL 128 115 #define scsi_bus_freeze NULL 129 116 #define scsi_bus_poweroff NULL ··· 233 218 #endif /* CONFIG_PM_RUNTIME */ 234 219 235 220 const struct dev_pm_ops scsi_bus_pm_ops = { 221 + .prepare = scsi_bus_prepare, 236 222 .suspend = scsi_bus_suspend, 237 223 .resume = scsi_bus_resume_common, 238 224 .freeze = scsi_bus_freeze,
+1
drivers/scsi/scsi_priv.h
··· 109 109 #endif /* CONFIG_PROC_FS */ 110 110 111 111 /* scsi_scan.c */ 112 + extern int scsi_complete_async_scans(void); 112 113 extern int scsi_scan_host_selected(struct Scsi_Host *, unsigned int, 113 114 unsigned int, unsigned int, int); 114 115 extern void scsi_forget_host(struct Scsi_Host *);
+2 -2
drivers/scsi/scsi_scan.c
··· 1815 1815 } 1816 1816 spin_unlock(&async_scan_lock); 1817 1817 1818 + scsi_autopm_put_host(shost); 1818 1819 scsi_host_put(shost); 1819 1820 kfree(data); 1820 1821 } ··· 1842 1841 1843 1842 do_scsi_scan_host(shost); 1844 1843 scsi_finish_async_scan(data); 1845 - scsi_autopm_put_host(shost); 1846 1844 return 0; 1847 1845 } 1848 1846 ··· 1869 1869 p = kthread_run(do_scan_async, data, "scsi_scan_%d", shost->host_no); 1870 1870 if (IS_ERR(p)) 1871 1871 do_scan_async(data); 1872 - /* scsi_autopm_put_host(shost) is called in do_scan_async() */ 1872 + /* scsi_autopm_put_host(shost) is called in scsi_finish_async_scan() */ 1873 1873 } 1874 1874 EXPORT_SYMBOL(scsi_scan_host); 1875 1875