Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp554170imu; Tue, 20 Nov 2018 03:29:50 -0800 (PST) X-Google-Smtp-Source: AJdET5cAy7+M+LIer9MSjYgKlH29VcaHqGMm0en+c4ywnIt1Xp35nJXoXb53pMa+DZTZzlBMgRKe X-Received: by 2002:a62:3a04:: with SMTP id h4mr1739236pfa.119.1542713389905; Tue, 20 Nov 2018 03:29:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542713389; cv=none; d=google.com; s=arc-20160816; b=RqSl9BJuS6PeLCjkC8XNxZ3Jx/vzJ+t7YoRxpvIkX0cJMaZIsgbqJlxLGg3HG17BIJ 8NLoMNJ6hTL4qXkp45VZyjxICID2tr+2fBVP9M+depYqn0+rTAgRtgfsifCNHSuQnHub tizvcvNOtG2atUtn7F5CO/loNlSbW4Bg21l8GxLXI6UHsmk9Z7ilZWH4Iw/yIIFYQAFh Ay3jVi7u/Jk3wM9FAbpNWnIYkJ5Vqj9y0nGny431gQddqgHSoohgb16QGQyUSUWv7E63 rRqH2Mx2lR2MirKusCsVDLwmIEfi8gDki4Q7R3Hv9AGoKcOdJaAMsZTxlZnFzYfni4hh cecg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=cLVu2v7Dpycf0FplrlFRn9oUObqAGstCEcM3HTZdA+M=; b=jgjyhNTjiMTu0YwTHeeHyfAslx6FGwhseAEcHitk9m2CxGNm6fe0kOwXdAc5e9YdtR K4AgZKW/n8rTOpiQBEOYIm68PEZYCvmBW686DP0KPZRQmHCM/7S5psAqzA77uaBnUouI 6291anxEA31z1kjAUF6eKWeEHSPKejjxXSVKRnNvRrX3nWsctLNcA8/CJluQsW5nysrH t+fqBo1Kdz88tsHkgRoPdhFccuzhhcg0s03KOXkFfMIBenTRVW4kbs8bsrntLFUGU75Y H5tORjDr41T4aYX8ELOwjWZxU3kXwjL1nRTQ96megxjHCNSjjHlx3h0/bB7R39SE14v7 pS7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=FbO5eyvS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h13si19226622pgs.17.2018.11.20.03.29.33; Tue, 20 Nov 2018 03:29:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=FbO5eyvS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729236AbeKTV47 (ORCPT + 99 others); Tue, 20 Nov 2018 16:56:59 -0500 Received: from casper.infradead.org ([85.118.1.10]:52898 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726792AbeKTV47 (ORCPT ); Tue, 20 Nov 2018 16:56:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=cLVu2v7Dpycf0FplrlFRn9oUObqAGstCEcM3HTZdA+M=; b=FbO5eyvSFMl1nNUT9L2urG+iu5 e3Z2uHfWxw9NP1tLMYLFOj+22xU7BHhfLf1AqpuZ/c63YyWfAeIlgIgkY3tXKewsqHmJiRF0dVj3K CLoseUjasIfiaMuw8KhpwTQnMwzcNXbcQfrf88HFxOCwvEW0usM9tPEmLKve6/IzsG+964x+lhuL5 Hbr64wYamIgKu5XpxGXcQ0fdwtFSjhcabJ3MC0m593qocfaDaxvBLezhdBbv9afY0gvhkfJfb8P4W Fk/BQ6fge/M1Wj3XXqII3BcWVJBEBIaXCQg3lwHy60qMer6z9A6qRreKMWIUWmogbTvXVSrAmM652 3Hyf+cCQ==; Received: from [177.157.76.226] (helo=coco.lan) by casper.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP4CV-0008TA-JI; Tue, 20 Nov 2018 11:28:16 +0000 Date: Tue, 20 Nov 2018 09:28:11 -0200 From: Mauro Carvalho Chehab To: Takashi Iwai Cc: stakanov , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: DVB-S PCI card regression on 4.19 / 4.20 Message-ID: <20181120092811.44086f90@coco.lan> In-Reply-To: References: <3267610.1jAA2Txdp3@roadrunner.suse> <20181120071810.7c8583b3@coco.lan> <1626577.KffMZP8tvO@roadrunner.suse> <20181120082604.1bf50e6b@coco.lan> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, 20 Nov 2018 12:11:03 +0100 Takashi Iwai escreveu: > On Tue, 20 Nov 2018 11:26:04 +0100, > Mauro Carvalho Chehab wrote: > >=20 > > Em Tue, 20 Nov 2018 10:54:22 +0100 > > Takashi Iwai escreveu: > > =20 > > > On Tue, 20 Nov 2018 10:51:59 +0100, > > > stakanov wrote: =20 > > > >=20 > > > > In data marted=C3=AC 20 novembre 2018 10:18:10 CET, Mauro Carvalho = Chehab ha=20 > > > > scritto: =20 > > > > > Em Tue, 20 Nov 2018 09:07:57 +0100 > > > > >=20 > > > > > stakanov escreveu: =20 > > > > > > In data marted=C3=AC 20 novembre 2018 00:58:41 CET, Mauro Carva= lho Chehab ha > > > > > >=20 > > > > > > scritto: =20 > > > > > > > Em Tue, 20 Nov 2018 00:19:54 +0100 > > > > > > >=20 > > > > > > > stakanov escreveu: =20 > > > > > > > > In data marted=C3=AC 20 novembre 2018 00:08:45 CET, Mauro C= arvalho Chehab > > > > > > > > ha > > > > > > > >=20 > > > > > > > > scritto: =20 > > > > > > > > > uname -a > > > > > > > > > =20 > > > > > > > > > > Linux silversurfer 4.20.0-rc3-1.g7e16618-default #1 SMP= PREEMPT > > > > > > > > > > Mon > > > > > > > > > > Nov 19 > > > > > > > > > > 18:54:15 UTC 2018 (7e16618) x86_64 x86_64 x86_64 GNU/Li= nux =20 > > > > > > > > =20 > > > > > > > > uname -a > > > > > > > > =20 > > > > > > > > > Linux silversurfer 4.20.0-rc3-1.g7e16618-default #1 SMP P= REEMPT Mon > > > > > > > > > Nov > > > > > > > > > 19 > > > > > > > > > 18:54:15 UTC 2018 (7e16618) x86_64 x86_64 x86_64 GNU/Linu= x =20 > > > > > > > >=20 > > > > > > > > from > > > > > > > > https://download.opensuse.org/repositories/home:/tiwai:/bsc= 1116374/ > > > > > > > > standard/x86_64/ > > > > > > > >=20 > > > > > > > > So I booted this one, should be the right one. > > > > > > > > sudo dmesg | grep -i b2c2 should give these additional me= ssages? > > > > > > > >=20 > > > > > > > > If Takashi is still around, he could confirm. =20 > > > > > > >=20 > > > > > > > Well, if the patch got applied, you should now be getting me= ssages > > > > > > > similar > > > > > > >=20 > > > > > > > (but not identical) to: > > > > > > > dvb_frontend_get_frequency_limits: frequencies: tuner: > > > > > > > 9150000...2150000, > > > > > > >=20 > > > > > > > frontend: 9150000...2150000 dvb_pll_attach: delsys: 5, freque= ncy range: > > > > > > > 9150000..2150000 > > > > > > > =20 > > > > > > > > ___________________________________________________________= ______ > > > > > > > > ________________________________________________________ > > > > > > > > Ihre E-Mail-Postf=C3=A4cher sicher & zentral an einem Ort. = Jetzt wechseln > > > > > > > > und > > > > > > > > alte E-Mail-Adresse mitnehmen! https://www.eclipso.de =20 > > > > > > >=20 > > > > > > > Thanks, > > > > > > > Mauro =20 > > > > > >=20 > > > > > > My bad. > > > > > > With just dmesg: > > > > > >=20 > > > > > > [ 89.399887] dvb_frontend_get_frequency_limits: frequencies: = tuner: > > > > > > 950000...2150000, frontend: 950000000...2150000000 > > > > > > [ 95.020149] dvb_frontend_get_frequency_limits: frequencies: = tuner: > > > > > > 950000...2150000, frontend: 950000000...2150000000 > > > > > > [ 95.152049] dvb_frontend_get_frequency_limits: frequencies: = tuner: > > > > > > 950000...2150000, frontend: 950000000...2150000000 > > > > > > [ 95.152058] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 fr= ontend 0 > > > > > > frequency 1880000 out of range (950000..2150) > > > > > > [ 98.356539] dvb_frontend_get_frequency_limits: frequencies: = tuner: > > > > > > 950000...2150000, frontend: 950000000...2150000000 > > > > > > [ 98.480372] dvb_frontend_get_frequency_limits: frequencies: = tuner: > > > > > > 950000...2150000, frontend: 950000000...2150000000 > > > > > > [ 98.480381] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 fr= ontend 0 > > > > > > frequency 1587500 out of range (950000..2150) > > > > > > [ 100.016823] dvb_frontend_get_frequency_limits: frequencies: = tuner: > > > > > > 950000...2150000, frontend: 950000000...2150000000 > > > > > > [ 100.140619] dvb_frontend_get_frequency_limits: frequencies: = tuner: > > > > > > 950000...2150000, frontend: 950000000...2150000000 > > > > > > [ 100.140629] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 fr= ontend 0 > > > > > > frequency 1353500 out of range (950000..2150) > > > > > > [ 105.361166] dvb_frontend_get_frequency_limits: frequencies: = tuner: > > > > > > 950000...2150000, frontend: 950000000...2150000000 > > > > > > [ 105.492972] dvb_frontend_get_frequency_limits: frequencies: = tuner: > > > > > > 950000...2150000, frontend: 950000000...2150000000 > > > > > > [ 105.492977] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 fr= ontend 0 > > > > > > frequency 1944750 out of range (950000..2150) > > > > > >=20 > > > > > >=20 > > > > > > Which is, I guess the info you need? =20 > > > > >=20 > > > > > Yes, partially. Clearly, the problem is coming from the tuner, wi= th is > > > > > not reporting the frequency in Hz, but I was hoping to see another > > > > > message from the tuner driver, in order for me to be sure about w= hat's > > > > > happening there. > > > > >=20 > > > > > Didn't you get any message that starts with "dvb_pll_attach"? > > > > >=20 > > > > > The thing with Flexcop is that there are several variations, each= one > > > > > with a different tuner driver. > > > > >=20 > > > > > Anyway, I guess I found the trouble: it is trying to use the DVB > > > > > cache to check the delivery system too early (at attach time). > > > > >=20 > > > > > I suspect that the enclosed patch will fix the issue. Could you p= lease > > > > > test it? > > > > >=20 > > > > > Thanks! > > > > > Mauro > > > > >=20 > > > > >=20 > > > > > diff --git a/drivers/media/dvb-frontends/dvb-pll.c > > > > > b/drivers/media/dvb-frontends/dvb-pll.c index 6d4b2eec67b4..390ec= c915096 > > > > > 100644 > > > > > --- a/drivers/media/dvb-frontends/dvb-pll.c > > > > > +++ b/drivers/media/dvb-frontends/dvb-pll.c > > > > > @@ -80,8 +80,8 @@ struct dvb_pll_desc { > > > > >=20 > > > > > static const struct dvb_pll_desc dvb_pll_thomson_dtt7579 =3D { > > > > > .name =3D "Thomson dtt7579", > > > > > - .min =3D 177000000, > > > > > - .max =3D 858000000, > > > > > + .min =3D 177 * MHz, > > > > > + .max =3D 858 * MHz, > > > > > .iffreq=3D 36166667, > > > > > .sleepdata =3D (u8[]){ 2, 0xb4, 0x03 }, > > > > > .count =3D 4, > > > > > @@ -102,8 +102,8 @@ static void thomson_dtt759x_bw(struct dvb_fro= ntend *fe, > > > > > u8 *buf) > > > > >=20 > > > > > static const struct dvb_pll_desc dvb_pll_thomson_dtt759x =3D { > > > > > .name =3D "Thomson dtt759x", > > > > > - .min =3D 177000000, > > > > > - .max =3D 896000000, > > > > > + .min =3D 177 * MHz, > > > > > + .max =3D 896 * MHz, > > > > > .set =3D thomson_dtt759x_bw, > > > > > .iffreq=3D 36166667, > > > > > .sleepdata =3D (u8[]){ 2, 0x84, 0x03 }, > > > > > @@ -126,8 +126,8 @@ static void thomson_dtt7520x_bw(struct dvb_fr= ontend *fe, > > > > > u8 *buf) > > > > >=20 > > > > > static const struct dvb_pll_desc dvb_pll_thomson_dtt7520x =3D { > > > > > .name =3D "Thomson dtt7520x", > > > > > - .min =3D 185000000, > > > > > - .max =3D 900000000, > > > > > + .min =3D 185 * MHz, > > > > > + .max =3D 900 * MHz, > > > > > .set =3D thomson_dtt7520x_bw, > > > > > .iffreq =3D 36166667, > > > > > .count =3D 7, > > > > > @@ -144,8 +144,8 @@ static const struct dvb_pll_desc > > > > > dvb_pll_thomson_dtt7520x =3D { > > > > >=20 > > > > > static const struct dvb_pll_desc dvb_pll_lg_z201 =3D { > > > > > .name =3D "LG z201", > > > > > - .min =3D 174000000, > > > > > - .max =3D 862000000, > > > > > + .min =3D 174 * MHz, > > > > > + .max =3D 862 * MHz, > > > > > .iffreq=3D 36166667, > > > > > .sleepdata =3D (u8[]){ 2, 0xbc, 0x03 }, > > > > > .count =3D 5, > > > > > @@ -160,8 +160,8 @@ static const struct dvb_pll_desc dvb_pll_lg_z= 201 =3D { > > > > >=20 > > > > > static const struct dvb_pll_desc dvb_pll_unknown_1 =3D { > > > > > .name =3D "unknown 1", /* used by dntv live dvb-t */ > > > > > - .min =3D 174000000, > > > > > - .max =3D 862000000, > > > > > + .min =3D 174 * MHz, > > > > > + .max =3D 862 * MHz, > > > > > .iffreq=3D 36166667, > > > > > .count =3D 9, > > > > > .entries =3D { > > > > > @@ -182,8 +182,8 @@ static const struct dvb_pll_desc dvb_pll_unkn= own_1 =3D { > > > > > */ > > > > > static const struct dvb_pll_desc dvb_pll_tua6010xs =3D { > > > > > .name =3D "Infineon TUA6010XS", > > > > > - .min =3D 44250000, > > > > > - .max =3D 858000000, > > > > > + .min =3D 44250 * kHz, > > > > > + .max =3D 858 * MHz, > > > > > .iffreq=3D 36125000, > > > > > .count =3D 3, > > > > > .entries =3D { > > > > > @@ -196,8 +196,8 @@ static const struct dvb_pll_desc dvb_pll_tua6= 010xs =3D { > > > > > /* Panasonic env57h1xd5 (some Philips PLL ?) */ > > > > > static const struct dvb_pll_desc dvb_pll_env57h1xd5 =3D { > > > > > .name =3D "Panasonic ENV57H1XD5", > > > > > - .min =3D 44250000, > > > > > - .max =3D 858000000, > > > > > + .min =3D 44250 * kHz, > > > > > + .max =3D 858 * MHz, > > > > > .iffreq=3D 36125000, > > > > > .count =3D 4, > > > > > .entries =3D { > > > > > @@ -220,8 +220,8 @@ static void tda665x_bw(struct dvb_frontend *f= e, u8 *buf) > > > > >=20 > > > > > static const struct dvb_pll_desc dvb_pll_tda665x =3D { > > > > > .name =3D "Philips TDA6650/TDA6651", > > > > > - .min =3D 44250000, > > > > > - .max =3D 858000000, > > > > > + .min =3D 44250 * kHz, > > > > > + .max =3D 858 * MHz, > > > > > .set =3D tda665x_bw, > > > > > .iffreq=3D 36166667, > > > > > .initdata =3D (u8[]){ 4, 0x0b, 0xf5, 0x85, 0xab }, > > > > > @@ -254,8 +254,8 @@ static void tua6034_bw(struct dvb_frontend *f= e, u8 *buf) > > > > >=20 > > > > > static const struct dvb_pll_desc dvb_pll_tua6034 =3D { > > > > > .name =3D "Infineon TUA6034", > > > > > - .min =3D 44250000, > > > > > - .max =3D 858000000, > > > > > + .min =3D 44250 * kHz, > > > > > + .max =3D 858 * MHz, > > > > > .iffreq=3D 36166667, > > > > > .count =3D 3, > > > > > .set =3D tua6034_bw, > > > > > @@ -278,8 +278,8 @@ static void tded4_bw(struct dvb_frontend *fe,= u8 *buf) > > > > >=20 > > > > > static const struct dvb_pll_desc dvb_pll_tded4 =3D { > > > > > .name =3D "ALPS TDED4", > > > > > - .min =3D 47000000, > > > > > - .max =3D 863000000, > > > > > + .min =3D 47 * MHz, > > > > > + .max =3D 863 * MHz, > > > > > .iffreq=3D 36166667, > > > > > .set =3D tded4_bw, > > > > > .count =3D 4, > > > > > @@ -296,8 +296,8 @@ static const struct dvb_pll_desc dvb_pll_tded= 4 =3D { > > > > > */ > > > > > static const struct dvb_pll_desc dvb_pll_tdhu2 =3D { > > > > > .name =3D "ALPS TDHU2", > > > > > - .min =3D 54000000, > > > > > - .max =3D 864000000, > > > > > + .min =3D 54 * MHz, > > > > > + .max =3D 864 * MHz, > > > > > .iffreq=3D 44000000, > > > > > .count =3D 4, > > > > > .entries =3D { > > > > > @@ -313,8 +313,8 @@ static const struct dvb_pll_desc dvb_pll_tdhu= 2 =3D { > > > > > */ > > > > > static const struct dvb_pll_desc dvb_pll_samsung_tbmv =3D { > > > > > .name =3D "Samsung TBMV30111IN / TBMV30712IN1", > > > > > - .min =3D 54000000, > > > > > - .max =3D 860000000, > > > > > + .min =3D 54 * MHz, > > > > > + .max =3D 860 * MHz, > > > > > .iffreq=3D 44000000, > > > > > .count =3D 6, > > > > > .entries =3D { > > > > > @@ -332,8 +332,8 @@ static const struct dvb_pll_desc dvb_pll_sams= ung_tbmv =3D > > > > > { */ > > > > > static const struct dvb_pll_desc dvb_pll_philips_sd1878_tda8261 = =3D { > > > > > .name =3D "Philips SD1878", > > > > > - .min =3D 950000, > > > > > - .max =3D 2150000, > > > > > + .min =3D 950 * MHz, > > > > > + .max =3D 2150 * MHz, > > > > > .iffreq=3D 249, /* zero-IF, offset 249 is to round up */ > > > > > .count =3D 4, > > > > > .entries =3D { > > > > > @@ -398,8 +398,8 @@ static void opera1_bw(struct dvb_frontend *fe= , u8 *buf) > > > > >=20 > > > > > static const struct dvb_pll_desc dvb_pll_opera1 =3D { > > > > > .name =3D "Opera Tuner", > > > > > - .min =3D 900000, > > > > > - .max =3D 2250000, > > > > > + .min =3D 900 * MHz, > > > > > + .max =3D 2250 * MHz, > > > > > .initdata =3D (u8[]){ 4, 0x08, 0xe5, 0xe1, 0x00 }, > > > > > .initdata2 =3D (u8[]){ 4, 0x08, 0xe5, 0xe5, 0x00 }, > > > > > .iffreq=3D 0, > > > > > @@ -445,8 +445,8 @@ static void samsung_dtos403ih102a_set(struct > > > > > dvb_frontend *fe, u8 *buf) /* unknown pll used in Samsung DTOS403= IH102A > > > > > DVB-C tuner */ > > > > > static const struct dvb_pll_desc dvb_pll_samsung_dtos403ih102a = =3D { > > > > > .name =3D "Samsung DTOS403IH102A", > > > > > - .min =3D 44250000, > > > > > - .max =3D 858000000, > > > > > + .min =3D 44250 * kHz, > > > > > + .max =3D 858 * MHz, > > > > > .iffreq =3D 36125000, > > > > > .count =3D 8, > > > > > .set =3D samsung_dtos403ih102a_set, > > > > > @@ -465,8 +465,8 @@ static const struct dvb_pll_desc > > > > > dvb_pll_samsung_dtos403ih102a =3D { /* Samsung TDTC9251DH0 DVB-T = NIM, as used > > > > > on AirStar 2 */ > > > > > static const struct dvb_pll_desc dvb_pll_samsung_tdtc9251dh0 =3D= { > > > > > .name =3D "Samsung TDTC9251DH0", > > > > > - .min =3D 48000000, > > > > > - .max =3D 863000000, > > > > > + .min =3D 48 * MHz, > > > > > + .max =3D 863 * MHz, > > > > > .iffreq =3D 36166667, > > > > > .count =3D 3, > > > > > .entries =3D { > > > > > @@ -479,8 +479,8 @@ static const struct dvb_pll_desc > > > > > dvb_pll_samsung_tdtc9251dh0 =3D { /* Samsung TBDU18132 DVB-S NIM = with TSA5059 > > > > > PLL, used in SkyStar2 DVB-S 2.3 */ static const struct dvb_pll_de= sc > > > > > dvb_pll_samsung_tbdu18132 =3D { > > > > > .name =3D "Samsung TBDU18132", > > > > > - .min =3D 950000, > > > > > - .max =3D 2150000, /* guesses */ > > > > > + .min =3D 950 * MHz, > > > > > + .max =3D 2150 * MHz, /* guesses */ > > > > > .iffreq =3D 0, > > > > > .count =3D 2, > > > > > .entries =3D { > > > > > @@ -500,8 +500,8 @@ static const struct dvb_pll_desc > > > > > dvb_pll_samsung_tbdu18132 =3D { /* Samsung TBMU24112 DVB-S NIM wi= th SL1935 > > > > > zero-IF tuner */ > > > > > static const struct dvb_pll_desc dvb_pll_samsung_tbmu24112 =3D { > > > > > .name =3D "Samsung TBMU24112", > > > > > - .min =3D 950000, > > > > > - .max =3D 2150000, /* guesses */ > > > > > + .min =3D 950 * MHz, > > > > > + .max =3D 2150 * MHz, /* guesses */ > > > > > .iffreq =3D 0, > > > > > .count =3D 2, > > > > > .entries =3D { > > > > > @@ -521,8 +521,8 @@ static const struct dvb_pll_desc > > > > > dvb_pll_samsung_tbmu24112 =3D { * 822 - 862 1 * 0 0 1 0= 0 0 =20 > > > > > 0x88 */ > > > > > static const struct dvb_pll_desc dvb_pll_alps_tdee4 =3D { > > > > > .name =3D "ALPS TDEE4", > > > > > - .min =3D 47000000, > > > > > - .max =3D 862000000, > > > > > + .min =3D 47 * MHz, > > > > > + .max =3D 862 * MHz, > > > > > .iffreq =3D 36125000, > > > > > .count =3D 4, > > > > > .entries =3D { > > > > > @@ -537,8 +537,8 @@ static const struct dvb_pll_desc dvb_pll_alps= _tdee4 =3D { > > > > > /* CP cur. 50uA, AGC takeover: 103dBuV, PORT3 on */ > > > > > static const struct dvb_pll_desc dvb_pll_tua6034_friio =3D { > > > > > .name =3D "Infineon TUA6034 ISDB-T (Friio)", > > > > > - .min =3D 90000000, > > > > > - .max =3D 770000000, > > > > > + .min =3D 90 * MHz, > > > > > + .max =3D 770 * MHz, > > > > > .iffreq =3D 57000000, > > > > > .initdata =3D (u8[]){ 4, 0x9a, 0x50, 0xb2, 0x08 }, > > > > > .sleepdata =3D (u8[]){ 4, 0x9a, 0x70, 0xb3, 0x0b }, > > > > > @@ -553,8 +553,8 @@ static const struct dvb_pll_desc dvb_pll_tua6= 034_friio =3D > > > > > { /* Philips TDA6651 ISDB-T, used in Earthsoft PT1 */ > > > > > static const struct dvb_pll_desc dvb_pll_tda665x_earth_pt1 =3D { > > > > > .name =3D "Philips TDA6651 ISDB-T (EarthSoft PT1)", > > > > > - .min =3D 90000000, > > > > > - .max =3D 770000000, > > > > > + .min =3D 90 * MHz, > > > > > + .max =3D 770 * MHz, > > > > > .iffreq =3D 57000000, > > > > > .initdata =3D (u8[]){ 5, 0x0e, 0x7f, 0xc1, 0x80, 0x80 }, > > > > > .count =3D 10, > > > > > @@ -845,18 +845,11 @@ struct dvb_frontend *dvb_pll_attach(struct > > > > > dvb_frontend *fe, int pll_addr, > > > > >=20 > > > > > strncpy(fe->ops.tuner_ops.info.name, desc->name, > > > > > sizeof(fe->ops.tuner_ops.info.name)); > > > > > - switch (c->delivery_system) { > > > > > - case SYS_DVBS: > > > > > - case SYS_DVBS2: > > > > > - case SYS_TURBO: > > > > > - case SYS_ISDBS: > > > > > - fe->ops.tuner_ops.info.frequency_min_hz =3D desc->min * kHz; > > > > > - fe->ops.tuner_ops.info.frequency_max_hz =3D desc->max * kHz; > > > > > - break; > > > > > - default: > > > > > - fe->ops.tuner_ops.info.frequency_min_hz =3D desc->min; > > > > > - fe->ops.tuner_ops.info.frequency_max_hz =3D desc->max; > > > > > - } > > > > > + > > > > > + fe->ops.tuner_ops.info.frequency_min_hz =3D desc->min; > > > > > + fe->ops.tuner_ops.info.frequency_max_hz =3D desc->max; > > > > > +printk("%s: delsys: %d, frequency range: %u..%u\n", > > > > > + __func__, c->delivery_system, > > > > > fe->ops.tuner_ops.info.frequency_min_hz, > > > > > fe->ops.tuner_ops.info.frequency_max_hz); > > > > >=20 > > > > > if (!desc->initdata) > > > > > fe->ops.tuner_ops.init =3D NULL; =20 > > > >=20 > > > >=20 > > > > I will as soon as it will be ready. =20 > > >=20 > > > FWIW, a test kernel with this patch is being built in the same OBS re= po, > > > home:tiwai:bsc1116374. It'll be ready in an hour or so. =20 > >=20 > > Btw, assuming that this patch will fix the issue, I just submitted > > a series with it (and with an additional patch fixing a minor issue > > with dprintk at dvb_frontend): > >=20 > > https://patchwork.linuxtv.org/patch/53044/ > > https://patchwork.linuxtv.org/patch/53045/ > > https://patchwork.linuxtv.org/patch/53046/ > >=20 > > We should probably migrate dprintk at dvb-pll and dvb_frontend=20 > > to use dev_foo() instead of pr_fmt(), but this is out of the scope > > of those fixes. =20 >=20 > Could you mark the last one for stable? > And, it should have fixes tag > Fixes: a3f90c75b833 ("media: dvb: convert tuner_info frequencies to Hz") > too. >=20 > Also, you can put the bugzilla link as a reference > https://bugzilla.opensuse.org/show_bug.cgi?id=3D1116374 Sure. I'll wait for Stakanov to test, in order to add his tested-by. For now, I'm enclosing the patch with the current tags added to it. Thanks, Mauro [PATCH] media: dvb-pll: fix tuner frequency ranges Tuners should report frequencies in Hz. That works fine on most drivers, but, in the case of dvb-pll, some settings are for satellite tuners, while others are for terrestrial/cable ones. The code was trying to solve it at probing time, but that doesn't work, as, when _attach is called, the delivery system may be wrong. Fix it by ensuring that all frequencies are in Hz at the per-tuner max/min values. While here, add a debug message, as this would help to debug any issues there. It fixes the following bug: https://bugzilla.opensuse.org/show_bug.cgi?id=3D1116374 Fixes: a3f90c75b833 ("media: dvb: convert tuner_info frequencies to Hz") Reported-by: Stakanov Schufter Reported-by: Takashi Iwai Cc: stable@vger.kernel.org # For 4.19 Signed-off-by: Mauro Carvalho Chehab diff --git a/drivers/media/dvb-frontends/dvb-pll.c b/drivers/media/dvb-fron= tends/dvb-pll.c index 6d4b2eec67b4..fff5816f6ec4 100644 --- a/drivers/media/dvb-frontends/dvb-pll.c +++ b/drivers/media/dvb-frontends/dvb-pll.c @@ -80,8 +80,8 @@ struct dvb_pll_desc { =20 static const struct dvb_pll_desc dvb_pll_thomson_dtt7579 =3D { .name =3D "Thomson dtt7579", - .min =3D 177000000, - .max =3D 858000000, + .min =3D 177 * MHz, + .max =3D 858 * MHz, .iffreq=3D 36166667, .sleepdata =3D (u8[]){ 2, 0xb4, 0x03 }, .count =3D 4, @@ -102,8 +102,8 @@ static void thomson_dtt759x_bw(struct dvb_frontend *fe,= u8 *buf) =20 static const struct dvb_pll_desc dvb_pll_thomson_dtt759x =3D { .name =3D "Thomson dtt759x", - .min =3D 177000000, - .max =3D 896000000, + .min =3D 177 * MHz, + .max =3D 896 * MHz, .set =3D thomson_dtt759x_bw, .iffreq=3D 36166667, .sleepdata =3D (u8[]){ 2, 0x84, 0x03 }, @@ -126,8 +126,8 @@ static void thomson_dtt7520x_bw(struct dvb_frontend *fe= , u8 *buf) =20 static const struct dvb_pll_desc dvb_pll_thomson_dtt7520x =3D { .name =3D "Thomson dtt7520x", - .min =3D 185000000, - .max =3D 900000000, + .min =3D 185 * MHz, + .max =3D 900 * MHz, .set =3D thomson_dtt7520x_bw, .iffreq =3D 36166667, .count =3D 7, @@ -144,8 +144,8 @@ static const struct dvb_pll_desc dvb_pll_thomson_dtt752= 0x =3D { =20 static const struct dvb_pll_desc dvb_pll_lg_z201 =3D { .name =3D "LG z201", - .min =3D 174000000, - .max =3D 862000000, + .min =3D 174 * MHz, + .max =3D 862 * MHz, .iffreq=3D 36166667, .sleepdata =3D (u8[]){ 2, 0xbc, 0x03 }, .count =3D 5, @@ -160,8 +160,8 @@ static const struct dvb_pll_desc dvb_pll_lg_z201 =3D { =20 static const struct dvb_pll_desc dvb_pll_unknown_1 =3D { .name =3D "unknown 1", /* used by dntv live dvb-t */ - .min =3D 174000000, - .max =3D 862000000, + .min =3D 174 * MHz, + .max =3D 862 * MHz, .iffreq=3D 36166667, .count =3D 9, .entries =3D { @@ -182,8 +182,8 @@ static const struct dvb_pll_desc dvb_pll_unknown_1 =3D { */ static const struct dvb_pll_desc dvb_pll_tua6010xs =3D { .name =3D "Infineon TUA6010XS", - .min =3D 44250000, - .max =3D 858000000, + .min =3D 44250 * kHz, + .max =3D 858 * MHz, .iffreq=3D 36125000, .count =3D 3, .entries =3D { @@ -196,8 +196,8 @@ static const struct dvb_pll_desc dvb_pll_tua6010xs =3D { /* Panasonic env57h1xd5 (some Philips PLL ?) */ static const struct dvb_pll_desc dvb_pll_env57h1xd5 =3D { .name =3D "Panasonic ENV57H1XD5", - .min =3D 44250000, - .max =3D 858000000, + .min =3D 44250 * kHz, + .max =3D 858 * MHz, .iffreq=3D 36125000, .count =3D 4, .entries =3D { @@ -220,8 +220,8 @@ static void tda665x_bw(struct dvb_frontend *fe, u8 *buf) =20 static const struct dvb_pll_desc dvb_pll_tda665x =3D { .name =3D "Philips TDA6650/TDA6651", - .min =3D 44250000, - .max =3D 858000000, + .min =3D 44250 * kHz, + .max =3D 858 * MHz, .set =3D tda665x_bw, .iffreq=3D 36166667, .initdata =3D (u8[]){ 4, 0x0b, 0xf5, 0x85, 0xab }, @@ -254,8 +254,8 @@ static void tua6034_bw(struct dvb_frontend *fe, u8 *buf) =20 static const struct dvb_pll_desc dvb_pll_tua6034 =3D { .name =3D "Infineon TUA6034", - .min =3D 44250000, - .max =3D 858000000, + .min =3D 44250 * kHz, + .max =3D 858 * MHz, .iffreq=3D 36166667, .count =3D 3, .set =3D tua6034_bw, @@ -278,8 +278,8 @@ static void tded4_bw(struct dvb_frontend *fe, u8 *buf) =20 static const struct dvb_pll_desc dvb_pll_tded4 =3D { .name =3D "ALPS TDED4", - .min =3D 47000000, - .max =3D 863000000, + .min =3D 47 * MHz, + .max =3D 863 * MHz, .iffreq=3D 36166667, .set =3D tded4_bw, .count =3D 4, @@ -296,8 +296,8 @@ static const struct dvb_pll_desc dvb_pll_tded4 =3D { */ static const struct dvb_pll_desc dvb_pll_tdhu2 =3D { .name =3D "ALPS TDHU2", - .min =3D 54000000, - .max =3D 864000000, + .min =3D 54 * MHz, + .max =3D 864 * MHz, .iffreq=3D 44000000, .count =3D 4, .entries =3D { @@ -313,8 +313,8 @@ static const struct dvb_pll_desc dvb_pll_tdhu2 =3D { */ static const struct dvb_pll_desc dvb_pll_samsung_tbmv =3D { .name =3D "Samsung TBMV30111IN / TBMV30712IN1", - .min =3D 54000000, - .max =3D 860000000, + .min =3D 54 * MHz, + .max =3D 860 * MHz, .iffreq=3D 44000000, .count =3D 6, .entries =3D { @@ -332,8 +332,8 @@ static const struct dvb_pll_desc dvb_pll_samsung_tbmv = =3D { */ static const struct dvb_pll_desc dvb_pll_philips_sd1878_tda8261 =3D { .name =3D "Philips SD1878", - .min =3D 950000, - .max =3D 2150000, + .min =3D 950 * MHz, + .max =3D 2150 * MHz, .iffreq=3D 249, /* zero-IF, offset 249 is to round up */ .count =3D 4, .entries =3D { @@ -398,8 +398,8 @@ static void opera1_bw(struct dvb_frontend *fe, u8 *buf) =20 static const struct dvb_pll_desc dvb_pll_opera1 =3D { .name =3D "Opera Tuner", - .min =3D 900000, - .max =3D 2250000, + .min =3D 900 * MHz, + .max =3D 2250 * MHz, .initdata =3D (u8[]){ 4, 0x08, 0xe5, 0xe1, 0x00 }, .initdata2 =3D (u8[]){ 4, 0x08, 0xe5, 0xe5, 0x00 }, .iffreq=3D 0, @@ -445,8 +445,8 @@ static void samsung_dtos403ih102a_set(struct dvb_fronte= nd *fe, u8 *buf) /* unknown pll used in Samsung DTOS403IH102A DVB-C tuner */ static const struct dvb_pll_desc dvb_pll_samsung_dtos403ih102a =3D { .name =3D "Samsung DTOS403IH102A", - .min =3D 44250000, - .max =3D 858000000, + .min =3D 44250 * kHz, + .max =3D 858 * MHz, .iffreq =3D 36125000, .count =3D 8, .set =3D samsung_dtos403ih102a_set, @@ -465,8 +465,8 @@ static const struct dvb_pll_desc dvb_pll_samsung_dtos40= 3ih102a =3D { /* Samsung TDTC9251DH0 DVB-T NIM, as used on AirStar 2 */ static const struct dvb_pll_desc dvb_pll_samsung_tdtc9251dh0 =3D { .name =3D "Samsung TDTC9251DH0", - .min =3D 48000000, - .max =3D 863000000, + .min =3D 48 * MHz, + .max =3D 863 * MHz, .iffreq =3D 36166667, .count =3D 3, .entries =3D { @@ -479,8 +479,8 @@ static const struct dvb_pll_desc dvb_pll_samsung_tdtc92= 51dh0 =3D { /* Samsung TBDU18132 DVB-S NIM with TSA5059 PLL, used in SkyStar2 DVB-S 2.= 3 */ static const struct dvb_pll_desc dvb_pll_samsung_tbdu18132 =3D { .name =3D "Samsung TBDU18132", - .min =3D 950000, - .max =3D 2150000, /* guesses */ + .min =3D 950 * MHz, + .max =3D 2150 * MHz, /* guesses */ .iffreq =3D 0, .count =3D 2, .entries =3D { @@ -500,8 +500,8 @@ static const struct dvb_pll_desc dvb_pll_samsung_tbdu18= 132 =3D { /* Samsung TBMU24112 DVB-S NIM with SL1935 zero-IF tuner */ static const struct dvb_pll_desc dvb_pll_samsung_tbmu24112 =3D { .name =3D "Samsung TBMU24112", - .min =3D 950000, - .max =3D 2150000, /* guesses */ + .min =3D 950 * MHz, + .max =3D 2150 * MHz, /* guesses */ .iffreq =3D 0, .count =3D 2, .entries =3D { @@ -521,8 +521,8 @@ static const struct dvb_pll_desc dvb_pll_samsung_tbmu24= 112 =3D { * 822 - 862 1 * 0 0 1 0 0 0 0x88 */ static const struct dvb_pll_desc dvb_pll_alps_tdee4 =3D { .name =3D "ALPS TDEE4", - .min =3D 47000000, - .max =3D 862000000, + .min =3D 47 * MHz, + .max =3D 862 * MHz, .iffreq =3D 36125000, .count =3D 4, .entries =3D { @@ -537,8 +537,8 @@ static const struct dvb_pll_desc dvb_pll_alps_tdee4 =3D= { /* CP cur. 50uA, AGC takeover: 103dBuV, PORT3 on */ static const struct dvb_pll_desc dvb_pll_tua6034_friio =3D { .name =3D "Infineon TUA6034 ISDB-T (Friio)", - .min =3D 90000000, - .max =3D 770000000, + .min =3D 90 * MHz, + .max =3D 770 * MHz, .iffreq =3D 57000000, .initdata =3D (u8[]){ 4, 0x9a, 0x50, 0xb2, 0x08 }, .sleepdata =3D (u8[]){ 4, 0x9a, 0x70, 0xb3, 0x0b }, @@ -553,8 +553,8 @@ static const struct dvb_pll_desc dvb_pll_tua6034_friio = =3D { /* Philips TDA6651 ISDB-T, used in Earthsoft PT1 */ static const struct dvb_pll_desc dvb_pll_tda665x_earth_pt1 =3D { .name =3D "Philips TDA6651 ISDB-T (EarthSoft PT1)", - .min =3D 90000000, - .max =3D 770000000, + .min =3D 90 * MHz, + .max =3D 770 * MHz, .iffreq =3D 57000000, .initdata =3D (u8[]){ 5, 0x0e, 0x7f, 0xc1, 0x80, 0x80 }, .count =3D 10, @@ -799,7 +799,6 @@ struct dvb_frontend *dvb_pll_attach(struct dvb_frontend= *fe, int pll_addr, struct dvb_pll_priv *priv =3D NULL; int ret; const struct dvb_pll_desc *desc; - struct dtv_frontend_properties *c =3D &fe->dtv_property_cache; =20 b1 =3D kmalloc(1, GFP_KERNEL); if (!b1) @@ -845,18 +844,12 @@ struct dvb_frontend *dvb_pll_attach(struct dvb_fronte= nd *fe, int pll_addr, =20 strncpy(fe->ops.tuner_ops.info.name, desc->name, sizeof(fe->ops.tuner_ops.info.name)); - switch (c->delivery_system) { - case SYS_DVBS: - case SYS_DVBS2: - case SYS_TURBO: - case SYS_ISDBS: - fe->ops.tuner_ops.info.frequency_min_hz =3D desc->min * kHz; - fe->ops.tuner_ops.info.frequency_max_hz =3D desc->max * kHz; - break; - default: - fe->ops.tuner_ops.info.frequency_min_hz =3D desc->min; - fe->ops.tuner_ops.info.frequency_max_hz =3D desc->max; - } + + fe->ops.tuner_ops.info.frequency_min_hz =3D desc->min; + fe->ops.tuner_ops.info.frequency_max_hz =3D desc->max; + + dprintk("%s tuner, frequency range: %u...%u\n", + desc->name, desc->min, desc->max); =20 if (!desc->initdata) fe->ops.tuner_ops.init =3D NULL;