* [PATCH 0/1] rts5139 Fix SD card detection and use correct transfer interval
@ 2013-06-01 16:22 Marcus Overhagen
2013-06-01 16:22 ` [PATCH 1/1] " Marcus Overhagen
0 siblings, 1 reply; 4+ messages in thread
From: Marcus Overhagen @ 2013-06-01 16:22 UTC (permalink / raw)
To: LKML
The SD card reader slot on my Samsung Series 7 ultrabook
never worked and still wasn't working with 3.10-rc3, also
the syslog was spammed. The following patch fixes both.
The timeout detection implemented in this driver isn't very
robust, although the USB interrupt transfer is successful,
the polling thread often reported timeouts because the 50ms
had expired before it got scheduled, and the SD card wasn't
detected. Increasing it to 100ms at least makes it work.
Using the correct interval as reported by the endpoint also
stops the syslog spam printed by xhci.
Marcus Overhagen (1):
Fix SD card detection and use correct transfer interval.
drivers/staging/rts5139/rts51x_transport.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--
1.8.1.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/1] Fix SD card detection and use correct transfer interval.
2013-06-01 16:22 [PATCH 0/1] rts5139 Fix SD card detection and use correct transfer interval Marcus Overhagen
@ 2013-06-01 16:22 ` Marcus Overhagen
2013-10-05 12:06 ` Simon Easter
0 siblings, 1 reply; 4+ messages in thread
From: Marcus Overhagen @ 2013-06-01 16:22 UTC (permalink / raw)
To: LKML
Increasing the timeout when polling for card status to 100ms
as used at other places in this driver fixes SD card detection.
Also use correct interval when doing the interrupt transfer,
this fixes the "xhci_queue_intr_tx: 74 callbacks suppressed"
spamming to syslog that was occuring when this driver is used.
Signed-off-by: Marcus Overhagen <marcus.overhagen@gmail.com>
---
drivers/staging/rts5139/rts51x_transport.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rts5139/rts51x_transport.c b/drivers/staging/rts5139/rts51x_transport.c
index 89e4d80..c172f4a 100644
--- a/drivers/staging/rts5139/rts51x_transport.c
+++ b/drivers/staging/rts5139/rts51x_transport.c
@@ -635,12 +635,12 @@ int rts51x_get_epc_status(struct rts51x_chip *chip, u16 *status)
ep = chip->usb->pusb_dev->ep_in[usb_pipeendpoint(pipe)];
/* fill and submit the URB */
- /* We set interval to 1 here, so the polling interval is controlled
- * by our polling thread */
+ /* Set interval to 10 here to match the endpoint descriptor,
+ * the polling interval is controlled by the polling thread */
usb_fill_int_urb(chip->usb->intr_urb, chip->usb->pusb_dev, pipe,
- status, 2, urb_done_completion, &urb_done, 1);
+ status, 2, urb_done_completion, &urb_done, 10);
- result = rts51x_msg_common(chip, chip->usb->intr_urb, 50);
+ result = rts51x_msg_common(chip, chip->usb->intr_urb, 100);
return interpret_urb_result(chip, pipe, 2, result,
chip->usb->intr_urb->actual_length);
--
1.8.1.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] Fix SD card detection and use correct transfer interval.
2013-06-01 16:22 ` [PATCH 1/1] " Marcus Overhagen
@ 2013-10-05 12:06 ` Simon Easter
2013-11-05 20:01 ` Andreas Mohr
0 siblings, 1 reply; 4+ messages in thread
From: Simon Easter @ 2013-10-05 12:06 UTC (permalink / raw)
To: linux-kernel
Marcus Overhagen <marcus.overhagen <at> gmail.com> writes:
>
> Increasing the timeout when polling for card status to 100ms
> as used at other places in this driver fixes SD card detection.
>
> Also use correct interval when doing the interrupt transfer,
> this fixes the "xhci_queue_intr_tx: 74 callbacks suppressed"
> spamming to syslog that was occuring when this driver is used.
>
> Signed-off-by: Marcus Overhagen <marcus.overhagen <at> gmail.com>
> ---
> drivers/staging/rts5139/rts51x_transport.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/rts5139/rts51x_transport.c
b/drivers/staging/rts5139/rts51x_transport.c
> index 89e4d80..c172f4a 100644
> --- a/drivers/staging/rts5139/rts51x_transport.c
> +++ b/drivers/staging/rts5139/rts51x_transport.c
> <at> <at> -635,12 +635,12 <at> <at> int rts51x_get_epc_status(struct
rts51x_chip *chip, u16 *status)
> ep = chip->usb->pusb_dev->ep_in[usb_pipeendpoint(pipe)];
>
> /* fill and submit the URB */
> - /* We set interval to 1 here, so the polling interval is controlled
> - * by our polling thread */
> + /* Set interval to 10 here to match the endpoint descriptor,
> + * the polling interval is controlled by the polling thread */
> usb_fill_int_urb(chip->usb->intr_urb, chip->usb->pusb_dev, pipe,
> - status, 2, urb_done_completion, &urb_done, 1);
> + status, 2, urb_done_completion, &urb_done, 10);
>
> - result = rts51x_msg_common(chip, chip->usb->intr_urb, 50);
> + result = rts51x_msg_common(chip, chip->usb->intr_urb, 100);
>
> return interpret_urb_result(chip, pipe, 2, result,
> chip->usb->intr_urb->actual_length);
Hi Marcus,
I'm trying to apply this patch to 3.8.0-18 kernel tree but looks like it
doesn't want to take (Ubuntu 13.04 stock)
I don't suppose you have a patch for this version?, not quite sure if
reading
the patch file properly but assuming I get changes in what is the correct
way to just compile this module and insert into running config?
Thanks
Simon
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] Fix SD card detection and use correct transfer interval.
2013-10-05 12:06 ` Simon Easter
@ 2013-11-05 20:01 ` Andreas Mohr
0 siblings, 0 replies; 4+ messages in thread
From: Andreas Mohr @ 2013-11-05 20:01 UTC (permalink / raw)
To: Simon Easter; +Cc: linux-kernel
Hi,
to revive a rather neglected topic (still no reply?):
> I don't suppose you have a patch for this version?, not quite sure if reading
> the patch file properly but assuming I get changes in what is the correct
> way to just compile this module and insert into running config?
Try
make M=sound/pci modules
(and perhaps followed by modules_install, too)
or perhaps even simply
make drivers/char/rtc.ko
I'm working on extending some relevant docs, too, but don't hold your breath...
(slowly but surely extending my local git data store)
Andreas Mohr
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-11-05 20:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-01 16:22 [PATCH 0/1] rts5139 Fix SD card detection and use correct transfer interval Marcus Overhagen
2013-06-01 16:22 ` [PATCH 1/1] " Marcus Overhagen
2013-10-05 12:06 ` Simon Easter
2013-11-05 20:01 ` Andreas Mohr
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®