Hi
If you are not subscribed to the etherboot-users list please do so. I
always get the messages to the list but sometimes my inbox gets full or
worse (your email was marked as spam for instance)
I don't have time tonight to look, but some additional details regarding
the hardware that you have would help. The issue you reference below
was only seen on one model of HP Vectra.
Tim
Krzysztof Lichota wrote:
> Hello!
> I see in driver source code that you are the author of driver, so I hope
> you can help me.
> I have got some computers with PCnet/FAST 79C971 ethernet controllers.
> Unfortunately, they are not working with etherboot driver pcnet32 even
> in latest release 5.4.0.
> Using standard etherboot driver, loading hangs right after printing "at
> ioaddr FCE0,". I have seen an e-mail thread on etherboot-developers
> list, but it ended without conclusion.
>
> I have tried to fix it myself and here are the results of my experiments:
> I have verified that standard Linux driver works (linux kernel 2.4.27),
> you can see dmesg output attached.
>
> I have added tracing messages to locate place where it hangs and the
> first place was "Trigger initialization just for the interrupt". I have
> disabled this code and this went through.
> I have looked into Linux driver code and it seems that this code is not
> executed in my case, so I think it is OK to disable it.
>
> Next it stuck in "We used to clear InitDone bit". I have added setting
> this bit and it went further. This is not compatible with what Linux
> driver does.
>
> With these two changes, booting with etherboot is going up to the point
> where DHCP requests are sent. I am getting DHCP request (DHCPDISCOVER)
> on server and it sends back DHCPOFFER, but client is hanging.
>
> I have added more tracing to see where it hangs and it seems it is
> hanging some time after triggering send poll in pcnet32_transmit(). I
> suspect so, because if some tracing messages are printed, if there are a
> few of them (commented out in attached patch), client hangs in the
> middle of printing message to console, before finishing function
> pcnet32_transmit(). If there is only message at the end of function, it
> is printed OK.
>
> I suspect a problem with interrupts, but I do not have expertise in
> network drivers :(
> I have tried adding changes based on changes in Linux driver from base
> version of your driver (1.27a) up to Linux kernel version 2.4.27, but
> with no luck. I have also experimented with some other options
> (disabling/enabling DXSUFLO), but it didn't help.
>
> I would appreciate any help. I have working environment for compiling
> etherboot set up, so I can test any patches you send. If you need any
> further information, I will be happy to provide it.
>
> TIA
>
> Kind regards
>
> Krzysztof Lichota
>
>
> ------------------------------------------------------------------------
>
> Linux version 2.4.27 (ar...@re...) (gcc version 3.3.4 (PLD Linux)) #1 Thu Jul 15 21:46:57 CEST 2004
> BIOS-provided physical RAM map:
> BIOS-e820: 0000000000000000 - 000000000009f800 (usable)
> BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
> BIOS-e820: 00000000000f1c24 - 0000000000100000 (reserved)
> BIOS-e820: 0000000000100000 - 0000000002000000 (usable)
> BIOS-e820: 00000000fffe0000 - 0000000100000000 (reserved)
> 0MB HIGHMEM available.
> 32MB LOWMEM available.
> On node 0 totalpages: 8192
> zone(0): 4096 pages.
> zone(1): 4096 pages.
> zone(2): 0 pages.
> DMI not present.
> ACPI: Unable to locate RSDP
> Kernel command line: initrd=initrd.ide root=/dev/ram0 init=/linuxrc CONF="`/dev/fd0:/rescue`;;;;;;;;;;;" BOOT_IMAGE=vmlinuz
> No local APIC present or hardware disabled
> Initializing CPU#0
> Detected 199.435 MHz processor.
> Console: colour VGA+ 80x25
> Calibrating delay loop... 398.13 BogoMIPS
> Memory: 29352k/32768k available (1136k kernel code, 3028k reserved, 483k data, 120k init, 0k highmem)
> Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)
> Inode cache hash table entries: 2048 (order: 2, 16384 bytes)
> Mount cache hash table entries: 512 (order: 0, 4096 bytes)
> Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
> Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
> Intel Pentium with F0 0F bug - workaround enabled.
> CPU: After generic, caps: 008001bf 00000000 00000000 00000000
> CPU: Common caps: 008001bf 00000000 00000000 00000000
> CPU: Intel Pentium MMX stepping 03
> Checking 'hlt' instruction... OK.
> POSIX conformance testing by UNIFIX
> mtrr: v1.40 (20010327) Richard Gooch (rg...@at...)
> mtrr: detected mtrr type: none
> ACPI: Subsystem revision 20040326
> ACPI: Interpreter disabled.
> PCI: PCI BIOS revision 2.10 entry at 0xf7142, last bus=0
> PCI: Using configuration type 1
> PCI: Probing PCI hardware
> PCI: Probing PCI hardware (bus 00)
> Limiting direct PCI/PCI transfers.
> Activating ISA DMA hang workarounds.
> Linux NET4.0 for Linux 2.4
> Based upon Swansea University Computer Society NET3.039
> Initializing RT netlink socket
> Starting kswapd
> kinoded started
> devfs: v1.12c (20020818) Richard Gooch (rg...@at...)
> devfs: boot_options: 0x0
> Detected PS/2 Mouse Port.
> pty: 256 Unix98 ptys configured
> Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
> ttyS00 at 0x03f8 (irq = 4) is a 16550A
> ttyS01 at 0x02f8 (irq = 3) is a 16550A
> Real Time Clock Driver v1.10f
> floppy0: no floppy controllers found
> NET4: Frame Diverter 0.46
> COMX: driver version 0.85 (C) 1995-1999 ITConsult-Pro Co. <in...@it...>
> RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
> loop: loaded (max 8 devices)
> Initializing Cryptographic API
> IEEE 802.2 LLC for Linux 2.1 (c) 1996 Tim Alpaerts
> NET4: Linux TCP/IP 1.0 for NET4.0
> IP Protocols: ICMP, UDP, TCP, IGMP
> IP: routing cache hash table of 512 buckets, 4Kbytes
> TCP: Hash tables configured (established 2048 bind 4096)
> Linux IP multicast router 0.06 plus PIM-SM
> NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
> RAMDISK: Compressed image found at block 0
> Freeing initrd memory: 541k freed
> FAT: bogus logical sector size 49488
> VFS: Mounted root (romfs filesystem) readonly.
> Freeing unused kernel memory: 120k freed
> Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4
> ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
> PIIX3: IDE controller at PCI slot 00:0f.1
> PIIX3: chipset revision 0
> PIIX3: not 100% native mode: will probe irqs later
> ide0: BM-DMA at 0xfcb0-0xfcb7, BIOS settings: hda:pio, hdb:pio
> ide1: BM-DMA at 0xfcb8-0xfcbf, BIOS settings: hdc:pio, hdd:pio
> hda: LG DVD-ROM DRD-8120B, ATAPI CD/DVD-ROM drive
> ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
> hda: attached ide-cdrom driver.
> hda: ATAPI 40X DVD-ROM drive, 512kB Cache
> Uniform CD-ROM driver Revision: 3.12
> ISO 9660 Extensions: Microsoft Joliet Level 3
> ISO 9660 Extensions: RRIP_1991A
> usb.c: registered new driver usbdevfs
> usb.c: registered new driver hub
> uhci.c: USB Universal Host Controller Interface driver v1.1
> uhci.c: USB UHCI at I/O 0xfcc0, IRQ 11
> usb.c: new USB bus registered, assigned bus number 1
> hub.c: USB hub found
> hub.c: 2 ports detected
> usb.c: registered new driver hiddev
> usb.c: registered new driver hid
> hid-core.c: v1.8.1 Andreas Gal, Vojtech Pavlik <vo...@su...>
> hid-core.c: USB HID support drivers
> mice: PS/2 mouse device common for all mice
> isapnp: Scanning for PnP cards...
> isapnp: No Plug & Play device found
> pcnet32.c:v1.30c 05.25.2004 tsb...@al...
> pcnet32: PCnet/FAST 79C971 at 0xfce0, 00 60 b0 c1 38 93
> tx_start_pt(0x0c00):~220 bytes, BCR18(9861):BurstWrEn BurstRdEn NoUFlow
> SRAMSIZE=0x7f00, SRAM_BND=0x3f00, assigned IRQ 9.
> divert: allocating divert_blk for eth0
> eth0: registered as PCnet/FAST 79C971
> pcnet32: 1 cards_found.
> eth0: link down
> IPv6 v0.8 for NET4.0
> IPv6 over IPv4 tunneling driver
> divert: not allocating divert_blk for non-ethernet device sit0
> eth0: link up, 100Mbps, full-duplex, lpa 0x41E1
> eth0: no IPv6 routers present
>
>
> ------------------------------------------------------------------------
>
> --- drivers/net/pcnet32.c.orig 2004-06-01 17:55:01.000000000 +0200
> +++ drivers/net/pcnet32.c 2005-06-16 08:13:25.550372056 +0200
> @@ -521,18 +521,19 @@
> lp->a.write_csr(ioaddr, 4, 0x0915);
> lp->a.write_csr(ioaddr, 0, 0x0001);
>
>
> i = 0;
> - while (i++ < 100)
> + while (i++ < 1000)
> if (lp->a.read_csr(ioaddr, 0) & 0x0100)
> break;
> /*
> * We used to clear the InitDone bit, 0x0100, here but Mark Stockton
> * reports that doing so triggers a bug in the '974.
> */
> - lp->a.write_csr(ioaddr, 0, 0x0042);
> +//KLOLD: lp->a.write_csr(ioaddr, 0, 0x0042);
> + lp->a.write_csr(ioaddr, 0, 0x0042 | 0x0100);
>
> dprintf(("pcnet32 open, csr0 %hX.\n", lp->a.read_csr(ioaddr, 0)));
>
> }
>
> @@ -552,10 +553,11 @@
> status = ((short) le16_to_cpu(rx_ring[entry].status) >> 8);
>
> if (status < 0)
> return 0;
>
> + dprintf(("pcnet32_poll received something\n"));
> if ( ! retrieve ) return 1;
>
> if (status == 0x03) {
> nic->packetlen =
> (le32_to_cpu(rx_ring[entry].msg_length) & 0xfff) - 4;
> @@ -582,10 +584,11 @@
> unsigned int t, /* Type */
> unsigned int s, /* size */
> const char *p)
> { /* Packet */
> /* send the packet to destination */
> + dprintf(("pcnet32_transmit start\n"));
> unsigned long time;
> u8 *ptxb;
> u16 nstype;
> u16 status;
> int entry = 0; /*lp->cur_tx & TX_RING_MOD_MASK; */
> @@ -611,25 +614,29 @@
>
> /* we set the top byte as the very last thing */
> tx_ring[entry].status = le16_to_cpu(status);
>
>
> +// dprintf(("pcnet32_transmit before send poll\n"));
> /* Trigger an immediate send poll */
> lp->a.write_csr(ioaddr, 0, 0x0048);
> +// dprintf(("pcnet32_transmit after send poll\n"));
>
> /* wait for transmit complete */
> lp->cur_tx = 0; /* (lp->cur_tx + 1); */
> time = currticks() + TICKS_PER_SEC; /* wait one second */
> while (currticks() < time &&
> ((short) le16_to_cpu(tx_ring[entry].status) < 0));
>
> if ((short) le16_to_cpu(tx_ring[entry].status) < 0)
> printf("PCNET32 timed out on transmit\n");
>
> +// dprintf(("pcnet32_transmit before stop pointing\n"));
> /* Stop pointing at the current txb
> * otherwise the card continues to send the packet */
> tx_ring[entry].base = 0;
> + dprintf(("pcnet32_transmit end\n"));
>
> }
>
> /**************************************************************************
> DISABLE - Turn off ethernet interface
> @@ -896,12 +903,12 @@
> * interrupts. For ISA boards we get a DMA error, but VLB and PCI
> * boards will work.
> */
> /* Trigger an initialization just for the interrupt. */
>
> - a->write_csr(ioaddr, 0, 0x41);
> - mdelay(1);
> +//KL: a->write_csr(ioaddr, 0, 0x41);
> +//KL: mdelay(1);
>
> cards_found++;
>
> /* point to NIC specific routines */
> pcnet32_reset(nic);
|