diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2011-05-16 02:13:49 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-16 15:05:23 -0400 |
commit | 867955f5682f7157fdafe8670804b9f8ea077bc7 (patch) | |
tree | 90d853ca6e38fd1512bf97addd14bf176b49332b | |
parent | 0e3d32c3a85c82df781ca93b956af336e915ac00 (diff) |
sfc: Fix oops in register dump after mapping change
Commit 747df2258b1b9a2e25929ef496262c339c380009 ('sfc: Always map MCDI
shared memory as uncacheable') introduced a separate mapping for the
MCDI shared memory (MC_TREG_SMEM). This means we can no longer easily
include it in the register dump. Since it is not particularly useful
in debugging, substitute a recognisable dummy value.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/sfc/nic.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/sfc/nic.c b/drivers/net/sfc/nic.c index 10f1cb79c147..9b29a8d7c449 100644 --- a/drivers/net/sfc/nic.c +++ b/drivers/net/sfc/nic.c | |||
@@ -1937,6 +1937,13 @@ void efx_nic_get_regs(struct efx_nic *efx, void *buf) | |||
1937 | 1937 | ||
1938 | size = min_t(size_t, table->step, 16); | 1938 | size = min_t(size_t, table->step, 16); |
1939 | 1939 | ||
1940 | if (table->offset >= efx->type->mem_map_size) { | ||
1941 | /* No longer mapped; return dummy data */ | ||
1942 | memcpy(buf, "\xde\xc0\xad\xde", 4); | ||
1943 | buf += table->rows * size; | ||
1944 | continue; | ||
1945 | } | ||
1946 | |||
1940 | for (i = 0; i < table->rows; i++) { | 1947 | for (i = 0; i < table->rows; i++) { |
1941 | switch (table->step) { | 1948 | switch (table->step) { |
1942 | case 4: /* 32-bit register or SRAM */ | 1949 | case 4: /* 32-bit register or SRAM */ |