Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Suspend broken (6.99.40, swcrypto)



Hmmm, not quite so trivial as you might thing. pmf_device_register() needs to have the device_t as the first argument.

swcrypto attaches using config_attach_pseudo(), which as far as I can
tell ends up calling the swcryptoattach(int) initialization routine.
This routine doesn't get passed a device_t so nothing available to give to pmf_device_register() ...

Other pseudo devices which already handle pmf_device_register() (for
example, cgd, vnd, fss) are attached with calls to devsw_attach() which
seems to call the othe initialization routine xxx_attach(device_t,
device_t void *) (as declared in the CFATTACH_DECL).

None of the refactoring changes I made to swcrypto removed anything, so
this failure-to-suspend should have been a pre-existing condition.

It is also not clear to me why crypto0 is not also listed as lacking pmf support... (Its attachment seems to call both devsw_attach() and config_attach_pseudo(), but nowhere does it call pmf_device_register()!)


On Sun, 13 Apr 2014, Jukka Ruohonen wrote:

Hello.

# sysctl -w hw.acpi.sleep.state=3

is (trivially) broken due:

       Devices without power management support: swcrypto0.

I think there were some recent refactoring-like changes in this department.

Since this happens ever so often, I'll write a test case for this once I get
the sources sorted out, but in the meantime, please add the dummy hooks.

- Jukka.


-------------------------------------------------------------------------
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index