All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Tisje <jan.tisje@gmx.de>
To: linux-media@vger.kernel.org
Subject: [PATCH] Technisat DVB-S2 USB: reduced buffer sizes
Date: Sat, 08 Nov 2014 18:15:13 +0100	[thread overview]
Message-ID: <545E4FA1.9010509@gmx.de> (raw)

Hi,

I reduced the buffer size in order to make this driver work on my NAS
station. It's an arm system and thus only has limited resources.

I compiled and ran with kernel 3.16.3 for some weeks and now compiled
and booted kernel 3.17.2 today.
Without this patch the device doesn't work at all, in both kernel versions.

This is what Antti Palosaar crope@iki.fi wrote:
> If I didn't remember wrong, that means allocated buffers are 8 * 32 * 2048 = 524288 bytes. 
> It sounds rather big for my taste. Probably even wrong. IIRC USB2.0 frames are 1024 and there could be 1-3 frames. 
> You could use lsusb with all verbosity levels to see if it is 1024/2048/3072. And set value according to that info.
> So I would recommend .count = 6, .framesperurb = 8, .framesize = 1024 


I only changed one value because this was sufficient to make it work.

I believe these sizes correspond to the output of lsusb -v
But to be honest: I don't have any idea of what this all is about. USB
wasn't invented yet when I studied computer science. ;)
maybe someone knows better.

    Interface Descriptor:
      bAlternateSetting       0
      Endpoint Descriptor:
        bEndpointAddress     0x82  EP 2 IN
        wMaxPacketSize     0x0200  1x 512 bytes
      Endpoint Descriptor:
        bEndpointAddress     0x81  EP 1 IN
        wMaxPacketSize     0x0200  1x 512 bytes
      Endpoint Descriptor:
        bEndpointAddress     0x01  EP 1 OUT
        wMaxPacketSize     0x0200  1x 512 bytes
    Interface Descriptor:
      bAlternateSetting       1
      Endpoint Descriptor:
        bEndpointAddress     0x82  EP 2 IN
        wMaxPacketSize     0x0c00  2x 1024 bytes
          Transfer Type            Isochronous
      Endpoint Descriptor:
        bEndpointAddress     0x81  EP 1 IN
        wMaxPacketSize     0x0200  1x 512 bytes
      Endpoint Descriptor:
        bEndpointAddress     0x01  EP 1 OUT
        wMaxPacketSize     0x0200  1x 512 bytes


This is the first kernel patch I submitted. I hope everything is fine.

Jan


diff -uNr linux-3.17.2.orig/drivers/media/usb/dvb-usb/technisat-usb2.c
linux-3.17.2/drivers/media/usb/dvb-usb/technisat-usb2.c
--- linux-3.17.2.orig/drivers/media/usb/dvb-usb/technisat-usb2.c
2014-10-30 17:43:25.000000000 +0100
+++ linux-3.17.2/drivers/media/usb/dvb-usb/technisat-usb2.c
2014-11-08 17:31:18.716668708 +0100
@@ -708,7 +708,7 @@
                                .endpoint = 0x2,
                                .u = {
                                        .isoc = {
-                                               .framesperurb = 32,
+                                               .framesperurb = 8,
                                                .framesize = 2048,
                                                .interval = 1,

             reply	other threads:[~2014-11-08 17:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-08 17:15 Jan Tisje [this message]
2014-11-09 21:28 ` [PATCH] Technisat DVB-S2 USB: reduced buffer sizes Antti Palosaari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=545E4FA1.9010509@gmx.de \
    --to=jan.tisje@gmx.de \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.