From owner-freebsd-stable Tue Apr 25 6:58:41 2000 Delivered-To: freebsd-stable@freebsd.org Received: from jking1.lgc.com (jking1.lgc.com [134.132.228.2]) by hub.freebsd.org (Postfix) with ESMTP id D4DC437B6AD for ; Tue, 25 Apr 2000 06:58:35 -0700 (PDT) (envelope-from king@sstar.com) Received: from jking (jking.lgc.com [134.132.75.164]) by jking1.lgc.com (8.9.3/8.9.3) with SMTP id IAA00608; Tue, 25 Apr 2000 08:58:23 -0500 (CDT) (envelope-from king@sstar.com) Message-ID: <001301bfaebe$5717cca0$a44b8486@jking> From: "Jim King" To: Cc: References: <5564.000424@pd.chel.ru><20000424114057.A692@pir.net><14596.37283.563515.214828@localhost.nantes.kisoft-services.com><003801bfae25$39a6d100$a44b8486@jking> <14597.37879.611136.906144@localhost.nantes.kisoft-services.com> Subject: Re: sio interrupt handler problem Date: Tue, 25 Apr 2000 08:58:23 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG ----- Original Message ----- From: "Eric Masson" To: "Jim King" Cc: Sent: Tuesday, April 25, 2000 7:47 AM Subject: Re: sio interrupt handler problem On Tuesday, April 25, 2000 7:47 AM, Eric Masson wrote: > Jim King writes: > >One thing I've done in the past to overcome serial port problems is to patch > >sys/isa/sio.c to set the FIFO receive trigger level to 8 bytes instead of 14 > >(FIFO_RX_MEDH instead of FIFO_RX_HIGH). If you have a piece of hardware or > >a misbehaved driver that's causing high interrupt latency this change be > >really beneficial, and greatly outweighs the higher interrupt overhead when > >using an 8 byte trigger. > > > > > >An 8 byte trigger is a safer option that causes better operation on weird > >hardware without signifcantly changing anything on good hardware. I really > >wish sio.c would be changed to set the trigger to 8 bytes by default, or at > >least have a flags option to change the trigger level. > > > > I applied the following crappy patch to sio.c, and i still encounter the > SOs > > *** /sys/isa/sio.c.ORIGINAL Tue Apr 25 14:15:06 2000 > --- /sys/isa/sio.c Tue Apr 25 14:15:34 2000 > *************** > *** 1113,1119 **** > com->tx_fifo_size = 32; > printf(" ST16650A"); > } else { > ! com->tx_fifo_size = COM_FIFOSIZE(flags); > printf(" 16550A"); > } > } > --- 1113,1119 ---- > com->tx_fifo_size = 32; > printf(" ST16650A"); > } else { > ! com->tx_fifo_size = 8; > printf(" 16550A"); > } > } > > > sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 > sio0: type 16550A lookalike with 8 bytes FIFO > > sio0: 1 more silo overflow (total 1) > sio0: 1 more silo overflow (total 2) > sio0: 1 more silo overflow (total 3) > sio0: 2 more silo overflows (total 5) > sio0: 1 more silo overflow (total 6) > sio0: 1 more silo overflow (total 7) > sio0: 2 more silo overflows (total 9) > sio0: 2 more silo overflows (total 11) > sio0: 1 more silo overflow (total 12) > sio0: 1 more silo overflow (total 13) > sio0: 1 more silo overflow (total 14) > sio0: 2 more silo overflows (total 16) > > Did I understand your point ? (Kernel patching isn't part of my daily work > :). You need to patch the code that sets the FIFO receive trigger level. I think all you did was change the number that gets printed when the port is probed. :-( Look for a line like: com->fifo_image = t->c_ospeed <= 4800 ? FIFO_ENABLE : FIFO_ENABLE | FIFO_RX_HIGH; Change the "FIFO_RX_HIGH" to "FIFO_RX_MEDH". Jim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message