<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/scsi/elx/efct, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/scsi/elx/efct?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/scsi/elx/efct?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-05-20T00:16:27Z</updated>
<entry>
<title>scsi: elx: efct: Remove NULL check after calling container_of()</title>
<updated>2022-05-20T00:16:27Z</updated>
<author>
<name>Haowen Bai</name>
<email>baihaowen@meizu.com</email>
</author>
<published>2022-05-17T01:25:36Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d627660c22b51121262c03dfa1a51bf54361f5a9'/>
<id>urn:sha1:d627660c22b51121262c03dfa1a51bf54361f5a9</id>
<content type='text'>
container_of() will never return NULL.

Link: https://lore.kernel.org/r/1652750737-22673-1-git-send-email-baihaowen@meizu.com
Signed-off-by: Haowen Bai &lt;baihaowen@meizu.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: elx: efct: Remove redundant memset() statement</title>
<updated>2022-05-20T00:16:26Z</updated>
<author>
<name>Harshit Mogalapalli</name>
<email>harshit.m.mogalapalli@oracle.com</email>
</author>
<published>2022-05-05T14:36:57Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e79aaa9cc02dd39061eb4e2c7d156532a31da975'/>
<id>urn:sha1:e79aaa9cc02dd39061eb4e2c7d156532a31da975</id>
<content type='text'>
As memset() of bmbx is immediately followed by a memcpy() where bmbx is the
destination, the memset() is redundant.

Link: https://lore.kernel.org/r/20220505143703.45441-1-harshit.m.mogalapalli@oracle.com
Signed-off-by: Harshit Mogalapalli &lt;harshit.m.mogalapalli@oracle.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: elx: efct: Remove unnecessary memset() in efct_io()</title>
<updated>2022-04-26T03:28:25Z</updated>
<author>
<name>Wan Jiabing</name>
<email>wanjiabing@vivo.com</email>
</author>
<published>2022-03-18T14:52:20Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=507bd398a056c08d5618450db86bad69b02dde6b'/>
<id>urn:sha1:507bd398a056c08d5618450db86bad69b02dde6b</id>
<content type='text'>
io-&gt;sgl is allocated by kzalloc(). The memory is set to zero.
It is unnecessary to call memset again.

Link: https://lore.kernel.org/r/20220318145230.1031-1-wanjiabing@vivo.com
Signed-off-by: Wan Jiabing &lt;wanjiabing@vivo.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: efct: Remove useless DMA-32 fallback configuration</title>
<updated>2022-01-10T15:37:02Z</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2022-01-09T18:57:04Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=1aa7d9799e85addc29c06ece99bf1eae1ef9198f'/>
<id>urn:sha1:1aa7d9799e85addc29c06ece99bf1eae1ef9198f</id>
<content type='text'>
As stated in [1], dma_set_mask() with a 64-bit mask never fails if
dev-&gt;dma_mask is non-NULL.  So, if it fails, the 32 bits case will also
fail for the same reason.

Simplify code and remove some dead code accordingly.

While at it, return the error code returned by dma_set_mask_and_coherent()
instead of -1.

[1]: https://lkml.org/lkml/2021/6/7/398

Link: https://lore.kernel.org/r/958bcb2a6e86344c14f38369e8e7079615a2b0e3.1641754613.git.christophe.jaillet@wanadoo.fr
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: efct: Don't pass GFP_DMA to dma_alloc_coherent()</title>
<updated>2021-12-17T03:52:29Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2021-12-14T16:36:05Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=efac162a4e4dc4cebcc658e02676821ca834b56c'/>
<id>urn:sha1:efac162a4e4dc4cebcc658e02676821ca834b56c</id>
<content type='text'>
dma_alloc_coherent() ignores the zone specifiers so this is pointless and
confusing.

Link: https://lore.kernel.org/r/20211214163605.416288-1-hch@lst.de
Reviewed-by: James Smart &lt;jsmart2021@gmail.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>Merge branch '5.15/scsi-fixes' into 5.16/scsi-staging</title>
<updated>2021-10-12T15:58:12Z</updated>
<author>
<name>Martin K. Petersen</name>
<email>martin.petersen@oracle.com</email>
</author>
<published>2021-10-12T15:58:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=ec65e6beb02e09e34f3811dd85f7247da35edafc'/>
<id>urn:sha1:ec65e6beb02e09e34f3811dd85f7247da35edafc</id>
<content type='text'>
Merge the 5.15/scsi-fixes branch into the staging tree to resolve UFS
conflict reported by sfr.

Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: elx: efct: Delete stray unlock statement</title>
<updated>2021-10-05T03:33:31Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2021-10-04T10:38:51Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a013c71c6315d6e9d6364d12251b98c75c9a2861'/>
<id>urn:sha1:a013c71c6315d6e9d6364d12251b98c75c9a2861</id>
<content type='text'>
It's not holding the lock at this stage and the IRQ "flags" are not correct
so it would restore something bogus. Delete the unlock statement.

Link: https://lore.kernel.org/r/20211004103851.GE25015@kili
Fixes: 3e6414003bf9 ("scsi: elx: efct: SCSI I/O handling routines")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: elx: efct: Switch from 'pci_' to 'dma_' API</title>
<updated>2021-09-29T03:39:23Z</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2021-08-22T11:55:33Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=ca4ff9e751eb9c6371813ca9cc00c45444048088'/>
<id>urn:sha1:ca4ff9e751eb9c6371813ca9cc00c45444048088</id>
<content type='text'>
The wrappers in include/linux/pci-dma-compat.h should go away.

The patch has been generated with the coccinelle script below.

It has been hand modified to use 'dma_set_mask_and_coherent()' instead of
'pci_set_dma_mask()/pci_set_consistent_dma_mask()' when applicable.
This is less verbose.

