All of lore.kernel.org
 help / color / mirror / Atom feed
* E450 and kernel > 2.6.18
@ 2007-02-15 20:22 Daniel Smolik
  2007-02-20 10:41 ` Eki
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Daniel Smolik @ 2007-02-15 20:22 UTC (permalink / raw)
  To: sparclinux

Hi,
have anybody working kernel  > 2.6.18 on E450. With 2.6.16.40 all 
working perfect. SCSI disk are recognized all work fine. I test 2.6.18 
and 20 with same config as 16.40 and eth0 and eth1 stop working, disk on 
external D1000 array is  not recognized and many SCSI ABORT and RESET 
during boot.


		Thanks
			Dan






^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: E450 and kernel > 2.6.18
  2007-02-15 20:22 E450 and kernel > 2.6.18 Daniel Smolik
@ 2007-02-20 10:41 ` Eki
  2007-02-21  0:44 ` David Miller
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Eki @ 2007-02-20 10:41 UTC (permalink / raw)
  To: sparclinux

On Thu, Feb 15, 2007 at 09:22:29PM +0100, Daniel Smolik wrote:
> Hi,
> have anybody working kernel  > 2.6.18 on E450. With 2.6.16.40 all 
> working perfect. SCSI disk are recognized all work fine. I test 2.6.18 
> and 20 with same config as 16.40 and eth0 and eth1 stop working, disk on 
> external D1000 array is  not recognized and many SCSI ABORT and RESET 
> during boot.
> 
> 
> 		Thanks
> 			Dan

Hi,

IIRC, 2.6.17.14 was the last kernel that I booted successfully on
E450. 2.6.18-rc1 didn't work any more. There seems to be alot of
patches to the PCI code that was added after 2.6.17 that seems
to break the IRQ routing (or something).

Perhaps the breakage is introduced by one of these commits?:

 commit 46ba6d7d8b0486e9d565729880ddfb2b84d3af31
  [SPARC64]: Fix more of_device layer IRQ bugs, and correct PROMREG_MAX.
  
 commit ee7022dcfbf660727d6b8553cb0dbc0d4eae8f44
  [SPARC64] Fix PSYCHO PCI controler init.
  
 commit a49261585e2c89f16b5a4bb80f623d2e9c2c1566
  [SPARC64] psycho: Fix pbm->name handling in pbm_register_toplevel_resources()
  

Eki

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: E450 and kernel > 2.6.18
  2007-02-15 20:22 E450 and kernel > 2.6.18 Daniel Smolik
  2007-02-20 10:41 ` Eki
@ 2007-02-21  0:44 ` David Miller
  2007-02-22 14:38 ` David Miller
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2007-02-21  0:44 UTC (permalink / raw)
  To: sparclinux

From: Eki <eki@sci.fi>
Date: Tue, 20 Feb 2007 12:41:19 +0200

> IIRC, 2.6.17.14 was the last kernel that I booted successfully on
> E450. 2.6.18-rc1 didn't work any more. There seems to be alot of
> patches to the PCI code that was added after 2.6.17 that seems
> to break the IRQ routing (or something).
> 
> Perhaps the breakage is introduced by one of these commits?:
> 
>  commit 46ba6d7d8b0486e9d565729880ddfb2b84d3af31
>   [SPARC64]: Fix more of_device layer IRQ bugs, and correct PROMREG_MAX.
>   
>  commit ee7022dcfbf660727d6b8553cb0dbc0d4eae8f44
>   [SPARC64] Fix PSYCHO PCI controler init.
>   
>  commit a49261585e2c89f16b5a4bb80f623d2e9c2c1566
>   [SPARC64] psycho: Fix pbm->name handling in pbm_register_toplevel_resources()

Please send the full "/usr/sbin/prtconf -pv" output from this machine,
and then boot the non-working 2.6.20 kernel with the "of_debug=3"
kernel command line option and capture all of the boot messages
and send that as well.

Thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: E450 and kernel > 2.6.18
  2007-02-15 20:22 E450 and kernel > 2.6.18 Daniel Smolik
  2007-02-20 10:41 ` Eki
  2007-02-21  0:44 ` David Miller
@ 2007-02-22 14:38 ` David Miller
  2007-02-26 22:08 ` David Miller
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2007-02-22 14:38 UTC (permalink / raw)
  To: sparclinux

