<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/drivers/scsi, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>scsi: move scsi_scan() call out of scsi_get_blk_by_uuid()</title>
<updated>2026-04-08T17:07:07+00:00</updated>
<author>
<name>David Lechner</name>
<email>dlechner@baylibre.com</email>
</author>
<published>2026-03-26T22:59:26+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b382cd0973521a5197a097d4e190f47aadb79757'/>
<id>b382cd0973521a5197a097d4e190f47aadb79757</id>
<content type='text'>
Move scsi_scan() call out of scsi_get_blk_by_uuid().

The only caller, env_scsi_get_part(), should be managing this call since
it may also want to use different ways to get the partition information
in the future.

Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move scsi_scan() call out of scsi_get_blk_by_uuid().

The only caller, env_scsi_get_part(), should be managing this call since
it may also want to use different ways to get the partition information
in the future.

Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi: return ENODEV in scsi_get_blk_by_uuid()</title>
<updated>2026-04-08T17:07:07+00:00</updated>
<author>
<name>David Lechner</name>
<email>dlechner@baylibre.com</email>
</author>
<published>2026-03-26T22:59:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e5d8ad260bb7de1729a6454e8b95a83e629dff7a'/>
<id>e5d8ad260bb7de1729a6454e8b95a83e629dff7a</id>
<content type='text'>
Change scsi_get_blk_by_uuid() to return -ENODEV instead of -1 on error.
Other scsi_* functions return an error code rather than -1.

1 is EPERM, which doesn't make sense here. So we use ENODEV instead. The
only caller only checks for !success, so changing the value has no
effect on the caller.

Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change scsi_get_blk_by_uuid() to return -ENODEV instead of -1 on error.
Other scsi_* functions return an error code rather than -1.

1 is EPERM, which doesn't make sense here. So we use ENODEV instead. The
only caller only checks for !success, so changing the value has no
effect on the caller.

Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi: Adjust SCSI inquiry command data length</title>
<updated>2026-03-16T16:39:26+00:00</updated>
<author>
<name>Macpaul Lin</name>
<email>macpaul.lin@mediatek.com</email>
</author>
<published>2026-03-05T10:23:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=041364141b7daef8318a4b8495cac8570002773f'/>
<id>041364141b7daef8318a4b8495cac8570002773f</id>
<content type='text'>
Per the SCSI SPC-4 specification, the standard inquiry data length
should not be less than 36 bytes. The current implementation uses 512
bytes, which causes detection failures on some UFS devices (e.g.,
Longsys) that do not expect a transfer length exceeding the standard
inquiry size.

Align the default standard inquiry length with the Linux kernel's
implementation (see drivers/scsi/scsi_scan.c), which uses 36 bytes as
the default. Devices requiring vendor-specific inquiry lengths should
be handled through quirk settings in the future.

Signed-off-by: ht.lin &lt;ht.lin@mediatek.com&gt;
Signed-off-by: Macpaul Lin &lt;macpaul.lin@mediatek.com&gt;
Reviewed-by: Marek Vasut &lt;marek.vasut@mailbox.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Per the SCSI SPC-4 specification, the standard inquiry data length
should not be less than 36 bytes. The current implementation uses 512
bytes, which causes detection failures on some UFS devices (e.g.,
Longsys) that do not expect a transfer length exceeding the standard
inquiry size.

Align the default standard inquiry length with the Linux kernel's
implementation (see drivers/scsi/scsi_scan.c), which uses 36 bytes as
the default. Devices requiring vendor-specific inquiry lengths should
be handled through quirk settings in the future.

Signed-off-by: ht.lin &lt;ht.lin@mediatek.com&gt;
Signed-off-by: Macpaul Lin &lt;macpaul.lin@mediatek.com&gt;
Reviewed-by: Marek Vasut &lt;marek.vasut@mailbox.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spl: Make UFS available for SPL builds</title>
<updated>2026-03-12T08:30:44+00:00</updated>
<author>
<name>Alexey Charkov</name>
<email>alchark@gmail.com</email>
</author>
<published>2026-01-20T18:09:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c664b4d5f30a704003b97823a5ad6361cb16fbe8'/>
<id>c664b4d5f30a704003b97823a5ad6361cb16fbe8</id>
<content type='text'>
Add minimal infrastructure to build SPL images with support for UFS
storage devices. This also pulls in SCSI support and charset functions,
which are dependencies of the UFS code.

With this, only a fixed offset is supported for loading the next image,
which should be specified in CONFIG_SPL_UFS_RAW_U_BOOT_SECTOR as the
number of 4096-byte sectors into the UFS block device.

Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Signed-off-by: Alexey Charkov &lt;alchark@gmail.com&gt;
Link: https://patch.msgid.link/20260120-rk3576-ufs-v5-1-0edb61b301b7@gmail.com
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add minimal infrastructure to build SPL images with support for UFS
storage devices. This also pulls in SCSI support and charset functions,
which are dependencies of the UFS code.

With this, only a fixed offset is supported for loading the next image,
which should be specified in CONFIG_SPL_UFS_RAW_U_BOOT_SECTOR as the
number of 4096-byte sectors into the UFS block device.

Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Signed-off-by: Alexey Charkov &lt;alchark@gmail.com&gt;
Link: https://patch.msgid.link/20260120-rk3576-ufs-v5-1-0edb61b301b7@gmail.com
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers: scsi: fix double decrement of block count in 64-bit LBA path</title>
<updated>2025-12-22T22:19:39+00:00</updated>
<author>
<name>Balaji Selvanathan</name>
<email>balaji.selvanathan@oss.qualcomm.com</email>
</author>
<published>2025-12-22T09:01:05+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c0add0039825fbd40620284c202f7c4569154605'/>
<id>c0add0039825fbd40620284c202f7c4569154605</id>
<content type='text'>
The scsi_read function incorrectly decrements the block count twice
when handling large disks that trigger the CONFIG_SYS_64BIT_LBA code
path (reads beyond block 268,435,455). The variable 'blks' was being
decremented both inside the 64-bit LBA block and after the successful
scsi_exec() call, causing incorrect block count tracking and data
abort errors on large capacity disks.

Signed-off-by: Balaji Selvanathan &lt;balaji.selvanathan@oss.qualcomm.com&gt;
Tested-by: Tony Dinh &lt;mibodhi@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The scsi_read function incorrectly decrements the block count twice
when handling large disks that trigger the CONFIG_SYS_64BIT_LBA code
path (reads beyond block 268,435,455). The variable 'blks' was being
decremented both inside the 64-bit LBA block and after the successful
scsi_exec() call, causing incorrect block count tracking and data
abort errors on large capacity disks.

Signed-off-by: Balaji Selvanathan &lt;balaji.selvanathan@oss.qualcomm.com&gt;
Tested-by: Tony Dinh &lt;mibodhi@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi: Fix the name string memory leak during scsi scan</title>
<updated>2025-11-11T17:54:48+00:00</updated>
<author>
<name>Bin Meng</name>
<email>bmeng.cn@gmail.com</email>
</author>
<published>2025-11-05T11:07:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c6e8befd4b8da4a99c779a0fddd92690e2f611fa'/>
<id>c6e8befd4b8da4a99c779a0fddd92690e2f611fa</id>
<content type='text'>
There is a memory leak during the scsi scan process due to the
strdup'ed name string is never freed. Actually it is unnecessary
to pass a strdup'ed name string to blk_create_devicef() as we can
use the name string on the stack directly.

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Reviewed-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is a memory leak during the scsi scan process due to the
strdup'ed name string is never freed. Actually it is unnecessary
to pass a strdup'ed name string to blk_create_devicef() as we can
use the name string on the stack directly.

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Reviewed-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers: scsi: fix inaccurate block count reporting in scsi operations</title>
<updated>2025-08-07T17:14:23+00:00</updated>
<author>
<name>Balaji Selvanathan</name>
<email>balaji.selvanathan@oss.qualcomm.com</email>
</author>
<published>2025-07-28T16:21:05+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b32dda34506b4f486bc803d0c7251f987edd2455'/>
<id>b32dda34506b4f486bc803d0c7251f987edd2455</id>
<content type='text'>
The 'blks' variable in scsi_read/write/erase functions is updated
regardless of pass/fail of the scsi operation . If the scsi operation
fails, 'blkcnt' is updated using an incorrect value of 'blks'. This
wrong 'blkcnt' is returned to the caller and it assumes all blocks were
processed correctly.

