Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: Mike Christie <michaelc@cs.wisc.edu>
To: open-iscsi@googlegroups.com
Cc: linux-scsi@vger.kernel.org, kxie@chelsio.com,
	James.Bottomley@HansenPartnership.com
Subject: Re: [PATCH 2.6.30-rc] cxgb3i -- fixed connection error when vlan is enabled
Date: Sat, 27 Jun 2009 12:52:07 -0500	[thread overview]
Message-ID: <4A465C47.8050100@cs.wisc.edu> (raw)
In-Reply-To: <200906262217.n5QMHTXg006358@localhost.localdomain>

On 06/26/2009 05:17 PM, kxie@chelsio.com wrote:
> [PATCH 2.6.30-rc] cxgb3i -- fixed connection error when vlan is enabled
>
> From: Karen Xie<kxie@chelsio.com>
>
> 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@chelsio.com>
> ---
>
>   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@cs.wisc.edu>

  reply	other threads:[~2009-06-27 17:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-26 22:17 [PATCH 2.6.30-rc] cxgb3i -- fixed connection error when vlan is enabled kxie
2009-06-27 17:52 ` Mike Christie [this message]
2009-06-27 17:55   ` James Bottomley
2009-06-27 18:13     ` Karen Xie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A465C47.8050100@cs.wisc.edu \
    --to=michaelc@cs.wisc.edu \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=kxie@chelsio.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=open-iscsi@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox