lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 23 Oct 2013 13:33:34 -0500
From:	Felipe Balbi <balbi@...com>
To:	David Cohen <david.a.cohen@...ux.intel.com>
CC:	<balbi@...com>, Alexander Shiyan <shc_work@...l.ru>,
	<gregkh@...uxfoundation.org>, <jslaby@...e.cz>,
	<ning.li@...el.com>, <ivan.gorinov@...el.com>,
	<linux-kernel@...r.kernel.org>, <linux-serial@...r.kernel.org>
Subject: Re: [PATCH 2/2] mrst_max3110: fix SPI UART interrupt parameters

Hi,

On Wed, Oct 23, 2013 at 11:33:45AM -0700, David Cohen wrote:
> On 10/23/2013 11:21 AM, Felipe Balbi wrote:
> >Hi,
> >
> >On Wed, Oct 23, 2013 at 11:10:48AM -0700, David Cohen wrote:
> >>>My idea is always use threaded irq and passing flags into request.
> >>>Like as:
> >>>unsigned long flags = res->flags & IORESOURCE_BITS;
> >>>...
> >>>request_threaded_irq(max->irq, serial_m3110_irq, IRQF_ONESHOT | flags, "max3110", max);
> >>
> >>
> >>Oh, maybe we were talking about different things afterall :)
> >>The reason this struct plat_max3110 was created is to allow platform
> >>code (located under arch/x86/platform/intel-mid/device_libs/) to define
> >>the irq edge type.
> >>When I saw your comment I though you were referring to struct resource
> >>(which has IORESOURCE_IRQ_* flags). But unlike platform_device,
> >>spi_device has no struct resource * to replace the need of struct
> >>plat_max3110.
> >>
> >>OTOH your suggestion can replace this piece of code:
> >>
> >>@@ -68,6 +69,7 @@ struct uart_max3110 {
> >>         u8 clock;
> >>         u8 parity, word_7bits;
> >>         u16 irq;
> >>+       u16 irq_edge_triggered;
> >
> >max3110 is already edge triggered:
> >
> >495                 ret = request_irq(max->irq, serial_m3110_irq,
> >496                                 IRQ_TYPE_EDGE_FALLING, "max3110", max);
> 
> Yeah. But in Merrifield case (at least the reference board used now)
> it's not edge triggered. I need this driver to support this situation
> prior to send mrst_max3110 platform code for it.

got it. Then why don't you use irq_set_irq_type() from platform code and
change that request_irq() into:

ret = request_threaded_irq(max->irq, NULL, serial_m3110_irq,
	IRQF_ONESHOT, "max3110", max);

if you call irq_set_irq_type() correctly, driver wouldn't need to know
the IRQ type.

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