From owner-cvs-all Sat Mar 16 6:50:50 2002 Delivered-To: cvs-all@freebsd.org Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by hub.freebsd.org (Postfix) with ESMTP id 63C5237B41B; Sat, 16 Mar 2002 06:50:15 -0800 (PST) Received: (from uucp@localhost) by srv1.cosmo-project.de (8.11.6/8.11.6) with UUCP id g2GEoDw02604; Sat, 16 Mar 2002 15:50:13 +0100 (CET) (envelope-from ticso@cicely8.cicely.de) Received: from cicely8.cicely.de (cicely8.cicely.de [10.1.1.10]) by cicely5.cicely.de (8.12.1/8.12.1) with ESMTP id g2GEkV6e000773; Sat, 16 Mar 2002 15:46:31 +0100 (CET)?g (envelope-from ticso@cicely8.cicely.de) Received: from cicely8.cicely.de (localhost [127.0.0.1]) by cicely8.cicely.de (8.12.2/8.12.2) with ESMTP id g2GEkUKZ001210; Sat, 16 Mar 2002 15:46:30 +0100 (CET) (envelope-from ticso@cicely8.cicely.de) Received: (from ticso@localhost) by cicely8.cicely.de (8.12.2/8.12.2/Submit) id g2GEkTna001209; Sat, 16 Mar 2002 15:46:29 +0100 (CET) Date: Sat, 16 Mar 2002 15:46:28 +0100 From: Bernd Walter To: John Hay Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, "Herbert J. Skuhra" Subject: Re: cvs commit: src/sys/dev/sio sio.c sio_isa.c sio_pccard.c sio_pci.c sioreg.h siovar.h Message-ID: <20020316144628.GA1170@cicely8.cicely.de> References: <200201301722.g0UHM4w24062@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200201301722.g0UHM4w24062@freefall.freebsd.org> User-Agent: Mutt/1.3.26i X-Operating-System: FreeBSD cicely8.cicely.de 5.0-CURRENT i386 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Jan 30, 2002 at 09:22:04AM -0800, John Hay wrote: > jhay 2002/01/30 09:22:04 PST > > Modified files: > sys/dev/sio sio.c sio_isa.c sio_pccard.c sio_pci.c > sioreg.h siovar.h > Log: > Add support for different serial clock frequencies and not just the > standard one of 1.8432MHz. This will be used by the puc (PCI > "universal" communication card) device driver. This commit breaks my seriel console. I get a console speed of 1355bps after that. loader worked fine with 9600bps. It seems that siocngetspeed read bogus values from my sio. Now that the sanity checks are removed the value gets used. Another one on a german list has the same problem with 4.5-stable and a different board/cpu. And the remark section for the function claims to return 0 in some cases which is obsolete now. The folling patch worked around for me: Index: sys/dev/sio/sio.c =================================================================== RCS file: /cvs/src/sys/dev/sio/sio.c,v retrieving revision 1.365 diff -u -r1.365 sio.c --- sys/dev/sio/sio.c 26 Feb 2002 03:46:14 -0000 1.365 +++ sys/dev/sio/sio.c 16 Mar 2002 14:14:55 -0000 @@ -2775,7 +2775,7 @@ divisor = dlbh << 8 | dlbl; /* XXX there should be more sanity checking. */ - if (divisor == 0) + if (divisor == 0x55 || divisor == 0) return (CONSPEED); return (rclk / (16UL * divisor)); } [55]cicely5# uname -a FreeBSD cicely5.cicely.de 5.0-CURRENT FreeBSD 5.0-CURRENT #6: Sat Mar 16 15:15:36 CET 2002 ticso@cicely5.cicely.de:/var/d1/FreeBSD-2002-03-13/src/sys/i386/compile/CICELY5 i386 Copyright (c) 1992-2002 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 5.0-CURRENT #6: Sat Mar 16 15:15:36 CET 2002 ticso@cicely5.cicely.de:/var/d1/FreeBSD-2002-03-13/src/sys/i386/compile/CICELY5 Preloaded elf kernel "/boot/kernel/kernel" at 0xc0360000. Timecounter "i8254" frequency 1193182 Hz Timecounter "TSC" frequency 233029609 Hz CPU: AMD-K6tm w/ multimedia extensions (233.03-MHz 586-class CPU) Origin = "AuthenticAMD" Id = 0x562 Stepping = 2 Features=0x8001bf AMD Features=0x400<> real memory = 268435456 (262144K bytes) avail memory = 257716224 (251676K bytes) Using $PIR table, 7 entries at 0xc00f09b0 npx0: on motherboard npx0: INT 16 interface pcib0: at pcibus 0 on motherboard pci0: on pcib0 isab0: at device 7.0 on pci0 isa0: on isab0 atapci0: port 0xe800-0xe80f at device 7.1 on pci0 ata0: at 0x1f0 irq 14 on atapci0 ata1: at 0x170 irq 15 on atapci0 pci0: at device 7.2 (no driver attached) pcib1: at device 9.0 on pci0 pci1: on pcib1 ahc0: port 0xd800-0xd8ff mem 0xe5000000-0xe5000fff irq 5 at device 4.0 on pci1 aic7870: Single Channel A, SCSI Id=7, 16/255 SCBs ahc1: port 0xd400-0xd4ff mem 0xe7000000-0xe71fffff,0xe4800000-0xe4800fff irq 11 at device 5 .0 on pci1 RAID functionality unsupported device_probe_and_attach: ahc1 attach returned 6 ahc1: port 0xd000-0xd0ff mem 0xe4000000-0xe4000fff irq 5 at device 8.0 on pci1 aic7870: Single Channel B, SCSI Id=7, 16/255 SCBs ahc2: port 0xb800-0xb8ff mem 0xe3800000-0xe3800fff irq 5 at device 12.0 on pci1 aic7870: Single Channel C, SCSI Id=7, 16/255 SCBs pcib2: at device 10.0 on pci0 pci2: on pcib2 ahc3: port 0xa800-0xa8ff mem 0xe3000000-0xe3000fff irq 12 at device 4.0 on pci2 aic7880: Ultra Single Channel A, SCSI Id=7, 16/255 SCBs ahc4: port 0xa400-0xa4ff mem 0xe2800000-0xe2800fff irq 5 at device 5.0 on pci2 aic7880: Ultra Single Channel B, SCSI Id=7, 16/255 SCBs de0: port 0x9800-0x987f mem 0xe2000000-0xe200007f irq 10 at device 11.0 on pci0 de0: Cogent 21140A [10-100Mb/s] pass 2.0 de0: address 00:00:92:9b:20:e7 pcib3: at device 12.0 on pci0 pci3: on pcib3 ahc5: port 0x8800-0x88ff mem 0xe1800000-0xe1800fff irq 11 at device 4.0 on pci3 aic7870: Single Channel A, SCSI Id=7, 16/255 SCBs ahc6: port 0x8400-0x84ff mem 0xe6000000-0xe61fffff,0xe1000000-0xe1000fff irq 10 at device 5 .0 on pci3 RAID functionality unsupported device_probe_and_attach: ahc6 attach returned 6 ahc6: port 0x8000-0x80ff mem 0xe0800000-0xe0800fff irq 11 at device 8.0 on pci3 aic7870: Single Channel B, SCSI Id=7, 16/255 SCBs ahc7: port 0x7800-0x78ff mem 0xe0000000-0xe0000fff irq 11 at device 12.0 on pci3 aic7870: Single Channel C, SCSI Id=7, 16/255 SCBs orm0: