summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew de Quincy <devnull@localhost>2004-11-13 19:25:48 +0000
committerAndrew de Quincy <devnull@localhost>2004-11-13 19:25:48 +0000
commit8a325281bffaeda980f6d11cd22cd1be38a4a166 (patch)
tree81d4dddd821ada7917ca2830bbca80ea548ef3aa
parentee62618e61e336e3f62e9b07d95650d46e87eadb (diff)
downloadmediapointer-dvb-s2-8a325281bffaeda980f6d11cd22cd1be38a4a166.tar.gz
mediapointer-dvb-s2-8a325281bffaeda980f6d11cd22cd1be38a4a166.tar.bz2
Fix saa7146 timeout problem
-rw-r--r--linux/drivers/media/dvb/ttpci/budget-core.c13
-rw-r--r--linux/drivers/media/dvb/ttpci/budget.h4
2 files changed, 9 insertions, 8 deletions
diff --git a/linux/drivers/media/dvb/ttpci/budget-core.c b/linux/drivers/media/dvb/ttpci/budget-core.c
index 6aa42a04d..c85ab0635 100644
--- a/linux/drivers/media/dvb/ttpci/budget-core.c
+++ b/linux/drivers/media/dvb/ttpci/budget-core.c
@@ -154,7 +154,8 @@ static void vpeirq(unsigned long data)
}
-int ttpci_budget_debiread(struct budget *budget, u32 config, int addr, int count, int uselocks)
+int ttpci_budget_debiread(struct budget *budget, u32 config, int addr, int count,
+ int uselocks, int nobusyloop)
{
struct saa7146_dev *saa = budget->dev;
int result = 0;
@@ -166,7 +167,7 @@ int ttpci_budget_debiread(struct budget *budget, u32 config, int addr, int count
if (uselocks)
spin_lock_irqsave(&budget->debilock, flags);
- if ((result = saa7146_wait_for_debi_done(saa, !uselocks)) < 0) {
+ if ((result = saa7146_wait_for_debi_done(saa, nobusyloop)) < 0) {
if (uselocks)
spin_unlock_irqrestore(&budget->debilock, flags);
return result;
@@ -177,7 +178,7 @@ int ttpci_budget_debiread(struct budget *budget, u32 config, int addr, int count
saa7146_write(saa, DEBI_PAGE, 0);
saa7146_write(saa, MC2, (2 << 16) | 2);
- if ((result = saa7146_wait_for_debi_done(saa, !uselocks)) < 0) {
+ if ((result = saa7146_wait_for_debi_done(saa, nobusyloop)) < 0) {
if (uselocks)
spin_unlock_irqrestore(&budget->debilock, flags);
return result;
@@ -193,7 +194,7 @@ int ttpci_budget_debiread(struct budget *budget, u32 config, int addr, int count
}
int ttpci_budget_debiwrite(struct budget *budget, u32 config, int addr,
- int count, u32 value, int uselocks)
+ int count, u32 value, int uselocks, int nobusyloop)
{
struct saa7146_dev *saa = budget->dev;
unsigned long flags = 0;
@@ -205,7 +206,7 @@ int ttpci_budget_debiwrite(struct budget *budget, u32 config, int addr,
if (uselocks)
spin_lock_irqsave(&budget->debilock, flags);
- if ((result = saa7146_wait_for_debi_done(saa, !uselocks)) < 0) {
+ if ((result = saa7146_wait_for_debi_done(saa, nobusyloop)) < 0) {
if (uselocks)
spin_unlock_irqrestore(&budget->debilock, flags);
return result;
@@ -217,7 +218,7 @@ int ttpci_budget_debiwrite(struct budget *budget, u32 config, int addr,
saa7146_write(saa, DEBI_AD, value);
saa7146_write(saa, MC2, (2 << 16) | 2);
- if ((result = saa7146_wait_for_debi_done(saa, !uselocks)) < 0) {
+ if ((result = saa7146_wait_for_debi_done(saa, nobusyloop)) < 0) {
if (uselocks)
spin_unlock_irqrestore(&budget->debilock, flags);
return result;
diff --git a/linux/drivers/media/dvb/ttpci/budget.h b/linux/drivers/media/dvb/ttpci/budget.h
index 768dc05a4..12d5d006e 100644
--- a/linux/drivers/media/dvb/ttpci/budget.h
+++ b/linux/drivers/media/dvb/ttpci/budget.h
@@ -101,8 +101,8 @@ extern int ttpci_budget_deinit(struct budget *budget);
extern void ttpci_budget_irq10_handler(struct saa7146_dev *dev, u32 * isr);
extern void ttpci_budget_set_video_port(struct saa7146_dev *dev, int video_port);
extern int ttpci_budget_debiread(struct budget *budget, u32 config, int addr, int count,
- int uselocks);
+ int uselocks, int nobusyloop);
extern int ttpci_budget_debiwrite(struct budget *budget, u32 config, int addr, int count, u32 value,
- int uselocks);
+ int uselocks, int nobusyloop);
#endif