esp scsi problem on shutdown - sunhme related?
Quoted 4 lines
I successfully installed Debian Lenny with 2.6.26 kernel, later compiled yesterdays 2.6.29-rc6+git. Both kernels have the same problem - on shutdown, scsi disk goes offline like in console log below. This is repeatable and happens every shutdown so far.
Testing by hand shows that 'ifconfig eth0 down' on eth0 (SBus hme) is the command that kills esp.
Signature · 1 line
Meelis Roos ([email protected])
David Miller
maintainerFrom: Meelis Roos <[email protected]>
Date: Wed, 4 Mar 2009 13:22:21 +0200 (EET)
Quoted 7 lines
Quoted 4 lines
I successfully installed Debian Lenny with 2.6.26 kernel, later compiled yesterdays 2.6.29-rc6+git. Both kernels have the same problem - on shutdown, scsi disk goes offline like in console log below. This is repeatable and happens every shutdown so far.
Testing by hand shows that 'ifconfig eth0 down' on eth0 (SBus hme) is the command that kills esp.
Thanks for figuring out this clue. I'll see if there is anything obvious in that area.
David Miller
maintainerFrom: David Miller <[email protected]>
Date: Wed, 04 Mar 2009 03:35:14 -0800 (PST)
Quoted 8 lines
From: Meelis Roos <[email protected]>
Date: Wed, 4 Mar 2009 13:22:21 +0200 (EET)Quoted 5 lines
Quoted 4 lines
I successfully installed Debian Lenny with 2.6.26 kernel, later compiled yesterdays 2.6.29-rc6+git. Both kernels have the same problem - on shutdown, scsi disk goes offline like in console log below. This is repeatable and happens every shutdown so far.
Quoted 5 lines
Quoted 2 lines
Testing by hand shows that 'ifconfig eth0 down' on eth0 (SBus hme) is the command that kills esp.
Thanks for figuring out this clue. I'll see if there is anything obvious in that area.
Meelis... if ESP is aborting commands this smells like interrupt problems. I suspect that when HME is brought down, this accidently disables ESP's interrupt.
Do any of your hme chips share interrupts with esp chips?
What does /proc/interrupts look like on this system when everything is up and running?
Thanks!
Quoted 2 lines
What does
/proc/interruptslook like on this system when everything is up and running?
Seems they have different irqs:
CPU6 CPU7 CPU10 CPU11 CPU14 CPU15 0: 5046 3408 4041 3274 2602 2815 <NULL> timer 2: 3063 0 0 0 0 0 sun4u zs 4: 0 0 0 0 0 0 sun4u SYSIO_UE 5: 0 0 0 0 0 0 sun4u SYSIO_CE 6: 0 0 0 0 0 0 sun4u SYSIO_SBERR 12: 0 0 0 0 0 0 sun4u SYSIO_UE 13: 0 0 0 0 0 0 sun4u SYSIO_CE 14: 0 0 0 0 0 0 sun4u SYSIO_SBERR 18: 381 0 0 0 0 0 sun4u eth0 19: 6476 0 0 0 0 0 sun4u ESP NMI: 0 0 0 0 0 0 Non-maskable interrupts
Signature · 1 line
Meelis Roos ([email protected])
David Miller
maintainerFrom: Meelis Roos <[email protected]>
Date: Wed, 4 Mar 2009 13:57:11 +0200 (EET)
Quoted 4 lines
Quoted 2 lines
What does
/proc/interruptslook like on this system when everything is up and running?Seems they have different irqs:
Yes, but they share some registers in the SBUS controller. I think I know what's going on.
For some interrupts, mainly those of SBUS card slots, there is one IMAP register for the 4 interrupts that slot can produce, but 4 ICLR registers.
The IMAP register controls "enable/disable" state as well as contains which CPU the interrupt gets sent to.
The ICLR registers are what you hit after the interrupt handler runs, to clear the interrupt state back to IDLE.
The problem here is that the generic interrupt layer is going to disable both ESP's and HME's interrupts when either of them calls free_irq() because the generic code thinks there is only one "user" of the interrupt. It doesn't see the sharing that happens in the controller that we have on Sparc64.
I'm not exactly sure how I'll fix this. I'll try to come up with a scheme and post a patch for you to test tomorrow.
Thanks!
David Miller
maintainerFrom: David Miller <[email protected]>
Date: Wed, 04 Mar 2009 04:09:58 -0800 (PST)
Quoted 2 lines
I'm not exactly sure how I'll fix this. I'll try to come up with a scheme and post a patch for you to test tomorrow.
I lied :-) I think the following simple approach might work.
Can you give it a try?
Thanks!
arch/sparc/kernel/irq_64.c +8 -10
@@ -325,15 +325,12 @@ static void sun4u_set_affinity(unsigned int virt_irq,static void sun4u_irq_disable (unsigned int virt_irq) { -struct irq_handler_data *data =get_irq_chip_data (virt_irq); - -if (likely (data)) { -unsigned long imap = data->imap; -unsigned long tmp =upa_readq (imap); - - tmp &= ~IMAP_VALID ; -upa_writeq (tmp, imap); - } +/* Don't do anything. The desc->status check for +* IRQ_DISABLED in handler_irq() will skip the +* handler call and that will leave the interrupt +* in the sent state. The next ->enable() call will +* hit the ICLR register to reset the state machine. +*/ }static void sun4u_irq_eoi (unsigned int virt_irq)
@@ -746,7 +743,8 @@ void handler_irq(int irq, struct pt_regs *regs) desc = irq_desc + virt_irq; - desc->handle_irq (virt_irq, desc); +if (!(desc->status &IRQ_DISABLED )) + desc->handle_irq (virt_irq, desc); bucket_pa = next_pa; }
Quoted 1 line
Can you give it a try?
It works, thank you!
Signature · 1 line
Meelis Roos ([email protected])
David Miller
maintainerFrom: Meelis Roos <[email protected]>
Date: Wed, 4 Mar 2009 14:46:33 +0200 (EET)
Quoted 3 lines
Quoted 1 line
Can you give it a try?
It works, thank you!
Thanks so much for testing.
Hello David!
I have exactly the same problem of Meelis on my Sun Ultra Enterprise 3000.
Here's the output of my /proc/interrupts :
berta-test:~# cat /proc/interrupts
CPU10 CPU14
0: 8346 7272 <NULL> timer
2: 7 0 sun4u zs
4: 0 0 sun4u SYSIO_UE
5: 0 0 sun4u SYSIO_CE
6: 0 0 sun4u SYSIO_SBERR
13: 0 0 sun4u SYSIO_UE
14: 0 0 sun4u SYSIO_CE
15: 0 0 sun4u SYSIO_SBERR
19: 1676 0 sun4u eth0
20: 1604 11293 sun4u ESP
22: 0 0 sun4u SYSIO_UE
23: 0 0 sun4u SYSIO_CE
24: 0 0 sun4u SYSIO_SBERR
31: 0 0 sun4u SYSIO_UE
32: 0 0 sun4u SYSIO_CE
33: 0 0 sun4u SYSIO_SBERR
38: 15 0 sun4u ESP
39: 0 7 sun4u ESP
berta-test:~# Hope it can help to solve the problem!
Benoit-Pierre
From: David Miller <[email protected]>
Quoted 28 lines
From: David Miller <[email protected]>
Date: Wed, 04 Mar 2009 03:35:14 -0800 (PST)Quoted 8 lines
From: Meelis Roos <[email protected]>
Date: Wed, 4 Mar 2009 13:22:21 +0200 (EET)Quoted 5 lines
Quoted 4 lines
I successfully installed Debian Lenny with 2.6.26 kernel, later compiled yesterdays 2.6.29-rc6+git. Both kernels have the same problem - on shutdown, scsi disk goes offline like in console log below. This is repeatable and happens every shutdown so far.
Quoted 5 lines
Quoted 2 lines
Testing by hand shows that 'ifconfig eth0 down' on eth0 (SBus hme) is the command that kills esp.
Thanks for figuring out this clue. I'll see if there is anything obvious in that area.
Meelis... if ESP is aborting commands this smells like interrupt problems. I suspect that when HME is brought down, this accidently disables ESP's interrupt.
Do any of your hme chips share interrupts with esp chips?
What does
/proc/interruptslook like on this system when everything is up and running?Thanks!
Hello David!
I have exactly the same problem of Meelis on my Sun Ultra Enterprise 3000.
Here's the output of my /proc/interrupts :
berta-test:~# cat /proc/interrupts
CPU10 CPU14
0: 8346 7272 <NULL> timer
2: 7 0 sun4u zs
4: 0 0 sun4u SYSIO_UE
5: 0 0 sun4u SYSIO_CE
6: 0 0 sun4u SYSIO_SBERR
13: 0 0 sun4u SYSIO_UE
14: 0 0 sun4u SYSIO_CE
15: 0 0 sun4u SYSIO_SBERR
19: 1676 0 sun4u eth0
20: 1604 11293 sun4u ESP
22: 0 0 sun4u SYSIO_UE
23: 0 0 sun4u SYSIO_CE
24: 0 0 sun4u SYSIO_SBERR
31: 0 0 sun4u SYSIO_UE
32: 0 0 sun4u SYSIO_CE
33: 0 0 sun4u SYSIO_SBERR
38: 15 0 sun4u ESP
39: 0 7 sun4u ESP
berta-test:~# Hope it can help to solve the problem!
Benoit-Pierre
From: David Miller <[email protected]>
Quoted 28 lines
From: David Miller <[email protected]>
Date: Wed, 04 Mar 2009 03:35:14 -0800 (PST)Quoted 8 lines
From: Meelis Roos <[email protected]>
Date: Wed, 4 Mar 2009 13:22:21 +0200 (EET)Quoted 5 lines
Quoted 4 lines
I successfully installed Debian Lenny with 2.6.26 kernel, later compiled yesterdays 2.6.29-rc6+git. Both kernels have the same problem - on shutdown, scsi disk goes offline like in console log below. This is repeatable and happens every shutdown so far.
Quoted 5 lines
Quoted 2 lines
Testing by hand shows that 'ifconfig eth0 down' on eth0 (SBus hme) is the command that kills esp.
Thanks for figuring out this clue. I'll see if there is anything obvious in that area.
Meelis... if ESP is aborting commands this smells like interrupt problems. I suspect that when HME is brought down, this accidently disables ESP's interrupt.
Do any of your hme chips share interrupts with esp chips?
What does
/proc/interruptslook like on this system when everything is up and running?Thanks!
Hi again! ;)
I just saw your message including the kernel patch in the archives.
I'll try to compile a kernel with it and I'll stay you updated on the results.
Benoit-Pierre
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Benoit-Pierre Guay
Sent: Friday, March 20, 2009 13:26
To: [email protected]
Subject: Re: esp scsi problem on shutdown - sunhme related?
Hello David!
I have exactly the same problem of Meelis on my Sun Ultra Enterprise 3000.
Here's the output of my /proc/interrupts :
berta-test:~# cat /proc/interrupts
CPU10 CPU14
0: 8346 7272 <NULL> timer
2: 7 0 sun4u zs
4: 0 0 sun4u SYSIO_UE
5: 0 0 sun4u SYSIO_CE
6: 0 0 sun4u SYSIO_SBERR
13: 0 0 sun4u SYSIO_UE
14: 0 0 sun4u SYSIO_CE
15: 0 0 sun4u SYSIO_SBERR
19: 1676 0 sun4u eth0
20: 1604 11293 sun4u ESP
22: 0 0 sun4u SYSIO_UE
23: 0 0 sun4u SYSIO_CE
24: 0 0 sun4u SYSIO_SBERR
31: 0 0 sun4u SYSIO_UE
32: 0 0 sun4u SYSIO_CE
33: 0 0 sun4u SYSIO_SBERR
38: 15 0 sun4u ESP
39: 0 7 sun4u ESP
berta-test:~# Hope it can help to solve the problem!
Benoit-Pierre
From: David Miller <[email protected]>
Quoted 21 lines
From: David Miller <[email protected]>
Date: Wed, 04 Mar 2009 03:35:14 -0800 (PST)Quoted 8 lines
From: Meelis Roos <[email protected]>
Date: Wed, 4 Mar 2009 13:22:21 +0200 (EET)Quoted 5 lines
Quoted 4 lines
I successfully installed Debian Lenny with 2.6.26 kernel, later compiled yesterdays 2.6.29-rc6+git. Both kernels have the same problem - on shutdown, scsi disk goes offline like in console log below. This is repeatable and happens every shutdown so far.
Quoted 5 lines
Quoted 2 lines
Testing by hand shows that 'ifconfig eth0 down' on eth0 (SBus hme) is the command that kills esp.
Thanks for figuring out this clue. I'll see if there is anything obvious in that area.
Meelis... if ESP is aborting commands this smells like interrupt problems. I suspect that when HME is brought down, this accidently disables ESP's interrupt.
Quoted 7 lines
Do any of your hme chips share interrupts with esp chips?
What does
/proc/interruptslook like on this system when everything is up and running?Thanks!
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html