• Home
  • Raw
  • Download

Lines Matching refs:snic

40 	struct snic *snic = container_of(work, struct snic, link_work);  in snic_handle_link()  local
42 if (snic->config.xpt_type != SNIC_DAS) { in snic_handle_link()
43 SNIC_HOST_INFO(snic->shost, "Link Event Received.\n"); in snic_handle_link()
49 snic->link_status = svnic_dev_link_status(snic->vdev); in snic_handle_link()
50 snic->link_down_cnt = svnic_dev_link_down_cnt(snic->vdev); in snic_handle_link()
51 SNIC_HOST_INFO(snic->shost, "Link Event: Link %s.\n", in snic_handle_link()
52 ((snic->link_status) ? "Up" : "Down")); in snic_handle_link()
108 snic_queue_exch_ver_req(struct snic *snic) in snic_queue_exch_ver_req() argument
115 SNIC_HOST_INFO(snic->shost, "Exch Ver Req Preparing...\n"); in snic_queue_exch_ver_req()
117 rqi = snic_req_init(snic, 0); in snic_queue_exch_ver_req()
119 SNIC_HOST_ERR(snic->shost, in snic_queue_exch_ver_req()
131 snic->config.hid, 0, (ulong)rqi); in snic_queue_exch_ver_req()
136 snic_handle_untagged_req(snic, rqi); in snic_queue_exch_ver_req()
138 ret = snic_queue_wq_desc(snic, req, sizeof(*req)); in snic_queue_exch_ver_req()
140 snic_release_untagged_req(snic, rqi); in snic_queue_exch_ver_req()
141 SNIC_HOST_ERR(snic->shost, in snic_queue_exch_ver_req()
147 SNIC_HOST_INFO(snic->shost, "Exch Ver Req is issued. ret = %d\n", ret); in snic_queue_exch_ver_req()
157 snic_io_exch_ver_cmpl_handler(struct snic *snic, struct snic_fw_req *fwreq) in snic_io_exch_ver_cmpl_handler() argument
167 SNIC_HOST_INFO(snic->shost, "Exch Ver Compl Received.\n"); in snic_io_exch_ver_cmpl_handler()
169 SNIC_BUG_ON(snic->config.hid != hid); in snic_io_exch_ver_cmpl_handler()
173 SNIC_HOST_ERR(snic->shost, in snic_io_exch_ver_cmpl_handler()
180 spin_lock_irqsave(&snic->snic_lock, flags); in snic_io_exch_ver_cmpl_handler()
181 snic->fwinfo.fw_ver = le32_to_cpu(exv_cmpl->version); in snic_io_exch_ver_cmpl_handler()
182 snic->fwinfo.hid = le32_to_cpu(exv_cmpl->hid); in snic_io_exch_ver_cmpl_handler()
183 snic->fwinfo.max_concur_ios = le32_to_cpu(exv_cmpl->max_concur_ios); in snic_io_exch_ver_cmpl_handler()
184 snic->fwinfo.max_sgs_per_cmd = le32_to_cpu(exv_cmpl->max_sgs_per_cmd); in snic_io_exch_ver_cmpl_handler()
185 snic->fwinfo.max_io_sz = le32_to_cpu(exv_cmpl->max_io_sz); in snic_io_exch_ver_cmpl_handler()
186 snic->fwinfo.max_tgts = le32_to_cpu(exv_cmpl->max_tgts); in snic_io_exch_ver_cmpl_handler()
187 snic->fwinfo.io_tmo = le16_to_cpu(exv_cmpl->io_timeout); in snic_io_exch_ver_cmpl_handler()
189 SNIC_HOST_INFO(snic->shost, in snic_io_exch_ver_cmpl_handler()
191 snic->fwinfo.fw_ver, in snic_io_exch_ver_cmpl_handler()
192 snic->fwinfo.hid, in snic_io_exch_ver_cmpl_handler()
193 snic->fwinfo.max_concur_ios, in snic_io_exch_ver_cmpl_handler()
194 snic->fwinfo.max_sgs_per_cmd, in snic_io_exch_ver_cmpl_handler()
195 snic->fwinfo.max_io_sz, in snic_io_exch_ver_cmpl_handler()
196 snic->fwinfo.max_tgts, in snic_io_exch_ver_cmpl_handler()
197 snic->fwinfo.io_tmo); in snic_io_exch_ver_cmpl_handler()
199 SNIC_HOST_INFO(snic->shost, in snic_io_exch_ver_cmpl_handler()
204 max_sgs = snic->fwinfo.max_sgs_per_cmd; in snic_io_exch_ver_cmpl_handler()
206 snic->shost->sg_tablesize = max_sgs; in snic_io_exch_ver_cmpl_handler()
207 SNIC_HOST_INFO(snic->shost, "Max SGs set to %d\n", in snic_io_exch_ver_cmpl_handler()
208 snic->shost->sg_tablesize); in snic_io_exch_ver_cmpl_handler()
209 } else if (max_sgs > snic->shost->sg_tablesize) { in snic_io_exch_ver_cmpl_handler()
210 SNIC_HOST_INFO(snic->shost, in snic_io_exch_ver_cmpl_handler()
212 snic->config.xpt_type, max_sgs, in snic_io_exch_ver_cmpl_handler()
213 snic->shost->sg_tablesize); in snic_io_exch_ver_cmpl_handler()
216 if (snic->shost->can_queue > snic->fwinfo.max_concur_ios) in snic_io_exch_ver_cmpl_handler()
217 snic->shost->can_queue = snic->fwinfo.max_concur_ios; in snic_io_exch_ver_cmpl_handler()
219 snic->shost->max_sectors = snic->fwinfo.max_io_sz >> 9; in snic_io_exch_ver_cmpl_handler()
220 if (snic->fwinfo.wait) in snic_io_exch_ver_cmpl_handler()
221 complete(snic->fwinfo.wait); in snic_io_exch_ver_cmpl_handler()
223 spin_unlock_irqrestore(&snic->snic_lock, flags); in snic_io_exch_ver_cmpl_handler()
226 snic_release_untagged_req(snic, rqi); in snic_io_exch_ver_cmpl_handler()
228 SNIC_HOST_INFO(snic->shost, "Exch_cmpl Done, hdr_stat %d.\n", hdr_stat); in snic_io_exch_ver_cmpl_handler()
239 snic_get_conf(struct snic *snic) in snic_get_conf() argument
246 SNIC_HOST_INFO(snic->shost, "Retrieving snic params.\n"); in snic_get_conf()
247 spin_lock_irqsave(&snic->snic_lock, flags); in snic_get_conf()
248 memset(&snic->fwinfo, 0, sizeof(snic->fwinfo)); in snic_get_conf()
249 snic->fwinfo.wait = &wait; in snic_get_conf()
250 spin_unlock_irqrestore(&snic->snic_lock, flags); in snic_get_conf()
260 ret = snic_queue_exch_ver_req(snic); in snic_get_conf()
265 spin_lock_irqsave(&snic->snic_lock, flags); in snic_get_conf()
266 ret = (snic->fwinfo.fw_ver != 0) ? 0 : -ETIMEDOUT; in snic_get_conf()
268 SNIC_HOST_ERR(snic->shost, in snic_get_conf()
273 snic->fwinfo.wait = NULL; in snic_get_conf()
275 spin_unlock_irqrestore(&snic->snic_lock, flags); in snic_get_conf()