aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2011-07-20 10:55:24 -0400
committerDavid S. Miller <davem@davemloft.net>2011-07-21 15:38:32 -0400
commit415199f2bd977fa4065d4e836b4b7543f7993bc3 (patch)
tree2dfb4dfcc7097fcdd02d7923e6fdecebc4af0985 /drivers/scsi
parent74e49bbdabbac34c77b280152b1de9bef9bf9be7 (diff)
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 <mchan@broadcom.com> Reviewed-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_fcoe.c8
-rw-r--r--drivers/scsi/bnx2i/bnx2i_hwi.c8
2 files changed, 14 insertions, 2 deletions
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)
767 * 767 *
768 * @context: adapter structure pointer 768 * @context: adapter structure pointer
769 * @event: event type 769 * @event: event type
770 * @vlan_id: vlan id - associated vlan id with this event
770 * 771 *
771 * Handles NETDEV_UP, NETDEV_DOWN, NETDEV_GOING_DOWN,NETDEV_CHANGE and 772 * Handles NETDEV_UP, NETDEV_DOWN, NETDEV_GOING_DOWN,NETDEV_CHANGE and
772 * NETDEV_CHANGE_MTU events 773 * NETDEV_CHANGE_MTU events
773 */ 774 */
774static void bnx2fc_indicate_netevent(void *context, unsigned long event) 775static void bnx2fc_indicate_netevent(void *context, unsigned long event,
776 u16 vlan_id)
775{ 777{
776 struct bnx2fc_hba *hba = (struct bnx2fc_hba *)context; 778 struct bnx2fc_hba *hba = (struct bnx2fc_hba *)context;
777 struct fc_lport *lport = hba->ctlr.lp; 779 struct fc_lport *lport = hba->ctlr.lp;
778 struct fc_lport *vport; 780 struct fc_lport *vport;
779 u32 link_possible = 1; 781 u32 link_possible = 1;
780 782
783 /* Ignore vlans for now */
784 if (vlan_id != 0)
785 return;
786
781 if (!test_bit(BNX2FC_CREATE_DONE, &hba->init_done)) { 787 if (!test_bit(BNX2FC_CREATE_DONE, &hba->init_done)) {
782 BNX2FC_MISC_DBG("driver not ready. event=%s %ld\n", 788 BNX2FC_MISC_DBG("driver not ready. event=%s %ld\n",
783 hba->netdev->name, event); 789 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[],
2386 * bnx2i_indicate_netevent - Generic netdev event handler 2386 * bnx2i_indicate_netevent - Generic netdev event handler
2387 * @context: adapter structure pointer 2387 * @context: adapter structure pointer
2388 * @event: event type 2388 * @event: event type
2389 * @vlan_id: vlans id - associated vlan id with this event
2389 * 2390 *
2390 * Handles four netdev events, NETDEV_UP, NETDEV_DOWN, 2391 * Handles four netdev events, NETDEV_UP, NETDEV_DOWN,
2391 * NETDEV_GOING_DOWN and NETDEV_CHANGE 2392 * NETDEV_GOING_DOWN and NETDEV_CHANGE
2392 */ 2393 */
2393static void bnx2i_indicate_netevent(void *context, unsigned long event) 2394static void bnx2i_indicate_netevent(void *context, unsigned long event,
2395 u16 vlan_id)
2394{ 2396{
2395 struct bnx2i_hba *hba = context; 2397 struct bnx2i_hba *hba = context;
2396 2398
2399 /* Ignore all netevent coming from vlans */
2400 if (vlan_id != 0)
2401 return;
2402
2397 switch (event) { 2403 switch (event) {
2398 case NETDEV_UP: 2404 case NETDEV_UP:
2399 if (!test_bit(ADAPTER_STATE_UP, &hba->adapter_state)) 2405 if (!test_bit(ADAPTER_STATE_UP, &hba->adapter_state))