summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/cxgb3i
diff options
context:
space:
mode:
authorKaren Xie <kxie@chelsio.com>2009-06-27 00:17:29 +0200
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-06-27 19:56:00 +0200
commita222ad1a4b2e3ca177a538482c99c519c1ce94d1 (patch)
tree48b7a15519c8a09b71bcf149c7f93d94b668393c /drivers/scsi/cxgb3i
parent[SCSI] FC transport: Locking fix for common-code FC pass-through patch (diff)
downloadlinux-a222ad1a4b2e3ca177a538482c99c519c1ce94d1.tar.xz
linux-a222ad1a4b2e3ca177a538482c99c519c1ce94d1.zip
[SCSI] cxgb3i: fix connection error when vlan is enabled
There is a bug when VLAN is configured on the cxgb3 interface, the iscsi conn. would be denied with message "cxgb3i: NOT going through cxgbi device." This patch adds code to get the real egress net_device when vlan is configured. Signed-off-by: Karen Xie <kxie@chelsio.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/cxgb3i')
-rw-r--r--drivers/scsi/cxgb3i/cxgb3i_iscsi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/cxgb3i/cxgb3i_iscsi.c b/drivers/scsi/cxgb3i/cxgb3i_iscsi.c
index 74369a3f963b..c399f485aa7d 100644
--- a/drivers/scsi/cxgb3i/cxgb3i_iscsi.c
+++ b/drivers/scsi/cxgb3i/cxgb3i_iscsi.c
@@ -13,6 +13,7 @@
#include <linux/inet.h>
#include <linux/crypto.h>
+#include <linux/if_vlan.h>
#include <net/dst.h>
#include <net/tcp.h>
#include <scsi/scsi_cmnd.h>
@@ -184,6 +185,9 @@ static struct cxgb3i_hba *cxgb3i_hba_find_by_netdev(struct net_device *ndev)
struct cxgb3i_adapter *snic;
int i;
+ if (ndev->priv_flags & IFF_802_1Q_VLAN)
+ ndev = vlan_dev_real_dev(ndev);
+
read_lock(&cxgb3i_snic_rwlock);
list_for_each_entry(snic, &cxgb3i_snic_list, list_head) {
for (i = 0; i < snic->hba_cnt; i++) {