From: Michael Schmitz <schmitzmic@googlemail.com>
To: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Michael Schmitz <schmitzmic@googlemail.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
linux-m68k@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH] m68k/atari: EtherNEC - rewrite to use mainstream ne.c
Date: Fri, 09 Mar 2012 17:58:36 +1300 [thread overview]
Message-ID: <4F598DFC.70507@gmail.com> (raw)
In-Reply-To: <CAP=VYLqxtE4OamrdN2RXaQu_2kK5_57-x80z48JXzt+xEtQ7pw@mail.gmail.com>
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
next prev parent reply other threads:[~2012-03-09 4:58 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1327085843-6980-1-git-send-email-geert@linux-m68k.org>
2012-02-27 7:07 ` [PATCH] m68k/atari: EtherNEC - rewrite to use mainstream ne.c Michael Schmitz
2012-03-07 10:09 ` Geert Uytterhoeven
2012-03-07 18:42 ` Michael Schmitz
2012-03-09 3:11 ` Paul Gortmaker
2012-03-09 4:58 ` Michael Schmitz [this message]
2012-03-09 6:35 ` Geert Uytterhoeven
2012-03-09 13:32 ` Paul Gortmaker
2012-03-11 6:31 ` Michael Schmitz
2012-04-01 8:49 ` [PATCH] m68k/atari: EtherNEC - rewrite to use mainstream ne.c, take two Michael Schmitz
2012-04-03 22:52 ` David Miller
2012-04-04 20:46 ` Paul Gortmaker
2012-04-05 9:28 ` Geert Uytterhoeven
2012-04-05 13:24 ` Paul Gortmaker
2012-04-05 14:21 ` Geert Uytterhoeven
2014-08-09 1:09 ` Michael Schmitz
2012-04-05 22:10 ` Michael Schmitz
2012-04-06 8:28 ` Geert Uytterhoeven
2012-04-05 9:44 ` Michael Schmitz
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=4F598DFC.70507@gmail.com \
--to=schmitzmic@googlemail.com \
--cc=geert@linux-m68k.org \
--cc=linux-m68k@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=paul.gortmaker@windriver.com \
/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).