From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot, 3/3] ahci: support LBA48 data reads for 2+TB drives
Date: Fri, 8 Nov 2013 15:12:17 -0500 [thread overview]
Message-ID: <20131108201217.GW5925@bill-the-cat> (raw)
In-Reply-To: <1378844357-15389-4-git-send-email-mark.langsdorf@calxeda.com>
On Tue, Sep 10, 2013 at 03:19:17PM -0500, Mark Langsdorf wrote:
> Enable full 48-bit LBA48 data reads by passing the upper word of the
> LBA block pointer in bytes 9 and 10 of the FIS.
>
> This allows uboot to load data from any arbitrary sector on a drive
> with 2 or more TB of available data connected to an AHCI controller.
>
> Signed-off-by: Mark Langsdorf <mark.langsdorf@calxeda.com>
OK, so a few things in here:
[snip]
> +void scsi_setup_read16(ccb * pccb, lbaint_t start, unsigned long blocks)
> +{
> + pccb->cmd[0] = SCSI_READ16;
> + pccb->cmd[1] = pccb->lun<<5;
> + pccb->cmd[2] = ((unsigned char) (start >> 56)) & 0xff;
This isn't protected with CONFIG_LBA48, so on non-LBA48 enabled boards
(P2020DS_36BIT is the example I found here) we get warnings here and on
[snip]
> @@ -721,6 +731,11 @@ static int ata_scsiop_read_write(ccb *pccb, u8 is_write)
> fis[6] = (lba >> 16) & 0xff;
> fis[7] = 1 << 6; /* device reg: set LBA mode */
> fis[8] = ((lba >> 24) & 0xff);
> + if (pccb->cmd[0] == SCSI_READ16) {
> + fis[9] = ((lba >> 32) & 0xff);
> + fis[10] = ((lba >> 40) & 0xff);
> + }
> +
This hunk.
It's easy enough to guard both of these cases with #ifdef CONFIG_LBA48,
and I've done so now.
But, highbank isn't setting CONFIG_LBA48 and probably really wants to,
yes?
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131108/ebb05d7f/attachment.pgp>
prev parent reply other threads:[~2013-11-08 20:12 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
2013-11-08 20:12 ` Tom Rini [this message]
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=20131108201217.GW5925@bill-the-cat \
--to=trini@ti.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