public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] libata: misc frozen port cleanups
@ 2022-10-07 13:23 Niklas Cassel
  2022-10-07 13:23 ` [PATCH 3/4] scsi: libsas: make use of ata_port_is_frozen() helper Niklas Cassel
  2022-10-18  4:59 ` [PATCH 0/4] libata: misc frozen port cleanups Damien Le Moal
  0 siblings, 2 replies; 6+ messages in thread
From: Niklas Cassel @ 2022-10-07 13:23 UTC (permalink / raw)
  To: Damien Le Moal, Mikael Pettersson, James E.J. Bottomley,
	Martin K. Petersen
  Cc: john.garry, Niklas Cassel, linux-ide, linux-scsi

Hello there,

This series adds a new ata_port_is_frozen() helper function,
and makes use of it in ata and libsas.

Additionally, improve ata_read_log_page() to avoid a futile
retry while the port is frozen.

Kind regards,
Niklas


Niklas Cassel (4):
  ata: add ata_port_is_frozen() helper
  ata: make use of ata_port_is_frozen() helper
  scsi: libsas: make use of ata_port_is_frozen() helper
  ata: libata-core: do not retry reading the log on timeout

 drivers/ata/libahci.c         |  6 +++---
 drivers/ata/libata-acpi.c     |  4 ++--
 drivers/ata/libata-core.c     |  7 ++++---
 drivers/ata/libata-eh.c       | 21 ++++++++++-----------
 drivers/ata/libata-sata.c     |  2 +-
 drivers/ata/libata-scsi.c     |  2 +-
 drivers/ata/sata_nv.c         |  2 +-
 drivers/ata/sata_promise.c    |  2 +-
 drivers/ata/sata_sx4.c        |  2 +-
 drivers/scsi/libsas/sas_ata.c |  2 +-
 include/linux/libata.h        |  5 +++++
 11 files changed, 30 insertions(+), 25 deletions(-)

-- 
2.37.3


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

* [PATCH 3/4] scsi: libsas: make use of ata_port_is_frozen() helper
  2022-10-07 13:23 [PATCH 0/4] libata: misc frozen port cleanups Niklas Cassel
@ 2022-10-07 13:23 ` Niklas Cassel
  2022-10-10  8:03   ` John Garry
  2022-10-18  4:59 ` [PATCH 0/4] libata: misc frozen port cleanups Damien Le Moal
  1 sibling, 1 reply; 6+ messages in thread
From: Niklas Cassel @ 2022-10-07 13:23 UTC (permalink / raw)
  To: James E.J. Bottomley, Martin K. Petersen
  Cc: john.garry, Niklas Cassel, linux-scsi

Clean up the code by making use of the newly introduced
ata_port_is_frozen() helper function.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
---
 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 d35c9296f738..5692577f82e3 100644
--- a/drivers/scsi/libsas/sas_ata.c
+++ b/drivers/scsi/libsas/sas_ata.c
@@ -101,7 +101,7 @@ static void sas_ata_task_done(struct sas_task *task)
 
 	spin_lock_irqsave(ap->lock, flags);
 	/* check if we lost the race with libata/sas_ata_post_internal() */
-	if (unlikely(ap->pflags & ATA_PFLAG_FROZEN)) {
+	if (unlikely(ata_port_is_frozen(ap))) {
 		spin_unlock_irqrestore(ap->lock, flags);
 		if (qc->scsicmd)
 			goto qc_already_gone;
-- 
2.37.3


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

* Re: [PATCH 3/4] scsi: libsas: make use of ata_port_is_frozen() helper
  2022-10-07 13:23 ` [PATCH 3/4] scsi: libsas: make use of ata_port_is_frozen() helper Niklas Cassel
@ 2022-10-10  8:03   ` John Garry
  2022-10-17  3:08     ` Damien Le Moal
  0 siblings, 1 reply; 6+ messages in thread
From: John Garry @ 2022-10-10  8:03 UTC (permalink / raw)
  To: Niklas Cassel, James E.J. Bottomley, Martin K. Petersen; +Cc: linux-scsi

On 07/10/2022 14:23, Niklas Cassel wrote:
> Clean up the code by making use of the newly introduced
> ata_port_is_frozen() helper function.
> 
> Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>

Reviewed-by: John Garry <john.garry@huawei.com>

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

