Lines Matching refs:scm

111  * @scm: SCSI module
118 csio_scsi_gather_active_ios(struct csio_scsim *scm,
124 if (list_empty(&scm->active_q))
129 list_splice_tail_init(&scm->active_q, dest);
133 list_for_each_safe(tmp, next, &scm->active_q) {
776 struct csio_scsim *scm = csio_hw_to_scsim(hw);
781 CSIO_DEC_STATS(scm, n_active);
834 CSIO_DEC_STATS(scm, n_active);
848 struct csio_scsim *scm = csio_hw_to_scsim(hw);
852 CSIO_DEC_STATS(scm, n_tm_active);
877 CSIO_DEC_STATS(scm, n_tm_active);
891 struct csio_scsim *scm = csio_hw_to_scsim(hw);
911 CSIO_INC_STATS(scm, n_abrt_dups);
957 CSIO_DEC_STATS(scm, n_active);
964 CSIO_DEC_STATS(scm, n_active);
988 struct csio_scsim *scm = csio_hw_to_scsim(hw);
1028 CSIO_DEC_STATS(scm, n_active);
1038 CSIO_DEC_STATS(scm, n_active);
1109 struct csio_scsim *scm = csio_hw_to_scsim(hw);
1117 CSIO_INC_STATS(scm, n_inval_cplop);
1147 CSIO_INC_STATS(scm, n_inval_scsiop);
1153 * @scm: SCSI module.
1159 csio_scsi_cleanup_io_q(struct csio_scsim *scm, struct list_head *q)
1161 struct csio_hw *hw = scm->hw;
1181 spin_lock_irq(&scm->freelist_lock);
1182 csio_put_scsi_ioreq(scm, ioreq);
1183 spin_unlock_irq(&scm->freelist_lock);
1218 * @scm: SCSI module.
1233 csio_scsi_abort_io_q(struct csio_scsim *scm, struct list_head *q, uint32_t tmo)
1235 struct csio_hw *hw = scm->hw;
1267 * @scm: SCSI module.
1273 csio_scsim_cleanup_io(struct csio_scsim *scm, bool abort)
1275 struct csio_hw *hw = scm->hw;
1280 if (list_empty(&scm->active_q))
1284 while (!list_empty(&scm->active_q) && count--) {
1291 if (list_empty(&scm->active_q))
1296 rv = csio_scsi_abort_io_q(scm, &scm->active_q, 30000);
1302 csio_scsi_cleanup_io_q(scm, &scm->active_q);
1304 CSIO_DB_ASSERT(list_empty(&scm->active_q));
1311 * @scm: SCSI module.
1318 csio_scsim_cleanup_io_lnode(struct csio_scsim *scm, struct csio_lnode *ln)
1320 struct csio_hw *hw = scm->hw;
1330 csio_scsi_gather_active_ios(scm, &sld, &ln->cmpl_q);
1350 rv = csio_scsi_abort_io_q(scm, &ln->cmpl_q, 30000);
1353 csio_scsi_cleanup_io_q(scm, &ln->cmpl_q);
1565 struct csio_scsim *scm = csio_hw_to_scsim(hw);
1581 CSIO_INC_STATS(scm, n_hosterror);
1607 CSIO_INC_STATS(scm, n_autosense);
1625 CSIO_INC_STATS(scm, n_rsperror);
1634 CSIO_INC_STATS(scm, n_ovflerror);
1645 CSIO_INC_STATS(scm, n_unflerror);
1661 CSIO_INC_STATS(scm, n_closed);
1663 CSIO_INC_STATS(scm, n_aborted);
1671 CSIO_INC_STATS(scm, n_abrt_timedout);
1681 CSIO_INC_STATS(scm, n_rdev_nr_error);
1686 CSIO_INC_STATS(scm, n_rdev_lost_error);
1691 CSIO_INC_STATS(scm, n_rdev_logo_error);
1700 CSIO_INC_STATS(scm, n_link_down_error);
1705 CSIO_INC_STATS(scm, n_no_xchg_error);
1714 CSIO_INC_STATS(scm, n_unknown_error);
2311 * @scm: SCSI Module
2321 csio_scsi_alloc_ddp_bufs(struct csio_scsim *scm, struct csio_hw *hw,
2335 INIT_LIST_HEAD(&scm->ddp_freelist);
2348 scm->stats.n_free_ddp);
2366 list_add_tail(&ddp_desc->list, &scm->ddp_freelist);
2367 CSIO_INC_STATS(scm, n_free_ddp);
2373 list_for_each(tmp, &scm->ddp_freelist) {
2381 scm->stats.n_free_ddp = 0;
2388 * @scm: SCSI Module
2394 csio_scsi_free_ddp_bufs(struct csio_scsim *scm, struct csio_hw *hw)
2400 list_for_each(tmp, &scm->ddp_freelist) {
2408 scm->stats.n_free_ddp = 0;
2413 * @scm: SCSI Module
2418 csio_scsim_init(struct csio_scsim *scm, struct csio_hw *hw)
2424 INIT_LIST_HEAD(&scm->active_q);
2425 scm->hw = hw;
2427 scm->proto_cmd_len = sizeof(struct fcp_cmnd);
2428 scm->proto_rsp_len = CSIO_SCSI_RSP_LEN;
2429 scm->max_sge = CSIO_SCSI_MAX_SGE;
2431 spin_lock_init(&scm->freelist_lock);
2434 INIT_LIST_HEAD(&scm->ioreq_freelist);
2442 scm->stats.n_free_ioreq);
2459 dma_buf->len = scm->proto_rsp_len;
2466 list_add_tail(&ioreq->sm.sm_list, &scm->ioreq_freelist);
2467 CSIO_INC_STATS(scm, n_free_ioreq);
2470 if (csio_scsi_alloc_ddp_bufs(scm, hw, PAGE_SIZE, csio_ddp_descs))
2480 while (!list_empty(&scm->ioreq_freelist)) {
2483 tmp = list_first_entry(&scm->ioreq_freelist,
2495 scm->stats.n_free_ioreq = 0;
2502 * @scm: SCSI Module
2506 csio_scsim_exit(struct csio_scsim *scm)
2511 while (!list_empty(&scm->ioreq_freelist)) {
2514 tmp = list_first_entry(&scm->ioreq_freelist,
2520 dma_pool_free(scm->hw->scsi_dma_pool, dma_buf->vaddr,
2526 scm->stats.n_free_ioreq = 0;
2528 csio_scsi_free_ddp_bufs(scm, scm->hw);