diff options
author | Vasanthy Kolluri <vkolluri@cisco.com> | 2010-06-24 10:49:51 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-25 20:45:22 -0700 |
commit | f8cac14acff870203ea7f61f1a92c5486d1774fa (patch) | |
tree | 4caa5145dca79a98bb5a19b9fd2658fe8fe3933c /drivers/net/enic/vnic_dev.c | |
parent | 88132f55d74fdd97a7d459007b2bbb59e850f8c0 (diff) | |
download | lwn-f8cac14acff870203ea7f61f1a92c5486d1774fa.tar.gz lwn-f8cac14acff870203ea7f61f1a92c5486d1774fa.zip |
enic: Bug Fix: Change hardware ingress vlan rewrite mode
The current ingress vlan rewrite mode setting lets the hardware strip off
the tag control information of a packet received on native vlan. As a
result, the priority bits are also lost. The fix is to change the ingress
vlan rewrite mode setting such that the complete tag control information is
retained for packets that belong to native vlan.
Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/enic/vnic_dev.c')
-rw-r--r-- | drivers/net/enic/vnic_dev.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/enic/vnic_dev.c b/drivers/net/enic/vnic_dev.c index e0d33281ec98..e3742faa06fe 100644 --- a/drivers/net/enic/vnic_dev.c +++ b/drivers/net/enic/vnic_dev.c @@ -564,6 +564,20 @@ int vnic_dev_del_addr(struct vnic_dev *vdev, u8 *addr) return err; } +int vnic_dev_set_ig_vlan_rewrite_mode(struct vnic_dev *vdev, + u8 ig_vlan_rewrite_mode) +{ + u64 a0 = ig_vlan_rewrite_mode, a1 = 0; + int wait = 1000; + int err; + + err = vnic_dev_cmd(vdev, CMD_IG_VLAN_REWRITE_MODE, &a0, &a1, wait); + if (err == ERR_ECMDUNKNOWN) + return 0; + + return err; +} + int vnic_dev_raise_intr(struct vnic_dev *vdev, u16 intr) { u64 a0 = intr, a1 = 0; |