ufs: Assign UTRLBAU = upper_32_ bits(UTRLD base address)
PATCH 1/1 ufs: Assign UTRLBAU = upper_32_ bits(UTRLD base address)
From: Santosh Yaraganavi <[email protected]>
UTP Transfer request list base registers UTRLBA and UTRLBAU must be assigned, lower-32 and upper-32 bits of UTRLD list physical base addresses respectively.
Currently UTRLBAU is being assigned lower-32 bits of UTRLD physical base address. This will cause an issue with controllers that can support 64-bit addressing.
This patch correctly assigns upper-32 bits of UTRLD physical base address to UTRLBAU.
--- drivers/scsi/ufs/ufshcd.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/scsi/ufs/ufshcd.c +3 -3
@@ -1032,11 +1032,11 @@ static int ufshcd_initialize_hba(struct ufs_hba *hba)return -EIO ;/* Configure UTRL and UTMRL base address registers */ -writel (hba->utrdl_dma_addr, - (hba->mmio_base +REG_UTP_TRANSFER_REQ_LIST_BASE_L ));writel (lower_32_bits (hba->utrdl_dma_addr), + (hba->mmio_base +REG_UTP_TRANSFER_REQ_LIST_BASE_L )); +writel (upper_32_bits (hba->utrdl_dma_addr), (hba->mmio_base +REG_UTP_TRANSFER_REQ_LIST_BASE_H )); -writel (hba->utmrdl_dma_addr, +writel (lower_32_bits (hba->utmrdl_dma_addr), (hba->mmio_base +REG_UTP_TASK_REQ_LIST_BASE_L ));writel (upper_32_bits (hba->utmrdl_dma_addr), (hba->mmio_base +REG_UTP_TASK_REQ_LIST_BASE_H ));
Signature · 1 line
1.7.5.4
2012/4/23 Santosh Y <[email protected]>:
Quoted 6 lines
From: Santosh Yaraganavi <[email protected]>
UTP Transfer request list base registers UTRLBA and UTRLBAU must be assigned, lower-32 and upper-32 bits of UTRLD list physical base addresses respectively.
Quoted 6 lines
Currently UTRLBAU is being assigned lower-32 bits of UTRLD physical base address. This will cause an issue with controllers that can support 64-bit addressing.
This patch correctly assigns upper-32 bits of UTRLD physical base address to UTRLBAU.
Hi. Santosh.
0 : 9 bits are reserved in UTRLBA of specification. is it considered also ? Thanks.
Quoted 30 lines
Reported-by Rene De Jong <[email protected]>Signed-off-by Santosh Yaraganavi <[email protected]>Reviewed-by Vinayak Holikatti <[email protected]>---
drivers/scsi/ufs/ufshcd.c | 6 +++---1 files changed, 3 insertions(+), 3 deletions(-)drivers/scsi/ufs/ufshcd.c +3
-4@@ -1032,11 +1032,11 @@ static int ufshcd_initialize_hba(struct ufs_hba *hba) return -EIO; /* Configure UTRL and UTMRL base address registers */ - writel(hba->utrdl_dma_addr, - (hba->mmio_base + REG_UTP_TRANSFER_REQ_LIST_BASE_L)); writel(lower_32_bits(hba->utrdl_dma_addr), + (hba->mmio_base + REG_UTP_TRANSFER_REQ_LIST_BASE_L)); + writel(upper_32_bits(hba->utrdl_dma_addr), (hba->mmio_base + REG_UTP_TRANSFER_REQ_LIST_BASE_H)); - writel(hba->utmrdl_dma_addr, + writel(lower_32_bits(hba->utmrdl_dma_addr), (hba->mmio_base + REG_UTP_TASK_REQ_LIST_BASE_L)); writel(upper_32_bits(hba->utmrdl_dma_addr), (hba->mmio_base + REG_UTP_TASK_REQ_LIST_BASE_H)); --1.7.5.4
Quoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 11 lines · Namjae Jeon
2012/4/23 Santosh Y <[email protected]>:
Quoted 10 lines
From: Santosh Yaraganavi <[email protected]>
UTP Transfer request list base registers UTRLBA and UTRLBAU must be assigned, lower-32 and upper-32 bits of UTRLD list physical base addresses respectively.
Currently UTRLBAU is being assigned lower-32 bits of UTRLD physical base address. This will cause an issue with controllers that can support 64-bit addressing.
Quoted 6 lines
Quoted 2 lines
This patch correctly assigns upper-32 bits of UTRLD physical base address to UTRLBAU.
Hi. Santosh.
0 : 9 bits are reserved in UTRLBA of specification. is it considered also ? Thanks.
Hi Namjae,
During memory allocation for UTRDL, it is made sure that the UTRDL physical base address is aligned to 1K by checking if the address is aligned to PAGE_SIZE. If the address is PAGE_SIZE aligned, then it is aligned to 1K. So we don't have to worry about the first 10 bits while assigning the base address to UTRLBA.
Signature · 1 line
~Santosh
Namjae Jeon
Reviewed-by2012/4/24 Santosh Y <[email protected]>:
Quoted 21 lines · Namjae Jeon
Quoted 11 lines
2012/4/23 Santosh Y <[email protected]>:
Quoted 10 lines
From: Santosh Yaraganavi <[email protected]>
UTP Transfer request list base registers UTRLBA and UTRLBAU must be assigned, lower-32 and upper-32 bits of UTRLD list physical base addresses respectively.
Currently UTRLBAU is being assigned lower-32 bits of UTRLD physical base address. This will cause an issue with controllers that can support 64-bit addressing.
Quoted 6 lines
Quoted 2 lines
This patch correctly assigns upper-32 bits of UTRLD physical base address to UTRLBAU.
Hi. Santosh.
0 : 9 bits are reserved in UTRLBA of specification. is it considered also ? Thanks.Hi Namjae,
Quoted 8 lines
During memory allocation for UTRDL, it is made sure that the UTRDL physical base address is aligned to 1K by checking if the address is aligned to
PAGE_SIZE. If the address isPAGE_SIZEaligned, then it is aligned to 1K. So we don't have to worry about the first 10 bits while assigning the base address to UTRLBA.--
~Santosh
Hi. Santosh.
Okay, I understand. Thanks for your reply.