cassini: Make missing firmware non-fatal (Closes: #714128)
svn path=/dists/trunk/linux/; revision=20302
This commit is contained in:
parent
7e2ba80295
commit
cf9f72584f
|
@ -1,3 +1,9 @@
|
|||
linux (3.10~rc7-1~exp2) UNRELEASED; urgency=low
|
||||
|
||||
* cassini: Make missing firmware non-fatal (Closes: #714128)
|
||||
|
||||
-- Ben Hutchings <ben@decadent.org.uk> Mon, 01 Jul 2013 00:58:08 +0100
|
||||
|
||||
linux (3.10~rc7-1~exp1) experimental; urgency=low
|
||||
|
||||
* New upstream release candidate
|
||||
|
|
|
@ -0,0 +1,80 @@
|
|||
From: Ben Hutchings <ben@decadent.org.uk>
|
||||
Date: Sun, 23 Jun 2013 05:29:27 +0100
|
||||
Subject: cassini: Make missing firmware non-fatal
|
||||
Forwarded: http://article.gmane.org/gmane.linux.network/275040
|
||||
|
||||
The firmware patch for the Saturn PHY fixes a bug, but is not
|
||||
absolutely essential. So just log an error message and continue if it
|
||||
is missing or invalid.
|
||||
|
||||
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
||||
---
|
||||
drivers/net/ethernet/sun/cassini.c | 18 ++++++++----------
|
||||
1 file changed, 8 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/ethernet/sun/cassini.c b/drivers/net/ethernet/sun/cassini.c
|
||||
index 4c682a3..759441b 100644
|
||||
--- a/drivers/net/ethernet/sun/cassini.c
|
||||
+++ b/drivers/net/ethernet/sun/cassini.c
|
||||
@@ -808,44 +808,43 @@ static int cas_reset_mii_phy(struct cas *cp)
|
||||
return limit <= 0;
|
||||
}
|
||||
|
||||
-static int cas_saturn_firmware_init(struct cas *cp)
|
||||
+static void cas_saturn_firmware_init(struct cas *cp)
|
||||
{
|
||||
const struct firmware *fw;
|
||||
const char fw_name[] = "sun/cassini.bin";
|
||||
int err;
|
||||
|
||||
if (PHY_NS_DP83065 != cp->phy_id)
|
||||
- return 0;
|
||||
+ return;
|
||||
|
||||
err = request_firmware(&fw, fw_name, &cp->pdev->dev);
|
||||
if (err) {
|
||||
pr_err("Failed to load firmware \"%s\"\n",
|
||||
fw_name);
|
||||
- return err;
|
||||
+ return;
|
||||
}
|
||||
if (fw->size < 2) {
|
||||
pr_err("bogus length %zu in \"%s\"\n",
|
||||
fw->size, fw_name);
|
||||
- err = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
cp->fw_load_addr= fw->data[1] << 8 | fw->data[0];
|
||||
cp->fw_size = fw->size - 2;
|
||||
cp->fw_data = vmalloc(cp->fw_size);
|
||||
- if (!cp->fw_data) {
|
||||
- err = -ENOMEM;
|
||||
+ if (!cp->fw_data)
|
||||
goto out;
|
||||
- }
|
||||
memcpy(cp->fw_data, &fw->data[2], cp->fw_size);
|
||||
out:
|
||||
release_firmware(fw);
|
||||
- return err;
|
||||
}
|
||||
|
||||
static void cas_saturn_firmware_load(struct cas *cp)
|
||||
{
|
||||
int i;
|
||||
|
||||
+ if (!cp->fw_data)
|
||||
+ return;
|
||||
+
|
||||
cas_phy_powerdown(cp);
|
||||
|
||||
/* expanded memory access mode */
|
||||
@@ -5083,8 +5082,7 @@ static int cas_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
if (cas_check_invariants(cp))
|
||||
goto err_out_iounmap;
|
||||
if (cp->cas_flags & CAS_FLAG_SATURN)
|
||||
- if (cas_saturn_firmware_init(cp))
|
||||
- goto err_out_iounmap;
|
||||
+ cas_saturn_firmware_init(cp);
|
||||
|
||||
cp->init_block = (struct cas_init_block *)
|
||||
pci_alloc_consistent(pdev, sizeof(struct cas_init_block),
|
|
@ -167,7 +167,7 @@ upstream submission.
|
|||
|
||||
--- a/drivers/bluetooth/btmrvl_sdio.c
|
||||
+++ b/drivers/bluetooth/btmrvl_sdio.c
|
||||
@@ -261,8 +261,6 @@ static int btmrvl_sdio_download_helper(s
|
||||
@@ -288,8 +288,6 @@ static int btmrvl_sdio_download_helper(s
|
||||
ret = request_firmware(&fw_helper, card->helper,
|
||||
&card->func->dev);
|
||||
if ((ret < 0) || !fw_helper) {
|
||||
|
@ -176,7 +176,7 @@ upstream submission.
|
|||
ret = -ENOENT;
|
||||
goto done;
|
||||
}
|
||||
@@ -361,8 +359,6 @@ static int btmrvl_sdio_download_fw_w_hel
|
||||
@@ -388,8 +386,6 @@ static int btmrvl_sdio_download_fw_w_hel
|
||||
ret = request_firmware(&fw_firmware, card->firmware,
|
||||
&card->func->dev);
|
||||
if ((ret < 0) || !fw_firmware) {
|
||||
|
@ -287,7 +287,7 @@ upstream submission.
|
|||
rdev->me_fw->size, fw_name);
|
||||
--- a/drivers/gpu/drm/radeon/r600.c
|
||||
+++ b/drivers/gpu/drm/radeon/r600.c
|
||||
@@ -2248,10 +2248,6 @@ out:
|
||||
@@ -2291,10 +2291,6 @@ out:
|
||||
platform_device_unregister(pdev);
|
||||
|
||||
if (err) {
|
||||
|
@ -1258,7 +1258,7 @@ upstream submission.
|
|||
if (rc) {
|
||||
--- a/drivers/net/ethernet/broadcom/tg3.c
|
||||
+++ b/drivers/net/ethernet/broadcom/tg3.c
|
||||
@@ -10997,11 +10997,8 @@ static int tg3_request_firmware(struct t
|
||||
@@ -11016,11 +11016,8 @@ static int tg3_request_firmware(struct t
|
||||
{
|
||||
const struct tg3_firmware_hdr *fw_hdr;
|
||||
|
||||
|
@ -1381,15 +1381,15 @@ upstream submission.
|
|||
for (i = 0; i < fw->size; i++) {
|
||||
--- a/drivers/net/ethernet/sun/cassini.c
|
||||
+++ b/drivers/net/ethernet/sun/cassini.c
|
||||
@@ -818,11 +818,8 @@ static int cas_saturn_firmware_init(stru
|
||||
return 0;
|
||||
@@ -818,11 +818,8 @@ static void cas_saturn_firmware_init(str
|
||||
return;
|
||||
|
||||
err = request_firmware(&fw, fw_name, &cp->pdev->dev);
|
||||
- if (err) {
|
||||
- pr_err("Failed to load firmware \"%s\"\n",
|
||||
- fw_name);
|
||||
+ if (err)
|
||||
return err;
|
||||
return;
|
||||
- }
|
||||
if (fw->size < 2) {
|
||||
pr_err("bogus length %zu in \"%s\"\n",
|
||||
|
@ -2572,7 +2572,7 @@ upstream submission.
|
|||
}
|
||||
--- a/drivers/usb/serial/ti_usb_3410_5052.c
|
||||
+++ b/drivers/usb/serial/ti_usb_3410_5052.c
|
||||
@@ -1570,10 +1570,8 @@ static int ti_download_firmware(struct t
|
||||
@@ -1571,10 +1571,8 @@ static int ti_download_firmware(struct t
|
||||
}
|
||||
status = request_firmware(&fw_p, buf, &dev->dev);
|
||||
}
|
||||
|
|
|
@ -51,6 +51,8 @@ features/all/xen/microcode.patch
|
|||
features/all/xen/microcode-amd-fam15plus.patch
|
||||
features/all/xen/microcode-typo.patch
|
||||
|
||||
bugfix/all/cassini-Make-missing-firmware-non-fatal.patch
|
||||
|
||||
bugfix/all/firmware_class-log-every-success-and-failure.patch
|
||||
bugfix/all/firmware-remove-redundant-log-messages-from-drivers.patch
|
||||
|
||||
|
|
Loading…
Reference in New Issue