linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Powerbook Pismo not waking from sleep with 2.6.4
@ 2004-03-21 16:33 Jens Schmalzing
  2004-03-21 22:38 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 3+ messages in thread
From: Jens Schmalzing @ 2004-03-21 16:33 UTC (permalink / raw)
  To: linuxppc-dev


Hi,

I've tried to upgrade the kernel to 2.6.4 on my Pismo Powerbook, and
found that it doesn't sleep properly any more (which it did with
2.6.3-ben2).  Rather, the machine falls asleep, and then wakes up to
some extent: It gets as far as

 mediabay 0 IDE ready

but never reaches the following message

 hda: Wakeup request inited, waiting for !BSY

that comes next if it resumes properly with 2.6.3-ben2.  In fact, it
never even tries to spin up the hard disk at all, I checked by
enabling debugging in the drivers/ide code.

Any hints would be appreciated.

Regards, Jens.

--
J'qbpbe, le m'en fquz pe j'qbpbe!
Le veux aimeb et mqubib panz je pézqbpbe je djuz tqtaj!

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: Powerbook Pismo not waking from sleep with 2.6.4
  2004-03-21 16:33 Powerbook Pismo not waking from sleep with 2.6.4 Jens Schmalzing
@ 2004-03-21 22:38 ` Benjamin Herrenschmidt
  2004-03-22  7:20   ` Jens Schmalzing
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2004-03-21 22:38 UTC (permalink / raw)
  To: Jens Schmalzing; +Cc: linuxppc-dev list


On Mon, 2004-03-22 at 03:33, Jens Schmalzing wrote:
> Hi,
>
> I've tried to upgrade the kernel to 2.6.4 on my Pismo Powerbook, and
> found that it doesn't sleep properly any more (which it did with
> 2.6.3-ben2).  Rather, the machine falls asleep, and then wakes up to
> some extent: It gets as far as
>
>  mediabay 0 IDE ready
>
> but never reaches the following message

Try this patch

===== drivers/serial/pmac_zilog.c 1.6 vs edited =====
--- 1.6/drivers/serial/pmac_zilog.c	Wed Mar 10 21:18:32 2004
+++ edited/drivers/serial/pmac_zilog.c	Mon Mar 22 09:35:13 2004
@@ -1563,15 +1563,21 @@
 static int pmz_suspend(struct macio_dev *mdev, u32 pm_state)
 {
 	struct uart_pmac_port *uap = dev_get_drvdata(&mdev->ofdev.dev);
-	struct uart_state *state = pmz_uart_reg.state + uap->port.line;
+	struct uart_state *state;
 	unsigned long flags;

-	if (uap == NULL)
+	if (uap == NULL) {
+		printk("HRM... pmz_suspend with NULL uap\n");
 		return 0;
+	}

 	if (pm_state == mdev->ofdev.dev.power_state || pm_state < 2)
 		return 0;

+	pmz_debug("suspend, switching to state %d\n", pm_state);
+
+	state = pmz_uart_reg.state + uap->port.line;
+
 	down(&pmz_irq_sem);
 	down(&state->sem);

@@ -1607,6 +1613,8 @@
 	up(&state->sem);
 	up(&pmz_irq_sem);

+	pmz_debug("suspend, switching complete\n");
+
 	mdev->ofdev.dev.power_state = pm_state;

 	return 0;
@@ -1616,7 +1624,7 @@
 static int pmz_resume(struct macio_dev *mdev)
 {
 	struct uart_pmac_port *uap = dev_get_drvdata(&mdev->ofdev.dev);
-	struct uart_state *state = pmz_uart_reg.state + uap->port.line;
+	struct uart_state *state;
 	unsigned long flags;
 	int pwr_delay;

@@ -1626,6 +1634,10 @@
 	if (mdev->ofdev.dev.power_state == 0)
 		return 0;

+	pmz_debug("resume, switching to state 0\n");
+
+	state = pmz_uart_reg.state + uap->port.line;
+
 	down(&pmz_irq_sem);
 	down(&state->sem);

@@ -1658,6 +1670,7 @@
 		enable_irq(uap->port.irq);
 	}

+ bail:
 	up(&state->sem);
 	up(&pmz_irq_sem);

@@ -1670,7 +1683,8 @@
 		schedule_timeout((pwr_delay * HZ)/1000);
 	}

- bail:
+	pmz_debug("resume, switching complete\n");
+
 	mdev->ofdev.dev.power_state = 0;

 	return 0;


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: Powerbook Pismo not waking from sleep with 2.6.4
  2004-03-21 22:38 ` Benjamin Herrenschmidt
@ 2004-03-22  7:20   ` Jens Schmalzing
  0 siblings, 0 replies; 3+ messages in thread
From: Jens Schmalzing @ 2004-03-22  7:20 UTC (permalink / raw)
  To: linuxppc-dev list


Hi,

Benjamin Herrenschmidt writes:

> Try this patch
>
> ===== drivers/serial/pmac_zilog.c 1.6 vs edited =====

Already did this (when I found the patch on debian-powerpc a couple of
hours after sending my message), and it worked nicely.  Thanks again.

Regards, Jens.

--
J'qbpbe, le m'en fquz pe j'qbpbe!
Le veux aimeb et mqubib panz je pézqbpbe je djuz tqtaj!

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

end of thread, other threads:[~2004-03-22  7:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-21 16:33 Powerbook Pismo not waking from sleep with 2.6.4 Jens Schmalzing
2004-03-21 22:38 ` Benjamin Herrenschmidt
2004-03-22  7:20   ` Jens Schmalzing

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).