linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Geoff Levand <geoff@infradead.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
	Jaroslav Kysela <perex@perex.cz>,
	Alan Stern <stern@rowland.harvard.edu>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	linux-usb@vger.kernel.org
Subject: powerpc/ps3: Set driver coherent_dma_mask
Date: Thu, 19 Jul 2018 08:46:45 +0200	[thread overview]
Message-ID: <s5hin5b67u2.wl-tiwai@suse.de> (raw)

On Thu, 19 Jul 2018 00:08:33 +0200,
Geoff Levand wrote:
> 
> Set the coherent_dma_mask for the PS3 ehci, ohci, and snd devices.
> 
> Silences WARN_ON_ONCE messages emitted by the dma_alloc_attrs() routine.
> 
> Reported-by: Fredrik Noring <noring@nocrew.org>
> Signed-off-by: Geoff Levand <geoff@infradead.org>

For sound bits,
  Reviewed-by: Takashi Iwai <tiwai@suse.de>


thanks,

Takashi

> ---
> Hi Michael,
> 
> This just silences some warnings.  Can you take it through the powerpc
> tree?
> 
> -Geoff
> 
> 
>  drivers/usb/host/ehci-ps3.c | 6 ++++--
>  drivers/usb/host/ohci-ps3.c | 6 ++++--
>  sound/ppc/snd_ps3.c         | 5 +++++
>  3 files changed, 13 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/host/ehci-ps3.c b/drivers/usb/host/ehci-ps3.c
> index 8c733492d8fe..454d8c624a3f 100644
> --- a/drivers/usb/host/ehci-ps3.c
> +++ b/drivers/usb/host/ehci-ps3.c
> @@ -86,7 +86,7 @@ static int ps3_ehci_probe(struct ps3_system_bus_device *dev)
>  	int result;
>  	struct usb_hcd *hcd;
>  	unsigned int virq;
> -	static u64 dummy_mask = DMA_BIT_MASK(32);
> +	static u64 dummy_mask;
>  
>  	if (usb_disabled()) {
>  		result = -ENODEV;
> @@ -131,7 +131,9 @@ static int ps3_ehci_probe(struct ps3_system_bus_device *dev)
>  		goto fail_irq;
>  	}
>  
> -	dev->core.dma_mask = &dummy_mask; /* FIXME: for improper usb code */
> +	dummy_mask = DMA_BIT_MASK(32);
> +	dev->core.dma_mask = &dummy_mask;
> +	dma_set_coherent_mask(&dev->core, dummy_mask);
>  
>  	hcd = usb_create_hcd(&ps3_ehci_hc_driver, &dev->core, dev_name(&dev->core));
>  
> diff --git a/drivers/usb/host/ohci-ps3.c b/drivers/usb/host/ohci-ps3.c
> index 20a23d795adf..395f9d3bc849 100644
> --- a/drivers/usb/host/ohci-ps3.c
> +++ b/drivers/usb/host/ohci-ps3.c
> @@ -69,7 +69,7 @@ static int ps3_ohci_probe(struct ps3_system_bus_device *dev)
>  	int result;
>  	struct usb_hcd *hcd;
>  	unsigned int virq;
> -	static u64 dummy_mask = DMA_BIT_MASK(32);
> +	static u64 dummy_mask;
>  
>  	if (usb_disabled()) {
>  		result = -ENODEV;
> @@ -115,7 +115,9 @@ static int ps3_ohci_probe(struct ps3_system_bus_device *dev)
>  		goto fail_irq;
>  	}
>  
> -	dev->core.dma_mask = &dummy_mask; /* FIXME: for improper usb code */
> +	dummy_mask = DMA_BIT_MASK(32);
> +	dev->core.dma_mask = &dummy_mask;
> +	dma_set_coherent_mask(&dev->core, dummy_mask);
>  
>  	hcd = usb_create_hcd(&ps3_ohci_hc_driver, &dev->core, dev_name(&dev->core));
>  
> diff --git a/sound/ppc/snd_ps3.c b/sound/ppc/snd_ps3.c
> index 36f34f434ecb..abe031c9d592 100644
> --- a/sound/ppc/snd_ps3.c
> +++ b/sound/ppc/snd_ps3.c
> @@ -930,6 +930,7 @@ static int snd_ps3_driver_probe(struct ps3_system_bus_device *dev)
>  {
>  	int i, ret;
>  	u64 lpar_addr, lpar_size;
> +	static u64 dummy_mask;
>  
>  	if (WARN_ON(!firmware_has_feature(FW_FEATURE_PS3_LV1)))
>  		return -ENODEV;
> @@ -970,6 +971,10 @@ static int snd_ps3_driver_probe(struct ps3_system_bus_device *dev)
>  		goto clean_mmio;
>  	}
>  
> +	dummy_mask = DMA_BIT_MASK(32);
> +	dev->core.dma_mask = &dummy_mask;
> +	dma_set_coherent_mask(&dev->core, dummy_mask);
> +
>  	snd_ps3_audio_set_base_addr(dev->d_region->bus_addr);
>  
>  	/* CONFIG_SND_PS3_DEFAULT_START_DELAY */
> -- 
> 2.14.1
> 
>
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2018-07-19  6:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-19  6:46 Takashi Iwai [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-07-23 15:11 powerpc/ps3: Set driver coherent_dma_mask Michael Ellerman
2018-07-19 15:00 Alan Stern
2018-07-19 14:53 Geoff Levand
2018-07-19 14:33 Alan Stern
2018-07-19 11:28 Michael Ellerman
2018-07-19  6:55 Greg Kroah-Hartman
2018-07-19  6:54 Greg Kroah-Hartman
2018-07-18 22:08 Geoff Levand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hin5b67u2.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=geoff@infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=perex@perex.cz \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).