<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/scsi/isci, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/scsi/isci?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/scsi/isci?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-05-24T03:24:10Z</updated>
<entry>
<title>scsi: isci: Fix typo in comment</title>
<updated>2022-05-24T03:24:10Z</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@inria.fr</email>
</author>
<published>2022-05-21T11:11:41Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=823ae99e09f7ada9e72c76cb2a9cc6a75a09971e'/>
<id>urn:sha1:823ae99e09f7ada9e72c76cb2a9cc6a75a09971e</id>
<content type='text'>
Spelling mistake (triple letters) in comment.  Detected with the help of
Coccinelle.

Link: https://lore.kernel.org/r/20220521111145.81697-91-Julia.Lawall@inria.fr
Signed-off-by: Julia Lawall &lt;Julia.Lawall@inria.fr&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: isci: Fix spelling mistake "doesnt" -&gt; "doesn't"</title>
<updated>2022-03-30T03:46:23Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.i.king@gmail.com</email>
</author>
<published>2022-03-16T23:56:15Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=fac952bb546a9f103a769d7105194175e11abc99'/>
<id>urn:sha1:fac952bb546a9f103a769d7105194175e11abc99</id>
<content type='text'>
There are a few spelling mistakes in dev_warn and dev_err messages.  Fix
these.

Link: https://lore.kernel.org/r/20220316235615.56683-1-colin.i.king@gmail.com
Signed-off-by: Colin Ian King &lt;colin.i.king@gmail.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: libsas: Delete lldd_clear_aca callback</title>
<updated>2022-02-19T20:59:34Z</updated>
<author>
<name>John Garry</name>
<email>john.garry@huawei.com</email>
</author>
<published>2022-02-17T15:42:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=25882c82f850e3e972a973e0af310b3e58de38fd'/>
<id>urn:sha1:25882c82f850e3e972a973e0af310b3e58de38fd</id>
<content type='text'>
This callback is never called, so remove support.

Link: https://lore.kernel.org/r/1645112566-115804-4-git-send-email-john.garry@huawei.com
Tested-by: Yihang Li &lt;liyihang6@hisilicon.com&gt;
Tested-by: Damien Le Moal &lt;damien.lemoal@opensource.wdc.com&gt;
Reviewed-by: Jack Wang &lt;jinpu.wang@ionos.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Xiang Chen &lt;chenxiang66@hisilicon.com&gt;
Signed-off-by: John Garry &lt;john.garry@huawei.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: libsas: Use enum for response frame DATAPRES field</title>
<updated>2022-02-19T20:59:34Z</updated>
<author>
<name>John Garry</name>
<email>john.garry@huawei.com</email>
</author>
<published>2022-02-17T15:42:30Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=1d6049a3b14feb39c8d6c8f538a711dcc54f88e0'/>
<id>urn:sha1:1d6049a3b14feb39c8d6c8f538a711dcc54f88e0</id>
<content type='text'>
As defined in table 126 of the SAS spec 1.1, use an enum for the DATAPRES
field, which makes reading the code easier.

Also change sas_ssp_task_response() to use a switch statement, which is
more suitable (than if-else), as suggested by Christoph.

Link: https://lore.kernel.org/r/1645112566-115804-3-git-send-email-john.garry@huawei.com
Suggested-by: Xiang Chen &lt;chenxiang66@hisilicon.com&gt;
Tested-by: Yihang Li &lt;liyihang6@hisilicon.com&gt;
Tested-by: Damien Le Moal &lt;damien.lemoal@opensource.wdc.com&gt;
Reviewed-by: Jack Wang &lt;jinpu.wang@ionos.com&gt;
Signed-off-by: John Garry &lt;john.garry@huawei.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: libsas: Drop SAS_TASK_AT_INITIATOR</title>
<updated>2022-02-11T22:02:50Z</updated>
<author>
<name>John Garry</name>
<email>john.garry@huawei.com</email>
</author>
<published>2022-02-10T10:43:24Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=26fc0ea74fcb9b76b41f5e9b89728cd1c01559cd'/>
<id>urn:sha1:26fc0ea74fcb9b76b41f5e9b89728cd1c01559cd</id>
<content type='text'>
This flag is now only ever set, so delete it.

This also avoids a use-after-free in the pm8001 queue path, as reported in
the following:

https://lore.kernel.org/linux-scsi/c3cb7228-254e-9584-182b-007ac5e6fe0a@huawei.com/T/#m28c94c6d3ff582ec4a9fa54819180740e8bd4cfb

https://lore.kernel.org/linux-scsi/0cc0c435-b4f2-9c76-258d-865ba50a29dd@huawei.com/

