Lines Matching refs:snic

23 	struct snic *snic = data;  in snic_isr_msix_wq()  local
26 snic->s_stats.misc.last_isr_time = jiffies; in snic_isr_msix_wq()
27 atomic64_inc(&snic->s_stats.misc.ack_isr_cnt); in snic_isr_msix_wq()
29 wq_work_done = snic_wq_cmpl_handler(snic, -1); in snic_isr_msix_wq()
30 svnic_intr_return_credits(&snic->intr[SNIC_MSIX_WQ], in snic_isr_msix_wq()
41 struct snic *snic = data; in snic_isr_msix_io_cmpl() local
44 snic->s_stats.misc.last_isr_time = jiffies; in snic_isr_msix_io_cmpl()
45 atomic64_inc(&snic->s_stats.misc.cmpl_isr_cnt); in snic_isr_msix_io_cmpl()
47 iocmpl_work_done = snic_fwcq_cmpl_handler(snic, -1); in snic_isr_msix_io_cmpl()
48 svnic_intr_return_credits(&snic->intr[SNIC_MSIX_IO_CMPL], in snic_isr_msix_io_cmpl()
59 struct snic *snic = data; in snic_isr_msix_err_notify() local
61 snic->s_stats.misc.last_isr_time = jiffies; in snic_isr_msix_err_notify()
62 atomic64_inc(&snic->s_stats.misc.errnotify_isr_cnt); in snic_isr_msix_err_notify()
64 svnic_intr_return_all_credits(&snic->intr[SNIC_MSIX_ERR_NOTIFY]); in snic_isr_msix_err_notify()
65 snic_log_q_error(snic); in snic_isr_msix_err_notify()
68 snic_handle_link_event(snic); in snic_isr_msix_err_notify()
75 snic_free_intr(struct snic *snic) in snic_free_intr() argument
80 for (i = 0; i < ARRAY_SIZE(snic->msix); i++) { in snic_free_intr()
81 if (snic->msix[i].requested) { in snic_free_intr()
82 free_irq(pci_irq_vector(snic->pdev, i), in snic_free_intr()
83 snic->msix[i].devid); in snic_free_intr()
89 snic_request_intr(struct snic *snic) in snic_request_intr() argument
94 intr_mode = svnic_dev_get_intr_mode(snic->vdev); in snic_request_intr()
104 sprintf(snic->msix[SNIC_MSIX_WQ].devname, in snic_request_intr()
106 snic->name); in snic_request_intr()
107 snic->msix[SNIC_MSIX_WQ].isr = snic_isr_msix_wq; in snic_request_intr()
108 snic->msix[SNIC_MSIX_WQ].devid = snic; in snic_request_intr()
110 sprintf(snic->msix[SNIC_MSIX_IO_CMPL].devname, in snic_request_intr()
112 snic->name); in snic_request_intr()
113 snic->msix[SNIC_MSIX_IO_CMPL].isr = snic_isr_msix_io_cmpl; in snic_request_intr()
114 snic->msix[SNIC_MSIX_IO_CMPL].devid = snic; in snic_request_intr()
116 sprintf(snic->msix[SNIC_MSIX_ERR_NOTIFY].devname, in snic_request_intr()
118 snic->name); in snic_request_intr()
119 snic->msix[SNIC_MSIX_ERR_NOTIFY].isr = snic_isr_msix_err_notify; in snic_request_intr()
120 snic->msix[SNIC_MSIX_ERR_NOTIFY].devid = snic; in snic_request_intr()
122 for (i = 0; i < ARRAY_SIZE(snic->msix); i++) { in snic_request_intr()
123 ret = request_irq(pci_irq_vector(snic->pdev, i), in snic_request_intr()
124 snic->msix[i].isr, in snic_request_intr()
126 snic->msix[i].devname, in snic_request_intr()
127 snic->msix[i].devid); in snic_request_intr()
129 SNIC_HOST_ERR(snic->shost, in snic_request_intr()
133 snic_free_intr(snic); in snic_request_intr()
136 snic->msix[i].requested = 1; in snic_request_intr()
143 snic_set_intr_mode(struct snic *snic) in snic_set_intr_mode() argument
145 unsigned int n = ARRAY_SIZE(snic->wq); in snic_set_intr_mode()
153 BUILD_BUG_ON((ARRAY_SIZE(snic->wq) + SNIC_CQ_IO_CMPL_MAX) > in snic_set_intr_mode()
154 ARRAY_SIZE(snic->intr)); in snic_set_intr_mode()
156 if (snic->wq_count < n || snic->cq_count < n + m) in snic_set_intr_mode()
159 if (pci_alloc_irq_vectors(snic->pdev, vecs, vecs, PCI_IRQ_MSIX) < 0) in snic_set_intr_mode()
162 snic->wq_count = n; in snic_set_intr_mode()
163 snic->cq_count = n + m; in snic_set_intr_mode()
164 snic->intr_count = vecs; in snic_set_intr_mode()
165 snic->err_intr_offset = SNIC_MSIX_ERR_NOTIFY; in snic_set_intr_mode()
167 SNIC_ISR_DBG(snic->shost, "Using MSI-X Interrupts\n"); in snic_set_intr_mode()
168 svnic_dev_set_intr_mode(snic->vdev, VNIC_DEV_INTR_MODE_MSIX); in snic_set_intr_mode()
171 svnic_dev_set_intr_mode(snic->vdev, VNIC_DEV_INTR_MODE_UNKNOWN); in snic_set_intr_mode()
176 snic_clear_intr_mode(struct snic *snic) in snic_clear_intr_mode() argument
178 pci_free_irq_vectors(snic->pdev); in snic_clear_intr_mode()
179 svnic_dev_set_intr_mode(snic->vdev, VNIC_DEV_INTR_MODE_INTX); in snic_clear_intr_mode()