All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] scsi: mptbase: switch from 'pci_' to 'dma_' API
@ 2021-06-13  8:22 Christophe JAILLET
  2021-06-13  8:22 ` [PATCH 1/3] " Christophe JAILLET
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Christophe JAILLET @ 2021-06-13  8:22 UTC (permalink / raw)
  To: sathya.prakash, sreekanth.reddy, suganath-prabu.subramani
  Cc: MPT-FusionLinux.pdl, linux-scsi, linux-kernel, kernel-janitors,
	Christophe JAILLET

In order to convert this file to the dma_ API, 3 steps are proposed.

The first one is purely mechanical. All the updated memory allocations can
use GFP_KERNEL because of 'mpt_config()' calls. This function can sleep so
it sounds like a reasonable assumption to use GFP_KERNEL.

The 2nd patch may be discussed further. GFP_ATOMIC is needed because at least
one of the caller might sleep.
But if we want to avoid GFP_ATOMIC as much as possible, the 'sleepFlag' could
be passed in order to use the "right" flag. All other callers would need to
be invistigated to see if GFP_ATOMIC or GFP_KERNEL is needed.

The 3rd patch is just a clean up. When 'dma_set_mask_and_coherent' can be
used, it is less verbose than 'dma_set_mask()/dma_set_coherent_mask()'.
In this patch, look at the comment below ---, because the code looks
spurious to me, but as I know neither this hardware, nor the "1078 errata",
I'll let anyone that understand this this code to send the correct fix, if
needed.

Christophe JAILLET (3):
  scsi: mptbase: switch from 'pci_' to 'dma_' API
  scsi: mptbase: switch from 'pci_' to 'dma_' API in 'mpt_alloc_fw_memory()'
  scsi: mptbase: use 'dma_set_mask_and_coherent()' to simplify code

 drivers/message/fusion/mptbase.c | 151 +++++++++++++++++--------------
 1 file changed, 82 insertions(+), 69 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-13  8:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-13  8:22 [PATCH 0/3] scsi: mptbase: switch from 'pci_' to 'dma_' API Christophe JAILLET
2021-06-13  8:22 ` [PATCH 1/3] " Christophe JAILLET
2021-06-13  8:23 ` [PATCH 2/3] scsi: mptbase: switch from 'pci_' to 'dma_' API in 'mpt_alloc_fw_memory()' Christophe JAILLET
2021-06-13  8:23 ` [PATCH 3/3] scsi: mptbase: use 'dma_set_mask_and_coherent()' to simplify code Christophe JAILLET

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.