[mkp: checkpatch + two SAS_TASK_AT_INITIATOR references]

Link: https://lore.kernel.org/r/1644489804-85730-3-git-send-email-john.garry@huawei.com
Reviewed-by: Damien Le Moal &lt;damien.lemoal@wdc.com&gt;
Signed-off-by: John Garry &lt;john.garry@huawei.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: isci: Drop SAS_TASK_AT_INITIATOR check in isci_task_abort_task()</title>
<updated>2022-02-11T21:59:57Z</updated>
<author>
<name>John Garry</name>
<email>john.garry@huawei.com</email>
</author>
<published>2022-02-10T10:43:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c39d5aa457f2472c710e9e4cadb207338c0d34af'/>
<id>urn:sha1:c39d5aa457f2472c710e9e4cadb207338c0d34af</id>
<content type='text'>
In the queue path, move around when we assign sas_task-&gt;lldd_task such that
this pointer and the SAS_TASK_AT_INITIATOR flag are set atomically.  It is
also not required to clear SAS_TASK_AT_INITIATOR in isci_task_execute_task()
error path as it is also cleared immediately after in isci_task_refuse()
call.

Now the following items may be considered:

 - SAS_TASK_STATE_DONE and SAS_TASK_AT_INITIATOR are mutually exclusive
   apart from possibly when SAS_TASK_STATE_DONE is set in
   sas_scsi_find_task(), but that is after .lldd_abort_task, i.e. the
   considered callback, is called.

 - If isci_task_refuse() is called in the queue path, then
   sas_task-&gt;lldd_task and SAS_TASK_AT_INITIATOR are cleared atomically in
   isci_task_refuse().

 - In the completion path, SAS_TASK_STATE_DONE is set and
   SAS_TASK_AT_INITIATOR is cleared atomically before the
   sas_task.lldd_task is cleared later.

So in isci_task_abort_task() if SAS_TASK_STATE_DONE is not set and
sas_task.lldd_task is still set, then SAS_TASK_AT_INITIATOR must be set -
so we can drop this check on SAS_TASK_AT_INITIATOR.

[mkp: checkpatch]

Link: https://lore.kernel.org/r/1644489804-85730-2-git-send-email-john.garry@huawei.com
Signed-off-by: John Garry &lt;john.garry@huawei.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: isci: Switch to attribute groups</title>
<updated>2021-10-17T01:45:56Z</updated>
<author>
<name>Bart Van Assche</name>
<email>bvanassche@acm.org</email>
</author>
<published>2021-10-12T23:35:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=7eae6af530a6d6c3cd8370cd79580515266eb5e0'/>
<id>urn:sha1:7eae6af530a6d6c3cd8370cd79580515266eb5e0</id>
<content type='text'>
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.

Link: https://lore.kernel.org/r/20211012233558.4066756-27-bvanassche@acm.org
Signed-off-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>scsi: isci: Remove a declaration</title>
<updated>2021-10-17T01:31:44Z</updated>
<author>
<name>Bart Van Assche</name>
<email>bvanassche@acm.org</email>
</author>
<published>2021-10-07T20:46:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=814818fd4816968105b5978078cfd82f24a47d8d'/>
<id>urn:sha1:814818fd4816968105b5978078cfd82f24a47d8d</id>
<content type='text'>
There is no function with the name isci_queuecommand(). Hence remove the
declaration for isci_queuecommand().

Link: https://lore.kernel.org/r/20211007204618.2196847-12-bvanassche@acm.org
Signed-off-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>scsi: isci: Use the proper SCSI midlayer interfaces for PI</title>
<updated>2021-08-12T02:25:43Z</updated>
<author>
<name>Martin K. Petersen</name>
<email>martin.petersen@oracle.com</email>
</author>
<published>2021-08-06T04:00:20Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=4cc0096e2d54bc31ead127be59e3a2d02a187ac9'/>
<id>urn:sha1:4cc0096e2d54bc31ead127be59e3a2d02a187ac9</id>
<content type='text'>
Use scsi_prot_ref_tag() instead of scsi_get_lba() to get the reference tag
for a given I/O.

Link: https://lore.kernel.org/r/20210806040023.5355-3-martin.petersen@oracle.com
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>scsi: libsas: Add LUN number check in .slave_alloc callback</title>
<updated>2021-06-23T01:33:33Z</updated>
<author>
<name>Yufen Yu</name>
<email>yuyufen@huawei.com</email>
</author>
<published>2021-06-22T03:40:37Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=49da96d77938db21864dae6b7736b71e96c1d203'/>
<id>urn:sha1:49da96d77938db21864dae6b7736b71e96c1d203</id>
<content type='text'>
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;
</content>
</entry>
</feed>
