diff --git a/debian/changelog b/debian/changelog index c627a4d96..fa1def971 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,7 @@ linux-2.6 (2.6.32-9) UNRELEASED; urgency=low * macvlan: Add bridge, VEPA and private modes (Closes: #568756) * [sparc] sunxvr500: Support Intergraph graphics chips again (Closes: #508108) + * sfc: Apply fixes from 2.6.33 [ maximilian attems] * Postinst don't refercence k-p related manpage. (closes: #542208) diff --git a/debian/patches/bugfix/all/sfc-Fix-SFE4002-initialisation.patch b/debian/patches/bugfix/all/sfc-Fix-SFE4002-initialisation.patch new file mode 100644 index 000000000..ea1779626 --- /dev/null +++ b/debian/patches/bugfix/all/sfc-Fix-SFE4002-initialisation.patch @@ -0,0 +1,54 @@ +From 5e2a911cecc7e0fd89b1d2d001b7b89d47057ad6 Mon Sep 17 00:00:00 2001 +From: Steve Hodgson +Date: Fri, 12 Feb 2010 12:32:27 -0800 +Subject: [PATCH 1/3] sfc: Fix SFE4002 initialisation + +From: Steve Hodgson + +Commit 357d46a17e54c9a87e0e6ef3930ff4ab2d232b81 "sfc: QT202x: Remove +unreliable MMD check at initialisation" broke initialisation of the +SFE4002. efx_mdio_reset_mmd() returns a positive value rather than 0 +on success. The above commit causes this value to be propagated up +by qt202x_reset_phy(), which is treated as a failure by its callers. +Change qt202x_reset_phy() to return 0 if successful. + +The PCI layer treats >0 as "fail, but please call remove() anyway", +which means that unloading the driver would cause a crash. Add a +WARN_ON() on the failure path of efx_pci_probe() to provide early +warning if there are any other cases where we do this. + +Signed-off-by: Ben Hutchings +Signed-off-by: David S. Miller +--- + drivers/net/sfc/efx.c | 1 + + drivers/net/sfc/qt202x_phy.c | 2 +- + 2 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c +index 103e8b0..46997e1 100644 +--- a/drivers/net/sfc/efx.c ++++ b/drivers/net/sfc/efx.c +@@ -2284,6 +2284,7 @@ static int __devinit efx_pci_probe(struct pci_dev *pci_dev, + fail2: + efx_fini_struct(efx); + fail1: ++ WARN_ON(rc > 0); + EFX_LOG(efx, "initialisation failed. rc=%d\n", rc); + free_netdev(net_dev); + return rc; +diff --git a/drivers/net/sfc/qt202x_phy.c b/drivers/net/sfc/qt202x_phy.c +index e0d13a4..67eec7a 100644 +--- a/drivers/net/sfc/qt202x_phy.c ++++ b/drivers/net/sfc/qt202x_phy.c +@@ -320,7 +320,7 @@ static int qt202x_reset_phy(struct efx_nic *efx) + + falcon_board(efx)->type->init_phy(efx); + +- return rc; ++ return 0; + + fail: + EFX_ERR(efx, "PHY reset timed out\n"); +-- +1.6.6.2 + diff --git a/debian/patches/bugfix/all/sfc-Fix-sign-of-efx_mcdi_poll_reboot-error-in-efx_mcdi_poll.patch b/debian/patches/bugfix/all/sfc-Fix-sign-of-efx_mcdi_poll_reboot-error-in-efx_mcdi_poll.patch new file mode 100644 index 000000000..dfd6b581b --- /dev/null +++ b/debian/patches/bugfix/all/sfc-Fix-sign-of-efx_mcdi_poll_reboot-error-in-efx_mcdi_poll.patch @@ -0,0 +1,31 @@ +From e0bf54c93a15c365a37cfc4fe0137f5bc012d1b9 Mon Sep 17 00:00:00 2001 +From: Ben Hutchings +Date: Fri, 19 Feb 2010 13:29:27 +0000 +Subject: [PATCH 2/3] sfc: Fix sign of efx_mcdi_poll_reboot() error in efx_mcdi_poll() + +efx_mcdi_poll() uses positive error numbers, matching the MCDI +protocol. It must negate the result of efx_mcdi_poll_reboot() which +returns the usual negative error numbers. + +Signed-off-by: Ben Hutchings +Signed-off-by: David S. Miller +--- + drivers/net/sfc/mcdi.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/net/sfc/mcdi.c b/drivers/net/sfc/mcdi.c +index 9f035b9..f66b3da 100644 +--- a/drivers/net/sfc/mcdi.c ++++ b/drivers/net/sfc/mcdi.c +@@ -127,7 +127,7 @@ static int efx_mcdi_poll(struct efx_nic *efx) + efx_dword_t reg; + + /* Check for a reboot atomically with respect to efx_mcdi_copyout() */ +- rc = efx_mcdi_poll_reboot(efx); ++ rc = -efx_mcdi_poll_reboot(efx); + if (rc) + goto out; + +-- +1.6.6.2 + diff --git a/debian/patches/bugfix/all/sfc-SFE4002-SFN4112F-Widen-temperature-voltage-tolerances.patch b/debian/patches/bugfix/all/sfc-SFE4002-SFN4112F-Widen-temperature-voltage-tolerances.patch new file mode 100644 index 000000000..9999dfe5b --- /dev/null +++ b/debian/patches/bugfix/all/sfc-SFE4002-SFN4112F-Widen-temperature-voltage-tolerances.patch @@ -0,0 +1,98 @@ +From 242cc0547f3bcecc0b02ca6f3e9512760185727e Mon Sep 17 00:00:00 2001 +From: Ben Hutchings +Date: Fri, 19 Feb 2010 13:34:03 +0000 +Subject: [PATCH 3/3] sfc: SFE4002/SFN4112F: Widen temperature and voltage tolerances + +The temperature and voltage limits currently set on these boards are +too conservative and will cause the driver to stop the net device +erroneously in some systems. + +Based on a review of the chip datasheets and advice from the designer +of these boards: + +- Raise the maximum board temperatures to the specified maximum ambient + temperatures for their PHYs plus the expected temperature bias of the + board +- Raise the maximum controller temperature to 90 degrees +- Lower the minimum temperatures to 0 degrees +- Widen the voltage tolerances to at least +/- 10% + +Signed-off-by: Ben Hutchings +Signed-off-by: David S. Miller +--- + drivers/net/sfc/falcon_boards.c | 45 +++++++++++++++++++++++--------------- + 1 files changed, 27 insertions(+), 18 deletions(-) + +diff --git a/drivers/net/sfc/falcon_boards.c b/drivers/net/sfc/falcon_boards.c +index bf0b96a..5712fdd 100644 +--- a/drivers/net/sfc/falcon_boards.c ++++ b/drivers/net/sfc/falcon_boards.c +@@ -29,6 +29,15 @@ + #define FALCON_BOARD_SFN4111T 0x51 + #define FALCON_BOARD_SFN4112F 0x52 + ++/* Board temperature is about 15°C above ambient when air flow is ++ * limited. */ ++#define FALCON_BOARD_TEMP_BIAS 15 ++ ++/* SFC4000 datasheet says: 'The maximum permitted junction temperature ++ * is 125°C; the thermal design of the environment for the SFC4000 ++ * should aim to keep this well below 100°C.' */ ++#define FALCON_JUNC_TEMP_MAX 90 ++ + /***************************************************************************** + * Support for LM87 sensor chip used on several boards + */ +@@ -548,16 +557,16 @@ fail_hwmon: + static u8 sfe4002_lm87_channel = 0x03; /* use AIN not FAN inputs */ + + static const u8 sfe4002_lm87_regs[] = { +- LM87_IN_LIMITS(0, 0x83, 0x91), /* 2.5V: 1.8V +/- 5% */ +- LM87_IN_LIMITS(1, 0x51, 0x5a), /* Vccp1: 1.2V +/- 5% */ +- LM87_IN_LIMITS(2, 0xb6, 0xca), /* 3.3V: 3.3V +/- 5% */ +- LM87_IN_LIMITS(3, 0xb0, 0xc9), /* 5V: 4.6-5.2V */ +- LM87_IN_LIMITS(4, 0xb0, 0xe0), /* 12V: 11-14V */ +- LM87_IN_LIMITS(5, 0x44, 0x4b), /* Vccp2: 1.0V +/- 5% */ +- LM87_AIN_LIMITS(0, 0xa0, 0xb2), /* AIN1: 1.66V +/- 5% */ +- LM87_AIN_LIMITS(1, 0x91, 0xa1), /* AIN2: 1.5V +/- 5% */ +- LM87_TEMP_INT_LIMITS(10, 60), /* board */ +- LM87_TEMP_EXT1_LIMITS(10, 70), /* Falcon */ ++ LM87_IN_LIMITS(0, 0x7c, 0x99), /* 2.5V: 1.8V +/- 10% */ ++ LM87_IN_LIMITS(1, 0x4c, 0x5e), /* Vccp1: 1.2V +/- 10% */ ++ LM87_IN_LIMITS(2, 0xac, 0xd4), /* 3.3V: 3.3V +/- 10% */ ++ LM87_IN_LIMITS(3, 0xac, 0xd4), /* 5V: 5.0V +/- 10% */ ++ LM87_IN_LIMITS(4, 0xac, 0xe0), /* 12V: 10.8-14V */ ++ LM87_IN_LIMITS(5, 0x3f, 0x4f), /* Vccp2: 1.0V +/- 10% */ ++ LM87_AIN_LIMITS(0, 0x98, 0xbb), /* AIN1: 1.66V +/- 10% */ ++ LM87_AIN_LIMITS(1, 0x8a, 0xa9), /* AIN2: 1.5V +/- 10% */ ++ LM87_TEMP_INT_LIMITS(0, 80 + FALCON_BOARD_TEMP_BIAS), ++ LM87_TEMP_EXT1_LIMITS(0, FALCON_JUNC_TEMP_MAX), + 0 + }; + +@@ -619,14 +628,14 @@ static int sfe4002_init(struct efx_nic *efx) + static u8 sfn4112f_lm87_channel = 0x03; /* use AIN not FAN inputs */ + + static const u8 sfn4112f_lm87_regs[] = { +- LM87_IN_LIMITS(0, 0x83, 0x91), /* 2.5V: 1.8V +/- 5% */ +- LM87_IN_LIMITS(1, 0x51, 0x5a), /* Vccp1: 1.2V +/- 5% */ +- LM87_IN_LIMITS(2, 0xb6, 0xca), /* 3.3V: 3.3V +/- 5% */ +- LM87_IN_LIMITS(4, 0xb0, 0xe0), /* 12V: 11-14V */ +- LM87_IN_LIMITS(5, 0x44, 0x4b), /* Vccp2: 1.0V +/- 5% */ +- LM87_AIN_LIMITS(1, 0x91, 0xa1), /* AIN2: 1.5V +/- 5% */ +- LM87_TEMP_INT_LIMITS(10, 60), /* board */ +- LM87_TEMP_EXT1_LIMITS(10, 70), /* Falcon */ ++ LM87_IN_LIMITS(0, 0x7c, 0x99), /* 2.5V: 1.8V +/- 10% */ ++ LM87_IN_LIMITS(1, 0x4c, 0x5e), /* Vccp1: 1.2V +/- 10% */ ++ LM87_IN_LIMITS(2, 0xac, 0xd4), /* 3.3V: 3.3V +/- 10% */ ++ LM87_IN_LIMITS(4, 0xac, 0xe0), /* 12V: 10.8-14V */ ++ LM87_IN_LIMITS(5, 0x3f, 0x4f), /* Vccp2: 1.0V +/- 10% */ ++ LM87_AIN_LIMITS(1, 0x8a, 0xa9), /* AIN2: 1.5V +/- 10% */ ++ LM87_TEMP_INT_LIMITS(0, 60 + FALCON_BOARD_TEMP_BIAS), ++ LM87_TEMP_EXT1_LIMITS(0, FALCON_JUNC_TEMP_MAX), + 0 + }; + +-- +1.6.6.2 + diff --git a/debian/patches/series/9 b/debian/patches/series/9 index 7b86cd9fe..d17b76c6e 100644 --- a/debian/patches/series/9 +++ b/debian/patches/series/9 @@ -14,3 +14,6 @@ + bugfix/all/stable/2.6.32.9-rc1.patch + bugfix/all/net-r8169-improved-rx-length-check-errors.patch + bugfix/all/vgaarb-fix-incorrect-dereference-of-userspace-pointe.patch ++ bugfix/all/sfc-Fix-SFE4002-initialisation.patch ++ bugfix/all/sfc-Fix-sign-of-efx_mcdi_poll_reboot-error-in-efx_mcdi_poll.patch ++ bugfix/all/sfc-SFE4002-SFN4112F-Widen-temperature-voltage-tolerances.patch