ChangeSet 1.2231.1.228, 2005/03/28 20:19:42-08:00, [EMAIL PROTECTED]
[PATCH] dvb: fix CAMs on Typhoon DVB-S
Fix for CAMs on Typhoon DVB-S, where it would constantly reset itself.
(Kenneth Aafloy)
Signed-off-by: Johannes Stezenbach <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
dvb-core/dvb_ca_en50221.c | 2 +-
ttpci/budget-av.c | 13 ++++++++++++-
2 files changed, 13 insertions(+), 2 deletions(-)
diff -Nru a/drivers/media/dvb/dvb-core/dvb_ca_en50221.c
b/drivers/media/dvb/dvb-core/dvb_ca_en50221.c
--- a/drivers/media/dvb/dvb-core/dvb_ca_en50221.c 2005-03-28 21:59:04
-08:00
+++ b/drivers/media/dvb/dvb-core/dvb_ca_en50221.c 2005-03-28 21:59:04
-08:00
@@ -974,7 +974,7 @@
if (ca->open) {
if ((!ca->slot_info[slot].da_irq_supported) ||
(!(ca->flags &
DVB_CA_EN50221_FLAG_IRQ_DA))) {
- delay = HZ / 100;
+ delay = HZ / 10;
}
}
break;
diff -Nru a/drivers/media/dvb/ttpci/budget-av.c
b/drivers/media/dvb/ttpci/budget-av.c
--- a/drivers/media/dvb/ttpci/budget-av.c 2005-03-28 21:59:04 -08:00
+++ b/drivers/media/dvb/ttpci/budget-av.c 2005-03-28 21:59:04 -08:00
@@ -121,6 +121,8 @@
return -EINVAL;
saa7146_setgpio(budget_av->budget.dev, 1, SAA7146_GPIO_OUTHI);
+ udelay(1);
+
result = ttpci_budget_debiread(&budget_av->budget, DEBICICAM, address &
0xfff, 1, 0, 0);
if (result == -ETIMEDOUT)
@@ -137,6 +139,8 @@
return -EINVAL;
saa7146_setgpio(budget_av->budget.dev, 1, SAA7146_GPIO_OUTHI);
+ udelay(1);
+
result = ttpci_budget_debiwrite(&budget_av->budget, DEBICICAM, address
& 0xfff, 1, value, 0, 0);
if (result == -ETIMEDOUT)
@@ -153,6 +157,8 @@
return -EINVAL;
saa7146_setgpio(budget_av->budget.dev, 1, SAA7146_GPIO_OUTLO);
+ udelay(1);
+
result = ttpci_budget_debiread(&budget_av->budget, DEBICICAM, address &
3, 1, 0, 0);
if (result == -ETIMEDOUT)
@@ -169,6 +175,8 @@
return -EINVAL;
saa7146_setgpio(budget_av->budget.dev, 1, SAA7146_GPIO_OUTLO);
+ udelay(1);
+
result = ttpci_budget_debiwrite(&budget_av->budget, DEBICICAM, address
& 3, 1, value, 0, 0);
if (result == -ETIMEDOUT)
@@ -190,7 +198,10 @@
saa7146_setgpio(saa, 0, SAA7146_GPIO_OUTHI);
msleep(100);
saa7146_setgpio(saa, 0, SAA7146_GPIO_OUTLO);
- msleep(2000); /* horrendous I know, but its the only way to
be absolutely sure without an IRQ line! */
+
+ int max = 20;
+ while (--max > 0 && ciintf_read_attribute_mem(ca, slot, 0) != 0x1d)
+ msleep(100);
ttpci_budget_set_video_port(saa, BUDGET_VIDEO_PORTB);
return 0;
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html