From owner-freebsd-bugs@FreeBSD.ORG Fri Mar 2 05:40:10 2007 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E293116A404 for ; Fri, 2 Mar 2007 05:40:09 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 4743113C4B3 for ; Fri, 2 Mar 2007 05:40:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l225e5V1094667 for ; Fri, 2 Mar 2007 05:40:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l225e5lW094666; Fri, 2 Mar 2007 05:40:05 GMT (envelope-from gnats) Resent-Date: Fri, 2 Mar 2007 05:40:05 GMT Resent-Message-Id: <200703020540.l225e5lW094666@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jeremy McMillan Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 43C7616A401 for ; Fri, 2 Mar 2007 05:34:30 +0000 (UTC) (envelope-from aphor@horizon.aphor.net) Received: from horizon.aphor.net (dsl092-135-118.chi1.dsl.speakeasy.net [66.92.135.118]) by mx1.freebsd.org (Postfix) with ESMTP id CE7C313C478 for ; Fri, 2 Mar 2007 05:34:29 +0000 (UTC) (envelope-from aphor@horizon.aphor.net) Received: from horizon.aphor.net (localhost [127.0.0.1]) by horizon.aphor.net (8.13.8/8.13.8) with ESMTP id l2256Ct1024041 for ; Thu, 1 Mar 2007 23:06:12 -0600 (CST) (envelope-from aphor@horizon.aphor.net) Received: (from root@localhost) by horizon.aphor.net (8.13.8/8.13.8/Submit) id l2256C8Z024040; Thu, 1 Mar 2007 23:06:12 -0600 (CST) (envelope-from aphor) Message-Id: <200703020506.l2256C8Z024040@horizon.aphor.net> Date: Thu, 1 Mar 2007 23:06:12 -0600 (CST) From: Jeremy McMillan To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/109743: The sio(4) driver appears to be getting the serial port speed multiplier bits wrong. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jeremy McMillan List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Mar 2007 05:40:10 -0000 >Number: 109743 >Category: kern >Synopsis: The sio(4) driver appears to be getting the serial port speed multiplier bits wrong. >Confidential: yes >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Mar 02 05:40:04 GMT 2007 >Closed-Date: >Last-Modified: >Originator: >Release: FreeBSD 6.2-STABLE i386 >Organization: >Environment: Vintage FIC SD11 Athlon Slot-A PC motherboard. >Description: Serial port settings via sofware are not effective on the hardware device. This *used* to work, but I can't remember when I had to change the batteries last... probably 18-24 months ago. Ancient history, but my point is that the hardware hasn't changed. The behavior is identical using puc(4) ports and built-in serial port at sio0, so it doesn't appear to be puc(4) or shady cheap hardware at fault. Maybe it's ACPI bugs? - dmesg - puc0: NetMos NM9835 Dual UART and 1284 Printer port port 0xd400-0xd407,0xd000-0xd007,0xcc00-0xcc07,0xc800-0xc807,0xc400-0xc407,0xc000-0xc00f irq 10 at device 4.0 on pci0 sio4: NetMos NM9835 Dual UART and 1284 Printer port on puc0 sio4: type 16550A sio4: unable to activate interrupt in fast mode - using normal mode sio5: NetMos NM9835 Dual UART and 1284 Printer port> on puc0 sio5: type 16550A sio5: unable to activate interrupt in fast mode - using normal mode sio0: 16550A-compatible COM port port 0x3f8-0x3ff irq 4 flags 0x30 on acpi0 sio0: type 16550A, console >How-To-Repeat: I discovered this trying to get my puc(4) serial ports wired to my APC SmartUPS. I got frustrated and broke out my null-modem cable. When I set up the serial port in /etc/ttys as root autologin, I can get a shell via the serial port at 9600 baud despite the 2400 baud gettytab entry on the /etc/ttys line for that port. When I type 'stty speed 9600' in that prompt across the serial line, I get garbage until I switch to 38400 baud. When I stty to 600, I can communicate at 2400. >Fix: Get two PCs and hook up a serial debugger on one port and another null modem cable on the other. Observe the bit-twiddling on the subject kernel's second serial port via debugger on the first port as stty does its ioctl(2) magic. Marvel at the layers of abstraction that must be penetrated to understand what went wrong. Read more code than you want to. Please? >Release-Note: >Audit-Trail: >Unformatted: >System: FreeBSD horizon.aphor.net 6.2-STABLE FreeBSD 6.2-STABLE #53: Tue Feb 27 22:37:03 CST 2007 root@horizon.aphor.net:/usr/obj/usr/src/sys/ATHLON i386