<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/scsi/isci, branch linux-5.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-08-28T14:21:21Z</updated>
<entry>
<title>scsi: isci: Fix dma_unmap_sg() nents value</title>
<updated>2025-08-28T14:21:21Z</updated>
<author>
<name>Thomas Fourier</name>
</author>
<published>2025-06-27T14:24:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fc293c4a23ff2fa36ea32f740aee91b0a22ccd2e'/>
<id>urn:sha1:fc293c4a23ff2fa36ea32f740aee91b0a22ccd2e</id>
<content type='text'>
[ Upstream commit 063bec4444d54e5f35d11949c5c90eaa1ff84c11 ]

The dma_unmap_sg() functions should be called with the same nents as the
dma_map_sg(), not the value the map function returned.

Fixes: ddcc7e347a89 ("isci: fix dma_unmap_sg usage")
Signed-off-by: Thomas Fourier &lt;fourier.thomas@gmail.com&gt;
Link: https://lore.kernel.org/r/20250627142451.241713-2-fourier.thomas@gmail.com
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>scsi: isci: Fix an error code problem in isci_io_request_build()</title>
<updated>2024-02-23T07:25:04Z</updated>
<author>
<name>Su Hui</name>
</author>
<published>2024-01-12T04:19:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b81f679ac561f61b949de3d664e28d203766b352'/>
<id>urn:sha1:b81f679ac561f61b949de3d664e28d203766b352</id>
<content type='text'>
[ Upstream commit 658365c6b0857e6a306436e315a8633937e3af42 ]

Clang static complains that Value stored to 'status' is never read. Return
'status' rather than 'SCI_SUCCESS'.

Fixes: f1f52e75939b ("isci: uplevel request infrastructure")
Signed-off-by: Su Hui &lt;suhui@nfschina.com&gt;
Link: https://lore.kernel.org/r/20240112041926.3924315-1-suhui@nfschina.com
Reviewed-by: Artur Paszkiewicz &lt;artur.paszkiewicz@intel.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>scsi: libsas: Add LUN number check in .slave_alloc callback</title>
<updated>2021-07-25T12:35:13Z</updated>
<author>
<name>Yufen Yu</name>
</author>
<published>2021-06-22T03:40:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d7b647d055862ebd2ed6f07634287315a8fb3793'/>
<id>urn:sha1:d7b647d055862ebd2ed6f07634287315a8fb3793</id>
<content type='text'>
[ Upstream commit 49da96d77938db21864dae6b7736b71e96c1d203 ]

Offlining a SATA device connected to a hisi SAS controller and then
scanning the host will result in detecting 255 non-existent devices:

  # lsscsi
  [2:0:0:0]    disk    ATA      Samsung SSD 860  2B6Q  /dev/sda
  [2:0:1:0]    disk    ATA      WDC WD2003FYYS-3 1D01  /dev/sdb
  [2:0:2:0]    disk    SEAGATE  ST600MM0006      B001  /dev/sdc
  # echo "offline" &gt; /sys/block/sdb/device/state
  # echo "- - -" &gt; /sys/class/scsi_host/host2/scan
  # lsscsi
  [2:0:0:0]    disk    ATA      Samsung SSD 860  2B6Q  /dev/sda
  [2:0:1:0]    disk    ATA      WDC WD2003FYYS-3 1D01  /dev/sdb
  [2:0:1:1]    disk    ATA      WDC WD2003FYYS-3 1D01  /dev/sdh
  ...
  [2:0:1:255]  disk    ATA      WDC WD2003FYYS-3 1D01  /dev/sdjb

After a REPORT LUN command issued to the offline device fails, the SCSI
midlayer tries to do a sequential scan of all devices whose LUN number is
not 0. However, SATA does not support LUN numbers at all.

Introduce a generic sas_slave_alloc() handler which will return -ENXIO for
SATA devices if the requested LUN number is larger than 0 and make libsas
drivers use this function as their .slave_alloc callback.

Link: https://lore.kernel.org/r/20210622034037.1467088-1-yuyufen@huawei.com
Reported-by: Wu Bo &lt;wubo40@huawei.com&gt;
Suggested-by: John Garry &lt;john.garry@huawei.com&gt;
Reviewed-by: John Garry &lt;john.garry@huawei.com&gt;
Reviewed-by: Jason Yan &lt;yanaijie@huawei.com&gt;
Signed-off-by: Yufen Yu &lt;yuyufen@huawei.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>scsi: libsas: aic94xx: hisi_sas: mvsas: pm8001: Use dev_is_expander()</title>
<updated>2019-06-20T19:37:02Z</updated>
<author>
<name>John Garry</name>
</author>
<published>2019-06-10T12:41:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=924a3541eab0d28101baf0831e4315593f06ba4a'/>
<id>urn:sha1:924a3541eab0d28101baf0831e4315593f06ba4a</id>
<content type='text'>
Many times in libsas, and in LLDDs which use libsas, the check for an
expander device is re-implemented or open coded.

Use dev_is_expander() instead. We rename this from
sas_dev_type_is_expander() to not spill so many lines in referencing.

