Re: [PATCH 2.6.30-rc] cxgb3i -- fixed connection error when vlan is enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/26/2009 05:17 PM, kxie@xxxxxxxxxxx wrote:
[PATCH 2.6.30-rc] cxgb3i -- fixed connection error when vlan is enabled

From: Karen Xie<kxie@xxxxxxxxxxx>

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 added code to get the real egress net_device when vlan is configured.

Signed-off-by: Karen Xie<kxie@xxxxxxxxxxx>
---

  drivers/scsi/cxgb3i/cxgb3i_iscsi.c |    4 ++++
  1 files changed, 4 insertions(+), 0 deletions(-)


diff --git a/drivers/scsi/cxgb3i/cxgb3i_iscsi.c b/drivers/scsi/cxgb3i/cxgb3i_iscsi.c
index 04a4374..60013a4 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/tcp.h>
  #include<scsi/scsi_cmnd.h>
  #include<scsi/scsi_device.h>
@@ -183,6 +184,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++) {


It looks ok, but when touching network stuff you might want to cc the netdev list in the future. Well, maybe for non-trivial stuff at least. This might be fine.

Reviewed-by: Mike Christie <michaelc@xxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux