libata: thaw port after maximum reset retries
PATCH 1/1 libata: thaw port after maximum reset retries
The libata error recovery tries to reset a port a number of times and if unsuccessful, gives up. The code does not thaw the port before it exits. If the bad disk i.e. the disk that could not be reset is removed and a healthy disk is inserted, the new disk does not register, since the port is frozen. This patch fixes the same.
--- drivers/ata/libata-eh.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
drivers/ata/libata-eh.c +5 -1
@@ -2637,8 +2637,12 @@ int ata_eh_reset(struct ata_link *link, int classify, sata_scr_read(link, SCR_STATUS, &sstatus)) rc = -ERESTART ; -if (rc == -ERESTART || try >= max_tries) +if (rc == -ERESTART || try >= max_tries) { +/* thaw the port */ +if (ata_is_host_link (link)) +ata_eh_thaw_port (ap); goto out; + } now = jiffies;if (time_before (now, deadline)) {
Signature · 1 line
1.6.0.4
Quoted 6 lines · Chaitanya Lala
The libata error recovery tries to reset a port a number of times and if unsuccessful, gives up. The code does not thaw the port before it exits. If the bad disk i.e. the disk that could not be reset is removed and a healthy disk is inserted, the new disk does not register, since the port is frozen. This patch fixes the same.
Sorry about the long delay but has this actually happen? The rationale for not thawing there was that if the port was behaving erratically, it could cause IRQ storm and thus take the whole controller down and the port can be revived by issuing rescan if the administrator intends to do so.
Thanks.
Signature · 1 line
tejun