From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753671Ab2ACAmG (ORCPT ); Mon, 2 Jan 2012 19:42:06 -0500 Received: from lxorguk.ukuu.org.uk ([81.2.110.251]:47412 "EHLO lxorguk.ukuu.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753637Ab2ACAmD (ORCPT ); Mon, 2 Jan 2012 19:42:03 -0500 Date: Tue, 3 Jan 2012 00:42:20 +0000 From: Alan Cox To: Jack Stone Cc: Matthew Garrett , Linus Torvalds , Alan Stern , Oliver Neukum , Dave Jones , Linux Kernel , Larry Finger , Chaoming Li , "John W. Linville" , Greg Kroah-Hartman , USB list , Linux Wireless List Subject: Re: loading firmware while usermodehelper disabled. Message-ID: <20120103004220.084d61f3@pyramind.ukuu.org.uk> In-Reply-To: <4F0220F5.30309@fastmail.fm> References: <4F02165C.1060400@fastmail.fm> <20120102211904.GA15316@srcf.ucam.org> <4F0220F5.30309@fastmail.fm> X-Mailer: Claws Mail 3.7.10 (GTK+ 2.24.8; x86_64-redhat-linux-gnu) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEWysKsSBQMIAwIZCwj///8wIhxoRDXH9QHCAAABeUlEQVQ4jaXTvW7DIBAAYCQTzz2hdq+rdg494ZmBeE5KYHZjm/d/hJ6NfzBJpp5kRb5PHJwvMPMk2L9As5Y9AmYRBL+HAyJKeOU5aHRhsAAvORQ+UEgAvgddj/lwAXndw2laEDqA4x6KEBhjYRCg9tBFCOuJFxg2OKegbWjbsRTk8PPhKPD7HcRxB7cqhgBRp9Dcqs+B8v4CQvFdqeot3Kov6hBUn0AJitrzY+sgUuiA8i0r7+B3AfqKcN6t8M6HtqQ+AOoELCikgQSbgabKaJW3kn5lBs47JSGDhhLKDUh1UMipwwinMYPTBuIBjEclSaGZUk9hDlTb5sUTYN2SFFQuPe4Gox1X0FZOufjgBiV1Vls7b+GvK3SU4wfmcGo9rPPQzgIabfj4TYQo15k3bTHX9RIw/kniir5YbtJF4jkFG+dsDK1IgE413zAthU/vR2HVMmFUPIHTvF6jWCpFaGw/A3qWgnbxpSm9MSmY5b3pM1gvNc/gQfwBsGwF0VCtxZgAAAAASUVORK5CYII= Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Can we tell by the USB ids that this is a device that might need > firmware and load it into memory anyway - it would use more memory but > would always work as we would have the firmware. Only by wasting a lot of memory in some cases. For the majority of cases however yes you can take a good guess that id X might need firmware Y and the firmware will only be a few K. In that case however you don't want some generic firmware module knowing all this crap, your driver can just request_firmware() the stuff as modprobe and free it up on the module unload. For a typical 8bit firmware of a few K you'll free a ton more memory unloading the module than the firmware ! That I think actually covers the majority of devices under discussion. For the giant-firmware cases, it's unworkable on small devices - but they are special cases anyway and almost entirely video - so not currently ones that cause a problem unless you are doing RFC4824 in which case your nearest asylum should be consulted. Alan