andy git 06/15 suspend/resume observations

Andy Green andy at
Wed Jun 18 19:13:27 CEST 2008

Hash: SHA1

Somebody in the thread at some point said:
| Somebody in the thread at some point said:
| | Andy,
| |
| | I've now confirmed it is from GSM wakeup. If I do not initialize the GSM
| | then the phone never locks up.
| EXCELLENT, thanks a lot.
| Mike can this plug into the serial resume problems?
| How can one provoke GSM wakes then?  Although I am in runlevel 3 I do
| actually have a SIM card in and am running gsmd -- last night before I
| went to bed though I put it in suspend, and it woke 100% perfect
| thismorning after 7 - 8 hours suspended.  But it didn't wake before that
| from GSM.... you really have to ring the phone?

Hm what's going on here... in the resume:

	/* We must defer the auto flowcontrol because we resume before
	 * the serial driver */
	if (!schedule_work(&gsmwork))
			"Unable to schedule GSM wakeup work\n");

but in the work function there

static void gsm_resume_work(struct work_struct *w)
	printk(KERN_INFO "%s: waiting...\n", __FUNCTION__);
	nspy_add(NSPY_TYPE_RESUME, 'W', jiffies);
	if (gsm_autounlock_delay)                    <=== zero on GTA02
		msleep(gsm_autounlock_delay);        <=== no delay
	if (gsm_auto_flowcontrolled) {
		nspy_add(NSPY_TYPE_SPECIAL, '+', jiffies);
		if (machine_is_neo1973_gta01())
		s3c2410_gpio_cfgpin(S3C2410_GPH1, S3C2410_GPH1_nRTS0);
		gsm_auto_flowcontrolled = 0;
	nspy_add(NSPY_TYPE_RESUME, 'Z', jiffies);
	printk(KERN_INFO "%s: done.\n", __FUNCTION__);

There's no schedule_delayed_work, no msleep, this could execute right
away, and yet it says in the comment we need to wait for serial driver
!?!?  I check the resume ordering

[ 7187.755000] neo1973-pm-gsm neo1973-pm-gsm.0: resuming

[ 7187.755000] gsm_resume_work: waiting...

[ 7187.755000] gsm_resume_work: done.

[ 7187.755000] s3c2440-uart s3c2440-uart.0: resuming

[ 7187.755000] s3c24xx_serial_set_mctrl: GSM mctrl=0x00000000

[ 7187.755000] s3c24xx_serial_set_mctrl: GSM mctrl=0x00000006

[ 7187.755000] s3c2440-uart s3c2440-uart.1: resuming

[ 7187.755000] s3c2440-uart s3c2440-uart.2: resuming

Hum what happens when that completes and the uarts aren't up?

- -Andy
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora -


More information about the openmoko-kernel mailing list