Patch "scsi: 3w-9xxx: Avoid disabling device if failing to enable it" has been added to the 5.15-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

    scsi: 3w-9xxx: Avoid disabling device if failing to enable it

to the 5.15-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:
     scsi-3w-9xxx-avoid-disabling-device-if-failing-to-en.patch
and it can be found in the queue-5.15 subdirectory.

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



commit 4fdaf7a285b08fb5a48d8d3a880cc935f3f2aacb
Author: Letu Ren <fantasquex@xxxxxxxxx>
Date:   Mon Aug 29 19:01:15 2022 +0800

    scsi: 3w-9xxx: Avoid disabling device if failing to enable it
    
    [ Upstream commit 7eff437b5ee1309b34667844361c6bbb5c97df05 ]
    
    The original code will "goto out_disable_device" and call
    pci_disable_device() if pci_enable_device() fails. The kernel will generate
    a warning message like "3w-9xxx 0000:00:05.0: disabling already-disabled
    device".
    
    We shouldn't disable a device that failed to be enabled. A simple return is
    fine.
    
    Link: https://lore.kernel.org/r/20220829110115.38789-1-fantasquex@xxxxxxxxx
    Reported-by: Zheyu Ma <zheyuma97@xxxxxxxxx>
    Signed-off-by: Letu Ren <fantasquex@xxxxxxxxx>
    Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c
index e41cc354cc8a..6da591508f23 100644
--- a/drivers/scsi/3w-9xxx.c
+++ b/drivers/scsi/3w-9xxx.c
@@ -2006,7 +2006,7 @@ static int twa_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id)
 	retval = pci_enable_device(pdev);
 	if (retval) {
 		TW_PRINTK(host, TW_DRIVER, 0x34, "Failed to enable pci device");
-		goto out_disable_device;
+		return -ENODEV;
 	}
 
 	pci_set_master(pdev);



[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