I sent this email originally to the familiar mailing list, but I think
that it should be sent to this list.
PS. I don't think the patch code I have pasted below is the full code.

---------------------------------

Hi all,

Will the next release of Familiar have the patch for the *Socket*
Ruggerized 100/10 Ethernet Card Compact Flash included in it?

I think the patch is this (taken from
http://www.mail-archive.com/[EMAIL PROTECTED]/msg00051.html
).

If not, then is there a way I could persuade someone kindly to include
it?  :) 

Best regards, Simon.

Index: drivers/net/pcmcia/axnet_cs.c
===================================================================
--- drivers/net/pcmcia/axnet_cs.c       (revision 332)
+++ drivers/net/pcmcia/axnet_cs.c       (working copy)
@@ -13,6 +13,10 @@
 
     axnet_cs.c 1.28 2002/06/29 06:27:37
 
+    Changelog:
+
+    Todd Blumer                : added PHY bug workaround for AX88790
+
     The network driver code is based on Donald Becker's NE2000 code:
 
     Written 1992,1993 by Donald Becker.
@@ -59,6 +63,18 @@
 #define AXNET_START_PG 0x40    /* First page of TX buffer */
 #define AXNET_STOP_PG  0x80    /* Last page +1 of RX ring */
 
+#define AXNET_PHY_MR0          0
+#define AXNET_MR0_SW_RESET     (1<<15)
+#define AXNET_MR0_LOOPBACK     (1<<14)
+#define AXNET_MR0_SPEED100     (1<<13)
+#define AXNET_MR0_NWAY_ENA     (1<<12)
+#define AXNET_MR0_PWRDN                (1<<11)
+#define AXNET_MR0_ISOLATE      (1<<10)
+#define AXNET_MR0_REDONWAY     (1<<9)
+#define AXNET_MR0_FULL_DUP     (1<<8)
+#define AXNET_MR0_COLTST       (1<<7)
+/* remaining bits are reserved */
+
 #define AXNET_RDC_TIMEOUT 0x02 /* Max wait in jiffies for Tx RDC */
 
 #define IS_AX88190     0x0001
@@ -439,6 +455,22 @@
     }
 
     info->phy_id = (i < 32) ? i : -1;
+    if ((info->flags & IS_AX88790) && (info->phy_id != -1)) {
+       int data;
+       /*
+        * The AX88790L has a bug in the auto-negotiation (AN). A work-around
+        * is to turn off the phy, wait 2.5 secs, then re-enable AN. Once this
+        * action is taken, AN works fine.
+        *
+        * Note: this chip is in the Socket Rugged CF Ethernet card
+        */
+       data = mdio_read(dev->base_addr+ AXNET_MII_EEP, info->phy_id, 
AXNET_PHY_MR0);
+       mdio_write(dev->base_addr + AXNET_MII_EEP,
+           info->phy_id, AXNET_PHY_MR0, data | AXNET_MR0_PWRDN );
+       mdelay(2500);
+       mdio_write(dev->base_addr + AXNET_MII_EEP,
+           info->phy_id, AXNET_PHY_MR0, data | AXNET_MR0_REDONWAY | 
AXNET_MR0_NWAY_ENA);
+    }
     link->dev = &info->node;
     link->state &= ~DEV_CONFIG_PENDING;
     SET_NETDEV_DEV(dev, &handle_to_dev(handle));
@@ -852,6 +884,7 @@
        PCMCIA_DEVICE_MANF_CARD(0x026f, 0x0309),
        PCMCIA_DEVICE_MANF_CARD(0x0274, 0x1106),
        PCMCIA_DEVICE_MANF_CARD(0x8a01, 0xc1ab),
+       PCMCIA_DEVICE_MANF_CARD(0x0104, 0x02d2), /* "Socket", "CF 10/100 
Ethernet Card", "Revision B", "05/11/06" */
        PCMCIA_DEVICE_PROD_ID124("Fast Ethernet", "16-bit PC Card", "AX88190", 
0xb4be14e3, 0x9a12eb6a, 0xab9be5ef),
        PCMCIA_DEVICE_PROD_ID12("ASIX", "AX88190", 0x0959823b, 0xab9be5ef),
        PCMCIA_DEVICE_PROD_ID12("Billionton", "LNA-100B", 0x552ab682, 
0xbc3b87e1),


_______________________________________________
Hx4700-port mailing list
[email protected]
https://www.handhelds.org/mailman/listinfo/hx4700-port

Reply via email to