Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752667AbaKZOMK (ORCPT ); Wed, 26 Nov 2014 09:12:10 -0500 Received: from cantor2.suse.de ([195.135.220.15]:42068 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751390AbaKZOMI (ORCPT ); Wed, 26 Nov 2014 09:12:08 -0500 Date: Wed, 26 Nov 2014 15:12:07 +0100 Message-ID: From: Takashi Iwai To: Marcel Holtmann Cc: Oliver Neukum , Dave Jones , Linux Kernel , pgynther@google.com, linux-bluetooth@vger.kernel.org Subject: Re: bluetooth related firmware loader spew on resume. In-Reply-To: <0E1D95E7-64D2-4BEA-AFAA-4B119838F24E@holtmann.org> References: <20141111181228.GA27815@redhat.com> <1416996623.3171.7.camel@linux-0dmf.site> <0E1D95E7-64D2-4BEA-AFAA-4B119838F24E@holtmann.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.4 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Wed, 26 Nov 2014 23:05:20 +0900, Marcel Holtmann wrote: > > Hi Oliver, > > >> In order to paper over this, we may also remember the failing firmware > >> and avoid loading it. This might be an easer way than the endless > >> fight against UMH race... > > > > > > the full fix would be to implement reset_resume() for btusb. > > It seems to me that setup() should be split in two methods, > > one to request the firmware from user space and the second > > to transfer it to the device. reset_resume() would just need > > to repeat the second operation. > > so when you do hci_register_dev, then hdev->setup is only called once. I really mean only once per lifetime of the hci_dev. So you would need to unregister the hci_dev first before hdev->setup will ever be called again. So I am not sure this is actually the problem here. The problem here is entirely within request_firmware() unless of course we run through the USB probe handlers again. Which I do not see happening here. > > And we have hdev->setup this way since normally the Bluetooth devices keep their firmware patches and not forget about them and suspend-resume cycles. If the USB device of course jumps of the bus during it then all bets are off anyway. Usually you can avoid unnecessary rebinding when you provide a proper reset_resume callback. I guess that's what Oliver suggested. Takashi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/