Sony Ericsson GC85 GPRS/EDGE pcmcia card
M. Warner Losh
imp at bsdimp.com
Tue Mar 29 00:42:46 PST 2005
In message: <42490EBF.6020704 at modula.no>
Espen Tagestad <espen at modula.no> writes:
: M. Warner Losh wrote:
: > That's because you have a slow machine :-(. Its interrupt latency is
: > too large. You're best bet is to hack sio.c to have a lower interrupt
: > threshold.
:
: I don't think my machine is too slow, it is a 1,8Ghz Pentium 4 Mobile.
: I'll have a look in sio.c on how to lower the interrupt threshold.
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.
: > : I've read a lot of documentation on the net about this issue, and I
: > : think I've tried most of the tips and tricks suggested. I tried to
: > : change the irq assigned for the card without luck, I have set the
: > : cp4ticks to 4096 in sio.c (that removed the interrupt-level buffer
: > : overflows in the log, but then network still don't work as it should), I
: > : changed the list of available irqs in pccard.conf, and I really don't
: > : know what to do next.
: >
: > What does it mean 'network doesn't work'.
:
: I get connected, but when transfering special amounts of data (may be
: binary) the network does not respond. Another example is that ssh don't
: work unless I use ssh version 1. http works, but https does not. And
: when the network doesn't work (but I am still connected via ppp) I get
: this sio overflows in the log.
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.
: > : The irq seems to be hardcoded to 3, but in Windows it shows up with irq
: > : 7, which in the FreeBSD log I get a message like this: stray irq 7. The
: > : card works well in Windows, so I don't think is a hardware problem.
: >
: > Yes. We use pci interrupts when we can with oldcard. One can use
: > other kinds of interrupts, but I doubt that will help too much...
:
: Hmm, 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).
: > : Does anyone have any tips or suggestions on how to get this card to work
: > : properly with FreeBSD? Has anyone managed to get this card, or some of
: > : the other Sony-Ericsson GC-cards, to work at all with FreeBSD?
: >
: > Hacking sio.c is your best bet. If you can service the interrupts
: > fast enough, and get the data into ppp, it should work. If you are
: > getting the data and the network isn't working, then you'll need to
: > diagnose why.
:
: I'm very sure that there's a problem with the interrupts, since I'm
: getting these sio overflows in my log. They often appear when the
: network do not respond. Do you have any tips on what to look for in
: sio.c? :) On FreeBSD 4 I increased cp4ticks to 4096, after someone (I
: don't remember where) said that this value could be too small for
: 115200. I've also set the speed in ppp.conf to 9200, but still the same
: result.
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?
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.
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.
: > : PS. The reason why I don't run FreeBSD 5 is that it just don't work on
: > : thia laptop at all.
: >
: > bummer.
:
: Well, I got FreeBSD 5 working yesterday, as I wrote in one of my
: previous posts. The symptoms is the same, but it takes much longer time
: until I get the sio interrupt-overflows in the system log. Often I get
: only one log entry, but the network is still not responding as it should.
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.
Warner
More information about the freebsd-mobile
mailing list