<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/scsi/scsi_error.c, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-01-17T03:54:27+00:00</updated>
<entry>
<title>scsi: core: Wake up the error handler when final completions race against each other</title>
<updated>2026-01-17T03:54:27+00:00</updated>
<author>
<name>David Jeffery</name>
<email>djeffery@redhat.com</email>
</author>
<published>2026-01-13T16:08:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fe2f8ad6f0999db3b318359a01ee0108c703a8c3'/>
<id>urn:sha1:fe2f8ad6f0999db3b318359a01ee0108c703a8c3</id>
<content type='text'>
The fragile ordering between marking commands completed or failed so
that the error handler only wakes when the last running command
completes or times out has race conditions. These race conditions can
cause the SCSI layer to fail to wake the error handler, leaving I/O
through the SCSI host stuck as the error state cannot advance.

First, there is an memory ordering issue within scsi_dec_host_busy().
The write which clears SCMD_STATE_INFLIGHT may be reordered with reads
counting in scsi_host_busy(). While the local CPU will see its own
write, reordering can allow other CPUs in scsi_dec_host_busy() or
scsi_eh_inc_host_failed() to see a raised busy count, causing no CPU to
see a host busy equal to the host_failed count.

This race condition can be prevented with a memory barrier on the error
path to force the write to be visible before counting host busy
commands.

Second, there is a general ordering issue with scsi_eh_inc_host_failed(). By
counting busy commands before incrementing host_failed, it can race with a
final command in scsi_dec_host_busy(), such that scsi_dec_host_busy() does
not see host_failed incremented but scsi_eh_inc_host_failed() counts busy
commands before SCMD_STATE_INFLIGHT is cleared by scsi_dec_host_busy(),
resulting in neither waking the error handler task.

This needs the call to scsi_host_busy() to be moved after host_failed is
incremented to close the race condition.

Fixes: 6eb045e092ef ("scsi: core: avoid host-wide host_busy counter for scsi_mq")
Signed-off-by: David Jeffery &lt;djeffery@redhat.com&gt;
Reviewed-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Link: https://patch.msgid.link/20260113161036.6730-1-djeffery@redhat.com
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: core: Fix error handler encryption support</title>
<updated>2026-01-04T20:16:20+00:00</updated>
<author>
<name>Brian Kao</name>
<email>powenkao@google.com</email>
</author>
<published>2025-12-18T03:17:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9a49157deeb23581fc5c8189b486340d7343264a'/>
<id>urn:sha1:9a49157deeb23581fc5c8189b486340d7343264a</id>
<content type='text'>
Some low-level drivers (LLD) access block layer crypto fields, such as
rq-&gt;crypt_keyslot and rq-&gt;crypt_ctx within `struct request`, to
configure hardware for inline encryption.  However, SCSI Error Handling
(EH) commands (e.g., TEST UNIT READY, START STOP UNIT) should not
involve any encryption setup.

To prevent drivers from erroneously applying crypto settings during EH,
this patch saves the original values of rq-&gt;crypt_keyslot and
rq-&gt;crypt_ctx before an EH command is prepared via scsi_eh_prep_cmnd().
These fields in the 'struct request' are then set to NULL.  The original
values are restored in scsi_eh_restore_cmnd() after the EH command
completes.

This ensures that the block layer crypto context does not leak into EH
command execution.

Signed-off-by: Brian Kao &lt;powenkao@google.com&gt;
Link: https://patch.msgid.link/20251218031726.2642834-1-powenkao@google.com
Cc: stable@vger.kernel.org
Reviewed-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 6.18/scsi-fixes into 6.19/scsi-staging</title>
<updated>2025-11-20T03:59:25+00:00</updated>
<author>
<name>Martin K. Petersen</name>
<email>martin.petersen@oracle.com</email>
</author>
<published>2025-11-20T03:59:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e54f7b4b8159d76d601788ca61267247fac67abf'/>
<id>urn:sha1:e54f7b4b8159d76d601788ca61267247fac67abf</id>
<content type='text'>
Pull in fixes branch to resolve UFS merge conflict.

Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: core: Make the budget map optional</title>
<updated>2025-11-12T22:02:31+00:00</updated>
<author>
<name>Bart Van Assche</name>
<email>bvanassche@acm.org</email>
</author>
<published>2025-10-31T20:39:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a47c7bef57858d29b83cd7f101112f52821439f9'/>
<id>urn:sha1:a47c7bef57858d29b83cd7f101112f52821439f9</id>
<content type='text'>
Prepare for not allocating a budget map for pseudo SCSI devices by
checking whether a budget map has been allocated before using it.

Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Cc: John Garry &lt;john.g.garry@oracle.com&gt;
Cc: Ming Lei &lt;ming.lei@redhat.com&gt;
Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Link: https://patch.msgid.link/20251031204029.2883185-4-bvanassche@acm.org
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: core: Fix the unit attention counter implementation</title>
<updated>2025-10-22T01:09:36+00:00</updated>
<author>
<name>Bart Van Assche</name>
<email>bvanassche@acm.org</email>
</author>
<published>2025-10-14T22:02:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d54c676d4fe0543d1642ab7a68ffdd31e8639a5d'/>
<id>urn:sha1:d54c676d4fe0543d1642ab7a68ffdd31e8639a5d</id>
<content type='text'>
scsi_decide_disposition() may call scsi_check_sense().
scsi_decide_disposition() calls are not serialized. Hence, counter
updates by scsi_check_sense() must be serialized. Hence this patch that
makes the counters updated by scsi_check_sense() atomic.

