From patchwork Wed Jul 22 23:29:32 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kirsher, Jeffrey T" X-Patchwork-Id: 30098 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id A2C5DB7093 for ; Thu, 23 Jul 2009 09:30:08 +1000 (EST) Received: by ozlabs.org (Postfix) id 9679BDDD0B; Thu, 23 Jul 2009 09:30:08 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 2783CDDD04 for ; Thu, 23 Jul 2009 09:30:08 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754574AbZGVX34 (ORCPT ); Wed, 22 Jul 2009 19:29:56 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754444AbZGVX34 (ORCPT ); Wed, 22 Jul 2009 19:29:56 -0400 Received: from qmta04.emeryville.ca.mail.comcast.net ([76.96.30.40]:37021 "EHLO QMTA04.emeryville.ca.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754085AbZGVX3z (ORCPT ); Wed, 22 Jul 2009 19:29:55 -0400 Received: from OMTA01.emeryville.ca.mail.comcast.net ([76.96.30.11]) by QMTA04.emeryville.ca.mail.comcast.net with comcast id KA6P1c00T0EPchoA4BVwiV; Wed, 22 Jul 2009 23:29:56 +0000 Received: from localhost.localdomain ([63.64.152.142]) by OMTA01.emeryville.ca.mail.comcast.net with comcast id KBVZ1c00634bfcX8MBVcib; Wed, 22 Jul 2009 23:29:54 +0000 From: Jeff Kirsher Subject: [net-next-2.6 PATCH 4/5] ixgbe: Add support for NETIF_F_FCOE_MTU to 82599 devices To: davem@davemloft.net Cc: netdev@vger.kernel.org, linux-scsi@vger.kernel.org, devel@open-fcoe.org, gospo@redhat.com, Yi Zou , Peter P Waskiewicz Jr , Jeff Kirsher Date: Wed, 22 Jul 2009 16:29:32 -0700 Message-ID: <20090722232932.26937.44440.stgit@localhost.localdomain> In-Reply-To: <20090722232759.26937.78765.stgit@localhost.localdomain> References: <20090722232759.26937.78765.stgit@localhost.localdomain> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Yi Zou Enable netdev feature flag bit NETIF_F_FCOE_MTU for 82599 devices and enable jumbo frame correspondingly when NETIF_F_FCOE_MTU is set. Signed-off-by: Yi Zou Acked-by: Peter P Waskiewicz Jr Signed-off-by: Jeff Kirsher --- drivers/net/ixgbe/ixgbe_main.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index d89c695..2852a17 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -2043,7 +2043,7 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter) else hlreg0 |= IXGBE_HLREG0_JUMBOEN; #ifdef IXGBE_FCOE - if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED) + if (netdev->features & NETIF_F_FCOE_MTU) hlreg0 |= IXGBE_HLREG0_JUMBOEN; #endif IXGBE_WRITE_REG(hw, IXGBE_HLREG0, hlreg0); @@ -2070,7 +2070,7 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter) adapter->rx_ring[i].rx_buf_len = rx_buf_len; #ifdef IXGBE_FCOE - if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED) { + if (netdev->features & NETIF_F_FCOE_MTU) { struct ixgbe_ring_feature *f; f = &adapter->ring_feature[RING_F_FCOE]; if ((rx_buf_len < IXGBE_FCOE_JUMBO_FRAME_SIZE) && @@ -2619,7 +2619,7 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter) #ifdef IXGBE_FCOE /* adjust max frame to be able to do baby jumbo for FCoE */ - if ((adapter->flags & IXGBE_FLAG_FCOE_ENABLED) && + if ((netdev->features & NETIF_F_FCOE_MTU) && (max_frame < IXGBE_FCOE_JUMBO_FRAME_SIZE)) max_frame = IXGBE_FCOE_JUMBO_FRAME_SIZE; @@ -5588,8 +5588,10 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, if (!(device_caps & IXGBE_DEVICE_CAPS_FCOE_OFFLOADS)) { netdev->features |= NETIF_F_FCOE_CRC; netdev->features |= NETIF_F_FSO; + netdev->features |= NETIF_F_FCOE_MTU; netdev->vlan_features |= NETIF_F_FCOE_CRC; netdev->vlan_features |= NETIF_F_FSO; + netdev->vlan_features |= NETIF_F_FCOE_MTU; netdev->fcoe_ddp_xid = IXGBE_FCOE_DDP_MAX - 1; } else { adapter->flags &= ~IXGBE_FLAG_FCOE_ENABLED;