Skip to contentSkip to conversation

fix for Domain Validation hang on some devices with sym_2 driver

PATCH In review James Bottomley 3 participants 3 messages Aug 20, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix for Domain Validation hang on some devices with sym_2 driver

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.

James

===== drivers/scsi/sym53c8xx_2/sym_glue.c 1.44 vs edited =====

drivers/scsi/sym53c8xx_2/sym_glue.c +3 -0
@@ -2383,6 +2383,9 @@
 	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;
#1 lore raw

Re: [PATCH] fix for Domain Validation hang on some devices with sym_2driver

Quoted 11 lines · James Bottomley

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.

As they said in the '90s, "you da' man."

It works perfectly, so far as I can tell.

So, um, what I want to know is... why did the issue appear to go away for some people if they switched controllers?

I don't know a terrible lot about SCSI devices, so maybe someone here could tell me if there's a reason that would happen, or is this to be expected?

#2 lore raw

Re: [PATCH] fix for Domain Validation hang on some devices with sym_2driver

Quoted 2 lines · Kai OM

So, um, what I want to know is... why did the issue appear to go away for some people if they switched controllers?

Well, the 896 only does 80MB/s rather than 160MB/s, so it won't trigger the bug where the 1010 will.

Signature · 6 lines
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain