Subject: Re: [PATCH net-next] net: vxge: Add MODULE_FIRMWARE

From: Tim Gardner <[email-masked]>
Date: Mon, 16 Apr 2012 06:21:53 -0600

On 04/15/2012 07:56 AM, Ben Hutchings wrote:
> On Thu, 2012-04-12 at 14:34 -0600, Tim Gardner wrote:
>> Cc: Jon Mason <[email-masked]> Cc: [email-masked] 
>> Signed-off-by: Tim Gardner <[email-masked]> --- 
>> drivers/net/ethernet/neterion/vxge/vxge-main.c |    2 ++ 1 file
>> changed, 2 insertions(+)
>> 
>> diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.c
>> b/drivers/net/ethernet/neterion/vxge/vxge-main.c index
>> 51387c3..dcef72d 100644 ---
>> a/drivers/net/ethernet/neterion/vxge/vxge-main.c +++
>> b/drivers/net/ethernet/neterion/vxge/vxge-main.c @@ -4856,3
>> +4856,5 @@ vxge_closer(void) } module_init(vxge_starter); 
>> module_exit(vxge_closer); +MODULE_FIRMWARE("vxge/X3fw-pxe.ncf"); 
>> +MODULE_FIRMWARE("vxge/X3fw.ncf");
> 
> I don't agree; these firmware files are updates for the flash and
> only need to be loaded once.
> 
> Also: this driver's behaviour of automatically updating flash
> without any confirmation seems quite dangerous.  The driver also
> isn't usable after it performs such an update:
> 
> printk(KERN_NOTICE "Upgrade of firmware successful!  Adapter must
> be " "hard reset before using, thus requiring a system reboot or a
> " "hotplug event.\n");
> 
> So what is the point of integrating firmware update into the driver
> at all?
> 
> Ben.
> 

I guess I'm confused about use of the MODULE_FIRMWARE() macro. I
thought it merely described the names of the firmware files that were
actually used by the driver and had no run-time impact. Regardless of
whether firmware files are used on every load, why _not_ describe them
to modinfo ?

I'm auditing the Ubuntu linux-firmware package to reduce size by
removing obsolete firmware files. Along the way I'm also trying to
update the drivers that have caught my attention in their use of
MODULE_FIRMWARE.

rtg
- -- 
Tim Gardner [email-masked]