Signed-off-by: John Garry &lt;john.garry@huawei.com&gt;
Reviewed-by: Jason Yan &lt;yanaijie@huawei.com&gt;
Reviewed-by: Jack Wang &lt;jinpu.wang@cloud.ionos.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: isci: Grammar s/the its/its/</title>
<updated>2019-06-18T23:46:25Z</updated>
<author>
<name>Geert Uytterhoeven</name>
</author>
<published>2019-06-07T11:34:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=881a9a54da175aa5897b8fef7abe0f85a5242770'/>
<id>urn:sha1:881a9a54da175aa5897b8fef7abe0f85a5242770</id>
<content type='text'>
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: isci: initialize shost fully before calling scsi_add_host()</title>
<updated>2019-01-09T03:27:24Z</updated>
<author>
<name>Logan Gunthorpe</name>
</author>
<published>2019-01-08T20:50:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cc29a1b0a3f2597ce887d339222fa85b9307706d'/>
<id>urn:sha1:cc29a1b0a3f2597ce887d339222fa85b9307706d</id>
<content type='text'>
scsi_mq_setup_tags(), which is called by scsi_add_host(), calculates the
command size to allocate based on the prot_capabilities. In the isci
driver, scsi_host_set_prot() is called after scsi_add_host() so the command
size gets calculated to be smaller than it needs to be.  Eventually,
scsi_mq_init_request() locates the 'prot_sdb' after the command assuming it
was sized correctly and a buffer overrun may occur.

However, seeing blk_mq_alloc_rqs() rounds up to the nearest cache line
size, the mistake can go unnoticed.

The bug was noticed after the struct request size was reduced by commit
9d037ad707ed ("block: remove req-&gt;timeout_list")

Which likely reduced the allocated space for the request by an entire cache
line, enough that the overflow could be hit and it caused a panic, on boot,
at:

  RIP: 0010:t10_pi_complete+0x77/0x1c0
  Call Trace:
    &lt;IRQ&gt;
    sd_done+0xf5/0x340
    scsi_finish_command+0xc3/0x120
    blk_done_softirq+0x83/0xb0
    __do_softirq+0xa1/0x2e6
    irq_exit+0xbc/0xd0
    call_function_single_interrupt+0xf/0x20
    &lt;/IRQ&gt;

sd_done() would call scsi_prot_sg_count() which reads the number of
entities in 'prot_sdb', but seeing 'prot_sdb' is located after the end of
the allocated space it reads a garbage number and erroneously calls
t10_pi_complete().

To prevent this, the calls to scsi_host_set_prot() are moved into
isci_host_alloc() before the call to scsi_add_host(). Out of caution, also
move the similar call to scsi_host_set_guard().

Fixes: 3d2d75254915 ("[SCSI] isci: T10 DIF support")
Link: http://lkml.kernel.org/r/da851333-eadd-163a-8c78-e1f4ec5ec857@deltatee.com
Signed-off-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Cc: Intel SCU Linux support &lt;intel-linux-scu@intel.com&gt;
Cc: Artur Paszkiewicz &lt;artur.paszkiewicz@intel.com&gt;
Cc: "James E.J. Bottomley" &lt;jejb@linux.ibm.com&gt;
Cc: "Martin K. Petersen" &lt;martin.petersen@oracle.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: Jeff Moyer &lt;jmoyer@redhat.com&gt;
Reviewed-by: Jeff Moyer &lt;jmoyer@redhat.com&gt;
Reviewed-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: isci: request: mark expected switch fall-through</title>
<updated>2018-12-21T01:03:56Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
</author>
<published>2018-11-28T04:30:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=da7903092b880b25971ca9103cb0b934a44ace2b'/>
<id>urn:sha1:da7903092b880b25971ca9103cb0b934a44ace2b</id>
<content type='text'>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where
we are expecting to fall through.

Notice that, in this particular case, a dash is added as a token in order
to separate the "Fall through" annotation from the rest of the comment on
the same line, which is what GCC is expecting to find.

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Acked-by: Artur Paszkiewicz &lt;artur.paszkiewicz@intel.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: isci: remote_node_context: mark expected switch fall-throughs</title>
<updated>2018-12-21T01:03:56Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
</author>
<published>2018-11-28T04:30:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=87be32b3ad27d7696cdc4340644894ba4c7a89e5'/>
<id>urn:sha1:87be32b3ad27d7696cdc4340644894ba4c7a89e5</id>
<content type='text'>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where
we are expecting to fall through.

Notice that, in this particular case, a dash is added as a token in order
to separate the "Fall through" annotations from the rest of the comment on
the same line, which is what GCC is expecting to find.

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Acked-by: Artur Paszkiewicz &lt;artur.paszkiewicz@intel.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: isci: remote_device: Mark expected switch fall-throughs</title>
<updated>2018-12-21T01:03:56Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
</author>
<published>2018-11-28T04:30:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4f09ac9d96ceea2a0532e17b614b9b2835041c17'/>
<id>urn:sha1:4f09ac9d96ceea2a0532e17b614b9b2835041c17</id>
<content type='text'>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where
we are expecting to fall through.

Notice that, in this particular case, a dash is added as a token in order
to separate the "fall through" annotations from the rest of the comment on
the same line, which is what GCC is expecting to find.

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Acked-by: Artur Paszkiewicz &lt;artur.paszkiewicz@intel.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: isci: phy: Mark expected switch fall-through</title>
<updated>2018-12-21T01:03:55Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
</author>
<published>2018-11-28T04:29:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1aba50b880e1834a6f2f1cb0df23ccce3e84b8a8'/>
<id>urn:sha1:1aba50b880e1834a6f2f1cb0df23ccce3e84b8a8</id>
<content type='text'>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where
we are expecting to fall through.

Addresses-Coverity-ID: 703127 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Acked-by: Artur Paszkiewicz &lt;artur.paszkiewicz@intel.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
</feed>
