fnic 212 drivers/scsi/fnic/fnic.h struct fnic *fnic; fnic 288 drivers/scsi/fnic/fnic.h void (*set_vlan)(struct fnic *, u16 vlan); fnic 317 drivers/scsi/fnic/fnic.h static inline struct fnic *fnic_from_ctlr(struct fcoe_ctlr *fip) fnic 319 drivers/scsi/fnic/fnic.h return container_of(fip, struct fnic, ctlr); fnic 326 drivers/scsi/fnic/fnic.h void fnic_clear_intr_mode(struct fnic *fnic); fnic 327 drivers/scsi/fnic/fnic.h int fnic_set_intr_mode(struct fnic *fnic); fnic 328 drivers/scsi/fnic/fnic.h void fnic_free_intr(struct fnic *fnic); fnic 329 drivers/scsi/fnic/fnic.h int fnic_request_intr(struct fnic *fnic); fnic 336 drivers/scsi/fnic/fnic.h int fnic_rq_cmpl_handler(struct fnic *fnic, int); fnic 339 drivers/scsi/fnic/fnic.h void fnic_flush_tx(struct fnic *); fnic 343 drivers/scsi/fnic/fnic.h void fnic_update_mac_locked(struct fnic *, u8 *new); fnic 354 drivers/scsi/fnic/fnic.h int fnic_wq_copy_cmpl_handler(struct fnic *fnic, int); fnic 355 drivers/scsi/fnic/fnic.h int fnic_wq_cmpl_handler(struct fnic *fnic, int); fnic 356 drivers/scsi/fnic/fnic.h int fnic_flogi_reg_handler(struct fnic *fnic, u32); fnic 359 drivers/scsi/fnic/fnic.h int fnic_fw_reset_handler(struct fnic *fnic); fnic 363 drivers/scsi/fnic/fnic.h void fnic_log_q_error(struct fnic *fnic); fnic 364 drivers/scsi/fnic/fnic.h void fnic_handle_link_event(struct fnic *fnic); fnic 366 drivers/scsi/fnic/fnic.h int fnic_is_abts_pending(struct fnic *, struct scsi_cmnd *); fnic 369 drivers/scsi/fnic/fnic.h void fnic_handle_fip_event(struct fnic *fnic); fnic 370 drivers/scsi/fnic/fnic.h void fnic_fcoe_reset_vlans(struct fnic *fnic); fnic 371 drivers/scsi/fnic/fnic.h void fnic_fcoe_evlist_free(struct fnic *fnic); fnic 372 drivers/scsi/fnic/fnic.h extern void fnic_handle_fip_timer(struct fnic *fnic); fnic 375 drivers/scsi/fnic/fnic.h fnic_chk_state_flags_locked(struct fnic *fnic, unsigned long st_flags) fnic 377 drivers/scsi/fnic/fnic.h return ((fnic->state_flags & st_flags) == st_flags); fnic 379 drivers/scsi/fnic/fnic.h void __fnic_set_state_flags(struct fnic *, unsigned long, unsigned long); fnic 27 drivers/scsi/fnic/fnic_attrs.c struct fnic *fnic = lport_priv(lp); fnic 29 drivers/scsi/fnic/fnic_attrs.c return snprintf(buf, PAGE_SIZE, "%s\n", fnic_state_str[fnic->state]); fnic 486 drivers/scsi/fnic/fnic_debugfs.c struct fnic *fnic = (struct fnic *)debug->i_private; fnic 490 drivers/scsi/fnic/fnic_debugfs.c len = sprintf(buf, "%u\n", fnic->reset_stats); fnic 514 drivers/scsi/fnic/fnic_debugfs.c struct fnic *fnic = (struct fnic *)debug->i_private; fnic 515 drivers/scsi/fnic/fnic_debugfs.c struct fnic_stats *stats = &fnic->fnic_stats; fnic 534 drivers/scsi/fnic/fnic_debugfs.c fnic->reset_stats = val; fnic 536 drivers/scsi/fnic/fnic_debugfs.c if (fnic->reset_stats) { fnic 541 drivers/scsi/fnic/fnic_debugfs.c atomic64_set(&fnic->io_cmpl_skip, fnic 597 drivers/scsi/fnic/fnic_debugfs.c struct fnic *fnic = inode->i_private; fnic 598 drivers/scsi/fnic/fnic_debugfs.c struct fnic_stats *fnic_stats = &fnic->fnic_stats; fnic 695 drivers/scsi/fnic/fnic_debugfs.c void fnic_stats_debugfs_init(struct fnic *fnic) fnic 699 drivers/scsi/fnic/fnic_debugfs.c snprintf(name, sizeof(name), "host%d", fnic->lport->host->host_no); fnic 701 drivers/scsi/fnic/fnic_debugfs.c fnic->fnic_stats_debugfs_host = debugfs_create_dir(name, fnic 704 drivers/scsi/fnic/fnic_debugfs.c fnic->fnic_stats_debugfs_file = debugfs_create_file("stats", fnic 706 drivers/scsi/fnic/fnic_debugfs.c fnic->fnic_stats_debugfs_host, fnic 707 drivers/scsi/fnic/fnic_debugfs.c fnic, fnic 710 drivers/scsi/fnic/fnic_debugfs.c fnic->fnic_reset_debugfs_file = debugfs_create_file("reset_stats", fnic 712 drivers/scsi/fnic/fnic_debugfs.c fnic->fnic_stats_debugfs_host, fnic 713 drivers/scsi/fnic/fnic_debugfs.c fnic, fnic 724 drivers/scsi/fnic/fnic_debugfs.c void fnic_stats_debugfs_remove(struct fnic *fnic) fnic 726 drivers/scsi/fnic/fnic_debugfs.c if (!fnic) fnic 729 drivers/scsi/fnic/fnic_debugfs.c debugfs_remove(fnic->fnic_stats_debugfs_file); fnic 730 drivers/scsi/fnic/fnic_debugfs.c fnic->fnic_stats_debugfs_file = NULL; fnic 732 drivers/scsi/fnic/fnic_debugfs.c debugfs_remove(fnic->fnic_reset_debugfs_file); fnic 733 drivers/scsi/fnic/fnic_debugfs.c fnic->fnic_reset_debugfs_file = NULL; fnic 735 drivers/scsi/fnic/fnic_debugfs.c debugfs_remove(fnic->fnic_stats_debugfs_host); fnic 736 drivers/scsi/fnic/fnic_debugfs.c fnic->fnic_stats_debugfs_host = NULL; fnic 42 drivers/scsi/fnic/fnic_fcs.c static void fnic_set_eth_mode(struct fnic *); fnic 43 drivers/scsi/fnic/fnic_fcs.c static void fnic_fcoe_send_vlan_req(struct fnic *fnic); fnic 44 drivers/scsi/fnic/fnic_fcs.c static void fnic_fcoe_start_fcf_disc(struct fnic *fnic); fnic 45 drivers/scsi/fnic/fnic_fcs.c static void fnic_fcoe_process_vlan_resp(struct fnic *fnic, struct sk_buff *); fnic 46 drivers/scsi/fnic/fnic_fcs.c static int fnic_fcoe_vlan_check(struct fnic *fnic, u16 flag); fnic 47 drivers/scsi/fnic/fnic_fcs.c static int fnic_fcoe_handle_fip_frame(struct fnic *fnic, struct sk_buff *skb); fnic 51 drivers/scsi/fnic/fnic_fcs.c struct fnic *fnic = container_of(work, struct fnic, link_work); fnic 57 drivers/scsi/fnic/fnic_fcs.c spin_lock_irqsave(&fnic->fnic_lock, flags); fnic 59 drivers/scsi/fnic/fnic_fcs.c if (fnic->stop_rx_link_events) { fnic 60 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 64 drivers/scsi/fnic/fnic_fcs.c old_link_down_cnt = fnic->link_down_cnt; fnic 65 drivers/scsi/fnic/fnic_fcs.c old_link_status = fnic->link_status; fnic 67 drivers/scsi/fnic/fnic_fcs.c &fnic->fnic_stats.misc_stats.current_port_speed); fnic 69 drivers/scsi/fnic/fnic_fcs.c fnic->link_status = vnic_dev_link_status(fnic->vdev); fnic 70 drivers/scsi/fnic/fnic_fcs.c fnic->link_down_cnt = vnic_dev_link_down_cnt(fnic->vdev); fnic 72 drivers/scsi/fnic/fnic_fcs.c new_port_speed = vnic_dev_port_speed(fnic->vdev); fnic 73 drivers/scsi/fnic/fnic_fcs.c atomic64_set(&fnic->fnic_stats.misc_stats.current_port_speed, fnic 76 drivers/scsi/fnic/fnic_fcs.c shost_printk(KERN_INFO, fnic->lport->host, fnic 80 drivers/scsi/fnic/fnic_fcs.c switch (vnic_dev_port_speed(fnic->vdev)) { fnic 82 drivers/scsi/fnic/fnic_fcs.c fc_host_speed(fnic->lport->host) = FC_PORTSPEED_10GBIT; fnic 83 drivers/scsi/fnic/fnic_fcs.c fnic->lport->link_supported_speeds = FC_PORTSPEED_10GBIT; fnic 86 drivers/scsi/fnic/fnic_fcs.c fc_host_speed(fnic->lport->host) = FC_PORTSPEED_20GBIT; fnic 87 drivers/scsi/fnic/fnic_fcs.c fnic->lport->link_supported_speeds = FC_PORTSPEED_20GBIT; fnic 90 drivers/scsi/fnic/fnic_fcs.c fc_host_speed(fnic->lport->host) = FC_PORTSPEED_25GBIT; fnic 91 drivers/scsi/fnic/fnic_fcs.c fnic->lport->link_supported_speeds = FC_PORTSPEED_25GBIT; fnic 95 drivers/scsi/fnic/fnic_fcs.c fc_host_speed(fnic->lport->host) = FC_PORTSPEED_40GBIT; fnic 96 drivers/scsi/fnic/fnic_fcs.c fnic->lport->link_supported_speeds = FC_PORTSPEED_40GBIT; fnic 99 drivers/scsi/fnic/fnic_fcs.c fc_host_speed(fnic->lport->host) = FC_PORTSPEED_100GBIT; fnic 100 drivers/scsi/fnic/fnic_fcs.c fnic->lport->link_supported_speeds = FC_PORTSPEED_100GBIT; fnic 103 drivers/scsi/fnic/fnic_fcs.c fc_host_speed(fnic->lport->host) = FC_PORTSPEED_UNKNOWN; fnic 104 drivers/scsi/fnic/fnic_fcs.c fnic->lport->link_supported_speeds = FC_PORTSPEED_UNKNOWN; fnic 108 drivers/scsi/fnic/fnic_fcs.c if (old_link_status == fnic->link_status) { fnic 109 drivers/scsi/fnic/fnic_fcs.c if (!fnic->link_status) { fnic 111 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 112 drivers/scsi/fnic/fnic_fcs.c fnic_fc_trace_set_data(fnic->lport->host->host_no, fnic 116 drivers/scsi/fnic/fnic_fcs.c if (old_link_down_cnt != fnic->link_down_cnt) { fnic 118 drivers/scsi/fnic/fnic_fcs.c fnic->lport->host_stats.link_failure_count++; fnic 119 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 121 drivers/scsi/fnic/fnic_fcs.c fnic->lport->host->host_no, fnic 126 drivers/scsi/fnic/fnic_fcs.c FNIC_FCS_DBG(KERN_DEBUG, fnic->lport->host, fnic 128 drivers/scsi/fnic/fnic_fcs.c fcoe_ctlr_link_down(&fnic->ctlr); fnic 129 drivers/scsi/fnic/fnic_fcs.c if (fnic->config.flags & VFCF_FIP_CAPABLE) { fnic 132 drivers/scsi/fnic/fnic_fcs.c fnic->lport->host->host_no, fnic 138 drivers/scsi/fnic/fnic_fcs.c fnic_fcoe_send_vlan_req(fnic); fnic 141 drivers/scsi/fnic/fnic_fcs.c FNIC_FCS_DBG(KERN_DEBUG, fnic->lport->host, fnic 143 drivers/scsi/fnic/fnic_fcs.c fcoe_ctlr_link_up(&fnic->ctlr); fnic 146 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 148 drivers/scsi/fnic/fnic_fcs.c fnic->lport->host->host_no, FNIC_FC_LE, fnic 153 drivers/scsi/fnic/fnic_fcs.c } else if (fnic->link_status) { fnic 155 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 156 drivers/scsi/fnic/fnic_fcs.c if (fnic->config.flags & VFCF_FIP_CAPABLE) { fnic 159 drivers/scsi/fnic/fnic_fcs.c fnic->lport->host->host_no, fnic 162 drivers/scsi/fnic/fnic_fcs.c fnic_fcoe_send_vlan_req(fnic); fnic 165 drivers/scsi/fnic/fnic_fcs.c FNIC_FCS_DBG(KERN_DEBUG, fnic->lport->host, "link up\n"); fnic 166 drivers/scsi/fnic/fnic_fcs.c fnic_fc_trace_set_data(fnic->lport->host->host_no, FNIC_FC_LE, fnic 168 drivers/scsi/fnic/fnic_fcs.c fcoe_ctlr_link_up(&fnic->ctlr); fnic 171 drivers/scsi/fnic/fnic_fcs.c fnic->lport->host_stats.link_failure_count++; fnic 172 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 173 drivers/scsi/fnic/fnic_fcs.c FNIC_FCS_DBG(KERN_DEBUG, fnic->lport->host, "link down\n"); fnic 175 drivers/scsi/fnic/fnic_fcs.c fnic->lport->host->host_no, FNIC_FC_LE, fnic 178 drivers/scsi/fnic/fnic_fcs.c if (fnic->config.flags & VFCF_FIP_CAPABLE) { fnic 179 drivers/scsi/fnic/fnic_fcs.c FNIC_FCS_DBG(KERN_DEBUG, fnic->lport->host, fnic 181 drivers/scsi/fnic/fnic_fcs.c del_timer_sync(&fnic->fip_timer); fnic 183 drivers/scsi/fnic/fnic_fcs.c fcoe_ctlr_link_down(&fnic->ctlr); fnic 193 drivers/scsi/fnic/fnic_fcs.c struct fnic *fnic = container_of(work, struct fnic, frame_work); fnic 194 drivers/scsi/fnic/fnic_fcs.c struct fc_lport *lp = fnic->lport; fnic 199 drivers/scsi/fnic/fnic_fcs.c while ((skb = skb_dequeue(&fnic->frame_queue))) { fnic 201 drivers/scsi/fnic/fnic_fcs.c spin_lock_irqsave(&fnic->fnic_lock, flags); fnic 202 drivers/scsi/fnic/fnic_fcs.c if (fnic->stop_rx_link_events) { fnic 203 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 213 drivers/scsi/fnic/fnic_fcs.c if (fnic->state != FNIC_IN_FC_MODE && fnic 214 drivers/scsi/fnic/fnic_fcs.c fnic->state != FNIC_IN_ETH_MODE) { fnic 215 drivers/scsi/fnic/fnic_fcs.c skb_queue_head(&fnic->frame_queue, skb); fnic 216 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 219 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 225 drivers/scsi/fnic/fnic_fcs.c void fnic_fcoe_evlist_free(struct fnic *fnic) fnic 231 drivers/scsi/fnic/fnic_fcs.c spin_lock_irqsave(&fnic->fnic_lock, flags); fnic 232 drivers/scsi/fnic/fnic_fcs.c if (list_empty(&fnic->evlist)) { fnic 233 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 237 drivers/scsi/fnic/fnic_fcs.c list_for_each_entry_safe(fevt, next, &fnic->evlist, list) { fnic 241 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 246 drivers/scsi/fnic/fnic_fcs.c struct fnic *fnic = container_of(work, struct fnic, event_work); fnic 251 drivers/scsi/fnic/fnic_fcs.c spin_lock_irqsave(&fnic->fnic_lock, flags); fnic 252 drivers/scsi/fnic/fnic_fcs.c if (list_empty(&fnic->evlist)) { fnic 253 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 257 drivers/scsi/fnic/fnic_fcs.c list_for_each_entry_safe(fevt, next, &fnic->evlist, list) { fnic 258 drivers/scsi/fnic/fnic_fcs.c if (fnic->stop_rx_link_events) { fnic 261 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 268 drivers/scsi/fnic/fnic_fcs.c if (fnic->state != FNIC_IN_FC_MODE && fnic 269 drivers/scsi/fnic/fnic_fcs.c fnic->state != FNIC_IN_ETH_MODE) { fnic 270 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 277 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 278 drivers/scsi/fnic/fnic_fcs.c fnic_fcoe_send_vlan_req(fnic); fnic 279 drivers/scsi/fnic/fnic_fcs.c spin_lock_irqsave(&fnic->fnic_lock, flags); fnic 282 drivers/scsi/fnic/fnic_fcs.c FNIC_FCS_DBG(KERN_DEBUG, fnic->lport->host, fnic 284 drivers/scsi/fnic/fnic_fcs.c fnic_fcoe_start_fcf_disc(fnic); fnic 287 drivers/scsi/fnic/fnic_fcs.c FNIC_FCS_DBG(KERN_DEBUG, fnic->lport->host, fnic 293 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 373 drivers/scsi/fnic/fnic_fcs.c static void fnic_fcoe_send_vlan_req(struct fnic *fnic) fnic 375 drivers/scsi/fnic/fnic_fcs.c struct fcoe_ctlr *fip = &fnic->ctlr; fnic 376 drivers/scsi/fnic/fnic_fcs.c struct fnic_stats *fnic_stats = &fnic->fnic_stats; fnic 383 drivers/scsi/fnic/fnic_fcs.c fnic_fcoe_reset_vlans(fnic); fnic 384 drivers/scsi/fnic/fnic_fcs.c fnic->set_vlan(fnic, 0); fnic 387 drivers/scsi/fnic/fnic_fcs.c FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic 425 drivers/scsi/fnic/fnic_fcs.c mod_timer(&fnic->fip_timer, round_jiffies(vlan_tov)); fnic 428 drivers/scsi/fnic/fnic_fcs.c static void fnic_fcoe_process_vlan_resp(struct fnic *fnic, struct sk_buff *skb) fnic 430 drivers/scsi/fnic/fnic_fcs.c struct fcoe_ctlr *fip = &fnic->ctlr; fnic 433 drivers/scsi/fnic/fnic_fcs.c struct fnic_stats *fnic_stats = &fnic->fnic_stats; fnic 441 drivers/scsi/fnic/fnic_fcs.c FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic 446 drivers/scsi/fnic/fnic_fcs.c FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic 451 drivers/scsi/fnic/fnic_fcs.c fnic_fcoe_reset_vlans(fnic); fnic 452 drivers/scsi/fnic/fnic_fcs.c spin_lock_irqsave(&fnic->vlans_lock, flags); fnic 459 drivers/scsi/fnic/fnic_fcs.c shost_printk(KERN_INFO, fnic->lport->host, fnic 464 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->vlans_lock, fnic 470 drivers/scsi/fnic/fnic_fcs.c list_add_tail(&vlan->list, &fnic->vlans); fnic 478 drivers/scsi/fnic/fnic_fcs.c if (list_empty(&fnic->vlans)) { fnic 481 drivers/scsi/fnic/fnic_fcs.c FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic 483 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->vlans_lock, flags); fnic 487 drivers/scsi/fnic/fnic_fcs.c vlan = list_first_entry(&fnic->vlans, struct fcoe_vlan, list); fnic 488 drivers/scsi/fnic/fnic_fcs.c fnic->set_vlan(fnic, vlan->vid); fnic 491 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->vlans_lock, flags); fnic 497 drivers/scsi/fnic/fnic_fcs.c mod_timer(&fnic->fip_timer, round_jiffies(sol_time)); fnic 502 drivers/scsi/fnic/fnic_fcs.c static void fnic_fcoe_start_fcf_disc(struct fnic *fnic) fnic 508 drivers/scsi/fnic/fnic_fcs.c spin_lock_irqsave(&fnic->vlans_lock, flags); fnic 509 drivers/scsi/fnic/fnic_fcs.c vlan = list_first_entry(&fnic->vlans, struct fcoe_vlan, list); fnic 510 drivers/scsi/fnic/fnic_fcs.c fnic->set_vlan(fnic, vlan->vid); fnic 513 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->vlans_lock, flags); fnic 516 drivers/scsi/fnic/fnic_fcs.c fcoe_ctlr_link_up(&fnic->ctlr); fnic 519 drivers/scsi/fnic/fnic_fcs.c mod_timer(&fnic->fip_timer, round_jiffies(sol_time)); fnic 522 drivers/scsi/fnic/fnic_fcs.c static int fnic_fcoe_vlan_check(struct fnic *fnic, u16 flag) fnic 527 drivers/scsi/fnic/fnic_fcs.c spin_lock_irqsave(&fnic->vlans_lock, flags); fnic 528 drivers/scsi/fnic/fnic_fcs.c if (list_empty(&fnic->vlans)) { fnic 529 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->vlans_lock, flags); fnic 533 drivers/scsi/fnic/fnic_fcs.c fvlan = list_first_entry(&fnic->vlans, struct fcoe_vlan, list); fnic 535 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->vlans_lock, flags); fnic 541 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->vlans_lock, flags); fnic 544 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->vlans_lock, flags); fnic 548 drivers/scsi/fnic/fnic_fcs.c static void fnic_event_enq(struct fnic *fnic, enum fnic_evt ev) fnic 557 drivers/scsi/fnic/fnic_fcs.c fevt->fnic = fnic; fnic 560 drivers/scsi/fnic/fnic_fcs.c spin_lock_irqsave(&fnic->fnic_lock, flags); fnic 561 drivers/scsi/fnic/fnic_fcs.c list_add_tail(&fevt->list, &fnic->evlist); fnic 562 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 564 drivers/scsi/fnic/fnic_fcs.c schedule_work(&fnic->event_work); fnic 567 drivers/scsi/fnic/fnic_fcs.c static int fnic_fcoe_handle_fip_frame(struct fnic *fnic, struct sk_buff *skb) fnic 591 drivers/scsi/fnic/fnic_fcs.c if (fnic_fcoe_vlan_check(fnic, ntohs(fiph->fip_flags))) fnic 597 drivers/scsi/fnic/fnic_fcs.c fnic_fcoe_process_vlan_resp(fnic, skb); fnic 601 drivers/scsi/fnic/fnic_fcs.c fnic_event_enq(fnic, FNIC_EVT_START_VLAN_DISC); fnic 611 drivers/scsi/fnic/fnic_fcs.c struct fnic *fnic = container_of(work, struct fnic, fip_frame_work); fnic 612 drivers/scsi/fnic/fnic_fcs.c struct fnic_stats *fnic_stats = &fnic->fnic_stats; fnic 617 drivers/scsi/fnic/fnic_fcs.c while ((skb = skb_dequeue(&fnic->fip_frame_queue))) { fnic 618 drivers/scsi/fnic/fnic_fcs.c spin_lock_irqsave(&fnic->fnic_lock, flags); fnic 619 drivers/scsi/fnic/fnic_fcs.c if (fnic->stop_rx_link_events) { fnic 620 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 628 drivers/scsi/fnic/fnic_fcs.c if (fnic->state != FNIC_IN_FC_MODE && fnic 629 drivers/scsi/fnic/fnic_fcs.c fnic->state != FNIC_IN_ETH_MODE) { fnic 630 drivers/scsi/fnic/fnic_fcs.c skb_queue_head(&fnic->fip_frame_queue, skb); fnic 631 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 634 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 638 drivers/scsi/fnic/fnic_fcs.c if (fnic_fcoe_handle_fip_frame(fnic, skb) <= 0) { fnic 646 drivers/scsi/fnic/fnic_fcs.c if (is_fnic_fip_flogi_reject(&fnic->ctlr, skb)) { fnic 649 drivers/scsi/fnic/fnic_fcs.c shost_printk(KERN_INFO, fnic->lport->host, fnic 651 drivers/scsi/fnic/fnic_fcs.c fcoe_ctlr_link_down(&fnic->ctlr); fnic 653 drivers/scsi/fnic/fnic_fcs.c fnic_fcoe_send_vlan_req(fnic); fnic 657 drivers/scsi/fnic/fnic_fcs.c fcoe_ctlr_recv(&fnic->ctlr, skb); fnic 668 drivers/scsi/fnic/fnic_fcs.c static inline int fnic_import_rq_eth_pkt(struct fnic *fnic, struct sk_buff *skb) fnic 685 drivers/scsi/fnic/fnic_fcs.c if (!(fnic->config.flags & VFCF_FIP_CAPABLE)) { fnic 691 drivers/scsi/fnic/fnic_fcs.c if ((fnic_fc_trace_set_data(fnic->lport->host->host_no, fnic 695 drivers/scsi/fnic/fnic_fcs.c skb_queue_tail(&fnic->fip_frame_queue, skb); fnic 696 drivers/scsi/fnic/fnic_fcs.c queue_work(fnic_fip_queue, &fnic->fip_frame_work); fnic 730 drivers/scsi/fnic/fnic_fcs.c void fnic_update_mac_locked(struct fnic *fnic, u8 *new) fnic 732 drivers/scsi/fnic/fnic_fcs.c u8 *ctl = fnic->ctlr.ctl_src_addr; fnic 733 drivers/scsi/fnic/fnic_fcs.c u8 *data = fnic->data_src_addr; fnic 739 drivers/scsi/fnic/fnic_fcs.c FNIC_FCS_DBG(KERN_DEBUG, fnic->lport->host, "update_mac %pM\n", new); fnic 741 drivers/scsi/fnic/fnic_fcs.c vnic_dev_del_addr(fnic->vdev, data); fnic 744 drivers/scsi/fnic/fnic_fcs.c vnic_dev_add_addr(fnic->vdev, new); fnic 754 drivers/scsi/fnic/fnic_fcs.c struct fnic *fnic = lport_priv(lport); fnic 756 drivers/scsi/fnic/fnic_fcs.c spin_lock_irq(&fnic->fnic_lock); fnic 757 drivers/scsi/fnic/fnic_fcs.c fnic_update_mac_locked(fnic, new); fnic 758 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irq(&fnic->fnic_lock); fnic 777 drivers/scsi/fnic/fnic_fcs.c struct fnic *fnic = lport_priv(lport); fnic 789 drivers/scsi/fnic/fnic_fcs.c fnic_update_mac(lport, fnic->ctlr.ctl_src_addr); fnic 790 drivers/scsi/fnic/fnic_fcs.c fnic_set_eth_mode(fnic); fnic 798 drivers/scsi/fnic/fnic_fcs.c fcoe_ctlr_recv_flogi(&fnic->ctlr, lport, fp); fnic 804 drivers/scsi/fnic/fnic_fcs.c spin_lock_irq(&fnic->fnic_lock); fnic 805 drivers/scsi/fnic/fnic_fcs.c if (fnic->state == FNIC_IN_ETH_MODE || fnic->state == FNIC_IN_FC_MODE) fnic 806 drivers/scsi/fnic/fnic_fcs.c fnic->state = FNIC_IN_ETH_TRANS_FC_MODE; fnic 808 drivers/scsi/fnic/fnic_fcs.c FNIC_FCS_DBG(KERN_DEBUG, fnic->lport->host, fnic 811 drivers/scsi/fnic/fnic_fcs.c fnic_state_to_str(fnic->state)); fnic 812 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irq(&fnic->fnic_lock); fnic 815 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irq(&fnic->fnic_lock); fnic 821 drivers/scsi/fnic/fnic_fcs.c ret = fnic_flogi_reg_handler(fnic, port_id); fnic 824 drivers/scsi/fnic/fnic_fcs.c spin_lock_irq(&fnic->fnic_lock); fnic 825 drivers/scsi/fnic/fnic_fcs.c if (fnic->state == FNIC_IN_ETH_TRANS_FC_MODE) fnic 826 drivers/scsi/fnic/fnic_fcs.c fnic->state = FNIC_IN_ETH_MODE; fnic 827 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irq(&fnic->fnic_lock); fnic 836 drivers/scsi/fnic/fnic_fcs.c struct fnic *fnic = vnic_dev_priv(rq->vdev); fnic 839 drivers/scsi/fnic/fnic_fcs.c struct fnic_stats *fnic_stats = &fnic->fnic_stats; fnic 855 drivers/scsi/fnic/fnic_fcs.c dma_unmap_single(&fnic->pdev->dev, buf->dma_addr, buf->len, fnic 891 drivers/scsi/fnic/fnic_fcs.c FNIC_FCS_DBG(KERN_DEBUG, fnic->lport->host, fnic 895 drivers/scsi/fnic/fnic_fcs.c if (fnic_import_rq_eth_pkt(fnic, skb)) fnic 900 drivers/scsi/fnic/fnic_fcs.c shost_printk(KERN_ERR, fnic->lport->host, fnic 907 drivers/scsi/fnic/fnic_fcs.c FNIC_FCS_DBG(KERN_DEBUG, fnic->lport->host, fnic 916 drivers/scsi/fnic/fnic_fcs.c spin_lock_irqsave(&fnic->fnic_lock, flags); fnic 917 drivers/scsi/fnic/fnic_fcs.c if (fnic->stop_rx_link_events) { fnic 918 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 921 drivers/scsi/fnic/fnic_fcs.c fr_dev(fp) = fnic->lport; fnic 922 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 923 drivers/scsi/fnic/fnic_fcs.c if ((fnic_fc_trace_set_data(fnic->lport->host->host_no, FNIC_FC_RECV, fnic 928 drivers/scsi/fnic/fnic_fcs.c skb_queue_tail(&fnic->frame_queue, skb); fnic 929 drivers/scsi/fnic/fnic_fcs.c queue_work(fnic_event_queue, &fnic->frame_work); fnic 941 drivers/scsi/fnic/fnic_fcs.c struct fnic *fnic = vnic_dev_priv(vdev); fnic 943 drivers/scsi/fnic/fnic_fcs.c vnic_rq_service(&fnic->rq[q_number], cq_desc, completed_index, fnic 949 drivers/scsi/fnic/fnic_fcs.c int fnic_rq_cmpl_handler(struct fnic *fnic, int rq_work_to_do) fnic 955 drivers/scsi/fnic/fnic_fcs.c for (i = 0; i < fnic->rq_count; i++) { fnic 956 drivers/scsi/fnic/fnic_fcs.c cur_work_done = vnic_cq_service(&fnic->cq[i], rq_work_to_do, fnic 960 drivers/scsi/fnic/fnic_fcs.c err = vnic_rq_fill(&fnic->rq[i], fnic_alloc_rq_frame); fnic 962 drivers/scsi/fnic/fnic_fcs.c shost_printk(KERN_ERR, fnic->lport->host, fnic 979 drivers/scsi/fnic/fnic_fcs.c struct fnic *fnic = vnic_dev_priv(rq->vdev); fnic 988 drivers/scsi/fnic/fnic_fcs.c FNIC_FCS_DBG(KERN_DEBUG, fnic->lport->host, fnic 996 drivers/scsi/fnic/fnic_fcs.c pa = dma_map_single(&fnic->pdev->dev, skb->data, len, DMA_FROM_DEVICE); fnic 997 drivers/scsi/fnic/fnic_fcs.c if (dma_mapping_error(&fnic->pdev->dev, pa)) { fnic 1014 drivers/scsi/fnic/fnic_fcs.c struct fnic *fnic = vnic_dev_priv(rq->vdev); fnic 1016 drivers/scsi/fnic/fnic_fcs.c dma_unmap_single(&fnic->pdev->dev, buf->dma_addr, buf->len, fnic 1030 drivers/scsi/fnic/fnic_fcs.c struct fnic *fnic = fnic_from_ctlr(fip); fnic 1031 drivers/scsi/fnic/fnic_fcs.c struct vnic_wq *wq = &fnic->wq[0]; fnic 1037 drivers/scsi/fnic/fnic_fcs.c if (!fnic->vlan_hw_insert) { fnic 1043 drivers/scsi/fnic/fnic_fcs.c vlan_hdr->h_vlan_TCI = htons(fnic->vlan_id); fnic 1044 drivers/scsi/fnic/fnic_fcs.c if ((fnic_fc_trace_set_data(fnic->lport->host->host_no, fnic 1049 drivers/scsi/fnic/fnic_fcs.c if ((fnic_fc_trace_set_data(fnic->lport->host->host_no, fnic 1055 drivers/scsi/fnic/fnic_fcs.c pa = dma_map_single(&fnic->pdev->dev, skb->data, skb->len, fnic 1057 drivers/scsi/fnic/fnic_fcs.c if (dma_mapping_error(&fnic->pdev->dev, pa)) { fnic 1062 drivers/scsi/fnic/fnic_fcs.c spin_lock_irqsave(&fnic->wq_lock[0], flags); fnic 1068 drivers/scsi/fnic/fnic_fcs.c fnic->vlan_id, 1); fnic 1069 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->wq_lock[0], flags); fnic 1073 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->wq_lock[0], flags); fnic 1074 drivers/scsi/fnic/fnic_fcs.c dma_unmap_single(&fnic->pdev->dev, pa, skb->len, DMA_TO_DEVICE); fnic 1082 drivers/scsi/fnic/fnic_fcs.c static int fnic_send_frame(struct fnic *fnic, struct fc_frame *fp) fnic 1084 drivers/scsi/fnic/fnic_fcs.c struct vnic_wq *wq = &fnic->wq[0]; fnic 1099 drivers/scsi/fnic/fnic_fcs.c fcoe_ctlr_els_send(&fnic->ctlr, fnic->lport, skb)) fnic 1102 drivers/scsi/fnic/fnic_fcs.c if (!fnic->vlan_hw_insert) { fnic 1108 drivers/scsi/fnic/fnic_fcs.c vlan_hdr->h_vlan_TCI = htons(fnic->vlan_id); fnic 1117 drivers/scsi/fnic/fnic_fcs.c if (fnic->ctlr.map_dest) fnic 1120 drivers/scsi/fnic/fnic_fcs.c memcpy(eth_hdr->h_dest, fnic->ctlr.dest_addr, ETH_ALEN); fnic 1121 drivers/scsi/fnic/fnic_fcs.c memcpy(eth_hdr->h_source, fnic->data_src_addr, ETH_ALEN); fnic 1131 drivers/scsi/fnic/fnic_fcs.c pa = dma_map_single(&fnic->pdev->dev, eth_hdr, tot_len, DMA_TO_DEVICE); fnic 1132 drivers/scsi/fnic/fnic_fcs.c if (dma_mapping_error(&fnic->pdev->dev, pa)) { fnic 1138 drivers/scsi/fnic/fnic_fcs.c if ((fnic_fc_trace_set_data(fnic->lport->host->host_no, FNIC_FC_SEND, fnic 1143 drivers/scsi/fnic/fnic_fcs.c spin_lock_irqsave(&fnic->wq_lock[0], flags); fnic 1146 drivers/scsi/fnic/fnic_fcs.c dma_unmap_single(&fnic->pdev->dev, pa, tot_len, DMA_TO_DEVICE); fnic 1153 drivers/scsi/fnic/fnic_fcs.c fnic->vlan_id, 1, 1, 1); fnic 1156 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->wq_lock[0], flags); fnic 1171 drivers/scsi/fnic/fnic_fcs.c struct fnic *fnic = lport_priv(lp); fnic 1174 drivers/scsi/fnic/fnic_fcs.c if (fnic->in_remove) { fnic 1183 drivers/scsi/fnic/fnic_fcs.c spin_lock_irqsave(&fnic->fnic_lock, flags); fnic 1184 drivers/scsi/fnic/fnic_fcs.c if (fnic->state != FNIC_IN_FC_MODE && fnic->state != FNIC_IN_ETH_MODE) { fnic 1185 drivers/scsi/fnic/fnic_fcs.c skb_queue_tail(&fnic->tx_queue, fp_skb(fp)); fnic 1186 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 1189 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 1191 drivers/scsi/fnic/fnic_fcs.c return fnic_send_frame(fnic, fp); fnic 1204 drivers/scsi/fnic/fnic_fcs.c void fnic_flush_tx(struct fnic *fnic) fnic 1209 drivers/scsi/fnic/fnic_fcs.c while ((skb = skb_dequeue(&fnic->tx_queue))) { fnic 1211 drivers/scsi/fnic/fnic_fcs.c fnic_send_frame(fnic, fp); fnic 1221 drivers/scsi/fnic/fnic_fcs.c static void fnic_set_eth_mode(struct fnic *fnic) fnic 1227 drivers/scsi/fnic/fnic_fcs.c spin_lock_irqsave(&fnic->fnic_lock, flags); fnic 1229 drivers/scsi/fnic/fnic_fcs.c old_state = fnic->state; fnic 1234 drivers/scsi/fnic/fnic_fcs.c fnic->state = FNIC_IN_FC_TRANS_ETH_MODE; fnic 1235 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 1237 drivers/scsi/fnic/fnic_fcs.c ret = fnic_fw_reset_handler(fnic); fnic 1239 drivers/scsi/fnic/fnic_fcs.c spin_lock_irqsave(&fnic->fnic_lock, flags); fnic 1240 drivers/scsi/fnic/fnic_fcs.c if (fnic->state != FNIC_IN_FC_TRANS_ETH_MODE) fnic 1243 drivers/scsi/fnic/fnic_fcs.c fnic->state = old_state; fnic 1250 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 1259 drivers/scsi/fnic/fnic_fcs.c struct fnic *fnic = vnic_dev_priv(wq->vdev); fnic 1261 drivers/scsi/fnic/fnic_fcs.c dma_unmap_single(&fnic->pdev->dev, buf->dma_addr, buf->len, fnic 1272 drivers/scsi/fnic/fnic_fcs.c struct fnic *fnic = vnic_dev_priv(vdev); fnic 1275 drivers/scsi/fnic/fnic_fcs.c spin_lock_irqsave(&fnic->wq_lock[q_number], flags); fnic 1276 drivers/scsi/fnic/fnic_fcs.c vnic_wq_service(&fnic->wq[q_number], cq_desc, completed_index, fnic 1278 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->wq_lock[q_number], flags); fnic 1283 drivers/scsi/fnic/fnic_fcs.c int fnic_wq_cmpl_handler(struct fnic *fnic, int work_to_do) fnic 1288 drivers/scsi/fnic/fnic_fcs.c for (i = 0; i < fnic->raw_wq_count; i++) { fnic 1289 drivers/scsi/fnic/fnic_fcs.c wq_work_done += vnic_cq_service(&fnic->cq[fnic->rq_count+i], fnic 1302 drivers/scsi/fnic/fnic_fcs.c struct fnic *fnic = vnic_dev_priv(wq->vdev); fnic 1304 drivers/scsi/fnic/fnic_fcs.c dma_unmap_single(&fnic->pdev->dev, buf->dma_addr, buf->len, fnic 1311 drivers/scsi/fnic/fnic_fcs.c void fnic_fcoe_reset_vlans(struct fnic *fnic) fnic 1322 drivers/scsi/fnic/fnic_fcs.c spin_lock_irqsave(&fnic->vlans_lock, flags); fnic 1323 drivers/scsi/fnic/fnic_fcs.c if (!list_empty(&fnic->vlans)) { fnic 1324 drivers/scsi/fnic/fnic_fcs.c list_for_each_entry_safe(vlan, next, &fnic->vlans, list) { fnic 1329 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->vlans_lock, flags); fnic 1332 drivers/scsi/fnic/fnic_fcs.c void fnic_handle_fip_timer(struct fnic *fnic) fnic 1336 drivers/scsi/fnic/fnic_fcs.c struct fnic_stats *fnic_stats = &fnic->fnic_stats; fnic 1339 drivers/scsi/fnic/fnic_fcs.c spin_lock_irqsave(&fnic->fnic_lock, flags); fnic 1340 drivers/scsi/fnic/fnic_fcs.c if (fnic->stop_rx_link_events) { fnic 1341 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 1344 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 1346 drivers/scsi/fnic/fnic_fcs.c if (fnic->ctlr.mode == FIP_MODE_NON_FIP) fnic 1349 drivers/scsi/fnic/fnic_fcs.c spin_lock_irqsave(&fnic->vlans_lock, flags); fnic 1350 drivers/scsi/fnic/fnic_fcs.c if (list_empty(&fnic->vlans)) { fnic 1351 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->vlans_lock, flags); fnic 1354 drivers/scsi/fnic/fnic_fcs.c FNIC_FCS_DBG(KERN_DEBUG, fnic->lport->host, fnic 1356 drivers/scsi/fnic/fnic_fcs.c fnic_event_enq(fnic, FNIC_EVT_START_VLAN_DISC); fnic 1360 drivers/scsi/fnic/fnic_fcs.c vlan = list_first_entry(&fnic->vlans, struct fcoe_vlan, list); fnic 1361 drivers/scsi/fnic/fnic_fcs.c shost_printk(KERN_DEBUG, fnic->lport->host, fnic 1366 drivers/scsi/fnic/fnic_fcs.c FNIC_FCS_DBG(KERN_DEBUG, fnic->lport->host, fnic 1368 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->vlans_lock, flags); fnic 1371 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->vlans_lock, flags); fnic 1374 drivers/scsi/fnic/fnic_fcs.c FNIC_FCS_DBG(KERN_DEBUG, fnic->lport->host, fnic 1376 drivers/scsi/fnic/fnic_fcs.c fnic_event_enq(fnic, FNIC_EVT_START_VLAN_DISC); fnic 1384 drivers/scsi/fnic/fnic_fcs.c shost_printk(KERN_INFO, fnic->lport->host, fnic 1390 drivers/scsi/fnic/fnic_fcs.c if (list_empty(&fnic->vlans)) { fnic 1392 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->vlans_lock, fnic 1394 drivers/scsi/fnic/fnic_fcs.c shost_printk(KERN_INFO, fnic->lport->host, fnic 1397 drivers/scsi/fnic/fnic_fcs.c fnic_event_enq(fnic, FNIC_EVT_START_VLAN_DISC); fnic 1401 drivers/scsi/fnic/fnic_fcs.c vlan = list_first_entry(&fnic->vlans, struct fcoe_vlan, fnic 1403 drivers/scsi/fnic/fnic_fcs.c fnic->set_vlan(fnic, vlan->vid); fnic 1406 drivers/scsi/fnic/fnic_fcs.c spin_unlock_irqrestore(&fnic->vlans_lock, flags); fnic 1411 drivers/scsi/fnic/fnic_fcs.c mod_timer(&fnic->fip_timer, round_jiffies(sol_time)); fnic 32 drivers/scsi/fnic/fnic_isr.c struct fnic *fnic = data; fnic 36 drivers/scsi/fnic/fnic_isr.c pba = vnic_intr_legacy_pba(fnic->legacy_pba); fnic 40 drivers/scsi/fnic/fnic_isr.c fnic->fnic_stats.misc_stats.last_isr_time = jiffies; fnic 41 drivers/scsi/fnic/fnic_isr.c atomic64_inc(&fnic->fnic_stats.misc_stats.isr_count); fnic 44 drivers/scsi/fnic/fnic_isr.c vnic_intr_return_all_credits(&fnic->intr[FNIC_INTX_NOTIFY]); fnic 45 drivers/scsi/fnic/fnic_isr.c fnic_handle_link_event(fnic); fnic 49 drivers/scsi/fnic/fnic_isr.c vnic_intr_return_all_credits(&fnic->intr[FNIC_INTX_ERR]); fnic 50 drivers/scsi/fnic/fnic_isr.c fnic_log_q_error(fnic); fnic 54 drivers/scsi/fnic/fnic_isr.c work_done += fnic_wq_copy_cmpl_handler(fnic, io_completions); fnic 55 drivers/scsi/fnic/fnic_isr.c work_done += fnic_wq_cmpl_handler(fnic, -1); fnic 56 drivers/scsi/fnic/fnic_isr.c work_done += fnic_rq_cmpl_handler(fnic, -1); fnic 58 drivers/scsi/fnic/fnic_isr.c vnic_intr_return_credits(&fnic->intr[FNIC_INTX_WQ_RQ_COPYWQ], fnic 69 drivers/scsi/fnic/fnic_isr.c struct fnic *fnic = data; fnic 72 drivers/scsi/fnic/fnic_isr.c fnic->fnic_stats.misc_stats.last_isr_time = jiffies; fnic 73 drivers/scsi/fnic/fnic_isr.c atomic64_inc(&fnic->fnic_stats.misc_stats.isr_count); fnic 75 drivers/scsi/fnic/fnic_isr.c work_done += fnic_wq_copy_cmpl_handler(fnic, io_completions); fnic 76 drivers/scsi/fnic/fnic_isr.c work_done += fnic_wq_cmpl_handler(fnic, -1); fnic 77 drivers/scsi/fnic/fnic_isr.c work_done += fnic_rq_cmpl_handler(fnic, -1); fnic 79 drivers/scsi/fnic/fnic_isr.c vnic_intr_return_credits(&fnic->intr[0], fnic 89 drivers/scsi/fnic/fnic_isr.c struct fnic *fnic = data; fnic 92 drivers/scsi/fnic/fnic_isr.c fnic->fnic_stats.misc_stats.last_isr_time = jiffies; fnic 93 drivers/scsi/fnic/fnic_isr.c atomic64_inc(&fnic->fnic_stats.misc_stats.isr_count); fnic 95 drivers/scsi/fnic/fnic_isr.c rq_work_done = fnic_rq_cmpl_handler(fnic, -1); fnic 96 drivers/scsi/fnic/fnic_isr.c vnic_intr_return_credits(&fnic->intr[FNIC_MSIX_RQ], fnic 106 drivers/scsi/fnic/fnic_isr.c struct fnic *fnic = data; fnic 109 drivers/scsi/fnic/fnic_isr.c fnic->fnic_stats.misc_stats.last_isr_time = jiffies; fnic 110 drivers/scsi/fnic/fnic_isr.c atomic64_inc(&fnic->fnic_stats.misc_stats.isr_count); fnic 112 drivers/scsi/fnic/fnic_isr.c wq_work_done = fnic_wq_cmpl_handler(fnic, -1); fnic 113 drivers/scsi/fnic/fnic_isr.c vnic_intr_return_credits(&fnic->intr[FNIC_MSIX_WQ], fnic 122 drivers/scsi/fnic/fnic_isr.c struct fnic *fnic = data; fnic 125 drivers/scsi/fnic/fnic_isr.c fnic->fnic_stats.misc_stats.last_isr_time = jiffies; fnic 126 drivers/scsi/fnic/fnic_isr.c atomic64_inc(&fnic->fnic_stats.misc_stats.isr_count); fnic 128 drivers/scsi/fnic/fnic_isr.c wq_copy_work_done = fnic_wq_copy_cmpl_handler(fnic, io_completions); fnic 129 drivers/scsi/fnic/fnic_isr.c vnic_intr_return_credits(&fnic->intr[FNIC_MSIX_WQ_COPY], fnic 138 drivers/scsi/fnic/fnic_isr.c struct fnic *fnic = data; fnic 140 drivers/scsi/fnic/fnic_isr.c fnic->fnic_stats.misc_stats.last_isr_time = jiffies; fnic 141 drivers/scsi/fnic/fnic_isr.c atomic64_inc(&fnic->fnic_stats.misc_stats.isr_count); fnic 143 drivers/scsi/fnic/fnic_isr.c vnic_intr_return_all_credits(&fnic->intr[FNIC_MSIX_ERR_NOTIFY]); fnic 144 drivers/scsi/fnic/fnic_isr.c fnic_log_q_error(fnic); fnic 145 drivers/scsi/fnic/fnic_isr.c fnic_handle_link_event(fnic); fnic 150 drivers/scsi/fnic/fnic_isr.c void fnic_free_intr(struct fnic *fnic) fnic 154 drivers/scsi/fnic/fnic_isr.c switch (vnic_dev_get_intr_mode(fnic->vdev)) { fnic 157 drivers/scsi/fnic/fnic_isr.c free_irq(pci_irq_vector(fnic->pdev, 0), fnic); fnic 161 drivers/scsi/fnic/fnic_isr.c for (i = 0; i < ARRAY_SIZE(fnic->msix); i++) fnic 162 drivers/scsi/fnic/fnic_isr.c if (fnic->msix[i].requested) fnic 163 drivers/scsi/fnic/fnic_isr.c free_irq(pci_irq_vector(fnic->pdev, i), fnic 164 drivers/scsi/fnic/fnic_isr.c fnic->msix[i].devid); fnic 172 drivers/scsi/fnic/fnic_isr.c int fnic_request_intr(struct fnic *fnic) fnic 177 drivers/scsi/fnic/fnic_isr.c switch (vnic_dev_get_intr_mode(fnic->vdev)) { fnic 180 drivers/scsi/fnic/fnic_isr.c err = request_irq(pci_irq_vector(fnic->pdev, 0), fnic 181 drivers/scsi/fnic/fnic_isr.c &fnic_isr_legacy, IRQF_SHARED, DRV_NAME, fnic); fnic 185 drivers/scsi/fnic/fnic_isr.c err = request_irq(pci_irq_vector(fnic->pdev, 0), &fnic_isr_msi, fnic 186 drivers/scsi/fnic/fnic_isr.c 0, fnic->name, fnic); fnic 191 drivers/scsi/fnic/fnic_isr.c sprintf(fnic->msix[FNIC_MSIX_RQ].devname, fnic 192 drivers/scsi/fnic/fnic_isr.c "%.11s-fcs-rq", fnic->name); fnic 193 drivers/scsi/fnic/fnic_isr.c fnic->msix[FNIC_MSIX_RQ].isr = fnic_isr_msix_rq; fnic 194 drivers/scsi/fnic/fnic_isr.c fnic->msix[FNIC_MSIX_RQ].devid = fnic; fnic 196 drivers/scsi/fnic/fnic_isr.c sprintf(fnic->msix[FNIC_MSIX_WQ].devname, fnic 197 drivers/scsi/fnic/fnic_isr.c "%.11s-fcs-wq", fnic->name); fnic 198 drivers/scsi/fnic/fnic_isr.c fnic->msix[FNIC_MSIX_WQ].isr = fnic_isr_msix_wq; fnic 199 drivers/scsi/fnic/fnic_isr.c fnic->msix[FNIC_MSIX_WQ].devid = fnic; fnic 201 drivers/scsi/fnic/fnic_isr.c sprintf(fnic->msix[FNIC_MSIX_WQ_COPY].devname, fnic 202 drivers/scsi/fnic/fnic_isr.c "%.11s-scsi-wq", fnic->name); fnic 203 drivers/scsi/fnic/fnic_isr.c fnic->msix[FNIC_MSIX_WQ_COPY].isr = fnic_isr_msix_wq_copy; fnic 204 drivers/scsi/fnic/fnic_isr.c fnic->msix[FNIC_MSIX_WQ_COPY].devid = fnic; fnic 206 drivers/scsi/fnic/fnic_isr.c sprintf(fnic->msix[FNIC_MSIX_ERR_NOTIFY].devname, fnic 207 drivers/scsi/fnic/fnic_isr.c "%.11s-err-notify", fnic->name); fnic 208 drivers/scsi/fnic/fnic_isr.c fnic->msix[FNIC_MSIX_ERR_NOTIFY].isr = fnic 210 drivers/scsi/fnic/fnic_isr.c fnic->msix[FNIC_MSIX_ERR_NOTIFY].devid = fnic; fnic 212 drivers/scsi/fnic/fnic_isr.c for (i = 0; i < ARRAY_SIZE(fnic->msix); i++) { fnic 213 drivers/scsi/fnic/fnic_isr.c err = request_irq(pci_irq_vector(fnic->pdev, i), fnic 214 drivers/scsi/fnic/fnic_isr.c fnic->msix[i].isr, 0, fnic 215 drivers/scsi/fnic/fnic_isr.c fnic->msix[i].devname, fnic 216 drivers/scsi/fnic/fnic_isr.c fnic->msix[i].devid); fnic 218 drivers/scsi/fnic/fnic_isr.c shost_printk(KERN_ERR, fnic->lport->host, fnic 221 drivers/scsi/fnic/fnic_isr.c fnic_free_intr(fnic); fnic 224 drivers/scsi/fnic/fnic_isr.c fnic->msix[i].requested = 1; fnic 235 drivers/scsi/fnic/fnic_isr.c int fnic_set_intr_mode(struct fnic *fnic) fnic 237 drivers/scsi/fnic/fnic_isr.c unsigned int n = ARRAY_SIZE(fnic->rq); fnic 238 drivers/scsi/fnic/fnic_isr.c unsigned int m = ARRAY_SIZE(fnic->wq); fnic 239 drivers/scsi/fnic/fnic_isr.c unsigned int o = ARRAY_SIZE(fnic->wq_copy); fnic 250 drivers/scsi/fnic/fnic_isr.c if (fnic->rq_count >= n && fnic 251 drivers/scsi/fnic/fnic_isr.c fnic->raw_wq_count >= m && fnic 252 drivers/scsi/fnic/fnic_isr.c fnic->wq_copy_count >= o && fnic 253 drivers/scsi/fnic/fnic_isr.c fnic->cq_count >= n + m + o) { fnic 256 drivers/scsi/fnic/fnic_isr.c if (pci_alloc_irq_vectors(fnic->pdev, vecs, vecs, fnic 258 drivers/scsi/fnic/fnic_isr.c fnic->rq_count = n; fnic 259 drivers/scsi/fnic/fnic_isr.c fnic->raw_wq_count = m; fnic 260 drivers/scsi/fnic/fnic_isr.c fnic->wq_copy_count = o; fnic 261 drivers/scsi/fnic/fnic_isr.c fnic->wq_count = m + o; fnic 262 drivers/scsi/fnic/fnic_isr.c fnic->cq_count = n + m + o; fnic 263 drivers/scsi/fnic/fnic_isr.c fnic->intr_count = vecs; fnic 264 drivers/scsi/fnic/fnic_isr.c fnic->err_intr_offset = FNIC_MSIX_ERR_NOTIFY; fnic 266 drivers/scsi/fnic/fnic_isr.c FNIC_ISR_DBG(KERN_DEBUG, fnic->lport->host, fnic 268 drivers/scsi/fnic/fnic_isr.c vnic_dev_set_intr_mode(fnic->vdev, fnic 278 drivers/scsi/fnic/fnic_isr.c if (fnic->rq_count >= 1 && fnic 279 drivers/scsi/fnic/fnic_isr.c fnic->raw_wq_count >= 1 && fnic 280 drivers/scsi/fnic/fnic_isr.c fnic->wq_copy_count >= 1 && fnic 281 drivers/scsi/fnic/fnic_isr.c fnic->cq_count >= 3 && fnic 282 drivers/scsi/fnic/fnic_isr.c fnic->intr_count >= 1 && fnic 283 drivers/scsi/fnic/fnic_isr.c pci_alloc_irq_vectors(fnic->pdev, 1, 1, PCI_IRQ_MSI) == 1) { fnic 284 drivers/scsi/fnic/fnic_isr.c fnic->rq_count = 1; fnic 285 drivers/scsi/fnic/fnic_isr.c fnic->raw_wq_count = 1; fnic 286 drivers/scsi/fnic/fnic_isr.c fnic->wq_copy_count = 1; fnic 287 drivers/scsi/fnic/fnic_isr.c fnic->wq_count = 2; fnic 288 drivers/scsi/fnic/fnic_isr.c fnic->cq_count = 3; fnic 289 drivers/scsi/fnic/fnic_isr.c fnic->intr_count = 1; fnic 290 drivers/scsi/fnic/fnic_isr.c fnic->err_intr_offset = 0; fnic 292 drivers/scsi/fnic/fnic_isr.c FNIC_ISR_DBG(KERN_DEBUG, fnic->lport->host, fnic 294 drivers/scsi/fnic/fnic_isr.c vnic_dev_set_intr_mode(fnic->vdev, VNIC_DEV_INTR_MODE_MSI); fnic 306 drivers/scsi/fnic/fnic_isr.c if (fnic->rq_count >= 1 && fnic 307 drivers/scsi/fnic/fnic_isr.c fnic->raw_wq_count >= 1 && fnic 308 drivers/scsi/fnic/fnic_isr.c fnic->wq_copy_count >= 1 && fnic 309 drivers/scsi/fnic/fnic_isr.c fnic->cq_count >= 3 && fnic 310 drivers/scsi/fnic/fnic_isr.c fnic->intr_count >= 3) { fnic 312 drivers/scsi/fnic/fnic_isr.c fnic->rq_count = 1; fnic 313 drivers/scsi/fnic/fnic_isr.c fnic->raw_wq_count = 1; fnic 314 drivers/scsi/fnic/fnic_isr.c fnic->wq_copy_count = 1; fnic 315 drivers/scsi/fnic/fnic_isr.c fnic->cq_count = 3; fnic 316 drivers/scsi/fnic/fnic_isr.c fnic->intr_count = 3; fnic 318 drivers/scsi/fnic/fnic_isr.c FNIC_ISR_DBG(KERN_DEBUG, fnic->lport->host, fnic 320 drivers/scsi/fnic/fnic_isr.c vnic_dev_set_intr_mode(fnic->vdev, VNIC_DEV_INTR_MODE_INTX); fnic 325 drivers/scsi/fnic/fnic_isr.c vnic_dev_set_intr_mode(fnic->vdev, VNIC_DEV_INTR_MODE_UNKNOWN); fnic 330 drivers/scsi/fnic/fnic_isr.c void fnic_clear_intr_mode(struct fnic *fnic) fnic 332 drivers/scsi/fnic/fnic_isr.c pci_free_irq_vectors(fnic->pdev); fnic 333 drivers/scsi/fnic/fnic_isr.c vnic_dev_set_intr_mode(fnic->vdev, VNIC_DEV_INTR_MODE_INTX); fnic 178 drivers/scsi/fnic/fnic_main.c struct fnic *fnic = lport_priv(lp); fnic 179 drivers/scsi/fnic/fnic_main.c u32 port_speed = vnic_dev_port_speed(fnic->vdev); fnic 209 drivers/scsi/fnic/fnic_main.c struct fnic *fnic = lport_priv(lp); fnic 214 drivers/scsi/fnic/fnic_main.c if (time_before(jiffies, fnic->stats_time + HZ / FNIC_STATS_RATE_LIMIT)) fnic 216 drivers/scsi/fnic/fnic_main.c fnic->stats_time = jiffies; fnic 218 drivers/scsi/fnic/fnic_main.c spin_lock_irqsave(&fnic->fnic_lock, flags); fnic 219 drivers/scsi/fnic/fnic_main.c ret = vnic_dev_stats_dump(fnic->vdev, &fnic->stats); fnic 220 drivers/scsi/fnic/fnic_main.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 223 drivers/scsi/fnic/fnic_main.c FNIC_MAIN_DBG(KERN_DEBUG, fnic->lport->host, fnic 228 drivers/scsi/fnic/fnic_main.c vs = fnic->stats; fnic 237 drivers/scsi/fnic/fnic_main.c (jiffies - fnic->stats_reset_time) / HZ; fnic 238 drivers/scsi/fnic/fnic_main.c stats->fcp_input_megabytes = div_u64(fnic->fcp_input_bytes, 1000000); fnic 239 drivers/scsi/fnic/fnic_main.c stats->fcp_output_megabytes = div_u64(fnic->fcp_output_bytes, 1000000); fnic 322 drivers/scsi/fnic/fnic_main.c struct fnic *fnic = lport_priv(lp); fnic 330 drivers/scsi/fnic/fnic_main.c spin_lock_irqsave(&fnic->fnic_lock, flags); fnic 331 drivers/scsi/fnic/fnic_main.c ret = vnic_dev_stats_clear(fnic->vdev); fnic 332 drivers/scsi/fnic/fnic_main.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 335 drivers/scsi/fnic/fnic_main.c FNIC_MAIN_DBG(KERN_DEBUG, fnic->lport->host, fnic 340 drivers/scsi/fnic/fnic_main.c fnic->stats_reset_time = jiffies; fnic 346 drivers/scsi/fnic/fnic_main.c void fnic_log_q_error(struct fnic *fnic) fnic 351 drivers/scsi/fnic/fnic_main.c for (i = 0; i < fnic->raw_wq_count; i++) { fnic 352 drivers/scsi/fnic/fnic_main.c error_status = ioread32(&fnic->wq[i].ctrl->error_status); fnic 354 drivers/scsi/fnic/fnic_main.c shost_printk(KERN_ERR, fnic->lport->host, fnic 359 drivers/scsi/fnic/fnic_main.c for (i = 0; i < fnic->rq_count; i++) { fnic 360 drivers/scsi/fnic/fnic_main.c error_status = ioread32(&fnic->rq[i].ctrl->error_status); fnic 362 drivers/scsi/fnic/fnic_main.c shost_printk(KERN_ERR, fnic->lport->host, fnic 367 drivers/scsi/fnic/fnic_main.c for (i = 0; i < fnic->wq_copy_count; i++) { fnic 368 drivers/scsi/fnic/fnic_main.c error_status = ioread32(&fnic->wq_copy[i].ctrl->error_status); fnic 370 drivers/scsi/fnic/fnic_main.c shost_printk(KERN_ERR, fnic->lport->host, fnic 376 drivers/scsi/fnic/fnic_main.c void fnic_handle_link_event(struct fnic *fnic) fnic 380 drivers/scsi/fnic/fnic_main.c spin_lock_irqsave(&fnic->fnic_lock, flags); fnic 381 drivers/scsi/fnic/fnic_main.c if (fnic->stop_rx_link_events) { fnic 382 drivers/scsi/fnic/fnic_main.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 385 drivers/scsi/fnic/fnic_main.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 387 drivers/scsi/fnic/fnic_main.c queue_work(fnic_event_queue, &fnic->link_work); fnic 391 drivers/scsi/fnic/fnic_main.c static int fnic_notify_set(struct fnic *fnic) fnic 395 drivers/scsi/fnic/fnic_main.c switch (vnic_dev_get_intr_mode(fnic->vdev)) { fnic 397 drivers/scsi/fnic/fnic_main.c err = vnic_dev_notify_set(fnic->vdev, FNIC_INTX_NOTIFY); fnic 400 drivers/scsi/fnic/fnic_main.c err = vnic_dev_notify_set(fnic->vdev, -1); fnic 403 drivers/scsi/fnic/fnic_main.c err = vnic_dev_notify_set(fnic->vdev, FNIC_MSIX_ERR_NOTIFY); fnic 406 drivers/scsi/fnic/fnic_main.c shost_printk(KERN_ERR, fnic->lport->host, fnic 409 drivers/scsi/fnic/fnic_main.c vnic_dev_get_intr_mode(fnic->vdev)); fnic 419 drivers/scsi/fnic/fnic_main.c struct fnic *fnic = from_timer(fnic, t, notify_timer); fnic 421 drivers/scsi/fnic/fnic_main.c fnic_handle_link_event(fnic); fnic 422 drivers/scsi/fnic/fnic_main.c mod_timer(&fnic->notify_timer, fnic 428 drivers/scsi/fnic/fnic_main.c struct fnic *fnic = from_timer(fnic, t, fip_timer); fnic 430 drivers/scsi/fnic/fnic_main.c fnic_handle_fip_timer(fnic); fnic 433 drivers/scsi/fnic/fnic_main.c static void fnic_notify_timer_start(struct fnic *fnic) fnic 435 drivers/scsi/fnic/fnic_main.c switch (vnic_dev_get_intr_mode(fnic->vdev)) { fnic 441 drivers/scsi/fnic/fnic_main.c mod_timer(&fnic->notify_timer, jiffies); fnic 485 drivers/scsi/fnic/fnic_main.c static int fnic_cleanup(struct fnic *fnic) fnic 490 drivers/scsi/fnic/fnic_main.c vnic_dev_disable(fnic->vdev); fnic 491 drivers/scsi/fnic/fnic_main.c for (i = 0; i < fnic->intr_count; i++) fnic 492 drivers/scsi/fnic/fnic_main.c vnic_intr_mask(&fnic->intr[i]); fnic 494 drivers/scsi/fnic/fnic_main.c for (i = 0; i < fnic->rq_count; i++) { fnic 495 drivers/scsi/fnic/fnic_main.c err = vnic_rq_disable(&fnic->rq[i]); fnic 499 drivers/scsi/fnic/fnic_main.c for (i = 0; i < fnic->raw_wq_count; i++) { fnic 500 drivers/scsi/fnic/fnic_main.c err = vnic_wq_disable(&fnic->wq[i]); fnic 504 drivers/scsi/fnic/fnic_main.c for (i = 0; i < fnic->wq_copy_count; i++) { fnic 505 drivers/scsi/fnic/fnic_main.c err = vnic_wq_copy_disable(&fnic->wq_copy[i]); fnic 511 drivers/scsi/fnic/fnic_main.c fnic_wq_copy_cmpl_handler(fnic, io_completions); fnic 512 drivers/scsi/fnic/fnic_main.c fnic_wq_cmpl_handler(fnic, -1); fnic 513 drivers/scsi/fnic/fnic_main.c fnic_rq_cmpl_handler(fnic, -1); fnic 516 drivers/scsi/fnic/fnic_main.c for (i = 0; i < fnic->raw_wq_count; i++) fnic 517 drivers/scsi/fnic/fnic_main.c vnic_wq_clean(&fnic->wq[i], fnic_free_wq_buf); fnic 518 drivers/scsi/fnic/fnic_main.c for (i = 0; i < fnic->rq_count; i++) fnic 519 drivers/scsi/fnic/fnic_main.c vnic_rq_clean(&fnic->rq[i], fnic_free_rq_buf); fnic 520 drivers/scsi/fnic/fnic_main.c for (i = 0; i < fnic->wq_copy_count; i++) fnic 521 drivers/scsi/fnic/fnic_main.c vnic_wq_copy_clean(&fnic->wq_copy[i], fnic 524 drivers/scsi/fnic/fnic_main.c for (i = 0; i < fnic->cq_count; i++) fnic 525 drivers/scsi/fnic/fnic_main.c vnic_cq_clean(&fnic->cq[i]); fnic 526 drivers/scsi/fnic/fnic_main.c for (i = 0; i < fnic->intr_count; i++) fnic 527 drivers/scsi/fnic/fnic_main.c vnic_intr_clean(&fnic->intr[i]); fnic 529 drivers/scsi/fnic/fnic_main.c mempool_destroy(fnic->io_req_pool); fnic 531 drivers/scsi/fnic/fnic_main.c mempool_destroy(fnic->io_sgl_pool[i]); fnic 536 drivers/scsi/fnic/fnic_main.c static void fnic_iounmap(struct fnic *fnic) fnic 538 drivers/scsi/fnic/fnic_main.c if (fnic->bar0.vaddr) fnic 539 drivers/scsi/fnic/fnic_main.c iounmap(fnic->bar0.vaddr); fnic 548 drivers/scsi/fnic/fnic_main.c struct fnic *fnic = lport_priv(lport); fnic 550 drivers/scsi/fnic/fnic_main.c return fnic->data_src_addr; fnic 553 drivers/scsi/fnic/fnic_main.c static void fnic_set_vlan(struct fnic *fnic, u16 vlan_id) fnic 556 drivers/scsi/fnic/fnic_main.c old_vlan = vnic_dev_set_default_vlan(fnic->vdev, vlan_id); fnic 563 drivers/scsi/fnic/fnic_main.c struct fnic *fnic; fnic 573 drivers/scsi/fnic/fnic_main.c lp = libfc_host_alloc(&fnic_host_template, sizeof(struct fnic)); fnic 580 drivers/scsi/fnic/fnic_main.c fnic = lport_priv(lp); fnic 581 drivers/scsi/fnic/fnic_main.c fnic->lport = lp; fnic 582 drivers/scsi/fnic/fnic_main.c fnic->ctlr.lp = lp; fnic 584 drivers/scsi/fnic/fnic_main.c snprintf(fnic->name, sizeof(fnic->name) - 1, "%s%d", DRV_NAME, fnic 589 drivers/scsi/fnic/fnic_main.c fnic_stats_debugfs_init(fnic); fnic 592 drivers/scsi/fnic/fnic_main.c pci_set_drvdata(pdev, fnic); fnic 594 drivers/scsi/fnic/fnic_main.c fnic->pdev = pdev; fnic 598 drivers/scsi/fnic/fnic_main.c shost_printk(KERN_ERR, fnic->lport->host, fnic 605 drivers/scsi/fnic/fnic_main.c shost_printk(KERN_ERR, fnic->lport->host, fnic 620 drivers/scsi/fnic/fnic_main.c shost_printk(KERN_ERR, fnic->lport->host, fnic 629 drivers/scsi/fnic/fnic_main.c shost_printk(KERN_ERR, fnic->lport->host, fnic 635 drivers/scsi/fnic/fnic_main.c fnic->bar0.vaddr = pci_iomap(pdev, 0, 0); fnic 636 drivers/scsi/fnic/fnic_main.c fnic->bar0.bus_addr = pci_resource_start(pdev, 0); fnic 637 drivers/scsi/fnic/fnic_main.c fnic->bar0.len = pci_resource_len(pdev, 0); fnic 639 drivers/scsi/fnic/fnic_main.c if (!fnic->bar0.vaddr) { fnic 640 drivers/scsi/fnic/fnic_main.c shost_printk(KERN_ERR, fnic->lport->host, fnic 647 drivers/scsi/fnic/fnic_main.c fnic->vdev = vnic_dev_register(NULL, fnic, pdev, &fnic->bar0); fnic 648 drivers/scsi/fnic/fnic_main.c if (!fnic->vdev) { fnic 649 drivers/scsi/fnic/fnic_main.c shost_printk(KERN_ERR, fnic->lport->host, fnic 656 drivers/scsi/fnic/fnic_main.c err = vnic_dev_cmd_init(fnic->vdev); fnic 658 drivers/scsi/fnic/fnic_main.c shost_printk(KERN_ERR, fnic->lport->host, fnic 664 drivers/scsi/fnic/fnic_main.c err = fnic_dev_wait(fnic->vdev, vnic_dev_open, fnic 667 drivers/scsi/fnic/fnic_main.c shost_printk(KERN_ERR, fnic->lport->host, fnic 672 drivers/scsi/fnic/fnic_main.c err = vnic_dev_init(fnic->vdev, 0); fnic 674 drivers/scsi/fnic/fnic_main.c shost_printk(KERN_ERR, fnic->lport->host, fnic 679 drivers/scsi/fnic/fnic_main.c err = vnic_dev_mac_addr(fnic->vdev, fnic->ctlr.ctl_src_addr); fnic 681 drivers/scsi/fnic/fnic_main.c shost_printk(KERN_ERR, fnic->lport->host, fnic 686 drivers/scsi/fnic/fnic_main.c memcpy(fnic->data_src_addr, fnic->ctlr.ctl_src_addr, ETH_ALEN); fnic 689 drivers/scsi/fnic/fnic_main.c err = fnic_get_vnic_config(fnic); fnic 691 drivers/scsi/fnic/fnic_main.c shost_printk(KERN_ERR, fnic->lport->host, fnic 698 drivers/scsi/fnic/fnic_main.c if (fnic->config.io_throttle_count != FNIC_UCSM_DFLT_THROTTLE_CNT_BLD) { fnic 701 drivers/scsi/fnic/fnic_main.c fnic->config.io_throttle_count)); fnic 703 drivers/scsi/fnic/fnic_main.c fnic->fnic_max_tag_id = host->can_queue; fnic 705 drivers/scsi/fnic/fnic_main.c host->max_lun = fnic->config.luns_per_tgt; fnic 709 drivers/scsi/fnic/fnic_main.c fnic_get_res_counts(fnic); fnic 711 drivers/scsi/fnic/fnic_main.c err = fnic_set_intr_mode(fnic); fnic 713 drivers/scsi/fnic/fnic_main.c shost_printk(KERN_ERR, fnic->lport->host, fnic 719 drivers/scsi/fnic/fnic_main.c err = fnic_alloc_vnic_resources(fnic); fnic 721 drivers/scsi/fnic/fnic_main.c shost_printk(KERN_ERR, fnic->lport->host, fnic 729 drivers/scsi/fnic/fnic_main.c spin_lock_init(&fnic->fnic_lock); fnic 732 drivers/scsi/fnic/fnic_main.c spin_lock_init(&fnic->wq_lock[i]); fnic 735 drivers/scsi/fnic/fnic_main.c spin_lock_init(&fnic->wq_copy_lock[i]); fnic 736 drivers/scsi/fnic/fnic_main.c fnic->wq_copy_desc_low[i] = DESC_CLEAN_LOW_WATERMARK; fnic 737 drivers/scsi/fnic/fnic_main.c fnic->fw_ack_recd[i] = 0; fnic 738 drivers/scsi/fnic/fnic_main.c fnic->fw_ack_index[i] = -1; fnic 742 drivers/scsi/fnic/fnic_main.c spin_lock_init(&fnic->io_req_lock[i]); fnic 744 drivers/scsi/fnic/fnic_main.c fnic->io_req_pool = mempool_create_slab_pool(2, fnic_io_req_cache); fnic 745 drivers/scsi/fnic/fnic_main.c if (!fnic->io_req_pool) fnic 751 drivers/scsi/fnic/fnic_main.c fnic->io_sgl_pool[FNIC_SGL_CACHE_DFLT] = pool; fnic 756 drivers/scsi/fnic/fnic_main.c fnic->io_sgl_pool[FNIC_SGL_CACHE_MAX] = pool; fnic 759 drivers/scsi/fnic/fnic_main.c fnic->vlan_hw_insert = 1; fnic 760 drivers/scsi/fnic/fnic_main.c fnic->vlan_id = 0; fnic 763 drivers/scsi/fnic/fnic_main.c fnic->ctlr.send = fnic_eth_send; fnic 764 drivers/scsi/fnic/fnic_main.c fnic->ctlr.update_mac = fnic_update_mac; fnic 765 drivers/scsi/fnic/fnic_main.c fnic->ctlr.get_src_addr = fnic_get_mac; fnic 766 drivers/scsi/fnic/fnic_main.c if (fnic->config.flags & VFCF_FIP_CAPABLE) { fnic 767 drivers/scsi/fnic/fnic_main.c shost_printk(KERN_INFO, fnic->lport->host, fnic 770 drivers/scsi/fnic/fnic_main.c vnic_dev_packet_filter(fnic->vdev, 1, 1, 0, 0, 0); fnic 771 drivers/scsi/fnic/fnic_main.c vnic_dev_add_addr(fnic->vdev, FIP_ALL_ENODE_MACS); fnic 772 drivers/scsi/fnic/fnic_main.c vnic_dev_add_addr(fnic->vdev, fnic->ctlr.ctl_src_addr); fnic 773 drivers/scsi/fnic/fnic_main.c fnic->set_vlan = fnic_set_vlan; fnic 774 drivers/scsi/fnic/fnic_main.c fcoe_ctlr_init(&fnic->ctlr, FIP_MODE_AUTO); fnic 775 drivers/scsi/fnic/fnic_main.c timer_setup(&fnic->fip_timer, fnic_fip_notify_timer, 0); fnic 776 drivers/scsi/fnic/fnic_main.c spin_lock_init(&fnic->vlans_lock); fnic 777 drivers/scsi/fnic/fnic_main.c INIT_WORK(&fnic->fip_frame_work, fnic_handle_fip_frame); fnic 778 drivers/scsi/fnic/fnic_main.c INIT_WORK(&fnic->event_work, fnic_handle_event); fnic 779 drivers/scsi/fnic/fnic_main.c skb_queue_head_init(&fnic->fip_frame_queue); fnic 780 drivers/scsi/fnic/fnic_main.c INIT_LIST_HEAD(&fnic->evlist); fnic 781 drivers/scsi/fnic/fnic_main.c INIT_LIST_HEAD(&fnic->vlans); fnic 783 drivers/scsi/fnic/fnic_main.c shost_printk(KERN_INFO, fnic->lport->host, fnic 785 drivers/scsi/fnic/fnic_main.c fcoe_ctlr_init(&fnic->ctlr, FIP_MODE_NON_FIP); fnic 786 drivers/scsi/fnic/fnic_main.c fnic->ctlr.state = FIP_ST_NON_FIP; fnic 788 drivers/scsi/fnic/fnic_main.c fnic->state = FNIC_IN_FC_MODE; fnic 790 drivers/scsi/fnic/fnic_main.c atomic_set(&fnic->in_flight, 0); fnic 791 drivers/scsi/fnic/fnic_main.c fnic->state_flags = FNIC_FLAGS_NONE; fnic 794 drivers/scsi/fnic/fnic_main.c fnic_set_nic_config(fnic, 0, 0, 0, 0, 0, 0, 1); fnic 797 drivers/scsi/fnic/fnic_main.c err = fnic_notify_set(fnic); fnic 799 drivers/scsi/fnic/fnic_main.c shost_printk(KERN_ERR, fnic->lport->host, fnic 805 drivers/scsi/fnic/fnic_main.c if (vnic_dev_get_intr_mode(fnic->vdev) == VNIC_DEV_INTR_MODE_MSI) fnic 806 drivers/scsi/fnic/fnic_main.c timer_setup(&fnic->notify_timer, fnic_notify_timer, 0); fnic 809 drivers/scsi/fnic/fnic_main.c for (i = 0; i < fnic->rq_count; i++) { fnic 810 drivers/scsi/fnic/fnic_main.c vnic_rq_enable(&fnic->rq[i]); fnic 811 drivers/scsi/fnic/fnic_main.c err = vnic_rq_fill(&fnic->rq[i], fnic_alloc_rq_frame); fnic 813 drivers/scsi/fnic/fnic_main.c shost_printk(KERN_ERR, fnic->lport->host, fnic 826 drivers/scsi/fnic/fnic_main.c shost_printk(KERN_ERR, fnic->lport->host, fnic 835 drivers/scsi/fnic/fnic_main.c lp->max_retry_count = fnic->config.flogi_retries; fnic 836 drivers/scsi/fnic/fnic_main.c lp->max_rport_retry_count = fnic->config.plogi_retries; fnic 839 drivers/scsi/fnic/fnic_main.c if (fnic->config.flags & VFCF_FCP_SEQ_LVL_ERR) fnic 843 drivers/scsi/fnic/fnic_main.c lp->e_d_tov = fnic->config.ed_tov; fnic 844 drivers/scsi/fnic/fnic_main.c lp->r_a_tov = fnic->config.ra_tov; fnic 846 drivers/scsi/fnic/fnic_main.c fc_set_wwnn(lp, fnic->config.node_wwn); fnic 847 drivers/scsi/fnic/fnic_main.c fc_set_wwpn(lp, fnic->config.port_wwn); fnic 849 drivers/scsi/fnic/fnic_main.c fcoe_libfc_config(lp, &fnic->ctlr, &fnic_transport_template, 0); fnic 858 drivers/scsi/fnic/fnic_main.c fnic->stats_reset_time = jiffies; fnic 862 drivers/scsi/fnic/fnic_main.c if (fc_set_mfs(lp, fnic->config.maxdatafieldsize + fnic 868 drivers/scsi/fnic/fnic_main.c fc_host_dev_loss_tmo(lp->host) = fnic->config.port_down_timeout / 1000; fnic 871 drivers/scsi/fnic/fnic_main.c DRV_NAME " v" DRV_VERSION " over %s", fnic->name); fnic 874 drivers/scsi/fnic/fnic_main.c list_add_tail(&fnic->list, &fnic_list); fnic 877 drivers/scsi/fnic/fnic_main.c INIT_WORK(&fnic->link_work, fnic_handle_link); fnic 878 drivers/scsi/fnic/fnic_main.c INIT_WORK(&fnic->frame_work, fnic_handle_frame); fnic 879 drivers/scsi/fnic/fnic_main.c skb_queue_head_init(&fnic->frame_queue); fnic 880 drivers/scsi/fnic/fnic_main.c skb_queue_head_init(&fnic->tx_queue); fnic 883 drivers/scsi/fnic/fnic_main.c for (i = 0; i < fnic->raw_wq_count; i++) fnic 884 drivers/scsi/fnic/fnic_main.c vnic_wq_enable(&fnic->wq[i]); fnic 885 drivers/scsi/fnic/fnic_main.c for (i = 0; i < fnic->wq_copy_count; i++) fnic 886 drivers/scsi/fnic/fnic_main.c vnic_wq_copy_enable(&fnic->wq_copy[i]); fnic 890 drivers/scsi/fnic/fnic_main.c err = fnic_request_intr(fnic); fnic 892 drivers/scsi/fnic/fnic_main.c shost_printk(KERN_ERR, fnic->lport->host, fnic 897 drivers/scsi/fnic/fnic_main.c vnic_dev_enable(fnic->vdev); fnic 899 drivers/scsi/fnic/fnic_main.c for (i = 0; i < fnic->intr_count; i++) fnic 900 drivers/scsi/fnic/fnic_main.c vnic_intr_unmask(&fnic->intr[i]); fnic 902 drivers/scsi/fnic/fnic_main.c fnic_notify_timer_start(fnic); fnic 912 drivers/scsi/fnic/fnic_main.c for (i = 0; i < fnic->rq_count; i++) fnic 913 drivers/scsi/fnic/fnic_main.c vnic_rq_clean(&fnic->rq[i], fnic_free_rq_buf); fnic 914 drivers/scsi/fnic/fnic_main.c vnic_dev_notify_unset(fnic->vdev); fnic 916 drivers/scsi/fnic/fnic_main.c mempool_destroy(fnic->io_sgl_pool[FNIC_SGL_CACHE_MAX]); fnic 918 drivers/scsi/fnic/fnic_main.c mempool_destroy(fnic->io_sgl_pool[FNIC_SGL_CACHE_DFLT]); fnic 920 drivers/scsi/fnic/fnic_main.c mempool_destroy(fnic->io_req_pool); fnic 922 drivers/scsi/fnic/fnic_main.c fnic_free_vnic_resources(fnic); fnic 924 drivers/scsi/fnic/fnic_main.c fnic_clear_intr_mode(fnic); fnic 926 drivers/scsi/fnic/fnic_main.c vnic_dev_close(fnic->vdev); fnic 929 drivers/scsi/fnic/fnic_main.c vnic_dev_unregister(fnic->vdev); fnic 931 drivers/scsi/fnic/fnic_main.c fnic_iounmap(fnic); fnic 937 drivers/scsi/fnic/fnic_main.c fnic_stats_debugfs_remove(fnic); fnic 945 drivers/scsi/fnic/fnic_main.c struct fnic *fnic = pci_get_drvdata(pdev); fnic 946 drivers/scsi/fnic/fnic_main.c struct fc_lport *lp = fnic->lport; fnic 955 drivers/scsi/fnic/fnic_main.c spin_lock_irqsave(&fnic->fnic_lock, flags); fnic 956 drivers/scsi/fnic/fnic_main.c fnic->stop_rx_link_events = 1; fnic 957 drivers/scsi/fnic/fnic_main.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 959 drivers/scsi/fnic/fnic_main.c if (vnic_dev_get_intr_mode(fnic->vdev) == VNIC_DEV_INTR_MODE_MSI) fnic 960 drivers/scsi/fnic/fnic_main.c del_timer_sync(&fnic->notify_timer); fnic 967 drivers/scsi/fnic/fnic_main.c skb_queue_purge(&fnic->frame_queue); fnic 968 drivers/scsi/fnic/fnic_main.c skb_queue_purge(&fnic->tx_queue); fnic 970 drivers/scsi/fnic/fnic_main.c if (fnic->config.flags & VFCF_FIP_CAPABLE) { fnic 971 drivers/scsi/fnic/fnic_main.c del_timer_sync(&fnic->fip_timer); fnic 972 drivers/scsi/fnic/fnic_main.c skb_queue_purge(&fnic->fip_frame_queue); fnic 973 drivers/scsi/fnic/fnic_main.c fnic_fcoe_reset_vlans(fnic); fnic 974 drivers/scsi/fnic/fnic_main.c fnic_fcoe_evlist_free(fnic); fnic 982 drivers/scsi/fnic/fnic_main.c fc_fabric_logoff(fnic->lport); fnic 984 drivers/scsi/fnic/fnic_main.c spin_lock_irqsave(&fnic->fnic_lock, flags); fnic 985 drivers/scsi/fnic/fnic_main.c fnic->in_remove = 1; fnic 986 drivers/scsi/fnic/fnic_main.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 988 drivers/scsi/fnic/fnic_main.c fcoe_ctlr_destroy(&fnic->ctlr); fnic 990 drivers/scsi/fnic/fnic_main.c fnic_stats_debugfs_remove(fnic); fnic 997 drivers/scsi/fnic/fnic_main.c fnic_cleanup(fnic); fnic 999 drivers/scsi/fnic/fnic_main.c BUG_ON(!skb_queue_empty(&fnic->frame_queue)); fnic 1000 drivers/scsi/fnic/fnic_main.c BUG_ON(!skb_queue_empty(&fnic->tx_queue)); fnic 1003 drivers/scsi/fnic/fnic_main.c list_del(&fnic->list); fnic 1006 drivers/scsi/fnic/fnic_main.c fc_remove_host(fnic->lport->host); fnic 1007 drivers/scsi/fnic/fnic_main.c scsi_remove_host(fnic->lport->host); fnic 1008 drivers/scsi/fnic/fnic_main.c fc_exch_mgr_free(fnic->lport); fnic 1009 drivers/scsi/fnic/fnic_main.c vnic_dev_notify_unset(fnic->vdev); fnic 1010 drivers/scsi/fnic/fnic_main.c fnic_free_intr(fnic); fnic 1011 drivers/scsi/fnic/fnic_main.c fnic_free_vnic_resources(fnic); fnic 1012 drivers/scsi/fnic/fnic_main.c fnic_clear_intr_mode(fnic); fnic 1013 drivers/scsi/fnic/fnic_main.c vnic_dev_close(fnic->vdev); fnic 1014 drivers/scsi/fnic/fnic_main.c vnic_dev_unregister(fnic->vdev); fnic 1015 drivers/scsi/fnic/fnic_main.c fnic_iounmap(fnic); fnic 34 drivers/scsi/fnic/fnic_res.c int fnic_get_vnic_config(struct fnic *fnic) fnic 36 drivers/scsi/fnic/fnic_res.c struct vnic_fc_config *c = &fnic->config; fnic 41 drivers/scsi/fnic/fnic_res.c err = vnic_dev_spec(fnic->vdev, \ fnic 45 drivers/scsi/fnic/fnic_res.c shost_printk(KERN_ERR, fnic->lport->host, \ fnic 146 drivers/scsi/fnic/fnic_res.c shost_printk(KERN_INFO, fnic->lport->host, fnic 149 drivers/scsi/fnic/fnic_res.c fnic->ctlr.ctl_src_addr, fnic 152 drivers/scsi/fnic/fnic_res.c shost_printk(KERN_INFO, fnic->lport->host, fnic 155 drivers/scsi/fnic/fnic_res.c shost_printk(KERN_INFO, fnic->lport->host, fnic 158 drivers/scsi/fnic/fnic_res.c shost_printk(KERN_INFO, fnic->lport->host, fnic 161 drivers/scsi/fnic/fnic_res.c shost_printk(KERN_INFO, fnic->lport->host, fnic 164 drivers/scsi/fnic/fnic_res.c shost_printk(KERN_INFO, fnic->lport->host, fnic 167 drivers/scsi/fnic/fnic_res.c shost_printk(KERN_INFO, fnic->lport->host, fnic 170 drivers/scsi/fnic/fnic_res.c shost_printk(KERN_INFO, fnic->lport->host, fnic 173 drivers/scsi/fnic/fnic_res.c shost_printk(KERN_INFO, fnic->lport->host, fnic 180 drivers/scsi/fnic/fnic_res.c int fnic_set_nic_config(struct fnic *fnic, u8 rss_default_cpu, fnic 196 drivers/scsi/fnic/fnic_res.c return vnic_dev_cmd(fnic->vdev, CMD_NIC_CFG, &a0, &a1, wait); fnic 199 drivers/scsi/fnic/fnic_res.c void fnic_get_res_counts(struct fnic *fnic) fnic 201 drivers/scsi/fnic/fnic_res.c fnic->wq_count = vnic_dev_get_res_count(fnic->vdev, RES_TYPE_WQ); fnic 202 drivers/scsi/fnic/fnic_res.c fnic->raw_wq_count = fnic->wq_count - 1; fnic 203 drivers/scsi/fnic/fnic_res.c fnic->wq_copy_count = fnic->wq_count - fnic->raw_wq_count; fnic 204 drivers/scsi/fnic/fnic_res.c fnic->rq_count = vnic_dev_get_res_count(fnic->vdev, RES_TYPE_RQ); fnic 205 drivers/scsi/fnic/fnic_res.c fnic->cq_count = vnic_dev_get_res_count(fnic->vdev, RES_TYPE_CQ); fnic 206 drivers/scsi/fnic/fnic_res.c fnic->intr_count = vnic_dev_get_res_count(fnic->vdev, fnic 210 drivers/scsi/fnic/fnic_res.c void fnic_free_vnic_resources(struct fnic *fnic) fnic 214 drivers/scsi/fnic/fnic_res.c for (i = 0; i < fnic->raw_wq_count; i++) fnic 215 drivers/scsi/fnic/fnic_res.c vnic_wq_free(&fnic->wq[i]); fnic 217 drivers/scsi/fnic/fnic_res.c for (i = 0; i < fnic->wq_copy_count; i++) fnic 218 drivers/scsi/fnic/fnic_res.c vnic_wq_copy_free(&fnic->wq_copy[i]); fnic 220 drivers/scsi/fnic/fnic_res.c for (i = 0; i < fnic->rq_count; i++) fnic 221 drivers/scsi/fnic/fnic_res.c vnic_rq_free(&fnic->rq[i]); fnic 223 drivers/scsi/fnic/fnic_res.c for (i = 0; i < fnic->cq_count; i++) fnic 224 drivers/scsi/fnic/fnic_res.c vnic_cq_free(&fnic->cq[i]); fnic 226 drivers/scsi/fnic/fnic_res.c for (i = 0; i < fnic->intr_count; i++) fnic 227 drivers/scsi/fnic/fnic_res.c vnic_intr_free(&fnic->intr[i]); fnic 230 drivers/scsi/fnic/fnic_res.c int fnic_alloc_vnic_resources(struct fnic *fnic) fnic 241 drivers/scsi/fnic/fnic_res.c intr_mode = vnic_dev_get_intr_mode(fnic->vdev); fnic 243 drivers/scsi/fnic/fnic_res.c shost_printk(KERN_INFO, fnic->lport->host, "vNIC interrupt mode: %s\n", fnic 249 drivers/scsi/fnic/fnic_res.c shost_printk(KERN_INFO, fnic->lport->host, "vNIC resources avail: " fnic 251 drivers/scsi/fnic/fnic_res.c fnic->wq_count, fnic->wq_copy_count, fnic->raw_wq_count, fnic 252 drivers/scsi/fnic/fnic_res.c fnic->rq_count, fnic->cq_count, fnic->intr_count); fnic 255 drivers/scsi/fnic/fnic_res.c for (i = 0; i < fnic->raw_wq_count; i++) { fnic 256 drivers/scsi/fnic/fnic_res.c err = vnic_wq_alloc(fnic->vdev, &fnic->wq[i], i, fnic 257 drivers/scsi/fnic/fnic_res.c fnic->config.wq_enet_desc_count, fnic 264 drivers/scsi/fnic/fnic_res.c for (i = 0; i < fnic->wq_copy_count; i++) { fnic 265 drivers/scsi/fnic/fnic_res.c err = vnic_wq_copy_alloc(fnic->vdev, &fnic->wq_copy[i], fnic 266 drivers/scsi/fnic/fnic_res.c (fnic->raw_wq_count + i), fnic 267 drivers/scsi/fnic/fnic_res.c fnic->config.wq_copy_desc_count, fnic 274 drivers/scsi/fnic/fnic_res.c for (i = 0; i < fnic->rq_count; i++) { fnic 275 drivers/scsi/fnic/fnic_res.c err = vnic_rq_alloc(fnic->vdev, &fnic->rq[i], i, fnic 276 drivers/scsi/fnic/fnic_res.c fnic->config.rq_desc_count, fnic 283 drivers/scsi/fnic/fnic_res.c for (i = 0; i < fnic->rq_count; i++) { fnic 285 drivers/scsi/fnic/fnic_res.c err = vnic_cq_alloc(fnic->vdev, fnic 286 drivers/scsi/fnic/fnic_res.c &fnic->cq[cq_index], cq_index, fnic 287 drivers/scsi/fnic/fnic_res.c fnic->config.rq_desc_count, fnic 294 drivers/scsi/fnic/fnic_res.c for (i = 0; i < fnic->raw_wq_count; i++) { fnic 295 drivers/scsi/fnic/fnic_res.c cq_index = fnic->rq_count + i; fnic 296 drivers/scsi/fnic/fnic_res.c err = vnic_cq_alloc(fnic->vdev, &fnic->cq[cq_index], cq_index, fnic 297 drivers/scsi/fnic/fnic_res.c fnic->config.wq_enet_desc_count, fnic 304 drivers/scsi/fnic/fnic_res.c wq_copy_cq_desc_count = (fnic->config.wq_copy_desc_count * 3); fnic 305 drivers/scsi/fnic/fnic_res.c for (i = 0; i < fnic->wq_copy_count; i++) { fnic 306 drivers/scsi/fnic/fnic_res.c cq_index = fnic->raw_wq_count + fnic->rq_count + i; fnic 307 drivers/scsi/fnic/fnic_res.c err = vnic_cq_alloc(fnic->vdev, &fnic->cq[cq_index], fnic 315 drivers/scsi/fnic/fnic_res.c for (i = 0; i < fnic->intr_count; i++) { fnic 316 drivers/scsi/fnic/fnic_res.c err = vnic_intr_alloc(fnic->vdev, &fnic->intr[i], i); fnic 321 drivers/scsi/fnic/fnic_res.c fnic->legacy_pba = vnic_dev_get_res(fnic->vdev, fnic 324 drivers/scsi/fnic/fnic_res.c if (!fnic->legacy_pba && intr_mode == VNIC_DEV_INTR_MODE_INTX) { fnic 325 drivers/scsi/fnic/fnic_res.c shost_printk(KERN_ERR, fnic->lport->host, fnic 347 drivers/scsi/fnic/fnic_res.c error_interrupt_offset = fnic->err_intr_offset; fnic 355 drivers/scsi/fnic/fnic_res.c for (i = 0; i < fnic->rq_count; i++) { fnic 357 drivers/scsi/fnic/fnic_res.c vnic_rq_init(&fnic->rq[i], fnic 363 drivers/scsi/fnic/fnic_res.c for (i = 0; i < fnic->raw_wq_count; i++) { fnic 364 drivers/scsi/fnic/fnic_res.c cq_index = i + fnic->rq_count; fnic 365 drivers/scsi/fnic/fnic_res.c vnic_wq_init(&fnic->wq[i], fnic 371 drivers/scsi/fnic/fnic_res.c for (i = 0; i < fnic->wq_copy_count; i++) { fnic 372 drivers/scsi/fnic/fnic_res.c vnic_wq_copy_init(&fnic->wq_copy[i], fnic 378 drivers/scsi/fnic/fnic_res.c for (i = 0; i < fnic->cq_count; i++) { fnic 389 drivers/scsi/fnic/fnic_res.c vnic_cq_init(&fnic->cq[i], fnic 419 drivers/scsi/fnic/fnic_res.c for (i = 0; i < fnic->intr_count; i++) { fnic 420 drivers/scsi/fnic/fnic_res.c vnic_intr_init(&fnic->intr[i], fnic 421 drivers/scsi/fnic/fnic_res.c fnic->config.intr_timer, fnic 422 drivers/scsi/fnic/fnic_res.c fnic->config.intr_timer_type, fnic 427 drivers/scsi/fnic/fnic_res.c err = vnic_dev_stats_dump(fnic->vdev, &fnic->stats); fnic 429 drivers/scsi/fnic/fnic_res.c shost_printk(KERN_ERR, fnic->lport->host, fnic 435 drivers/scsi/fnic/fnic_res.c vnic_dev_stats_clear(fnic->vdev); fnic 440 drivers/scsi/fnic/fnic_res.c fnic_free_vnic_resources(fnic); fnic 238 drivers/scsi/fnic/fnic_res.h struct fnic; fnic 240 drivers/scsi/fnic/fnic_res.h int fnic_get_vnic_config(struct fnic *); fnic 241 drivers/scsi/fnic/fnic_res.h int fnic_alloc_vnic_resources(struct fnic *); fnic 242 drivers/scsi/fnic/fnic_res.h void fnic_free_vnic_resources(struct fnic *); fnic 243 drivers/scsi/fnic/fnic_res.h void fnic_get_res_counts(struct fnic *); fnic 244 drivers/scsi/fnic/fnic_res.h int fnic_set_nic_config(struct fnic *fnic, u8 rss_default_cpu, fnic 104 drivers/scsi/fnic/fnic_scsi.c static void fnic_cleanup_io(struct fnic *fnic, int exclude_id); fnic 106 drivers/scsi/fnic/fnic_scsi.c static inline spinlock_t *fnic_io_lock_hash(struct fnic *fnic, fnic 111 drivers/scsi/fnic/fnic_scsi.c return &fnic->io_req_lock[hash]; fnic 114 drivers/scsi/fnic/fnic_scsi.c static inline spinlock_t *fnic_io_lock_tag(struct fnic *fnic, fnic 117 drivers/scsi/fnic/fnic_scsi.c return &fnic->io_req_lock[tag & (FNIC_IO_LOCKS - 1)]; fnic 124 drivers/scsi/fnic/fnic_scsi.c static void fnic_release_ioreq_buf(struct fnic *fnic, fnic 129 drivers/scsi/fnic/fnic_scsi.c dma_unmap_single(&fnic->pdev->dev, io_req->sgl_list_pa, fnic 136 drivers/scsi/fnic/fnic_scsi.c fnic->io_sgl_pool[io_req->sgl_type]); fnic 138 drivers/scsi/fnic/fnic_scsi.c dma_unmap_single(&fnic->pdev->dev, io_req->sense_buf_pa, fnic 143 drivers/scsi/fnic/fnic_scsi.c static int free_wq_copy_descs(struct fnic *fnic, struct vnic_wq_copy *wq) fnic 146 drivers/scsi/fnic/fnic_scsi.c if (!fnic->fw_ack_recd[0]) fnic 153 drivers/scsi/fnic/fnic_scsi.c if (wq->to_clean_index <= fnic->fw_ack_index[0]) fnic 154 drivers/scsi/fnic/fnic_scsi.c wq->ring.desc_avail += (fnic->fw_ack_index[0] fnic 159 drivers/scsi/fnic/fnic_scsi.c + fnic->fw_ack_index[0] + 1); fnic 167 drivers/scsi/fnic/fnic_scsi.c (fnic->fw_ack_index[0] + 1) % wq->ring.desc_count; fnic 170 drivers/scsi/fnic/fnic_scsi.c fnic->fw_ack_recd[0] = 0; fnic 180 drivers/scsi/fnic/fnic_scsi.c __fnic_set_state_flags(struct fnic *fnic, unsigned long st_flags, fnic 186 drivers/scsi/fnic/fnic_scsi.c spin_lock_irqsave(&fnic->fnic_lock, flags); fnic 187 drivers/scsi/fnic/fnic_scsi.c spin_lock_irqsave(fnic->lport->host->host_lock, host_lock_flags); fnic 190 drivers/scsi/fnic/fnic_scsi.c fnic->state_flags &= ~st_flags; fnic 192 drivers/scsi/fnic/fnic_scsi.c fnic->state_flags |= st_flags; fnic 194 drivers/scsi/fnic/fnic_scsi.c spin_unlock_irqrestore(fnic->lport->host->host_lock, host_lock_flags); fnic 195 drivers/scsi/fnic/fnic_scsi.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 205 drivers/scsi/fnic/fnic_scsi.c int fnic_fw_reset_handler(struct fnic *fnic) fnic 207 drivers/scsi/fnic/fnic_scsi.c struct vnic_wq_copy *wq = &fnic->wq_copy[0]; fnic 212 drivers/scsi/fnic/fnic_scsi.c fnic_set_state_flags(fnic, FNIC_FLAGS_FWRESET); fnic 214 drivers/scsi/fnic/fnic_scsi.c skb_queue_purge(&fnic->frame_queue); fnic 215 drivers/scsi/fnic/fnic_scsi.c skb_queue_purge(&fnic->tx_queue); fnic 218 drivers/scsi/fnic/fnic_scsi.c while (atomic_read(&fnic->in_flight)) fnic 221 drivers/scsi/fnic/fnic_scsi.c spin_lock_irqsave(&fnic->wq_copy_lock[0], flags); fnic 223 drivers/scsi/fnic/fnic_scsi.c if (vnic_wq_copy_desc_avail(wq) <= fnic->wq_copy_desc_low[0]) fnic 224 drivers/scsi/fnic/fnic_scsi.c free_wq_copy_descs(fnic, wq); fnic 230 drivers/scsi/fnic/fnic_scsi.c atomic64_inc(&fnic->fnic_stats.fw_stats.active_fw_reqs); fnic 231 drivers/scsi/fnic/fnic_scsi.c if (atomic64_read(&fnic->fnic_stats.fw_stats.active_fw_reqs) > fnic 232 drivers/scsi/fnic/fnic_scsi.c atomic64_read(&fnic->fnic_stats.fw_stats.max_fw_reqs)) fnic 233 drivers/scsi/fnic/fnic_scsi.c atomic64_set(&fnic->fnic_stats.fw_stats.max_fw_reqs, fnic 235 drivers/scsi/fnic/fnic_scsi.c &fnic->fnic_stats.fw_stats.active_fw_reqs)); fnic 238 drivers/scsi/fnic/fnic_scsi.c spin_unlock_irqrestore(&fnic->wq_copy_lock[0], flags); fnic 241 drivers/scsi/fnic/fnic_scsi.c atomic64_inc(&fnic->fnic_stats.reset_stats.fw_resets); fnic 242 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 245 drivers/scsi/fnic/fnic_scsi.c fnic_clear_state_flags(fnic, FNIC_FLAGS_FWRESET); fnic 246 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 258 drivers/scsi/fnic/fnic_scsi.c int fnic_flogi_reg_handler(struct fnic *fnic, u32 fc_id) fnic 260 drivers/scsi/fnic/fnic_scsi.c struct vnic_wq_copy *wq = &fnic->wq_copy[0]; fnic 262 drivers/scsi/fnic/fnic_scsi.c struct fc_lport *lp = fnic->lport; fnic 267 drivers/scsi/fnic/fnic_scsi.c spin_lock_irqsave(&fnic->wq_copy_lock[0], flags); fnic 269 drivers/scsi/fnic/fnic_scsi.c if (vnic_wq_copy_desc_avail(wq) <= fnic->wq_copy_desc_low[0]) fnic 270 drivers/scsi/fnic/fnic_scsi.c free_wq_copy_descs(fnic, wq); fnic 277 drivers/scsi/fnic/fnic_scsi.c if (fnic->ctlr.map_dest) { fnic 281 drivers/scsi/fnic/fnic_scsi.c memcpy(gw_mac, fnic->ctlr.dest_addr, ETH_ALEN); fnic 285 drivers/scsi/fnic/fnic_scsi.c if ((fnic->config.flags & VFCF_FIP_CAPABLE) && !fnic->ctlr.map_dest) { fnic 288 drivers/scsi/fnic/fnic_scsi.c fnic->data_src_addr, fnic 290 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 292 drivers/scsi/fnic/fnic_scsi.c fc_id, fnic->data_src_addr, gw_mac); fnic 296 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 298 drivers/scsi/fnic/fnic_scsi.c fc_id, fnic->ctlr.map_dest, gw_mac); fnic 301 drivers/scsi/fnic/fnic_scsi.c atomic64_inc(&fnic->fnic_stats.fw_stats.active_fw_reqs); fnic 302 drivers/scsi/fnic/fnic_scsi.c if (atomic64_read(&fnic->fnic_stats.fw_stats.active_fw_reqs) > fnic 303 drivers/scsi/fnic/fnic_scsi.c atomic64_read(&fnic->fnic_stats.fw_stats.max_fw_reqs)) fnic 304 drivers/scsi/fnic/fnic_scsi.c atomic64_set(&fnic->fnic_stats.fw_stats.max_fw_reqs, fnic 305 drivers/scsi/fnic/fnic_scsi.c atomic64_read(&fnic->fnic_stats.fw_stats.active_fw_reqs)); fnic 308 drivers/scsi/fnic/fnic_scsi.c spin_unlock_irqrestore(&fnic->wq_copy_lock[0], flags); fnic 316 drivers/scsi/fnic/fnic_scsi.c static inline int fnic_queue_wq_copy_desc(struct fnic *fnic, fnic 326 drivers/scsi/fnic/fnic_scsi.c struct misc_stats *misc_stats = &fnic->fnic_stats.misc_stats; fnic 343 drivers/scsi/fnic/fnic_scsi.c io_req->sgl_list_pa = dma_map_single(&fnic->pdev->dev, fnic 347 drivers/scsi/fnic/fnic_scsi.c if (dma_mapping_error(&fnic->pdev->dev, io_req->sgl_list_pa)) { fnic 353 drivers/scsi/fnic/fnic_scsi.c io_req->sense_buf_pa = dma_map_single(&fnic->pdev->dev, fnic 357 drivers/scsi/fnic/fnic_scsi.c if (dma_mapping_error(&fnic->pdev->dev, io_req->sense_buf_pa)) { fnic 358 drivers/scsi/fnic/fnic_scsi.c dma_unmap_single(&fnic->pdev->dev, io_req->sgl_list_pa, fnic 368 drivers/scsi/fnic/fnic_scsi.c spin_lock_irqsave(&fnic->wq_copy_lock[0], intr_flags); fnic 370 drivers/scsi/fnic/fnic_scsi.c if (vnic_wq_copy_desc_avail(wq) <= fnic->wq_copy_desc_low[0]) fnic 371 drivers/scsi/fnic/fnic_scsi.c free_wq_copy_descs(fnic, wq); fnic 374 drivers/scsi/fnic/fnic_scsi.c spin_unlock_irqrestore(&fnic->wq_copy_lock[0], intr_flags); fnic 375 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic 388 drivers/scsi/fnic/fnic_scsi.c if ((fnic->config.flags & VFCF_FCP_SEQ_LVL_ERR) && fnic 407 drivers/scsi/fnic/fnic_scsi.c atomic64_inc(&fnic->fnic_stats.fw_stats.active_fw_reqs); fnic 408 drivers/scsi/fnic/fnic_scsi.c if (atomic64_read(&fnic->fnic_stats.fw_stats.active_fw_reqs) > fnic 409 drivers/scsi/fnic/fnic_scsi.c atomic64_read(&fnic->fnic_stats.fw_stats.max_fw_reqs)) fnic 410 drivers/scsi/fnic/fnic_scsi.c atomic64_set(&fnic->fnic_stats.fw_stats.max_fw_reqs, fnic 411 drivers/scsi/fnic/fnic_scsi.c atomic64_read(&fnic->fnic_stats.fw_stats.active_fw_reqs)); fnic 413 drivers/scsi/fnic/fnic_scsi.c spin_unlock_irqrestore(&fnic->wq_copy_lock[0], intr_flags); fnic 427 drivers/scsi/fnic/fnic_scsi.c struct fnic *fnic = lport_priv(lp); fnic 428 drivers/scsi/fnic/fnic_scsi.c struct fnic_stats *fnic_stats = &fnic->fnic_stats; fnic 439 drivers/scsi/fnic/fnic_scsi.c if (unlikely(fnic_chk_state_flags_locked(fnic, FNIC_FLAGS_IO_BLOCKED))) fnic 442 drivers/scsi/fnic/fnic_scsi.c if (unlikely(fnic_chk_state_flags_locked(fnic, FNIC_FLAGS_FWRESET))) fnic 447 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 456 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 466 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 477 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 489 drivers/scsi/fnic/fnic_scsi.c atomic_inc(&fnic->in_flight); fnic 501 drivers/scsi/fnic/fnic_scsi.c io_req = mempool_alloc(fnic->io_req_pool, GFP_ATOMIC); fnic 515 drivers/scsi/fnic/fnic_scsi.c mempool_free(io_req, fnic->io_req_pool); fnic 527 drivers/scsi/fnic/fnic_scsi.c mempool_alloc(fnic->io_sgl_pool[io_req->sgl_type], fnic 533 drivers/scsi/fnic/fnic_scsi.c mempool_free(io_req, fnic->io_req_pool); fnic 552 drivers/scsi/fnic/fnic_scsi.c io_lock = fnic_io_lock_hash(fnic, sc); fnic 565 drivers/scsi/fnic/fnic_scsi.c wq = &fnic->wq_copy[0]; fnic 566 drivers/scsi/fnic/fnic_scsi.c ret = fnic_queue_wq_copy_desc(fnic, wq, io_req, sc, sg_count); fnic 580 drivers/scsi/fnic/fnic_scsi.c fnic_release_ioreq_buf(fnic, io_req, sc); fnic 581 drivers/scsi/fnic/fnic_scsi.c mempool_free(io_req, fnic->io_req_pool); fnic 583 drivers/scsi/fnic/fnic_scsi.c atomic_dec(&fnic->in_flight); fnic 613 drivers/scsi/fnic/fnic_scsi.c atomic_dec(&fnic->in_flight); fnic 625 drivers/scsi/fnic/fnic_scsi.c static int fnic_fcpio_fw_reset_cmpl_handler(struct fnic *fnic, fnic 633 drivers/scsi/fnic/fnic_scsi.c struct reset_stats *reset_stats = &fnic->fnic_stats.reset_stats; fnic 640 drivers/scsi/fnic/fnic_scsi.c fnic_cleanup_io(fnic, SCSI_NO_TAG); fnic 642 drivers/scsi/fnic/fnic_scsi.c atomic64_set(&fnic->fnic_stats.fw_stats.active_fw_reqs, 0); fnic 643 drivers/scsi/fnic/fnic_scsi.c atomic64_set(&fnic->fnic_stats.io_stats.active_ios, 0); fnic 644 drivers/scsi/fnic/fnic_scsi.c atomic64_set(&fnic->io_cmpl_skip, 0); fnic 646 drivers/scsi/fnic/fnic_scsi.c spin_lock_irqsave(&fnic->fnic_lock, flags); fnic 649 drivers/scsi/fnic/fnic_scsi.c if (fnic->state == FNIC_IN_FC_TRANS_ETH_MODE) { fnic 652 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 655 drivers/scsi/fnic/fnic_scsi.c fnic->state = FNIC_IN_ETH_MODE; fnic 658 drivers/scsi/fnic/fnic_scsi.c fnic->lport->host, fnic 668 drivers/scsi/fnic/fnic_scsi.c fnic->state = FNIC_IN_FC_MODE; fnic 674 drivers/scsi/fnic/fnic_scsi.c fnic->lport->host, fnic 676 drivers/scsi/fnic/fnic_scsi.c " reset cmpl\n", fnic_state_to_str(fnic->state)); fnic 682 drivers/scsi/fnic/fnic_scsi.c if (fnic->remove_wait) fnic 683 drivers/scsi/fnic/fnic_scsi.c complete(fnic->remove_wait); fnic 689 drivers/scsi/fnic/fnic_scsi.c if (fnic->remove_wait || ret) { fnic 690 drivers/scsi/fnic/fnic_scsi.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 691 drivers/scsi/fnic/fnic_scsi.c skb_queue_purge(&fnic->tx_queue); fnic 695 drivers/scsi/fnic/fnic_scsi.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 697 drivers/scsi/fnic/fnic_scsi.c fnic_flush_tx(fnic); fnic 700 drivers/scsi/fnic/fnic_scsi.c fnic_clear_state_flags(fnic, FNIC_FLAGS_FWRESET); fnic 709 drivers/scsi/fnic/fnic_scsi.c static int fnic_fcpio_flogi_reg_cmpl_handler(struct fnic *fnic, fnic 721 drivers/scsi/fnic/fnic_scsi.c spin_lock_irqsave(&fnic->fnic_lock, flags); fnic 723 drivers/scsi/fnic/fnic_scsi.c if (fnic->state == FNIC_IN_ETH_TRANS_FC_MODE) { fnic 727 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 729 drivers/scsi/fnic/fnic_scsi.c fnic->state = FNIC_IN_FC_MODE; fnic 732 drivers/scsi/fnic/fnic_scsi.c fnic->lport->host, fnic 735 drivers/scsi/fnic/fnic_scsi.c fnic->state = FNIC_IN_ETH_MODE; fnic 739 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 742 drivers/scsi/fnic/fnic_scsi.c fnic_state_to_str(fnic->state)); fnic 747 drivers/scsi/fnic/fnic_scsi.c if (fnic->stop_rx_link_events) { fnic 748 drivers/scsi/fnic/fnic_scsi.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 751 drivers/scsi/fnic/fnic_scsi.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 753 drivers/scsi/fnic/fnic_scsi.c fnic_flush_tx(fnic); fnic 754 drivers/scsi/fnic/fnic_scsi.c queue_work(fnic_event_queue, &fnic->frame_work); fnic 756 drivers/scsi/fnic/fnic_scsi.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 788 drivers/scsi/fnic/fnic_scsi.c static inline void fnic_fcpio_ack_handler(struct fnic *fnic, fnic 798 drivers/scsi/fnic/fnic_scsi.c wq = &fnic->wq_copy[cq_index - fnic->raw_wq_count - fnic->rq_count]; fnic 799 drivers/scsi/fnic/fnic_scsi.c spin_lock_irqsave(&fnic->wq_copy_lock[0], flags); fnic 801 drivers/scsi/fnic/fnic_scsi.c fnic->fnic_stats.misc_stats.last_ack_time = jiffies; fnic 803 drivers/scsi/fnic/fnic_scsi.c fnic->fw_ack_index[0] = request_out; fnic 804 drivers/scsi/fnic/fnic_scsi.c fnic->fw_ack_recd[0] = 1; fnic 807 drivers/scsi/fnic/fnic_scsi.c &fnic->fnic_stats.misc_stats.ack_index_out_of_range); fnic 809 drivers/scsi/fnic/fnic_scsi.c spin_unlock_irqrestore(&fnic->wq_copy_lock[0], flags); fnic 811 drivers/scsi/fnic/fnic_scsi.c fnic->lport->host->host_no, 0, 0, ox_id_tag[2], ox_id_tag[3], fnic 819 drivers/scsi/fnic/fnic_scsi.c static void fnic_fcpio_icmnd_cmpl_handler(struct fnic *fnic, fnic 830 drivers/scsi/fnic/fnic_scsi.c struct fnic_stats *fnic_stats = &fnic->fnic_stats; fnic 842 drivers/scsi/fnic/fnic_scsi.c if (id >= fnic->fnic_max_tag_id) { fnic 843 drivers/scsi/fnic/fnic_scsi.c shost_printk(KERN_ERR, fnic->lport->host, fnic 849 drivers/scsi/fnic/fnic_scsi.c sc = scsi_host_find_tag(fnic->lport->host, id); fnic 853 drivers/scsi/fnic/fnic_scsi.c shost_printk(KERN_ERR, fnic->lport->host, fnic 858 drivers/scsi/fnic/fnic_scsi.c fnic->lport->host->host_no, id, fnic 868 drivers/scsi/fnic/fnic_scsi.c io_lock = fnic_io_lock_hash(fnic, sc); fnic 876 drivers/scsi/fnic/fnic_scsi.c shost_printk(KERN_ERR, fnic->lport->host, fnic 903 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic 992 drivers/scsi/fnic/fnic_scsi.c shost_printk(KERN_ERR, fnic->lport->host, "hdr status = %s\n", fnic 996 drivers/scsi/fnic/fnic_scsi.c fnic_release_ioreq_buf(fnic, io_req, sc); fnic 998 drivers/scsi/fnic/fnic_scsi.c mempool_free(io_req, fnic->io_req_pool); fnic 1015 drivers/scsi/fnic/fnic_scsi.c fnic->lport->host_stats.fcp_input_requests++; fnic 1016 drivers/scsi/fnic/fnic_scsi.c fnic->fcp_input_bytes += xfer_len; fnic 1018 drivers/scsi/fnic/fnic_scsi.c fnic->lport->host_stats.fcp_output_requests++; fnic 1019 drivers/scsi/fnic/fnic_scsi.c fnic->fcp_output_bytes += xfer_len; fnic 1021 drivers/scsi/fnic/fnic_scsi.c fnic->lport->host_stats.fcp_control_requests++; fnic 1024 drivers/scsi/fnic/fnic_scsi.c if (atomic64_read(&fnic->io_cmpl_skip)) fnic 1025 drivers/scsi/fnic/fnic_scsi.c atomic64_dec(&fnic->io_cmpl_skip); fnic 1059 drivers/scsi/fnic/fnic_scsi.c static void fnic_fcpio_itmf_cmpl_handler(struct fnic *fnic, fnic 1068 drivers/scsi/fnic/fnic_scsi.c struct fnic_stats *fnic_stats = &fnic->fnic_stats; fnic 1069 drivers/scsi/fnic/fnic_scsi.c struct abort_stats *abts_stats = &fnic->fnic_stats.abts_stats; fnic 1070 drivers/scsi/fnic/fnic_scsi.c struct terminate_stats *term_stats = &fnic->fnic_stats.term_stats; fnic 1071 drivers/scsi/fnic/fnic_scsi.c struct misc_stats *misc_stats = &fnic->fnic_stats.misc_stats; fnic 1079 drivers/scsi/fnic/fnic_scsi.c if ((id & FNIC_TAG_MASK) >= fnic->fnic_max_tag_id) { fnic 1080 drivers/scsi/fnic/fnic_scsi.c shost_printk(KERN_ERR, fnic->lport->host, fnic 1086 drivers/scsi/fnic/fnic_scsi.c sc = scsi_host_find_tag(fnic->lport->host, id & FNIC_TAG_MASK); fnic 1090 drivers/scsi/fnic/fnic_scsi.c shost_printk(KERN_ERR, fnic->lport->host, fnic 1095 drivers/scsi/fnic/fnic_scsi.c io_lock = fnic_io_lock_hash(fnic, sc); fnic 1103 drivers/scsi/fnic/fnic_scsi.c shost_printk(KERN_ERR, fnic->lport->host, fnic 1114 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 1136 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic 1171 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 1185 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 1192 drivers/scsi/fnic/fnic_scsi.c fnic_release_ioreq_buf(fnic, io_req, sc); fnic 1193 drivers/scsi/fnic/fnic_scsi.c mempool_free(io_req, fnic->io_req_pool); fnic 1209 drivers/scsi/fnic/fnic_scsi.c if (atomic64_read(&fnic->io_cmpl_skip)) fnic 1210 drivers/scsi/fnic/fnic_scsi.c atomic64_dec(&fnic->io_cmpl_skip); fnic 1227 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 1242 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 1251 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 1260 drivers/scsi/fnic/fnic_scsi.c shost_printk(KERN_ERR, fnic->lport->host, fnic 1276 drivers/scsi/fnic/fnic_scsi.c struct fnic *fnic = vnic_dev_priv(vdev); fnic 1284 drivers/scsi/fnic/fnic_scsi.c atomic64_dec(&fnic->fnic_stats.fw_stats.active_fw_reqs); fnic 1292 drivers/scsi/fnic/fnic_scsi.c fnic_fcpio_ack_handler(fnic, cq_index, desc); fnic 1296 drivers/scsi/fnic/fnic_scsi.c fnic_fcpio_icmnd_cmpl_handler(fnic, desc); fnic 1300 drivers/scsi/fnic/fnic_scsi.c fnic_fcpio_itmf_cmpl_handler(fnic, desc); fnic 1305 drivers/scsi/fnic/fnic_scsi.c fnic_fcpio_flogi_reg_cmpl_handler(fnic, desc); fnic 1309 drivers/scsi/fnic/fnic_scsi.c fnic_fcpio_fw_reset_cmpl_handler(fnic, desc); fnic 1313 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 1326 drivers/scsi/fnic/fnic_scsi.c int fnic_wq_copy_cmpl_handler(struct fnic *fnic, int copy_work_to_do) fnic 1331 drivers/scsi/fnic/fnic_scsi.c struct misc_stats *misc_stats = &fnic->fnic_stats.misc_stats; fnic 1337 drivers/scsi/fnic/fnic_scsi.c for (i = 0; i < fnic->wq_copy_count; i++) { fnic 1338 drivers/scsi/fnic/fnic_scsi.c cq_index = i + fnic->raw_wq_count + fnic->rq_count; fnic 1341 drivers/scsi/fnic/fnic_scsi.c cur_work_done = vnic_cq_copy_service(&fnic->cq[cq_index], fnic 1361 drivers/scsi/fnic/fnic_scsi.c static void fnic_cleanup_io(struct fnic *fnic, int exclude_id) fnic 1369 drivers/scsi/fnic/fnic_scsi.c struct fnic_stats *fnic_stats = &fnic->fnic_stats; fnic 1371 drivers/scsi/fnic/fnic_scsi.c for (i = 0; i < fnic->fnic_max_tag_id; i++) { fnic 1375 drivers/scsi/fnic/fnic_scsi.c io_lock = fnic_io_lock_tag(fnic, i); fnic 1377 drivers/scsi/fnic/fnic_scsi.c sc = scsi_host_find_tag(fnic->lport->host, i); fnic 1415 drivers/scsi/fnic/fnic_scsi.c fnic_release_ioreq_buf(fnic, io_req, sc); fnic 1416 drivers/scsi/fnic/fnic_scsi.c mempool_free(io_req, fnic->io_req_pool); fnic 1420 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 1425 drivers/scsi/fnic/fnic_scsi.c if (atomic64_read(&fnic->io_cmpl_skip)) fnic 1426 drivers/scsi/fnic/fnic_scsi.c atomic64_dec(&fnic->io_cmpl_skip); fnic 1433 drivers/scsi/fnic/fnic_scsi.c shost_printk(KERN_ERR, fnic->lport->host, fnic 1455 drivers/scsi/fnic/fnic_scsi.c struct fnic *fnic = vnic_dev_priv(wq->vdev); fnic 1466 drivers/scsi/fnic/fnic_scsi.c if (id >= fnic->fnic_max_tag_id) fnic 1469 drivers/scsi/fnic/fnic_scsi.c sc = scsi_host_find_tag(fnic->lport->host, id); fnic 1473 drivers/scsi/fnic/fnic_scsi.c io_lock = fnic_io_lock_hash(fnic, sc); fnic 1491 drivers/scsi/fnic/fnic_scsi.c fnic_release_ioreq_buf(fnic, io_req, sc); fnic 1492 drivers/scsi/fnic/fnic_scsi.c mempool_free(io_req, fnic->io_req_pool); fnic 1496 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, "wq_copy_cleanup_handler:" fnic 1512 drivers/scsi/fnic/fnic_scsi.c static inline int fnic_queue_abort_io_req(struct fnic *fnic, int tag, fnic 1516 drivers/scsi/fnic/fnic_scsi.c struct vnic_wq_copy *wq = &fnic->wq_copy[0]; fnic 1517 drivers/scsi/fnic/fnic_scsi.c struct Scsi_Host *host = fnic->lport->host; fnic 1518 drivers/scsi/fnic/fnic_scsi.c struct misc_stats *misc_stats = &fnic->fnic_stats.misc_stats; fnic 1522 drivers/scsi/fnic/fnic_scsi.c if (unlikely(fnic_chk_state_flags_locked(fnic, fnic 1527 drivers/scsi/fnic/fnic_scsi.c atomic_inc(&fnic->in_flight); fnic 1530 drivers/scsi/fnic/fnic_scsi.c spin_lock_irqsave(&fnic->wq_copy_lock[0], flags); fnic 1532 drivers/scsi/fnic/fnic_scsi.c if (vnic_wq_copy_desc_avail(wq) <= fnic->wq_copy_desc_low[0]) fnic 1533 drivers/scsi/fnic/fnic_scsi.c free_wq_copy_descs(fnic, wq); fnic 1536 drivers/scsi/fnic/fnic_scsi.c spin_unlock_irqrestore(&fnic->wq_copy_lock[0], flags); fnic 1537 drivers/scsi/fnic/fnic_scsi.c atomic_dec(&fnic->in_flight); fnic 1538 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 1545 drivers/scsi/fnic/fnic_scsi.c fnic->config.ra_tov, fnic->config.ed_tov); fnic 1547 drivers/scsi/fnic/fnic_scsi.c atomic64_inc(&fnic->fnic_stats.fw_stats.active_fw_reqs); fnic 1548 drivers/scsi/fnic/fnic_scsi.c if (atomic64_read(&fnic->fnic_stats.fw_stats.active_fw_reqs) > fnic 1549 drivers/scsi/fnic/fnic_scsi.c atomic64_read(&fnic->fnic_stats.fw_stats.max_fw_reqs)) fnic 1550 drivers/scsi/fnic/fnic_scsi.c atomic64_set(&fnic->fnic_stats.fw_stats.max_fw_reqs, fnic 1551 drivers/scsi/fnic/fnic_scsi.c atomic64_read(&fnic->fnic_stats.fw_stats.active_fw_reqs)); fnic 1553 drivers/scsi/fnic/fnic_scsi.c spin_unlock_irqrestore(&fnic->wq_copy_lock[0], flags); fnic 1554 drivers/scsi/fnic/fnic_scsi.c atomic_dec(&fnic->in_flight); fnic 1559 drivers/scsi/fnic/fnic_scsi.c static void fnic_rport_exch_reset(struct fnic *fnic, u32 port_id) fnic 1568 drivers/scsi/fnic/fnic_scsi.c struct reset_stats *reset_stats = &fnic->fnic_stats.reset_stats; fnic 1569 drivers/scsi/fnic/fnic_scsi.c struct terminate_stats *term_stats = &fnic->fnic_stats.term_stats; fnic 1574 drivers/scsi/fnic/fnic_scsi.c fnic->lport->host, fnic 1578 drivers/scsi/fnic/fnic_scsi.c if (fnic->in_remove) fnic 1581 drivers/scsi/fnic/fnic_scsi.c for (tag = 0; tag < fnic->fnic_max_tag_id; tag++) { fnic 1583 drivers/scsi/fnic/fnic_scsi.c io_lock = fnic_io_lock_tag(fnic, tag); fnic 1585 drivers/scsi/fnic/fnic_scsi.c sc = scsi_host_find_tag(fnic->lport->host, tag); fnic 1600 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 1616 drivers/scsi/fnic/fnic_scsi.c shost_printk(KERN_ERR, fnic->lport->host, fnic 1623 drivers/scsi/fnic/fnic_scsi.c shost_printk(KERN_ERR, fnic->lport->host, fnic 1635 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 1642 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 1650 drivers/scsi/fnic/fnic_scsi.c if (fnic_queue_abort_io_req(fnic, abt_tag, fnic 1691 drivers/scsi/fnic/fnic_scsi.c struct fnic *fnic; fnic 1713 drivers/scsi/fnic/fnic_scsi.c fnic = lport_priv(lport); fnic 1715 drivers/scsi/fnic/fnic_scsi.c fnic->lport->host, "fnic_terminate_rport_io called" fnic 1720 drivers/scsi/fnic/fnic_scsi.c if (fnic->in_remove) fnic 1723 drivers/scsi/fnic/fnic_scsi.c reset_stats = &fnic->fnic_stats.reset_stats; fnic 1724 drivers/scsi/fnic/fnic_scsi.c term_stats = &fnic->fnic_stats.term_stats; fnic 1726 drivers/scsi/fnic/fnic_scsi.c for (tag = 0; tag < fnic->fnic_max_tag_id; tag++) { fnic 1728 drivers/scsi/fnic/fnic_scsi.c io_lock = fnic_io_lock_tag(fnic, tag); fnic 1730 drivers/scsi/fnic/fnic_scsi.c sc = scsi_host_find_tag(fnic->lport->host, tag); fnic 1751 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 1766 drivers/scsi/fnic/fnic_scsi.c shost_printk(KERN_ERR, fnic->lport->host, fnic 1772 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic 1784 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 1791 drivers/scsi/fnic/fnic_scsi.c fnic->lport->host, fnic 1799 drivers/scsi/fnic/fnic_scsi.c if (fnic_queue_abort_io_req(fnic, abt_tag, fnic 1836 drivers/scsi/fnic/fnic_scsi.c struct fnic *fnic; fnic 1859 drivers/scsi/fnic/fnic_scsi.c fnic = lport_priv(lp); fnic 1860 drivers/scsi/fnic/fnic_scsi.c fnic_stats = &fnic->fnic_stats; fnic 1861 drivers/scsi/fnic/fnic_scsi.c abts_stats = &fnic->fnic_stats.abts_stats; fnic 1862 drivers/scsi/fnic/fnic_scsi.c term_stats = &fnic->fnic_stats.term_stats; fnic 1867 drivers/scsi/fnic/fnic_scsi.c fnic->lport->host, fnic 1890 drivers/scsi/fnic/fnic_scsi.c io_lock = fnic_io_lock_hash(fnic, sc); fnic 1921 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic 1950 drivers/scsi/fnic/fnic_scsi.c if (fnic_queue_abort_io_req(fnic, sc->request->tag, task_req, fnic 1978 drivers/scsi/fnic/fnic_scsi.c (2 * fnic->config.ra_tov + fnic 1979 drivers/scsi/fnic/fnic_scsi.c fnic->config.ed_tov)); fnic 2011 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 2036 drivers/scsi/fnic/fnic_scsi.c fnic_release_ioreq_buf(fnic, io_req, sc); fnic 2037 drivers/scsi/fnic/fnic_scsi.c mempool_free(io_req, fnic->io_req_pool); fnic 2044 drivers/scsi/fnic/fnic_scsi.c if (atomic64_read(&fnic->io_cmpl_skip)) fnic 2045 drivers/scsi/fnic/fnic_scsi.c atomic64_dec(&fnic->io_cmpl_skip); fnic 2059 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 2066 drivers/scsi/fnic/fnic_scsi.c static inline int fnic_queue_dr_io_req(struct fnic *fnic, fnic 2070 drivers/scsi/fnic/fnic_scsi.c struct vnic_wq_copy *wq = &fnic->wq_copy[0]; fnic 2071 drivers/scsi/fnic/fnic_scsi.c struct Scsi_Host *host = fnic->lport->host; fnic 2072 drivers/scsi/fnic/fnic_scsi.c struct misc_stats *misc_stats = &fnic->fnic_stats.misc_stats; fnic 2078 drivers/scsi/fnic/fnic_scsi.c if (unlikely(fnic_chk_state_flags_locked(fnic, fnic 2083 drivers/scsi/fnic/fnic_scsi.c atomic_inc(&fnic->in_flight); fnic 2086 drivers/scsi/fnic/fnic_scsi.c spin_lock_irqsave(&fnic->wq_copy_lock[0], intr_flags); fnic 2088 drivers/scsi/fnic/fnic_scsi.c if (vnic_wq_copy_desc_avail(wq) <= fnic->wq_copy_desc_low[0]) fnic 2089 drivers/scsi/fnic/fnic_scsi.c free_wq_copy_descs(fnic, wq); fnic 2092 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 2105 drivers/scsi/fnic/fnic_scsi.c fnic->config.ra_tov, fnic->config.ed_tov); fnic 2107 drivers/scsi/fnic/fnic_scsi.c atomic64_inc(&fnic->fnic_stats.fw_stats.active_fw_reqs); fnic 2108 drivers/scsi/fnic/fnic_scsi.c if (atomic64_read(&fnic->fnic_stats.fw_stats.active_fw_reqs) > fnic 2109 drivers/scsi/fnic/fnic_scsi.c atomic64_read(&fnic->fnic_stats.fw_stats.max_fw_reqs)) fnic 2110 drivers/scsi/fnic/fnic_scsi.c atomic64_set(&fnic->fnic_stats.fw_stats.max_fw_reqs, fnic 2111 drivers/scsi/fnic/fnic_scsi.c atomic64_read(&fnic->fnic_stats.fw_stats.active_fw_reqs)); fnic 2114 drivers/scsi/fnic/fnic_scsi.c spin_unlock_irqrestore(&fnic->wq_copy_lock[0], intr_flags); fnic 2115 drivers/scsi/fnic/fnic_scsi.c atomic_dec(&fnic->in_flight); fnic 2126 drivers/scsi/fnic/fnic_scsi.c static int fnic_clean_pending_aborts(struct fnic *fnic, fnic 2142 drivers/scsi/fnic/fnic_scsi.c for (tag = 0; tag < fnic->fnic_max_tag_id; tag++) { fnic 2143 drivers/scsi/fnic/fnic_scsi.c io_lock = fnic_io_lock_tag(fnic, tag); fnic 2145 drivers/scsi/fnic/fnic_scsi.c sc = scsi_host_find_tag(fnic->lport->host, tag); fnic 2166 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 2176 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic 2184 drivers/scsi/fnic/fnic_scsi.c shost_printk(KERN_ERR, fnic->lport->host, fnic 2202 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic 2213 drivers/scsi/fnic/fnic_scsi.c if (fnic_queue_abort_io_req(fnic, abt_tag, fnic 2235 drivers/scsi/fnic/fnic_scsi.c (fnic->config.ed_tov)); fnic 2264 drivers/scsi/fnic/fnic_scsi.c fnic_release_ioreq_buf(fnic, io_req, sc); fnic 2265 drivers/scsi/fnic/fnic_scsi.c mempool_free(io_req, fnic->io_req_pool); fnic 2279 drivers/scsi/fnic/fnic_scsi.c schedule_timeout(msecs_to_jiffies(2 * fnic->config.ed_tov)); fnic 2282 drivers/scsi/fnic/fnic_scsi.c if (fnic_is_abts_pending(fnic, lr_sc)) fnic 2294 drivers/scsi/fnic/fnic_scsi.c fnic_scsi_host_start_tag(struct fnic *fnic, struct scsi_cmnd *sc) fnic 2314 drivers/scsi/fnic/fnic_scsi.c fnic_scsi_host_end_tag(struct fnic *fnic, struct scsi_cmnd *sc) fnic 2329 drivers/scsi/fnic/fnic_scsi.c struct fnic *fnic; fnic 2351 drivers/scsi/fnic/fnic_scsi.c fnic = lport_priv(lp); fnic 2352 drivers/scsi/fnic/fnic_scsi.c fnic_stats = &fnic->fnic_stats; fnic 2353 drivers/scsi/fnic/fnic_scsi.c reset_stats = &fnic->fnic_stats.reset_stats; fnic 2358 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 2380 drivers/scsi/fnic/fnic_scsi.c tag = fnic_scsi_host_start_tag(fnic, sc); fnic 2386 drivers/scsi/fnic/fnic_scsi.c io_lock = fnic_io_lock_hash(fnic, sc); fnic 2395 drivers/scsi/fnic/fnic_scsi.c io_req = mempool_alloc(fnic->io_req_pool, GFP_ATOMIC); fnic 2409 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, "TAG %x\n", tag); fnic 2415 drivers/scsi/fnic/fnic_scsi.c if (fnic_queue_dr_io_req(fnic, sc, io_req)) { fnic 2437 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 2451 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 2467 drivers/scsi/fnic/fnic_scsi.c if (fnic_queue_abort_io_req(fnic, fnic 2479 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 2506 drivers/scsi/fnic/fnic_scsi.c fnic->lport->host, fnic 2519 drivers/scsi/fnic/fnic_scsi.c if (fnic_clean_pending_aborts(fnic, sc, new_sc)) { fnic 2522 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 2543 drivers/scsi/fnic/fnic_scsi.c fnic_release_ioreq_buf(fnic, io_req, sc); fnic 2544 drivers/scsi/fnic/fnic_scsi.c mempool_free(io_req, fnic->io_req_pool); fnic 2558 drivers/scsi/fnic/fnic_scsi.c fnic_scsi_host_end_tag(fnic, sc); fnic 2560 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 2575 drivers/scsi/fnic/fnic_scsi.c struct fnic *fnic; fnic 2580 drivers/scsi/fnic/fnic_scsi.c fnic = lport_priv(lp); fnic 2581 drivers/scsi/fnic/fnic_scsi.c reset_stats = &fnic->fnic_stats.reset_stats; fnic 2583 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 2594 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 2622 drivers/scsi/fnic/fnic_scsi.c struct fnic *fnic = lport_priv(lp); fnic 2625 drivers/scsi/fnic/fnic_scsi.c spin_lock_irqsave(&fnic->fnic_lock, flags); fnic 2626 drivers/scsi/fnic/fnic_scsi.c if (fnic->internal_reset_inprogress == 0) { fnic 2627 drivers/scsi/fnic/fnic_scsi.c fnic->internal_reset_inprogress = 1; fnic 2629 drivers/scsi/fnic/fnic_scsi.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 2630 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 2634 drivers/scsi/fnic/fnic_scsi.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 2655 drivers/scsi/fnic/fnic_scsi.c spin_lock_irqsave(&fnic->fnic_lock, flags); fnic 2656 drivers/scsi/fnic/fnic_scsi.c fnic->internal_reset_inprogress = 0; fnic 2657 drivers/scsi/fnic/fnic_scsi.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 2669 drivers/scsi/fnic/fnic_scsi.c struct fnic *fnic = lport_priv(lp); fnic 2674 drivers/scsi/fnic/fnic_scsi.c spin_lock_irqsave(&fnic->fnic_lock, flags); fnic 2675 drivers/scsi/fnic/fnic_scsi.c if (unlikely(fnic->state == FNIC_IN_FC_TRANS_ETH_MODE)) { fnic 2677 drivers/scsi/fnic/fnic_scsi.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 2682 drivers/scsi/fnic/fnic_scsi.c fnic->remove_wait = &remove_wait; fnic 2683 drivers/scsi/fnic/fnic_scsi.c old_state = fnic->state; fnic 2684 drivers/scsi/fnic/fnic_scsi.c fnic->state = FNIC_IN_FC_TRANS_ETH_MODE; fnic 2685 drivers/scsi/fnic/fnic_scsi.c fnic_update_mac_locked(fnic, fnic->ctlr.ctl_src_addr); fnic 2686 drivers/scsi/fnic/fnic_scsi.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 2688 drivers/scsi/fnic/fnic_scsi.c err = fnic_fw_reset_handler(fnic); fnic 2690 drivers/scsi/fnic/fnic_scsi.c spin_lock_irqsave(&fnic->fnic_lock, flags); fnic 2691 drivers/scsi/fnic/fnic_scsi.c if (fnic->state == FNIC_IN_FC_TRANS_ETH_MODE) fnic 2692 drivers/scsi/fnic/fnic_scsi.c fnic->state = old_state; fnic 2693 drivers/scsi/fnic/fnic_scsi.c fnic->remove_wait = NULL; fnic 2694 drivers/scsi/fnic/fnic_scsi.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 2702 drivers/scsi/fnic/fnic_scsi.c spin_lock_irqsave(&fnic->fnic_lock, flags); fnic 2703 drivers/scsi/fnic/fnic_scsi.c fnic->remove_wait = NULL; fnic 2704 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic 2706 drivers/scsi/fnic/fnic_scsi.c (fnic->state == FNIC_IN_ETH_MODE) ? fnic 2708 drivers/scsi/fnic/fnic_scsi.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 2719 drivers/scsi/fnic/fnic_scsi.c struct fnic *fnic = lport_priv(lp); fnic 2723 drivers/scsi/fnic/fnic_scsi.c spin_lock_irqsave(&fnic->fnic_lock, flags); fnic 2724 drivers/scsi/fnic/fnic_scsi.c if (unlikely(fnic->state == FNIC_IN_FC_TRANS_ETH_MODE)) { fnic 2726 drivers/scsi/fnic/fnic_scsi.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 2730 drivers/scsi/fnic/fnic_scsi.c old_state = fnic->state; fnic 2731 drivers/scsi/fnic/fnic_scsi.c fnic->state = FNIC_IN_FC_TRANS_ETH_MODE; fnic 2732 drivers/scsi/fnic/fnic_scsi.c fnic_update_mac_locked(fnic, fnic->ctlr.ctl_src_addr); fnic 2733 drivers/scsi/fnic/fnic_scsi.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 2735 drivers/scsi/fnic/fnic_scsi.c if (fnic_fw_reset_handler(fnic)) { fnic 2736 drivers/scsi/fnic/fnic_scsi.c spin_lock_irqsave(&fnic->fnic_lock, flags); fnic 2737 drivers/scsi/fnic/fnic_scsi.c if (fnic->state == FNIC_IN_FC_TRANS_ETH_MODE) fnic 2738 drivers/scsi/fnic/fnic_scsi.c fnic->state = old_state; fnic 2739 drivers/scsi/fnic/fnic_scsi.c spin_unlock_irqrestore(&fnic->fnic_lock, flags); fnic 2750 drivers/scsi/fnic/fnic_scsi.c struct fnic *fnic = lport_priv(lp); fnic 2757 drivers/scsi/fnic/fnic_scsi.c fnic_rport_exch_reset(fnic, did); fnic 2765 drivers/scsi/fnic/fnic_scsi.c if (!fnic->in_remove) fnic 2783 drivers/scsi/fnic/fnic_scsi.c int fnic_is_abts_pending(struct fnic *fnic, struct scsi_cmnd *lr_sc) fnic 2797 drivers/scsi/fnic/fnic_scsi.c for (tag = 0; tag < fnic->fnic_max_tag_id; tag++) { fnic 2798 drivers/scsi/fnic/fnic_scsi.c sc = scsi_host_find_tag(fnic->lport->host, tag); fnic 2806 drivers/scsi/fnic/fnic_scsi.c io_lock = fnic_io_lock_hash(fnic, sc); fnic 2820 drivers/scsi/fnic/fnic_scsi.c FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic 141 drivers/scsi/fnic/fnic_stats.h void fnic_stats_debugfs_init(struct fnic *); fnic 142 drivers/scsi/fnic/fnic_stats.h void fnic_stats_debugfs_remove(struct fnic *);