All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2] scsi: libsas: Directly kick-off EH when ATA device fell off
@ 2022-12-16 10:03 Xingui Yang
  2022-12-19  2:19 ` Jason Yan
  2022-12-19  9:23 ` John Garry
  0 siblings, 2 replies; 16+ messages in thread
From: Xingui Yang @ 2022-12-16 10:03 UTC (permalink / raw)
  To: jejb, martin.petersen, john.g.garry
  Cc: linux-scsi, linux-kernel, linuxarm, yangxingui, prime.zeng, kangfenglong

If the ATA device fell off, call sas_ata_device_link_abort() directly and
mark all outstanding QCs as failed and kick-off EH Immediately. This avoids
having to wait for block layer timeouts.

Signed-off-by: Xingui Yang <yangxingui@huawei.com>
---
Changes to v1:
- Use dev_is_sata() to check ATA device type 
 drivers/scsi/libsas/sas_discover.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/scsi/libsas/sas_discover.c b/drivers/scsi/libsas/sas_discover.c
index d5bc1314c341..a12b65eb4a2a 100644
--- a/drivers/scsi/libsas/sas_discover.c
+++ b/drivers/scsi/libsas/sas_discover.c
@@ -362,6 +362,9 @@ static void sas_destruct_ports(struct asd_sas_port *port)
 
 void sas_unregister_dev(struct asd_sas_port *port, struct domain_device *dev)
 {
+	if (test_bit(SAS_DEV_GONE, &dev->state) && dev_is_sata(dev))
+		sas_ata_device_link_abort(dev, false);
+
 	if (!test_bit(SAS_DEV_DESTROY, &dev->state) &&
 	    !list_empty(&dev->disco_list_node)) {
 		/* this rphy never saw sas_rphy_add */
-- 
2.17.1


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

end of thread, other threads:[~2022-12-21 10:32 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-16 10:03 [PATCH V2] scsi: libsas: Directly kick-off EH when ATA device fell off Xingui Yang
2022-12-19  2:19 ` Jason Yan
2022-12-19  9:23 ` John Garry
2022-12-19 12:59   ` yangxingui
2022-12-19 14:53     ` John Garry
2022-12-20  2:34       ` yangxingui
2022-12-20  9:49       ` Jason Yan
2022-12-21  9:40         ` John Garry
2022-12-21 10:29           ` Jason Yan
2022-12-21  9:28       ` yangxingui
2022-12-19 15:28   ` Jason Yan
2022-12-19 15:55     ` John Garry
2022-12-19 23:00       ` Damien Le Moal
2022-12-20  8:43         ` John Garry
2022-12-19 22:59     ` Damien Le Moal
2022-12-20  2:39   ` Jason Yan

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.