Re: [PATCH RFC 1/2] m68k: io_mm.h - add APNE 100 MBit support

Michael Schmitz
2021-06-07T19:59:04Z

Hi Geert,

On 7/06/21 11:15 pm, Geert Uytterhoeven wrote:
> Hi Michael,
>
> On Sun, Jun 6, 2021 at 7:54 AM Michael Schmitz <schmitzmic@gmail.com> wrote:
>> Add code to support 10 Mbit and 100 Mbit mode for APNE driver.
>>
>> A new ISA type ISA_TYPE_AG100 switches the Amiga ISA inb accessor
>> to word access as required by the 100 Mbit cards.
>>
>> Patch modified after patch "[PATCH RFC net-next] Amiga PCMCIA
>> 100 MBit card support" submitted to netdev 2018/09/16 by Alex
>> Kazik <alex@kazik.de>.
>>
>> Signed-off-by: Michael Schmitz <schmitzmic@gmail.com>
>> --- a/arch/m68k/include/asm/io_mm.h
>> +++ b/arch/m68k/include/asm/io_mm.h
>> @@ -212,13 +232,16 @@ static inline u16 __iomem *isa_mtw(unsigned long addr)
>> }
>>
>>
>> -#define isa_inb(port) in_8(isa_itb(port))
>> #define isa_inw(port) (ISA_SEX ? in_be16(isa_itw(port)) : in_le16(isa_itw(port)))
>> #define isa_inl(port) (ISA_SEX ? in_be32(isa_itl(port)) : in_le32(isa_itl(port)))
>> #define isa_outb(val,port) out_8(isa_itb(port),(val))
>> #define isa_outw(val,port) (ISA_SEX ? out_be16(isa_itw(port),(val)) : out_le16(isa_itw(port),(val)))
>> #define isa_outl(val,port) (ISA_SEX ? out_be32(isa_itl(port),(val)) : out_le32(isa_itl(port),(val)))
>>
>> +/* for APNE 100 Mbit cards - hope the APNE 100 case will be eliminated as
>> + * dead code if MULTI_ISA is not set */
>> +#define isa_inb(port) ((ISA_TYPE == ISA_TYPE_AG100) ? ((port) & 1 ? isa_inw((port) - 1) & 0xff : isa_inw(port) >> 8) : in_8(isa_itb(port))
> This fails to compile due to a missing closing parenthesis.

Sorry - looks like brown paper bag time today. (I did say 'entirely
untested'? Didn't expect such a thorough review for a first RFC patch ...)

Apologies,

Michael

>
> Gr{oetje,eeting}s,
>
> Geert
>