Skip to contentSkip to conversation

ufs: Assign UTRLBAU = upper_32_ bits(UTRLD base address)

PATCH In review Santosh Y 2 participants 4 messages Apr 23, 2012 – Apr 24, 2012 SCSI

lore
Share & tools
lore

Santosh Y

author
#0 lore raw

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
index 52b96e8..ea32ade 100644
@@ -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
#1 lore raw

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

---
 drivers/scsi/ufs/ufshcd.c |    6 +++---

 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/scsi/ufs/ufshcd.c +3 -4
index 52b96e8..ea32ade 100644
@@ -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

author
#2 lore raw
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
Reviewed-by
#3 lore raw

2012/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 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.

--
~Santosh

Hi. Santosh.
Okay, I understand. Thanks for your reply.