| Linux Forum Index » Linux Hardware » help with PCI driver |
|
Page 1 of 1 |
|
| Author |
Message |
| DB |
Posted: Fri May 19, 2006 10:11 am |
|
|
|
Guest
|
Hello all,
I have a linux driver for a 4-input DVB card. I have two other ASI
cards that transmit data and the 4 receivers of DVB card receive the
data. When I make the driver, it installs fine. dmesg shows everything
alright. The test applications run perfectly okay too. After that, I
tried testing the driver. So, I stopped and started the transmitters
and receivers several times. After certain attempts (no pattern really)
to stop and start, the machine completely freezes. I have to manually
power the machine down. But, when I use only one ASI card (one
transmitter and two receivers on the DVB card), it all works fine. I
am running Fedora Core 4.
Can anyone help me debug the code? Or else, at least, shed some light
on the debugging side of it. Any help is appreciated. I can post the
driver code as well if anyone would like to see it. I am guessing its
the interrupts that are not being released properly.
Here's the code to restart the process. Can anyone tell me if you see
anything wrong in here?
dvbm_qlf_rxstart (struct master_iface *iface)
{
struct master_dev *card = iface->card;
const unsigned int channel = dvbm_qlf_index (iface);
unsigned int reg;
/* Enable and start DMA */
writel (lsdma_dma_to_desc_low (lsdma_head_desc_bus_addr
(iface->dma)),
card->bridge_addr + LSDMA_DESC(channel));
clear_bit (0, &iface->dma_done);
wmb ();
writel (LSDMA_CH_CSR_INTDONEENABLE | LSDMA_CH_CSR_INTSTOPENABLE
|
LSDMA_CH_CSR_DIRECTION | LSDMA_CH_CSR_ENABLE,
card->bridge_addr + LSDMA_CSR(channel));
/* Dummy read to flush PCI posted writes */
readl (card->bridge_addr + LSDMA_INTMSK);
/* Enable receiver interrupts */
spin_lock_irq (&card->irq_lock);
reg = DVBM_QLF_ICSR_RXCDIE | DVBM_QLF_ICSR_RXAOSIE |
DVBM_QLF_ICSR_RXLOSIE | DVBM_QLF_ICSR_RXOIE |
DVBM_QLF_ICSR_RXDIE;
writel (reg, card->core_addr + DVBM_QLF_ICSR(channel));
spin_unlock_irq (&card->irq_lock);
/* Enable the receiver */
spin_lock (&card->reg_lock);
reg = readl (card->core_addr + DVBM_QLF_RCR(channel));
writel (reg | DVBM_QLF_RCR_EN, card->core_addr +
DVBM_QLF_RCR(channel));
spin_unlock (&card->reg_lock);
return; |
|
|
| Back to top |
|
|
|
| Henrik Carlqvist |
Posted: Fri May 19, 2006 12:18 pm |
|
|
|
Guest
|
"DB" <bhatdinu13@gmail.com> wrote:
Quote: Can anyone help me debug the code?
First of all you need to find out where the kernel hangs. Add some printk
to the code to give you traces. The next thing is to configure syslogd.
When you reboot after a crash your last traces will be lost from any log
file as the file wasn't flushed. Instead of only logging to file you can
log to a tty with something like this in syslog.conf:
kern.* /dev/tty9
Most distributions doesn't use /dev/tty9 for anything unless a lot of X
displays are running. Once this is configured and working you will have to
switch to /dev/tty9 to see what happens there. Use ctrl-alt-f9 to see that
console.
With this configuration your console is occupied for logging so you will
have to do your work from the network. Log in with ssh from another
machine if you need to do something while searching for your bug.
regards Henrik
--
The address in the header is only to prevent spam. My real address is:
hc8(at)uthyres.com Examples of addresses which go to spammers:
root@variousus.net root@localhost |
|
|
| Back to top |
|
|
|
| Peter D. |
Posted: Sat May 20, 2006 10:06 pm |
|
|
|
Guest
|
DB wrote in comp.os.linux.hardware:
Quote: Hello all,
I have a linux driver for a 4-input DVB card. I have two other ASI
cards that transmit data and the 4 receivers of DVB card receive the
data.
[snip]
Can anyone help me debug the code?
[snip]
I am not an expert, but you might be able to find some experts if you
look at http://linuxtv.org/ and its related mailing lists.
--
Peter D.
Sig goes here... |
|
|
| Back to top |
|
|
|
| DB |
Posted: Sat May 20, 2006 11:49 pm |
|
|
|
Guest
|
Thanks a lot for your reply. I appreciate it. I will try that out on
Monday. |
|
|
| Back to top |
|
|
|
|