[PATCH][Disco][SRU Cosmic][SRU Bionic] scsi: libsas: check the ata device status by ata_dev_enabled()

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH][Disco][SRU Cosmic][SRU Bionic] scsi: libsas: check the ata device status by ata_dev_enabled()

dann frazier-4
From: Jason Yan <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1809046

When ata device IDENTIFY failed, the ata device status is ATA_DEV_UNKNOWN. The
libata reported like:

[113518.620433] ata5.00: qc timeout (cmd 0xec)
[113518.653646] ata5.00: failed to IDENTIFY (I/O error, err_mask=0x4)

But libsas verifies the device status by ata_dev_disabled(), which skipped
ATA_DEV_UNKNOWN. This will make libsas think the ata device probing succeed
the device cannot be actually brought up. And even the new bcast of this
device will be considered as flutter and will not probe this device again.

Change ata_dev_disabled() to !ata_dev_enabled() so that libsas can deal with
this if the ata device probe failed. New bcasts can let us try to probe the
device again and bring it up if it is fine to IDENTIFY.

Tested-by: Zhou Yupeng <[hidden email]>
Signed-off-by: Jason Yan <[hidden email]>
CC: John Garry <[hidden email]>
CC: Johannes Thumshirn <[hidden email]>
CC: Ewan Milne <[hidden email]>
CC: Christoph Hellwig <[hidden email]>
CC: Tomas Henzl <[hidden email]>
CC: Dan Williams <[hidden email]>
CC: Hannes Reinecke <[hidden email]>
Reviewed-by: John Garry <[hidden email]>
Reviewed-by: Hannes Reinecke <[hidden email]>
Reviewed-by: Johannes Thumshirn <[hidden email]>
Reviewed-by: Christoph Hellwig <[hidden email]>
Signed-off-by: Martin K. Petersen <[hidden email]>
(cherry picked from commit 437207d3697f500f34f126a8ab1c29417ba4a184)
Signed-off-by: dann frazier <[hidden email]>
---
 drivers/scsi/libsas/sas_ata.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
index 64a958a99f6a8..4f6cdf53e9136 100644
--- a/drivers/scsi/libsas/sas_ata.c
+++ b/drivers/scsi/libsas/sas_ata.c
@@ -654,7 +654,7 @@ void sas_probe_sata(struct asd_sas_port *port)
  /* if libata could not bring the link up, don't surface
  * the device
  */
- if (ata_dev_disabled(sas_to_ata_dev(dev)))
+ if (!ata_dev_enabled(sas_to_ata_dev(dev)))
  sas_fail_probe(dev, __func__, -ENODEV);
  }
 
--
2.20.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [PATCH][Disco][SRU Cosmic][SRU Bionic] scsi: libsas: check the ata device status by ata_dev_enabled()

Khaled Elmously
On 2018-12-18 15:26:46 , dann frazier wrote:

> From: Jason Yan <[hidden email]>
>
> BugLink: https://bugs.launchpad.net/bugs/1809046
>
> When ata device IDENTIFY failed, the ata device status is ATA_DEV_UNKNOWN. The
> libata reported like:
>
> [113518.620433] ata5.00: qc timeout (cmd 0xec)
> [113518.653646] ata5.00: failed to IDENTIFY (I/O error, err_mask=0x4)
>
> But libsas verifies the device status by ata_dev_disabled(), which skipped
> ATA_DEV_UNKNOWN. This will make libsas think the ata device probing succeed
> the device cannot be actually brought up. And even the new bcast of this
> device will be considered as flutter and will not probe this device again.
>
> Change ata_dev_disabled() to !ata_dev_enabled() so that libsas can deal with
> this if the ata device probe failed. New bcasts can let us try to probe the
> device again and bring it up if it is fine to IDENTIFY.
>
> Tested-by: Zhou Yupeng <[hidden email]>
> Signed-off-by: Jason Yan <[hidden email]>
> CC: John Garry <[hidden email]>
> CC: Johannes Thumshirn <[hidden email]>
> CC: Ewan Milne <[hidden email]>
> CC: Christoph Hellwig <[hidden email]>
> CC: Tomas Henzl <[hidden email]>
> CC: Dan Williams <[hidden email]>
> CC: Hannes Reinecke <[hidden email]>
> Reviewed-by: John Garry <[hidden email]>
> Reviewed-by: Hannes Reinecke <[hidden email]>
> Reviewed-by: Johannes Thumshirn <[hidden email]>
> Reviewed-by: Christoph Hellwig <[hidden email]>
> Signed-off-by: Martin K. Petersen <[hidden email]>
> (cherry picked from commit 437207d3697f500f34f126a8ab1c29417ba4a184)
> Signed-off-by: dann frazier <[hidden email]>
> ---
>  drivers/scsi/libsas/sas_ata.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
> index 64a958a99f6a8..4f6cdf53e9136 100644
> --- a/drivers/scsi/libsas/sas_ata.c
> +++ b/drivers/scsi/libsas/sas_ata.c
> @@ -654,7 +654,7 @@ void sas_probe_sata(struct asd_sas_port *port)
>   /* if libata could not bring the link up, don't surface
>   * the device
>   */
> - if (ata_dev_disabled(sas_to_ata_dev(dev)))
> + if (!ata_dev_enabled(sas_to_ata_dev(dev)))
>   sas_fail_probe(dev, __func__, -ENODEV);
>   }
>

Acked-by: Khalid Elmously <[hidden email]>
 

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [PATCH][Disco][SRU Cosmic][SRU Bionic] scsi: libsas: check the ata device status by ata_dev_enabled()

Kleber Souza
In reply to this post by dann frazier-4
On 12/18/18 11:26 PM, dann frazier wrote:

> From: Jason Yan <[hidden email]>
>
> BugLink: https://bugs.launchpad.net/bugs/1809046
>
> When ata device IDENTIFY failed, the ata device status is ATA_DEV_UNKNOWN. The
> libata reported like:
>
> [113518.620433] ata5.00: qc timeout (cmd 0xec)
> [113518.653646] ata5.00: failed to IDENTIFY (I/O error, err_mask=0x4)
>
> But libsas verifies the device status by ata_dev_disabled(), which skipped
> ATA_DEV_UNKNOWN. This will make libsas think the ata device probing succeed
> the device cannot be actually brought up. And even the new bcast of this
> device will be considered as flutter and will not probe this device again.
>
> Change ata_dev_disabled() to !ata_dev_enabled() so that libsas can deal with
> this if the ata device probe failed. New bcasts can let us try to probe the
> device again and bring it up if it is fine to IDENTIFY.
>
> Tested-by: Zhou Yupeng <[hidden email]>
> Signed-off-by: Jason Yan <[hidden email]>
> CC: John Garry <[hidden email]>
> CC: Johannes Thumshirn <[hidden email]>
> CC: Ewan Milne <[hidden email]>
> CC: Christoph Hellwig <[hidden email]>
> CC: Tomas Henzl <[hidden email]>
> CC: Dan Williams <[hidden email]>
> CC: Hannes Reinecke <[hidden email]>
> Reviewed-by: John Garry <[hidden email]>
> Reviewed-by: Hannes Reinecke <[hidden email]>
> Reviewed-by: Johannes Thumshirn <[hidden email]>
> Reviewed-by: Christoph Hellwig <[hidden email]>
> Signed-off-by: Martin K. Petersen <[hidden email]>
> (cherry picked from commit 437207d3697f500f34f126a8ab1c29417ba4a184)
> Signed-off-by: dann frazier <[hidden email]>

Acked-by: Kleber Sacilotto de Souza <[hidden email]>

> ---
>  drivers/scsi/libsas/sas_ata.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
> index 64a958a99f6a8..4f6cdf53e9136 100644
> --- a/drivers/scsi/libsas/sas_ata.c
> +++ b/drivers/scsi/libsas/sas_ata.c
> @@ -654,7 +654,7 @@ void sas_probe_sata(struct asd_sas_port *port)
>   /* if libata could not bring the link up, don't surface
>   * the device
>   */
> - if (ata_dev_disabled(sas_to_ata_dev(dev)))
> + if (!ata_dev_enabled(sas_to_ata_dev(dev)))
>   sas_fail_probe(dev, __func__, -ENODEV);
>   }
>  



--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED[D]: [PATCH][Disco][SRU Cosmic][SRU Bionic] scsi: libsas: check the ata device status by ata_dev_enabled()

Seth Forshee
In reply to this post by dann frazier-4
On Tue, Dec 18, 2018 at 03:26:46PM -0700, dann frazier wrote:

> From: Jason Yan <[hidden email]>
>
> BugLink: https://bugs.launchpad.net/bugs/1809046
>
> When ata device IDENTIFY failed, the ata device status is ATA_DEV_UNKNOWN. The
> libata reported like:
>
> [113518.620433] ata5.00: qc timeout (cmd 0xec)
> [113518.653646] ata5.00: failed to IDENTIFY (I/O error, err_mask=0x4)
>
> But libsas verifies the device status by ata_dev_disabled(), which skipped
> ATA_DEV_UNKNOWN. This will make libsas think the ata device probing succeed
> the device cannot be actually brought up. And even the new bcast of this
> device will be considered as flutter and will not probe this device again.
>
> Change ata_dev_disabled() to !ata_dev_enabled() so that libsas can deal with
> this if the ata device probe failed. New bcasts can let us try to probe the
> device again and bring it up if it is fine to IDENTIFY.
>
> Tested-by: Zhou Yupeng <[hidden email]>
> Signed-off-by: Jason Yan <[hidden email]>
> CC: John Garry <[hidden email]>
> CC: Johannes Thumshirn <[hidden email]>
> CC: Ewan Milne <[hidden email]>
> CC: Christoph Hellwig <[hidden email]>
> CC: Tomas Henzl <[hidden email]>
> CC: Dan Williams <[hidden email]>
> CC: Hannes Reinecke <[hidden email]>
> Reviewed-by: John Garry <[hidden email]>
> Reviewed-by: Hannes Reinecke <[hidden email]>
> Reviewed-by: Johannes Thumshirn <[hidden email]>
> Reviewed-by: Christoph Hellwig <[hidden email]>
> Signed-off-by: Martin K. Petersen <[hidden email]>
> (cherry picked from commit 437207d3697f500f34f126a8ab1c29417ba4a184)
> Signed-off-by: dann frazier <[hidden email]>

Applied to disco/master-next, thanks!

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED[B/C]: [PATCH][Disco][SRU Cosmic][SRU Bionic] scsi: libsas: check the ata device status by ata_dev_enabled()

Kleber Souza
In reply to this post by dann frazier-4
On 12/18/18 11:26 PM, dann frazier wrote:

> From: Jason Yan <[hidden email]>
>
> BugLink: https://bugs.launchpad.net/bugs/1809046
>
> When ata device IDENTIFY failed, the ata device status is ATA_DEV_UNKNOWN. The
> libata reported like:
>
> [113518.620433] ata5.00: qc timeout (cmd 0xec)
> [113518.653646] ata5.00: failed to IDENTIFY (I/O error, err_mask=0x4)
>
> But libsas verifies the device status by ata_dev_disabled(), which skipped
> ATA_DEV_UNKNOWN. This will make libsas think the ata device probing succeed
> the device cannot be actually brought up. And even the new bcast of this
> device will be considered as flutter and will not probe this device again.
>
> Change ata_dev_disabled() to !ata_dev_enabled() so that libsas can deal with
> this if the ata device probe failed. New bcasts can let us try to probe the
> device again and bring it up if it is fine to IDENTIFY.
>
> Tested-by: Zhou Yupeng <[hidden email]>
> Signed-off-by: Jason Yan <[hidden email]>
> CC: John Garry <[hidden email]>
> CC: Johannes Thumshirn <[hidden email]>
> CC: Ewan Milne <[hidden email]>
> CC: Christoph Hellwig <[hidden email]>
> CC: Tomas Henzl <[hidden email]>
> CC: Dan Williams <[hidden email]>
> CC: Hannes Reinecke <[hidden email]>
> Reviewed-by: John Garry <[hidden email]>
> Reviewed-by: Hannes Reinecke <[hidden email]>
> Reviewed-by: Johannes Thumshirn <[hidden email]>
> Reviewed-by: Christoph Hellwig <[hidden email]>
> Signed-off-by: Martin K. Petersen <[hidden email]>
> (cherry picked from commit 437207d3697f500f34f126a8ab1c29417ba4a184)
> Signed-off-by: dann frazier <[hidden email]>
> ---
>  drivers/scsi/libsas/sas_ata.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
> index 64a958a99f6a8..4f6cdf53e9136 100644
> --- a/drivers/scsi/libsas/sas_ata.c
> +++ b/drivers/scsi/libsas/sas_ata.c
> @@ -654,7 +654,7 @@ void sas_probe_sata(struct asd_sas_port *port)
>   /* if libata could not bring the link up, don't surface
>   * the device
>   */
> - if (ata_dev_disabled(sas_to_ata_dev(dev)))
> + if (!ata_dev_enabled(sas_to_ata_dev(dev)))
>   sas_fail_probe(dev, __func__, -ENODEV);
>   }
>  

Applied to bionic/master-next and cosmic/master-next branches.

Thanks,
Kleber


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team