Cc: Kai Mäkisara &lt;Kai.Makisara@kolumbus.fi&gt;
Fixes: a5d518cd4e3e ("scsi: core: Add counters for New Media and Power On/Reset UNIT ATTENTIONs")
Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Reviewed-by: Ewan D. Milne &lt;emilne@redhat.com&gt;
Link: https://patch.msgid.link/20251014220244.3689508-1-bvanassche@acm.org
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: error: alua: I/O errors for ALUA state transitions</title>
<updated>2025-06-10T02:02:13+00:00</updated>
<author>
<name>Rajashekhar M A</name>
<email>rajs@netapp.com</email>
</author>
<published>2025-06-06T13:59:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5c3ba81923e02adae354ec8afd006f93289b4a3c'/>
<id>urn:sha1:5c3ba81923e02adae354ec8afd006f93289b4a3c</id>
<content type='text'>
When a host is configured with a few LUNs and I/O is running, injecting
FC faults repeatedly leads to path recovery problems.  The LUNs have 4
paths each and 3 of them come back active after say an FC fault which
makes 2 of the paths go down, instead of all 4. This happens after
several iterations of continuous FC faults.

Reason here is that we're returning an I/O error whenever we're
encountering sense code 06/04/0a (LOGICAL UNIT NOT ACCESSIBLE, ASYMMETRIC
ACCESS STATE TRANSITION) instead of retrying.

Signed-off-by: Rajashekhar M A &lt;rajs@netapp.com&gt;
Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Link: https://lore.kernel.org/r/20250606135924.27397-1-hare@kernel.org
Reviewed-by: Lee Duncan &lt;lduncan@suse.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: scsi_error: Add comments to scsi_check_sense()</title>
<updated>2025-03-04T03:11:47+00:00</updated>
<author>
<name>Damien Le Moal</name>
<email>dlemoal@kernel.org</email>
</author>
<published>2025-02-28T03:17:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e6a815673b3b4ed69745f7a954742e12fc60139a'/>
<id>urn:sha1:e6a815673b3b4ed69745f7a954742e12fc60139a</id>
<content type='text'>
Add a comment block describing the COMPLETED case with ASC/ASCQ 0x55/0xA
to mention that it relates to command duration limits very special
policy 0xD command completion.

Signed-off-by: Damien Le Moal &lt;dlemoal@kernel.org&gt;
Link: https://lore.kernel.org/r/20250228031751.12083-1-dlemoal@kernel.org
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: core: Add counters for New Media and Power On/Reset UNIT ATTENTIONs</title>
<updated>2025-02-03T22:43:31+00:00</updated>
<author>
<name>Kai Mäkisara</name>
<email>Kai.Makisara@kolumbus.fi</email>
</author>
<published>2025-01-20T19:49:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a5d518cd4e3e592eaa59b888a5d75ad639d554ea'/>
<id>urn:sha1:a5d518cd4e3e592eaa59b888a5d75ad639d554ea</id>
<content type='text'>
The purpose of the counters is to enable all ULDs attached to a device to
find out that a New Media or/and Power On/Reset Unit Attentions has/have
been set, even if another ULD catches the Unit Attention as response to a
SCSI command.

The ULDs can read the counters and see if the values have changed from the
previous check.

Signed-off-by: Kai Mäkisara &lt;Kai.Makisara@kolumbus.fi&gt;
Link: https://lore.kernel.org/r/20250120194925.44432-3-Kai.Makisara@kolumbus.fi
Reviewed-by: John Meneghini &lt;jmeneghi@redhat.com&gt;
Tested-by: John Meneghini &lt;jmeneghi@redhat.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: scsi_error: Add kernel-doc for exported functions</title>
<updated>2025-01-10T20:15:02+00:00</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2024-12-12T20:52:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=20b98768c2e743df7648476521818600ac4a86ef'/>
<id>urn:sha1:20b98768c2e743df7648476521818600ac4a86ef</id>
<content type='text'>
Convert scsi_report_bus_reset() and scsi_report_device_reset() to
kernel-doc since they are exported. This allows them to be part of the
driver-api/scsi.rst docbook.

Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Link: https://lore.kernel.org/r/20241212205217.597844-2-rdunlap@infradead.org
CC: James E.J. Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
CC: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>move asm/unaligned.h to linux/unaligned.h</title>
<updated>2024-10-02T21:23:23+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2024-10-01T19:35:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5f60d5f6bbc12e782fac78110b0ee62698f3b576'/>
<id>urn:sha1:5f60d5f6bbc12e782fac78110b0ee62698f3b576</id>
<content type='text'>
asm/unaligned.h is always an include of asm-generic/unaligned.h;
might as well move that thing to linux/unaligned.h and include
that - there's nothing arch-specific in that header.

auto-generated by the following:

for i in `git grep -l -w asm/unaligned.h`; do
	sed -i -e "s/asm\/unaligned.h/linux\/unaligned.h/" $i
done
for i in `git grep -l -w asm-generic/unaligned.h`; do
	sed -i -e "s/asm-generic\/unaligned.h/linux\/unaligned.h/" $i
done
git mv include/asm-generic/unaligned.h include/linux/unaligned.h
git mv tools/include/asm-generic/unaligned.h tools/include/linux/unaligned.h
sed -i -e "/unaligned.h/d" include/asm-generic/Kbuild
sed -i -e "s/__ASM_GENERIC/__LINUX/" include/linux/unaligned.h tools/include/linux/unaligned.h
</content>
</entry>
</feed>
