From patchwork Thu Oct 8 19:54:38 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ron Mercer X-Patchwork-Id: 35522 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org 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 6990DB7334 for ; Fri, 9 Oct 2009 07:05:14 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933128AbZJHUBu (ORCPT ); Thu, 8 Oct 2009 16:01:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933123AbZJHUBs (ORCPT ); Thu, 8 Oct 2009 16:01:48 -0400 Received: from avexch1.qlogic.com ([198.70.193.115]:40572 "EHLO avexch1.qlogic.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933125AbZJHUBq (ORCPT ); Thu, 8 Oct 2009 16:01:46 -0400 Received: from linux-ox1b.qlogic.com ([172.17.161.157]) by avexch1.qlogic.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 8 Oct 2009 12:59:51 -0700 Received: by linux-ox1b.qlogic.com (Postfix, from userid 1000) id 4DE9F2C6AC; Thu, 8 Oct 2009 12:54:43 -0700 (PDT) From: Ron Mercer To: davem@davemloft.net Cc: netdev@vger.kernel.org, ron.mercer@qlogic.com Subject: [net-2.6 PATCH 2/7] qlge: Fix frame routing issue related to bonding. Date: Thu, 8 Oct 2009 12:54:38 -0700 Message-Id: <1255031683-3912-3-git-send-email-ron.mercer@qlogic.com> X-Mailer: git-send-email 1.6.0.2 In-Reply-To: <1255031683-3912-1-git-send-email-ron.mercer@qlogic.com> References: <1255031683-3912-1-git-send-email-ron.mercer@qlogic.com> X-OriginalArrivalTime: 08 Oct 2009 19:59:51.0818 (UTC) FILETIME=[E5C8E6A0:01CA4851] Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Currently frames are routed based on their type and MAC address. This patch adds the port number on which the frame arrived to the routing. This prevents problems in the case where both interfaces have the same MAC address in a routing configuration. Signed-off-by: Ron Mercer --- drivers/net/qlge/qlge_main.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index 04fc711..d66ad8d 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c @@ -3241,6 +3241,13 @@ static int ql_adapter_initialize(struct ql_adapter *qdev) ql_write32(qdev, SPLT_HDR, SPLT_HDR_EP | min(SMALL_BUFFER_SIZE, MAX_SPLIT_SIZE)); + /* Set RX packet routing to use port/pci function on which the + * packet arrived on in addition to usual frame routing. + * This is helpful on bonding where both interfaces can have + * the same MAC address. + */ + ql_write32(qdev, RST_FO, RST_FO_RR_MASK | RST_FO_RR_RCV_FUNC_CQ); + /* Start up the rx queues. */ for (i = 0; i < qdev->rx_ring_count; i++) { status = ql_start_rx_ring(qdev, &qdev->rx_ring[i]);