Patchwork Add cmd64x IDE driver to default pmac32 config

login
register
mail settings
Submitter lawrence rust
Date July 3, 2010, 6:21 p.m.
Message ID <1278181316.3232.45.camel@gagarin>
Download mbox | patch
Permalink /patch/57827/
State Rejected
Delegated to: Benjamin Herrenschmidt
Headers show

Comments

lawrence rust - July 3, 2010, 6:21 p.m.
The Blue/White Apple PowerMac G3 and early G4's use a cmd64x compatible
IDE disk controller.  E.g. lspci shows...

01:01.0 IDE interface: Silicon Image, Inc. PCI0646 (rev 07)

Unfortunately the default pmac32 configuration does not include this
driver and so PowerMac G3's can't load a root filesystem.  This is an
issue on a least Ubuntu since version 9.04, which uses the default
config as a starting point.

Signed-off-by: Lawrence Rust <lawrence at softsystem.co.uk>
Benjamin Herrenschmidt - July 8, 2010, 5 a.m.
On Sat, 2010-07-03 at 20:21 +0200, lawrence rust wrote:
> The Blue/White Apple PowerMac G3 and early G4's use a cmd64x compatible
> IDE disk controller.  E.g. lspci shows...
> 
> 01:01.0 IDE interface: Silicon Image, Inc. PCI0646 (rev 07)
> 
> Unfortunately the default pmac32 configuration does not include this
> driver and so PowerMac G3's can't load a root filesystem.  This is an
> issue on a least Ubuntu since version 9.04, which uses the default
> config as a starting point.
> 
> Signed-off-by: Lawrence Rust <lawrence at softsystem.co.uk>

Shouldn't we just switch the whole thing to libata now anyways ?

Cheers,
Ben.

> diff -uprN a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/pmac32_defconfig 
> --- a/arch/powerpc/configs/pmac32_defconfig	2010-05-16 23:17:36.000000000 +0200
> +++ b/arch/powerpc/configs/pmac32_defconfig	2010-07-03 20:11:10.000000000 +0200
> @@ -738,7 +738,7 @@ CONFIG_BLK_DEV_IDEDMA_PCI=y
>  # CONFIG_BLK_DEV_AEC62XX is not set
>  # CONFIG_BLK_DEV_ALI15X3 is not set
>  # CONFIG_BLK_DEV_AMD74XX is not set
> -# CONFIG_BLK_DEV_CMD64X is not set
> +CONFIG_BLK_DEV_CMD64X=y
>  # CONFIG_BLK_DEV_TRIFLEX is not set
>  # CONFIG_BLK_DEV_CS5520 is not set
>  # CONFIG_BLK_DEV_CS5530 is not set
> 
> 
> 
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
lawrence rust - July 8, 2010, 6:18 a.m.
On Thu, 2010-07-08 at 15:00 +1000, Benjamin Herrenschmidt wrote:
> On Sat, 2010-07-03 at 20:21 +0200, lawrence rust wrote:
> > The Blue/White Apple PowerMac G3 and early G4's use a cmd64x compatible
> > IDE disk controller.  E.g. lspci shows...
> > 
> > 01:01.0 IDE interface: Silicon Image, Inc. PCI0646 (rev 07)
> > 
> > Unfortunately the default pmac32 configuration does not include this
> > driver and so PowerMac G3's can't load a root filesystem.  This is an
> > issue on a least Ubuntu since version 9.04, which uses the default
> > config as a starting point.
> > 
> > Signed-off-by: Lawrence Rust <lawrence at softsystem.co.uk>
> 
> Shouldn't we just switch the whole thing to libata now anyways ?

Sure. it would be preferable but unfortunately the PowerMac on-board IDE
controller (CONFIG_BLK_DEV_IDE_PMAC), used for the DVD drive on B/W
G3's, doesn't have a PATA equivalent.  So it's pragmatic (until the IDE
code is removed) to use the IDE cmd64x driver to minimise kernel code
size.

A minor correction to my previous post, the first version of Ubuntu to
suffer from this problem was 9.10.

