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:	Tue, 26 May 2009 13:24:57 +0100
From:	"Hennerich, Michael" <Michael.Hennerich@...log.com>
To:	"David Brownell" <david-b@...bell.net>,
	"Baruch Siach" <baruch@...s.co.il>
CC:	"Mike Frysinger" <vapier@...too.org>, <netdev@...r.kernel.org>,
	"Bryan Wu" <cooloney@...nel.org>
Subject: RE: [PATCH] netdev: enc28j60: use IRQF_TRIGGER_FALLING for IRQ by default



>From: David Brownell [mailto:david-b@...bell.net]
>Sent: Tuesday, May 26, 2009 1:24 PM
>On Tuesday 26 May 2009, Baruch Siach wrote:
>> Hi Michael,
>>
>> On Tue, May 26, 2009 at 06:16:47AM -0400, Mike Frysinger wrote:
>> > From: Michael Hennerich <michael.hennerich@...log.com>
>> >
>> > Rather than have the default IRQ flags not be usable, use the
logical
>> > settings which match the hardware.  Since the part is /INT, it
makes sense
>> > to have it default to a falling trigger.  If a board truly needs
something
>> > different, it still can tweak the defaults in its own board file.
>>
>> You revert David Brownell's commit here
>> (c7b7b042068cd12b8b155722d24686f70b88ced1). Added to CC.
>
>Right ... the appended patch will *undo* the setting
>established in the board init code via set_irq_type().
>
>Moreover, it completely prevents working on systems which
>only support "both edges" triggering.
>
>So I'd NAK this, on the grounds that it causes severe
>breakage.

David,

The comment block above request_irq states:

>> >  	 * level triggers won't currently work.

And I guess it's because IRQ handling is deferred to a work queue.
I wonder how IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING will work in
such a case.
Since the ENC28J60 /INT will de-assert during the work handler executes,
thus causing a second spurious interrupt.

-Michael 


>
>
>
>> > Signed-off-by: Michael Hennerich <michael.hennerich@...log.com>
>> > Signed-off-by: Mike Frysinger <vapier@...too.org>
>> > Signed-off-by: Bryan Wu <cooloney@...nel.org>
>> > CC: Baruch Siach <baruch@...s.co.il>
>> > ---
>> >  drivers/net/enc28j60.c |    2 +-
>> >  1 files changed, 1 insertions(+), 1 deletions(-)
>> >
>> > diff --git a/drivers/net/enc28j60.c b/drivers/net/enc28j60.c
>> > index 36cb6e9..fbe2012 100644
>> > --- a/drivers/net/enc28j60.c
>> > +++ b/drivers/net/enc28j60.c
>> > @@ -1562,7 +1562,7 @@ static int __devinit enc28j60_probe(struct
spi_device *spi)
>> >  	/* Board setup must set the relevant edge trigger type;
>> >  	 * level triggers won't currently work.
>> >  	 */
>> > -	ret = request_irq(spi->irq, enc28j60_irq, 0, DRV_NAME, priv);
>> > +	ret = request_irq(spi->irq, enc28j60_irq, IRQF_TRIGGER_FALLING,
DRV_NAME, priv);
>> >  	if (ret < 0) {
>> >  		if (netif_msg_probe(priv))
>> >  			dev_err(&spi->dev, DRV_NAME ": request irq %d
failed "
>>
>> baruch
>>
>> --
>>                                                      ~. .~   Tk Open
Systems
>>
=}------------------------------------------------ooO--U--Ooo-----------
-{=
>>    - baruch@...s.co.il - tel: +972.2.679.5364, http://www.tkos.co.il
-
>>
>>
>
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