Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173680
b: refs/heads/master
c: 78112e5
h: refs/heads/master
v: v3
  • Loading branch information
Joe Eykholt authored and James Bottomley committed Dec 4, 2009
1 parent 5aeec60 commit 56fd237
Show file tree
Hide file tree
Showing 9 changed files with 383 additions and 343 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 386309ce927a308d7742a6fb24a536d3383fbd49
refs/heads/master: 78112e5558064cb4d2e355aed87b2036fcdfe3dd
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ config FCOE
config FCOE_FNIC
tristate "Cisco FNIC Driver"
depends on PCI && X86
select LIBFC
select LIBFCOE
help
This is support for the Cisco PCI-Express FCoE HBA.

Expand Down
23 changes: 14 additions & 9 deletions trunk/drivers/scsi/fnic/fnic.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <linux/netdevice.h>
#include <linux/workqueue.h>
#include <scsi/libfc.h>
#include <scsi/libfcoe.h>
#include "fnic_io.h"
#include "fnic_res.h"
#include "vnic_dev.h"
Expand Down Expand Up @@ -145,6 +146,7 @@ struct mempool;
/* Per-instance private data structure */
struct fnic {
struct fc_lport *lport;
struct fcoe_ctlr ctlr; /* FIP FCoE controller structure */
struct vnic_dev_bar bar0;

struct msix_entry msix_entry[FNIC_MSIX_INTR_MAX];
Expand All @@ -162,23 +164,16 @@ struct fnic {
unsigned int wq_count;
unsigned int cq_count;

u32 fcoui_mode:1; /* use fcoui address*/
u32 vlan_hw_insert:1; /* let hw insert the tag */
u32 in_remove:1; /* fnic device in removal */
u32 stop_rx_link_events:1; /* stop proc. rx frames, link events */

struct completion *remove_wait; /* device remove thread blocks */

struct fc_frame *flogi;
struct fc_frame *flogi_resp;
u16 flogi_oxid;
unsigned long s_id;
enum fnic_state state;
spinlock_t fnic_lock;

u16 vlan_id; /* VLAN tag including priority */
u8 mac_addr[ETH_ALEN];
u8 dest_addr[ETH_ALEN];
u8 data_src_addr[ETH_ALEN];
u64 fcp_input_bytes; /* internal statistic */
u64 fcp_output_bytes; /* internal statistic */
Expand All @@ -205,6 +200,7 @@ struct fnic {
struct work_struct link_work;
struct work_struct frame_work;
struct sk_buff_head frame_queue;
struct sk_buff_head tx_queue;

/* copy work queue cache line section */
____cacheline_aligned struct vnic_wq_copy wq_copy[FNIC_WQ_COPY_MAX];
Expand All @@ -224,6 +220,11 @@ struct fnic {
____cacheline_aligned struct vnic_intr intr[FNIC_MSIX_INTR_MAX];
};

static inline struct fnic *fnic_from_ctlr(struct fcoe_ctlr *fip)
{
return container_of(fip, struct fnic, ctlr);
}

extern struct workqueue_struct *fnic_event_queue;
extern struct device_attribute *fnic_attrs[];

Expand All @@ -239,7 +240,11 @@ void fnic_handle_link(struct work_struct *work);
int fnic_rq_cmpl_handler(struct fnic *fnic, int);
int fnic_alloc_rq_frame(struct vnic_rq *rq);
void fnic_free_rq_buf(struct vnic_rq *rq, struct vnic_rq_buf *buf);
int fnic_send_frame(struct fnic *fnic, struct fc_frame *fp);
void fnic_flush_tx(struct fnic *);
void fnic_eth_send(struct fcoe_ctlr *, struct sk_buff *skb);
void fnic_set_port_id(struct fc_lport *, u32, struct fc_frame *);
void fnic_update_mac(struct fc_lport *, u8 *new);
void fnic_update_mac_locked(struct fnic *, u8 *new);

int fnic_queuecommand(struct scsi_cmnd *, void (*done)(struct scsi_cmnd *));
int fnic_abort_cmd(struct scsi_cmnd *);
Expand All @@ -252,7 +257,7 @@ void fnic_empty_scsi_cleanup(struct fc_lport *);
void fnic_exch_mgr_reset(struct fc_lport *, u32, u32);
int fnic_wq_copy_cmpl_handler(struct fnic *fnic, int);
int fnic_wq_cmpl_handler(struct fnic *fnic, int);
int fnic_flogi_reg_handler(struct fnic *fnic);
int fnic_flogi_reg_handler(struct fnic *fnic, u32);
void fnic_wq_copy_cleanup_handler(struct vnic_wq_copy *wq,
struct fcpio_host_req *desc);
int fnic_fw_reset_handler(struct fnic *fnic);
Expand Down
Loading

0 comments on commit 56fd237

Please sign in to comment.