-- Lawrence
> 
> Cheers,
> Ben.
> 
> > diff -uprN a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/pmac32_defconfig 
> > --- a/arch/powerpc/configs/pmac32_defconfig	2010-05-16 23:17:36.000000000 +0200
> > +++ b/arch/powerpc/configs/pmac32_defconfig	2010-07-03 20:11:10.000000000 +0200
> > @@ -738,7 +738,7 @@ CONFIG_BLK_DEV_IDEDMA_PCI=y
> >  # CONFIG_BLK_DEV_AEC62XX is not set
> >  # CONFIG_BLK_DEV_ALI15X3 is not set
> >  # CONFIG_BLK_DEV_AMD74XX is not set
> > -# CONFIG_BLK_DEV_CMD64X is not set
> > +CONFIG_BLK_DEV_CMD64X=y
> >  # CONFIG_BLK_DEV_TRIFLEX is not set
> >  # CONFIG_BLK_DEV_CS5520 is not set
> >  # CONFIG_BLK_DEV_CS5530 is not set
> > 
> > 
> > 
> > 
> > _______________________________________________
> > Linuxppc-dev mailing list
> > Linuxppc-dev@lists.ozlabs.org
> > https://lists.ozlabs.org/listinfo/linuxppc-dev
> 
>
Benjamin Herrenschmidt - July 8, 2010, 6:30 a.m.
On Thu, 2010-07-08 at 08:18 +0200, lawrence rust wrote:
> 
> Sure. it would be preferable but unfortunately the PowerMac on-board IDE
> controller (CONFIG_BLK_DEV_IDE_PMAC), used for the DVD drive on B/W
> G3's, doesn't have a PATA equivalent.  So it's pragmatic (until the IDE
> code is removed) to use the IDE cmd64x driver to minimise kernel code
> size.

Sure it does nowadays: drivers/ata/pata_macio.c :-)

I merged that upstream in december last year, so it didn't make 2.6.32
which your distro probably uses, but it is in .33 and later.

> A minor correction to my previous post, the first version of Ubuntu to
> suffer from this problem was 9.10. 

Cheers,
Ben.
lawrence rust - July 8, 2010, 9:01 a.m.
On Thu, 2010-07-08 at 16:30 +1000, Benjamin Herrenschmidt wrote:
> On Thu, 2010-07-08 at 08:18 +0200, lawrence rust wrote:
> > 
> > Sure. it would be preferable but unfortunately the PowerMac on-board IDE
> > controller (CONFIG_BLK_DEV_IDE_PMAC), used for the DVD drive on B/W
> > G3's, doesn't have a PATA equivalent.  So it's pragmatic (until the IDE
> > code is removed) to use the IDE cmd64x driver to minimise kernel code
> > size.
> 
> Sure it does nowadays: drivers/ata/pata_macio.c :-)
> 
> I merged that upstream in december last year, so it didn't make 2.6.32
> which your distro probably uses, but it is in .33 and later.

OK I see that - good news.  However, for the moment I believe that it's
safer to stay with IDE.  It's the smallest of changes but the wholesale
move to libata could well break numerous system install scripts - e.g.
for yaboot.

-- Lawrence
Benjamin Herrenschmidt - July 8, 2010, 10:49 a.m.
On Thu, 2010-07-08 at 11:01 +0200, lawrence rust wrote:
> On Thu, 2010-07-08 at 16:30 +1000, Benjamin Herrenschmidt wrote:
> > On Thu, 2010-07-08 at 08:18 +0200, lawrence rust wrote:
> > > 
> > > Sure. it would be preferable but unfortunately the PowerMac on-board IDE
> > > controller (CONFIG_BLK_DEV_IDE_PMAC), used for the DVD drive on B/W
> > > G3's, doesn't have a PATA equivalent.  So it's pragmatic (until the IDE
> > > code is removed) to use the IDE cmd64x driver to minimise kernel code
> > > size.
> > 
> > Sure it does nowadays: drivers/ata/pata_macio.c :-)
> > 
> > I merged that upstream in december last year, so it didn't make 2.6.32
> > which your distro probably uses, but it is in .33 and later.
> 
> OK I see that - good news.  However, for the moment I believe that it's
> safer to stay with IDE.  It's the smallest of changes but the wholesale
> move to libata could well break numerous system install scripts - e.g.
> for yaboot.

Well, distros have moved over mostly... I don't think keeping the
defaults to the old stuff upstream is going to help getting things like
yaboot fixed. I'll talk to Tony see what the situation there is
tomorrow, but I'd rather fix yaboot and switch the default over.

Ben.

Patch

diff -uprN a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/pmac32_defconfig 
--- a/arch/powerpc/configs/pmac32_defconfig	2010-05-16 23:17:36.000000000 +0200
+++ b/arch/powerpc/configs/pmac32_defconfig	2010-07-03 20:11:10.000000000 +0200
@@ -738,7 +738,7 @@  CONFIG_BLK_DEV_IDEDMA_PCI=y
 # CONFIG_BLK_DEV_AEC62XX is not set
 # CONFIG_BLK_DEV_ALI15X3 is not set
 # CONFIG_BLK_DEV_AMD74XX is not set
-# CONFIG_BLK_DEV_CMD64X is not set
+CONFIG_BLK_DEV_CMD64X=y
 # CONFIG_BLK_DEV_TRIFLEX is not set
 # CONFIG_BLK_DEV_CS5520 is not set
 # CONFIG_BLK_DEV_CS5530 is not set