linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Macbook Pro SATA Drives not seen in 2.6.25
       [not found] <482A5C19.6090503@aol.com>
@ 2008-05-14  8:06 ` Andrew Morton
  2008-05-14 11:36   ` AndrewL733
  2008-05-14 12:59   ` SOLVED: " AndrewL733
  0 siblings, 2 replies; 4+ messages in thread
From: Andrew Morton @ 2008-05-14  8:06 UTC (permalink / raw)
  To: AndrewL733; +Cc: linux-kernel, linux-ide

On Tue, 13 May 2008 23:27:21 -0400 AndrewL733 <AndrewL733@aol.com> wrote:

> I have a couple of Macbook Pros. The newest one -- based on the Penryn 
> Core 2 Duo with ICH8 -- will not boot with any 2.6.25 kernel (I have 
> tried 2.6.25 and 2.6.25.3).

Let's cc linux-ide.

> It boots fine with 2.6.24.7 as well as with 
> 2.6.26-rc2. It also boots fine with 2.6.22. I have specific reasons why 
> I need to run 2.6.25 so I would appreciate any help here. It seems the 
> SATA drives are detected, but then for each partition during bootup I see:
> 
> ata3: SATA link down (SStatus 0 SControl 0)
> 
> The same 2.6.25 kernels boot fine on my older Macbook Pro with ICH7 and 
> I do not see this error.
> 
> I would be happy to run a git bisect to help identify the issue, but if 
> this problem is already well understood (hey, it's fixed in 2.6.26), I 
> can think of better ways to spend my time.

The below went into 2.6.25.1 (or will do so).  It looks hopful.  Can
you test it please?

> Please copy me personally on any replies. I often subscribe to the list 
> but it's too much mail right now. Thanks in advance.

We do that as a matter of course.  Or we should...


From: Tejun Heo <htejun@gmail.com>

commit cb6716c879ecf49e2af344926c6a476821812061 upstream

On certain configurations (certain macbooks), even though all the
conditions for SIDPR access described in the datasheet are met,
actually reading those registers just returns 0 and have no effect on
write.  Verify SIDPR is actually working before enabling it.

This is reported by Ryan Roth in bz#10512.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Ryan Roth <ryan.roth@ch2m.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/ata/ata_piix.c |   25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -1531,6 +1531,8 @@ static void __devinit piix_init_sidpr(st
 {
 	struct pci_dev *pdev = to_pci_dev(host->dev);
 	struct piix_host_priv *hpriv = host->private_data;
+	struct ata_device *dev0 = &host->ports[0]->link.device[0];
+	u32 scontrol;
 	int i;
 
 	/* check for availability */
@@ -1549,6 +1551,29 @@ static void __devinit piix_init_sidpr(st
 		return;
 
 	hpriv->sidpr = pcim_iomap_table(pdev)[PIIX_SIDPR_BAR];
+
+	/* SCR access via SIDPR doesn't work on some configurations.
+	 * Give it a test drive by inhibiting power save modes which
+	 * we'll do anyway.
+	 */
+	scontrol = piix_sidpr_read(dev0, SCR_CONTROL);
+
+	/* if IPM is already 3, SCR access is probably working.  Don't
+	 * un-inhibit power save modes as BIOS might have inhibited
+	 * them for a reason.
+	 */
+	if ((scontrol & 0xf00) != 0x300) {
+		scontrol |= 0x300;
+		piix_sidpr_write(dev0, SCR_CONTROL, scontrol);
+		scontrol = piix_sidpr_read(dev0, SCR_CONTROL);
+
+		if ((scontrol & 0xf00) != 0x300) {
+			dev_printk(KERN_INFO, host->dev, "SCR access via "
+				   "SIDPR is available but doesn't work\n");
+			return;
+		}
+	}
+
 	host->ports[0]->ops = &piix_sidpr_sata_ops;
 	host->ports[1]->ops = &piix_sidpr_sata_ops;
 }

-- 

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

* Re: Macbook Pro SATA Drives not seen in 2.6.25
  2008-05-14  8:06 ` Macbook Pro SATA Drives not seen in 2.6.25 Andrew Morton
@ 2008-05-14 11:36   ` AndrewL733
  2008-05-14 17:44     ` Andrew Morton
  2008-05-14 12:59   ` SOLVED: " AndrewL733
  1 sibling, 1 reply; 4+ messages in thread
From: AndrewL733 @ 2008-05-14 11:36 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-ide

Thanks, Andrew. Another question below.


Andrew Morton wrote:
> On Tue, 13 May 2008 23:27:21 -0400 AndrewL733 <AndrewL733@aol.com> wrote:
>
>   
>> I have a couple of Macbook Pros. The newest one -- based on the Penryn 
>> Core 2 Duo with ICH8 -- will not boot with any 2.6.25 kernel (I have 
>> tried 2.6.25 and 2.6.25.3).
>>     
>
> Let's cc linux-ide.
>
>   
>> It boots fine with 2.6.24.7 as well as with 
>> 2.6.26-rc2. It also boots fine with 2.6.22. I have specific reasons why 
>> I need to run 2.6.25 so I would appreciate any help here. It seems the 
>> SATA drives are detected, but then for each partition during bootup I see:
>>
>> ata3: SATA link down (SStatus 0 SControl 0)
>>
>> The same 2.6.25 kernels boot fine on my older Macbook Pro with ICH7 and 
>> I do not see this error.
>>
>> I would be happy to run a git bisect to help identify the issue, but if 
>> this problem is already well understood (hey, it's fixed in 2.6.26), I 
>> can think of better ways to spend my time.
>>     
>
> The below went into 2.6.25.1 (or will do so).  It looks hopful.  Can
> you test it please?
>   
Do you mean 2.6.25.4 ?  As I said above, I already tried 2.6.25.3 
yesterday and it doesn't boot.

>
>
> From: Tejun Heo <htejun@gmail.com>
>
> commit cb6716c879ecf49e2af344926c6a476821812061 upstream
>
> On certain configurations (certain macbooks), even though all the
> conditions for SIDPR access described in the datasheet are met,
> actually reading those registers just returns 0 and have no effect on
> write.  Verify SIDPR is actually working before enabling it.
>
> This is reported by Ryan Roth in bz#10512.
>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> Cc: Ryan Roth <ryan.roth@ch2m.com>
> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
>
> ---
>  drivers/ata/ata_piix.c |   25 +++++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
>
> --- a/drivers/ata/ata_piix.c
> +++ b/drivers/ata/ata_piix.c
> @@ -1531,6 +1531,8 @@ static void __devinit piix_init_sidpr(st
>  {
>     struct pci_dev *pdev = to_pci_dev(host->dev);
>     struct piix_host_priv *hpriv = host->private_data;
> +   struct ata_device *dev0 = &host->ports[0]->link.device[0];
> +   u32 scontrol;
>     int i;
>  
>     /* check for availability */
> @@ -1549,6 +1551,29 @@ static void __devinit piix_init_sidpr(st
>         return;
>  
>     hpriv->sidpr = pcim_iomap_table(pdev)[PIIX_SIDPR_BAR];
> +
> +   /* SCR access via SIDPR doesn't work on some configurations.
> +    * Give it a test drive by inhibiting power save modes which
> +    * we'll do anyway.
> +    */
> +   scontrol = piix_sidpr_read(dev0, SCR_CONTROL);
> +
> +   /* if IPM is already 3, SCR access is probably working.  Don't
> +    * un-inhibit power save modes as BIOS might have inhibited
> +    * them for a reason.
> +    */
> +   if ((scontrol & 0xf00) != 0x300) {
> +       scontrol |= 0x300;
> +       piix_sidpr_write(dev0, SCR_CONTROL, scontrol);
> +       scontrol = piix_sidpr_read(dev0, SCR_CONTROL);
> +
> +       if ((scontrol & 0xf00) != 0x300) {
> +           dev_printk(KERN_INFO, host->dev, "SCR access via "
> +                  "SIDPR is available but doesn't work\n");
> +           return;
> +       }
> +   }
> +
>     host->ports[0]->ops = &piix_sidpr_sata_ops;
>     host->ports[1]->ops = &piix_sidpr_sata_ops;
>  }
>
>   


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

* SOLVED:  Macbook Pro SATA Drives not seen in 2.6.25
  2008-05-14  8:06 ` Macbook Pro SATA Drives not seen in 2.6.25 Andrew Morton
  2008-05-14 11:36   ` AndrewL733
@ 2008-05-14 12:59   ` AndrewL733
  1 sibling, 0 replies; 4+ messages in thread
From: AndrewL733 @ 2008-05-14 12:59 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-ide

Thanks.  The patch below solves the problem.  I applied it to 2.6.25.3.

Andrew


Andrew Morton wrote:
> On Tue, 13 May 2008 23:27:21 -0400 AndrewL733 <AndrewL733@aol.com> wrote:
>
>   
>> I have a couple of Macbook Pros. The newest one -- based on the Penryn 
>> Core 2 Duo with ICH8 -- will not boot with any 2.6.25 kernel (I have 
>> tried 2.6.25 and 2.6.25.3).
>>     
>
> Let's cc linux-ide.
>
>   
>> It boots fine with 2.6.24.7 as well as with 
>> 2.6.26-rc2. It also boots fine with 2.6.22. I have specific reasons why 
>> I need to run 2.6.25 so I would appreciate any help here. It seems the 
>> SATA drives are detected, but then for each partition during bootup I see:
>>
>> ata3: SATA link down (SStatus 0 SControl 0)
>>
>> The same 2.6.25 kernels boot fine on my older Macbook Pro with ICH7 and 
>> I do not see this error.
>>
>> I would be happy to run a git bisect to help identify the issue, but if 
>> this problem is already well understood (hey, it's fixed in 2.6.26), I 
>> can think of better ways to spend my time.
>>     
>
> The below went into 2.6.25.1 (or will do so).  It looks hopful.  Can
> you test it please?
>
>   
>> Please copy me personally on any replies. I often subscribe to the list 
>> but it's too much mail right now. Thanks in advance.
>>     
>
> We do that as a matter of course.  Or we should...
>
>
> From: Tejun Heo <htejun@gmail.com>
>
> commit cb6716c879ecf49e2af344926c6a476821812061 upstream
>
> On certain configurations (certain macbooks), even though all the
> conditions for SIDPR access described in the datasheet are met,
> actually reading those registers just returns 0 and have no effect on
> write.  Verify SIDPR is actually working before enabling it.
>
> This is reported by Ryan Roth in bz#10512.
>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> Cc: Ryan Roth <ryan.roth@ch2m.com>
> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
>
> ---
>  drivers/ata/ata_piix.c |   25 +++++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
>
> --- a/drivers/ata/ata_piix.c
> +++ b/drivers/ata/ata_piix.c
> @@ -1531,6 +1531,8 @@ static void __devinit piix_init_sidpr(st
>  {
>     struct pci_dev *pdev = to_pci_dev(host->dev);
>     struct piix_host_priv *hpriv = host->private_data;
> +   struct ata_device *dev0 = &host->ports[0]->link.device[0];
> +   u32 scontrol;
>     int i;
>  
>     /* check for availability */
> @@ -1549,6 +1551,29 @@ static void __devinit piix_init_sidpr(st
>         return;
>  
>     hpriv->sidpr = pcim_iomap_table(pdev)[PIIX_SIDPR_BAR];
> +
> +   /* SCR access via SIDPR doesn't work on some configurations.
> +    * Give it a test drive by inhibiting power save modes which
> +    * we'll do anyway.
> +    */
> +   scontrol = piix_sidpr_read(dev0, SCR_CONTROL);
> +
> +   /* if IPM is already 3, SCR access is probably working.  Don't
> +    * un-inhibit power save modes as BIOS might have inhibited
> +    * them for a reason.
> +    */
> +   if ((scontrol & 0xf00) != 0x300) {
> +       scontrol |= 0x300;
> +       piix_sidpr_write(dev0, SCR_CONTROL, scontrol);
> +       scontrol = piix_sidpr_read(dev0, SCR_CONTROL);
> +
> +       if ((scontrol & 0xf00) != 0x300) {
> +           dev_printk(KERN_INFO, host->dev, "SCR access via "
> +                  "SIDPR is available but doesn't work\n");
> +           return;
> +       }
> +   }
> +
>     host->ports[0]->ops = &piix_sidpr_sata_ops;
>     host->ports[1]->ops = &piix_sidpr_sata_ops;
>  }
>
>   


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

* Re: Macbook Pro SATA Drives not seen in 2.6.25
  2008-05-14 11:36   ` AndrewL733
@ 2008-05-14 17:44     ` Andrew Morton
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2008-05-14 17:44 UTC (permalink / raw)
  To: AndrewL733; +Cc: linux-kernel, linux-ide

On Wed, 14 May 2008 07:36:02 -0400 AndrewL733 <AndrewL733@aol.com> wrote:

> > The below went into 2.6.25.1 (or will do so).  It looks hopful.  Can
> > you test it please?
> >   
> Do you mean 2.6.25.4 ?  As I said above, I already tried 2.6.25.3 
> yesterday and it doesn't boot.

umm, yes, it was part of the "2.6.25.4 review" series.

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

end of thread, other threads:[~2008-05-14 17:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <482A5C19.6090503@aol.com>
2008-05-14  8:06 ` Macbook Pro SATA Drives not seen in 2.6.25 Andrew Morton
2008-05-14 11:36   ` AndrewL733
2008-05-14 17:44     ` Andrew Morton
2008-05-14 12:59   ` SOLVED: " AndrewL733

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).