GNU Linux-libre 5.15.31-gnu scripts
[releases.git] / deblob-5.15
index a398ea0166e9f1ec2020c0a5d6ca3d9f38a6e2ff..190303eb5d76439e6552e15ceeb5828849bf81f1 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-#    Copyright (C) 2008-2021 Alexandre Oliva <lxoliva@fsfla.org>
+#    Copyright (C) 2008-2022 Alexandre Oliva <lxoliva@fsfla.org>
 #    Copyright (C) 2008 Jeff Moe
 #    Copyright (C) 2009 Rubén Rodríguez <ruben@gnu.org>
 #
@@ -1782,7 +1782,10 @@ clean_sed '
          -EINVAL)
 }' drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c 'report missing Free firmware'
 clean_blob drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
-clean_sed '
+if grep -q loaded_fw_major drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c; then
+  clean_blob drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+else
+  clean_sed '
 /^int bnx2x_compare_fw_ver/,/^}$/{
   /^           u32 my_fw = /i\
                /*(DEBLOBBED)*/
@@ -1793,6 +1796,7 @@ clean_sed '
                u32 my_fw = ~loaded_fw;
   }
 }' drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c 'fail already-loaded test'
+fi
 clean_blob drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h
 clean_sed '
 /static void bnx2x_init_wr_wb/{
@@ -2867,6 +2871,9 @@ clean_mk CONFIG_NET_DSA_LANTIQ_GSWIP drivers/net/dsa/Makefile
 
 announce MICROSEMI_PHY - "Microsemi PHYs"
 reject_firmware drivers/net/phy/mscc/mscc_main.c
+if grep -q MODULE_FIRMWARE drivers/net/phy/mscc/mscc_main.c; then
+  clean_blob drivers/net/phy/mscc/mscc_main.c
+fi
 clean_blob drivers/net/phy/mscc/mscc.h
 clean_kconfig drivers/net/phy/Kconfig MICROSEMI_PHY
 clean_mk CONFIG_MICROSEMI_PHY drivers/net/phy/mscc/Makefile
@@ -3199,7 +3206,7 @@ clean_mk CONFIG_USB_UEAGLEATM drivers/usb/atm/Makefile
 
 # host
 
-announce USB_XHCI_PCI_RENESAS - "Support for additional Renesas xHCI controller with firwmare"
+announce USB_XHCI_PCI_RENESAS - "Support for additional Renesas xHCI controller with firmware"
 reject_firmware_nowarn drivers/usb/host/xhci-pci-renesas.c
 clean_kconfig drivers/usb/host/Kconfig USB_XHCI_PCI_RENESAS
 clean_mk CONFIG_USB_XHCI_PCI_RENESAS drivers/usb/host/Makefile