Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1010038yba; Fri, 26 Apr 2019 12:27:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqxg9Kv9MJARL2qWQ9Lxsv9ljWalEPdsFJuR4mNizLBYjZC8P2s08W28QDDZMULLu29zEiew X-Received: by 2002:a63:5057:: with SMTP id q23mr45648403pgl.30.1556306851628; Fri, 26 Apr 2019 12:27:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556306851; cv=none; d=google.com; s=arc-20160816; b=zjAHvm9QptdqXqegCxaxCU9qlEkZ/yNWi2aCdPPqunwHKACo5ib+SMyO5TrEWKWy6P 13K4H0W5rrc5v9kQxC7LMmv+OlYoi0nWTq0Giss1Hd+WpI+w8zTlyUKW18YAPHanSpiy GqHN0/scpa2408t7soAfjPPOiY/NC9T9xeRPsAAfOU2etxmrrIOlkByHKTF/fB9AfXLc A4wnl+dO+nzFWe7iovM4MgV7CZh+mQHggH+px2unQ3br4g60qJokO8LW+6P7IUk7vjpJ VrTcNAikkZZoN9HreJp64dOewAAg6whsRQfug9GmPriEx/Evox9/dsBtEFZcbBQ66kII XPXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=an5rEpkFGQ3NHmznnBNRuXXxR3Z5SHbs8DWRZW5+fO8=; b=VM/42cijd4wldGcyBGezWOiJhiE5vlUNWeTaVHfWnQbS8MV4DOzNVS7+o9yIYn8V8/ yu7HOjBTcXIB1JzslUEI+jfc8iEh7HvGPvrgwjiH9UxcHIqOMu5Z1etF4vT6jNh5rEvv t9diHLJLmqWaGeiW/7r4f3V7mgnFWIXg9kJIW0q47YF5+nd8pMTB42Snj9Jk6LXmqjO/ JKFGY2GofsOU8q0efZiKLngJqKfm1xjWs9vMeFLOI2TDkZhm3cY5/W3z/8MqkkiQ4FAp D/Uo8eoaceN0JF2dbSDJIZHYI9SE1ipqRP0lgTwUl9s/IWlntsI4bx2URzk601PijlmX gnKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ig45WgKK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f1si811421pgi.549.2019.04.26.12.27.16; Fri, 26 Apr 2019 12:27:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ig45WgKK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726455AbfDZTZO (ORCPT + 99 others); Fri, 26 Apr 2019 15:25:14 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:42291 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726310AbfDZTZN (ORCPT ); Fri, 26 Apr 2019 15:25:13 -0400 Received: by mail-pf1-f193.google.com with SMTP id w25so2172889pfi.9 for ; Fri, 26 Apr 2019 12:25:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=an5rEpkFGQ3NHmznnBNRuXXxR3Z5SHbs8DWRZW5+fO8=; b=ig45WgKKQqZebDRRWwG1Lj4m5QQ9D9aAPNnhnX1eTLJiAqznX3JOJ2g5ahFB5uVQY5 oyIERfk0X612tHthQqJypWNwnj9TehLdg1ikZ3jVD5cD+1COpgGuKm1HH6/7u5AGWf4M rX2BEXJnxNnSXjvlZ1XIUlHWb6nLcOIzj+qG8Mh9UmsxqIZspbBW7m4l6c7vcwJlZ5yL Bp98T7qET+H0q5pFEbVkUTJTxDBvu5e6CWEt5B1dmEwWQELjrLyZlwtsINfBnKF/hDZP nMJ7mYiVS1SKi5+SpVOfqLBaU6jo3WpxLSZGl0ZN5PNYGJ478PSfvCsjuYyGSSN2nT9m e6Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=an5rEpkFGQ3NHmznnBNRuXXxR3Z5SHbs8DWRZW5+fO8=; b=q/c4Z0PlPMxkbagNynx7eQqM3C8V4RizUOK8Co1mI+0064sKEc7Stcs0v/xSLyM2Wr vNEzYyDZuMrixUyKKZAlJMvurSe0eYV6JmeS+sWpK6EQkTPZx3MVUXlN5pBiUjuxRU6N emaJ1bs+bg/7siPstpdFGphca7uqhyeh3+37PNUo5TKGGcey0pHBTrNu/OYMMJcWhuW3 Nhpb5iyWULn4zHt7AQZ6FcNy3iyvQo56VMVmu+Sy2wgbLe2rWNqrKrlKZ5eTm3Lh/RNR Nsevu6QO9dQMBgp0DSw9UD/zVj/U21QVKk+IaM8lHfZFwlUIbLGMkXriWchFbN7F8/r8 CCwA== X-Gm-Message-State: APjAAAULZn9yTNUd9CZBjLRxgMwmy/f1lENKPc70arHdTZUwHKvcp8Mt MVa5C7aCk8eo/UObVqS3gJo= X-Received: by 2002:a63:1852:: with SMTP id 18mr9164960pgy.283.1556306713105; Fri, 26 Apr 2019 12:25:13 -0700 (PDT) Received: from mail.broadcom.com ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id w38sm1129639pgk.90.2019.04.26.12.25.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Apr 2019 12:25:12 -0700 (PDT) From: Kamal Dasu To: linux-mtd@lists.infradead.org Cc: bcm-kernel-feedback-list@broadcom.com, linux-kernel@vger.kernel.org, Kamal Dasu , Brian Norris , Boris Brezillon , Miquel Raynal , Richard Weinberger , David Woodhouse , Marek Vasut Subject: [PATCH] mtd: rawnand: brcmnand: fix bch ecc layout for large page nand Date: Fri, 26 Apr 2019 15:22:26 -0400 Message-Id: <1556306615-37990-1-git-send-email-kdasu.kdev@gmail.com> X-Mailer: git-send-email 1.9.0.138.g2de3478 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The oobregion->offset for large page nand parts was wrong, change fixes this error in calculation. Signed-off-by: Kamal Dasu --- drivers/mtd/nand/raw/brcmnand/brcmnand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c index 482c6f0..3eefea7 100644 --- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c @@ -939,7 +939,7 @@ static int brcmnand_bch_ooblayout_ecc(struct mtd_info *mtd, int section, if (section >= sectors) return -ERANGE; - oobregion->offset = (section * (sas + 1)) - chip->ecc.bytes; + oobregion->offset = ((section + 1) * sas) - chip->ecc.bytes; oobregion->length = chip->ecc.bytes; return 0; -- 1.9.0.138.g2de3478