Commit 21dcd300 authored by Corey Minyard's avatar Corey Minyard Committed by Linus Torvalds

[PATCH] ipmi: bt restart reset fixes

The current BT retry/reset mechanism fails to succeed on a PowerEdge 1650,
when the controller is wedged with B2H_ATN asserted at XACTION_START.  If this
occurs, no further commands will ever succeed unless the state of the
controller is first cleared out.

Furthermore, the soft reset would only occur if the first command after insmod
was the one that timed out, not if a later command timed out.

This patch changes the retry/reset mechanism to be as follows:

Before retrying a command, clear the state of the BT controller such that the
flags represent ready for a new transaction.  This increases the chance of
success of the restarted transaction.

After 2 retries, issue a soft reset and retry one more time before giving up
and reporting back a failure.
Signed-off-by: default avatarMatt Domsch <Matt_Domsch@dell.com>
Acked-by: default avatarRocky Craig <rocky.craig@hp.com>
Signed-off-by: default avatarCorey Minyard <minyard@acm.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ea94027b
...@@ -333,8 +333,7 @@ static void error_recovery(struct si_sm_data *bt, char *reason) ...@@ -333,8 +333,7 @@ static void error_recovery(struct si_sm_data *bt, char *reason)
bt->state = BT_STATE_HOSED; bt->state = BT_STATE_HOSED;
if (!bt->nonzero_status) if (!bt->nonzero_status)
printk(KERN_ERR "IPMI: BT stuck, try power cycle\n"); printk(KERN_ERR "IPMI: BT stuck, try power cycle\n");
else if (bt->seq == FIRST_SEQ + BT_RETRY_LIMIT) { else if (bt->error_retries <= BT_RETRY_LIMIT + 1) {
/* most likely during insmod */
printk(KERN_DEBUG "IPMI: BT reset (takes 5 secs)\n"); printk(KERN_DEBUG "IPMI: BT reset (takes 5 secs)\n");
bt->state = BT_STATE_RESET1; bt->state = BT_STATE_RESET1;
} }
...@@ -475,6 +474,7 @@ static enum si_sm_result bt_event(struct si_sm_data *bt, long time) ...@@ -475,6 +474,7 @@ static enum si_sm_result bt_event(struct si_sm_data *bt, long time)
break; break;
case BT_STATE_RESTART: /* don't reset retries! */ case BT_STATE_RESTART: /* don't reset retries! */
reset_flags(bt);
bt->write_data[2] = ++bt->seq; bt->write_data[2] = ++bt->seq;
bt->read_count = 0; bt->read_count = 0;
bt->nonzero_status = 0; bt->nonzero_status = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment