* ax88796 driver
@ 2014-04-16 23:42 Alexander Varnin
2014-04-22 1:59 ` Ben Hutchings
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Varnin @ 2014-04-16 23:42 UTC (permalink / raw)
To: netdev
Hello!
I am currently working on kernel and dealing with ax88796 driver, that has been written by Ben Dooks <ben@simtec.co.uk>. Since his address is not available anymore (says "Ben doesn't work here any more"), I want to ask help from somebody, who maybe somehow related to this driver.
I want to ask on source code, because there is some non-obvious lines.
Take a look on ax_initial_check function from ax88796.c please [1].
Here is lines 127-129 of it:
ei_outb (E8390_NODMA + E8390_PAGE1 + E8390_STOP, ioaddr + E8390_CMD);
regd = ei_inb (ioaddr + 0x0d);
ei_outb (0xff, ioaddr + 0x0d);
This is supposed to be read and write to 0xD register on PAGE 1 of AX88796. But that offset stands for "Multicast Address Register 5 ( MAR5 )" in AX88796 datasheet [2].
What is the point of doing so? That looks very like a mistake. If it is a mistake, I could make and send patch to fix it. But, please, explain why is it done?
[1] http://lxr.free-electrons.com/source/drivers/net/ethernet/8390/ax88796.c#L116
[2] http://www.digchip.com/datasheets/parts/datasheet/562/AX88796-pdf.php
--
Alexander.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ax88796 driver
2014-04-16 23:42 ax88796 driver Alexander Varnin
@ 2014-04-22 1:59 ` Ben Hutchings
2014-04-23 13:05 ` Ben Dooks
0 siblings, 1 reply; 3+ messages in thread
From: Ben Hutchings @ 2014-04-22 1:59 UTC (permalink / raw)
To: Alexander Varnin; +Cc: netdev, Ben Dooks
[-- Attachment #1: Type: text/plain, Size: 1389 bytes --]
On Thu, 2014-04-17 at 03:42 +0400, Alexander Varnin wrote:
> Hello!
>
> I am currently working on kernel and dealing with ax88796 driver, that
> has been written by Ben Dooks <ben@simtec.co.uk>. Since his address is
> not available anymore (says "Ben doesn't work here any more"), I want
> to ask help from somebody, who maybe somehow related to this driver.
I'm cc'ing Ben, but I doubt he'll want to remember this driver.
Ben.
> I want to ask on source code, because there is some non-obvious lines.
>
> Take a look on ax_initial_check function from ax88796.c please [1].
>
> Here is lines 127-129 of it:
>
> ei_outb (E8390_NODMA + E8390_PAGE1 + E8390_STOP, ioaddr + E8390_CMD);
> regd = ei_inb (ioaddr + 0x0d);
> ei_outb (0xff, ioaddr + 0x0d);
>
> This is supposed to be read and write to 0xD register on PAGE 1 of
> AX88796. But that offset stands for "Multicast Address Register 5
> ( MAR5 )" in AX88796 datasheet [2].
>
> What is the point of doing so? That looks very like a mistake. If it
> is a mistake, I could make and send patch to fix it. But, please,
> explain why is it done?
>
>
> [1] http://lxr.free-electrons.com/source/drivers/net/ethernet/8390/ax88796.c#L116
> [2] http://www.digchip.com/datasheets/parts/datasheet/562/AX88796-pdf.php
--
Ben Hutchings
Beware of programmers who carry screwdrivers. - Leonard Brandwein
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ax88796 driver
2014-04-22 1:59 ` Ben Hutchings
@ 2014-04-23 13:05 ` Ben Dooks
0 siblings, 0 replies; 3+ messages in thread
From: Ben Dooks @ 2014-04-23 13:05 UTC (permalink / raw)
To: Ben Hutchings, Alexander Varnin; +Cc: netdev, Ben Dooks
On 22/04/14 02:59, Ben Hutchings wrote:
> On Thu, 2014-04-17 at 03:42 +0400, Alexander Varnin wrote:
>> Hello!
>>
>> I am currently working on kernel and dealing with ax88796 driver, that
>> has been written by Ben Dooks <ben@simtec.co.uk>. Since his address is
>> not available anymore (says "Ben doesn't work here any more"), I want
>> to ask help from somebody, who maybe somehow related to this driver.
>
> I'm cc'ing Ben, but I doubt he'll want to remember this driver.
>
> Ben.
Hi, I really do not remember this driver as we only used this device
on a couple of projects before changing to another supplier.
>> I want to ask on source code, because there is some non-obvious lines.
>>
>> Take a look on ax_initial_check function from ax88796.c please [1].
>>
>> Here is lines 127-129 of it:
>>
>> ei_outb (E8390_NODMA + E8390_PAGE1 + E8390_STOP, ioaddr + E8390_CMD);
>> regd = ei_inb (ioaddr + 0x0d);
>> ei_outb (0xff, ioaddr + 0x0d);
>>
>> This is supposed to be read and write to 0xD register on PAGE 1 of
>> AX88796. But that offset stands for "Multicast Address Register 5
>> ( MAR5 )" in AX88796 datasheet [2].
>>
>> What is the point of doing so? That looks very like a mistake. If it
>> is a mistake, I could make and send patch to fix it. But, please,
>> explain why is it done?
>>
>>
>> [1] http://lxr.free-electrons.com/source/drivers/net/ethernet/8390/ax88796.c#L116
>> [2] http://www.digchip.com/datasheets/parts/datasheet/562/AX88796-pdf.php
Hmm, is there an actual bug here or is this something that
we think is wrong? I could have a look but I do not have any
bootable test hardware available.
--
Ben Dooks http://www.codethink.co.uk/
Senior Engineer Codethink - Providing Genius
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-04-23 13:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-16 23:42 ax88796 driver Alexander Varnin
2014-04-22 1:59 ` Ben Hutchings
2014-04-23 13:05 ` Ben Dooks
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).