U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Anatolij Gustschin <agust@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3] ahci: support LBA48 data reads for 2+TB drives
Date: Fri, 8 Nov 2013 21:11:49 +0100	[thread overview]
Message-ID: <20131108211149.6f7f62c4@crub> (raw)
In-Reply-To: <1378844357-15389-4-git-send-email-mark.langsdorf@calxeda.com>

On Tue, 10 Sep 2013 15:19:17 -0500
Mark Langsdorf <mark.langsdorf@calxeda.com> wrote:
...
> diff --git a/drivers/block/ahci.c b/drivers/block/ahci.c
> index 8cc9379..c5c942f 100644
> --- a/drivers/block/ahci.c
> +++ b/drivers/block/ahci.c

...
> @@ -689,10 +696,13 @@ static int ata_scsiop_read_write(ccb *pccb, u8 is_write)
>  	 *
>  	 * WARNING: one or two older ATA drives treat 0 as 0...
>  	 */
> -	blocks = (((u16)pccb->cmd[7]) << 8) | ((u16) pccb->cmd[8]);
> +	if (pccb->cmd[0] == SCSI_READ16)
> +		blocks = (((u16)pccb->cmd[13]) << 8) | ((u16) pccb->cmd[14]);
> +	else
> +		blocks = (((u16)pccb->cmd[7]) << 8) | ((u16) pccb->cmd[8]);
>  
> -	debug("scsi_ahci: %s %d blocks starting from lba 0x%x\n",
> -	      is_write ?  "write" : "read", (unsigned)lba, blocks);
> +	debug("scsi_ahci: %s %u blocks starting from lba 0x" LBAFU "\n",
> +	      is_write ?  "write" : "read", blocks, lba);

LBAFU is defined as "%llu" or "%lu", so " 0x" in the debug string
will suggest that the lba value is in hexadecimal notation, but
the format specifier outputs as decimal. Please remove "0x" when
applying this patch. Thanks!

Anatolij

  reply	other threads:[~2013-11-08 20:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-10 20:19 [U-Boot] ahci: add support for LBA48 data reads Mark Langsdorf
2013-09-10 20:19 ` [U-Boot] [PATCH 1/3] cmd_scsi: fix formatting before making additional changes Mark Langsdorf
2013-09-10 20:19 ` [U-Boot] [PATCH 2/3] cmd_scsi: use lbaint_t for LBA values instead of u32 Mark Langsdorf
2013-09-10 20:19 ` [U-Boot] [PATCH 3/3] ahci: support LBA48 data reads for 2+TB drives Mark Langsdorf
2013-11-08 20:11   ` Anatolij Gustschin [this message]
2013-11-08 20:12   ` [U-Boot] [U-Boot, " 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=20131108211149.6f7f62c4@crub \
    --to=agust@denx.de \
    --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