summaryrefslogtreecommitdiff
path: root/drivers/scsi/bnx2fc/bnx2fc_els.c
diff options
context:
space:
mode:
authorBhanu Prakash Gollapudi <bprakash@broadcom.com>2011-07-26 14:51:39 -0700
committerJames Bottomley <JBottomley@Parallels.com>2011-07-27 15:37:31 +0400
commitaea71a024914e8b5b8bed31256dae42195a0a207 (patch)
treed3d155d7323966a56425ad68837b924816719c89 /drivers/scsi/bnx2fc/bnx2fc_els.c
parentf6e76055ba778c56716ba79e106db28297775e87 (diff)
[SCSI] bnx2fc: Introduce interface structure for each vlan interface
Currently, bnx2fc has a hba structure that can work with only a single vlan interface. When there is a change in vlan id, it does not have the capability to switch to different vlan interface. To solve this problem, a new structure called 'interface' has been introduced, and each hba can now have multiple interfaces, one per vlan id. Most of the patch is a moving the interface specific fields from hba to the interface structure, and appropriately modifying the dereferences. A list of interfaces (if_list) is maintained along with adapter list. During a create call, the interface structure is allocated and added to if_list and deleted & freed on a destroy call. Link events are propagated to all interfaces belonging to the hba. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/bnx2fc/bnx2fc_els.c')
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_els.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_els.c b/drivers/scsi/bnx2fc/bnx2fc_els.c
index e3f18736ba37..5d7baa2371f8 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_els.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_els.c
@@ -259,7 +259,7 @@ static int bnx2fc_initiate_els(struct bnx2fc_rport *tgt, unsigned int op,
struct bnx2fc_els_cb_arg *cb_arg, u32 timer_msec)
{
struct fcoe_port *port = tgt->port;
- struct bnx2fc_hba *hba = port->priv;
+ struct bnx2fc_interface *interface = port->priv;
struct fc_rport *rport = tgt->rport;
struct fc_lport *lport = port->lport;
struct bnx2fc_cmd *els_req;
@@ -352,7 +352,8 @@ static int bnx2fc_initiate_els(struct bnx2fc_rport *tgt, unsigned int op,
index = xid % BNX2FC_TASKS_PER_PAGE;
/* Initialize task context for this IO request */
- task_page = (struct fcoe_task_ctx_entry *) hba->task_ctx[task_idx];
+ task_page = (struct fcoe_task_ctx_entry *)
+ interface->hba->task_ctx[task_idx];
task = &(task_page[index]);
bnx2fc_init_mp_task(els_req, task);
@@ -496,8 +497,8 @@ struct fc_seq *bnx2fc_elsct_send(struct fc_lport *lport, u32 did,
void *arg, u32 timeout)
{
struct fcoe_port *port = lport_priv(lport);
- struct bnx2fc_hba *hba = port->priv;
- struct fcoe_ctlr *fip = &hba->ctlr;
+ struct bnx2fc_interface *interface = port->priv;
+ struct fcoe_ctlr *fip = &interface->ctlr;
struct fc_frame_header *fh = fc_frame_header_get(fp);
switch (op) {