From: Daniel Smolik <marvin@mydatex.cz>
Date: Thu, 22 Feb 2007 15:29:45 +0100

> Here are required logs.

Thanks a lot, I'll try to fix this after getting some
sleep as I'm about to head to bed.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: E450 and kernel > 2.6.18
  2007-02-15 20:22 E450 and kernel > 2.6.18 Daniel Smolik
                   ` (2 preceding siblings ...)
  2007-02-22 14:38 ` David Miller
@ 2007-02-26 22:08 ` David Miller
  2007-02-27 18:53 ` Daniel Smolik
  2007-02-27 18:58 ` David Miller
  5 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2007-02-26 22:08 UTC (permalink / raw)
  To: sparclinux

From: Daniel Smolik <marvin@mydatex.cz>
Date: Thu, 22 Feb 2007 15:29:45 +0100

> Here are required logs.

Daniel and others seeing this problem, please give this
patch a try, if it fails please provide a new "of_debug=3"
kernel bootup debug log with the patch applied so I can
diagnose this further.

Thanks!

diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c
index b0f3e00..ad74e5e 100644
--- a/arch/sparc64/kernel/of_device.c
+++ b/arch/sparc64/kernel/of_device.c
@@ -708,7 +708,7 @@ static unsigned int __init pci_irq_swizzle(struct device_node *dp,
 					   unsigned int irq)
 {
 	struct linux_prom_pci_registers *regs;
-	unsigned int devfn, slot, ret;
+	unsigned int bus, devfn, slot, ret;
 
 	if (irq < 1 || irq > 4)
 		return irq;
@@ -717,10 +717,46 @@ static unsigned int __init pci_irq_swizzle(struct device_node *dp,
 	if (!regs)
 		return irq;
 
+	bus = (regs->phys_hi >> 16) & 0xff;
 	devfn = (regs->phys_hi >> 8) & 0xff;
 	slot = (devfn >> 3) & 0x1f;
 
-	ret = ((irq - 1 + (slot & 3)) & 3) + 1;
+	if (pp->irq_trans) {
+		/* Derived from Table 8-3, U2P User's Manual.  This branch
+		 * is handling a PCI controller that lacks a proper set of
+		 * interrupt-map and interrupt-map-mask properties.  The
+		 * Ultra-E450 is one example.
+		 *
+		 * The bit layout is BSSLL, where:
+		 * B: 0 on bus A, 1 on bus B
+		 * D: 2-bit slot number, derived from PCI device number as
+		 *    (dev - 1) for bus A, or (dev - 2) for bus B
+		 * L: 2-bit line number
+		 *
+		 * Actually, more "portable" way to calculate the funky
+		 * slot number is to subtract pbm->pci_first_slot from the
+		 * device number, and that's exactly what the pre-OF
+		 * sparc64 code did, but we're building this stuff generically
+		 * using the OBP tree, not in the PCI controller layer.
+		 */
+		if (bus & 0x80) {
+			/* PBM-A */
+			bus  = 0x00;
+			slot = (slot - 1) << 2;
+		} else {
+			/* PBM-B */
+			bus  = 0x10;
+			slot = (slot - 2) << 2;
+		}
+		irq -= 1;
+
+		ret = (bus | slot | irq);
+	} else {
+		/* Going through a PCI-PCI bridge that lacks a set of
+		 * interrupt-map and interrupt-map-mask properties.
+		 */
+		ret = ((irq - 1 + (slot & 3)) & 3) + 1;
+	}
 
 	return ret;
 }

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: E450 and kernel > 2.6.18
  2007-02-15 20:22 E450 and kernel > 2.6.18 Daniel Smolik
                   ` (3 preceding siblings ...)
  2007-02-26 22:08 ` David Miller
@ 2007-02-27 18:53 ` Daniel Smolik
  2007-02-27 18:58 ` David Miller
  5 siblings, 0 replies; 7+ messages in thread
From: Daniel Smolik @ 2007-02-27 18:53 UTC (permalink / raw)
  To: sparclinux

David Miller napsal(a):
> From: Daniel Smolik <marvin@mydatex.cz>
> Date: Thu, 22 Feb 2007 15:29:45 +0100
> 
> 
>>Here are required logs.
> 
> 
> Daniel and others seeing this problem, please give this
> patch a try, if it fails please provide a new "of_debug=3"
> kernel bootup debug log with the patch applied so I can
> diagnose this further.
> 
> Thanks!
> 
Many thanks David, now my E450 boot without problem.

		Thanks	again
				Dan

		








> diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c
> index b0f3e00..ad74e5e 100644
> --- a/arch/sparc64/kernel/of_device.c
> +++ b/arch/sparc64/kernel/of_device.c
> @@ -708,7 +708,7 @@ static unsigned int __init pci_irq_swizzle(struct device_node *dp,
>  					   unsigned int irq)
>  {
>  	struct linux_prom_pci_registers *regs;
> -	unsigned int devfn, slot, ret;
> +	unsigned int bus, devfn, slot, ret;
>  
>  	if (irq < 1 || irq > 4)
>  		return irq;
> @@ -717,10 +717,46 @@ static unsigned int __init pci_irq_swizzle(struct device_node *dp,
>  	if (!regs)
>  		return irq;
>  
> +	bus = (regs->phys_hi >> 16) & 0xff;
>  	devfn = (regs->phys_hi >> 8) & 0xff;
>  	slot = (devfn >> 3) & 0x1f;
>  
> -	ret = ((irq - 1 + (slot & 3)) & 3) + 1;
> +	if (pp->irq_trans) {
> +		/* Derived from Table 8-3, U2P User's Manual.  This branch
> +		 * is handling a PCI controller that lacks a proper set of
> +		 * interrupt-map and interrupt-map-mask properties.  The
> +		 * Ultra-E450 is one example.
> +		 *
> +		 * The bit layout is BSSLL, where:
> +		 * B: 0 on bus A, 1 on bus B
> +		 * D: 2-bit slot number, derived from PCI device number as
> +		 *    (dev - 1) for bus A, or (dev - 2) for bus B
> +		 * L: 2-bit line number
> +		 *
> +		 * Actually, more "portable" way to calculate the funky
> +		 * slot number is to subtract pbm->pci_first_slot from the
> +		 * device number, and that's exactly what the pre-OF
> +		 * sparc64 code did, but we're building this stuff generically
> +		 * using the OBP tree, not in the PCI controller layer.
> +		 */
> +		if (bus & 0x80) {
> +			/* PBM-A */
> +			bus  = 0x00;
> +			slot = (slot - 1) << 2;
> +		} else {
> +			/* PBM-B */
> +			bus  = 0x10;
> +			slot = (slot - 2) << 2;
> +		}
> +		irq -= 1;
> +
> +		ret = (bus | slot | irq);
> +	} else {
> +		/* Going through a PCI-PCI bridge that lacks a set of
> +		 * interrupt-map and interrupt-map-mask properties.
> +		 */
> +		ret = ((irq - 1 + (slot & 3)) & 3) + 1;
> +	}
>  
>  	return ret;
>  }
> -
> To unsubscribe from this list: send the line "unsubscribe sparclinux" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


-- 
Mydatex s r.o.
http://www.mydatex.cz
email: smolik@mydatex.cz
mob: 604200362
tel: 226210085

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: E450 and kernel > 2.6.18
  2007-02-15 20:22 E450 and kernel > 2.6.18 Daniel Smolik
                   ` (4 preceding siblings ...)
  2007-02-27 18:53 ` Daniel Smolik
@ 2007-02-27 18:58 ` David Miller
  5 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2007-02-27 18:58 UTC (permalink / raw)
  To: sparclinux

From: Daniel Smolik <marvin@mydatex.cz>
Date: Tue, 27 Feb 2007 19:53:46 +0100

> David Miller napsal(a):
> > From: Daniel Smolik <marvin@mydatex.cz>
> > Date: Thu, 22 Feb 2007 15:29:45 +0100
> > 
> > 
> >>Here are required logs.
> > 
> > 
> > Daniel and others seeing this problem, please give this
> > patch a try, if it fails please provide a new "of_debug=3"
> > kernel bootup debug log with the patch applied so I can
> > diagnose this further.
> > 
> > Thanks!
> > 
> Many thanks David, now my E450 boot without problem.

Thank you very much for testing.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-02-27 18:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-15 20:22 E450 and kernel > 2.6.18 Daniel Smolik
2007-02-20 10:41 ` Eki
2007-02-21  0:44 ` David Miller
2007-02-22 14:38 ` David Miller
2007-02-26 22:08 ` David Miller
2007-02-27 18:53 ` Daniel Smolik
2007-02-27 18:58 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.