Commit afe57355 authored by James Bottomley's avatar James Bottomley Committed by James Bottomley

[PATCH] fix for Domain Validation hang on some devices with sym_2

There's a bad hang where the driver locks the system solid trying to do
domain validation with certain devices.  The one I've managed to
reproduce it with is a Quantum Atlas.

What happens is that setting the offset to zero is an async negotiation
message.  However, the driver still seems to have DT set (which is
illegal).  Most devices just reject this as stupid, but the Quantum
seems to try to obey it and hangs the bus.

The simple fix is to reset all PPR options when the offset is set to
zero.
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 74a84824
......@@ -2384,6 +2384,9 @@ static void sym2_set_offset(struct scsi_device *sdev, int offset)
struct sym_hcb *np = ((struct host_data *)sdev->host->hostdata)->ncb;
struct sym_tcb *tp = &np->target[sdev->id];
if (offset == 0)
tp->tinfo.goal.options = 0;
if (tp->tinfo.curr.options & PPR_OPT_DT) {
if (offset > np->maxoffs_dt)
offset = np->maxoffs_dt;
......
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