<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/message/fusion/mptfc.c, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/message/fusion/mptfc.c?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/message/fusion/mptfc.c?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2021-10-17T01:45:53Z</updated>
<entry>
<title>scsi: message: fusion: Switch to attribute groups</title>
<updated>2021-10-17T01:45:53Z</updated>
<author>
<name>Bart Van Assche</name>
<email>bvanassche@acm.org</email>
</author>
<published>2021-10-12T23:35:17Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=2899836f9430664d5eab9f0b08f964b975dfc230'/>
<id>urn:sha1:2899836f9430664d5eab9f0b08f964b975dfc230</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-6-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: message: fusion: Call scsi_done() directly</title>
<updated>2021-10-17T01:28:43Z</updated>
<author>
<name>Bart Van Assche</name>
<email>bvanassche@acm.org</email>
</author>
<published>2021-10-07T20:28:01Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=1ae6d167793c3b293114335f474adfc0ef5438ed'/>
<id>urn:sha1:1ae6d167793c3b293114335f474adfc0ef5438ed</id>
<content type='text'>
Conditional statements are faster than indirect calls. Hence call
scsi_done() directly.

Link: https://lore.kernel.org/r/20211007202923.2174984-7-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: message: mptfc: Switch from pci_ to dma_ API</title>
<updated>2021-06-23T03:00:01Z</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2021-06-13T07:10:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=1897c5c7597566264cff4827fd4f02e243f773ca'/>
<id>urn:sha1:1897c5c7597566264cff4827fd4f02e243f773ca</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 and has been
hand modified to replace GFP_ with a correct flag.  It has been compile
tested.

When memory is allocated in 'mptfc_GetFcDevPage0()' GFP_KERNEL can be used
because it is already used in this function and no lock is acquired in the
between.

When memory is allocated in 'mptfc_GetFcPortPage0()' and
'mptfc_GetFcPortPage1()' GFP_KERNEL can be used because they already call
'mpt_config()' which has an explicit 'might_sleep()'.

While at it, also remove some useless casting.

@@ @@
-    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/95afc589713ade2110e7812159ce3e9ab453ec18.1623568121.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: message: fusion: Remove in_interrupt() usage in mpt_config()</title>
<updated>2020-12-01T05:03:53Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2020-11-26T13:29:51Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b8a5144370bc59dbb192b8f29298920ceadc3d1e'/>
<id>urn:sha1:b8a5144370bc59dbb192b8f29298920ceadc3d1e</id>
<content type='text'>
in_interrupt() is referenced all over the place in these drivers. Most of
these references are comments which are outdated and wrong.

Aside of that in_interrupt() is deprecated as it does not provide what the
name suggests. It covers more than hard/soft interrupt servicing context
and is semantically ill defined.

&gt;From reading the mpt_config() code and the history this is clearly a debug
mechanism and should probably be replaced by might_sleep() or completely
removed because such checks are already in the subsequent functions.

Remove the in_interrupt() references and replace the usage in mpt_config()
with might_sleep().

Link: https://lore.kernel.org/r/20201126132952.2287996-14-bigeasy@linutronix.de
Cc: Sathya Prakash &lt;sathya.prakash@broadcom.com&gt;
Cc: Sreekanth Reddy &lt;sreekanth.reddy@broadcom.com&gt;
Cc: Suganath Prabu Subramani &lt;suganath-prabu.subramani@broadcom.com&gt;
Cc: MPT-FusionLinux.pdl@broadcom.com
Reviewed-by: Daniel Wagner &lt;dwagner@suse.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: mptfc: Remove unneeded cast from memory allocation</title>
<updated>2020-08-21T03:15:19Z</updated>
<author>
<name>Li Heng</name>
<email>liheng40@huawei.com</email>
</author>
<published>2020-07-29T09:19:14Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=33fff97cbdc1246d59f64614e0081e393c484d02'/>
<id>urn:sha1:33fff97cbdc1246d59f64614e0081e393c484d02</id>
<content type='text'>
Remove casting the values returned by memory allocation function.

Coccinelle emits WARNING:

./drivers/message/fusion/mptfc.c:766:17-30: WARNING: casting value returned by memory allocation function to (FCPortPage0_t *) is useless.
./drivers/message/fusion/mptfc.c:907:17-30: WARNING: casting value returned by memory allocation function to (FCPortPage1_t *) is useless.

[mkp: memset()]

Link: https://lore.kernel.org/r/1596014354-59935-1-git-send-email-liheng40@huawei.com
Signed-off-by: Li Heng &lt;liheng40@huawei.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: flip the default on use_clustering</title>
<updated>2018-12-19T04:13:12Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2018-12-13T15:17:02Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=2a3d4eb8e228061c09d5ca8bf39e7f00c2091213'/>
<id>urn:sha1:2a3d4eb8e228061c09d5ca8bf39e7f00c2091213</id>
<content type='text'>
Most SCSI drivers want to enable "clustering", that is merging of
segments so that they might span more than a single page.  Remove the
ENABLE_CLUSTERING define, and require drivers to explicitly set
DISABLE_CLUSTERING to disable this feature.

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>scsi: message: fusion: Replace GFP_ATOMIC with GFP_KERNEL</title>
<updated>2018-07-31T03:17:53Z</updated>
<author>
<name>Jia-Ju Bai</name>
<email>baijiaju1990@gmail.com</email>
</author>
<published>2018-07-27T03:47:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=508385001c09ee648c46f3d2bf5584e366007fd7'/>
<id>urn:sha1:508385001c09ee648c46f3d2bf5584e366007fd7</id>
<content type='text'>
mpt_attach() and mptfc_probe() are never called in atomic context.  They
call kzalloc() and kcalloc() with GFP_ATOMIC, which is not necessary.
GFP_ATOMIC can be replaced with GFP_KERNEL.

This is found by a static analysis tool named DCNS written by myself.

Signed-off-by: Jia-Ju Bai &lt;baijiaju1990@gmail.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: mptfc: fix spelling mistake in macro names</title>
<updated>2018-04-19T04:08:47Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2018-04-18T11:30:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=bcbba7bb54e9a7c6ed35bbd5514e0507d8c495cb'/>
<id>urn:sha1:bcbba7bb54e9a7c6ed35bbd5514e0507d8c495cb</id>
<content type='text'>
Rename macros MPI_FCPORTPAGE0_SUPPORT_SPEED_UKNOWN and
MPI_FCPORTPAGE0_CURRENT_SPEED_UKNOWN to add in missing N in UNKNOWN

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: mptfc: Do not call fc_block_scsi_eh() on host reset</title>
<updated>2017-08-25T21:21:10Z</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2017-08-25T11:56:57Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=fdad4aafe4f5ae7c8643a1509c32ce75e8bf7c6c'/>
<id>urn:sha1:fdad4aafe4f5ae7c8643a1509c32ce75e8bf7c6c</id>
<content type='text'>
When we're resetting the host any remote port states will be reset
anyway, so it's pointless to wait for dev_loss_tmo during host reset.

Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: mpt: Move scsi_remove_host() out of mptscsih_remove_host()</title>
<updated>2017-04-24T22:21:17Z</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2017-04-24T09:22:32Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=cfd2aff711aa9de301258d322a0b5a3c64010220'/>
<id>urn:sha1:cfd2aff711aa9de301258d322a0b5a3c64010220</id>
<content type='text'>
Commit c5ce0abeb628 ("scsi: sas: move scsi_remove_host call...")  moved
the call to scsi_remove_host() into sas_remove_host(), but forgot to
modify the mpt drivers.

Fixes: c5ce0abeb628 ("scsi: sas: move scsi_remove_host call into sas_remove_host")
Signed-off-by: Hannes Reinecke &lt;hare@suse.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
</feed>
