From 415199f2bd977fa4065d4e836b4b7543f7993bc3 Mon Sep 17 00:00:00 2001 From: Michael Chan Date: Wed, 20 Jul 2011 14:55:24 +0000 Subject: cnic: Add VLAN ID as a parameter during netevent upcall The bnx2fc driver needs to handle netdev events on VLAN devices. Signed-off-by: Michael Chan Reviewed-by: Bhanu Prakash Gollapudi Signed-off-by: David S. Miller --- drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 8 +++++++- drivers/scsi/bnx2i/bnx2i_hwi.c | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c index 7a16ca1c3ecf..9eebaebdaa78 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c @@ -767,17 +767,23 @@ static void bnx2fc_destroy_timer(unsigned long data) * * @context: adapter structure pointer * @event: event type + * @vlan_id: vlan id - associated vlan id with this event * * Handles NETDEV_UP, NETDEV_DOWN, NETDEV_GOING_DOWN,NETDEV_CHANGE and * NETDEV_CHANGE_MTU events */ -static void bnx2fc_indicate_netevent(void *context, unsigned long event) +static void bnx2fc_indicate_netevent(void *context, unsigned long event, + u16 vlan_id) { struct bnx2fc_hba *hba = (struct bnx2fc_hba *)context; struct fc_lport *lport = hba->ctlr.lp; struct fc_lport *vport; u32 link_possible = 1; + /* Ignore vlans for now */ + if (vlan_id != 0) + return; + if (!test_bit(BNX2FC_CREATE_DONE, &hba->init_done)) { BNX2FC_MISC_DBG("driver not ready. event=%s %ld\n", hba->netdev->name, event); diff --git a/drivers/scsi/bnx2i/bnx2i_hwi.c b/drivers/scsi/bnx2i/bnx2i_hwi.c index 5c54a2d9b834..372d30c099cc 100644 --- a/drivers/scsi/bnx2i/bnx2i_hwi.c +++ b/drivers/scsi/bnx2i/bnx2i_hwi.c @@ -2386,14 +2386,20 @@ static void bnx2i_indicate_kcqe(void *context, struct kcqe *kcqe[], * bnx2i_indicate_netevent - Generic netdev event handler * @context: adapter structure pointer * @event: event type + * @vlan_id: vlans id - associated vlan id with this event * * Handles four netdev events, NETDEV_UP, NETDEV_DOWN, * NETDEV_GOING_DOWN and NETDEV_CHANGE */ -static void bnx2i_indicate_netevent(void *context, unsigned long event) +static void bnx2i_indicate_netevent(void *context, unsigned long event, + u16 vlan_id) { struct bnx2i_hba *hba = context; + /* Ignore all netevent coming from vlans */ + if (vlan_id != 0) + return; + switch (event) { case NETDEV_UP: if (!test_bit(ADAPTER_STATE_UP, &hba->adapter_state)) -- cgit v1.2.3-59-g8ed1b