]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/pcnet32.c
Merge git://git.skbuff.net/gitroot/yoshfuji/linux-2.6.14+advapi-fix/
[linux-2.6-omap-h63xx.git] / drivers / net / pcnet32.c
index 31e6dd049859ed6b1987e8c5e7598e43c137bba1..be319229f5436be46642fb782ebfc7b056f22675 100644 (file)
@@ -22,8 +22,8 @@
  *************************************************************************/
 
 #define DRV_NAME       "pcnet32"
-#define DRV_VERSION    "1.31b"
-#define DRV_RELDATE    "06.Oct.2005"
+#define DRV_VERSION    "1.31c"
+#define DRV_RELDATE    "01.Nov.2005"
 #define PFX            DRV_NAME ": "
 
 static const char *version =
@@ -262,6 +262,9 @@ static int homepna[MAX_UNITS];
  *        to allow loopback test to work unchanged.
  * v1.31b  06 Oct 2005 Don Fry changed alloc_ring to show name of device
  *        if allocation fails
+ * v1.31c  01 Nov 2005 Don Fry Allied Telesyn 2700/2701 FX are 100Mbit only.
+ *        Force 100Mbit FD if Auto (ASEL) is selected.
+ *        See Bugzilla 2669 and 4551.
  */
 
 
@@ -985,7 +988,11 @@ static void pcnet32_get_regs(struct net_device *dev, struct ethtool_regs *regs,
     *buff++ = a->read_csr(ioaddr, 114);
 
     /* read bus configuration registers */
-    for (i=0; i<36; i++) {
+    for (i=0; i<30; i++) {
+       *buff++ = a->read_bcr(ioaddr, i);
+    }
+    *buff++ = 0;       /* skip bcr30 so as not to hang 79C976 */
+    for (i=31; i<36; i++) {
        *buff++ = a->read_bcr(ioaddr, i);
     }
 
@@ -1612,12 +1619,18 @@ pcnet32_open(struct net_device *dev)
        val |= 0x10;
     lp->a.write_csr (ioaddr, 124, val);
 
-    /* Allied Telesyn AT 2700/2701 FX looses the link, so skip that */
+    /* Allied Telesyn AT 2700/2701 FX are 100Mbit only and do not negotiate */
     if (lp->pci_dev->subsystem_vendor == PCI_VENDOR_ID_AT &&
-        (lp->pci_dev->subsystem_device == PCI_SUBDEVICE_ID_AT_2700FX ||
-        lp->pci_dev->subsystem_device == PCI_SUBDEVICE_ID_AT_2701FX)) {
-       printk(KERN_DEBUG "%s: Skipping PHY selection.\n", dev->name);
-    } else {
+           (lp->pci_dev->subsystem_device == PCI_SUBDEVICE_ID_AT_2700FX ||
+            lp->pci_dev->subsystem_device == PCI_SUBDEVICE_ID_AT_2701FX)) {
+       if (lp->options & PCNET32_PORT_ASEL) {
+           lp->options = PCNET32_PORT_FD | PCNET32_PORT_100;
+           if (netif_msg_link(lp))
+               printk(KERN_DEBUG "%s: Setting 100Mb-Full Duplex.\n",
+                       dev->name);
+       }
+    }
+    {
        /*
         * 24 Jun 2004 according AMD, in order to change the PHY,
         * DANAS (or DISPM for 79C976) must be set; then select the speed,