From patchwork Thu Sep 20 16:06:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antti Palosaari X-Patchwork-Id: 1486451 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 2B3BDDF2D2 for ; Thu, 20 Sep 2012 16:06:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755926Ab2ITQGc (ORCPT ); Thu, 20 Sep 2012 12:06:32 -0400 Received: from mail.kapsi.fi ([217.30.184.167]:43052 "EHLO mail.kapsi.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754886Ab2ITQGb (ORCPT ); Thu, 20 Sep 2012 12:06:31 -0400 Received: from dyn3-82-128-186-237.psoas.suomi.net ([82.128.186.237] helo=localhost.localdomain) by mail.kapsi.fi with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1TEjGn-0003lo-Ii; Thu, 20 Sep 2012 19:06:29 +0300 From: Antti Palosaari To: linux-media@vger.kernel.org Cc: Antti Palosaari Subject: [PATCH] em28xx: PCTV 520e workaround for DRX-K fw loading Date: Thu, 20 Sep 2012 19:06:04 +0300 Message-Id: <1348157164-2912-1-git-send-email-crope@iki.fi> X-Mailer: git-send-email 1.7.11.4 X-SA-Exim-Connect-IP: 82.128.186.237 X-SA-Exim-Mail-From: crope@iki.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This is hack to make device working again. Looks like we need to wait DRX-K fw loading is ready until tuner is attached as tuner is behind demod I2C bus. For some reason it still crash when device is re-plugged without module unloading... Signed-off-by: Antti Palosaari --- drivers/media/usb/em28xx/em28xx-dvb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c index 5b7f2b3..4e46fef 100644 --- a/drivers/media/usb/em28xx/em28xx-dvb.c +++ b/drivers/media/usb/em28xx/em28xx-dvb.c @@ -1128,6 +1128,9 @@ static int em28xx_dvb_init(struct em28xx *dev) dvb->fe[0] = dvb_attach(drxk_attach, &pctv_520e_drxk, &dev->i2c_adap); + /* FIXME: wait demod fw is loaded, up and running */ + msleep(2000); + if (dvb->fe[0]) { /* attach tuner */ if (!dvb_attach(tda18271_attach, dvb->fe[0], 0x60,