[kernel] r15063 - in dists/trunk/linux-2.6/debian: . patches/bugfix/all patches/series
Ben Hutchings
benh at alioth.debian.org
Sat Jan 30 03:06:36 UTC 2010
Author: benh
Date: Sat Jan 30 03:06:24 2010
New Revision: 15063
Log:
sfc: Apply fixes from 2.6.33-rc{5,6}
Added:
dists/trunk/linux-2.6/debian/patches/bugfix/all/sfc-Add-workspace-for-GMAC-bug-workaround.patch
dists/trunk/linux-2.6/debian/patches/bugfix/all/sfc-Fix-conditions-for-MDIO-self-test.patch
dists/trunk/linux-2.6/debian/patches/bugfix/all/sfc-Fix-polling-for-slow-MCDI-operations.patch
dists/trunk/linux-2.6/debian/patches/bugfix/all/sfc-QT202x-Remove-unreliable-MMD-check.patch
dists/trunk/linux-2.6/debian/patches/bugfix/all/sfc-Use-fixed-size-buffers-for-MCDI-NVRAM-requests.patch
Modified:
dists/trunk/linux-2.6/debian/changelog
dists/trunk/linux-2.6/debian/patches/series/6
Modified: dists/trunk/linux-2.6/debian/changelog
==============================================================================
--- dists/trunk/linux-2.6/debian/changelog Sat Jan 30 00:10:25 2010 (r15062)
+++ dists/trunk/linux-2.6/debian/changelog Sat Jan 30 03:06:24 2010 (r15063)
@@ -43,6 +43,7 @@
* Add stable release 2.6.32.7:
- clockevent: Don't remove broadcast device on halt or CPU hotplug
(Closes: #566547)
+ * sfc: Apply fixes from 2.6.33-rc{5,6}
[ Ian Campbell ]
* xen: Enable up to 32G of guest memory on i386.
Added: dists/trunk/linux-2.6/debian/patches/bugfix/all/sfc-Add-workspace-for-GMAC-bug-workaround.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/trunk/linux-2.6/debian/patches/bugfix/all/sfc-Add-workspace-for-GMAC-bug-workaround.patch Sat Jan 30 03:06:24 2010 (r15063)
@@ -0,0 +1,38 @@
+From 8704a2c8e9db24157a7b08d1678bf840f2318779 Mon Sep 17 00:00:00 2001
+From: Guido Barzini <gbarzini at solarflare.com>
+Date: Mon, 25 Jan 2010 15:49:19 -0800
+Subject: [PATCH 4/5] sfc: Add workspace for GMAC bug workaround to MCDI MAC_STATS buffer
+
+Due to a hardware bug in the SFC9000 family, the firmware must
+transfer raw GMAC statistics to host memory before aggregating them
+into the cooked (speed-independent) MAC statistics. Extend the stats
+buffer to support this.
+
+The length of the buffer is explicit in the MAC_STATS command, so this
+change is backward-compatible on both sides.
+
+Signed-off-by: Ben Hutchings <bhutchings at solarflare.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/sfc/mcdi_pcol.h | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/net/sfc/mcdi_pcol.h b/drivers/net/sfc/mcdi_pcol.h
+index 2a85360..73e71f4 100644
+--- a/drivers/net/sfc/mcdi_pcol.h
++++ b/drivers/net/sfc/mcdi_pcol.h
+@@ -1090,8 +1090,10 @@
+ #define MC_CMD_MAC_RX_LANES01_DISP_ERR 57
+ #define MC_CMD_MAC_RX_LANES23_DISP_ERR 58
+ #define MC_CMD_MAC_RX_MATCH_FAULT 59
++#define MC_CMD_GMAC_DMABUF_START 64
++#define MC_CMD_GMAC_DMABUF_END 95
+ /* Insert new members here. */
+-#define MC_CMD_MAC_GENERATION_END 60
++#define MC_CMD_MAC_GENERATION_END 96
+ #define MC_CMD_MAC_NSTATS (MC_CMD_MAC_GENERATION_END+1)
+
+ /* MC_CMD_MAC_STATS:
+--
+1.6.6
+
Added: dists/trunk/linux-2.6/debian/patches/bugfix/all/sfc-Fix-conditions-for-MDIO-self-test.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/trunk/linux-2.6/debian/patches/bugfix/all/sfc-Fix-conditions-for-MDIO-self-test.patch Sat Jan 30 03:06:24 2010 (r15063)
@@ -0,0 +1,40 @@
+From f3766c26a5d00189e5c0965c66f01956d15a92d6 Mon Sep 17 00:00:00 2001
+From: Ben Hutchings <bhutchings at solarflare.com>
+Date: Wed, 13 Jan 2010 10:59:13 +0000
+Subject: [PATCH 2/5] sfc: Fix conditions for MDIO self-test
+
+The MDIO self-test should not be run on boards without an MDIO PHY,
+such as SFN5122F-R3 and later revisions. It should also not try to
+address a specific MMD in an MDIO clause 22 PHY. Check the
+mode_support field to decide which mode to use, if any.
+
+Signed-off-by: Ben Hutchings <bhutchings at solarflare.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/sfc/selftest.c | 8 ++++++--
+ 1 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/sfc/selftest.c b/drivers/net/sfc/selftest.c
+index af39335..250c882 100644
+--- a/drivers/net/sfc/selftest.c
++++ b/drivers/net/sfc/selftest.c
+@@ -79,10 +79,14 @@ struct efx_loopback_state {
+ static int efx_test_mdio(struct efx_nic *efx, struct efx_self_tests *tests)
+ {
+ int rc = 0;
+- int devad = __ffs(efx->mdio.mmds);
++ int devad;
+ u16 physid1, physid2;
+
+- if (efx->phy_type == PHY_TYPE_NONE)
++ if (efx->mdio.mode_support & MDIO_SUPPORTS_C45)
++ devad = __ffs(efx->mdio.mmds);
++ else if (efx->mdio.mode_support & MDIO_SUPPORTS_C22)
++ devad = MDIO_DEVAD_NONE;
++ else
+ return 0;
+
+ mutex_lock(&efx->mac_lock);
+--
+1.6.6
+
Added: dists/trunk/linux-2.6/debian/patches/bugfix/all/sfc-Fix-polling-for-slow-MCDI-operations.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/trunk/linux-2.6/debian/patches/bugfix/all/sfc-Fix-polling-for-slow-MCDI-operations.patch Sat Jan 30 03:06:24 2010 (r15063)
@@ -0,0 +1,36 @@
+From 55029c1d65158aea9672c5dfadb43a57f23e3100 Mon Sep 17 00:00:00 2001
+From: Ben Hutchings <bhutchings at solarflare.com>
+Date: Wed, 13 Jan 2010 04:34:25 +0000
+Subject: [PATCH 1/5] sfc: Fix polling for slow MCDI operations
+
+When the interface is down and we are using polled mode for MCDI
+operations, we busy-wait for completion for approximately 1 jiffy
+using udelay() and then back off to schedule(). But the completion
+will not wake the task, since we are using polled mode! We must use
+schedule_timeout_uninterruptible() instead.
+
+Signed-off-by: Ben Hutchings <bhutchings at solarflare.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/sfc/mcdi.c | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/sfc/mcdi.c b/drivers/net/sfc/mcdi.c
+index 683353b..0d4eba7 100644
+--- a/drivers/net/sfc/mcdi.c
++++ b/drivers/net/sfc/mcdi.c
+@@ -142,8 +142,9 @@ static int efx_mcdi_poll(struct efx_nic *efx)
+ if (spins != 0) {
+ --spins;
+ udelay(1);
+- } else
+- schedule();
++ } else {
++ schedule_timeout_uninterruptible(1);
++ }
+
+ time = get_seconds();
+
+--
+1.6.6
+
Added: dists/trunk/linux-2.6/debian/patches/bugfix/all/sfc-QT202x-Remove-unreliable-MMD-check.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/trunk/linux-2.6/debian/patches/bugfix/all/sfc-QT202x-Remove-unreliable-MMD-check.patch Sat Jan 30 03:06:24 2010 (r15063)
@@ -0,0 +1,33 @@
+From 357d46a17e54c9a87e0e6ef3930ff4ab2d232b81 Mon Sep 17 00:00:00 2001
+From: Matthew Slattery <mslattery at solarflare.com>
+Date: Mon, 18 Jan 2010 05:47:16 +0000
+Subject: [PATCH 3/5] sfc: QT202x: Remove unreliable MMD check at initialisation
+
+Checking the PHY XS MMD here is unnecessary and can give false negatives.
+
+Signed-off-by: Ben Hutchings <bhutchings at solarflare.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/sfc/qt202x_phy.c | 6 ------
+ 1 files changed, 0 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/net/sfc/qt202x_phy.c b/drivers/net/sfc/qt202x_phy.c
+index ff8f0a4..e0d13a4 100644
+--- a/drivers/net/sfc/qt202x_phy.c
++++ b/drivers/net/sfc/qt202x_phy.c
+@@ -318,12 +318,6 @@ static int qt202x_reset_phy(struct efx_nic *efx)
+ /* Wait 250ms for the PHY to complete bootup */
+ msleep(250);
+
+- /* Check that all the MMDs we expect are present and responding. We
+- * expect faults on some if the link is down, but not on the PHY XS */
+- rc = efx_mdio_check_mmds(efx, QT202X_REQUIRED_DEVS, MDIO_DEVS_PHYXS);
+- if (rc < 0)
+- goto fail;
+-
+ falcon_board(efx)->type->init_phy(efx);
+
+ return rc;
+--
+1.6.6
+
Added: dists/trunk/linux-2.6/debian/patches/bugfix/all/sfc-Use-fixed-size-buffers-for-MCDI-NVRAM-requests.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/trunk/linux-2.6/debian/patches/bugfix/all/sfc-Use-fixed-size-buffers-for-MCDI-NVRAM-requests.patch Sat Jan 30 03:06:24 2010 (r15063)
@@ -0,0 +1,98 @@
+From 5a27e86babe79cf5f575394bb1055448458df6c7 Mon Sep 17 00:00:00 2001
+From: Ben Hutchings <bhutchings at solarflare.com>
+Date: Mon, 25 Jan 2010 15:49:59 -0800
+Subject: [PATCH 5/5] sfc: Use fixed-size buffers for MCDI NVRAM requests
+
+The low-level MCDI code always uses 32-bit MMIO operations, and
+callers must pad input and output buffers to multiples of 4 bytes.
+The MCDI NVRAM functions are not doing this. Also, their buffers are
+declared as variable-length arrays with no explicit maximum length.
+
+Switch to a fixed buffer size based on the chunk size used by the
+MTD driver (which is a multiple of 4).
+
+Signed-off-by: Ben Hutchings <bhutchings at solarflare.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/sfc/mcdi.c | 7 ++++---
+ drivers/net/sfc/mcdi.h | 1 +
+ drivers/net/sfc/mtd.c | 5 ++---
+ 3 files changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/net/sfc/mcdi.c b/drivers/net/sfc/mcdi.c
+index 0d4eba7..9f035b9 100644
+--- a/drivers/net/sfc/mcdi.c
++++ b/drivers/net/sfc/mcdi.c
+@@ -804,7 +804,7 @@ int efx_mcdi_nvram_read(struct efx_nic *efx, unsigned int type,
+ loff_t offset, u8 *buffer, size_t length)
+ {
+ u8 inbuf[MC_CMD_NVRAM_READ_IN_LEN];
+- u8 outbuf[MC_CMD_NVRAM_READ_OUT_LEN(length)];
++ u8 outbuf[MC_CMD_NVRAM_READ_OUT_LEN(EFX_MCDI_NVRAM_LEN_MAX)];
+ size_t outlen;
+ int rc;
+
+@@ -828,7 +828,7 @@ fail:
+ int efx_mcdi_nvram_write(struct efx_nic *efx, unsigned int type,
+ loff_t offset, const u8 *buffer, size_t length)
+ {
+- u8 inbuf[MC_CMD_NVRAM_WRITE_IN_LEN(length)];
++ u8 inbuf[MC_CMD_NVRAM_WRITE_IN_LEN(EFX_MCDI_NVRAM_LEN_MAX)];
+ int rc;
+
+ MCDI_SET_DWORD(inbuf, NVRAM_WRITE_IN_TYPE, type);
+@@ -838,7 +838,8 @@ int efx_mcdi_nvram_write(struct efx_nic *efx, unsigned int type,
+
+ BUILD_BUG_ON(MC_CMD_NVRAM_WRITE_OUT_LEN != 0);
+
+- rc = efx_mcdi_rpc(efx, MC_CMD_NVRAM_WRITE, inbuf, sizeof(inbuf),
++ rc = efx_mcdi_rpc(efx, MC_CMD_NVRAM_WRITE, inbuf,
++ ALIGN(MC_CMD_NVRAM_WRITE_IN_LEN(length), 4),
+ NULL, 0, NULL);
+ if (rc)
+ goto fail;
+diff --git a/drivers/net/sfc/mcdi.h b/drivers/net/sfc/mcdi.h
+index de91672..10ce98f 100644
+--- a/drivers/net/sfc/mcdi.h
++++ b/drivers/net/sfc/mcdi.h
+@@ -111,6 +111,7 @@ extern int efx_mcdi_nvram_read(struct efx_nic *efx, unsigned int type,
+ extern int efx_mcdi_nvram_write(struct efx_nic *efx, unsigned int type,
+ loff_t offset, const u8 *buffer,
+ size_t length);
++#define EFX_MCDI_NVRAM_LEN_MAX 128
+ extern int efx_mcdi_nvram_erase(struct efx_nic *efx, unsigned int type,
+ loff_t offset, size_t length);
+ extern int efx_mcdi_nvram_update_finish(struct efx_nic *efx,
+diff --git a/drivers/net/sfc/mtd.c b/drivers/net/sfc/mtd.c
+index 3a46452..407bbad 100644
+--- a/drivers/net/sfc/mtd.c
++++ b/drivers/net/sfc/mtd.c
+@@ -23,7 +23,6 @@
+ #include "mcdi_pcol.h"
+
+ #define EFX_SPI_VERIFY_BUF_LEN 16
+-#define EFX_MCDI_CHUNK_LEN 128
+
+ struct efx_mtd_partition {
+ struct mtd_info mtd;
+@@ -428,7 +427,7 @@ static int siena_mtd_read(struct mtd_info *mtd, loff_t start,
+ int rc = 0;
+
+ while (offset < end) {
+- chunk = min_t(size_t, end - offset, EFX_MCDI_CHUNK_LEN);
++ chunk = min_t(size_t, end - offset, EFX_MCDI_NVRAM_LEN_MAX);
+ rc = efx_mcdi_nvram_read(efx, part->mcdi.nvram_type, offset,
+ buffer, chunk);
+ if (rc)
+@@ -491,7 +490,7 @@ static int siena_mtd_write(struct mtd_info *mtd, loff_t start,
+ }
+
+ while (offset < end) {
+- chunk = min_t(size_t, end - offset, EFX_MCDI_CHUNK_LEN);
++ chunk = min_t(size_t, end - offset, EFX_MCDI_NVRAM_LEN_MAX);
+ rc = efx_mcdi_nvram_write(efx, part->mcdi.nvram_type, offset,
+ buffer, chunk);
+ if (rc)
+--
+1.6.6
+
Modified: dists/trunk/linux-2.6/debian/patches/series/6
==============================================================================
--- dists/trunk/linux-2.6/debian/patches/series/6 Sat Jan 30 00:10:25 2010 (r15062)
+++ dists/trunk/linux-2.6/debian/patches/series/6 Sat Jan 30 03:06:24 2010 (r15063)
@@ -32,3 +32,8 @@
+ bugfix/all/stable/2.6.32.7.patch
+ features/all/input-alps-add-support-for-touchpads-with-4-directional-button-2.patch
+ debian/sched-fix-conflict-between-2.6.32.7-and-vserver.patch
++ bugfix/all/sfc-Fix-polling-for-slow-MCDI-operations.patch
++ bugfix/all/sfc-Fix-conditions-for-MDIO-self-test.patch
++ bugfix/all/sfc-QT202x-Remove-unreliable-MMD-check.patch
++ bugfix/all/sfc-Add-workspace-for-GMAC-bug-workaround.patch
++ bugfix/all/sfc-Use-fixed-size-buffers-for-MCDI-NVRAM-requests.patch
More information about the Kernel-svn-changes
mailing list