summaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-sff.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2016-01-29 13:06:53 +0100
committerTejun Heo <tj@kernel.org>2016-01-29 13:06:53 +0100
commita588afc920bc50e894f6ae2874c4281c795e0979 (patch)
tree6aeda131112f26a167ab509cba70354376b60ba6 /drivers/ata/libata-sff.c
parentlibata: disable forced PORTS_IMPL for >= AHCI 1.3 (diff)
downloadlinux-a588afc920bc50e894f6ae2874c4281c795e0979.tar.xz
linux-a588afc920bc50e894f6ae2874c4281c795e0979.zip
libata-sff: use WARN instead of BUG on illegal host state machine state
ata_sff_hsm_move() triggers BUG if it sees a host state machine state that it dind't expect. The risk for data corruption when the condition occurs is low as it's highly unlikely that it would lead to spurious completion of commands. The BUG occasionally triggered for subtle race conditions in the driver. Let's downgrade it to WARN so that it doesn't kill the machine unnecessarily. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Dmitry Vyukov <dvyukov@google.com>
Diffstat (limited to 'drivers/ata/libata-sff.c')
-rw-r--r--drivers/ata/libata-sff.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index cdf6215a9a22..608677df4f49 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -1296,7 +1296,8 @@ fsm_start:
break;
default:
poll_next = 0;
- BUG();
+ WARN(true, "ata%d: SFF host state machine in invalid state %d",
+ ap->print_id, ap->hsm_task_state);
}
return poll_next;