snic 285 drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c struct nicvf *snic; snic 287 drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c snic = nic->snicvf[sqs]; snic 288 drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c if (!snic) snic 291 drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c (snic->qs->rq_cnt + snic->qs->sq_cnt); snic 780 drivers/net/ethernet/cavium/thunder/nicvf_main.c struct nicvf *snic = nic; snic 802 drivers/net/ethernet/cavium/thunder/nicvf_main.c if (nicvf_xdp_rx(snic, nic->xdp_prog, cqe_rx, sq, rq, &skb)) snic 805 drivers/net/ethernet/cavium/thunder/nicvf_main.c skb = nicvf_get_rcv_skb(snic, cqe_rx, snic 1259 drivers/net/ethernet/cavium/thunder/nicvf_main.c struct nicvf *snic; snic 1276 drivers/net/ethernet/cavium/thunder/nicvf_main.c snic = nic; snic 1280 drivers/net/ethernet/cavium/thunder/nicvf_main.c snic = (struct nicvf *)nic->snicvf[tmp - 1]; snic 1281 drivers/net/ethernet/cavium/thunder/nicvf_main.c if (!snic) { snic 1291 drivers/net/ethernet/cavium/thunder/nicvf_main.c sq = &snic->qs->sq[qid]; snic 1293 drivers/net/ethernet/cavium/thunder/nicvf_main.c !nicvf_sq_append_skb(snic, sq, skb, qid)) { snic 384 drivers/scsi/snic/snic.h void snic_shutdown_scsi_cleanup(struct snic *); snic 387 drivers/scsi/snic/snic.h int snic_request_intr(struct snic *); snic 388 drivers/scsi/snic/snic.h void snic_free_intr(struct snic *); snic 389 drivers/scsi/snic/snic.h int snic_set_intr_mode(struct snic *); snic 390 drivers/scsi/snic/snic.h void snic_clear_intr_mode(struct snic *); snic 392 drivers/scsi/snic/snic.h int snic_fwcq_cmpl_handler(struct snic *, int); snic 393 drivers/scsi/snic/snic.h int snic_wq_cmpl_handler(struct snic *, int); snic 397 drivers/scsi/snic/snic.h void snic_log_q_error(struct snic *); snic 398 drivers/scsi/snic/snic.h void snic_handle_link_event(struct snic *); snic 401 drivers/scsi/snic/snic.h int snic_queue_exch_ver_req(struct snic *); snic 402 drivers/scsi/snic/snic.h int snic_io_exch_ver_cmpl_handler(struct snic *, struct snic_fw_req *); snic 404 drivers/scsi/snic/snic.h int snic_queue_wq_desc(struct snic *, void *os_buf, u16 len); snic 406 drivers/scsi/snic/snic.h void snic_handle_untagged_req(struct snic *, struct snic_req_info *); snic 407 drivers/scsi/snic/snic.h void snic_release_untagged_req(struct snic *, struct snic_req_info *); snic 408 drivers/scsi/snic/snic.h void snic_free_all_untagged_reqs(struct snic *); snic 409 drivers/scsi/snic/snic.h int snic_get_conf(struct snic *); snic 410 drivers/scsi/snic/snic.h void snic_set_state(struct snic *, enum snic_state); snic 411 drivers/scsi/snic/snic.h int snic_get_state(struct snic *); snic 28 drivers/scsi/snic/snic_attrs.c struct snic *snic = shost_priv(class_to_shost(dev)); snic 30 drivers/scsi/snic/snic_attrs.c return snprintf(buf, PAGE_SIZE, "%s\n", snic->name); snic 38 drivers/scsi/snic/snic_attrs.c struct snic *snic = shost_priv(class_to_shost(dev)); snic 41 drivers/scsi/snic/snic_attrs.c snic_state_str[snic_get_state(snic)]); snic 57 drivers/scsi/snic/snic_attrs.c struct snic *snic = shost_priv(class_to_shost(dev)); snic 59 drivers/scsi/snic/snic_attrs.c if (snic->config.xpt_type == SNIC_DAS) snic 60 drivers/scsi/snic/snic_attrs.c snic->link_status = svnic_dev_link_status(snic->vdev); snic 63 drivers/scsi/snic/snic_attrs.c (snic->link_status) ? "Link Up" : "Link Down"); snic 40 drivers/scsi/snic/snic_ctl.c struct snic *snic = container_of(work, struct snic, link_work); snic 42 drivers/scsi/snic/snic_ctl.c if (snic->config.xpt_type == SNIC_DAS) snic 45 drivers/scsi/snic/snic_ctl.c snic->link_status = svnic_dev_link_status(snic->vdev); snic 46 drivers/scsi/snic/snic_ctl.c snic->link_down_cnt = svnic_dev_link_down_cnt(snic->vdev); snic 47 drivers/scsi/snic/snic_ctl.c SNIC_HOST_INFO(snic->shost, "Link Event: Link %s.\n", snic 48 drivers/scsi/snic/snic_ctl.c ((snic->link_status) ? "Up" : "Down")); snic 106 drivers/scsi/snic/snic_ctl.c snic_queue_exch_ver_req(struct snic *snic) snic 113 drivers/scsi/snic/snic_ctl.c SNIC_HOST_INFO(snic->shost, "Exch Ver Req Preparing...\n"); snic 115 drivers/scsi/snic/snic_ctl.c rqi = snic_req_init(snic, 0); snic 117 drivers/scsi/snic/snic_ctl.c SNIC_HOST_ERR(snic->shost, snic 129 drivers/scsi/snic/snic_ctl.c snic->config.hid, 0, (ulong)rqi); snic 134 drivers/scsi/snic/snic_ctl.c snic_handle_untagged_req(snic, rqi); snic 136 drivers/scsi/snic/snic_ctl.c ret = snic_queue_wq_desc(snic, req, sizeof(*req)); snic 138 drivers/scsi/snic/snic_ctl.c snic_release_untagged_req(snic, rqi); snic 139 drivers/scsi/snic/snic_ctl.c SNIC_HOST_ERR(snic->shost, snic 145 drivers/scsi/snic/snic_ctl.c SNIC_HOST_INFO(snic->shost, "Exch Ver Req is issued. ret = %d\n", ret); snic 155 drivers/scsi/snic/snic_ctl.c snic_io_exch_ver_cmpl_handler(struct snic *snic, struct snic_fw_req *fwreq) snic 165 drivers/scsi/snic/snic_ctl.c SNIC_HOST_INFO(snic->shost, "Exch Ver Compl Received.\n"); snic 167 drivers/scsi/snic/snic_ctl.c SNIC_BUG_ON(snic->config.hid != hid); snic 171 drivers/scsi/snic/snic_ctl.c SNIC_HOST_ERR(snic->shost, snic 178 drivers/scsi/snic/snic_ctl.c spin_lock_irqsave(&snic->snic_lock, flags); snic 179 drivers/scsi/snic/snic_ctl.c snic->fwinfo.fw_ver = le32_to_cpu(exv_cmpl->version); snic 180 drivers/scsi/snic/snic_ctl.c snic->fwinfo.hid = le32_to_cpu(exv_cmpl->hid); snic 181 drivers/scsi/snic/snic_ctl.c snic->fwinfo.max_concur_ios = le32_to_cpu(exv_cmpl->max_concur_ios); snic 182 drivers/scsi/snic/snic_ctl.c snic->fwinfo.max_sgs_per_cmd = le32_to_cpu(exv_cmpl->max_sgs_per_cmd); snic 183 drivers/scsi/snic/snic_ctl.c snic->fwinfo.max_io_sz = le32_to_cpu(exv_cmpl->max_io_sz); snic 184 drivers/scsi/snic/snic_ctl.c snic->fwinfo.max_tgts = le32_to_cpu(exv_cmpl->max_tgts); snic 185 drivers/scsi/snic/snic_ctl.c snic->fwinfo.io_tmo = le16_to_cpu(exv_cmpl->io_timeout); snic 187 drivers/scsi/snic/snic_ctl.c SNIC_HOST_INFO(snic->shost, snic 189 drivers/scsi/snic/snic_ctl.c snic->fwinfo.fw_ver, snic 190 drivers/scsi/snic/snic_ctl.c snic->fwinfo.hid, snic 191 drivers/scsi/snic/snic_ctl.c snic->fwinfo.max_concur_ios, snic 192 drivers/scsi/snic/snic_ctl.c snic->fwinfo.max_sgs_per_cmd, snic 193 drivers/scsi/snic/snic_ctl.c snic->fwinfo.max_io_sz, snic 194 drivers/scsi/snic/snic_ctl.c snic->fwinfo.max_tgts, snic 195 drivers/scsi/snic/snic_ctl.c snic->fwinfo.io_tmo); snic 197 drivers/scsi/snic/snic_ctl.c SNIC_HOST_INFO(snic->shost, snic 202 drivers/scsi/snic/snic_ctl.c max_sgs = snic->fwinfo.max_sgs_per_cmd; snic 204 drivers/scsi/snic/snic_ctl.c snic->shost->sg_tablesize = max_sgs; snic 205 drivers/scsi/snic/snic_ctl.c SNIC_HOST_INFO(snic->shost, "Max SGs set to %d\n", snic 206 drivers/scsi/snic/snic_ctl.c snic->shost->sg_tablesize); snic 207 drivers/scsi/snic/snic_ctl.c } else if (max_sgs > snic->shost->sg_tablesize) { snic 208 drivers/scsi/snic/snic_ctl.c SNIC_HOST_INFO(snic->shost, snic 210 drivers/scsi/snic/snic_ctl.c snic->config.xpt_type, max_sgs, snic 211 drivers/scsi/snic/snic_ctl.c snic->shost->sg_tablesize); snic 214 drivers/scsi/snic/snic_ctl.c if (snic->shost->can_queue > snic->fwinfo.max_concur_ios) snic 215 drivers/scsi/snic/snic_ctl.c snic->shost->can_queue = snic->fwinfo.max_concur_ios; snic 217 drivers/scsi/snic/snic_ctl.c snic->shost->max_sectors = snic->fwinfo.max_io_sz >> 9; snic 218 drivers/scsi/snic/snic_ctl.c if (snic->fwinfo.wait) snic 219 drivers/scsi/snic/snic_ctl.c complete(snic->fwinfo.wait); snic 221 drivers/scsi/snic/snic_ctl.c spin_unlock_irqrestore(&snic->snic_lock, flags); snic 224 drivers/scsi/snic/snic_ctl.c snic_release_untagged_req(snic, rqi); snic 226 drivers/scsi/snic/snic_ctl.c SNIC_HOST_INFO(snic->shost, "Exch_cmpl Done, hdr_stat %d.\n", hdr_stat); snic 237 drivers/scsi/snic/snic_ctl.c snic_get_conf(struct snic *snic) snic 244 drivers/scsi/snic/snic_ctl.c SNIC_HOST_INFO(snic->shost, "Retrieving snic params.\n"); snic 245 drivers/scsi/snic/snic_ctl.c spin_lock_irqsave(&snic->snic_lock, flags); snic 246 drivers/scsi/snic/snic_ctl.c memset(&snic->fwinfo, 0, sizeof(snic->fwinfo)); snic 247 drivers/scsi/snic/snic_ctl.c snic->fwinfo.wait = &wait; snic 248 drivers/scsi/snic/snic_ctl.c spin_unlock_irqrestore(&snic->snic_lock, flags); snic 258 drivers/scsi/snic/snic_ctl.c ret = snic_queue_exch_ver_req(snic); snic 263 drivers/scsi/snic/snic_ctl.c spin_lock_irqsave(&snic->snic_lock, flags); snic 264 drivers/scsi/snic/snic_ctl.c ret = (snic->fwinfo.fw_ver != 0) ? 0 : -ETIMEDOUT; snic 266 drivers/scsi/snic/snic_ctl.c SNIC_HOST_ERR(snic->shost, snic 271 drivers/scsi/snic/snic_ctl.c snic->fwinfo.wait = NULL; snic 273 drivers/scsi/snic/snic_ctl.c spin_unlock_irqrestore(&snic->snic_lock, flags); snic 91 drivers/scsi/snic/snic_debugfs.c struct snic *snic = (struct snic *) filp->private_data; snic 95 drivers/scsi/snic/snic_debugfs.c len = sprintf(buf, "%u\n", snic->reset_stats); snic 120 drivers/scsi/snic/snic_debugfs.c struct snic *snic = (struct snic *) filp->private_data; snic 121 drivers/scsi/snic/snic_debugfs.c struct snic_stats *stats = &snic->s_stats; snic 140 drivers/scsi/snic/snic_debugfs.c snic->reset_stats = val; snic 142 drivers/scsi/snic/snic_debugfs.c if (snic->reset_stats) { snic 147 drivers/scsi/snic/snic_debugfs.c atomic64_set(&snic->io_cmpl_skip, snic 162 drivers/scsi/snic/snic_debugfs.c SNIC_HOST_INFO(snic->shost, "Reset Op: Driver statistics.\n"); snic 181 drivers/scsi/snic/snic_debugfs.c struct snic *snic = (struct snic *) sfp->private; snic 182 drivers/scsi/snic/snic_debugfs.c struct snic_stats *stats = &snic->s_stats; snic 374 drivers/scsi/snic/snic_debugfs.c void snic_stats_debugfs_init(struct snic *snic) snic 378 drivers/scsi/snic/snic_debugfs.c snprintf(name, sizeof(name), "host%d", snic->shost->host_no); snic 380 drivers/scsi/snic/snic_debugfs.c snic->stats_host = debugfs_create_dir(name, snic_glob->stats_root); snic 382 drivers/scsi/snic/snic_debugfs.c snic->stats_file = debugfs_create_file("stats", S_IFREG|S_IRUGO, snic 383 drivers/scsi/snic/snic_debugfs.c snic->stats_host, snic, snic 386 drivers/scsi/snic/snic_debugfs.c snic->reset_stats_file = debugfs_create_file("reset_stats", snic 388 drivers/scsi/snic/snic_debugfs.c snic->stats_host, snic, snic 400 drivers/scsi/snic/snic_debugfs.c snic_stats_debugfs_remove(struct snic *snic) snic 402 drivers/scsi/snic/snic_debugfs.c debugfs_remove(snic->stats_file); snic 403 drivers/scsi/snic/snic_debugfs.c snic->stats_file = NULL; snic 405 drivers/scsi/snic/snic_debugfs.c debugfs_remove(snic->reset_stats_file); snic 406 drivers/scsi/snic/snic_debugfs.c snic->reset_stats_file = NULL; snic 408 drivers/scsi/snic/snic_debugfs.c debugfs_remove(snic->stats_host); snic 409 drivers/scsi/snic/snic_debugfs.c snic->stats_host = NULL; snic 80 drivers/scsi/snic/snic_disc.c snic_queue_report_tgt_req(struct snic *snic) snic 88 drivers/scsi/snic/snic_disc.c rqi = snic_req_init(snic, 1); snic 94 drivers/scsi/snic/snic_disc.c if (snic->fwinfo.max_tgts) snic 95 drivers/scsi/snic/snic_disc.c ntgts = min_t(u32, snic->fwinfo.max_tgts, snic->shost->max_id); snic 97 drivers/scsi/snic/snic_disc.c ntgts = snic->shost->max_id; snic 105 drivers/scsi/snic/snic_disc.c snic_req_free(snic, rqi); snic 106 drivers/scsi/snic/snic_disc.c SNIC_HOST_ERR(snic->shost, "Resp Buf Alloc Failed.\n"); snic 114 drivers/scsi/snic/snic_disc.c pa = dma_map_single(&snic->pdev->dev, buf, buf_len, DMA_FROM_DEVICE); snic 115 drivers/scsi/snic/snic_disc.c if (dma_mapping_error(&snic->pdev->dev, pa)) { snic 116 drivers/scsi/snic/snic_disc.c SNIC_HOST_ERR(snic->shost, snic 120 drivers/scsi/snic/snic_disc.c snic_req_free(snic, rqi); snic 131 drivers/scsi/snic/snic_disc.c snic->config.hid, snic 137 drivers/scsi/snic/snic_disc.c snic_handle_untagged_req(snic, rqi); snic 139 drivers/scsi/snic/snic_disc.c ret = snic_queue_wq_desc(snic, rqi->req, rqi->req_len); snic 141 drivers/scsi/snic/snic_disc.c dma_unmap_single(&snic->pdev->dev, pa, buf_len, snic 145 drivers/scsi/snic/snic_disc.c snic_release_untagged_req(snic, rqi); snic 146 drivers/scsi/snic/snic_disc.c SNIC_HOST_ERR(snic->shost, "Queuing Report Tgts Failed.\n"); snic 151 drivers/scsi/snic/snic_disc.c SNIC_DISC_DBG(snic->shost, "Report Targets Issued.\n"); snic 156 drivers/scsi/snic/snic_disc.c SNIC_HOST_ERR(snic->shost, snic 186 drivers/scsi/snic/snic_disc.c snic_tgt_lookup(struct snic *snic, struct snic_tgt_id *tgtid) snic 191 drivers/scsi/snic/snic_disc.c list_for_each_safe(cur, nxt, &snic->disc.tgt_list) { snic 249 drivers/scsi/snic/snic_disc.c snic_tgt_create(struct snic *snic, struct snic_tgt_id *tgtid) snic 255 drivers/scsi/snic/snic_disc.c tgt = snic_tgt_lookup(snic, tgtid); snic 263 drivers/scsi/snic/snic_disc.c SNIC_HOST_ERR(snic->shost, "Failure to allocate snic_tgt.\n"); snic 282 drivers/scsi/snic/snic_disc.c tgt->dev.parent = get_device(&snic->shost->shost_gendev); snic 289 drivers/scsi/snic/snic_disc.c snic->shost->host_no, tgt->channel, tgt->id); snic 294 drivers/scsi/snic/snic_disc.c snic->shost->host_no, tgt->channel, tgt->id); snic 298 drivers/scsi/snic/snic_disc.c SNIC_HOST_INFO(snic->shost, "Target type Unknown Detected.\n"); snic 300 drivers/scsi/snic/snic_disc.c snic->shost->host_no, tgt->channel, tgt->id); snic 304 drivers/scsi/snic/snic_disc.c spin_lock_irqsave(snic->shost->host_lock, flags); snic 305 drivers/scsi/snic/snic_disc.c list_add_tail(&tgt->list, &snic->disc.tgt_list); snic 306 drivers/scsi/snic/snic_disc.c tgt->scsi_tgt_id = snic->disc.nxt_tgt_id++; snic 308 drivers/scsi/snic/snic_disc.c spin_unlock_irqrestore(snic->shost->host_lock, flags); snic 310 drivers/scsi/snic/snic_disc.c SNIC_HOST_INFO(snic->shost, snic 316 drivers/scsi/snic/snic_disc.c SNIC_HOST_ERR(snic->shost, snic 320 drivers/scsi/snic/snic_disc.c put_device(&snic->shost->shost_gendev); snic 327 drivers/scsi/snic/snic_disc.c SNIC_HOST_INFO(snic->shost, "Scanning %s.\n", dev_name(&tgt->dev)); snic 329 drivers/scsi/snic/snic_disc.c scsi_queue_work(snic->shost, &tgt->scan_work); snic 338 drivers/scsi/snic/snic_disc.c struct snic *snic = container_of(work, struct snic, tgt_work); snic 344 drivers/scsi/snic/snic_disc.c spin_lock_irqsave(&snic->snic_lock, flags); snic 345 drivers/scsi/snic/snic_disc.c if (snic->in_remove) { snic 346 drivers/scsi/snic/snic_disc.c spin_unlock_irqrestore(&snic->snic_lock, flags); snic 347 drivers/scsi/snic/snic_disc.c kfree(snic->disc.rtgt_info); snic 351 drivers/scsi/snic/snic_disc.c spin_unlock_irqrestore(&snic->snic_lock, flags); snic 353 drivers/scsi/snic/snic_disc.c mutex_lock(&snic->disc.mutex); snic 355 drivers/scsi/snic/snic_disc.c if (snic->disc.req_cnt) { snic 356 drivers/scsi/snic/snic_disc.c snic->disc.state = SNIC_DISC_DONE; snic 357 drivers/scsi/snic/snic_disc.c snic->disc.req_cnt = 0; snic 358 drivers/scsi/snic/snic_disc.c mutex_unlock(&snic->disc.mutex); snic 359 drivers/scsi/snic/snic_disc.c kfree(snic->disc.rtgt_info); snic 360 drivers/scsi/snic/snic_disc.c snic->disc.rtgt_info = NULL; snic 362 drivers/scsi/snic/snic_disc.c SNIC_HOST_INFO(snic->shost, "tgt_disc: Discovery restart.\n"); snic 364 drivers/scsi/snic/snic_disc.c snic_disc_start(snic); snic 369 drivers/scsi/snic/snic_disc.c tgtid = (struct snic_tgt_id *)snic->disc.rtgt_info; snic 371 drivers/scsi/snic/snic_disc.c SNIC_BUG_ON(snic->disc.rtgt_cnt == 0 || tgtid == NULL); snic 373 drivers/scsi/snic/snic_disc.c for (i = 0; i < snic->disc.rtgt_cnt; i++) { snic 374 drivers/scsi/snic/snic_disc.c tgt = snic_tgt_create(snic, &tgtid[i]); snic 376 drivers/scsi/snic/snic_disc.c int buf_sz = snic->disc.rtgt_cnt * sizeof(*tgtid); snic 378 drivers/scsi/snic/snic_disc.c SNIC_HOST_ERR(snic->shost, "Failed to create tgt.\n"); snic 384 drivers/scsi/snic/snic_disc.c snic->disc.rtgt_info = NULL; snic 385 drivers/scsi/snic/snic_disc.c snic->disc.state = SNIC_DISC_DONE; snic 386 drivers/scsi/snic/snic_disc.c mutex_unlock(&snic->disc.mutex); snic 388 drivers/scsi/snic/snic_disc.c SNIC_HOST_INFO(snic->shost, "Discovery Completed.\n"); snic 395 drivers/scsi/snic/snic_disc.c snic_report_tgt_cmpl_handler(struct snic *snic, struct snic_fw_req *fwreq) snic 411 drivers/scsi/snic/snic_disc.c SNIC_HOST_ERR(snic->shost, "No Targets Found on this host.\n"); snic 418 drivers/scsi/snic/snic_disc.c SNIC_HOST_INFO(snic->shost, "Target Count = %d\n", tgt_cnt); snic 420 drivers/scsi/snic/snic_disc.c SNIC_BUG_ON(tgt_cnt > snic->fwinfo.max_tgts); snic 423 drivers/scsi/snic/snic_disc.c SNIC_HOST_INFO(snic->shost, snic 431 drivers/scsi/snic/snic_disc.c snic->disc.rtgt_cnt = tgt_cnt; snic 432 drivers/scsi/snic/snic_disc.c snic->disc.rtgt_info = (u8 *) tgtid; snic 433 drivers/scsi/snic/snic_disc.c queue_work(snic_glob->event_q, &snic->tgt_work); snic 438 drivers/scsi/snic/snic_disc.c snic_pci_unmap_rsp_buf(snic, rqi); snic 443 drivers/scsi/snic/snic_disc.c snic_release_untagged_req(snic, rqi); snic 465 drivers/scsi/snic/snic_disc.c snic_disc_term(struct snic *snic) snic 467 drivers/scsi/snic/snic_disc.c struct snic_disc *disc = &snic->disc; snic 472 drivers/scsi/snic/snic_disc.c SNIC_SCSI_DBG(snic->shost, "Terminating Discovery.\n"); snic 481 drivers/scsi/snic/snic_disc.c snic_disc_start(struct snic *snic) snic 483 drivers/scsi/snic/snic_disc.c struct snic_disc *disc = &snic->disc; snic 487 drivers/scsi/snic/snic_disc.c SNIC_SCSI_DBG(snic->shost, "Discovery Start.\n"); snic 489 drivers/scsi/snic/snic_disc.c spin_lock_irqsave(&snic->snic_lock, flags); snic 490 drivers/scsi/snic/snic_disc.c if (snic->in_remove) { snic 491 drivers/scsi/snic/snic_disc.c spin_unlock_irqrestore(&snic->snic_lock, flags); snic 497 drivers/scsi/snic/snic_disc.c spin_unlock_irqrestore(&snic->snic_lock, flags); snic 509 drivers/scsi/snic/snic_disc.c ret = snic_queue_report_tgt_req(snic); snic 511 drivers/scsi/snic/snic_disc.c SNIC_HOST_INFO(snic->shost, "Discovery Failed, err=%d.\n", ret); snic 522 drivers/scsi/snic/snic_disc.c struct snic *snic = container_of(work, struct snic, disc_work); snic 525 drivers/scsi/snic/snic_disc.c SNIC_HOST_INFO(snic->shost, "disc_work: Discovery\n"); snic 527 drivers/scsi/snic/snic_disc.c ret = snic_disc_start(snic); snic 532 drivers/scsi/snic/snic_disc.c SNIC_HOST_ERR(snic->shost, snic 542 drivers/scsi/snic/snic_disc.c snic_tgt_del_all(struct snic *snic) snic 548 drivers/scsi/snic/snic_disc.c scsi_flush_work(snic->shost); snic 550 drivers/scsi/snic/snic_disc.c mutex_lock(&snic->disc.mutex); snic 551 drivers/scsi/snic/snic_disc.c spin_lock_irqsave(snic->shost->host_lock, flags); snic 553 drivers/scsi/snic/snic_disc.c list_for_each_safe(cur, nxt, &snic->disc.tgt_list) { snic 557 drivers/scsi/snic/snic_disc.c SNIC_HOST_INFO(snic->shost, "Tgt %d q'ing for del\n", tgt->id); snic 561 drivers/scsi/snic/snic_disc.c spin_unlock_irqrestore(snic->shost->host_lock, flags); snic 562 drivers/scsi/snic/snic_disc.c mutex_unlock(&snic->disc.mutex); snic 30 drivers/scsi/snic/snic_disc.h struct snic; snic 41 drivers/scsi/snic/snic_disc.h void (*cb)(struct snic *); snic 87 drivers/scsi/snic/snic_disc.h int snic_disc_start(struct snic *); snic 88 drivers/scsi/snic/snic_disc.h void snic_disc_term(struct snic *); snic 89 drivers/scsi/snic/snic_disc.h int snic_report_tgt_cmpl_handler(struct snic *, struct snic_fw_req *); snic 90 drivers/scsi/snic/snic_disc.h int snic_tgtinfo_cmpl_handler(struct snic *snic, struct snic_fw_req *fwreq); snic 95 drivers/scsi/snic/snic_disc.h void snic_tgt_del_all(struct snic *); snic 39 drivers/scsi/snic/snic_io.c struct snic *snic = svnic_dev_priv(wq->vdev); snic 44 drivers/scsi/snic/snic_io.c SNIC_HOST_INFO(snic->shost, snic 48 drivers/scsi/snic/snic_io.c SNIC_TRC(snic->shost->host_no, 0, 0, snic 63 drivers/scsi/snic/snic_io.c struct snic *snic = svnic_dev_priv(vdev); snic 68 drivers/scsi/snic/snic_io.c spin_lock_irqsave(&snic->wq_lock[q_num], flags); snic 69 drivers/scsi/snic/snic_io.c svnic_wq_service(&snic->wq[q_num], snic 74 drivers/scsi/snic/snic_io.c spin_unlock_irqrestore(&snic->wq_lock[q_num], flags); snic 80 drivers/scsi/snic/snic_io.c snic_wq_cmpl_handler(struct snic *snic, int work_to_do) snic 85 drivers/scsi/snic/snic_io.c snic->s_stats.misc.last_ack_time = jiffies; snic 86 drivers/scsi/snic/snic_io.c for (i = 0; i < snic->wq_count; i++) { snic 87 drivers/scsi/snic/snic_io.c work_done += svnic_cq_service(&snic->cq[i], snic 101 drivers/scsi/snic/snic_io.c struct snic *snic = svnic_dev_priv(wq->vdev); snic 105 drivers/scsi/snic/snic_io.c dma_unmap_single(&snic->pdev->dev, buf->dma_addr, buf->len, snic 109 drivers/scsi/snic/snic_io.c spin_lock_irqsave(&snic->spl_cmd_lock, flags); snic 111 drivers/scsi/snic/snic_io.c spin_unlock_irqrestore(&snic->spl_cmd_lock, flags); snic 117 drivers/scsi/snic/snic_io.c spin_unlock_irqrestore(&snic->spl_cmd_lock, flags); snic 120 drivers/scsi/snic/snic_io.c snic_pci_unmap_rsp_buf(snic, rqi); snic 124 drivers/scsi/snic/snic_io.c snic_req_free(snic, rqi); snic 125 drivers/scsi/snic/snic_io.c SNIC_HOST_INFO(snic->shost, "snic_free_wq_buf .. freed.\n"); snic 133 drivers/scsi/snic/snic_io.c snic_select_wq(struct snic *snic) snic 142 drivers/scsi/snic/snic_io.c snic_wqdesc_avail(struct snic *snic, int q_num, int req_type) snic 144 drivers/scsi/snic/snic_io.c int nr_wqdesc = snic->config.wq_enet_desc_count; snic 151 drivers/scsi/snic/snic_io.c SNIC_HOST_INFO(snic->shost, "desc_avail: Multi Queue case.\n"); snic 157 drivers/scsi/snic/snic_io.c nr_wqdesc -= atomic64_read(&snic->s_stats.fw.actv_reqs); snic 163 drivers/scsi/snic/snic_io.c snic_queue_wq_desc(struct snic *snic, void *os_buf, u16 len) snic 167 drivers/scsi/snic/snic_io.c struct snic_fw_stats *fwstats = &snic->s_stats.fw; snic 176 drivers/scsi/snic/snic_io.c pa = dma_map_single(&snic->pdev->dev, os_buf, len, DMA_TO_DEVICE); snic 177 drivers/scsi/snic/snic_io.c if (dma_mapping_error(&snic->pdev->dev, pa)) { snic 178 drivers/scsi/snic/snic_io.c SNIC_HOST_ERR(snic->shost, "qdesc: PCI DMA Mapping Fail.\n"); snic 185 drivers/scsi/snic/snic_io.c q_num = snic_select_wq(snic); snic 187 drivers/scsi/snic/snic_io.c spin_lock_irqsave(&snic->wq_lock[q_num], flags); snic 188 drivers/scsi/snic/snic_io.c desc_avail = snic_wqdesc_avail(snic, q_num, req->hdr.type); snic 190 drivers/scsi/snic/snic_io.c dma_unmap_single(&snic->pdev->dev, pa, len, DMA_TO_DEVICE); snic 192 drivers/scsi/snic/snic_io.c spin_unlock_irqrestore(&snic->wq_lock[q_num], flags); snic 193 drivers/scsi/snic/snic_io.c atomic64_inc(&snic->s_stats.misc.wq_alloc_fail); snic 194 drivers/scsi/snic/snic_io.c SNIC_DBG("host = %d, WQ is Full\n", snic->shost->host_no); snic 199 drivers/scsi/snic/snic_io.c snic_queue_wq_eth_desc(&snic->wq[q_num], os_buf, pa, len, 0, 0, 1); snic 205 drivers/scsi/snic/snic_io.c spin_unlock_irqrestore(&snic->wq_lock[q_num], flags); snic 218 drivers/scsi/snic/snic_io.c snic_handle_untagged_req(struct snic *snic, struct snic_req_info *rqi) snic 224 drivers/scsi/snic/snic_io.c spin_lock_irqsave(&snic->spl_cmd_lock, flags); snic 225 drivers/scsi/snic/snic_io.c list_add_tail(&rqi->list, &snic->spl_cmd_list); snic 226 drivers/scsi/snic/snic_io.c spin_unlock_irqrestore(&snic->spl_cmd_lock, flags); snic 234 drivers/scsi/snic/snic_io.c snic_req_init(struct snic *snic, int sg_cnt) snic 242 drivers/scsi/snic/snic_io.c rqi = mempool_alloc(snic->req_pool[typ], GFP_ATOMIC); snic 244 drivers/scsi/snic/snic_io.c atomic64_inc(&snic->s_stats.io.alloc_fail); snic 245 drivers/scsi/snic/snic_io.c SNIC_HOST_ERR(snic->shost, snic 256 drivers/scsi/snic/snic_io.c rqi->snic = snic; snic 265 drivers/scsi/snic/snic_io.c if (sg_cnt > atomic64_read(&snic->s_stats.io.max_sgl)) snic 266 drivers/scsi/snic/snic_io.c atomic64_set(&snic->s_stats.io.max_sgl, sg_cnt); snic 269 drivers/scsi/snic/snic_io.c atomic64_inc(&snic->s_stats.io.sgl_cnt[sg_cnt - 1]); snic 277 drivers/scsi/snic/snic_io.c SNIC_SCSI_DBG(snic->shost, "Req_alloc:rqi = %p allocatd.\n", rqi); snic 286 drivers/scsi/snic/snic_io.c snic_abort_req_init(struct snic *snic, struct snic_req_info *rqi) snic 297 drivers/scsi/snic/snic_io.c req = mempool_alloc(snic->req_pool[SNIC_REQ_TM_CACHE], GFP_ATOMIC); snic 299 drivers/scsi/snic/snic_io.c SNIC_HOST_ERR(snic->shost, "abts:Failed to alloc tm req.\n"); snic 317 drivers/scsi/snic/snic_io.c snic_dr_req_init(struct snic *snic, struct snic_req_info *rqi) snic 323 drivers/scsi/snic/snic_io.c req = mempool_alloc(snic->req_pool[SNIC_REQ_TM_CACHE], GFP_ATOMIC); snic 325 drivers/scsi/snic/snic_io.c SNIC_HOST_ERR(snic->shost, "dr:Failed to alloc tm req.\n"); snic 342 drivers/scsi/snic/snic_io.c snic_req_free(struct snic *snic, struct snic_req_info *rqi) snic 348 drivers/scsi/snic/snic_io.c SNIC_SCSI_DBG(snic->shost, snic 354 drivers/scsi/snic/snic_io.c dma_unmap_single(&snic->pdev->dev, snic 359 drivers/scsi/snic/snic_io.c mempool_free(rqi->abort_req, snic->req_pool[SNIC_REQ_TM_CACHE]); snic 364 drivers/scsi/snic/snic_io.c dma_unmap_single(&snic->pdev->dev, snic 369 drivers/scsi/snic/snic_io.c mempool_free(rqi->dr_req, snic->req_pool[SNIC_REQ_TM_CACHE]); snic 373 drivers/scsi/snic/snic_io.c dma_unmap_single(&snic->pdev->dev, snic 378 drivers/scsi/snic/snic_io.c mempool_free(rqi, snic->req_pool[rqi->rq_pool_type]); snic 382 drivers/scsi/snic/snic_io.c snic_pci_unmap_rsp_buf(struct snic *snic, struct snic_req_info *rqi) snic 388 drivers/scsi/snic/snic_io.c dma_unmap_single(&snic->pdev->dev, snic 398 drivers/scsi/snic/snic_io.c snic_free_all_untagged_reqs(struct snic *snic) snic 404 drivers/scsi/snic/snic_io.c spin_lock_irqsave(&snic->spl_cmd_lock, flags); snic 405 drivers/scsi/snic/snic_io.c list_for_each_safe(cur, nxt, &snic->spl_cmd_list) { snic 409 drivers/scsi/snic/snic_io.c snic_pci_unmap_rsp_buf(snic, rqi); snic 414 drivers/scsi/snic/snic_io.c snic_req_free(snic, rqi); snic 416 drivers/scsi/snic/snic_io.c spin_unlock_irqrestore(&snic->spl_cmd_lock, flags); snic 423 drivers/scsi/snic/snic_io.c snic_release_untagged_req(struct snic *snic, struct snic_req_info *rqi) snic 427 drivers/scsi/snic/snic_io.c spin_lock_irqsave(&snic->snic_lock, flags); snic 428 drivers/scsi/snic/snic_io.c if (snic->in_remove) { snic 429 drivers/scsi/snic/snic_io.c spin_unlock_irqrestore(&snic->snic_lock, flags); snic 432 drivers/scsi/snic/snic_io.c spin_unlock_irqrestore(&snic->snic_lock, flags); snic 434 drivers/scsi/snic/snic_io.c spin_lock_irqsave(&snic->spl_cmd_lock, flags); snic 436 drivers/scsi/snic/snic_io.c spin_unlock_irqrestore(&snic->spl_cmd_lock, flags); snic 440 drivers/scsi/snic/snic_io.c spin_unlock_irqrestore(&snic->spl_cmd_lock, flags); snic 441 drivers/scsi/snic/snic_io.c snic_req_free(snic, rqi); snic 561 drivers/scsi/snic/snic_io.c snic_calc_io_process_time(struct snic *snic, struct snic_req_info *rqi) snic 567 drivers/scsi/snic/snic_io.c if (duration > atomic64_read(&snic->s_stats.io.max_time)) snic 568 drivers/scsi/snic/snic_io.c atomic64_set(&snic->s_stats.io.max_time, duration); snic 68 drivers/scsi/snic/snic_io.h struct snic; snic 88 drivers/scsi/snic/snic_io.h struct snic *snic; /* Associated snic */ snic 110 drivers/scsi/snic/snic_io.h snic_req_init(struct snic *, int sg_cnt); snic 111 drivers/scsi/snic/snic_io.h void snic_req_free(struct snic *, struct snic_req_info *); snic 112 drivers/scsi/snic/snic_io.h void snic_calc_io_process_time(struct snic *, struct snic_req_info *); snic 113 drivers/scsi/snic/snic_io.h void snic_pci_unmap_rsp_buf(struct snic *, struct snic_req_info *); snic 115 drivers/scsi/snic/snic_io.h snic_abort_req_init(struct snic *, struct snic_req_info *); snic 117 drivers/scsi/snic/snic_io.h snic_dr_req_init(struct snic *, struct snic_req_info *); snic 37 drivers/scsi/snic/snic_isr.c struct snic *snic = data; snic 40 drivers/scsi/snic/snic_isr.c snic->s_stats.misc.last_isr_time = jiffies; snic 41 drivers/scsi/snic/snic_isr.c atomic64_inc(&snic->s_stats.misc.ack_isr_cnt); snic 43 drivers/scsi/snic/snic_isr.c wq_work_done = snic_wq_cmpl_handler(snic, -1); snic 44 drivers/scsi/snic/snic_isr.c svnic_intr_return_credits(&snic->intr[SNIC_MSIX_WQ], snic 55 drivers/scsi/snic/snic_isr.c struct snic *snic = data; snic 58 drivers/scsi/snic/snic_isr.c snic->s_stats.misc.last_isr_time = jiffies; snic 59 drivers/scsi/snic/snic_isr.c atomic64_inc(&snic->s_stats.misc.cmpl_isr_cnt); snic 61 drivers/scsi/snic/snic_isr.c iocmpl_work_done = snic_fwcq_cmpl_handler(snic, -1); snic 62 drivers/scsi/snic/snic_isr.c svnic_intr_return_credits(&snic->intr[SNIC_MSIX_IO_CMPL], snic 73 drivers/scsi/snic/snic_isr.c struct snic *snic = data; snic 75 drivers/scsi/snic/snic_isr.c snic->s_stats.misc.last_isr_time = jiffies; snic 76 drivers/scsi/snic/snic_isr.c atomic64_inc(&snic->s_stats.misc.errnotify_isr_cnt); snic 78 drivers/scsi/snic/snic_isr.c svnic_intr_return_all_credits(&snic->intr[SNIC_MSIX_ERR_NOTIFY]); snic 79 drivers/scsi/snic/snic_isr.c snic_log_q_error(snic); snic 82 drivers/scsi/snic/snic_isr.c snic_handle_link_event(snic); snic 89 drivers/scsi/snic/snic_isr.c snic_free_intr(struct snic *snic) snic 94 drivers/scsi/snic/snic_isr.c for (i = 0; i < ARRAY_SIZE(snic->msix); i++) { snic 95 drivers/scsi/snic/snic_isr.c if (snic->msix[i].requested) { snic 96 drivers/scsi/snic/snic_isr.c free_irq(pci_irq_vector(snic->pdev, i), snic 97 drivers/scsi/snic/snic_isr.c snic->msix[i].devid); snic 103 drivers/scsi/snic/snic_isr.c snic_request_intr(struct snic *snic) snic 108 drivers/scsi/snic/snic_isr.c intr_mode = svnic_dev_get_intr_mode(snic->vdev); snic 118 drivers/scsi/snic/snic_isr.c sprintf(snic->msix[SNIC_MSIX_WQ].devname, snic 120 drivers/scsi/snic/snic_isr.c snic->name); snic 121 drivers/scsi/snic/snic_isr.c snic->msix[SNIC_MSIX_WQ].isr = snic_isr_msix_wq; snic 122 drivers/scsi/snic/snic_isr.c snic->msix[SNIC_MSIX_WQ].devid = snic; snic 124 drivers/scsi/snic/snic_isr.c sprintf(snic->msix[SNIC_MSIX_IO_CMPL].devname, snic 126 drivers/scsi/snic/snic_isr.c snic->name); snic 127 drivers/scsi/snic/snic_isr.c snic->msix[SNIC_MSIX_IO_CMPL].isr = snic_isr_msix_io_cmpl; snic 128 drivers/scsi/snic/snic_isr.c snic->msix[SNIC_MSIX_IO_CMPL].devid = snic; snic 130 drivers/scsi/snic/snic_isr.c sprintf(snic->msix[SNIC_MSIX_ERR_NOTIFY].devname, snic 132 drivers/scsi/snic/snic_isr.c snic->name); snic 133 drivers/scsi/snic/snic_isr.c snic->msix[SNIC_MSIX_ERR_NOTIFY].isr = snic_isr_msix_err_notify; snic 134 drivers/scsi/snic/snic_isr.c snic->msix[SNIC_MSIX_ERR_NOTIFY].devid = snic; snic 136 drivers/scsi/snic/snic_isr.c for (i = 0; i < ARRAY_SIZE(snic->msix); i++) { snic 137 drivers/scsi/snic/snic_isr.c ret = request_irq(pci_irq_vector(snic->pdev, i), snic 138 drivers/scsi/snic/snic_isr.c snic->msix[i].isr, snic 140 drivers/scsi/snic/snic_isr.c snic->msix[i].devname, snic 141 drivers/scsi/snic/snic_isr.c snic->msix[i].devid); snic 143 drivers/scsi/snic/snic_isr.c SNIC_HOST_ERR(snic->shost, snic 147 drivers/scsi/snic/snic_isr.c snic_free_intr(snic); snic 150 drivers/scsi/snic/snic_isr.c snic->msix[i].requested = 1; snic 157 drivers/scsi/snic/snic_isr.c snic_set_intr_mode(struct snic *snic) snic 159 drivers/scsi/snic/snic_isr.c unsigned int n = ARRAY_SIZE(snic->wq); snic 167 drivers/scsi/snic/snic_isr.c BUILD_BUG_ON((ARRAY_SIZE(snic->wq) + SNIC_CQ_IO_CMPL_MAX) > snic 168 drivers/scsi/snic/snic_isr.c ARRAY_SIZE(snic->intr)); snic 170 drivers/scsi/snic/snic_isr.c if (snic->wq_count < n || snic->cq_count < n + m) snic 173 drivers/scsi/snic/snic_isr.c if (pci_alloc_irq_vectors(snic->pdev, vecs, vecs, PCI_IRQ_MSIX) < 0) snic 176 drivers/scsi/snic/snic_isr.c snic->wq_count = n; snic 177 drivers/scsi/snic/snic_isr.c snic->cq_count = n + m; snic 178 drivers/scsi/snic/snic_isr.c snic->intr_count = vecs; snic 179 drivers/scsi/snic/snic_isr.c snic->err_intr_offset = SNIC_MSIX_ERR_NOTIFY; snic 181 drivers/scsi/snic/snic_isr.c SNIC_ISR_DBG(snic->shost, "Using MSI-X Interrupts\n"); snic 182 drivers/scsi/snic/snic_isr.c svnic_dev_set_intr_mode(snic->vdev, VNIC_DEV_INTR_MODE_MSIX); snic 185 drivers/scsi/snic/snic_isr.c svnic_dev_set_intr_mode(snic->vdev, VNIC_DEV_INTR_MODE_UNKNOWN); snic 190 drivers/scsi/snic/snic_isr.c snic_clear_intr_mode(struct snic *snic) snic 192 drivers/scsi/snic/snic_isr.c pci_free_irq_vectors(snic->pdev); snic 193 drivers/scsi/snic/snic_isr.c svnic_dev_set_intr_mode(snic->vdev, VNIC_DEV_INTR_MODE_INTX); snic 80 drivers/scsi/snic/snic_main.c struct snic *snic = shost_priv(sdev->host); snic 89 drivers/scsi/snic/snic_main.c if (snic->fwinfo.io_tmo > 1) snic 90 drivers/scsi/snic/snic_main.c tmo = snic->fwinfo.io_tmo * HZ; snic 101 drivers/scsi/snic/snic_main.c struct snic *snic = shost_priv(sdev->host); snic 106 drivers/scsi/snic/snic_main.c atomic64_inc(&snic->s_stats.misc.qsz_rampdown); snic 108 drivers/scsi/snic/snic_main.c atomic64_inc(&snic->s_stats.misc.qsz_rampup); snic 110 drivers/scsi/snic/snic_main.c atomic64_set(&snic->s_stats.misc.last_qsz, sdev->queue_depth); snic 142 drivers/scsi/snic/snic_main.c snic_handle_link_event(struct snic *snic) snic 146 drivers/scsi/snic/snic_main.c spin_lock_irqsave(&snic->snic_lock, flags); snic 147 drivers/scsi/snic/snic_main.c if (snic->stop_link_events) { snic 148 drivers/scsi/snic/snic_main.c spin_unlock_irqrestore(&snic->snic_lock, flags); snic 152 drivers/scsi/snic/snic_main.c spin_unlock_irqrestore(&snic->snic_lock, flags); snic 154 drivers/scsi/snic/snic_main.c queue_work(snic_glob->event_q, &snic->link_work); snic 164 drivers/scsi/snic/snic_main.c snic_notify_set(struct snic *snic) snic 169 drivers/scsi/snic/snic_main.c intr_mode = svnic_dev_get_intr_mode(snic->vdev); snic 172 drivers/scsi/snic/snic_main.c ret = svnic_dev_notify_set(snic->vdev, SNIC_MSIX_ERR_NOTIFY); snic 174 drivers/scsi/snic/snic_main.c SNIC_HOST_ERR(snic->shost, snic 228 drivers/scsi/snic/snic_main.c snic_cleanup(struct snic *snic) snic 233 drivers/scsi/snic/snic_main.c svnic_dev_disable(snic->vdev); snic 234 drivers/scsi/snic/snic_main.c for (i = 0; i < snic->intr_count; i++) snic 235 drivers/scsi/snic/snic_main.c svnic_intr_mask(&snic->intr[i]); snic 237 drivers/scsi/snic/snic_main.c for (i = 0; i < snic->wq_count; i++) { snic 238 drivers/scsi/snic/snic_main.c ret = svnic_wq_disable(&snic->wq[i]); snic 244 drivers/scsi/snic/snic_main.c snic_fwcq_cmpl_handler(snic, -1); snic 246 drivers/scsi/snic/snic_main.c snic_wq_cmpl_handler(snic, -1); snic 249 drivers/scsi/snic/snic_main.c for (i = 0; i < snic->wq_count; i++) snic 250 drivers/scsi/snic/snic_main.c svnic_wq_clean(&snic->wq[i], snic_free_wq_buf); snic 252 drivers/scsi/snic/snic_main.c for (i = 0; i < snic->cq_count; i++) snic 253 drivers/scsi/snic/snic_main.c svnic_cq_clean(&snic->cq[i]); snic 255 drivers/scsi/snic/snic_main.c for (i = 0; i < snic->intr_count; i++) snic 256 drivers/scsi/snic/snic_main.c svnic_intr_clean(&snic->intr[i]); snic 259 drivers/scsi/snic/snic_main.c snic_free_all_untagged_reqs(snic); snic 262 drivers/scsi/snic/snic_main.c snic_shutdown_scsi_cleanup(snic); snic 265 drivers/scsi/snic/snic_main.c mempool_destroy(snic->req_pool[i]); snic 272 drivers/scsi/snic/snic_main.c snic_iounmap(struct snic *snic) snic 274 drivers/scsi/snic/snic_main.c if (snic->bar0.vaddr) snic 275 drivers/scsi/snic/snic_main.c iounmap(snic->bar0.vaddr); snic 284 drivers/scsi/snic/snic_main.c struct snic *snic = svnic_dev_priv(vdev); snic 293 drivers/scsi/snic/snic_main.c SNIC_HOST_INFO(snic->shost, "VNIC_DEV_OPEN Timedout.\n"); snic 341 drivers/scsi/snic/snic_main.c snic_get_state(struct snic *snic) snic 343 drivers/scsi/snic/snic_main.c return atomic_read(&snic->state); snic 347 drivers/scsi/snic/snic_main.c snic_set_state(struct snic *snic, enum snic_state state) snic 349 drivers/scsi/snic/snic_main.c SNIC_HOST_INFO(snic->shost, "snic state change from %s to %s\n", snic 350 drivers/scsi/snic/snic_main.c snic_state_to_str(snic_get_state(snic)), snic 353 drivers/scsi/snic/snic_main.c atomic_set(&snic->state, state); snic 363 drivers/scsi/snic/snic_main.c struct snic *snic; snic 381 drivers/scsi/snic/snic_main.c shost = scsi_host_alloc(&snic_host_template, sizeof(struct snic)); snic 388 drivers/scsi/snic/snic_main.c snic = shost_priv(shost); snic 389 drivers/scsi/snic/snic_main.c snic->shost = shost; snic 391 drivers/scsi/snic/snic_main.c snprintf(snic->name, sizeof(snic->name) - 1, "%s%d", SNIC_DRV_NAME, snic 396 drivers/scsi/snic/snic_main.c shost->host_no, snic, shost, pdev->bus->number, snic 400 drivers/scsi/snic/snic_main.c snic_stats_debugfs_init(snic); snic 404 drivers/scsi/snic/snic_main.c pci_set_drvdata(pdev, snic); snic 405 drivers/scsi/snic/snic_main.c snic->pdev = pdev; snic 451 drivers/scsi/snic/snic_main.c snic->bar0.vaddr = pci_iomap(pdev, 0, 0); snic 452 drivers/scsi/snic/snic_main.c if (!snic->bar0.vaddr) { snic 460 drivers/scsi/snic/snic_main.c snic->bar0.bus_addr = pci_resource_start(pdev, 0); snic 461 drivers/scsi/snic/snic_main.c snic->bar0.len = pci_resource_len(pdev, 0); snic 462 drivers/scsi/snic/snic_main.c SNIC_BUG_ON(snic->bar0.bus_addr == 0); snic 465 drivers/scsi/snic/snic_main.c snic->vdev = svnic_dev_alloc_discover(NULL, snic, pdev, &snic->bar0, 1); snic 466 drivers/scsi/snic/snic_main.c if (!snic->vdev) { snic 473 drivers/scsi/snic/snic_main.c ret = svnic_dev_cmd_init(snic->vdev, 0); snic 480 drivers/scsi/snic/snic_main.c ret = snic_dev_wait(snic->vdev, svnic_dev_open, snic_vdev_open_done, 0); snic 489 drivers/scsi/snic/snic_main.c ret = svnic_dev_init(snic->vdev, 0); snic 499 drivers/scsi/snic/snic_main.c ret = snic_get_vnic_config(snic); snic 509 drivers/scsi/snic/snic_main.c max_ios = snic->config.io_throttle_count; snic 514 drivers/scsi/snic/snic_main.c snic->max_tag_id = shost->can_queue; snic 516 drivers/scsi/snic/snic_main.c shost->max_lun = snic->config.luns_per_tgt; snic 521 drivers/scsi/snic/snic_main.c snic_get_res_counts(snic); snic 526 drivers/scsi/snic/snic_main.c ret = snic_set_intr_mode(snic); snic 535 drivers/scsi/snic/snic_main.c ret = snic_alloc_vnic_res(snic); snic 545 drivers/scsi/snic/snic_main.c INIT_LIST_HEAD(&snic->list); snic 551 drivers/scsi/snic/snic_main.c INIT_LIST_HEAD(&snic->spl_cmd_list); snic 552 drivers/scsi/snic/snic_main.c spin_lock_init(&snic->spl_cmd_lock); snic 555 drivers/scsi/snic/snic_main.c spin_lock_init(&snic->snic_lock); snic 558 drivers/scsi/snic/snic_main.c spin_lock_init(&snic->wq_lock[i]); snic 561 drivers/scsi/snic/snic_main.c spin_lock_init(&snic->io_req_lock[i]); snic 572 drivers/scsi/snic/snic_main.c snic->req_pool[SNIC_REQ_CACHE_DFLT_SGL] = pool; snic 583 drivers/scsi/snic/snic_main.c snic->req_pool[SNIC_REQ_CACHE_MAX_SGL] = pool; snic 594 drivers/scsi/snic/snic_main.c snic->req_pool[SNIC_REQ_TM_CACHE] = pool; snic 597 drivers/scsi/snic/snic_main.c atomic_set(&snic->state, SNIC_INIT); snic 599 drivers/scsi/snic/snic_main.c atomic_set(&snic->ios_inflight, 0); snic 602 drivers/scsi/snic/snic_main.c ret = snic_notify_set(snic); snic 612 drivers/scsi/snic/snic_main.c list_add_tail(&snic->list, &snic_glob->snic_list); snic 615 drivers/scsi/snic/snic_main.c snic_disc_init(&snic->disc); snic 616 drivers/scsi/snic/snic_main.c INIT_WORK(&snic->tgt_work, snic_handle_tgt_disc); snic 617 drivers/scsi/snic/snic_main.c INIT_WORK(&snic->disc_work, snic_handle_disc); snic 618 drivers/scsi/snic/snic_main.c INIT_WORK(&snic->link_work, snic_handle_link); snic 621 drivers/scsi/snic/snic_main.c for (i = 0; i < snic->wq_count; i++) snic 622 drivers/scsi/snic/snic_main.c svnic_wq_enable(&snic->wq[i]); snic 624 drivers/scsi/snic/snic_main.c ret = svnic_dev_enable_wait(snic->vdev); snic 633 drivers/scsi/snic/snic_main.c ret = snic_request_intr(snic); snic 640 drivers/scsi/snic/snic_main.c for (i = 0; i < snic->intr_count; i++) snic 641 drivers/scsi/snic/snic_main.c svnic_intr_unmask(&snic->intr[i]); snic 644 drivers/scsi/snic/snic_main.c ret = snic_get_conf(snic); snic 666 drivers/scsi/snic/snic_main.c snic_set_state(snic, SNIC_ONLINE); snic 668 drivers/scsi/snic/snic_main.c ret = snic_disc_start(snic); snic 681 drivers/scsi/snic/snic_main.c snic_free_all_untagged_reqs(snic); snic 683 drivers/scsi/snic/snic_main.c for (i = 0; i < snic->intr_count; i++) snic 684 drivers/scsi/snic/snic_main.c svnic_intr_mask(&snic->intr[i]); snic 686 drivers/scsi/snic/snic_main.c snic_free_intr(snic); snic 689 drivers/scsi/snic/snic_main.c svnic_dev_disable(snic->vdev); snic 692 drivers/scsi/snic/snic_main.c svnic_dev_notify_unset(snic->vdev); snic 694 drivers/scsi/snic/snic_main.c for (i = 0; i < snic->wq_count; i++) { snic 697 drivers/scsi/snic/snic_main.c rc = svnic_wq_disable(&snic->wq[i]); snic 705 drivers/scsi/snic/snic_main.c snic_del_host(snic->shost); snic 708 drivers/scsi/snic/snic_main.c mempool_destroy(snic->req_pool[SNIC_REQ_TM_CACHE]); snic 711 drivers/scsi/snic/snic_main.c mempool_destroy(snic->req_pool[SNIC_REQ_CACHE_MAX_SGL]); snic 714 drivers/scsi/snic/snic_main.c mempool_destroy(snic->req_pool[SNIC_REQ_CACHE_DFLT_SGL]); snic 717 drivers/scsi/snic/snic_main.c snic_free_vnic_res(snic); snic 720 drivers/scsi/snic/snic_main.c snic_clear_intr_mode(snic); snic 723 drivers/scsi/snic/snic_main.c svnic_dev_close(snic->vdev); snic 726 drivers/scsi/snic/snic_main.c svnic_dev_unregister(snic->vdev); snic 729 drivers/scsi/snic/snic_main.c snic_iounmap(snic); snic 739 drivers/scsi/snic/snic_main.c snic_stats_debugfs_remove(snic); snic 760 drivers/scsi/snic/snic_main.c struct snic *snic = pci_get_drvdata(pdev); snic 763 drivers/scsi/snic/snic_main.c if (!snic) { snic 777 drivers/scsi/snic/snic_main.c snic_set_state(snic, SNIC_OFFLINE); snic 778 drivers/scsi/snic/snic_main.c spin_lock_irqsave(&snic->snic_lock, flags); snic 779 drivers/scsi/snic/snic_main.c snic->stop_link_events = 1; snic 780 drivers/scsi/snic/snic_main.c spin_unlock_irqrestore(&snic->snic_lock, flags); snic 783 drivers/scsi/snic/snic_main.c snic_disc_term(snic); snic 785 drivers/scsi/snic/snic_main.c spin_lock_irqsave(&snic->snic_lock, flags); snic 786 drivers/scsi/snic/snic_main.c snic->in_remove = 1; snic 787 drivers/scsi/snic/snic_main.c spin_unlock_irqrestore(&snic->snic_lock, flags); snic 794 drivers/scsi/snic/snic_main.c snic_cleanup(snic); snic 797 drivers/scsi/snic/snic_main.c list_del(&snic->list); snic 800 drivers/scsi/snic/snic_main.c snic_tgt_del_all(snic); snic 802 drivers/scsi/snic/snic_main.c snic_stats_debugfs_remove(snic); snic 804 drivers/scsi/snic/snic_main.c snic_del_host(snic->shost); snic 806 drivers/scsi/snic/snic_main.c svnic_dev_notify_unset(snic->vdev); snic 807 drivers/scsi/snic/snic_main.c snic_free_intr(snic); snic 808 drivers/scsi/snic/snic_main.c snic_free_vnic_res(snic); snic 809 drivers/scsi/snic/snic_main.c snic_clear_intr_mode(snic); snic 810 drivers/scsi/snic/snic_main.c svnic_dev_close(snic->vdev); snic 811 drivers/scsi/snic/snic_main.c svnic_dev_unregister(snic->vdev); snic 812 drivers/scsi/snic/snic_main.c snic_iounmap(snic); snic 818 drivers/scsi/snic/snic_main.c scsi_host_put(snic->shost); snic 33 drivers/scsi/snic/snic_res.c snic_get_vnic_config(struct snic *snic) snic 35 drivers/scsi/snic/snic_res.c struct vnic_snic_config *c = &snic->config; snic 40 drivers/scsi/snic/snic_res.c ret = svnic_dev_spec(snic->vdev, \ snic 45 drivers/scsi/snic/snic_res.c SNIC_HOST_ERR(snic->shost, \ snic 120 drivers/scsi/snic/snic_res.c snic_get_res_counts(struct snic *snic) snic 122 drivers/scsi/snic/snic_res.c snic->wq_count = svnic_dev_get_res_count(snic->vdev, RES_TYPE_WQ); snic 123 drivers/scsi/snic/snic_res.c SNIC_BUG_ON(snic->wq_count == 0); snic 124 drivers/scsi/snic/snic_res.c snic->cq_count = svnic_dev_get_res_count(snic->vdev, RES_TYPE_CQ); snic 125 drivers/scsi/snic/snic_res.c SNIC_BUG_ON(snic->cq_count == 0); snic 126 drivers/scsi/snic/snic_res.c snic->intr_count = svnic_dev_get_res_count(snic->vdev, snic 128 drivers/scsi/snic/snic_res.c SNIC_BUG_ON(snic->intr_count == 0); snic 132 drivers/scsi/snic/snic_res.c snic_free_vnic_res(struct snic *snic) snic 136 drivers/scsi/snic/snic_res.c for (i = 0; i < snic->wq_count; i++) snic 137 drivers/scsi/snic/snic_res.c svnic_wq_free(&snic->wq[i]); snic 139 drivers/scsi/snic/snic_res.c for (i = 0; i < snic->cq_count; i++) snic 140 drivers/scsi/snic/snic_res.c svnic_cq_free(&snic->cq[i]); snic 142 drivers/scsi/snic/snic_res.c for (i = 0; i < snic->intr_count; i++) snic 143 drivers/scsi/snic/snic_res.c svnic_intr_free(&snic->intr[i]); snic 147 drivers/scsi/snic/snic_res.c snic_alloc_vnic_res(struct snic *snic) snic 157 drivers/scsi/snic/snic_res.c intr_mode = svnic_dev_get_intr_mode(snic->vdev); snic 170 drivers/scsi/snic/snic_res.c SNIC_INFO("wq %d cq %d intr %d\n", snic->wq_count, snic 171 drivers/scsi/snic/snic_res.c snic->cq_count, snic 172 drivers/scsi/snic/snic_res.c snic->intr_count); snic 176 drivers/scsi/snic/snic_res.c for (i = 0; i < snic->wq_count; i++) { snic 177 drivers/scsi/snic/snic_res.c ret = svnic_wq_alloc(snic->vdev, snic 178 drivers/scsi/snic/snic_res.c &snic->wq[i], snic 180 drivers/scsi/snic/snic_res.c snic->config.wq_enet_desc_count, snic 187 drivers/scsi/snic/snic_res.c for (i = 0; i < snic->wq_count; i++) { snic 188 drivers/scsi/snic/snic_res.c ret = svnic_cq_alloc(snic->vdev, snic 189 drivers/scsi/snic/snic_res.c &snic->cq[i], snic 191 drivers/scsi/snic/snic_res.c snic->config.wq_enet_desc_count, snic 197 drivers/scsi/snic/snic_res.c SNIC_BUG_ON(snic->cq_count != 2 * snic->wq_count); snic 199 drivers/scsi/snic/snic_res.c for (i = snic->wq_count; i < snic->cq_count; i++) { snic 200 drivers/scsi/snic/snic_res.c ret = svnic_cq_alloc(snic->vdev, snic 201 drivers/scsi/snic/snic_res.c &snic->cq[i], snic 203 drivers/scsi/snic/snic_res.c (snic->config.wq_enet_desc_count * 3), snic 209 drivers/scsi/snic/snic_res.c for (i = 0; i < snic->intr_count; i++) { snic 210 drivers/scsi/snic/snic_res.c ret = svnic_intr_alloc(snic->vdev, &snic->intr[i], i); snic 221 drivers/scsi/snic/snic_res.c err_intr_offset = snic->err_intr_offset; snic 223 drivers/scsi/snic/snic_res.c for (i = 0; i < snic->wq_count; i++) { snic 224 drivers/scsi/snic/snic_res.c svnic_wq_init(&snic->wq[i], snic 230 drivers/scsi/snic/snic_res.c for (i = 0; i < snic->cq_count; i++) { snic 233 drivers/scsi/snic/snic_res.c svnic_cq_init(&snic->cq[i], snic 253 drivers/scsi/snic/snic_res.c for (i = 0; i < snic->intr_count; i++) { snic 254 drivers/scsi/snic/snic_res.c svnic_intr_init(&snic->intr[i], snic 255 drivers/scsi/snic/snic_res.c snic->config.intr_timer, snic 256 drivers/scsi/snic/snic_res.c snic->config.intr_timer_type, snic 261 drivers/scsi/snic/snic_res.c ret = svnic_dev_stats_dump(snic->vdev, &snic->stats); snic 263 drivers/scsi/snic/snic_res.c SNIC_HOST_ERR(snic->shost, snic 270 drivers/scsi/snic/snic_res.c svnic_dev_stats_clear(snic->vdev); snic 276 drivers/scsi/snic/snic_res.c snic_free_vnic_res(snic); snic 282 drivers/scsi/snic/snic_res.c snic_log_q_error(struct snic *snic) snic 287 drivers/scsi/snic/snic_res.c for (i = 0; i < snic->wq_count; i++) { snic 288 drivers/scsi/snic/snic_res.c err_status = ioread32(&snic->wq[i].ctrl->error_status); snic 290 drivers/scsi/snic/snic_res.c SNIC_HOST_ERR(snic->shost, snic 89 drivers/scsi/snic/snic_res.h struct snic; snic 91 drivers/scsi/snic/snic_res.h int snic_get_vnic_config(struct snic *); snic 92 drivers/scsi/snic/snic_res.h int snic_alloc_vnic_res(struct snic *); snic 93 drivers/scsi/snic/snic_res.h void snic_free_vnic_res(struct snic *); snic 94 drivers/scsi/snic/snic_res.h void snic_get_res_counts(struct snic *); snic 95 drivers/scsi/snic/snic_res.h void snic_log_q_error(struct snic *); snic 96 drivers/scsi/snic/snic_res.h int snic_get_vnic_resources_size(struct snic *); snic 80 drivers/scsi/snic/snic_scsi.c static void snic_scsi_cleanup(struct snic *, int); snic 112 drivers/scsi/snic/snic_scsi.c snic_io_lock_hash(struct snic *snic, struct scsi_cmnd *sc) snic 116 drivers/scsi/snic/snic_scsi.c return &snic->io_req_lock[hash]; snic 120 drivers/scsi/snic/snic_scsi.c snic_io_lock_tag(struct snic *snic, int tag) snic 122 drivers/scsi/snic/snic_scsi.c return &snic->io_req_lock[tag & (SNIC_IO_LOCKS - 1)]; snic 127 drivers/scsi/snic/snic_scsi.c snic_release_req_buf(struct snic *snic, snic 142 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 149 drivers/scsi/snic/snic_scsi.c dma_unmap_single(&snic->pdev->dev, snic 156 drivers/scsi/snic/snic_scsi.c snic_req_free(snic, rqi); snic 163 drivers/scsi/snic/snic_scsi.c snic_queue_icmnd_req(struct snic *snic, snic 188 drivers/scsi/snic/snic_scsi.c pa = dma_map_single(&snic->pdev->dev, snic 192 drivers/scsi/snic/snic_scsi.c if (dma_mapping_error(&snic->pdev->dev, pa)) { snic 193 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 210 drivers/scsi/snic/snic_scsi.c snic->config.hid, /* hid */ snic 223 drivers/scsi/snic/snic_scsi.c atomic64_inc(&snic->s_stats.io.active); snic 224 drivers/scsi/snic/snic_scsi.c ret = snic_queue_wq_desc(snic, rqi->req, rqi->req_len); snic 226 drivers/scsi/snic/snic_scsi.c atomic64_dec(&snic->s_stats.io.active); snic 227 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 231 drivers/scsi/snic/snic_scsi.c snic_stats_update_active_ios(&snic->s_stats); snic 240 drivers/scsi/snic/snic_scsi.c snic_issue_scsi_req(struct snic *snic, snic 256 drivers/scsi/snic/snic_scsi.c SNIC_TRC((u16)snic->shost->host_no, tag, (ulong) sc, 0, snic 259 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, "issue_sc:Failed to map SG List.\n"); snic 265 drivers/scsi/snic/snic_scsi.c rqi = snic_req_init(snic, sg_cnt); snic 281 drivers/scsi/snic/snic_scsi.c io_lock = snic_io_lock_hash(snic, sc); snic 284 drivers/scsi/snic/snic_scsi.c ret = snic_queue_icmnd_req(snic, rqi, sc, sg_cnt); snic 286 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 298 drivers/scsi/snic/snic_scsi.c snic_release_req_buf(snic, rqi, sc); snic 300 drivers/scsi/snic/snic_scsi.c SNIC_TRC(snic->shost->host_no, tag, (ulong) sc, 0, 0, 0, snic 305 drivers/scsi/snic/snic_scsi.c struct snic_io_stats *iostats = &snic->s_stats.io; snic 313 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 317 drivers/scsi/snic/snic_scsi.c SNIC_TRC(snic->shost->host_no, tag, (ulong) sc, (ulong) rqi, snic 336 drivers/scsi/snic/snic_scsi.c struct snic *snic = shost_priv(shost); snic 343 drivers/scsi/snic/snic_scsi.c atomic64_inc(&snic->s_stats.misc.tgt_not_rdy); snic 350 drivers/scsi/snic/snic_scsi.c if (snic_get_state(snic) != SNIC_ONLINE) { snic 352 drivers/scsi/snic/snic_scsi.c snic_state_str[snic_get_state(snic)]); snic 356 drivers/scsi/snic/snic_scsi.c atomic_inc(&snic->ios_inflight); snic 361 drivers/scsi/snic/snic_scsi.c ret = snic_issue_scsi_req(snic, tgt, sc); snic 367 drivers/scsi/snic/snic_scsi.c atomic_dec(&snic->ios_inflight); snic 377 drivers/scsi/snic/snic_scsi.c snic_proc_tmreq_pending_state(struct snic *snic, snic 409 drivers/scsi/snic/snic_scsi.c snic_process_io_failed_state(struct snic *snic, snic 418 drivers/scsi/snic/snic_scsi.c atomic64_inc(&snic->s_stats.misc.io_tmo); snic 423 drivers/scsi/snic/snic_scsi.c atomic64_inc(&snic->s_stats.misc.io_aborted); snic 428 drivers/scsi/snic/snic_scsi.c atomic64_inc(&snic->s_stats.misc.data_cnt_mismat); snic 434 drivers/scsi/snic/snic_scsi.c atomic64_inc(&snic->s_stats.fw.out_of_res); snic 439 drivers/scsi/snic/snic_scsi.c atomic64_inc(&snic->s_stats.io.io_not_found); snic 444 drivers/scsi/snic/snic_scsi.c atomic64_inc(&snic->s_stats.misc.sgl_inval); snic 449 drivers/scsi/snic/snic_scsi.c atomic64_inc(&snic->s_stats.fw.io_errs); snic 454 drivers/scsi/snic/snic_scsi.c atomic64_inc(&snic->s_stats.fw.scsi_errs); snic 468 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 474 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, "fw returns failed status %s flags 0x%llx\n", snic 498 drivers/scsi/snic/snic_scsi.c snic_process_icmnd_cmpl_status(struct snic *snic, snic 520 drivers/scsi/snic/snic_scsi.c atomic64_inc(&snic->s_stats.misc.io_under_run); snic 524 drivers/scsi/snic/snic_scsi.c atomic64_inc(&snic->s_stats.misc.qfull); snic 528 drivers/scsi/snic/snic_scsi.c snic_process_io_failed_state(snic, icmnd_cmpl, sc, cmpl_stat); snic 529 drivers/scsi/snic/snic_scsi.c atomic64_inc(&snic->s_stats.io.fail); snic 530 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 545 drivers/scsi/snic/snic_scsi.c snic_icmnd_cmpl_handler(struct snic *snic, struct snic_fw_req *fwreq) snic 562 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 566 drivers/scsi/snic/snic_scsi.c if (cmnd_id >= snic->max_tag_id) { snic 567 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 573 drivers/scsi/snic/snic_scsi.c sc = scsi_host_find_tag(snic->shost, cmnd_id); snic 577 drivers/scsi/snic/snic_scsi.c atomic64_inc(&snic->s_stats.io.sc_null); snic 578 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 584 drivers/scsi/snic/snic_scsi.c SNIC_TRC(snic->shost->host_no, cmnd_id, 0, snic 592 drivers/scsi/snic/snic_scsi.c io_lock = snic_io_lock_hash(snic, sc); snic 596 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 610 drivers/scsi/snic/snic_scsi.c atomic64_inc(&snic->s_stats.io.req_null); snic 614 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 632 drivers/scsi/snic/snic_scsi.c snic_proc_tmreq_pending_state(snic, sc, hdr_stat); snic 635 drivers/scsi/snic/snic_scsi.c snic_stats_update_io_cmpl(&snic->s_stats); snic 641 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 648 drivers/scsi/snic/snic_scsi.c SNIC_TRC(snic->shost->host_no, cmnd_id, (ulong) sc, snic 655 drivers/scsi/snic/snic_scsi.c if (snic_process_icmnd_cmpl_status(snic, icmnd_cmpl, hdr_stat, sc)) { snic 657 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 670 drivers/scsi/snic/snic_scsi.c snic_calc_io_process_time(snic, rqi); snic 672 drivers/scsi/snic/snic_scsi.c snic_release_req_buf(snic, rqi, sc); snic 674 drivers/scsi/snic/snic_scsi.c SNIC_TRC(snic->shost->host_no, cmnd_id, (ulong) sc, snic 682 drivers/scsi/snic/snic_scsi.c snic_stats_update_io_cmpl(&snic->s_stats); snic 686 drivers/scsi/snic/snic_scsi.c snic_proc_dr_cmpl_locked(struct snic *snic, snic 697 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, "itmf_cmpl: Cmd State = %s\n", snic 703 drivers/scsi/snic/snic_scsi.c SNIC_TRC(snic->shost->host_no, cmnd_id, (ulong) sc, snic 707 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 718 drivers/scsi/snic/snic_scsi.c SNIC_TRC(snic->shost->host_no, cmnd_id, (ulong) sc, snic 722 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 734 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 748 drivers/scsi/snic/snic_scsi.c snic_update_abort_stats(struct snic *snic, u8 cmpl_stat) snic 750 drivers/scsi/snic/snic_scsi.c struct snic_abort_stats *abt_stats = &snic->s_stats.abts; snic 752 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, "Updating Abort stats.\n"); snic 773 drivers/scsi/snic/snic_scsi.c snic_process_itmf_cmpl(struct snic *snic, snic 786 drivers/scsi/snic/snic_scsi.c io_lock = snic_io_lock_hash(snic, sc); snic 797 drivers/scsi/snic/snic_scsi.c atomic64_inc(&snic->s_stats.io.req_null); snic 800 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 817 drivers/scsi/snic/snic_scsi.c snic_update_abort_stats(snic, cmpl_stat); snic 830 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 850 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 856 drivers/scsi/snic/snic_scsi.c snic_release_req_buf(snic, rqi, sc); snic 859 drivers/scsi/snic/snic_scsi.c SNIC_TRC(snic->shost->host_no, cmnd_id, (ulong) sc, snic 871 drivers/scsi/snic/snic_scsi.c snic_proc_dr_cmpl_locked(snic, fwreq, cmpl_stat, cmnd_id, sc); snic 884 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 898 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 901 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 920 drivers/scsi/snic/snic_scsi.c snic_itmf_cmpl_handler(struct snic *snic, struct snic_fw_req *fwreq) snic 932 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 937 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 949 drivers/scsi/snic/snic_scsi.c if ((cmnd_id & SNIC_TAG_MASK) >= snic->max_tag_id) { snic 950 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 958 drivers/scsi/snic/snic_scsi.c sc = scsi_host_find_tag(snic->shost, cmnd_id & SNIC_TAG_MASK); snic 963 drivers/scsi/snic/snic_scsi.c atomic64_inc(&snic->s_stats.io.sc_null); snic 964 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 971 drivers/scsi/snic/snic_scsi.c snic_process_itmf_cmpl(snic, fwreq, cmnd_id, hdr_stat, sc); snic 977 drivers/scsi/snic/snic_scsi.c snic_hba_reset_scsi_cleanup(struct snic *snic, struct scsi_cmnd *sc) snic 979 drivers/scsi/snic/snic_scsi.c struct snic_stats *st = &snic->s_stats; snic 982 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, "HBA Reset scsi cleanup.\n"); snic 983 drivers/scsi/snic/snic_scsi.c snic_scsi_cleanup(snic, snic_cmd_tag(sc)); snic 1002 drivers/scsi/snic/snic_scsi.c snic_hba_reset_cmpl_handler(struct snic *snic, struct snic_fw_req *fwreq) snic 1016 drivers/scsi/snic/snic_scsi.c SNIC_HOST_INFO(snic->shost, snic 1020 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 1027 drivers/scsi/snic/snic_scsi.c SNIC_HOST_INFO(snic->shost, snic 1035 drivers/scsi/snic/snic_scsi.c if (cmnd_id >= snic->max_tag_id) { snic 1036 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 1044 drivers/scsi/snic/snic_scsi.c sc = scsi_host_find_tag(snic->shost, cmnd_id); snic 1047 drivers/scsi/snic/snic_scsi.c atomic64_inc(&snic->s_stats.io.sc_null); snic 1048 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 1056 drivers/scsi/snic/snic_scsi.c SNIC_HOST_INFO(snic->shost, snic 1060 drivers/scsi/snic/snic_scsi.c io_lock = snic_io_lock_hash(snic, sc); snic 1063 drivers/scsi/snic/snic_scsi.c if (!snic->remove_wait) { snic 1065 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 1076 drivers/scsi/snic/snic_scsi.c atomic64_inc(&snic->s_stats.io.req_null); snic 1079 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 1092 drivers/scsi/snic/snic_scsi.c snic_hba_reset_scsi_cleanup(snic, sc); snic 1094 drivers/scsi/snic/snic_scsi.c SNIC_BUG_ON(snic_get_state(snic) != SNIC_OFFLINE && snic 1095 drivers/scsi/snic/snic_scsi.c snic_get_state(snic) != SNIC_FWRESET); snic 1099 drivers/scsi/snic/snic_scsi.c spin_lock_irqsave(&snic->snic_lock, gflags); snic 1100 drivers/scsi/snic/snic_scsi.c if (snic_get_state(snic) == SNIC_FWRESET) snic 1101 drivers/scsi/snic/snic_scsi.c snic_set_state(snic, SNIC_ONLINE); snic 1102 drivers/scsi/snic/snic_scsi.c spin_unlock_irqrestore(&snic->snic_lock, gflags); snic 1104 drivers/scsi/snic/snic_scsi.c if (snic->remove_wait) snic 1105 drivers/scsi/snic/snic_scsi.c complete(snic->remove_wait); snic 1108 drivers/scsi/snic/snic_scsi.c atomic64_inc(&snic->s_stats.reset.hba_reset_cmpl); snic 1112 drivers/scsi/snic/snic_scsi.c if (snic->config.xpt_type == SNIC_DAS) snic 1115 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, "reset_cmpl: Queuing discovery work.\n"); snic 1116 drivers/scsi/snic/snic_scsi.c queue_work(snic_glob->event_q, &snic->disc_work); snic 1122 drivers/scsi/snic/snic_scsi.c snic_msg_ack_handler(struct snic *snic, struct snic_fw_req *fwreq) snic 1124 drivers/scsi/snic/snic_scsi.c SNIC_HOST_INFO(snic->shost, "Message Ack Received.\n"); snic 1130 drivers/scsi/snic/snic_scsi.c snic_aen_handler(struct snic *snic, struct snic_fw_req *fwreq) snic 1139 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 1147 drivers/scsi/snic/snic_scsi.c SNIC_HOST_INFO(snic->shost, "aen:TGT_OFFLINE Event Recvd.\n"); snic 1151 drivers/scsi/snic/snic_scsi.c SNIC_HOST_INFO(snic->shost, "aen:TGT_ONLINE Event Recvd.\n"); snic 1155 drivers/scsi/snic/snic_scsi.c SNIC_HOST_INFO(snic->shost, "aen:LUN_OFFLINE Event Recvd.\n"); snic 1159 drivers/scsi/snic/snic_scsi.c SNIC_HOST_INFO(snic->shost, "aen:LUN_ONLINE Event Recvd.\n"); snic 1163 drivers/scsi/snic/snic_scsi.c SNIC_HOST_INFO(snic->shost, "aen:Config Change Event Recvd.\n"); snic 1167 drivers/scsi/snic/snic_scsi.c SNIC_HOST_INFO(snic->shost, "aen:TGT_ADD Event Recvd.\n"); snic 1171 drivers/scsi/snic/snic_scsi.c SNIC_HOST_INFO(snic->shost, "aen:TGT_DEL Event Recvd.\n"); snic 1175 drivers/scsi/snic/snic_scsi.c SNIC_HOST_INFO(snic->shost, "aen:LUN_ADD Event Recvd.\n"); snic 1179 drivers/scsi/snic/snic_scsi.c SNIC_HOST_INFO(snic->shost, "aen:LUN_DEL Event Recvd.\n"); snic 1183 drivers/scsi/snic/snic_scsi.c SNIC_HOST_INFO(snic->shost, "aen:DISC_CMPL Event Recvd.\n"); snic 1187 drivers/scsi/snic/snic_scsi.c SNIC_HOST_INFO(snic->shost, "aen:Unknown Event Recvd.\n"); snic 1204 drivers/scsi/snic/snic_scsi.c struct snic *snic = svnic_dev_priv(vdev); snic 1212 drivers/scsi/snic/snic_scsi.c atomic64_dec(&snic->s_stats.fw.actv_reqs); snic 1220 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 1225 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 1232 drivers/scsi/snic/snic_scsi.c snic_io_exch_ver_cmpl_handler(snic, fwreq); snic 1236 drivers/scsi/snic/snic_scsi.c snic_report_tgt_cmpl_handler(snic, fwreq); snic 1240 drivers/scsi/snic/snic_scsi.c snic_icmnd_cmpl_handler(snic, fwreq); snic 1244 drivers/scsi/snic/snic_scsi.c snic_itmf_cmpl_handler(snic, fwreq); snic 1248 drivers/scsi/snic/snic_scsi.c snic_hba_reset_cmpl_handler(snic, fwreq); snic 1252 drivers/scsi/snic/snic_scsi.c snic_msg_ack_handler(snic, fwreq); snic 1256 drivers/scsi/snic/snic_scsi.c snic_aen_handler(snic, fwreq); snic 1261 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 1269 drivers/scsi/snic/snic_scsi.c if (cmpl_time > atomic64_read(&snic->s_stats.io.max_cmpl_time)) snic 1270 drivers/scsi/snic/snic_scsi.c atomic64_set(&snic->s_stats.io.max_cmpl_time, cmpl_time); snic 1281 drivers/scsi/snic/snic_scsi.c snic_fwcq_cmpl_handler(struct snic *snic, int io_cmpl_work) snic 1286 drivers/scsi/snic/snic_scsi.c struct snic_misc_stats *misc_stats = &snic->s_stats.misc; snic 1288 drivers/scsi/snic/snic_scsi.c for (cq_idx = snic->wq_count; cq_idx < snic->cq_count; cq_idx++) { snic 1289 drivers/scsi/snic/snic_scsi.c nent_per_cq = vnic_cq_fw_service(&snic->cq[cq_idx], snic 1307 drivers/scsi/snic/snic_scsi.c snic_queue_itmf_req(struct snic *snic, snic 1327 drivers/scsi/snic/snic_scsi.c snic->config.hid, snic 1342 drivers/scsi/snic/snic_scsi.c ret = snic_queue_wq_desc(snic, tmreq, sizeof(*tmreq)); snic 1344 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 1348 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 1356 drivers/scsi/snic/snic_scsi.c snic_issue_tm_req(struct snic *snic, snic 1365 drivers/scsi/snic/snic_scsi.c if (snic_get_state(snic) == SNIC_FWRESET) snic 1368 drivers/scsi/snic/snic_scsi.c atomic_inc(&snic->ios_inflight); snic 1370 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 1376 drivers/scsi/snic/snic_scsi.c tmreq = snic_dr_req_init(snic, rqi); snic 1379 drivers/scsi/snic/snic_scsi.c tmreq = snic_abort_req_init(snic, rqi); snic 1389 drivers/scsi/snic/snic_scsi.c ret = snic_queue_itmf_req(snic, tmreq, sc, tmf, req_id); snic 1397 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 1401 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 1406 drivers/scsi/snic/snic_scsi.c atomic_dec(&snic->ios_inflight); snic 1415 drivers/scsi/snic/snic_scsi.c snic_queue_abort_req(struct snic *snic, snic 1420 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, "q_abtreq: sc %p, rqi %p, tag %x, tmf %d\n", snic 1426 drivers/scsi/snic/snic_scsi.c return snic_issue_tm_req(snic, rqi, sc, tmf); snic 1433 drivers/scsi/snic/snic_scsi.c snic_abort_finish(struct snic *snic, struct scsi_cmnd *sc) snic 1440 drivers/scsi/snic/snic_scsi.c io_lock = snic_io_lock_hash(snic, sc); snic 1444 drivers/scsi/snic/snic_scsi.c atomic64_inc(&snic->s_stats.io.req_null); snic 1447 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 1464 drivers/scsi/snic/snic_scsi.c atomic64_inc(&snic->s_stats.abts.drv_tmo); snic 1465 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 1493 drivers/scsi/snic/snic_scsi.c SNIC_HOST_INFO(snic->shost, snic 1501 drivers/scsi/snic/snic_scsi.c snic_release_req_buf(snic, rqi, sc); snic 1510 drivers/scsi/snic/snic_scsi.c snic_send_abort_and_wait(struct snic *snic, struct scsi_cmnd *sc) snic 1528 drivers/scsi/snic/snic_scsi.c io_lock = snic_io_lock_hash(snic, sc); snic 1547 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 1577 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, "send_abt_cmd: TAG 0x%x\n", tag); snic 1582 drivers/scsi/snic/snic_scsi.c ret = snic_queue_abort_req(snic, rqi, sc, tmf); snic 1584 drivers/scsi/snic/snic_scsi.c atomic64_inc(&snic->s_stats.abts.q_fail); snic 1585 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 1604 drivers/scsi/snic/snic_scsi.c atomic64_inc(&snic->s_stats.abts.num); snic 1611 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 1638 drivers/scsi/snic/snic_scsi.c struct snic *snic = shost_priv(sc->device->host); snic 1642 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, "abt_cmd:sc %p :0x%x :req = %p :tag = %d\n", snic 1645 drivers/scsi/snic/snic_scsi.c if (unlikely(snic_get_state(snic) != SNIC_ONLINE)) { snic 1646 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 1655 drivers/scsi/snic/snic_scsi.c ret = snic_send_abort_and_wait(snic, sc); snic 1659 drivers/scsi/snic/snic_scsi.c ret = snic_abort_finish(snic, sc); snic 1662 drivers/scsi/snic/snic_scsi.c SNIC_TRC(snic->shost->host_no, tag, (ulong) sc, snic 1666 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 1677 drivers/scsi/snic/snic_scsi.c snic_is_abts_pending(struct snic *snic, struct scsi_cmnd *lr_sc) snic 1690 drivers/scsi/snic/snic_scsi.c for (tag = 0; tag < snic->max_tag_id; tag++) { snic 1691 drivers/scsi/snic/snic_scsi.c io_lock = snic_io_lock_tag(snic, tag); snic 1694 drivers/scsi/snic/snic_scsi.c sc = scsi_host_find_tag(snic->shost, tag); snic 1713 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, "Found IO in %s on LUN\n", snic 1729 drivers/scsi/snic/snic_scsi.c snic_dr_clean_single_req(struct snic *snic, snic 1742 drivers/scsi/snic/snic_scsi.c io_lock = snic_io_lock_tag(snic, tag); snic 1744 drivers/scsi/snic/snic_scsi.c sc = scsi_host_find_tag(snic->shost, tag); snic 1763 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 1770 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 1791 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 1806 drivers/scsi/snic/snic_scsi.c ret = snic_queue_abort_req(snic, rqi, sc, tmf); snic 1808 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 1845 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 1859 drivers/scsi/snic/snic_scsi.c snic_release_req_buf(snic, rqi, sc); snic 1875 drivers/scsi/snic/snic_scsi.c snic_dr_clean_pending_req(struct snic *snic, struct scsi_cmnd *lr_sc) snic 1881 drivers/scsi/snic/snic_scsi.c for (tag = 0; tag < snic->max_tag_id; tag++) { snic 1885 drivers/scsi/snic/snic_scsi.c ret = snic_dr_clean_single_req(snic, tag, lr_sdev); snic 1887 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, "clean_err:tag = %d\n", tag); snic 1896 drivers/scsi/snic/snic_scsi.c if (snic_is_abts_pending(snic, lr_sc)) { snic 1903 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, "clean_pending_req: Success.\n"); snic 1909 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 1921 drivers/scsi/snic/snic_scsi.c snic_dr_finish(struct snic *snic, struct scsi_cmnd *sc) snic 1929 drivers/scsi/snic/snic_scsi.c io_lock = snic_io_lock_hash(snic, sc); snic 1934 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 1949 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 1959 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 1966 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 1983 drivers/scsi/snic/snic_scsi.c ret = snic_dr_clean_pending_req(snic, sc); snic 1986 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 2009 drivers/scsi/snic/snic_scsi.c snic_release_req_buf(snic, rqi, sc); snic 2016 drivers/scsi/snic/snic_scsi.c snic_queue_dr_req(struct snic *snic, snic 2023 drivers/scsi/snic/snic_scsi.c return snic_issue_tm_req(snic, rqi, sc, SNIC_ITMF_LUN_RESET); snic 2027 drivers/scsi/snic/snic_scsi.c snic_send_dr_and_wait(struct snic *snic, struct scsi_cmnd *sc) snic 2036 drivers/scsi/snic/snic_scsi.c io_lock = snic_io_lock_hash(snic, sc); snic 2041 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 2056 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, "dr: TAG = %x\n", tag); snic 2069 drivers/scsi/snic/snic_scsi.c ret = snic_queue_dr_req(snic, rqi, sc); snic 2071 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 2116 drivers/scsi/snic/snic_scsi.c snic_unlink_and_release_req(struct snic *snic, struct scsi_cmnd *sc, int flag) snic 2123 drivers/scsi/snic/snic_scsi.c io_lock = snic_io_lock_hash(snic, sc); snic 2135 drivers/scsi/snic/snic_scsi.c snic_release_req_buf(snic, rqi, sc); snic 2137 drivers/scsi/snic/snic_scsi.c SNIC_TRC(snic->shost->host_no, snic_cmd_tag(sc), (ulong) sc, snic 2151 drivers/scsi/snic/snic_scsi.c struct snic *snic = shost_priv(shost); snic 2165 drivers/scsi/snic/snic_scsi.c snic_unlink_and_release_req(snic, sc, SNIC_DEV_RST_NOTSUP); snic 2170 drivers/scsi/snic/snic_scsi.c if (unlikely(snic_get_state(snic) != SNIC_ONLINE)) { snic 2171 drivers/scsi/snic/snic_scsi.c snic_unlink_and_release_req(snic, sc, 0); snic 2179 drivers/scsi/snic/snic_scsi.c SNIC_HOST_INFO(snic->shost, snic 2182 drivers/scsi/snic/snic_scsi.c rqi = snic_req_init(snic, 0); snic 2196 drivers/scsi/snic/snic_scsi.c ret = snic_send_dr_and_wait(snic, sc); snic 2198 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 2202 drivers/scsi/snic/snic_scsi.c snic_unlink_and_release_req(snic, sc, 0); snic 2207 drivers/scsi/snic/snic_scsi.c ret = snic_dr_finish(snic, sc); snic 2210 drivers/scsi/snic/snic_scsi.c SNIC_TRC(snic->shost->host_no, tag, (ulong) sc, snic 2214 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 2232 drivers/scsi/snic/snic_scsi.c snic_issue_hba_reset(struct snic *snic, struct scsi_cmnd *sc) snic 2241 drivers/scsi/snic/snic_scsi.c rqi = snic_req_init(snic, 0); snic 2251 drivers/scsi/snic/snic_scsi.c SNIC_HOST_INFO(snic->shost, "issu_hr:Host reset thru ioctl.\n"); snic 2257 drivers/scsi/snic/snic_scsi.c io_lock = snic_io_lock_hash(snic, sc); snic 2263 drivers/scsi/snic/snic_scsi.c snic->remove_wait = &wait; snic 2268 drivers/scsi/snic/snic_scsi.c snic->config.hid, 0, (ulong) rqi); snic 2272 drivers/scsi/snic/snic_scsi.c ret = snic_queue_wq_desc(snic, req, sizeof(*req)); snic 2274 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 2284 drivers/scsi/snic/snic_scsi.c atomic64_inc(&snic->s_stats.reset.hba_resets); snic 2285 drivers/scsi/snic/snic_scsi.c SNIC_HOST_INFO(snic->shost, "Queued HBA Reset Successfully.\n"); snic 2287 drivers/scsi/snic/snic_scsi.c wait_for_completion_timeout(snic->remove_wait, snic 2290 drivers/scsi/snic/snic_scsi.c if (snic_get_state(snic) == SNIC_FWRESET) { snic 2291 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, "reset_cmpl: Reset Timedout.\n"); snic 2298 drivers/scsi/snic/snic_scsi.c snic->remove_wait = NULL; snic 2304 drivers/scsi/snic/snic_scsi.c snic_req_free(snic, rqi); snic 2312 drivers/scsi/snic/snic_scsi.c snic->remove_wait = NULL; snic 2318 drivers/scsi/snic/snic_scsi.c snic_req_free(snic, rqi); snic 2321 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 2331 drivers/scsi/snic/snic_scsi.c struct snic *snic = shost_priv(shost); snic 2337 drivers/scsi/snic/snic_scsi.c sv_state = snic_get_state(snic); snic 2339 drivers/scsi/snic/snic_scsi.c spin_lock_irqsave(&snic->snic_lock, flags); snic 2340 drivers/scsi/snic/snic_scsi.c if (snic_get_state(snic) == SNIC_FWRESET) { snic 2341 drivers/scsi/snic/snic_scsi.c spin_unlock_irqrestore(&snic->snic_lock, flags); snic 2350 drivers/scsi/snic/snic_scsi.c snic_set_state(snic, SNIC_FWRESET); snic 2351 drivers/scsi/snic/snic_scsi.c spin_unlock_irqrestore(&snic->snic_lock, flags); snic 2355 drivers/scsi/snic/snic_scsi.c while (atomic_read(&snic->ios_inflight)) snic 2358 drivers/scsi/snic/snic_scsi.c ret = snic_issue_hba_reset(snic, sc); snic 2363 drivers/scsi/snic/snic_scsi.c spin_lock_irqsave(&snic->snic_lock, flags); snic 2364 drivers/scsi/snic/snic_scsi.c snic_set_state(snic, sv_state); snic 2365 drivers/scsi/snic/snic_scsi.c spin_unlock_irqrestore(&snic->snic_lock, flags); snic 2366 drivers/scsi/snic/snic_scsi.c atomic64_inc(&snic->s_stats.reset.hba_reset_fail); snic 2410 drivers/scsi/snic/snic_scsi.c snic_cmpl_pending_tmreq(struct snic *snic, struct scsi_cmnd *sc) snic 2414 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 2439 drivers/scsi/snic/snic_scsi.c snic_scsi_cleanup(struct snic *snic, int ex_tag) snic 2448 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, "sc_clean: scsi cleanup.\n"); snic 2450 drivers/scsi/snic/snic_scsi.c for (tag = 0; tag < snic->max_tag_id; tag++) { snic 2455 drivers/scsi/snic/snic_scsi.c io_lock = snic_io_lock_tag(snic, tag); snic 2457 drivers/scsi/snic/snic_scsi.c sc = scsi_host_find_tag(snic->shost, tag); snic 2469 drivers/scsi/snic/snic_scsi.c snic_cmpl_pending_tmreq(snic, sc); snic 2482 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 2491 drivers/scsi/snic/snic_scsi.c SNIC_HOST_INFO(snic->shost, snic 2495 drivers/scsi/snic/snic_scsi.c snic_release_req_buf(snic, rqi, sc); snic 2499 drivers/scsi/snic/snic_scsi.c SNIC_HOST_INFO(snic->shost, snic 2505 drivers/scsi/snic/snic_scsi.c snic_stats_update_io_cmpl(&snic->s_stats); snic 2508 drivers/scsi/snic/snic_scsi.c SNIC_TRC(snic->shost->host_no, tag, (ulong) sc, snic 2519 drivers/scsi/snic/snic_scsi.c snic_shutdown_scsi_cleanup(struct snic *snic) snic 2521 drivers/scsi/snic/snic_scsi.c SNIC_HOST_INFO(snic->shost, "Shutdown time SCSI Cleanup.\n"); snic 2523 drivers/scsi/snic/snic_scsi.c snic_scsi_cleanup(snic, SCSI_NO_TAG); snic 2531 drivers/scsi/snic/snic_scsi.c snic_internal_abort_io(struct snic *snic, struct scsi_cmnd *sc, int tmf) snic 2539 drivers/scsi/snic/snic_scsi.c io_lock = snic_io_lock_hash(snic, sc); snic 2551 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 2560 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, snic 2575 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, "internal_abts:dev rst sc %p\n", sc); snic 2578 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, "internal_abts: Issuing abts tag %x\n", snic 2583 drivers/scsi/snic/snic_scsi.c ret = snic_queue_abort_req(snic, rqi, sc, tmf); snic 2585 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 2618 drivers/scsi/snic/snic_scsi.c struct snic *snic = NULL; snic 2628 drivers/scsi/snic/snic_scsi.c snic = shost_priv(snic_tgt_to_shost(tgt)); snic 2629 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, "tgt_abt_io: Cleaning Pending IOs.\n"); snic 2636 drivers/scsi/snic/snic_scsi.c for (tag = 0; tag < snic->max_tag_id; tag++) { snic 2637 drivers/scsi/snic/snic_scsi.c io_lock = snic_io_lock_tag(snic, tag); snic 2640 drivers/scsi/snic/snic_scsi.c sc = scsi_host_find_tag(snic->shost, tag); snic 2655 drivers/scsi/snic/snic_scsi.c ret = snic_internal_abort_io(snic, sc, tmf); snic 2657 drivers/scsi/snic/snic_scsi.c SNIC_HOST_ERR(snic->shost, snic 2668 drivers/scsi/snic/snic_scsi.c SNIC_SCSI_DBG(snic->shost, "tgt_abt_io: abt_cnt = %d\n", abt_cnt); snic 102 drivers/scsi/snic/snic_stats.h void snic_stats_debugfs_init(struct snic *); snic 103 drivers/scsi/snic/snic_stats.h void snic_stats_debugfs_remove(struct snic *);