* Technotrend TT-Connect S-2400
@ 2009-08-23 4:49 Markus Schuss
2009-08-24 17:17 ` David
0 siblings, 1 reply; 4+ messages in thread
From: Markus Schuss @ 2009-08-23 4:49 UTC (permalink / raw)
To: linux-media
Hi,
i have some problems getting a technotrend tt-connect s-2400 usb dvb-s
card to work. the problem is not unknown (as mentioned at
http://lkml.org/lkml/2009/5/23/95) but i have no idea how to fix this.
(any help according to the remote of this card would also be appreciated)
dmesg:
usb 2-2.1: new high speed USB device using ehci_hcd and address 19
usb 2-2.1: configuration #1 chosen from 1 choice
dvb-usb: found a 'Technotrend TT-connect S-2400' in cold state, will try
to load a firmware
usb 2-2.1: firmware: requesting dvb-usb-tt-s2400-01.fw
dvb-usb: downloading firmware from file 'dvb-usb-tt-s2400-01.fw'
usb 2-2.1: USB disconnect, address 19
dvb-usb: generic DVB-USB module successfully deinitialized and
disconnected.
usb 2-2.1: new high speed USB device using ehci_hcd and address 20
usb 2-2.1: configuration #1 chosen from 1 choice
dvb-usb: found a 'Technotrend TT-connect S-2400' in warm state.
dvb-usb: will pass the complete MPEG2 transport stream to the software
demuxer.
DVB: registering new adapter (Technotrend TT-connect S-2400)
DVB: registering adapter 0 frontend 0 (Philips TDA10086 DVB-S)...
LNBx2x attached on addr=8<3>dvb-usb: recv bulk message failed: -110
ttusb2: there might have been an error during control message transfer.
(rlen = 0, was 0)
dvb-usb: Technotrend TT-connect S-2400 successfully initialized and
connected.
Thanks,
schuschu
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Technotrend TT-Connect S-2400
2009-08-23 4:49 Technotrend TT-Connect S-2400 Markus Schuss
@ 2009-08-24 17:17 ` David
2009-08-24 18:09 ` André Weidemann
0 siblings, 1 reply; 4+ messages in thread
From: David @ 2009-08-24 17:17 UTC (permalink / raw)
To: Markus Schuss; +Cc: linux-media
Markus Schuss wrote:
> Hi,
>
> i have some problems getting a technotrend tt-connect s-2400 usb dvb-s
> card to work. the problem is not unknown (as mentioned at
> http://lkml.org/lkml/2009/5/23/95) but i have no idea how to fix this.
> (any help according to the remote of this card would also be appreciated)
This breakage was caused by USB changes introduced in 2.6.27, and it's
still broken as of 2.6.30. The 2.6.31rc should have the fix, and I have
a patch for 2.6.30 if you want it.
David
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Technotrend TT-Connect S-2400
2009-08-24 17:17 ` David
@ 2009-08-24 18:09 ` André Weidemann
2009-08-25 19:06 ` David
0 siblings, 1 reply; 4+ messages in thread
From: André Weidemann @ 2009-08-24 18:09 UTC (permalink / raw)
Cc: linux-media
Hi David,
On 24.08.2009 19:17, David wrote:
> still broken as of 2.6.30. The 2.6.31rc should have the fix, and I have
> a patch for 2.6.30 if you want it.
Could please post a link to this patch? I think that a few people on
this list, including me, are interested in a solution.
Regards.
André
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Technotrend TT-Connect S-2400
2009-08-24 18:09 ` André Weidemann
@ 2009-08-25 19:06 ` David
0 siblings, 0 replies; 4+ messages in thread
From: David @ 2009-08-25 19:06 UTC (permalink / raw)
To: André Weidemann; +Cc: linux-media
[-- Attachment #1: Type: text/plain, Size: 360 bytes --]
André Weidemann wrote:
> Could please post a link to this patch? I think that a few people on
> this list, including me, are interested in a solution.
The patches should be small enough to post here and are attached. They
were sent to me by Alan Stern when he was looking at the issue. Apply
patch 1 then 2.
(I think they only apply to 2.6.30)
Cheers
David
[-- Attachment #2: usbpatch1.patch --]
[-- Type: text/x-diff, Size: 6575 bytes --]
Index: usb-2.6/drivers/usb/host/ehci-q.c
===================================================================
--- usb-2.6.orig/drivers/usb/host/ehci-q.c
+++ usb-2.6/drivers/usb/host/ehci-q.c
@@ -93,22 +93,6 @@ qh_update (struct ehci_hcd *ehci, struct
qh->hw_qtd_next = QTD_NEXT(ehci, qtd->qtd_dma);
qh->hw_alt_next = EHCI_LIST_END(ehci);
- /* Except for control endpoints, we make hardware maintain data
- * toggle (like OHCI) ... here (re)initialize the toggle in the QH,
- * and set the pseudo-toggle in udev. Only usb_clear_halt() will
- * ever clear it.
- */
- if (!(qh->hw_info1 & cpu_to_hc32(ehci, 1 << 14))) {
- unsigned is_out, epnum;
-
- is_out = !(qtd->hw_token & cpu_to_hc32(ehci, 1 << 8));
- epnum = (hc32_to_cpup(ehci, &qh->hw_info1) >> 8) & 0x0f;
- if (unlikely (!usb_gettoggle (qh->dev, epnum, is_out))) {
- qh->hw_token &= ~cpu_to_hc32(ehci, QTD_TOGGLE);
- usb_settoggle (qh->dev, epnum, is_out, 1);
- }
- }
-
/* HC must see latest qtd and qh data before we clear ACTIVE+HALT */
wmb ();
qh->hw_token &= cpu_to_hc32(ehci, QTD_TOGGLE | QTD_STS_PING);
@@ -893,7 +877,6 @@ done:
qh->qh_state = QH_STATE_IDLE;
qh->hw_info1 = cpu_to_hc32(ehci, info1);
qh->hw_info2 = cpu_to_hc32(ehci, info2);
- usb_settoggle (urb->dev, usb_pipeendpoint (urb->pipe), !is_input, 1);
qh_refresh (ehci, qh);
return qh;
}
@@ -928,7 +911,7 @@ static void qh_link_async (struct ehci_h
}
}
- /* clear halt and/or toggle; and maybe recover from silicon quirk */
+ /* clear halt and maybe recover from silicon quirk */
if (qh->qh_state == QH_STATE_IDLE)
qh_refresh (ehci, qh);
Index: usb-2.6/drivers/usb/host/ehci-hcd.c
===================================================================
--- usb-2.6.orig/drivers/usb/host/ehci-hcd.c
+++ usb-2.6/drivers/usb/host/ehci-hcd.c
@@ -1026,6 +1026,51 @@ done:
return;
}
+static void
+ehci_endpoint_reset(struct usb_hcd *hcd, struct usb_host_endpoint *ep)
+{
+ struct ehci_hcd *ehci = hcd_to_ehci(hcd);
+ struct ehci_qh *qh;
+ int eptype = usb_endpoint_type(&ep->desc);
+
+ if (eptype != USB_ENDPOINT_XFER_BULK && eptype != USB_ENDPOINT_XFER_INT)
+ return;
+
+ rescan:
+ spin_lock_irq(&ehci->lock);
+ qh = ep->hcpriv;
+
+ /* For Bulk and Interrupt endpoints we maintain the toggle state
+ * in the hardware; the toggle bits in udev aren't used at all.
+ * When an endpoint is reset by usb_clear_halt() we must reset
+ * the toggle bit in the QH.
+ */
+ if (qh) {
+ if (!list_empty(&qh->qtd_list)) {
+ WARN_ONCE(1, "clear_halt for a busy endpoint\n");
+ } else if (qh->qh_state == QH_STATE_IDLE) {
+ qh->hw_token &= ~cpu_to_hc32(ehci, QTD_TOGGLE);
+ } else {
+ /* It's not safe to write into the overlay area
+ * while the QH is active. Unlink it first and
+ * wait for the unlink to complete.
+ */
+ if (qh->qh_state == QH_STATE_LINKED) {
+ if (eptype == USB_ENDPOINT_XFER_BULK) {
+ unlink_async(ehci, qh);
+ } else {
+ intr_deschedule(ehci, qh);
+ (void) qh_schedule(ehci, qh);
+ }
+ }
+ spin_unlock_irq(&ehci->lock);
+ schedule_timeout_uninterruptible(1);
+ goto rescan;
+ }
+ }
+ spin_unlock_irq(&ehci->lock);
+}
+
static int ehci_get_frame (struct usb_hcd *hcd)
{
struct ehci_hcd *ehci = hcd_to_ehci (hcd);
Index: usb-2.6/drivers/usb/host/ehci-au1xxx.c
===================================================================
--- usb-2.6.orig/drivers/usb/host/ehci-au1xxx.c
+++ usb-2.6/drivers/usb/host/ehci-au1xxx.c
@@ -97,6 +97,7 @@ static const struct hc_driver ehci_au1xx
.urb_enqueue = ehci_urb_enqueue,
.urb_dequeue = ehci_urb_dequeue,
.endpoint_disable = ehci_endpoint_disable,
+ .endpoint_reset = ehci_endpoint_reset,
/*
* scheduling support
Index: usb-2.6/drivers/usb/host/ehci-fsl.c
===================================================================
--- usb-2.6.orig/drivers/usb/host/ehci-fsl.c
+++ usb-2.6/drivers/usb/host/ehci-fsl.c
@@ -309,6 +309,7 @@ static const struct hc_driver ehci_fsl_h
.urb_enqueue = ehci_urb_enqueue,
.urb_dequeue = ehci_urb_dequeue,
.endpoint_disable = ehci_endpoint_disable,
+ .endpoint_reset = ehci_endpoint_reset,
/*
* scheduling support
Index: usb-2.6/drivers/usb/host/ehci-ixp4xx.c
===================================================================
--- usb-2.6.orig/drivers/usb/host/ehci-ixp4xx.c
+++ usb-2.6/drivers/usb/host/ehci-ixp4xx.c
@@ -51,6 +51,7 @@ static const struct hc_driver ixp4xx_ehc
.urb_enqueue = ehci_urb_enqueue,
.urb_dequeue = ehci_urb_dequeue,
.endpoint_disable = ehci_endpoint_disable,
+ .endpoint_reset = ehci_endpoint_reset,
.get_frame_number = ehci_get_frame,
.hub_status_data = ehci_hub_status_data,
.hub_control = ehci_hub_control,
Index: usb-2.6/drivers/usb/host/ehci-orion.c
===================================================================
--- usb-2.6.orig/drivers/usb/host/ehci-orion.c
+++ usb-2.6/drivers/usb/host/ehci-orion.c
@@ -149,6 +149,7 @@ static const struct hc_driver ehci_orion
.urb_enqueue = ehci_urb_enqueue,
.urb_dequeue = ehci_urb_dequeue,
.endpoint_disable = ehci_endpoint_disable,
+ .endpoint_reset = ehci_endpoint_reset,
/*
* scheduling support
Index: usb-2.6/drivers/usb/host/ehci-pci.c
===================================================================
--- usb-2.6.orig/drivers/usb/host/ehci-pci.c
+++ usb-2.6/drivers/usb/host/ehci-pci.c
@@ -388,6 +388,7 @@ static const struct hc_driver ehci_pci_h
.urb_enqueue = ehci_urb_enqueue,
.urb_dequeue = ehci_urb_dequeue,
.endpoint_disable = ehci_endpoint_disable,
+ .endpoint_reset = ehci_endpoint_reset,
/*
* scheduling support
Index: usb-2.6/drivers/usb/host/ehci-ppc-of.c
===================================================================
--- usb-2.6.orig/drivers/usb/host/ehci-ppc-of.c
+++ usb-2.6/drivers/usb/host/ehci-ppc-of.c
@@ -61,6 +61,7 @@ static const struct hc_driver ehci_ppc_o
.urb_enqueue = ehci_urb_enqueue,
.urb_dequeue = ehci_urb_dequeue,
.endpoint_disable = ehci_endpoint_disable,
+ .endpoint_reset = ehci_endpoint_reset,
/*
* scheduling support
Index: usb-2.6/drivers/usb/host/ehci-ps3.c
===================================================================
--- usb-2.6.orig/drivers/usb/host/ehci-ps3.c
+++ usb-2.6/drivers/usb/host/ehci-ps3.c
@@ -65,6 +65,7 @@ static const struct hc_driver ps3_ehci_h
.urb_enqueue = ehci_urb_enqueue,
.urb_dequeue = ehci_urb_dequeue,
.endpoint_disable = ehci_endpoint_disable,
+ .endpoint_reset = ehci_endpoint_reset,
.get_frame_number = ehci_get_frame,
.hub_status_data = ehci_hub_status_data,
.hub_control = ehci_hub_control,
[-- Attachment #3: usbpatch2.patch --]
[-- Type: text/x-diff, Size: 3669 bytes --]
Index: usb-2.6/drivers/usb/host/ehci-hcd.c
===================================================================
--- usb-2.6.orig/drivers/usb/host/ehci-hcd.c
+++ usb-2.6/drivers/usb/host/ehci-hcd.c
@@ -1032,12 +1032,14 @@ ehci_endpoint_reset(struct usb_hcd *hcd,
struct ehci_hcd *ehci = hcd_to_ehci(hcd);
struct ehci_qh *qh;
int eptype = usb_endpoint_type(&ep->desc);
+ int epnum = usb_endpoint_num(&ep->desc);
+ int is_out = usb_endpoint_dir_out(&ep->desc);
+ unsigned long flags;
if (eptype != USB_ENDPOINT_XFER_BULK && eptype != USB_ENDPOINT_XFER_INT)
return;
- rescan:
- spin_lock_irq(&ehci->lock);
+ spin_lock_irqsave(&ehci->lock, flags);
qh = ep->hcpriv;
/* For Bulk and Interrupt endpoints we maintain the toggle state
@@ -1046,29 +1048,24 @@ ehci_endpoint_reset(struct usb_hcd *hcd,
* the toggle bit in the QH.
*/
if (qh) {
+ usb_settoggle(qh->dev, epnum, is_out, 0);
if (!list_empty(&qh->qtd_list)) {
WARN_ONCE(1, "clear_halt for a busy endpoint\n");
- } else if (qh->qh_state == QH_STATE_IDLE) {
- qh->hw_token &= ~cpu_to_hc32(ehci, QTD_TOGGLE);
- } else {
- /* It's not safe to write into the overlay area
- * while the QH is active. Unlink it first and
- * wait for the unlink to complete.
+ } else if (qh->qh_state == QH_STATE_LINKED) {
+
+ /* The toggle value in the QH can't be updated
+ * while the QH is active. Unlink it now;
+ * re-linking will call qh_refresh().
*/
- if (qh->qh_state == QH_STATE_LINKED) {
- if (eptype == USB_ENDPOINT_XFER_BULK) {
- unlink_async(ehci, qh);
- } else {
- intr_deschedule(ehci, qh);
- (void) qh_schedule(ehci, qh);
- }
+ if (eptype == USB_ENDPOINT_XFER_BULK) {
+ unlink_async(ehci, qh);
+ } else {
+ intr_deschedule(ehci, qh);
+ (void) qh_schedule(ehci, qh);
}
- spin_unlock_irq(&ehci->lock);
- schedule_timeout_uninterruptible(1);
- goto rescan;
}
}
- spin_unlock_irq(&ehci->lock);
+ spin_unlock_irqrestore(&ehci->lock, flags);
}
static int ehci_get_frame (struct usb_hcd *hcd)
Index: usb-2.6/drivers/usb/host/ehci-q.c
===================================================================
--- usb-2.6.orig/drivers/usb/host/ehci-q.c
+++ usb-2.6/drivers/usb/host/ehci-q.c
@@ -93,6 +93,22 @@ qh_update (struct ehci_hcd *ehci, struct
qh->hw_qtd_next = QTD_NEXT(ehci, qtd->qtd_dma);
qh->hw_alt_next = EHCI_LIST_END(ehci);
+ /* Except for control endpoints, we make hardware maintain data
+ * toggle (like OHCI) ... here (re)initialize the toggle in the QH,
+ * and set the pseudo-toggle in udev. Only usb_clear_halt() will
+ * ever clear it.
+ */
+ if (!(qh->hw_info1 & cpu_to_hc32(ehci, 1 << 14))) {
+ unsigned is_out, epnum;
+
+ is_out = !(qtd->hw_token & cpu_to_hc32(ehci, 1 << 8));
+ epnum = (hc32_to_cpup(ehci, &qh->hw_info1) >> 8) & 0x0f;
+ if (unlikely (!usb_gettoggle (qh->dev, epnum, is_out))) {
+ qh->hw_token &= ~cpu_to_hc32(ehci, QTD_TOGGLE);
+ usb_settoggle (qh->dev, epnum, is_out, 1);
+ }
+ }
+
/* HC must see latest qtd and qh data before we clear ACTIVE+HALT */
wmb ();
qh->hw_token &= cpu_to_hc32(ehci, QTD_TOGGLE | QTD_STS_PING);
@@ -877,6 +893,7 @@ done:
qh->qh_state = QH_STATE_IDLE;
qh->hw_info1 = cpu_to_hc32(ehci, info1);
qh->hw_info2 = cpu_to_hc32(ehci, info2);
+ usb_settoggle (urb->dev, usb_pipeendpoint (urb->pipe), !is_input, 1);
qh_refresh (ehci, qh);
return qh;
}
@@ -911,7 +928,7 @@ static void qh_link_async (struct ehci_h
}
}
- /* clear halt and maybe recover from silicon quirk */
+ /* clear halt and/or toggle; and maybe recover from silicon quirk */
if (qh->qh_state == QH_STATE_IDLE)
qh_refresh (ehci, qh);
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-08-25 19:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-23 4:49 Technotrend TT-Connect S-2400 Markus Schuss
2009-08-24 17:17 ` David
2009-08-24 18:09 ` André Weidemann
2009-08-25 19:06 ` David
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox