From owner-freebsd-hackers Thu May 14 13:14:26 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA04536 for freebsd-hackers-outgoing; Thu, 14 May 1998 13:14:26 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from nest.bistbn.com (yury@nest.bistbn.com [209.88.174.52]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA04473 for ; Thu, 14 May 1998 13:14:15 -0700 (PDT) (envelope-from yury@nest.bistbn.com) Received: (from yury@localhost) by nest.bistbn.com (8.8.8/8.8.7) id XAA01684; Thu, 14 May 1998 23:13:53 +0300 (IDT) (envelope-from yury) From: Yuri Krichevsky Message-Id: <199805142013.XAA01684@nest.bistbn.com> Subject: Serial port driver patch (update for 2.2.6-R) To: freebsd-hackers@FreeBSD.ORG Date: Thu, 14 May 1998 23:13:53 +0300 (IDT) Cc: grog@lemis.com, roberps@louisville.stortek.com, alessandro@digicron.com Reply-To: yury@luckynet.co.il X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi. Here is updated patch (that can be applied to FreeBSD-2.2.6-R ) for sio driver. If you using motherboard with UART from Acer Labs (for example, IWill motherboard), and FreeBSD can't detect your serial port - this patch is for you ;-) You can get it from WWW also : http://nest.bistbn.com/~yury/FreeBSD/sio.patch/sio.patch.2.2.5-R (for FreeBSD 2.2.5-RELEASE) http://nest.bistbn.com/~yury/FreeBSD/sio.patch/sio.patch.2.2.6-R (for FreeBSD 2.2.6-RELEASE) BTW, 2Mike: where is promised workaround in 2.2.6 ? :( NB: DONT use this patch if you don't have any problem with serial port detection ! *** /sys/i386/isa/sio.c.orig Sun Mar 8 11:57:35 1998 --- /sys/i386/isa/sio.c Thu May 14 22:39:07 1998 *************** *** 489,495 **** struct isa_device *dev; { static bool_t already_init; ! bool_t failures[10]; int fn; struct isa_device *idev; Port_t iobase; --- 489,495 ---- struct isa_device *dev; { static bool_t already_init; ! bool_t failures[12]; int fn; struct isa_device *idev; Port_t iobase; *************** *** 653,668 **** enable_intr(); result = IO_COMSIZE; ! for (fn = 0; fn < sizeof failures; ++fn) ! if (failures[fn]) { ! outb(iobase + com_mcr, 0); ! result = 0; ! if (COM_VERBOSE(dev)) ! printf("sio%d: probe test %d failed\n", ! dev->id_unit, fn); ! } ! return (result); ! } #ifdef COM_ESP static int --- 653,719 ---- enable_intr(); result = IO_COMSIZE; ! ! ! /* ! * Patch (C) Yuri Krichevsky (yury@bistbn.com) ! * ! * If we have'nt found serial port yet, maybe it's strange ! * serial port... (like on IWill motherboard) ! * ! * ! * !WARNING! It's only temporary solution ! Use this patch only if ! * you have problems with serial ports ! ! * ! */ ! if (sizeof failures) { ! { ! result = IO_COMSIZE; ! ! /* ! * Probing port as described in article ! * 'The Serial Port' (C) Chris Blum (chris@phil.uni-sb.de) ! * http://colargol.tihlde.hist.no/~bardj/serial/ ! */ ! ! outb(iobase + com_mcr, 0x10); ! if ((inb(iobase + com_msr) & 0xf0)) { ! failures[10] = 1; ! result = 0; ! } else { ! outb(iobase + com_mcr, 0x1f); ! if ((inb(iobase + com_msr) & 0xf0) != 0xf0) { ! failures[11] = 1; ! result = 0; ! } else { ! /* ! * UART detected (I hope, it's UART). ! */ ! outb(iobase + com_cfcr, CFCR_8BITS); ! outb(iobase + com_ier, 0x0); ! outb(iobase + com_mcr, MCR_IENABLE); ! } ! } ! ! } ! } ! /* ! * END of patch ! */ ! if ( !result ) { ! for (fn = 0; fn < sizeof failures; ++fn) ! if (failures[fn]) { ! outb(iobase + com_mcr, 0); ! result = 0; ! if (COM_VERBOSE(dev)) ! printf("sio%d: probe test %d failed\n", ! dev->id_unit, fn); ! } ! } ! ! return (result); ! } ! #ifdef COM_ESP static int To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message