Fix this by updating the 'blks' variable only if the scsi operation
succeeds.

Signed-off-by: Balaji Selvanathan &lt;balaji.selvanathan@oss.qualcomm.com&gt;
Signed-off-by: Varadarajan Narayanan &lt;quic_varada@quicinc.com&gt;
Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The 'blks' variable in scsi_read/write/erase functions is updated
regardless of pass/fail of the scsi operation . If the scsi operation
fails, 'blkcnt' is updated using an incorrect value of 'blks'. This
wrong 'blkcnt' is returned to the caller and it assumes all blocks were
processed correctly.

Fix this by updating the 'blks' variable only if the scsi operation
succeeds.

Signed-off-by: Balaji Selvanathan &lt;balaji.selvanathan@oss.qualcomm.com&gt;
Signed-off-by: Varadarajan Narayanan &lt;quic_varada@quicinc.com&gt;
Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi: Make static functions consistent using lbaint_t</title>
<updated>2025-07-14T21:16:43+00:00</updated>
<author>
<name>Andrew Goodbody</name>
<email>andrew.goodbody@linaro.org</email>
</author>
<published>2025-07-07T14:12:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=41713b99671f6775c18d70d31ccd8b27e438abe1'/>
<id>41713b99671f6775c18d70d31ccd8b27e438abe1</id>
<content type='text'>
The static helper functions are inconsistent in their use of their third
parameter which is used to pass a block count. Keep consistency by
always using lbaint_t here. This will fix an issue where two left shifts
were overflowing the variable type in use.

This issue found by Smatch

Signed-off-by: Andrew Goodbody &lt;andrew.goodbody@linaro.org&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The static helper functions are inconsistent in their use of their third
parameter which is used to pass a block count. Keep consistency by
always using lbaint_t here. This will fix an issue where two left shifts
were overflowing the variable type in use.

This issue found by Smatch

Signed-off-by: Andrew Goodbody &lt;andrew.goodbody@linaro.org&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi: Implement get_blk() function</title>
<updated>2025-05-30T00:35:49+00:00</updated>
<author>
<name>Varadarajan Narayanan</name>
<email>quic_varada@quicinc.com</email>
</author>
<published>2025-05-13T09:17:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9a2010941f56929cb28432cc3f4b37a944f55b8e'/>
<id>9a2010941f56929cb28432cc3f4b37a944f55b8e</id>
<content type='text'>
Add a function to obtain the block device for SCSI.

Signed-off-by: Varadarajan Narayanan &lt;quic_varada@quicinc.com&gt;
Acked-by: Casey Connolly &lt;casey.connolly@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a function to obtain the block device for SCSI.

Signed-off-by: Varadarajan Narayanan &lt;quic_varada@quicinc.com&gt;
Acked-by: Casey Connolly &lt;casey.connolly@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers: scsi: Add 'erase' support</title>
<updated>2025-04-11T02:55:53+00:00</updated>
<author>
<name>Varadarajan Narayanan</name>
<email>quic_varada@quicinc.com</email>
</author>
<published>2025-04-01T10:09:59+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7dd49a9264a6de349343a873e465e1a5fcd459e3'/>
<id>7dd49a9264a6de349343a873e465e1a5fcd459e3</id>
<content type='text'>
UFS devices uses the block and scsi frameworks. Enable UFS erase
support by adding erase support to SCSI.

Signed-off-by: Varadarajan Narayanan &lt;quic_varada@quicinc.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
UFS devices uses the block and scsi frameworks. Enable UFS erase
support by adding erase support to SCSI.

Signed-off-by: Varadarajan Narayanan &lt;quic_varada@quicinc.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
