Patch "Revert "USB: bcma: Add a check for devm_gpiod_get"" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    Revert "USB: bcma: Add a check for devm_gpiod_get"

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     revert-usb-bcma-add-a-check-for-devm_gpiod_get.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 7881f0f70cc03028e6764bc1a63824c0e4825fbf
Author: Rafał Miłecki <rafal@xxxxxxxxxx>
Date:   Tue Aug 31 08:54:19 2021 +0200

    Revert "USB: bcma: Add a check for devm_gpiod_get"
    
    [ Upstream commit d91adc5322ab53df4b6d1989242bfb6c63163eb2 ]
    
    This reverts commit f3de5d857bb2362b00e2a8d4bc886cd49dcb66db.
    
    That commit broke USB on all routers that have USB always powered on and
    don't require toggling any GPIO. It's a majority of devices actually.
    
    The original code worked and seemed safe: vcc GPIO is optional and
    bcma_hci_platform_power_gpio() takes care of checking the pointer before
    using it.
    
    This revert fixes:
    [   10.801127] bcma_hcd: probe of bcma0:11 failed with error -2
    
    Fixes: f3de5d857bb2 ("USB: bcma: Add a check for devm_gpiod_get")
    Cc: stable <stable@xxxxxxxxxxxxxxx>
    Cc: Chuhong Yuan <hslester96@xxxxxxxxx>
    Signed-off-by: Rafał Miłecki <rafal@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20210831065419.18371-1-zajec5@xxxxxxxxx
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Stable-dep-of: cd136706b4f9 ("USB: bcma: Make GPIO explicitly optional")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/usb/host/bcma-hcd.c b/drivers/usb/host/bcma-hcd.c
index 652fa29beb27..2400a826397a 100644
--- a/drivers/usb/host/bcma-hcd.c
+++ b/drivers/usb/host/bcma-hcd.c
@@ -406,12 +406,9 @@ static int bcma_hcd_probe(struct bcma_device *core)
 		return -ENOMEM;
 	usb_dev->core = core;
 
-	if (core->dev.of_node) {
+	if (core->dev.of_node)
 		usb_dev->gpio_desc = devm_gpiod_get(&core->dev, "vcc",
 						    GPIOD_OUT_HIGH);
-		if (IS_ERR(usb_dev->gpio_desc))
-			return PTR_ERR(usb_dev->gpio_desc);
-	}
 
 	switch (core->id.id) {
 	case BCMA_CORE_USB20_HOST:



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux