From owner-freebsd-hackers Tue May 4 11:15:54 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from gateway.cybernet.com (gateway.cybernet.com [192.245.33.1]) by hub.freebsd.org (Postfix) with ESMTP id 695B315B1B for ; Tue, 4 May 1999 11:15:52 -0700 (PDT) (envelope-from mtaylor@cybernet.com) Received: from spiffy.cybernet.com (spiffy.cybernet.com [192.245.33.55]) by gateway.cybernet.com (8.8.8/8.8.8) with ESMTP id OAA21322 for ; Tue, 4 May 1999 14:15:51 -0400 (EDT) (envelope-from mtaylor@cybernet.com) Message-ID: X-Mailer: XFMail 1.3 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Date: Tue, 04 May 1999 14:17:28 -0400 (EDT) Reply-To: mtaylor@cybernet.com Organization: Cybernet Systems From: "Mark J. Taylor" To: freebsd-hackers@freebsd.org Subject: sio patch to make 65650 work Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Here's a quick patch to sio.c, relative to 3.1-RELEASE, to make the 65654 serial chip work. It is a high-speed serial port, and bit 7 of the MCR is a "divide by 4" indicator. In divide by four mode, its rates go down from 115200 kbps, like "normal" serial chips. This patch basically keeps bit 7 "as-is", and does NOT support the higer rates. It is only meant as an interim patch to at least get these boards *working*. I've tested it on an 8-port board with this chipset on it. It does not break the "regular" serial chipset support. (I put a serial mouse on a few of the ports, and it worked under X11.) Perhaps someone can review this and maybe commit it? Or is it too much of a "hack"? This is the -hackers list, right. ;) *** sio.c Mon Jan 25 23:04:01 1999 --- sio.c Tue May 4 12:24:36 1999 *************** *** 743,746 **** --- 743,747 ---- failures[1] = inb(iobase + com_ier) - IER_ETXRDY; failures[2] = inb(iobase + com_mcr) - mcr_image; + if (failures[2] == 0x80) { mcr_image |= 0x80; failures[2] = 0; } DELAY(10000); /* Some internal modems need this time */ irqmap[1] = isa_irq_pending(); *************** *** 2327,2331 **** return (bits); } ! mcr = 0; if (bits & TIOCM_DTR) mcr |= MCR_DTR; --- 2328,2332 ---- return (bits); } ! mcr = ((how != DMBIC) && (com->mcr_image & 0x80)) ? 0x80 : 0; if (bits & TIOCM_DTR) mcr |= MCR_DTR; *************** *** 2586,2590 **** * an interrupt by floating the IRQ line. */ ! outb(iobase + com_mcr, (sp->mcr & MCR_IENABLE) | MCR_DTR | MCR_RTS); } --- 2587,2591 ---- * an interrupt by floating the IRQ line. */ ! outb(iobase + com_mcr, (sp->mcr & MCR_IENABLE) | MCR_DTR | MCR_RTS | (sp->mcr & 0x80) ? 0x80 : 0); } --- Mark J. Taylor Networking Research Cybernet Systems mtaylor@cybernet.com 727 Airport Blvd. PHONE (734) 668-2567 Ann Arbor, MI 48108 FAX (734) 668-8780 http://www.cybernet.com/ http://www.netmax.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message