* [PATCH net-next 0/2] ethtool changes
@ 2012-05-15 11:13 Manish Chopra
2012-05-15 11:13 ` [PATCH NEXT 1/2] linux/ethtool: Added macro ETH_FW_DUMP_DISABLE Manish Chopra
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Manish Chopra @ 2012-05-15 11:13 UTC (permalink / raw)
To: bhutchings
Cc: davem, netdev, Dept_NX_Linux_NIC_Driver, anirban.chakraborty,
Manish Chopra
From: Manish Chopra <manish.chopra@qlogic.com>
Please apply it to net-next.
Thanks,
Manish
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH NEXT 1/2] linux/ethtool: Added macro ETH_FW_DUMP_DISABLE
2012-05-15 11:13 [PATCH net-next 0/2] ethtool changes Manish Chopra
@ 2012-05-15 11:13 ` Manish Chopra
2012-05-15 14:01 ` Ben Hutchings
2012-05-15 11:13 ` [PATCH NEXT 2/2] qlcnic-ethtool: set the ethtool_dump flag by ETH_FW_DUMP_DISABLE value that is zero, if firmware dump is disabled Manish Chopra
2012-05-15 17:14 ` [PATCH net-next 0/2] ethtool changes David Miller
2 siblings, 1 reply; 5+ messages in thread
From: Manish Chopra @ 2012-05-15 11:13 UTC (permalink / raw)
To: bhutchings
Cc: davem, netdev, Dept_NX_Linux_NIC_Driver, anirban.chakraborty,
Manish chopra
From: Manish chopra <manish.chopra@qlogic.com>
o flag field of ethtool_dump structure must be initialized by this macro
value that is zero, if the firmware dump is disabled.
by this we can get the firmware dump capability [enable/disable] via ethtool
Signed-off-by: Manish chopra <manish.chopra@qlogic.com>
---
include/linux/ethtool.h | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index 89d68d8..fea2ac0 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -661,12 +661,17 @@ struct ethtool_flash {
* %ETHTOOL_SET_DUMP
* @version: FW version of the dump, filled in by driver
* @flag: driver dependent flag for dump setting, filled in by driver during
- * get and filled in by ethtool for set operation
+ * get and filled in by ethtool for set operation.
+ * flag must be initialized by macro ETH_FW_DUMP_DISABLE value when
+ * firmware dump is disabled.
* @len: length of dump data, used as the length of the user buffer on entry to
* %ETHTOOL_GET_DUMP_DATA and this is returned as dump length by driver
* for %ETHTOOL_GET_DUMP_FLAG command
* @data: data collected for get dump data operation
*/
+
+#define ETH_FW_DUMP_DISABLE 0
+
struct ethtool_dump {
__u32 cmd;
__u32 version;
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH NEXT 2/2] qlcnic-ethtool: set the ethtool_dump flag by ETH_FW_DUMP_DISABLE value that is zero, if firmware dump is disabled.
2012-05-15 11:13 [PATCH net-next 0/2] ethtool changes Manish Chopra
2012-05-15 11:13 ` [PATCH NEXT 1/2] linux/ethtool: Added macro ETH_FW_DUMP_DISABLE Manish Chopra
@ 2012-05-15 11:13 ` Manish Chopra
2012-05-15 17:14 ` [PATCH net-next 0/2] ethtool changes David Miller
2 siblings, 0 replies; 5+ messages in thread
From: Manish Chopra @ 2012-05-15 11:13 UTC (permalink / raw)
To: bhutchings
Cc: davem, netdev, Dept_NX_Linux_NIC_Driver, anirban.chakraborty,
Manish chopra
From: Manish chopra <manish.chopra@qlogic.com>
Signed-off-by: Manish chopra <manish.chopra@qlogic.com>
---
.../net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
index 735423f..9e9e78a 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
@@ -1232,7 +1232,12 @@ qlcnic_get_dump_flag(struct net_device *netdev, struct ethtool_dump *dump)
dump->len = fw_dump->tmpl_hdr->size + fw_dump->size;
else
dump->len = 0;
- dump->flag = fw_dump->tmpl_hdr->drv_cap_mask;
+
+ if (!fw_dump->enable)
+ dump->flag = ETH_FW_DUMP_DISABLE;
+ else
+ dump->flag = fw_dump->tmpl_hdr->drv_cap_mask;
+
dump->version = adapter->fw_version;
return 0;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH NEXT 1/2] linux/ethtool: Added macro ETH_FW_DUMP_DISABLE
2012-05-15 11:13 ` [PATCH NEXT 1/2] linux/ethtool: Added macro ETH_FW_DUMP_DISABLE Manish Chopra
@ 2012-05-15 14:01 ` Ben Hutchings
0 siblings, 0 replies; 5+ messages in thread
From: Ben Hutchings @ 2012-05-15 14:01 UTC (permalink / raw)
To: Manish Chopra
Cc: davem, netdev, Dept_NX_Linux_NIC_Driver, anirban.chakraborty
On Tue, 2012-05-15 at 07:13 -0400, Manish Chopra wrote:
> From: Manish chopra <manish.chopra@qlogic.com>
>
> o flag field of ethtool_dump structure must be initialized by this macro
> value that is zero, if the firmware dump is disabled.
> by this we can get the firmware dump capability [enable/disable] via ethtool
>
> Signed-off-by: Manish chopra <manish.chopra@qlogic.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
> ---
> include/linux/ethtool.h | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
> index 89d68d8..fea2ac0 100644
> --- a/include/linux/ethtool.h
> +++ b/include/linux/ethtool.h
> @@ -661,12 +661,17 @@ struct ethtool_flash {
> * %ETHTOOL_SET_DUMP
> * @version: FW version of the dump, filled in by driver
> * @flag: driver dependent flag for dump setting, filled in by driver during
> - * get and filled in by ethtool for set operation
> + * get and filled in by ethtool for set operation.
> + * flag must be initialized by macro ETH_FW_DUMP_DISABLE value when
> + * firmware dump is disabled.
> * @len: length of dump data, used as the length of the user buffer on entry to
> * %ETHTOOL_GET_DUMP_DATA and this is returned as dump length by driver
> * for %ETHTOOL_GET_DUMP_FLAG command
> * @data: data collected for get dump data operation
> */
> +
> +#define ETH_FW_DUMP_DISABLE 0
> +
> struct ethtool_dump {
> __u32 cmd;
> __u32 version;
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next 0/2] ethtool changes
2012-05-15 11:13 [PATCH net-next 0/2] ethtool changes Manish Chopra
2012-05-15 11:13 ` [PATCH NEXT 1/2] linux/ethtool: Added macro ETH_FW_DUMP_DISABLE Manish Chopra
2012-05-15 11:13 ` [PATCH NEXT 2/2] qlcnic-ethtool: set the ethtool_dump flag by ETH_FW_DUMP_DISABLE value that is zero, if firmware dump is disabled Manish Chopra
@ 2012-05-15 17:14 ` David Miller
2 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2012-05-15 17:14 UTC (permalink / raw)
To: manish.chopra
Cc: bhutchings, netdev, Dept_NX_Linux_NIC_Driver, anirban.chakraborty
From: Manish Chopra <manish.chopra@qlogic.com>
Date: Tue, 15 May 2012 07:13:37 -0400
> Please apply it to net-next.
All applied, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-05-15 17:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-15 11:13 [PATCH net-next 0/2] ethtool changes Manish Chopra
2012-05-15 11:13 ` [PATCH NEXT 1/2] linux/ethtool: Added macro ETH_FW_DUMP_DISABLE Manish Chopra
2012-05-15 14:01 ` Ben Hutchings
2012-05-15 11:13 ` [PATCH NEXT 2/2] qlcnic-ethtool: set the ethtool_dump flag by ETH_FW_DUMP_DISABLE value that is zero, if firmware dump is disabled Manish Chopra
2012-05-15 17:14 ` [PATCH net-next 0/2] ethtool changes David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).