diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-03-13 17:24:19 +0100 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2009-03-13 17:24:19 +0100 |
commit | 01cbd287bd3f93c3402e8bd46d5c92aec838da2e (patch) | |
tree | 762eeee59fb2f50994f6847287ee08f87dbf9b9d /linux/drivers/media | |
parent | 5da9d7f5f979a7489135b5030c3c5cfe68a2a4fb (diff) | |
download | mediapointer-dvb-s2-01cbd287bd3f93c3402e8bd46d5c92aec838da2e.tar.gz mediapointer-dvb-s2-01cbd287bd3f93c3402e8bd46d5c92aec838da2e.tar.bz2 |
cx23885: fix crash on non-netup cards
From: Hans Verkuil <hverkuil@xs4all.nl>
The new support for the CX23885_BOARD_NETUP_DUAL_DVBS2_CI board broke the
existing boards. Interrupts for the netup part were enabled and handled
without testing whether the current board actually had a netup -> instant
and fatal crash.
I've added tests to do this only for the CX23885_BOARD_NETUP_DUAL_DVBS2_CI
board.
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/video/cx23885/cx23885-core.c | 10 | ||||
-rw-r--r-- | linux/drivers/media/video/cx23885/cx23885-dvb.c | 6 |
2 files changed, 13 insertions, 3 deletions
diff --git a/linux/drivers/media/video/cx23885/cx23885-core.c b/linux/drivers/media/video/cx23885/cx23885-core.c index 6ae7ee247..d894d4900 100644 --- a/linux/drivers/media/video/cx23885/cx23885-core.c +++ b/linux/drivers/media/video/cx23885/cx23885-core.c @@ -1710,7 +1710,8 @@ static irqreturn_t cx23885_irq(int irq, void *dev_id) PCI_MSK_GPIO1); } - if ((pci_status & PCI_MSK_GPIO0) || (pci_status & PCI_MSK_GPIO1)) + if (cx23885_boards[dev->board].cimax > 0 && + ((pci_status & PCI_MSK_GPIO0) || (pci_status & PCI_MSK_GPIO1))) /* handled += cx23885_irq_gpio(dev, pci_status); */ handled += netup_ci_slot_status(dev, pci_status); @@ -1786,7 +1787,12 @@ static int __devinit cx23885_initdev(struct pci_dev *pci_dev, } pci_set_drvdata(pci_dev, dev); - cx_set(PCI_INT_MSK, 0x01800000); /* for NetUP */ + + switch (dev->board) { + case CX23885_BOARD_NETUP_DUAL_DVBS2_CI: + cx_set(PCI_INT_MSK, 0x01800000); /* for NetUP */ + break; + } return 0; diff --git a/linux/drivers/media/video/cx23885/cx23885-dvb.c b/linux/drivers/media/video/cx23885/cx23885-dvb.c index 5529dcf6a..364543987 100644 --- a/linux/drivers/media/video/cx23885/cx23885-dvb.c +++ b/linux/drivers/media/video/cx23885/cx23885-dvb.c @@ -779,7 +779,11 @@ int cx23885_dvb_unregister(struct cx23885_tsport *port) if (fe0->dvb.frontend) videobuf_dvb_unregister_bus(&port->frontends); - netup_ci_exit(port); + switch (port->dev->board) { + case CX23885_BOARD_NETUP_DUAL_DVBS2_CI: + netup_ci_exit(port); + break; + } return 0; } |