Date: Tue, 29 Mar 2005 13:13:57 +0200 From: Espen Tagestad <espent@totem.fix.no> To: "M. Warner Losh" <imp@bsdimp.com> Cc: freebsd-mobile@freebsd.org Subject: Re: Sony Ericsson GC85 GPRS/EDGE pcmcia card Message-ID: <20050329111357.GA72575@totem.fix.no> In-Reply-To: <20050329.013905.97853189.imp@bsdimp.com> References: <4245DEE6.9000505@modula.no> <20050329.005702.28817035.imp@bsdimp.com> <42490EBF.6020704@modula.no> <20050329.013905.97853189.imp@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Mar 29, 2005 at 01:39:05AM -0700, M. Warner Losh wrote: > Let me rephrase: Your machine is too slow at servicing the > interrupts. Otherwise you wouldn't get an sio overflow. Lowering the > interrupt threshold can deal with this problem, since it increases the > amount of latency that your machine will have. This is 4.x, so you > should still see decent interrupt latency, even with non-fast > interrupts. This doesn't match my expectations, since I've run the > non-fast interrupts at 38400 before on 4.x, and I'd expect that > something else is going on. Either you aren't getting them, or the > device looks like a 16550 because that's all we've enabled in its > fifo, and the wireless data rates are much higher and need something > special done with them. Ok, I've reinstalled FreeBSD 4. The device appear like a 16550A in the log: sio4 at port 0x2e8-0x2ef irq 7 flags 0x40000 slot 1 on pccard1 sio4: type 16550A > Getting sio overflows means that packet checksums should fail and > retransmission should happen. If you get only a few, it should still > work. chances are good that simpler, less bursty/chatty protocols > work better, which is what you are seeing. Ok. > On second thought you may benefit from using isa interrupts. > hw.pcic_intr_path=1 will allow you to assign interrupts via > pccard.conf. This may or may not help. If it doesn't, make sure you > are actually getting the interrupt (vmstat -i). Now that worked. Setting hw.pcic.intr_path=1 let me force the sio-device to irq 7. All messages are now gone, but the card still seems to have problems. The "unable to activate interrupt in fast mode - using normal mode" is gone, and I can't get any more sio overflows in the systemlog. vmstat -i shows that sio4 irq7 is getting a lot of interrupts. Could it be that it is in a conflict with other hardware on the system? I know that the paralell port may use irq7. I have disabled it in my kernel config, though. > Do you know if your card is actually respecting the baud rate set, or > just sending it as fast as it can? What data rates does the device > handle? I have no idea. The card should support higher data rates than 115200, because EDGE can go up to 238kbps (almost 3G). In Windows the card is also a com port, but the highest posible baud rate is 115200. I guess you need a little more to achieve 238kbps. > com->fifo_image = com->unit == siotsunit ? 0 > : t->c_ispeed <= 4800 > ? FIFO_ENABLE : FIFO_ENABLE | FIFO_RX_MEDH; > > You might change this to be FIFO_ENABLE, which will give you more > interrupts, but a greater interrupt tolerenace. You should also > investigating to see if the card has a larger fifo that can be enabled > (because it really is a 16650 or 16950 or the like). This may help > quite a bit if the card emulates something with a much larger fifo. I done that too. The log entries may gave disappeared because of that, not the hard setting of irq7 via hw.pcic.intr_path and pcmcia.conf. Maybe I should try them one at a time, I think I got too optimistic here :) But still I have the same problem. > Are you sure you are even getting interrupts for the sio card? vmstat > -i will tell you. Otherwise, sio is falling back into polling mode, > which works OK for slow data speeds, be terrible at high data rate. Yes, it is getting interrupts according to the output of vmstat -i, at irq7. I have also now tried to connect with the port set to both 115200 and 38400. But the result is the same.... :( > Right now, I'd concentrate on understanding why 4.x fails. I've run > non-fast interrupts there as fast as 38400 w/o lost data on a 4.x > laptop. 5.x's interrupt preformance might not be as good as 4.x's, so > we should try to track down why interrupt latency is hurting you so > much more than it hurts others. That's ok. As I said I reinstalled FreeBSD 4 now, so we can try solving it there first. I've also tried running at 38400, see above. regards, Espen
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050329111357.GA72575>