* [PATCH] igb: Garbled output for "ethtool -m"
@ 2016-02-17 7:34 ` Doron Shikmoni
0 siblings, 0 replies; 4+ messages in thread
From: Doron Shikmoni @ 2016-02-17 7:34 UTC (permalink / raw)
To: intel-wired-lan; +Cc: netdev, Doron Shikmoni
Hello,
Garbled output for "ethtool -m ethX", in igb-driven NICs with module /
plugin EEPROM (i.e. SFP information). Each output data byte appears
duplicated.
In igb_ethtool.c, igb_get_module_eeprom() is reading the EEPROM via i2c;
the eeprom offset for each word that's read via igb_read_phy_reg_i2c()
was passed in #words, whereas it needs to be a byte offset.
This patches fixes the bug.
Signed-off-by: Doron Shikmoni <doron.shikmoni@gmail.com>
---
drivers/net/ethernet/intel/igb/igb_ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
index 1d329f1..7bcc0e1e 100644
--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
@@ -2831,7 +2831,7 @@ static int igb_get_module_eeprom(struct net_device *netdev,
/* Read EEPROM block, SFF-8079/SFF-8472, word at a time */
for (i = 0; i < last_word - first_word + 1; i++) {
- status = igb_read_phy_reg_i2c(hw, first_word + i, &dataword[i]);
+ status = igb_read_phy_reg_i2c(hw, (first_word + i) * 2, &dataword[i]);
if (status) {
/* Error occurred while reading module */
kfree(dataword);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Intel-wired-lan] [PATCH] igb: Garbled output for "ethtool -m"
@ 2016-02-17 7:34 ` Doron Shikmoni
0 siblings, 0 replies; 4+ messages in thread
From: Doron Shikmoni @ 2016-02-17 7:34 UTC (permalink / raw)
To: intel-wired-lan
Hello,
Garbled output for "ethtool -m ethX", in igb-driven NICs with module /
plugin EEPROM (i.e. SFP information). Each output data byte appears
duplicated.
In igb_ethtool.c, igb_get_module_eeprom() is reading the EEPROM via i2c;
the eeprom offset for each word that's read via igb_read_phy_reg_i2c()
was passed in #words, whereas it needs to be a byte offset.
This patches fixes the bug.
Signed-off-by: Doron Shikmoni <doron.shikmoni@gmail.com>
---
drivers/net/ethernet/intel/igb/igb_ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
index 1d329f1..7bcc0e1e 100644
--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
@@ -2831,7 +2831,7 @@ static int igb_get_module_eeprom(struct net_device *netdev,
/* Read EEPROM block, SFF-8079/SFF-8472, word at a time */
for (i = 0; i < last_word - first_word + 1; i++) {
- status = igb_read_phy_reg_i2c(hw, first_word + i, &dataword[i]);
+ status = igb_read_phy_reg_i2c(hw, (first_word + i) * 2, &dataword[i]);
if (status) {
/* Error occurred while reading module */
kfree(dataword);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [Intel-wired-lan] [PATCH] igb: Garbled output for "ethtool -m"
2016-02-17 7:34 ` [Intel-wired-lan] " Doron Shikmoni
@ 2016-03-01 1:32 ` Brown, Aaron F
-1 siblings, 0 replies; 4+ messages in thread
From: Brown, Aaron F @ 2016-03-01 1:32 UTC (permalink / raw)
To: Doron Shikmoni, intel-wired-lan; +Cc: netdev
> From: Intel-wired-lan [intel-wired-lan-bounces@lists.osuosl.org] on behalf of Doron Shikmoni [doron.shikmoni@gmail.com]
> Sent: Tuesday, February 16, 2016 11:34 PM
> To: intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org
> Subject: [Intel-wired-lan] [PATCH] igb: Garbled output for "ethtool -m"
>
> Hello,
>
> Garbled output for "ethtool -m ethX", in igb-driven NICs with module /
> plugin EEPROM (i.e. SFP information). Each output data byte appears
> duplicated.
>
> In igb_ethtool.c, igb_get_module_eeprom() is reading the EEPROM via i2c;
> the eeprom offset for each word that's read via igb_read_phy_reg_i2c()
> was passed in #words, whereas it needs to be a byte offset.
> This patches fixes the bug.
>
> Signed-off-by: Doron Shikmoni <doron.shikmoni@gmail.com>
> ---
> drivers/net/ethernet/intel/igb/igb_ethtool.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Checkpatch complains that you pushed the line over 80 characters:
------------------------
u1463:[0]/usr/src/kernels/next-queue> git format-patch $item -1 --stdout|./scripts/checkpatch.pl -
WARNING: line over 80 characters
#29: FILE: drivers/net/ethernet/intel/igb/igb_ethtool.c:3010:
+ status = igb_read_phy_reg_i2c(hw, (first_word + i) * 2, &dataword[i]);
total: 0 errors, 1 warnings, 0 checks, 8 lines checked
Your patch has style problems, please review.
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
u1463:[0]/usr/src/kernels/next-queue>
------------------------
But functionally seems good. I'll let Jeff choose whether to be a stickler for the warning or not, so...
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Intel-wired-lan] [PATCH] igb: Garbled output for "ethtool -m"
@ 2016-03-01 1:32 ` Brown, Aaron F
0 siblings, 0 replies; 4+ messages in thread
From: Brown, Aaron F @ 2016-03-01 1:32 UTC (permalink / raw)
To: intel-wired-lan
> From: Intel-wired-lan [intel-wired-lan-bounces at lists.osuosl.org] on behalf of Doron Shikmoni [doron.shikmoni at gmail.com]
> Sent: Tuesday, February 16, 2016 11:34 PM
> To: intel-wired-lan at lists.osuosl.org
> Cc: netdev at vger.kernel.org
> Subject: [Intel-wired-lan] [PATCH] igb: Garbled output for "ethtool -m"
>
> Hello,
>
> Garbled output for "ethtool -m ethX", in igb-driven NICs with module /
> plugin EEPROM (i.e. SFP information). Each output data byte appears
> duplicated.
>
> In igb_ethtool.c, igb_get_module_eeprom() is reading the EEPROM via i2c;
> the eeprom offset for each word that's read via igb_read_phy_reg_i2c()
> was passed in #words, whereas it needs to be a byte offset.
> This patches fixes the bug.
>
> Signed-off-by: Doron Shikmoni <doron.shikmoni@gmail.com>
> ---
> drivers/net/ethernet/intel/igb/igb_ethtool.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Checkpatch complains that you pushed the line over 80 characters:
------------------------
u1463:[0]/usr/src/kernels/next-queue> git format-patch $item -1 --stdout|./scripts/checkpatch.pl -
WARNING: line over 80 characters
#29: FILE: drivers/net/ethernet/intel/igb/igb_ethtool.c:3010:
+ status = igb_read_phy_reg_i2c(hw, (first_word + i) * 2, &dataword[i]);
total: 0 errors, 1 warnings, 0 checks, 8 lines checked
Your patch has style problems, please review.
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
u1463:[0]/usr/src/kernels/next-queue>
------------------------
But functionally seems good. I'll let Jeff choose whether to be a stickler for the warning or not, so...
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-03-01 1:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-17 7:34 [PATCH] igb: Garbled output for "ethtool -m" Doron Shikmoni
2016-02-17 7:34 ` [Intel-wired-lan] " Doron Shikmoni
2016-03-01 1:32 ` Brown, Aaron F
2016-03-01 1:32 ` Brown, Aaron F
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.