public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC] disk: part_dos: Fix part_test_dos() regression
Date: Mon,  2 Oct 2017 22:50:02 -0300	[thread overview]
Message-ID: <1506995402-415-1-git-send-email-festevam@gmail.com> (raw)

From: Fabio Estevam <fabio.estevam@nxp.com>

Since commit ff98cb90514d ("part: extract MBR signature from partitions")
SPL boot on i.MX6 starts to fail:

U-Boot SPL 2017.09-00221-g0d6ab32 (Oct 02 2017 - 15:13:19)
Trying to boot from MMC1
(hangs here)

Revert the part_test_dos() changes from this commit, so that
SPL boot can be functional again.

Tested on a imx6q-cuboxi board.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
 disk/part_dos.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/disk/part_dos.c b/disk/part_dos.c
index 1a36be0..213a8d8 100644
--- a/disk/part_dos.c
+++ b/disk/part_dos.c
@@ -89,20 +89,14 @@ static int test_block_type(unsigned char *buffer)
 
 static int part_test_dos(struct blk_desc *dev_desc)
 {
-	ALLOC_CACHE_ALIGN_BUFFER(legacy_mbr, mbr, dev_desc->blksz);
+	ALLOC_CACHE_ALIGN_BUFFER(unsigned char, mbr, dev_desc->blksz);
 
 	if (blk_dread(dev_desc, 0, 1, (ulong *)mbr) != 1)
 		return -1;
 
-	if (test_block_type((unsigned char *)mbr) != DOS_MBR)
+	if (test_block_type(mbr) != DOS_MBR)
 		return -1;
 
-	if (dev_desc->sig_type == SIG_TYPE_NONE &&
-	    mbr->unique_mbr_signature != 0) {
-		dev_desc->sig_type = SIG_TYPE_MBR;
-		dev_desc->mbr_sig = mbr->unique_mbr_signature;
-	}
-
 	return 0;
 }
 
-- 
2.7.4

             reply	other threads:[~2017-10-03  1:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-03  1:50 Fabio Estevam [this message]
2017-10-03 10:47 ` [U-Boot] [RFC] disk: part_dos: Fix part_test_dos() regression Rob Clark
2017-10-03 10:57   ` Rob Clark
2017-10-03 11:04     ` Fabio Estevam
2017-10-03 12:44       ` Rob Clark
2017-10-03 16:10         ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1506995402-415-1-git-send-email-festevam@gmail.com \
    --to=festevam@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox