Netboot Mailing List (by thread)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: 3c90x drivers



Title: RE: 3c90x drivers

In a way...yes. I'm no coder, so I can only supply you with what deals with this problem in the linuxdriver that confronted me with this problem when these new bioses appeared and my nic stopped working ;-)

--> snippet from 3C59x.c

/* Power-up the card. */
        pcibios_read_config_word(pci_bus, pci_device_fn,0xe0, &pwr_cmd);
        if (pwr_cmd & 0x3) {
                /* Save the ioaddr and IRQ info! */
                printk(KERN_INFO "  A 3Com network adapter is powered down!"
                           "  Setting the power state %4.4x->%4.4x.\n",pwr_cmd, pwr_cmd & ~3);
                pcibios_write_config_word(pci_bus, pci_device_fn,0xe0, pwr_cmd & ~3);
                printk(KERN_INFO "  Setting the IRQ to %d, IOADDR to %#lx.\n",irq, ioaddr);
                pcibios_write_config_byte(pci_bus, pci_device_fn,PCI_INTERRUPT_LINE, irq);
                pcibios_write_config_dword(pci_bus, pci_device_fn,PCI_BASE_ADDRESS_0, ioaddr);
                                }

        if (ioaddr == 0) {
                printk(KERN_WARNING "  A 3Com network adapter has been found, "
                           "however it has not been assigned an I/O address.\n"
                           "  You may need to power-cycle the machine for this device to work!\n");
                        continue;
                                }

        if (check_region(ioaddr, pci_tbl[chip_idx].io_size))
                                continue;

        /* Activate the card. */
        pcibios_read_config_word(pci_bus, pci_device_fn, PCI_COMMAND, &pci_command);
        new_command = pci_command | PCI_COMMAND_MASTER|PCI_COMMAND_IO;
        if (pci_command != new_command) {
                printk(KERN_INFO "  The PCI BIOS has not enabled the device "
                           "at %d/%d. Updating PCI command %4.4x->%4.4x.\n",
                           pci_bus, pci_device_fn, pci_command, new_command);
                pcibios_write_config_word(pci_bus, pci_device_fn, PCI_COMMAND, new_command);
                }

        dev = vortex_probe1(pci_bus, pci_device_fn, dev, ioaddr, irq, chip_idx, cards_found);
        if (dev) {
                /* Get and check the latency values.  On the 3c590 series
                   the latency timer must be set to the maximum value to avoid
                   data corruption that occurs when the timer expires during
                   a transfer -- a bug in the Vortex chip only. */
                u8 pci_latency;
                u8 new_latency = (device & 0xff00) == 0x5900 ? 248 : 32;
                       
                pcibios_read_config_byte(pci_bus, pci_device_fn, PCI_LATENCY_TIMER, &pci_latency);
                if (pci_latency < new_latency) {
                        printk(KERN_INFO "%s: Overriding PCI latency"
                                   " timer (CFLT) setting of %d, new value is %d.\n",
                                        dev->name, pci_latency, new_latency);
                        pcibios_write_config_byte(pci_bus, pci_device_fn, PCI_LATENCY_TIMER,                                                    new_latency);

                                }
                dev = 0;
                cards_found++;
                        }
                }
        }
--> snippet from 3C59x.c
as always, merrits are Donald Beckers (becker@CESDIS.gsfc.nasa.gov)

-----Original Message-----
From: Robert Thompson [mailto:robertt@stargate.cs.swau.edu]
Sent: Friday, January 21, 2000 3:59 PM
To: 'netboot@baghira.han.de'
Subject: RE: 3c90x drivers



On Fri, 21 Jan 2000, Harasek Gottfried wrote:

|the PNP OS = Y/N just switches the initialisation of the PCI-cards off/on
|respectively. That's just for Windoze, so that the OS can decide if the card
|needs to be (re)initialised when it comes up (e.g. after a suspend or
|reboot). For some 3c cards, it only initialised them to the default
|resources, but didn't enable them.

Ah HAH! Would you happen to know how to enable the card? I suspect that if
the card were enabled, Etherboot would find it and continue on its merry
way. I'm interested in trying this if someone can tell me the magic to
enable the card.

--
FREQUENZBÜRO
Ing. G. HARASEK
Höchstädtplatz 3
A-1200      WIEN



For requests or suggestions regarding this mailing list archive please write to netboot@gkminix.han.de.