From patchwork Sat Oct 17 20:46:25 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Richter X-Patchwork-Id: 1854 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Sat, 17 Oct 2009 20:47:18 +0000 Received: from bombadil.infradead.org [18.85.46.34] by caramujo.chehab.org with IMAP (fetchmail-6.3.6) for (single-drop); Sat, 17 Oct 2009 19:01:33 -0300 (BRT) Received: from vger.kernel.org ([209.132.176.167]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1MzGBK-0005ZA-GJ; Sat, 17 Oct 2009 20:47:18 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753759AbZJQUqw (ORCPT + 1 other); Sat, 17 Oct 2009 16:46:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753731AbZJQUqw (ORCPT ); Sat, 17 Oct 2009 16:46:52 -0400 Received: from einhorn.in-berlin.de ([192.109.42.8]:52957 "EHLO einhorn.in-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753705AbZJQUqt (ORCPT ); Sat, 17 Oct 2009 16:46:49 -0400 X-Envelope-From: stefanr@s5r6.in-berlin.de Received: from stein ([83.221.231.7]) (authenticated bits=0) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id n9HKkPJS001073; Sat, 17 Oct 2009 22:46:25 +0200 Date: Sat, 17 Oct 2009 22:46:25 +0200 (CEST) From: Stefan Richter Subject: [PATCH] firedtv: fix regression: tuning fails due to bogus error return To: linux-media@vger.kernel.org, Mauro Carvalho Chehab cc: linux-kernel@vger.kernel.org, "Rafael J. Wysocki" In-Reply-To: <4ADA26D0.6010108@s5r6.in-berlin.de> Message-ID: References: <4ADA149E.1070704@s5r6.in-berlin.de> <4ADA26D0.6010108@s5r6.in-berlin.de> MIME-Version: 1.0 Content-Disposition: INLINE X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Since 2.6.32(-rc1), DVB core checks the return value of dvb_frontend_ops.set_frontend. Now it becomes apparent that firedtv always returned a bogus value from its set_frontend method. Signed-off-by: Stefan Richter --- drivers/media/dvb/firewire/firedtv-avc.c | 7 +++++-- drivers/media/dvb/firewire/firedtv-fe.c | 8 +------- 2 files changed, 6 insertions(+), 9 deletions(-) Index: linux-2.6.32-rc5/drivers/media/dvb/firewire/firedtv-avc.c =================================================================== --- linux-2.6.32-rc5.orig/drivers/media/dvb/firewire/firedtv-avc.c +++ linux-2.6.32-rc5/drivers/media/dvb/firewire/firedtv-avc.c @@ -573,8 +573,11 @@ int avc_tuner_dsd(struct firedtv *fdtv, msleep(500); #if 0 - /* FIXME: */ - /* u8 *status was an out-parameter of avc_tuner_dsd, unused by caller */ + /* + * FIXME: + * u8 *status was an out-parameter of avc_tuner_dsd, unused by caller + * Check for AVC_RESPONSE_ACCEPTED here instead? + */ if (status) *status = r->operand[2]; #endif Index: linux-2.6.32-rc5/drivers/media/dvb/firewire/firedtv-fe.c =================================================================== --- linux-2.6.32-rc5.orig/drivers/media/dvb/firewire/firedtv-fe.c +++ linux-2.6.32-rc5/drivers/media/dvb/firewire/firedtv-fe.c @@ -141,18 +141,12 @@ static int fdtv_read_uncorrected_blocks( return -EOPNOTSUPP; } -#define ACCEPTED 0x9 - static int fdtv_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) { struct firedtv *fdtv = fe->sec_priv; - /* FIXME: avc_tuner_dsd never returns ACCEPTED. Check status? */ - if (avc_tuner_dsd(fdtv, params) != ACCEPTED) - return -EINVAL; - else - return 0; /* not sure of this... */ + return avc_tuner_dsd(fdtv, params); } static int fdtv_get_frontend(struct dvb_frontend *fe,