Skip to content

Commit 535ef19

Browse files
keosungphilmd
authored andcommitted
hw/ufs: Fix incorrect comment for segment_size and allocation_unit_size
The comments for segment_size and allocation_unit_size incorrectly described them as 4KB. According to the UFS specification, segment_size is expressed in units of 512 bytes. Given segment_size = 0x2000 (8192), the actual size is 4MB. Similarly, allocation_unit_size = 1 means 1 segment = 4MB. This patch updates the comments to reflect the correct size. Signed-off-by: Keoseong Park <[email protected]> Reviewed-by: Jeuk Kim <[email protected]> Message-ID: <20250403092140epcms2p355a7f039871b3e5b409754ef450b9158@epcms2p3> Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
1 parent 2ba700a commit 535ef19

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hw/ufs/ufs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1753,8 +1753,8 @@ static void ufs_init_hc(UfsHc *u)
17531753
u->geometry_desc.length = sizeof(GeometryDescriptor);
17541754
u->geometry_desc.descriptor_idn = UFS_QUERY_DESC_IDN_GEOMETRY;
17551755
u->geometry_desc.max_number_lu = (UFS_MAX_LUS == 32) ? 0x1 : 0x0;
1756-
u->geometry_desc.segment_size = cpu_to_be32(0x2000); /* 4KB */
1757-
u->geometry_desc.allocation_unit_size = 0x1; /* 4KB */
1756+
u->geometry_desc.segment_size = cpu_to_be32(0x2000); /* 4MB: 8192 * 512B */
1757+
u->geometry_desc.allocation_unit_size = 0x1; /* 4MB: 1 segment */
17581758
u->geometry_desc.min_addr_block_size = 0x8; /* 4KB */
17591759
u->geometry_desc.max_in_buffer_size = 0x8;
17601760
u->geometry_desc.max_out_buffer_size = 0x8;

0 commit comments

Comments
 (0)