It has been compile tested.

@@
@@
-    PCI_DMA_BIDIRECTIONAL
+    DMA_BIDIRECTIONAL

@@
@@
-    PCI_DMA_TODEVICE
+    DMA_TO_DEVICE

@@
@@
-    PCI_DMA_FROMDEVICE
+    DMA_FROM_DEVICE

@@
@@
-    PCI_DMA_NONE
+    DMA_NONE

@@
expression e1, e2, e3;
@@
-    pci_alloc_consistent(e1, e2, e3)
+    dma_alloc_coherent(&amp;e1-&gt;dev, e2, e3, GFP_)

@@
expression e1, e2, e3;
@@
-    pci_zalloc_consistent(e1, e2, e3)
+    dma_alloc_coherent(&amp;e1-&gt;dev, e2, e3, GFP_)

@@
expression e1, e2, e3, e4;
@@
-    pci_free_consistent(e1, e2, e3, e4)
+    dma_free_coherent(&amp;e1-&gt;dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_map_single(e1, e2, e3, e4)
+    dma_map_single(&amp;e1-&gt;dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_unmap_single(e1, e2, e3, e4)
+    dma_unmap_single(&amp;e1-&gt;dev, e2, e3, e4)

@@
expression e1, e2, e3, e4, e5;
@@
-    pci_map_page(e1, e2, e3, e4, e5)
+    dma_map_page(&amp;e1-&gt;dev, e2, e3, e4, e5)

@@
expression e1, e2, e3, e4;
@@
-    pci_unmap_page(e1, e2, e3, e4)
+    dma_unmap_page(&amp;e1-&gt;dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_map_sg(e1, e2, e3, e4)
+    dma_map_sg(&amp;e1-&gt;dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_unmap_sg(e1, e2, e3, e4)
+    dma_unmap_sg(&amp;e1-&gt;dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_single_for_cpu(e1, e2, e3, e4)
+    dma_sync_single_for_cpu(&amp;e1-&gt;dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_single_for_device(e1, e2, e3, e4)
+    dma_sync_single_for_device(&amp;e1-&gt;dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_sg_for_cpu(e1, e2, e3, e4)
+    dma_sync_sg_for_cpu(&amp;e1-&gt;dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_sg_for_device(e1, e2, e3, e4)
+    dma_sync_sg_for_device(&amp;e1-&gt;dev, e2, e3, e4)

@@
expression e1, e2;
@@
-    pci_dma_mapping_error(e1, e2)
+    dma_mapping_error(&amp;e1-&gt;dev, e2)

@@
expression e1, e2;
@@
-    pci_set_dma_mask(e1, e2)
+    dma_set_mask(&amp;e1-&gt;dev, e2)

@@
expression e1, e2;
@@
-    pci_set_consistent_dma_mask(e1, e2)
+    dma_set_coherent_mask(&amp;e1-&gt;dev, e2)

Link: https://lore.kernel.org/r/3899b1ed4abac581c30845d82f33ec6df8b38976.1629633207.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: efct: Decrease area under spinlock</title>
<updated>2021-09-22T04:04:56Z</updated>
<author>
<name>Dmitry Bogdanov</name>
<email>d.bogdanov@yadro.com</email>
</author>
<published>2021-09-14T10:55:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e76b7c5e25a1fa818bb3e727873a899cc89f5196'/>
<id>urn:sha1:e76b7c5e25a1fa818bb3e727873a899cc89f5196</id>
<content type='text'>
Under the session level spinlock node-&gt;active_ios_lock in
efct_scsi_io_alloc() we are taking another spinlock for the port.  This
leads to contention between sessions and even between I/Os in the same
session.

Reduce the locked region to active_ios list for which active_ios_lock is
intended. Spinlock CPU usage decreases from 18% down to 13%. IOPS are
increased from 220 kIOPS to 264 kIOPS for one LUN.

Link: https://lore.kernel.org/r/20210914105539.6942-4-d.bogdanov@yadro.com
Reviewed-by: Roman Bolshakov &lt;r.bolshakov@yadro.com&gt;
Reviewed-by: Ram Vegesna &lt;ram.vegesna@broadcom.com&gt;
Signed-off-by: Dmitry Bogdanov &lt;d.bogdanov@yadro.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: elx: efct: Do not hold lock while calling fc_vport_terminate()</title>
<updated>2021-09-14T02:15:46Z</updated>
<author>
<name>James Smart</name>
<email>jsmart2021@gmail.com</email>
</author>
<published>2021-09-07T16:52:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=450907424d9ebcc28fab42a065c3cddce49ee97d'/>
<id>urn:sha1:450907424d9ebcc28fab42a065c3cddce49ee97d</id>
<content type='text'>
Smatch checker reported the following error:

  drivers/base/power/sysfs.c:833 dpm_sysfs_remove()
  warn: sleeping in atomic context

With a calling sequence of:

  efct_lio_npiv_drop_nport() &lt;- disables preempt
  -&gt; fc_vport_terminate()
     -&gt; device_del()
        -&gt; dpm_sysfs_remove()

Issue is efct_lio_npiv_drop_nport() is making the fc_vport_terminate() call
while holding a lock w/ ipl raised.

It is unnecessary to hold the lock over this call, shift where the lock is
taken.

Link: https://lore.kernel.org/r/20210907165225.10821-1-jsmart2021@gmail.com
Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Co-developed-by: Ram Vegesna &lt;ram.vegesna@broadcom.com&gt;
Signed-off-by: Ram Vegesna &lt;ram.vegesna@broadcom.com&gt;
Signed-off-by: James Smart &lt;jsmart2021@gmail.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
</feed>
