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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F598DFC.70507@gmail.com>
Date:	Fri, 09 Mar 2012 17:58:36 +1300
From:	Michael Schmitz <schmitzmic@...glemail.com>
To:	Paul Gortmaker <paul.gortmaker@...driver.com>
CC:	Michael Schmitz <schmitzmic@...glemail.com>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	linux-m68k@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH] m68k/atari: EtherNEC - rewrite to use mainstream ne.c

Paul Gortmaker wrote:
>
>> diff --git a/drivers/net/ethernet/8390/ne.c b/drivers/net/ethernet/8390/ne.c
>> index f92ea2a..28b8781 100644
>> --- a/drivers/net/ethernet/8390/ne.c
>> +++ b/drivers/net/ethernet/8390/ne.c
>> @@ -55,6 +55,9 @@ static const char version2[] =
>>
>>  #include <asm/system.h>
>>  #include <asm/io.h>
>> +#if IS_ENABLED(CONFIG_ATARI_ETHERNEC)
>> +#include <asm/atariints.h>
>> +#endif
>>     
>
> Do you really need the #if here?  Should be avoidable.
>
>   
Looks like that one's unneeded.
>>  #include "8390.h"
>>
>> @@ -165,7 +168,8 @@ bad_clone_list[] __initdata = {
>>  #if defined(CONFIG_PLAT_MAPPI)
>>  #  define DCR_VAL 0x4b
>>  #elif defined(CONFIG_PLAT_OAKS32R)  || \
>> -   defined(CONFIG_MACH_TX49XX)
>> +   defined(CONFIG_MACH_TX49XX) || \
>> +   IS_ENABLED(CONFIG_ATARI_ETHERNEC)
>>  #  define DCR_VAL 0x48        /* 8-bit mode */
>>  #else
>>  #  define DCR_VAL 0x49
>> @@ -492,7 +496,16 @@ static int __init ne_probe1(struct net_device *dev,
>> unsigned long ioaddr)
>>
>>     /* Snarf the interrupt now.  There's no point in waiting since we cannot
>>        share and the board will usually be enabled. */
>> -    ret = request_irq(dev->irq, eip_interrupt, 0, name, dev);
>> +#if IS_ENABLED(CONFIG_ATARI_ETHERNEC)
>> +    if (MACH_IS_ATARI) {
>> +        /* Atari EtherNEC emulates the card interrupt via a timer -
>> +           this needs to be shared with the smc91C111 driver and with
>> +           a dummy handler to catch unhandled interrupts ! */
>> +        ret = request_irq(dev->irq, eip_interrupt, IRQF_SHARED, name, dev);
>> +    } else
>> +#endif
>> +        ret = request_irq(dev->irq, eip_interrupt, 0, name, dev);
>> +
>>     
>
> There has to be a cleaner way than this.  Something as simple as creating
> a platform specific 8380_IRQ_FLAGS would get rid of this ifdef'ery in
> the driver and that is with only 20s of thought invested.
>   
That would have been the alternative - would you prefer to have this 
added in 8390.h or ne.c?

Thanks,

  Michael
--
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