Patchwork sym scsi driver problem with 2.6.26 or newer debian kernel on p610 (fwd)

login
register
mail settings
Submitter Benjamin Herrenschmidt
Date June 23, 2009, 11:29 p.m.
Message ID <1245799792.10356.42.camel@pasglop>
Download mbox | patch
Permalink /patch/29099/
State Changes Requested, archived
Headers show

Comments

Benjamin Herrenschmidt - June 23, 2009, 11:29 p.m.
On Wed, 2009-06-24 at 07:57 +1000, Benjamin Herrenschmidt wrote:
> > I tried on a POWER3 box I have here "IBM,7044-170" and things work fine
> > here with current upstream. (I suspect a much smaller machine).
> > 
> > I will really need an actual bisection here... In the meantime, I'll see
> > if I can get my hand on one of these machines here.
> 
> Ok so I think we may have found it... looks like
> CONFIG_MPIC_BROKEN_REGREAD is what breaks it which is enabled by PA-Semi
> support in the .config.
> 
> Can you verify that disabling PA-Semi support removes that option from
> your .config and that once removed, it works again ?
> 
> We don't know yet -why- it breaks it, still investigating.

Do the following patch also fix it ?
Michael Ellerman - June 24, 2009, 5:53 a.m.
On Wed, 2009-06-24 at 09:29 +1000, Benjamin Herrenschmidt wrote:
> On Wed, 2009-06-24 at 07:57 +1000, Benjamin Herrenschmidt wrote:
> > > I tried on a POWER3 box I have here "IBM,7044-170" and things work fine
> > > here with current upstream. (I suspect a much smaller machine).
> > > 
> > > I will really need an actual bisection here... In the meantime, I'll see
> > > if I can get my hand on one of these machines here.
> > 
> > Ok so I think we may have found it... looks like
> > CONFIG_MPIC_BROKEN_REGREAD is what breaks it which is enabled by PA-Semi
> > support in the .config.
> > 
> > Can you verify that disabling PA-Semi support removes that option from
> > your .config and that once removed, it works again ?
> > 
> > We don't know yet -why- it breaks it, still investigating.
> 
> Do the following patch also fix it ?

Doesn't fix my machine :/

cheers
Benjamin Herrenschmidt - June 24, 2009, 5:56 a.m.
On Wed, 2009-06-24 at 15:53 +1000, Michael Ellerman wrote:
> Doesn't fix my machine :/
> 
That doesn't make sense ... What if you remove the bit inside the ifdef
CONFIG_MPIC_BROKEN_REGREAD in _mpic_read() ?

If that makes a difference, then it would be interesting to add a printk
in there that prints what the original value "val" is and what we have
in the shadow...

Cheers,
Ben.

Patch

Index: linux-work/arch/powerpc/sysdev/mpic.c
===================================================================
--- linux-work.orig/arch/powerpc/sysdev/mpic.c	2009-06-24 09:24:51.000000000 +1000
+++ linux-work/arch/powerpc/sysdev/mpic.c	2009-06-24 09:26:45.000000000 +1000
@@ -230,14 +230,16 @@  static inline u32 _mpic_irq_read(struct 
 {
 	unsigned int	isu = src_no >> mpic->isu_shift;
 	unsigned int	idx = src_no & mpic->isu_mask;
+	unsigned int	val;
 
+	val = _mpic_read(mpic->reg_type, &mpic->isus[isu],
+			 reg + (idx * MPIC_INFO(IRQ_STRIDE)));	
 #ifdef CONFIG_MPIC_BROKEN_REGREAD
 	if (reg == 0)
-		return mpic->isu_reg0_shadow[idx];
-	else
+		val = (val & (MPIC_VECPRI_MASK | MPIC_VECPRI_ACTIVITY)) |
+			mpic->isu_reg0_shadow[idx];
 #endif
-		return _mpic_read(mpic->reg_type, &mpic->isus[isu],
-				  reg + (idx * MPIC_INFO(IRQ_STRIDE)));
+	return val;
 }
 
 static inline void _mpic_irq_write(struct mpic *mpic, unsigned int src_no,
@@ -251,7 +253,8 @@  static inline void _mpic_irq_write(struc
 
 #ifdef CONFIG_MPIC_BROKEN_REGREAD
 	if (reg == 0)
-		mpic->isu_reg0_shadow[idx] = value;
+		mpic->isu_reg0_shadow[idx] =
+			value & ~(MPIC_VECPRI_MASK | MPIC_VECPRI_ACTIVITY);
 #endif
 }