Linux Kernel
3.7.1
|
#include <linux/interrupt.h>
#include <linux/netdevice.h>
#include <linux/workqueue.h>
#include <linux/bitops.h>
#include <scsi/libfc.h>
#include <scsi/libfcoe.h>
#include "fnic_io.h"
#include "fnic_res.h"
#include "vnic_dev.h"
#include "vnic_wq.h"
#include "vnic_rq.h"
#include "vnic_cq.h"
#include "vnic_wq_copy.h"
#include "vnic_intr.h"
#include "vnic_stats.h"
#include "vnic_scsi.h"
Go to the source code of this file.
Data Structures | |
struct | fnic_msix_entry |
struct | fnic |
Macros | |
#define | DRV_NAME "fnic" |
#define | DRV_DESCRIPTION "Cisco FCoE HBA Driver" |
#define | DRV_VERSION "1.5.0.2" |
#define | PFX DRV_NAME ": " |
#define | DFX DRV_NAME "%d: " |
#define | DESC_CLEAN_LOW_WATERMARK 8 |
#define | FNIC_MAX_IO_REQ 2048 /* scsi_cmnd tag map entries */ |
#define | FNIC_IO_LOCKS 64 /* IO locks: power of 2 */ |
#define | FNIC_DFLT_QUEUE_DEPTH 32 |
#define | FNIC_STATS_RATE_LIMIT 4 /* limit rate at which stats are pulled up */ |
#define | FNIC_TAG_ABORT BIT(30) /* tag bit indicating abort */ |
#define | FNIC_TAG_DEV_RST BIT(29) /* indicates device reset */ |
#define | FNIC_TAG_MASK (BIT(24) - 1) /* mask for lookup */ |
#define | FNIC_NO_TAG -1 |
#define | CMD_SP(Cmnd) ((Cmnd)->SCp.ptr) |
#define | CMD_STATE(Cmnd) ((Cmnd)->SCp.phase) |
#define | CMD_ABTS_STATUS(Cmnd) ((Cmnd)->SCp.Message) |
#define | CMD_LR_STATUS(Cmnd) ((Cmnd)->SCp.have_data_in) |
#define | CMD_TAG(Cmnd) ((Cmnd)->SCp.sent_command) |
#define | FCPIO_INVALID_CODE 0x100 /* hdr_status value unused by firmware */ |
#define | FNIC_LUN_RESET_TIMEOUT 10000 /* mSec */ |
#define | FNIC_HOST_RESET_TIMEOUT 10000 /* mSec */ |
#define | FNIC_RMDEVICE_TIMEOUT 1000 /* mSec */ |
#define | FNIC_HOST_RESET_SETTLE_TIME 30 /* Sec */ |
#define | FNIC_MAX_FCP_TARGET 256 |
#define | FNIC_MAIN_LOGGING 0x01 |
#define | FNIC_FCS_LOGGING 0x02 |
#define | FNIC_SCSI_LOGGING 0x04 |
#define | FNIC_ISR_LOGGING 0x08 |
#define | FNIC_CHECK_LOGGING(LEVEL, CMD) |
#define | FNIC_MAIN_DBG(kern_level, host, fmt, args...) |
#define | FNIC_FCS_DBG(kern_level, host, fmt, args...) |
#define | FNIC_SCSI_DBG(kern_level, host, fmt, args...) |
#define | FNIC_ISR_DBG(kern_level, host, fmt, args...) |
#define | FNIC_WQ_COPY_MAX 1 |
#define | FNIC_WQ_MAX 1 |
#define | FNIC_RQ_MAX 1 |
#define | FNIC_CQ_MAX (FNIC_WQ_COPY_MAX + FNIC_WQ_MAX + FNIC_RQ_MAX) |
Variables | |
unsigned int | fnic_log_level |
const char * | fnic_state_str [] |
struct workqueue_struct * | fnic_event_queue |
struct device_attribute * | fnic_attrs [] |
#define FCPIO_INVALID_CODE 0x100 /* hdr_status value unused by firmware */ |
#define FNIC_CQ_MAX (FNIC_WQ_COPY_MAX + FNIC_WQ_MAX + FNIC_RQ_MAX) |
enum fnic_intx_intr_index |
enum fnic_msix_intr_index |
enum fnic_state |
Definition at line 1231 of file fnic_scsi.c.
Definition at line 428 of file fnic_fcs.c.
Definition at line 317 of file fnic_isr.c.
Definition at line 1510 of file fnic_scsi.c.
Definition at line 1794 of file fnic_scsi.c.
fnic_eth_send() - Send Ethernet frame. : fcoe_ctlr instance. : Ethernet Frame, FIP, without VLAN encapsulation.
Definition at line 468 of file fnic_fcs.c.
Definition at line 1798 of file fnic_scsi.c.
fnic_flush_tx() - send queued frames. : fnic device
Send frames that were waiting to go out in FC or Ethernet mode. Whenever changing modes we purge queued frames, so these frames should be queued for the stable mode that we're in, either FC or Ethernet.
Called without fnic_lock held.
Definition at line 615 of file fnic_fcs.c.
Definition at line 132 of file fnic_isr.c.
void fnic_free_rq_buf | ( | struct vnic_rq * | rq, |
struct vnic_rq_buf * | buf | ||
) |
Definition at line 451 of file fnic_fcs.c.
void fnic_free_wq_buf | ( | struct vnic_wq * | wq, |
struct vnic_wq_buf * | buf | ||
) |
Definition at line 710 of file fnic_fcs.c.
Definition at line 172 of file fnic_scsi.c.
void fnic_handle_frame | ( | struct work_struct * | work | ) |
Definition at line 97 of file fnic_fcs.c.
void fnic_handle_link | ( | struct work_struct * | work | ) |
Definition at line 41 of file fnic_fcs.c.
Definition at line 241 of file fnic_main.c.
Definition at line 1697 of file fnic_scsi.c.
Definition at line 211 of file fnic_main.c.
Definition at line 154 of file fnic_isr.c.
Definition at line 1661 of file fnic_scsi.c.
Definition at line 1729 of file fnic_scsi.c.
Definition at line 1772 of file fnic_scsi.c.
Definition at line 217 of file fnic_isr.c.
fnic_set_port_id() - set the port_ID after successful FLOGI. : local port. : assigned FC_ID. : received frame containing the FLOGI accept or NULL.
This is called from libfc when a new FC_ID has been assigned. This causes us to reset the firmware to FC_MODE and setup the new MAC address and FC_ID.
It is also called with FC_ID 0 when we're logged off.
If the FC_ID is due to point-to-point, fp may be NULL.
Definition at line 233 of file fnic_fcs.c.
Definition at line 78 of file fnic_scsi.c.
Definition at line 1141 of file fnic_scsi.c.
fnic_update_mac() - set data MAC address and filters. : local port. : newly-assigned FCoE MAC address.
Definition at line 210 of file fnic_fcs.c.
fnic_update_mac_locked() - set data MAC address and filters. : fnic instance. : newly-assigned FCoE MAC address.
Called with the fnic lock held.
Definition at line 188 of file fnic_fcs.c.
void fnic_wq_copy_cleanup_handler | ( | struct vnic_wq_copy * | wq, |
struct fcpio_host_req * | desc | ||
) |
Definition at line 992 of file fnic_scsi.c.
Definition at line 930 of file fnic_scsi.c.
struct device_attribute* fnic_attrs[] |
Definition at line 51 of file fnic_attrs.c.
struct workqueue_struct* fnic_event_queue |
Definition at line 37 of file fnic_fcs.c.
unsigned int fnic_log_level |
Definition at line 67 of file fnic_main.c.
Definition at line 42 of file fnic_scsi.c.