bugs




BACK ..


BUG (serielle Schnittstelle): "Silo overflow" ============================================= Joseph Jacobson wrote: > > Just got this error, doing a 'make fetch' over ppp, while running mpg123. > Kernel config can be provided if needed. > > sio0: 1 more silo overflow (total 1) > sio0: 1 more silo overflow (total 2) > sio0: 1 more silo overflow (total 3) > sio0: 1 more silo overflow (total 4) > sio0: 1 more silo overflow (total 5) > sio0: 1 more silo overflow (total 6) This is a frequently reported problem. It is, for the most part, harmless. You will find an abundance of history by searching the mail archives. Apparently some recent changes involving 'fast' interrupt handling will cause FreeBSD to neglect a serial port for a bit too long, and incoming data isn't read from the device before it is lost. The following patch seems to help. It lowers the fifo threshold a bit causing more frequent reads from the device. It also increases interrupt frequency which, to some, seems rather tragic. I've never felt any pain as a result of 'too many' interrupts from a serial port, but I like not getting the silo overflows. This hack isn't Right(tm), but it does work. --- sio.c.orig Wed Aug 16 09:29:34 2000 +++ sio.c Fri Sep 1 14:53:47 2000 @@ -2345,7 +2345,7 @@ * latencies are larger. */ com->fifo_image = t->c_ospeed <= 4800 - ? FIFO_ENABLE : FIFO_ENABLE | FIFO_RX_HIGH; + ? FIFO_ENABLE : FIFO_ENABLE | FIFO_RX_MEDH; #ifdef COM_ESP /* * The Hayes ESP card needs the fifo DMA mode bit set No promises about whether this patch will apply to your version of src/sys/isa/sio.c. I usually just change the one line by hand. ############################################################################### # In FreeBSD 4.7 RELEASE, in dem dieses Problem auch besteht, sieht der entsprechende Teil wie folgt aus: 2466 if (com->hasfifo && divisor != 0) { 2467 /* 2468 * Use a fifo trigger level low enough so that the inpu t 2469 * latency from the fifo is less than about 16 msec and 2470 * the total latency is less than about 30 msec. These 2471 * latencies are reasonable for humans. Serial comms 2472 * protocols shouldn't expect anything better since mod em 2473 * latencies are larger. 2474 * 2475 * Interrupts can be held up for long periods of time 2476 * due to inefficiencies in other parts of the kernel, 2477 * certain video cards, etc. Setting the FIFO trigger 2478 * point to MEDH instead of HIGH gives us 694uS of slop 2479 * (8 character times) instead of 173uS (2 character ti mes) 2480 * @ 115200 bps. 2481 */ 2482 com->fifo_image = t->c_ospeed <= 4800 2483 ? FIFO_ENABLE : FIFO_ENABLE | FIFO_RX _MEDH; 2484 #ifdef COM_ESP 2485 /* 2486 * The Hayes ESP card needs the fifo DMA mode bit set 2487 * in compatibility mode. If not, it will interrupt 2488 * for each character received. 2489 */ 2490 if (com->esp) 2491 com->fifo_image |= FIFO_DMA_MODE; 2492 #endif 2493 sio_setreg(com, com_fifo, com->fifo_image); 2494 } Beachten Sie, das hier der relevante Teil mehr als 130 Zeilen tiefer liegt als in dem oben genannten Patch! Obwohl die trigger point schon von "FIFO_RX_HIGH" auf "FIFO_RX_MEDH" gesetzt is t (wie duch den Petch "empfohlen") habe ich das Problem immer noch. ############################################################################### # Das Problem wird auch in der man-Page genannt. Die Puffer sind schon wieder lee r bevor sie ausgelesen wurden. Das Problem tritt meistens (aber nicht nur) auf, wenn die Geschwindigkeit der seriallen Schnittstelle (oder des seriallen Geraetes) zu hoch eingestellt wurde. Auf einigen Internetseiten wird beschrieben wie man das Problem durch abschalte n des IRQ-sharings beheben kann. Dabei ist nur zu beachten, das der entsprechend e IRQ dann von keinem anderen Geraet mehr verwendet werden kann! ############################################################################### # LOESUNG in meinem Fall: ======================= Das Problem trat mit einem "ASUS-P5A + K6-2-400" und FreeBSD 4.4 noch nicht auf , nach dem Update auf FreeBSD 4.7 hatte ich den Fehler "silo overflow". Dieser lies sich nur durch den Austausch der genannten Hardwarekomponennten gegen "ABIT-PB6 + P2-Celeron-366" beheben! Seltsam, aber so war es...