Patch "sfc: Fix MCDI structure field lookup" has been added to the 3.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    sfc: Fix MCDI structure field lookup

to the 3.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     sfc-fix-mcdi-structure-field-lookup.patch
and it can be found in the queue-3.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 43cd9f8b21f55b2210d627ba27789a7ec586ded6 Mon Sep 17 00:00:00 2001
From: Ben Hutchings <bhutchings@xxxxxxxxxxxxxx>
Date: Tue, 11 Sep 2012 21:46:41 +0100
Subject: sfc: Fix MCDI structure field lookup


From: Ben Hutchings <bhutchings@xxxxxxxxxxxxxx>

[ Upstream commit 0a6e5008a9df678b48f8d4e57601aa4270df6c14 ]

The least significant bit number (LBN) of a field within an MCDI
structure is counted from the start of the structure, not the
containing dword.  In MCDI_ARRAY_FIELD() we need to mask it rather
than using the usual EFX_DWORD_FIELD() macro.

Signed-off-by: Ben Hutchings <bhutchings@xxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/net/ethernet/sfc/mcdi.h |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- a/drivers/net/ethernet/sfc/mcdi.h
+++ b/drivers/net/ethernet/sfc/mcdi.h
@@ -107,11 +107,13 @@ extern void efx_mcdi_sensor_event(struct
 #define MCDI_EVENT_FIELD(_ev, _field)			\
 	EFX_QWORD_FIELD(_ev, MCDI_EVENT_ ## _field)
 #define MCDI_ARRAY_FIELD(_buf, _field1, _type, _index, _field2)		\
-	EFX_DWORD_FIELD(						\
+	EFX_EXTRACT_DWORD(						\
 		*((efx_dword_t *)					\
 		  (MCDI_ARRAY_PTR(_buf, _field1, _type, _index) +	\
 		   (MC_CMD_ ## _type ## _TYPEDEF_ ## _field2 ## _OFST & ~3))), \
-		MC_CMD_ ## _type ## _TYPEDEF_ ## _field2)
+		MC_CMD_ ## _type ## _TYPEDEF_ ## _field2 ## _LBN & 0x1f, \
+		(MC_CMD_ ## _type ## _TYPEDEF_ ## _field2 ## _LBN & 0x1f) + \
+		MC_CMD_ ## _type ## _TYPEDEF_ ## _field2 ## _WIDTH - 1)
 
 extern void efx_mcdi_print_fwver(struct efx_nic *efx, char *buf, size_t len);
 extern int efx_mcdi_drv_attach(struct efx_nic *efx, bool driver_operating,


Patches currently in stable-queue which might be from bhutchings@xxxxxxxxxxxxxx are

queue-3.4/sfc-really-disable-flow-control-while-flushing.patch
queue-3.4/sfc-disable-vf-queues-during-register-self-test.patch
queue-3.4/sfc-correctly-initialise-reset_method-in-siena_test_chip.patch
queue-3.4/sfc-do-not-attempt-to-flush-queues-if-dma-is-disabled.patch
queue-3.4/sfc-avoid-generating-over-length-mc_cmd_flush_rx_queues-request.patch
queue-3.4/sfc-work-around-flush-timeout-when-flushes-have-completed.patch
queue-3.4/sfc-add-parentheses-around-use-of-bitfield-macro-arguments.patch
queue-3.4/sfc-fix-mcdi-structure-field-lookup.patch
queue-3.4/sfc-properly-sync-rx-dma-buffer-when-it-is-not-the-last-in-the-page.patch
queue-3.4/sfc-only-use-tx-push-if-a-single-descriptor-is-to-be-written.patch
queue-3.4/sfc-fix-efx_rx_buf_offset-in-the-presence-of-swiotlb.patch
queue-3.4/sfc-lock-tx-queues-when-calling-netif_device_detach.patch
queue-3.4/sfc-convert-firmware-subtypes-to-native-byte-order-in-efx_mcdi_get_board_cfg.patch
queue-3.4/sfc-fix-timekeeping-in-efx_mcdi_poll.patch
queue-3.4/sfc-disable-soft-interrupt-handling-during-efx_device_detach_sync.patch
queue-3.4/sfc-detach-net-device-when-stopping-queues-for-reconfiguration.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]