From patchwork Tue Dec 22 02:21:42 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Feldman X-Patchwork-Id: 41580 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.180.67]) by ozlabs.org (Postfix) with ESMTP id 777CDB6F1C for ; Tue, 22 Dec 2009 13:21:48 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752748AbZLVCVo (ORCPT ); Mon, 21 Dec 2009 21:21:44 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752734AbZLVCVn (ORCPT ); Mon, 21 Dec 2009 21:21:43 -0500 Received: from sj-iport-5.cisco.com ([171.68.10.87]:14649 "EHLO sj-iport-5.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752747AbZLVCVm (ORCPT ); Mon, 21 Dec 2009 21:21:42 -0500 Authentication-Results: sj-iport-5.cisco.com; dkim=neutral (message not signed) header.i=none X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEANu7L0urRN+K/2dsb2JhbACECrwShwCPQ4Evgi1SBA X-IronPort-AV: E=Sophos;i="4.47,434,1257120000"; d="scan'208";a="123493414" Received: from sj-core-4.cisco.com ([171.68.223.138]) by sj-iport-5.cisco.com with ESMTP; 22 Dec 2009 02:21:42 +0000 Received: from savbu-pc100.cisco.com (savbu-pc100.cisco.com [10.193.164.29]) by sj-core-4.cisco.com (8.13.8/8.14.3) with ESMTP id nBM2LgNY001723; Tue, 22 Dec 2009 02:21:42 GMT From: Scott Feldman Subject: [net-next PATCH 4/6] enic: Bug fix: align desc ring sizes to 32 descs To: davem@davemloft.net Cc: netdev@vger.kernel.org Date: Mon, 21 Dec 2009 18:21:42 -0800 Message-ID: <20091222022142.30220.61039.stgit@savbu-pc100.cisco.com> In-Reply-To: <20091222021857.30220.51795.stgit@savbu-pc100.cisco.com> References: <20091222021857.30220.51795.stgit@savbu-pc100.cisco.com> User-Agent: StGIT/0.12.1 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Scott Feldman Previous driver was aligning ring sizes to 16 descs, but hardware actually wants desc ring sizes to be aligned to 32 descs. Signed-off-by: Vasanthy Kolluri Signed-off-by: Scott Feldman --- drivers/net/enic/enic_res.c | 4 ++-- 1 files changed, 2 insertions(+), 2 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/enic/enic_res.c b/drivers/net/enic/enic_res.c index 3211114..a605da1 100644 --- a/drivers/net/enic/enic_res.c +++ b/drivers/net/enic/enic_res.c @@ -74,13 +74,13 @@ int enic_get_vnic_config(struct enic *enic) min_t(u32, ENIC_MAX_WQ_DESCS, max_t(u32, ENIC_MIN_WQ_DESCS, c->wq_desc_count)); - c->wq_desc_count &= 0xfffffff0; /* must be aligned to groups of 16 */ + c->wq_desc_count &= 0xffffffe0; /* must be aligned to groups of 32 */ c->rq_desc_count = min_t(u32, ENIC_MAX_RQ_DESCS, max_t(u32, ENIC_MIN_RQ_DESCS, c->rq_desc_count)); - c->rq_desc_count &= 0xfffffff0; /* must be aligned to groups of 16 */ + c->rq_desc_count &= 0xffffffe0; /* must be aligned to groups of 32 */ if (c->mtu == 0) c->mtu = 1500;