ATA mkIII suspend problem

Andrew Heybey ath at
Tue May 3 08:47:42 PDT 2005

I just tried RELENG_5 as of last week and the latest (April 13) ATA
mkIII patches from on my laptop. 
Unfortunately, it breaks suspend-to-RAM (S3).


I first tried RELENG_5 on the laptop (a Toshiba Tecra M2V) in January
and suspend did not work (the laptop hung after reinitializing the ATA
controller). Then I tried the first release of ATA mkIII. That first
version of the new ATA code made suspend work, and I was happy.

Last week, I tried upgrading to the latest RELENG_5 and the newest ATA
mkIII code, and now after suspending the kernel panics when reiniting
the ATA device(s) in ata-all.c:ata_reinit(), about line 217:

    /* reinit the children and delete any that fails */
    if (!device_get_children(dev, &children, &nchildren)) {
	mtx_lock(&Giant);       /* newbus suckage it needs Giant */
	for (i = 0; i < nchildren; i++) {
	    if (children[i] && device_is_attached(children[i]))
		if (ATA_REINIT(children[i])) {
		    if (ch->running->dev == children[i]) {
				      "FAILURE - device detached\n");
			ch->running->dev = NULL;
			ch->running = NULL;
		    device_delete_child(dev, children[i]);
	free(children, M_TEMP);
	mtx_unlock(&Giant);     /* newbus suckage dealt with, release Giant */

The problem is that ch->running is NULL at this point.

Any suggestions on how to further debug or fix?


More information about the freebsd-stable mailing list