Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Mar 2002 15:46:28 +0100
From:      Bernd Walter <ticso@cicely8.cicely.de>
To:        John Hay <jhay@FreeBSD.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, "Herbert J. Skuhra" <herbert@bugat.at>
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>
In-Reply-To: <200201301722.g0UHM4w24062@freefall.freebsd.org>
References:  <200201301722.g0UHM4w24062@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8,MMX>
  AMD Features=0x400<<b10>>
real memory  = 268435456 (262144K bytes)
avail memory = 257716224 (251676K bytes)
Using $PIR table, 7 entries at 0xc00f09b0
npx0: <math processor> on motherboard
npx0: INT 16 interface
pcib0: <Host to PCI bridge> at pcibus 0 on motherboard
pci0: <PCI bus> on pcib0
isab0: <PCI-ISA bridge> at device 7.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel PIIX3 ATA controller> port 0xe800-0xe80f at device 7.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
pci0: <serial bus, USB> at device 7.2 (no driver attached)
pcib1: <PCI-PCI bridge> at device 9.0 on pci0
pci1: <PCI bus> on pcib1
ahc0: <Adaptec 398X SCSI RAID adapter> 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: <Adaptec aic7810 RAID memory controller> 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: <Adaptec 398X SCSI RAID adapter> 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: <Adaptec 398X SCSI RAID adapter> 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: <PCI-PCI bridge> at device 10.0 on pci0
pci2: <PCI bus> on pcib2
ahc3: <Adaptec 3940 Ultra SCSI adapter> 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: <Adaptec 3940 Ultra SCSI adapter> 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: <Digital 21140A Fast Ethernet> 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: <PCI-PCI bridge> at device 12.0 on pci0
pci3: <PCI bus> on pcib3
ahc5: <Adaptec 398X SCSI RAID adapter> 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: <Adaptec aic7810 RAID memory controller> 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: <Adaptec 398X SCSI RAID adapter> 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: <Adaptec 398X SCSI RAID adapter> 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: <Option ROMs> at iomem 0xcc000-0xcffff,0xc8000-0xca7ff,0xc0000-0xc7fff on isa0
fdc0: <enhanced floppy controller (i82077, NE72065 or clone)> at port 0x3f7,0x3f0-0x3f5 irq 6 drq 2 on isa0
fdc0: FIFO enabled, 8 bytes threshold
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
ppc0: <Parallel port> at port 0x3bc-0x3c3 irq 7 on isa0
ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 16550A, console
sio1 at port 0x2f8-0x2ff irq 3 flags 0x80 on isa0
sio1: type 16550A
unknown: <PNP0400> can't assign resources (port)
unknown: <PNP0501> can't assign resources (port)
unknown: <PNP0501> can't assign resources (port)
unknown: <PNP0700> can't assign resources (port)
ata1-slave: timeout waiting for cmd=a1 s=00 e=00
ata1-slave: ATAPI identify failed
acd0: CDROM <FX120T> at ata1-master PIO3
Waiting 15 seconds for SCSI devices to settle
[...]

-- 
B.Walter              COSMO-Project         http://www.cosmo-project.de
ticso@cicely.de         Usergroup           info@cosmo-project.de


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020316144628.GA1170>