* Re: [PATCH 3/4] scsi: libsas: make use of ata_port_is_frozen() helper
  2022-10-10  8:03   ` John Garry
@ 2022-10-17  3:08     ` Damien Le Moal
  2022-10-18  1:33       ` Martin K. Petersen
  0 siblings, 1 reply; 6+ messages in thread
From: Damien Le Moal @ 2022-10-17  3:08 UTC (permalink / raw)
  To: John Garry, Niklas Cassel, James E.J. Bottomley,
	Martin K. Petersen
  Cc: linux-scsi

On 10/10/22 17:03, John Garry wrote:
> On 07/10/2022 14:23, Niklas Cassel wrote:
>> Clean up the code by making use of the newly introduced
>> ata_port_is_frozen() helper function.
>>
>> Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
> 
> Reviewed-by: John Garry <john.garry@huawei.com>

Martin,

I can take this one through the libata tree as that would avoid test build
errors. If you agree, can you send your ack please ?

-- 
Damien Le Moal
Western Digital Research


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

* Re: [PATCH 3/4] scsi: libsas: make use of ata_port_is_frozen() helper
  2022-10-17  3:08     ` Damien Le Moal
@ 2022-10-18  1:33       ` Martin K. Petersen
  0 siblings, 0 replies; 6+ messages in thread
From: Martin K. Petersen @ 2022-10-18  1:33 UTC (permalink / raw)
  To: Damien Le Moal
  Cc: John Garry, Niklas Cassel, James E.J. Bottomley,
	Martin K. Petersen, linux-scsi


Damien,

> I can take this one through the libata tree as that would avoid test
> build errors. If you agree, can you send your ack please ?

Yes, that's fine.

Acked-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH 0/4] libata: misc frozen port cleanups
  2022-10-07 13:23 [PATCH 0/4] libata: misc frozen port cleanups Niklas Cassel
  2022-10-07 13:23 ` [PATCH 3/4] scsi: libsas: make use of ata_port_is_frozen() helper Niklas Cassel
@ 2022-10-18  4:59 ` Damien Le Moal
  1 sibling, 0 replies; 6+ messages in thread
From: Damien Le Moal @ 2022-10-18  4:59 UTC (permalink / raw)
  To: Niklas Cassel, Mikael Pettersson, James E.J. Bottomley,
	Martin K. Petersen
  Cc: john.garry, linux-ide, linux-scsi

On 10/7/22 22:23, Niklas Cassel wrote:
> Hello there,
> 
> This series adds a new ata_port_is_frozen() helper function,
> and makes use of it in ata and libsas.
> 
> Additionally, improve ata_read_log_page() to avoid a futile
> retry while the port is frozen.
> 
> Kind regards,
> Niklas
> 
> 
> Niklas Cassel (4):
>   ata: add ata_port_is_frozen() helper
>   ata: make use of ata_port_is_frozen() helper
>   scsi: libsas: make use of ata_port_is_frozen() helper
>   ata: libata-core: do not retry reading the log on timeout
> 
>  drivers/ata/libahci.c         |  6 +++---
>  drivers/ata/libata-acpi.c     |  4 ++--
>  drivers/ata/libata-core.c     |  7 ++++---
>  drivers/ata/libata-eh.c       | 21 ++++++++++-----------
>  drivers/ata/libata-sata.c     |  2 +-
>  drivers/ata/libata-scsi.c     |  2 +-
>  drivers/ata/sata_nv.c         |  2 +-
>  drivers/ata/sata_promise.c    |  2 +-
>  drivers/ata/sata_sx4.c        |  2 +-
>  drivers/scsi/libsas/sas_ata.c |  2 +-
>  include/linux/libata.h        |  5 +++++
>  11 files changed, 30 insertions(+), 25 deletions(-)
> 

Applied to for-6.2. Thanks !

-- 
Damien Le Moal
Western Digital Research


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

end of thread, other threads:[~2022-10-18  5:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-07 13:23 [PATCH 0/4] libata: misc frozen port cleanups Niklas Cassel
2022-10-07 13:23 ` [PATCH 3/4] scsi: libsas: make use of ata_port_is_frozen() helper Niklas Cassel
2022-10-10  8:03   ` John Garry
2022-10-17  3:08     ` Damien Le Moal
2022-10-18  1:33       ` Martin K. Petersen
2022-10-18  4:59 ` [PATCH 0/4] libata: misc frozen port cleanups Damien Le Moal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox