From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from v1.tansi.org (mail.tansi.org [84.19.178.47]) by mail.server123.net (Postfix) with ESMTP for ; Tue, 31 May 2016 20:20:01 +0200 (CEST) Received: from gatewagner.dyndns.org (77-56-144-126.dclient.hispeed.ch [77.56.144.126]) by v1.tansi.org (Postfix) with ESMTPA id 83F5014039F for ; Tue, 31 May 2016 20:19:57 +0200 (CEST) Date: Tue, 31 May 2016 20:19:58 +0200 From: Arno Wagner Message-ID: <20160531181957.GA11489@tansi.org> References: <573FB404.4000405@gmx.de> <1464626648.3187.12.camel@researchut.com> <574D6E9A.5070401@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <574D6E9A.5070401@gmx.de> Subject: Re: [dm-crypt] dm-crypt LUKS and USB power management List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de That would be the wrong place to do it. Monitoring USB disconnect is the task of the USB driver, also because LUKS/LVM/etc. has no clue what hardware is used on the lower layers. Regards, Arno On Tue, May 31, 2016 at 12:59:38 CEST, Axel Heider wrote: > > > > > I doubt if it could be done clean. Most targets in Device Mapper ask for > > careful unstacking. > > Couldn't LUKS/cryptsetup/dm-crypt set up a monitor for the disk peripheral > at least? So it releases any connection to the device if it is diconnected. > The device is gone anyway, so there is no gain in keeping any handles open. > Internally, the higher layer file system driver should still get errors > then. But the lower lever driver stack is no longer blocked. So a new > device can become /dev/sda again and not dev/sdb because /dev/sda is still > "somehow" active. > > > > > I would rather investigate the (flaky) USB device. First, does it happen only > > when Runtime PM is enabled ? If so, you should just blacklist it from Power > > Management. Many devices, under Linux, report (false) PM capabilities. > > My current solution is using a hub with a dedicated power support to > connect the USB/SATA adapter with the HDD. Then disk spindown can > still be used, but there is no USB disconnect/reconnect. That solves > the problem practically. > I did not find a way yet to disable power/idele management on the > board USB ports. It's a Odroid C1 or C2 with Debian Jesse Kernel > 3.14.29 or 3.14.65. The suggestion from > http://unix.stackexchange.com/questions/91027/how-to-disable-usb-autosuspend-on-kernel-3-7-10-or-above > does not work > and so far nobody else had a solution. Will keep searching... > > Axel > _______________________________________________ > dm-crypt mailing list > dm-crypt@saout.de > http://www.saout.de/mailman/listinfo/dm-crypt -- Arno Wagner, Dr. sc. techn., Dipl. Inform., Email: arno@wagner.name GnuPG: ID: CB5D9718 FP: 12D6 C03B 1B30 33BB 13CF B774 E35C 5FA1 CB5D 9718 ---- A good decision is based on knowledge and not on numbers. -- Plato If it's in the news, don't worry about it. The very definition of "news" is "something that hardly ever happens." -- Bruce Schneier