From owner-freebsd-current Tue Jan 12 14:04:43 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA17499 for freebsd-current-outgoing; Tue, 12 Jan 1999 14:04:43 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from smtpott1.nortel.ca (smtpott1.nortel.ca [192.58.194.78]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA17494 for ; Tue, 12 Jan 1999 14:04:41 -0800 (PST) (envelope-from atrens@nortelnetworks.com) Received: from zcars01t by smtpott1; Tue, 12 Jan 1999 17:03:44 -0500 Received: from wmerh01z.ca.nortel.com by zcars01t; Tue, 12 Jan 1999 17:03:13 -0500 Received: from hcarp00g.ca.nortel.com (atrens@hcarp00g.ca.nortel.com@wmerh01z) by wmerh01z.ca.nortel.com with ESMTP (8.7.1/8.7.1) id RAA03569; Tue, 12 Jan 1999 17:03:12 -0500 (EST) Date: Tue, 12 Jan 1999 17:12:13 -0500 (EST) From: "Andrew Atrens" Reply-To: "Andrew Atrens" To: current@FreeBSD.ORG cc: lcremean@tidalwave.net Subject: Re: potential ide_pci.c bugster In-Reply-To: <19990112004945.A68879@tidalwave.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi All, I've been experiencing pci-ide timeouts of the showstopper variety. Lee has postulated that this has to do with my bus speed 83Mhz .. so I reclocked to 66Mhz and the behaviour persists. I've appended the original mail I sent to Lee, along with (just for fun) my kernel config and dmesg output. Note that I haven't been able to capture the dmesg output inspired by the below patch - the system locks up tighter than a drum. I did however transcribe the following (hopefully relevant bits) by hand ... wd0: interrupt timeout (status 50 error 0) wd0: wdtimeout() DMA status 1 Interesting thing is this drive, wd0, is about 2 years old and doesn't support UDMA. While wd1, a new drive, does do UDMA. My system is current as of yesterday. I'm not sure why the below patch tickles this bug, any suggestions/insights you can provide would be greatly appreciated. Regards, Andrew. -- +----------------------------------------------------+ = Andrew Atrens - Nortel Networks (atrens@nortel.ca) = = P.O. Box 3511, Station C Ottawa, Canada = = = = All opinions expressed are mine, not Nortel's. = +----------------------------------------------------+ (original message follows) Lee, Around the middle of December you (actually Mike on behalf of you) committed a patch to pci_ide.c which has since been hosing my system: # diff -c /home/cvs/sys/pci/ide_pci.c* *** /home/cvs/sys/pci/ide_pci.c Mon Jan 11 19:29:54 1999 --- /home/cvs/sys/pci/ide_pci.c.ctm Mon Jan 11 19:28:35 1999 *************** *** 1195,1201 **** cp = softc.cookies.lh_first; while(cp) { ! if (cp->ctlr == unit && ((iobase_wd == 0) || (cp->iobase_wd == iobase_wd))) break; cp = cp->le.le_next; --- 1195,1201 ---- cp = softc.cookies.lh_first; while(cp) { ! if (cp->unit == unit && ((iobase_wd == 0) || (cp->iobase_wd == iobase_wd))) break; cp = cp->le.le_next; With this commit, my system freezes on boot with DMA timeout messages when it tries to mount root on wd1. It's a total showstopper. >>> (oops, that should have been wd0) I disabled DMA (ala wdc0 flags) and everything worked, though of course more slowly. :) So, instead I chose to back out your change, and wait to see if anyone else fell in the pit. Since the mailing list seems to be pretty silent on the topic, maybe it's just me :) ... I've got an ABIT motherboard with TX chipset, bussed at 83MHz, that seems to run quick enough: --root@churchill:/var/log-- # dd if=/dev/rwd0 of=/dev/null bs=1024k count=50 50+0 records in 50+0 records out 52428800 bytes transferred in 10.040942 secs (5221502 bytes/sec) --root@churchill:/var/log-- # dd if=/dev/rwd1 of=/dev/null bs=1024k count=50 50+0 records in 50+0 records out 52428800 bytes transferred in 4.538576 secs (11551817 bytes/sec) wd0 doesn't do udma, while wd1 does, with dma disabled both drives perform comparably. --- (here's my kernel config) machine "i386" cpu "I586_CPU" ident CHURCHILL maxusers 32 options USERCONFIG options INCLUDE_CONFIG_FILE options SOFTUPDATES options INET options FFS options FFS_ROOT options NFS options NFS_ROOT options MFS options MFS_ROOT options "CD9660" options "CD9660_ROOT" options "CD9660_ROOTDELAY=20" options MSDOSFS options PROCFS options "COMPAT_43" options "COMPAT_LINUX" options USER_LDT options "VM86" options VESA options UCONSOLE options SYSVSHM options SYSVSEM options SYSVMSG options ATAPI options ATAPI_STATIC options PQ_LARGECACHE options "CPU_WT_ALLOC" options "NO_MEMORY_HOLE" options "NO_F00F_HACK" options NSWAPDEV=2 options "MD5" config kernel root on wd0 dumps on wd0 controller isa0 controller pnp0 controller pci0 controller fdc0 at isa? port "IO_FD1" bio irq 6 drq 2 disk fd0 at fdc0 drive 0 controller wdc0 at isa? port "IO_WD1" bio irq 14 flags 0xb0ffb0ff disk wd0 at wdc0 drive 0 disk wd1 at wdc0 drive 1 controller wdc1 at isa? port "IO_WD2" bio irq 15 flags 0xb0ffb0ff device acd0 device acd1 controller atkbdc0 at isa? port IO_KBD tty device atkbd0 at isa? tty irq 1 device psm0 at isa? tty irq 12 device vga0 at isa? port ? conflicts pseudo-device splash device sc0 at isa? tty options MAXCONS=16 # number of virtual consoles options SC_HISTORY_SIZE=200 # number of history buffer lines device npx0 at isa? port "IO_NPX" iosiz 0x0 flags 0x0 irq 13 device pcm0 at isa? port 0x530 tty irq 10 drq 1 flags 0x0 device sio0 at isa? port "IO_COM1" tty irq 4 device sio1 at isa? port "IO_COM2" tty irq 3 device lpt0 at isa? port "IO_LPT2" tty irq 5 device tw0 at isa? port "IO_LPT3" tty irq 7 device ed0 at isa? port 0x240 net irq 9 iomem ? pseudo-device loop pseudo-device ether pseudo-device sl 2 pseudo-device ppp 2 pseudo-device tun 2 pseudo-device pty 128 pseudo-device gzip pseudo-device vn pseudo-device bpfilter 4 (here's dmesg and friends) (hmm, it seems pnp doesn't see my soundcard anymore ... ) Copyright (c) 1992-1999 FreeBSD Inc. Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. FreeBSD 3.0-CURRENT #4: Mon Jan 11 22:05:55 EST 1999 root@churchill:/home/cvs/sys/compile/CHURCHILL Timecounter "i8254" frequency 1193182 Hz Timecounter "TSC" frequency 334092111 Hz CPU: AMD-K6(tm) 3D processor (334.09-MHz 586-class CPU) Origin = "AuthenticAMD" Id = 0x58c Stepping=12 Features=0x8021bf real memory = 67108864 (65536K bytes) config> pnp 1 0 os enable irq0 10 drq0 1 config> pnp 1 0 os enable port0 0x220 port1 0x530 port2 0x388 config> pnp 1 0 os enable port3 0x300 port4 0x370 config> quit avail memory = 62390272 (60928K bytes) Preloaded elf kernel "kernel1" at 0xf02bc000. Preloaded userconfig_script "/boot/pnp.conf" at 0xf02bc09c. Probing for devices on PCI bus 0: chip0: rev 0x01 on pci0.0.0 chip1: rev 0x01 on pci0.7.0 ide_pci0: rev 0x01 on pci0.7.1 chip2: rev 0x01 on pci0.7.3 vga0: rev 0x5c on pci0.11.0 ed1: rev 0x00 int a irq 11 on pci0.13.0 ed1: address 00:40:05:59:30:f0, type NE2000 (16 bit) Probing for PnP devices: Probing for devices on the ISA bus: sc0 on isa sc0: VGA color <16 virtual consoles, flags=0x0> ed0 at 0x240-0x25f irq 9 on isa ed0: address 00:40:05:48:11:c9, type NE2000 (16 bit) pcm0 not found at 0x530 atkbdc0 at 0x60-0x6f on motherboard atkbd0 irq 1 on isa psm0 irq 12 on isa psm0: model Generic PS/2 mouse, device ID 0 sio0 at 0x3f8-0x3ff irq 4 on isa sio0: type 16550A sio1 at 0x2f8-0x2ff irq 3 on isa sio1: type 16550A lpt0 at 0x278-0x27f irq 5 on isa lpt0: Interrupt-driven port lp0: TCP/IP capable interface tw calibration: delay loop is 21 us. tw0 at 0x3bc-0x3c3 irq 7 on isa fdc0 at 0x3f0-0x3f7 irq 6 drq 2 on isa fdc0: FIFO enabled, 8 bytes threshold fd0: 1.44MB 3.5in wdc0 at 0x1f0-0x1f7 irq 14 flags 0xb0ffb0ff on isa wdc0: unit 0 (wd0): , LBA, DMA, 32-bit, multi-block-16 wd0: 2446MB (5009760 sectors), 621 cyls, 128 heads, 63 S/T, 512 B/S wdc0: unit 1 (wd1): , LBA, DMA, 32-bit, multi-block-16 wd1: 4892MB (10018890 sectors), 623 cyls, 255 heads, 63 S/T, 512 B/S wdc1 at 0x170-0x177 irq 15 flags 0xb0ffb0ff on isa wdc1: unit 0 (atapi): , removable, iordy acd0: drive speed 689KB/sec, 256KB cache acd0: supported read types: CD-DA acd0: Audio: play, 256 volume levels acd0: Mechanism: ejectable tray acd0: Medium: no/blank disc inside, unlocked wdc1: unit 1 (atapi): , removable, dma, iordy acd1: drive speed 344 - 1034KB/sec, 768KB cache acd1: supported read types: CD-R, CD-RW, CD-DA, packet track acd1: supported write types: CD-R, CD-RW, test write acd1: Audio: play, 128 volume levels acd1: Mechanism: ejectable tray acd1: Medium: no/blank disc inside, unlocked, lock protected vga0 at 0x3b0-0x3df maddr 0xa0000 msize 131072 on isa npx0 on motherboard npx0: INT 16 interface changing root device to wd1s2e ffs_mountfs: superblock updated for soft updates ffs_mountfs: superblock updated for soft updates ffs_mountfs: superblock updated for soft updates VESA: set_mode(): 24(18) -> 204(cc) VESA: set_mode(): 34(22) -> 204(cc) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message