From patchwork Fri Jan 11 15:17:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1023639 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=konsulko.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 43bmh55LNpz9s7h for ; Sat, 12 Jan 2019 02:17:38 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 84471C221F1; Fri, 11 Jan 2019 15:17:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 1746BC221A4; Fri, 11 Jan 2019 15:17:31 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 3909DC221A4; Fri, 11 Jan 2019 15:17:30 +0000 (UTC) Received: from mail-qt1-f196.google.com (mail-qt1-f196.google.com [209.85.160.196]) by lists.denx.de (Postfix) with ESMTPS id A3CC2C22182 for ; Fri, 11 Jan 2019 15:17:29 +0000 (UTC) Received: by mail-qt1-f196.google.com with SMTP id u47so19159948qtj.6 for ; Fri, 11 Jan 2019 07:17:29 -0800 (PST) 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=U3ncEe2AwbqN4r4LhM6rUKRLuJ1OQW57iOMDJyh0nFo=; b=ZoKYdOptK6iTRBqeuKkNyHvrmmTohTkPrtSU1u1FDrBnwGvRgVomWTFS0NETMgKNGY nI0yfnyBG2nG8nO229E7bYXuiNpZKYxYKmhsB9MwEwxu9IhUFhz1gAssaq6jUMRSEMkg Fza1jLhJu63AI890vE4lUijbId+ZqxyIyZYBCD1i7V08egoiUvyjmPga87RzTuAr330m 2TkaOpLUxNbbeW7FzR//I+i2Gm0wyKYmawq/WBVPvRqcJ6fL2+ZBfpDXf2C5JzuHqsWs r5R0RL0n+FNDUSHuKl98shDfUFtrGidR6Vt50KSfXa1bwnjLnOvXjIACqeaIHi+AJzkB gtCg== X-Gm-Message-State: AJcUukesXD9QKmv5tyz23OxvSPHCwPfXM2EOaJNJmVXQOQWe0z5dZI/E 5p1rJKfqtkFnPJG/nnaohHn0vZc= X-Google-Smtp-Source: ALg8bN5ZChM16WcsiDqsQL1IVH8/nyYucf83FDiC6Mnc+hT3fCzjEElt8Q4owd1UbwbIJw1HwpUAdg== X-Received: by 2002:a0c:895c:: with SMTP id 28mr14316157qvq.121.1547219848071; Fri, 11 Jan 2019 07:17:28 -0800 (PST) Received: from bill-the-cat.ec.rr.com (cpe-2606-A000-1401-82A1-61C2-E469-4F6A-A826.dyn6.twc.com. [2606:a000:1401:82a1:61c2:e469:4f6a:a826]) by smtp.gmail.com with ESMTPSA id o75sm19010149qki.97.2019.01.11.07.17.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 11 Jan 2019 07:17:26 -0800 (PST) From: Tom Rini To: u-boot@lists.denx.de Date: Fri, 11 Jan 2019 10:17:21 -0500 Message-Id: <1547219841-13680-1-git-send-email-trini@konsulko.com> X-Mailer: git-send-email 2.7.4 Cc: Thomas RIENOESSL Subject: [U-Boot] [PATCH] Revert "fs: fat: assign rootdir sector when accessing root directory" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This particular commit is causing a regression on stih410-b2260 and other platforms when reading from FAT16. Noting that I had rebased the original fix from Thomas onto then-current master, there is also question from Akashi-san if the change is still needed after other FAT fixes that have gone in. This reverts commit a68b0e11ea774492713a65d9fd5bb525fcaefff3. Reported-by: Patrice Chotard Cc: AKASHI Takahiro Cc: Thomas RIENOESSL Signed-off-by: Tom Rini --- fs/fat/fat.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/fat/fat.c b/fs/fat/fat.c index ac8913e71929..179bf4f3d89d 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -736,10 +736,7 @@ static void *next_cluster(fat_itr *itr) if (itr->last_cluster) return NULL; - if (itr->fsdata->fatsize != 32 && itr->is_root) - sect = mydata->rootdir_sect; - else - sect = clust_to_sect(itr->fsdata, itr->next_clust); + sect = clust_to_sect(itr->fsdata, itr->next_clust); debug("FAT read(sect=%d), clust_size=%d, DIRENTSPERBLOCK=%zd\n", sect, itr->fsdata->clust_size, DIRENTSPERBLOCK);