Date: Fri, 23 Oct 1998 10:57:45 +1300 (NZDT) From: Jonathan Chen <jonc@pinnacle.co.nz> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: i386/8414: ibcs2 emulation sets serial baud-rate incorrectly Message-ID: <199810222157.KAA03060@kakapo.pinnacle.co.nz>
next in thread | raw e-mail | index | archive | help
>Number: 8414 >Category: i386 >Synopsis: ibcs2 emulation sets serial baud-rate incorrectly >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Oct 22 15:00:01 PDT 1998 >Last-Modified: >Originator: Jonathan Chen >Organization: Pinnacle Software Limited >Release: FreeBSD 2.2.7-RELEASE i386 >Environment: FreeBSD 2.2.7-RELEASE on HP Netserver E-40, with Stallion EasyIO/8 PCI card, with a serial terminal @ 38400. Output from dmesg: FreeBSD 2.2.7-RELEASE #0: Thu Oct 22 15:13:09 NZDT 1998 root@sapphire.smp-bearings.co.nz:/usr/src/sys/compile/SAPPHIRE CPU: Pentium Pro (199.74-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x619 Stepping=9 Features=0xf9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV> real memory = 100663296 (98304K bytes) avail memory = 96186368 (93932K bytes) Probing for devices on PCI bus 0: chip0 <Intel 82440FX (Natoma) PCI and memory controller> rev 2 on pci0:0:0 chip1 <Intel 82371SB PCI-ISA bridge> rev 1 on pci0:4:0 chip2 <Intel 82371SB IDE interface> rev 0 on pci0:4:1 fxp0 <Intel EtherExpress Pro 10/100B Ethernet> rev 2 int a irq 10 on pci0:6:0 fxp0: Ethernet address 00:a0:c9:a7:24:17 ahc0 <Adaptec aic7850 SCSI host adapter> rev 1 int a irq 11 on pci0:7:0 ahc0: Using left over BIOS settings ahc0: aic7850 Single Channel, SCSI Id=7, 3 SCBs ahc0 waiting for scsi devices to settle (ahc0:0:0): "HP 2.13GB A 50-300U VCOD" type 0 fixed SCSI 2 sd0(ahc0:0:0): Direct-Access 2033MB (4165272 512 byte sectors) (ahc0:1:0): "IBM DDRS-34560 S97B" type 0 fixed SCSI 2 sd1(ahc0:1:0): Direct-Access 4357MB (8925000 512 byte sectors) (ahc0:5:0): "ARCHIVE Python 28388-XXX 4.CM" type 1 removable SCSI 2 st0(ahc0:5:0): Sequential-Access density code 0x13, 512-byte blocks, write-enabled stl0 <EasyIO-PCI> rev 1 int a irq 9 on pci0:12:0 stl0: EasyIO-PCI (driver version 2.0.0) unit=0 nrpanels=1 nrports=8 >Description: SCO COFF binaries which set ioctl values of a serial device will always set the baud-rate to incorrect value. >How-To-Repeat: .. >Fix: Patch to /usr/src/sys/i386/ibcs2/ibcs2_ioctl.c required. The existing code incorrectly inspects IBCS-termio.c_lflag for a baud-rate setting when it should be inspecting IBCS-termio.c_cflag. *** ibcs2_ioctl.c.old Fri Oct 23 10:29:59 1998 --- ibcs2_ioctl.c Fri Oct 23 10:29:52 1998 *************** *** 188,193 **** --- 188,194 ---- if (l & IBCS2_HUPCL) r |= HUPCL; if (l & IBCS2_CLOCAL) r |= CLOCAL; bt->c_cflag = r; + bt->c_ispeed = bt->c_ospeed = s2btab[l & 0x0000000f]; l = st->c_lflag; r = 0; if (l & IBCS2_ISIG) r |= ISIG; *************** *** 199,206 **** if (l & IBCS2_NOFLSH) r |= NOFLSH; if (l & IBCS2_TOSTOP) r |= TOSTOP; bt->c_lflag = r; - - bt->c_ispeed = bt->c_ospeed = s2btab[l & 0x0000000f]; bt->c_cc[VINTR] = st->c_cc[IBCS2_VINTR] ? st->c_cc[IBCS2_VINTR] : _POSIX_VDISABLE; --- 200,205 ---- >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810222157.KAA03060>