Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1358964

Re: [PATCH v4 0/3] mmc: sdhci: Set DMA mask properly

From Adrian Hunter <adrian.hunter@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH v4 0/3] mmc: sdhci: Set DMA mask properly
Date 2016-03-16 14:00 +0100
Message-ID <rdjdp-Cv-19@gated-at.bofh.it> (permalink)
References <r9SMq-4VR-11@gated-at.bofh.it>
Organization Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki

Show all headers | View raw


On 07/03/16 04:07, Alexandre Courbot wrote:
> 64-bit capable devices are supposed to set their own DMA mask. Currently
> this does not happen for sdhci devices excepted for the two (sdhci-acpi
> and sdhci-pci) that define a enable_dma() hook and do it there. However
> this hook is called from several places while DMA mask is supposed to
> be set only once ; for instance the sdhci-acpi driver maintains a flag
> just to make sure the DMA mask is set only upon the first call of this
> hook.
> 
> For the vast majority of drivers that do not define a enable_dma() hook, the
> default 32-bit DMA mask is used and there is a risk of using unneeded bounce
> buffers on hosts capable of 64-bit addressing.
> 
> The first patch adds a default DMA mask setting function that is called when
> a DMA-capable host is added. It tries to set sane DMA masks according to the
> device's reported capabilities.
> 
> The addition of this function seems to make the same code in sdhci-acpi and
> sdhci-pci redundant, so it is removed from these drivers. On top of making
> this series a negative line count, it also removes one usage of the obsolete
> pci_set_dma_mask() function.
> 
> Changes since v3:
> - Unset the SDHCI_USE_64_BIT_DMA flag if setting of 64-bit mask failed
> - Carry Acked-bys
> 
> Alexandre Courbot (3):
>   mmc: sdhci: Set DMA mask when adding host
>   mmc: sdhci-acpi: Remove enable_dma() hook
>   mmc: sdhci-pci: Do not set DMA mask in enable_dma()
> 
>  drivers/mmc/host/sdhci-acpi.c     | 30 ------------------------
>  drivers/mmc/host/sdhci-pci-core.c | 15 ------------
>  drivers/mmc/host/sdhci.c          | 48 +++++++++++++++++++++++++++++++++------
>  3 files changed, 41 insertions(+), 52 deletions(-)
> 

I had a couple of questions which have been answered, so for all 3 patches:

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 0/3] mmc: sdhci: Set DMA mask properly Alexandre Courbot <acourbot@nvidia.com> - 2016-03-07 03:10 +0100
  [PATCH v4 3/3] mmc: sdhci-pci: Do not set DMA mask in enable_dma() Alexandre Courbot <acourbot@nvidia.com> - 2016-03-07 03:10 +0100
    Re: [PATCH v4 3/3] mmc: sdhci-pci: Do not set DMA mask in  enable_dma() Adrian Hunter <adrian.hunter@intel.com> - 2016-03-08 14:30 +0100
      Re: [PATCH v4 3/3] mmc: sdhci-pci: Do not set DMA mask in enable_dma() Alexandre Courbot <gnurou@gmail.com> - 2016-03-14 04:20 +0100
        Re: [PATCH v4 3/3] mmc: sdhci-pci: Do not set DMA mask in  enable_dma() Adrian Hunter <adrian.hunter@intel.com> - 2016-03-14 14:10 +0100
          Re: [PATCH v4 3/3] mmc: sdhci-pci: Do not set DMA mask in  enable_dma() Bjorn Helgaas <helgaas@kernel.org> - 2016-03-14 17:00 +0100
  Re: [PATCH v4 0/3] mmc: sdhci: Set DMA mask properly Adrian Hunter <adrian.hunter@intel.com> - 2016-03-16 14:00 +0100
  Re: [PATCH v4 0/3] mmc: sdhci: Set DMA mask properly Ulf Hansson <ulf.hansson@linaro.org> - 2016-03-16 14:10 +0100

csiph-web