diff options
author | Roopa Prabhu <roprabhu@cisco.com> | 2011-01-20 09:35:54 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-20 19:59:34 -0500 |
commit | 4dce2396b329ef6a14b40c5416d6f76005097b0d (patch) | |
tree | 0469682c0674074b1b1eb109e22c203d4039e9a6 /drivers/net/enic | |
parent | f2eda47df46f9953fc8a4fec820f34d539a8efbb (diff) |
enic: Bug Fix: Dont reset ENIC_SET_APPLIED flag on port profile disassociate
enic_get_vf_port returns port profile operation status only if ENIC_SET_APPLIED
flag is set. A recent rework of enic_set_port_profile added code to reset this
flag on disassociate. As a result of which a client calling enic_get_vf_port
to get the status of port profile disassociate will always get a return value
of ENODATA. This patch renames ENIC_SET_APPLIED to more appropriate
ENIC_PORT_REQUEST_APPLIED and reverts back the recent change so that the
flag is set both at associate and disassociate of a port profile.
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/enic')
-rw-r--r-- | drivers/net/enic/enic.h | 6 | ||||
-rw-r--r-- | drivers/net/enic/enic_main.c | 10 |
2 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h index a937f49d9db7..ca3be4f15556 100644 --- a/drivers/net/enic/enic.h +++ b/drivers/net/enic/enic.h | |||
@@ -32,8 +32,8 @@ | |||
32 | 32 | ||
33 | #define DRV_NAME "enic" | 33 | #define DRV_NAME "enic" |
34 | #define DRV_DESCRIPTION "Cisco VIC Ethernet NIC Driver" | 34 | #define DRV_DESCRIPTION "Cisco VIC Ethernet NIC Driver" |
35 | #define DRV_VERSION "1.4.1.10" | 35 | #define DRV_VERSION "2.1.1.2" |
36 | #define DRV_COPYRIGHT "Copyright 2008-2010 Cisco Systems, Inc" | 36 | #define DRV_COPYRIGHT "Copyright 2008-2011 Cisco Systems, Inc" |
37 | 37 | ||
38 | #define ENIC_BARS_MAX 6 | 38 | #define ENIC_BARS_MAX 6 |
39 | 39 | ||
@@ -49,7 +49,7 @@ struct enic_msix_entry { | |||
49 | void *devid; | 49 | void *devid; |
50 | }; | 50 | }; |
51 | 51 | ||
52 | #define ENIC_SET_APPLIED (1 << 0) | 52 | #define ENIC_PORT_REQUEST_APPLIED (1 << 0) |
53 | #define ENIC_SET_REQUEST (1 << 1) | 53 | #define ENIC_SET_REQUEST (1 << 1) |
54 | #define ENIC_SET_NAME (1 << 2) | 54 | #define ENIC_SET_NAME (1 << 2) |
55 | #define ENIC_SET_INSTANCE (1 << 3) | 55 | #define ENIC_SET_INSTANCE (1 << 3) |
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index a0af48c51fb3..89664c670972 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c | |||
@@ -1318,18 +1318,20 @@ static int enic_set_port_profile(struct enic *enic, u8 *mac) | |||
1318 | vic_provinfo_free(vp); | 1318 | vic_provinfo_free(vp); |
1319 | if (err) | 1319 | if (err) |
1320 | return err; | 1320 | return err; |
1321 | |||
1322 | enic->pp.set |= ENIC_SET_APPLIED; | ||
1323 | break; | 1321 | break; |
1324 | 1322 | ||
1325 | case PORT_REQUEST_DISASSOCIATE: | 1323 | case PORT_REQUEST_DISASSOCIATE: |
1326 | enic->pp.set &= ~ENIC_SET_APPLIED; | ||
1327 | break; | 1324 | break; |
1328 | 1325 | ||
1329 | default: | 1326 | default: |
1330 | return -EINVAL; | 1327 | return -EINVAL; |
1331 | } | 1328 | } |
1332 | 1329 | ||
1330 | /* Set flag to indicate that the port assoc/disassoc | ||
1331 | * request has been sent out to fw | ||
1332 | */ | ||
1333 | enic->pp.set |= ENIC_PORT_REQUEST_APPLIED; | ||
1334 | |||
1333 | return 0; | 1335 | return 0; |
1334 | } | 1336 | } |
1335 | 1337 | ||
@@ -1411,7 +1413,7 @@ static int enic_get_vf_port(struct net_device *netdev, int vf, | |||
1411 | int err, error, done; | 1413 | int err, error, done; |
1412 | u16 response = PORT_PROFILE_RESPONSE_SUCCESS; | 1414 | u16 response = PORT_PROFILE_RESPONSE_SUCCESS; |
1413 | 1415 | ||
1414 | if (!(enic->pp.set & ENIC_SET_APPLIED)) | 1416 | if (!(enic->pp.set & ENIC_PORT_REQUEST_APPLIED)) |
1415 | return -ENODATA; | 1417 | return -ENODATA; |
1416 | 1418 | ||
1417 | err = enic_dev_init_done(enic, &done, &error); | 1419 | err = enic_dev_init_done(enic, &done, &error); |