18 #include <linux/errno.h>
19 #include <linux/types.h>
20 #include <linux/pci.h>
39 #define GET_CONFIG(m) \
41 err = vnic_dev_spec(fnic->vdev, \
42 offsetof(struct vnic_fc_config, m), \
43 sizeof(c->m), &c->m); \
45 shost_printk(KERN_ERR, fnic->lport->host, \
46 "Error getting %s, %d\n", #m, \
148 "wq/wq_copy/rq %d/%d/%d\n",
149 fnic->
ctlr.ctl_src_addr,
153 "vNIC node wwn %llx port wwn %llx\n",
156 "vNIC ed_tov %d ra_tov %d\n",
159 "vNIC mtu %d intr timer %d\n",
162 "vNIC flags 0x%x luns per tgt %d\n",
165 "vNIC flogi_retries %d flogi timeout %d\n",
168 "vNIC plogi retries %d plogi timeout %d\n",
171 "vNIC io throttle count %d link dn timeout %d\n",
174 "vNIC port dn io retries %d port dn timeout %d\n",
182 u8 rss_hash_bits,
u8 rss_base_cpu,
u8 rss_enable,
183 u8 tso_ipid_split_en,
u8 ig_vlan_strip_en)
190 rss_hash_type, rss_hash_bits, rss_base_cpu,
191 rss_enable, tso_ipid_split_en, ig_vlan_strip_en);
220 for (i = 0; i < fnic->
rq_count; i++)
223 for (i = 0; i < fnic->
cq_count; i++)
233 unsigned int mask_on_assertion;
234 unsigned int interrupt_offset;
235 unsigned int error_interrupt_enable;
236 unsigned int error_interrupt_offset;
237 unsigned int i, cq_index;
238 unsigned int wq_copy_cq_desc_count;
247 "MSI-X" :
"unknown");
250 "wq %d cp_wq %d raw_wq %d rq %d cq %d intr %d\n",
257 fnic->
config.wq_enet_desc_count,
260 goto err_out_cleanup;
267 fnic->
config.wq_copy_desc_count,
270 goto err_out_cleanup;
274 for (i = 0; i < fnic->
rq_count; i++) {
276 fnic->
config.rq_desc_count,
279 goto err_out_cleanup;
283 for (i = 0; i < fnic->
rq_count; i++) {
286 &fnic->
cq[cq_index], cq_index,
287 fnic->
config.rq_desc_count,
290 goto err_out_cleanup;
297 fnic->
config.wq_enet_desc_count,
300 goto err_out_cleanup;
304 wq_copy_cq_desc_count = (fnic->
config.wq_copy_desc_count * 3);
309 wq_copy_cq_desc_count,
312 goto err_out_cleanup;
318 goto err_out_cleanup;
326 "Failed to hook legacy pba resource\n");
328 goto err_out_cleanup;
346 error_interrupt_enable = 1;
350 error_interrupt_enable = 0;
351 error_interrupt_offset = 0;
355 for (i = 0; i < fnic->
rq_count; i++) {
359 error_interrupt_enable,
360 error_interrupt_offset);
367 error_interrupt_enable,
368 error_interrupt_offset);
374 error_interrupt_enable,
375 error_interrupt_offset);
378 for (i = 0; i < fnic->
cq_count; i++) {
382 interrupt_offset =
i;
385 interrupt_offset = 0;
412 mask_on_assertion = 1;
415 mask_on_assertion = 0;
422 fnic->
config.intr_timer_type,
430 "vnic_dev_stats_dump failed - x%x\n", err);
431 goto err_out_cleanup;