From patchwork Thu Nov 8 18:11:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Frank_Sch=C3=A4fer?= X-Patchwork-Id: 1717191 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 08ED93FCDE for ; Thu, 8 Nov 2012 19:13:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756659Ab2KHTNA (ORCPT ); Thu, 8 Nov 2012 14:13:00 -0500 Received: from mail-ee0-f46.google.com ([74.125.83.46]:65470 "EHLO mail-ee0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756656Ab2KHTM6 (ORCPT ); Thu, 8 Nov 2012 14:12:58 -0500 Received: by mail-ee0-f46.google.com with SMTP id b15so1754511eek.19 for ; Thu, 08 Nov 2012 11:12:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=u0vd10QvHRoqeZcA8w+oriDookm4Uc4Ej7TY8/nwgy8=; b=vHwL5a2PUXCSIDCW9ObMYzCW7MUhMjyP0QJz10jM5SReh4qEQI0q4XocLG/JHkrq8V Wj7axf3h1V58c45H5ASUdrAO3QbcV4ZIa3ct+h1UP1JUtb0OTIpl9hFcVdxb9Pv7ojYH o/f+Si22VmGiGEtoVueMwj8ynxrShvZKcL2ZpcZBrWH/V5TK/8VVXqv3t/H9R0nw/+Rz FWzBPcLCbR6JYO7XS32F8GRA44hxfJJIOiiionzhai6fBzZRQ78R+Q2mthrPGiezZGvB kMZAHD3RDiQNLNIpicaF4/Wp53dEB7K4h2UxLmxzuoYhzCaxP7MBqKthRin/6Kxs2rdx KItQ== Received: by 10.14.182.5 with SMTP id n5mr30329534eem.5.1352401978224; Thu, 08 Nov 2012 11:12:58 -0800 (PST) Received: from Athlon64X2-5000.site (ip-5-146-108-198.unitymediagroup.de. [5.146.108.198]) by mx.google.com with ESMTPS id g5sm71927323eem.4.2012.11.08.11.12.56 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 08 Nov 2012 11:12:57 -0800 (PST) From: =?UTF-8?q?Frank=20Sch=C3=A4fer?= To: mchehab@redhat.com Cc: linux-media@vger.kernel.org, =?UTF-8?q?Frank=20Sch=C3=A4fer?= Subject: [PATCH v2 21/21] em28xx: add module parameter for selection of the preferred USB transfer type Date: Thu, 8 Nov 2012 20:11:53 +0200 Message-Id: <1352398313-3698-22-git-send-email-fschaefer.oss@googlemail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1352398313-3698-1-git-send-email-fschaefer.oss@googlemail.com> References: <1352398313-3698-1-git-send-email-fschaefer.oss@googlemail.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org By default, isoc transfers are used if possible. With the new module parameter, bulk can be selected as the preferred USB transfer type. Signed-off-by: Frank Schäfer --- drivers/media/usb/em28xx/em28xx-cards.c | 11 +++++++++-- 1 Datei geändert, 9 Zeilen hinzugefügt(+), 2 Zeilen entfernt(-) diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c index a9344f0..7f5b303 100644 --- a/drivers/media/usb/em28xx/em28xx-cards.c +++ b/drivers/media/usb/em28xx/em28xx-cards.c @@ -61,6 +61,11 @@ static unsigned int card[] = {[0 ... (EM28XX_MAXBOARDS - 1)] = UNSET }; module_param_array(card, int, NULL, 0444); MODULE_PARM_DESC(card, "card type"); +static unsigned int prefer_bulk; +module_param(prefer_bulk, int, 0644); +MODULE_PARM_DESC(prefer_bulk, "prefer USB bulk transfers"); + + /* Bitmask marking allocated devices from 0 to EM28XX_MAXBOARDS - 1 */ static unsigned long em28xx_devused; @@ -3334,9 +3339,11 @@ static int em28xx_usb_probe(struct usb_interface *interface, } /* Select USB transfer types to use */ - if (has_video && !dev->analog_ep_isoc) + if (has_video && + (!dev->analog_ep_isoc || (prefer_bulk && dev->analog_ep_bulk))) dev->analog_xfer_bulk = 1; - if (has_dvb && !dev->dvb_ep_isoc) + if (has_dvb && + (!dev->dvb_ep_isoc || (prefer_bulk && dev->dvb_ep_bulk))) dev->dvb_xfer_bulk = 1; snprintf(dev->name, sizeof(dev->name), "em28xx #%d", nr);