Bug 182297 - [cm] ArcNet driver fails to detect the link address - and does not work at all
[cm] ArcNet driver fails to detect the link address - and does not work at all
Status: In Progress
Product: Base System
Classification: Unclassified
Component: kern
Any Any
: Normal Affects Only Me
Assigned To: freebsd-net
Depends on:
  Show dependency treegraph
Reported: 2013-09-22 15:00 UTC by gabucino
Modified: 2013-09-23 19:10 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description gabucino 2013-09-22 15:00:00 UTC
Driver output:

> cm0 at port 0x2e0-0x2ef iomem 0xd0000-0xd07ff irq 5 on isa0
> cm0: [ITHREAD]
> cm0: link addr 0xf5 (245)

The problem is, the card's address is not 0xF5.

The detection would take place in dev/cm/smc90cx6.c (cm_attach):

>         linkaddress = GETMEM(CMMACOFF); // CMMACOFF is 1

In fact, not only the offset 1, but any offset I read is "0xF5". This
leads me to think there could be some breakage around memory handling.

> #define GETMEM(off)                                                     \
>        bus_space_read_1(rman_get_bustag((sc)->mem_res),                \
>                         rman_get_bushandle((sc)->mem_res),             \
>                         (off))

The card otherwise works fine in DOS and Linux (both can read the link
address correctly).

I also tried with another card, same model. It made no difference. Also
tried setting the card to actually have 0xf5 link address, but it still
didn't work.

How-To-Repeat: Try to use it.
Comment 1 Mark Linimon freebsd_committer 2013-09-22 23:03:01 UTC
Responsible Changed
From-To: freebsd-i386->freebsd-net

Reclassify and assign. 

Note to submitter: I haven't heard of any ArcNet cards in a long time. 
Unfortunately, you may be the only person who is in a position to debug 
and fix this.
Comment 2 gabucino 2013-09-23 18:39:38 UTC
Tried older kernels, the last release from the v5.x tree was broken too.

I can provide a test environment. Compensation will be given for the  
fix, if that's an incentive.