Re: [RFC v3] Add support for Sony PS2 OHCI

2017-11-26 Thread Fredrik Noring
Driver) for the PlayStation 2. + * + * Copyright (C) 2017 Jürgen Urban + * Copyright (C) 2017 Fredrik Noring + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation;

Re: [RFC v3] Add support for Sony PS2 OHCI

2017-11-29 Thread Fredrik Noring
Hi Alan Stern, > I did not read the whole thing in detail, but it generally looks okay. > Except, of course, that the dma-mapping.h change can't be part of this > patch. That will have to be done separately. Agreed. > What happened to the changes to ohci_run() and ohci_irq() that were in >

Re: [RFC v2] Add support for Sony PS2 OHCI

2017-11-24 Thread Fredrik Noring
at are enabled */ ints &= ohci_readl(ohci, >intrenable); +#ifdef CONFIG_SONY_PS2 + ohci_writel(ohci, OHCI_INTR_MIE, >intrdisable); +#endif + /* interrupt for some other device? */ if (ints == 0 || unlikely(ohci->rh_state == OHCI_RH_HALTED)) r

[RFC] Add support for Sony PS2 OHCI

2017-11-18 Thread Fredrik Noring
Hello USB maintainers, I'm porting kernel support for the Sony PlayStation 2 from v2.6.35 to v4.14, and a part of this effort is to port the PS2 OHCI driver. USB keyboards seem to work quite well with v4.14, but USB mass storage devices cause kernel crashes. Any help in finding the cause of this

Re: [PATCH 05/22] USB: mon: no need to check return value of debugfs_create functions

2018-05-29 Thread Fredrik Noring
Hi Greg, On Tue, May 29, 2018 at 06:51:54PM +0200, Greg Kroah-Hartman wrote: > On Tue, May 29, 2018 at 11:34:34AM -0500, Pete Zaitcev wrote: > > On Tue, 29 May 2018 17:30:50 +0200 > > Greg Kroah-Hartman wrote: > > > > > When calling debugfs functions, there is no need to ever check the > > >

Re: [RFC v3] Add support for Sony PS2 OHCI

2018-06-24 Thread Fredrik Noring
Hi Alan Stern, On Wed, Mar 14, 2018 at 04:52:13PM -0400, Alan Stern wrote: > This should not be needed; it indicates that something is wrong with > the way interrupt requests are handled on this platform. > > Are you using threaded interrupts at all? If you are, you have to > change the

Re: [RFC v3] Add support for Sony PS2 OHCI

2018-02-01 Thread Fredrik Noring
Hi Alan Stern, On Mon, Nov 27, 2017 at 10:46:55AM -0500, Alan Stern wrote: > I did not read the whole thing in detail, but it generally looks okay. > Except, of course, that the dma-mapping.h change can't be part of this > patch. That will have to be done separately. We are observing seemingly

Re: WARN_ON(irqs_disabled()) in dma_free_attrs?

2018-03-11 Thread Fredrik Noring
Hi Christoph, > The point is that you should always use a pool, period. > dma_alloc*/dma_free* are fundamentally expensive operations on my > architectures, so if you call them from a fast path you are doing > something wrong. The author's comment in commit b3476675320e "usb: dma bounce buffer

[PATCH] USB: OHCI: Fix NULL dereference in HCDs using HCD_LOCAL_MEM

2018-03-09 Thread Fredrik Noring
d+0x134/0x13c [] ret_from_kernel_thread+0x14/0x1c ---[ end trace bcdb825805eefdcc ]--- Signed-off-by: Fredrik Noring <nor...@nocrew.org> diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c @@ -446,7 +446,

Re: [RFC v3] Add support for Sony PS2 OHCI

2018-03-14 Thread Fredrik Noring
Hi Alan Stern, > > > What happened to the changes to ohci_run() and ohci_irq() that were in > > > v2 of this RFC? Did you decide they weren't needed? > > > > In v3 Jürgen Urban folded those changes into the driver functions > > > > ohci_ps2_enable(), > > ohci_ps2_disable(), > >

Re: WARN_ON(irqs_disabled()) in dma_free_attrs?

2018-03-03 Thread Fredrik Noring
Christoph, Alan, > If it is allocating / freeing this memory all the time in the hot path > it should really use a dma pool (see include/ilinux/dmapool.h). > The dma coherent APIs aren't really built for being called in the > hot path. hcd_buffer_free uses a combination of dma pools and dma

Re: WARN_ON(irqs_disabled()) in dma_free_attrs?

2018-03-04 Thread Fredrik Noring
Hi Alan Stern, > > Alan, can dma_free_coherent be delayed to a point when IRQs are enabled? > > Yes, subject to the usual concerns about not being delayed for too > long. Also, some HCDs are highly memory-constrained. I don't know if > they use this API, but if they do then delaying a free