All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: ufshcd-pltfrm: fix deferred probing
@ 2021-03-29 20:50 Sergey Shtylyov
  2021-03-29 21:06 ` Bart Van Assche
  2021-04-16  2:51 ` Martin K. Petersen
  0 siblings, 2 replies; 4+ messages in thread
From: Sergey Shtylyov @ 2021-03-29 20:50 UTC (permalink / raw)
  To: Avri Altman, James E.J. Bottomley, Martin K. Petersen, linux-scsi

The driver overrides the error codes returned by platform_get_irq() to
-ENODEV, so if it returns -EPROBE_DEFER, the driver would fail the probe
permanently instead of the deferred probing.  Propagate the error code
upstream, as it should have been done from the start...

Fixes: 2953f850c3b8 ("[SCSI] ufs: use devres functions for ufshcd")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omprussia.ru>

---
This patch is against the 'fixes' branch of Martin Petgersen's 'scsi.git' repo.

drivers/scsi/ufs/ufshcd-pltfrm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: scsi/drivers/scsi/ufs/ufshcd-pltfrm.c
===================================================================
--- scsi.orig/drivers/scsi/ufs/ufshcd-pltfrm.c
+++ scsi/drivers/scsi/ufs/ufshcd-pltfrm.c
@@ -377,7 +377,7 @@ int ufshcd_pltfrm_init(struct platform_d
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0) {
-		err = -ENODEV;
+		err = irq;
 		goto out;
 	}
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] scsi: ufshcd-pltfrm: fix deferred probing
  2021-03-29 20:50 [PATCH] scsi: ufshcd-pltfrm: fix deferred probing Sergey Shtylyov
@ 2021-03-29 21:06 ` Bart Van Assche
  2021-03-30 12:25   ` Sergey Shtylyov
  2021-04-16  2:51 ` Martin K. Petersen
  1 sibling, 1 reply; 4+ messages in thread
From: Bart Van Assche @ 2021-03-29 21:06 UTC (permalink / raw)
  To: Sergey Shtylyov, Avri Altman, James E.J. Bottomley,
	Martin K. Petersen, linux-scsi

On 3/29/21 1:50 PM, Sergey Shtylyov wrote:
> The driver overrides the error codes returned by platform_get_irq() to
> -ENODEV, so if it returns -EPROBE_DEFER, the driver would fail the probe
> permanently instead of the deferred probing.  Propagate the error code
> upstream, as it should have been done from the start...
> 
> Fixes: 2953f850c3b8 ("[SCSI] ufs: use devres functions for ufshcd")
> Signed-off-by: Sergey Shtylyov <s.shtylyov@omprussia.ru>

Hi Sergey,

How has this patch been tested?

Thanks,

Bart.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] scsi: ufshcd-pltfrm: fix deferred probing
  2021-03-29 21:06 ` Bart Van Assche
@ 2021-03-30 12:25   ` Sergey Shtylyov
  0 siblings, 0 replies; 4+ messages in thread
From: Sergey Shtylyov @ 2021-03-30 12:25 UTC (permalink / raw)
  To: Bart Van Assche, Avri Altman, James E.J. Bottomley,
	Martin K. Petersen, linux-scsi

On 3/30/21 12:06 AM, Bart Van Assche wrote:

>> The driver overrides the error codes returned by platform_get_irq() to
>> -ENODEV, so if it returns -EPROBE_DEFER, the driver would fail the probe
>> permanently instead of the deferred probing.  Propagate the error code
>> upstream, as it should have been done from the start...
>>
>> Fixes: 2953f850c3b8 ("[SCSI] ufs: use devres functions for ufshcd")
>> Signed-off-by: Sergey Shtylyov <s.shtylyov@omprussia.ru>
> 
> Hi Sergey,
> 
> How has this patch been tested?

   Only build-tested.
   Misusing platfrom_get_irq() appears a common issue. :-(

> Thanks,
> 
> Bart.

MBR, Sergei

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] scsi: ufshcd-pltfrm: fix deferred probing
  2021-03-29 20:50 [PATCH] scsi: ufshcd-pltfrm: fix deferred probing Sergey Shtylyov
  2021-03-29 21:06 ` Bart Van Assche
@ 2021-04-16  2:51 ` Martin K. Petersen
  1 sibling, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2021-04-16  2:51 UTC (permalink / raw)
  To: James E.J. Bottomley, Avri Altman, Sergey Shtylyov, linux-scsi
  Cc: Martin K . Petersen

On Mon, 29 Mar 2021 23:50:58 +0300, Sergey Shtylyov wrote:

> The driver overrides the error codes returned by platform_get_irq() to
> -ENODEV, so if it returns -EPROBE_DEFER, the driver would fail the probe
> permanently instead of the deferred probing.  Propagate the error code
> upstream, as it should have been done from the start...

Applied to 5.13/scsi-queue, thanks!

[1/1] scsi: ufshcd-pltfrm: fix deferred probing
      https://git.kernel.org/mkp/scsi/c/339c9b63cc7c

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-16  2:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-29 20:50 [PATCH] scsi: ufshcd-pltfrm: fix deferred probing Sergey Shtylyov
2021-03-29 21:06 ` Bart Van Assche
2021-03-30 12:25   ` Sergey Shtylyov
2021-04-16  2:51 ` Martin K. Petersen

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.