Patchwork vxge: Declare MODULE_FIRMWARE usage

login
register
mail settings
Submitter Tim Gardner
Date July 26, 2012, 7:08 p.m.
Message ID <1343329710-96747-1-git-send-email-tim.gardner@canonical.com>
Download mbox | patch
Permalink /patch/173480/
State Rejected
Delegated to: David Miller
Headers show

Comments

Tim Gardner - July 26, 2012, 7:08 p.m.
Cc: Jon Mason <jdmason@kudzu.us>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Joe Perches <joe@perches.com>
Cc: Jiri Pirko <jpirko@redhat.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: netdev@vger.kernel.org
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
---
 drivers/net/ethernet/neterion/vxge/vxge-main.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
Jon Mason - July 26, 2012, 7:55 p.m.
On Thu, Jul 26, 2012 at 12:08 PM, Tim Gardner <tim.gardner@canonical.com> wrote:
> Cc: Jon Mason <jdmason@kudzu.us>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Joe Perches <joe@perches.com>
> Cc: Jiri Pirko <jpirko@redhat.com>
> Cc: Stephen Hemminger <shemminger@vyatta.com>
> Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
> Cc: netdev@vger.kernel.org
> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
> ---
>  drivers/net/ethernet/neterion/vxge/vxge-main.c |    9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.c b/drivers/net/ethernet/neterion/vxge/vxge-main.c
> index de21904..d4832b2 100644
> --- a/drivers/net/ethernet/neterion/vxge/vxge-main.c
> +++ b/drivers/net/ethernet/neterion/vxge/vxge-main.c
> @@ -4203,6 +4203,9 @@ out:
>         return ret;
>  }
>
> +#define VXGE_PXE_FIRMWARE "vxge/X3fw-pxe.ncf"
> +#define VXGE_FIRMWARE "vxge/X3fw.ncf"
> +
>  static int vxge_probe_fw_update(struct vxgedev *vdev)
>  {
>         u32 maj, min, bld;
> @@ -4245,9 +4248,9 @@ static int vxge_probe_fw_update(struct vxgedev *vdev)
>                         }
>         }
>         if (gpxe)
> -               fw_name = "vxge/X3fw-pxe.ncf";
> +               fw_name = VXGE_PXE_FIRMWARE;
>         else
> -               fw_name = "vxge/X3fw.ncf";
> +               fw_name = VXGE_FIRMWARE;
>
>         ret = vxge_fw_upgrade(vdev, fw_name, 0);
>         /* -EINVAL and -ENOENT are not fatal errors for flashing firmware on
> @@ -4855,3 +4858,5 @@ vxge_closer(void)
>  }
>  module_init(vxge_starter);
>  module_exit(vxge_closer);
> +MODULE_FIRMWARE(VXGE_PXE_FIRMWARE);
> +MODULE_FIRMWARE(VXGE_FIRMWARE);

IIUC, MODULE_FIRMWARE is only necessary for devices that need firmware
to operate.  vxge hardware has an image in flash on the nic, and the
modified code is used to update the firmware image on the adapter.
So, this change isn't doing what you want it to do.

Also, wasn't this already discussed (https://lkml.org/lkml/2012/4/12/401)?

Thanks,
Jon



> --
> 1.7.9.5
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tim Gardner - July 27, 2012, 1:06 p.m.
On 07/26/2012 01:55 PM, Jon Mason wrote:
> On Thu, Jul 26, 2012 at 12:08 PM, Tim Gardner <tim.gardner@canonical.com> wrote:
>> Cc: Jon Mason <jdmason@kudzu.us>
>> Cc: "David S. Miller" <davem@davemloft.net>
>> Cc: Joe Perches <joe@perches.com>
>> Cc: Jiri Pirko <jpirko@redhat.com>
>> Cc: Stephen Hemminger <shemminger@vyatta.com>
>> Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
>> Cc: netdev@vger.kernel.org
>> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
>> ---
>>   drivers/net/ethernet/neterion/vxge/vxge-main.c |    9 +++++++--
>>   1 file changed, 7 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.c b/drivers/net/ethernet/neterion/vxge/vxge-main.c
>> index de21904..d4832b2 100644
>> --- a/drivers/net/ethernet/neterion/vxge/vxge-main.c
>> +++ b/drivers/net/ethernet/neterion/vxge/vxge-main.c
>> @@ -4203,6 +4203,9 @@ out:
>>          return ret;
>>   }
>>
>> +#define VXGE_PXE_FIRMWARE "vxge/X3fw-pxe.ncf"
>> +#define VXGE_FIRMWARE "vxge/X3fw.ncf"
>> +
>>   static int vxge_probe_fw_update(struct vxgedev *vdev)
>>   {
>>          u32 maj, min, bld;
>> @@ -4245,9 +4248,9 @@ static int vxge_probe_fw_update(struct vxgedev *vdev)
>>                          }
>>          }
>>          if (gpxe)
>> -               fw_name = "vxge/X3fw-pxe.ncf";
>> +               fw_name = VXGE_PXE_FIRMWARE;
>>          else
>> -               fw_name = "vxge/X3fw.ncf";
>> +               fw_name = VXGE_FIRMWARE;
>>
>>          ret = vxge_fw_upgrade(vdev, fw_name, 0);
>>          /* -EINVAL and -ENOENT are not fatal errors for flashing firmware on
>> @@ -4855,3 +4858,5 @@ vxge_closer(void)
>>   }
>>   module_init(vxge_starter);
>>   module_exit(vxge_closer);
>> +MODULE_FIRMWARE(VXGE_PXE_FIRMWARE);
>> +MODULE_FIRMWARE(VXGE_FIRMWARE);
>
> IIUC, MODULE_FIRMWARE is only necessary for devices that need firmware
> to operate.  vxge hardware has an image in flash on the nic, and the
> modified code is used to update the firmware image on the adapter.
> So, this change isn't doing what you want it to do.
>
> Also, wasn't this already discussed (https://lkml.org/lkml/2012/4/12/401)?
>
> Thanks,
> Jon
>

Hmm, I'd forgotten about that discussion, but its no more correct now 
then it was then. MODULE_FIRMWARE is purely informational and has _no_ 
runtime impact. It is merely an indicator that a firmware file _might_ 
be used by the kernel and should therefore be left in the external 
firmware package. MODULE_FIRMWARE() uses the same base MODULE_INFO macro 
as MODULE_VERSION, MODULE_AUTHOR, MODULE_LICENSE, etc.

rtg

Patch

diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.c b/drivers/net/ethernet/neterion/vxge/vxge-main.c
index de21904..d4832b2 100644
--- a/drivers/net/ethernet/neterion/vxge/vxge-main.c
+++ b/drivers/net/ethernet/neterion/vxge/vxge-main.c
@@ -4203,6 +4203,9 @@  out:
 	return ret;
 }
 
+#define VXGE_PXE_FIRMWARE "vxge/X3fw-pxe.ncf"
+#define VXGE_FIRMWARE "vxge/X3fw.ncf"
+
 static int vxge_probe_fw_update(struct vxgedev *vdev)
 {
 	u32 maj, min, bld;
@@ -4245,9 +4248,9 @@  static int vxge_probe_fw_update(struct vxgedev *vdev)
 			}
 	}
 	if (gpxe)
-		fw_name = "vxge/X3fw-pxe.ncf";
+		fw_name = VXGE_PXE_FIRMWARE;
 	else
-		fw_name = "vxge/X3fw.ncf";
+		fw_name = VXGE_FIRMWARE;
 
 	ret = vxge_fw_upgrade(vdev, fw_name, 0);
 	/* -EINVAL and -ENOENT are not fatal errors for flashing firmware on
@@ -4855,3 +4858,5 @@  vxge_closer(void)
 }
 module_init(vxge_starter);
 module_exit(vxge_closer);
+MODULE_FIRMWARE(VXGE_PXE_FIRMWARE);
+MODULE_FIRMWARE(VXGE_FIRMWARE);