Linux ATA/IDE development
 help / color / mirror / Atom feed
* libata and software reset
@ 2022-10-18 13:24 John Garry
  2022-10-18 15:04 ` Niklas Cassel
  2022-10-19  5:03 ` Damien Le Moal
  0 siblings, 2 replies; 11+ messages in thread
From: John Garry @ 2022-10-18 13:24 UTC (permalink / raw)
  To: Damien Le Moal, Niklas Cassel, Hannes Reinecke
  Cc: linux-ide@vger.kernel.org, linux-scsi, Xiang Chen

Hi guys,

In the hisi_sas driver there are times in which we need to issue an ATA 
software reset. For this we use hisi_sas_softreset_ata_disk() -> 
sas_execute_ata_cmd() -> sas_execute_tmf(), which uses libsas "slow 
task" mechanism to issue the command.

I would like if libata provided such a function to issue a software 
reset, such that we can send the command as an ATA queued command.

The problem is that often when we would want to issue this software 
reset the associated ata port is frozen, like in ATA EH, and so we 
cannot issue ATA queued commands - internal or normal - at that time.

Is there any way to solve this? Or I am just misunderstanding how and 
when ATA queued commands can and should be used?

I assume that ata_port_operations.softreset callback requires a method 
to be able to issue the softreset directly from the driver, like 
ahci_softreset() -> ahci_do_softreset() -> ahci_exec_polled_cmd().

Thanks,
John

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

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

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-18 13:24 libata and software reset John Garry
2022-10-18 15:04 ` Niklas Cassel
2022-10-19  9:32   ` John Garry
2022-10-19  9:56     ` Damien Le Moal
2022-10-19 10:15       ` John Garry
2022-10-19  5:03 ` Damien Le Moal
2022-10-19  5:04   ` Damien Le Moal
2022-10-19  9:42     ` John Garry
2022-10-19  9:53       ` Damien Le Moal
2022-10-19 10:15       ` Damien Le Moal
2022-10-19 10:34         ` John Garry

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