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


Groups > linux.kernel > #1208151

Re: [PATCH v5 1/2] usb: make xhci platform driver use 64 bit or 32 bit DMA

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: [PATCH v5 1/2] usb: make xhci platform driver use 64 bit or 32 bit DMA
Date 2015-08-15 22:10 +0200
Message-ID <pXPWa-3m2-17@gated-at.bofh.it> (permalink)
References <pV2mR-2q5-1@gated-at.bofh.it> <pV8BY-31i-3@gated-at.bofh.it> <pVj4m-19X-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Saturday 08 August 2015 13:31:02 Duc Dang wrote:
> >
> > If we know that pdev->dev.dma_mask will always be initialised at this
> > point, then the above change is fine.  If not, it's introducing a
> > regression - dma_set_mask_and_coherent() will fail if pdev->dev.dma_mask
> > is NULL (depending on the architectures implementation of dma_set_mask()).
> >
> > Prefixing the above change with the two lines I mention above would
> > ensure equivalent behaviour.  Even if we do want to get rid of this,
> > I'd advise to do it as a separate patch after this change, which can
> > be independently reverted if there's problems with its removal.
> >
> Hi Russell,
> 
> I will add the 2 lines you mentioned back to next version of the
> patch. It is safer to do it that way as I do not see
> pdev->dev.dma_mask gets initialized before the call
> dma_set_mask_and_coherent  inside this xhci_plat.c file.

It would be good to add a WARN_ON() to the case where dma_mask
is a NULL pointer at the least. That way, we will at least
find out if there are some broken platforms that do not correctly
initialize the mask pointer.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


Thread

[PATCH v4 2/2] usb: Add support for ACPI identification to xhci-platform Duc Dang <dhdang@apm.com> - 2015-08-08 03:10 +0200
  Re: [PATCH v4 2/2] usb: Add support for ACPI identification to  xhci-platform Greg KH <gregkh@linuxfoundation.org> - 2015-08-08 03:30 +0200
    Re: [PATCH v4 2/2] usb: Add support for ACPI identification to xhci-platform Duc Dang <dhdang@apm.com> - 2015-08-08 04:50 +0200
      [PATCH v5 1/2] usb: make xhci platform driver use 64 bit or 32 bit DMA Duc Dang <dhdang@apm.com> - 2015-08-08 05:20 +0200
        [PATCH v5 2/2] usb: Add support for ACPI identification to xhci-platform Duc Dang <dhdang@apm.com> - 2015-08-08 05:20 +0200
        Re: [PATCH v5 1/2] usb: make xhci platform driver use 64 bit or 32  bit DMA Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-08-08 11:30 +0200
          Re: [PATCH v5 1/2] usb: make xhci platform driver use 64 bit or 32  bit DMA Duc Dang <dhdang@apm.com> - 2015-08-08 22:40 +0200
            Re: [PATCH v5 1/2] usb: make xhci platform driver use 64 bit or 32 bit DMA Arnd Bergmann <arnd@arndb.de> - 2015-08-15 22:10 +0200
          [PATCH v6 1/2] usb: make xhci platform driver use 64 bit or 32 bit DMA Duc Dang <dhdang@apm.com> - 2015-08-10 09:40 +0200
            [PATCH v6 2/2] usb: Add support for ACPI identification to xhci-platform Duc Dang <dhdang@apm.com> - 2015-08-10 09:40 +0200
    Re: [PATCH v4 2/2] usb: Add support for ACPI identification to xhci-platform Javier Martinez Canillas <javier@dowhile0.org> - 2015-08-08 07:50 +0200
      Re: [PATCH v4 2/2] usb: Add support for ACPI identification to  xhci-platform Greg KH <gregkh@linuxfoundation.org> - 2015-08-08 17:40 +0200
        Re: [PATCH v4 2/2] usb: Add support for ACPI identification to xhci-platform Duc Dang <dhdang@apm.com> - 2015-08-08 18:50 +0200
        Re: [PATCH v4 2/2] usb: Add support for ACPI identification to xhci-platform Javier Martinez Canillas <javier@dowhile0.org> - 2015-08-08 23:10 +0200

csiph-web