Patchwork [net] e1000: Fix driver to be used on PA RISC C8000 workstations

login
register
mail settings
Submitter Jeff Kirsher
Date Aug. 31, 2011, 12:19 a.m.
Message ID <1314749966-9960-1-git-send-email-jeffrey.t.kirsher@intel.com>
Download mbox | patch
Permalink /patch/112396/
State Changes Requested
Delegated to: David Miller
Headers show

Comments

Jeff Kirsher - Aug. 31, 2011, 12:19 a.m.
The checksum field in the EEPROM on HPPA is really not a
checksum but a signature (0x16d6).  So allow 0x16d6 as the
matching checksum on HPPA systems.

This issue is present on longterm/stable kernels, I have
verified that this patch is applicable back to at least
2.6.32.y kernels.

CC: Guy Martin <gmsoft@tuxicoman.be>
CC: Rolf Eike Beer <eike-kernel@sf-tec.de>
CC: Matt Turner <mattst88@gmail.com>
Reported-by: Mikulas Patocka <mikulas@artax.kerlin.mff.cuni.cz>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
---
 drivers/net/e1000/e1000_hw.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
David Miller - Aug. 31, 2011, 12:39 a.m.
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 30 Aug 2011 17:19:26 -0700

> +#ifdef __hppa__

Please use CONFIG_PARISC
--
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
Jeff Kirsher - Aug. 31, 2011, 12:48 a.m.
On Tue, 2011-08-30 at 17:39 -0700, David Miller wrote:
> From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Date: Tue, 30 Aug 2011 17:19:26 -0700
> 
> > +#ifdef __hppa__
> 
> Please use CONFIG_PARISC

Ok, I will put together a v2 of the patch with your suggested change.
Greg KH - Aug. 31, 2011, 3:37 p.m.
On Tue, Aug 30, 2011 at 05:19:26PM -0700, Jeff Kirsher wrote:
> The checksum field in the EEPROM on HPPA is really not a
> checksum but a signature (0x16d6).  So allow 0x16d6 as the
> matching checksum on HPPA systems.
> 
> This issue is present on longterm/stable kernels, I have
> verified that this patch is applicable back to at least
> 2.6.32.y kernels.
> 
> CC: Guy Martin <gmsoft@tuxicoman.be>
> CC: Rolf Eike Beer <eike-kernel@sf-tec.de>
> CC: Matt Turner <mattst88@gmail.com>
> Reported-by: Mikulas Patocka <mikulas@artax.kerlin.mff.cuni.cz>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read Documentation/stable_kernel_rules.txt
for how to do this properly.

</formletter>
--
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

Patch

diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c
index 8545c7a..08c1ad5 100644
--- a/drivers/net/e1000/e1000_hw.c
+++ b/drivers/net/e1000/e1000_hw.c
@@ -4026,6 +4026,12 @@  s32 e1000_validate_eeprom_checksum(struct e1000_hw *hw)
 		checksum += eeprom_data;
 	}
 
+#ifdef __hppa__
+	/* This is a signature and not a checksum on HP c8000 */
+	if ((hw->subsystem_vendor_id == 0x103C) && (eeprom_data == 0x16d6))
+		return E1000_SUCCESS;
+
+#endif
 	if (checksum == (u16) EEPROM_SUM)
 		return E1000_SUCCESS;
 	else {