Hello!

This has been bugging me for some time now, so I thought I'd fish for
ideas.

The device in question is a wireless transceiver with max rate 2 Mbit/s.
It has 3 32-byte RX buffers, and all data and commands (except external
interrupt and chip enable pins) is transferred through <=10 MHz SPI bus.

At max speed this makes receiving difficult, since there's >7000 packets
per second (and using all three buffers still makes it necessary to have
delay between transfers <0.4 ms).

The simple solution with irqs handled in workqueue missed packets, I
guess it couldn't keep up; reasonable, since the delays are very small.
The tasklet or "do it in irq handler" solutions proved a bit tricky,
since commands and transfers had to be handled with spi_async, callbacks
then called another spi_async etc. until the last one.

My hack to disable interrupt preempting an in interrupt currently
handled (a chain of spi commands like: get irq status, receive packet,
ack irq) was to spin_lock() before first spi command, and spin_unlock()
on the last callback. Seems to kinda work, but I'm not happy, and it
occasionally complained about different spinlock owner.

Is there a nice alternative to this spinlock i've been using?
Any other related ideas?


        Domen

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to