source: patches/linux-2.6.17.13-tulip-1.patch @ cef1c09

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since cef1c09 was cef1c09, checked in by Justin Knierim <cross-lfs@…>, 18 years ago

Corrected trunk linux patches to kernel 2.6.17.13.

  • Property mode set to 100644
File size: 4.7 KB
  • drivers/net/tulip/21142.c

    Submitted By: Jim Gifford (patches at jg555 dot com)
    Date: 2005-10-29
    Initial Package Version: 2.6.14
    Origin: Grant Gundler (parisc linux)
    Upstream Status: in -mm
    Description: Make the tulip drivers follow the chipset specs
     
    diff -Naur linux-2.6.14.orig/drivers/net/tulip/21142.c linux-2.6.14/drivers/net/tulip/21142.c
    old new  
    172172                        int i;
    173173                        for (i = 0; i < tp->mtable->leafcount; i++)
    174174                                if (tp->mtable->mleaf[i].media == dev->if_port) {
    175                                         int startup = ! ((tp->chip_id == DC21143 && (tp->revision == 48 || tp->revision == 65)));
     175                                        int startup = ! ((tp->chip_id == DC21143 && tp->revision == 65));
    176176                                        tp->cur_index = i;
    177177                                        tulip_select_media(dev, startup);
    178178                                        setup_done = 1;
  • drivers/net/tulip/media.c

    diff -Naur linux-2.6.14.orig/drivers/net/tulip/media.c linux-2.6.14/drivers/net/tulip/media.c
    old new  
    4444
    4545/* MII transceiver control section.
    4646   Read and write the MII registers using software-generated serial
    47    MDIO protocol.  See the MII specifications or DP83840A data sheet
    48    for details. */
     47   MDIO protocol.
     48   See IEEE 802.3-2002.pdf (Section 2, Chapter "22.2.4 Management functions")
     49   or DP83840A data sheet for more details.
     50   */
    4951
    5052int tulip_mdio_read(struct net_device *dev, int phy_id, int location)
    5153{
     
    261263                                u16 *reset_sequence = &((u16*)(p+3))[init_length];
    262264                                int reset_length = p[2 + init_length*2];
    263265                                misc_info = reset_sequence + reset_length;
    264                                 if (startup)
     266                                if (startup) {
     267                                        int timeout = 10;       /* max 1 ms */
    265268                                        for (i = 0; i < reset_length; i++)
    266269                                                iowrite32(get_u16(&reset_sequence[i]) << 16, ioaddr + CSR15);
     270                               
     271                                        /* flush posted writes */
     272                                        ioread32(ioaddr + CSR15);
     273
     274                                        /* Sect 3.10.3 in DP83840A.pdf (p39) */
     275                                        udelay(500);
     276
     277                                        /* Section 4.2 in DP83840A.pdf (p43) */
     278                                        /* and IEEE 802.3 "22.2.4.1.1 Reset" */
     279                                        while (timeout-- &&
     280                                                (tulip_mdio_read (dev, phy_num, MII_BMCR) & BMCR_RESET))
     281                                                udelay(100);
     282                                }
    267283                                for (i = 0; i < init_length; i++)
    268284                                        iowrite32(get_u16(&init_sequence[i]) << 16, ioaddr + CSR15);
     285
     286                                ioread32(ioaddr + CSR15);       /* flush posted writes */
    269287                        } else {
    270288                                u8 *init_sequence = p + 2;
    271289                                u8 *reset_sequence = p + 3 + init_length;
    272290                                int reset_length = p[2 + init_length];
    273291                                misc_info = (u16*)(reset_sequence + reset_length);
    274292                                if (startup) {
     293                                        int timeout = 10;       /* max 1 ms */
    275294                                        iowrite32(mtable->csr12dir | 0x100, ioaddr + CSR12);
    276295                                        for (i = 0; i < reset_length; i++)
    277296                                                iowrite32(reset_sequence[i], ioaddr + CSR12);
     297
     298                                        /* flush posted writes */
     299                                        ioread32(ioaddr + CSR12);
     300
     301                                        /* Sect 3.10.3 in DP83840A.pdf (p39) */
     302                                        udelay(500);
     303
     304                                        /* Section 4.2 in DP83840A.pdf (p43) */
     305                                        /* and IEEE 802.3 "22.2.4.1.1 Reset" */
     306                                        while (timeout-- &&
     307                                                (tulip_mdio_read (dev, phy_num, MII_BMCR) & BMCR_RESET))
     308                                                udelay(100);
    278309                                }
    279310                                for (i = 0; i < init_length; i++)
    280311                                        iowrite32(init_sequence[i], ioaddr + CSR12);
     312
     313                                ioread32(ioaddr + CSR12);       /* flush posted writes */
    281314                        }
     315
    282316                        tmp_info = get_u16(&misc_info[1]);
    283317                        if (tmp_info)
    284318                                tp->advertising[phy_num] = tmp_info | 1;
  • drivers/net/tulip/tulip.h

    diff -Naur linux-2.6.14.orig/drivers/net/tulip/tulip.h linux-2.6.14/drivers/net/tulip/tulip.h
    old new  
    474474                        udelay(10);
    475475
    476476                if (!i)
    477                         printk(KERN_DEBUG "%s: tulip_stop_rxtx() failed\n",
    478                                         pci_name(tp->pdev));
     477                        printk(KERN_DEBUG "%s: tulip_stop_rxtx() failed"
     478                                        " (CSR5 0x%x CSR6 0x%x)\n",
     479                                        pci_name(tp->pdev),
     480                                        ioread32(ioaddr + CSR5),
     481                                        ioread32(ioaddr + CSR6));
    479482        }
    480483}
    481484
  • drivers/net/tulip/tulip_core.c

    diff -Naur linux-2.6.14.orig/drivers/net/tulip/tulip_core.c linux-2.6.14/drivers/net/tulip/tulip_core.c
    old new  
    2222#else
    2323#define DRV_VERSION     "1.1.13"
    2424#endif
    25 #define DRV_RELDATE     "May 11, 2002"
     25#define DRV_RELDATE     "December 15, 2004"
    2626
    2727
    2828#include <linux/module.h>
     
    148148        HAS_MII | HAS_MEDIA_TABLE | CSR12_IN_SROM | HAS_PCI_MWI, tulip_timer },
    149149
    150150  /* DC21142, DC21143 */
    151   { "Digital DS21143 Tulip", 128, 0x0801fbff,
     151  { "Digital DS21142/DS21143 Tulip", 128, 0x0801fbff,
    152152        HAS_MII | HAS_MEDIA_TABLE | ALWAYS_CHECK_MII | HAS_ACPI | HAS_NWAY
    153153        | HAS_INTR_MITIGATION | HAS_PCI_MWI, t21142_timer },
    154154
Note: See TracBrowser for help on using the repository browser.