All of lore.kernel.org
 help / color / mirror / Atom feed
From: Piotr Chmura <chmooreck@gmail.com>
To: Thorsten Leemhuis <regressions@leemhuis.info>
Cc: robert Schlabbach <robert_s@gmx.net>,
	Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Antti Palosaari <crope@iki.fi>
Subject: [PATCH v2] si2157: unknown chip version Si2147-A30 ROM 0x50
Date: Thu, 31 Mar 2022 09:36:36 +0200	[thread overview]
Message-ID: <9ccce84f-3573-46bd-0444-e812ea2524a9@gmail.com> (raw)

Fix firmware file names assignment in si2157 tuner, allow for running 
devices without firmware files needed.


It's regression in kernel 5.17.0, worked fine in 5.16 series.

device: 07ca:1871 AVerMedia Technologies, Inc. TD310 DVB-T/T2/C dongle
modprobe gives error: unknown chip version Si2147-A30 ROM 0x50
Device initialization is interrupted.

caused by:
1. table si2157_tuners has swapped fields rom_id and required vs struct 
si2157_tuner_info.
2. both firmware file names can be null for devices with required == 
false - device uses build-in firmware in this case

Fix:
1. Rearrange fields in table si2157_tuners
2. Allow both firmware file names be NULL for devices defined with 
required == false


Fixes: 1c35ba3bf972 ("media: si2157: use a different namespace for 
firmware")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=215726
Link: 
https://lore.kernel.org/lkml/5f660108-8812-383c-83e4-29ee0558d623@leemhuis.info/
Cc: stable@vger.kernel.org # 5.17.x
Signed-of-by: Piotr Chmura <chmooreck@poczta.onet.pl>
Tested-by: Robert Schlabbach <robert_s@gmx.net>

---

--- a/drivers/media/tuners/si2157.c    2022-03-20 21:14:17.000000000 +0100
+++ b/drivers/media/tuners/si2157.c    2022-03-22 23:48:05.604408331 +0100
@@ -77,16 +77,16 @@ err_mutex_unlock:
  }

  static const struct si2157_tuner_info si2157_tuners[] = {
-    { SI2141, false, 0x60, SI2141_60_FIRMWARE, SI2141_A10_FIRMWARE },
-    { SI2141, false, 0x61, SI2141_61_FIRMWARE, SI2141_A10_FIRMWARE },
-    { SI2146, false, 0x11, SI2146_11_FIRMWARE, NULL },
-    { SI2147, false, 0x50, SI2147_50_FIRMWARE, NULL },
-    { SI2148, true,  0x32, SI2148_32_FIRMWARE, SI2158_A20_FIRMWARE },
-    { SI2148, true,  0x33, SI2148_33_FIRMWARE, SI2158_A20_FIRMWARE },
-    { SI2157, false, 0x50, SI2157_50_FIRMWARE, SI2157_A30_FIRMWARE },
-    { SI2158, false, 0x50, SI2158_50_FIRMWARE, SI2158_A20_FIRMWARE },
-    { SI2158, false, 0x51, SI2158_51_FIRMWARE, SI2158_A20_FIRMWARE },
-    { SI2177, false, 0x50, SI2177_50_FIRMWARE, SI2157_A30_FIRMWARE },
+    { SI2141, 0x60, false, SI2141_60_FIRMWARE, SI2141_A10_FIRMWARE },
+    { SI2141, 0x61, false, SI2141_61_FIRMWARE, SI2141_A10_FIRMWARE },
+    { SI2146, 0x11, false, SI2146_11_FIRMWARE, NULL },
+    { SI2147, 0x50, false, SI2147_50_FIRMWARE, NULL },
+    { SI2148, 0x32, true,  SI2148_32_FIRMWARE, SI2158_A20_FIRMWARE },
+    { SI2148, 0x33, true,  SI2148_33_FIRMWARE, SI2158_A20_FIRMWARE },
+    { SI2157, 0x50, false, SI2157_50_FIRMWARE, SI2157_A30_FIRMWARE },
+    { SI2158, 0x50, false, SI2158_50_FIRMWARE, SI2158_A20_FIRMWARE },
+    { SI2158, 0x51, false, SI2158_51_FIRMWARE, SI2158_A20_FIRMWARE },
+    { SI2177, 0x50, false, SI2177_50_FIRMWARE, SI2157_A30_FIRMWARE },
  };

  static int si2157_load_firmware(struct dvb_frontend *fe,
@@ -178,7 +178,7 @@ static int si2157_find_and_load_firmware
          }
      }

-    if (!fw_name && !fw_alt_name) {
+    if (required && !fw_name && !fw_alt_name) {
          dev_err(&client->dev,
              "unknown chip version Si21%d-%c%c%c ROM 0x%02x\n",
              part_id, cmd.args[1], cmd.args[3], cmd.args[4], rom_id);


                 reply	other threads:[~2022-03-31  7:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=9ccce84f-3573-46bd-0444-e812ea2524a9@gmail.com \
    --to=chmooreck@gmail.com \
    --cc=crope@iki.fi \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab+huawei@kernel.org \
    --cc=regressions@leemhuis.info \
    --cc=robert_s@gmx.net \
    /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.