Module Name: src Committed By: mlelstv Date: Sat Jul 13 17:06:00 UTC 2019
Modified Files: src/sys/dev/iscsi: iscsi_main.c Log Message: register with pmf to allow suspend. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/dev/iscsi/iscsi_main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/iscsi/iscsi_main.c diff -u src/sys/dev/iscsi/iscsi_main.c:1.29 src/sys/dev/iscsi/iscsi_main.c:1.30 --- src/sys/dev/iscsi/iscsi_main.c:1.29 Sun Apr 21 11:26:46 2019 +++ src/sys/dev/iscsi/iscsi_main.c Sat Jul 13 17:06:00 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: iscsi_main.c,v 1.29 2019/04/21 11:26:46 mlelstv Exp $ */ +/* $NetBSD: iscsi_main.c,v 1.30 2019/07/13 17:06:00 mlelstv Exp $ */ /*- * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc. @@ -252,6 +252,9 @@ iscsi_attach(device_t parent, device_t s iscsi_detaching = false; iscsi_init_cleanup(); + if (!pmf_device_register(self, NULL, NULL)) + aprint_error_dev(self, "couldn't establish power handler\n"); + aprint_normal("%s: attached. major = %d\n", iscsi_cd.cd_name, cdevsw_lookup_major(&iscsi_cdevsw)); } @@ -285,6 +288,8 @@ iscsi_detach(device_t self, int flags) if (error) return error; + pmf_device_deregister(sc->dev); + mutex_destroy(&sc->lock); return 0;