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

    sfc: Convert firmware subtypes to native byte order in 
efx_mcdi_get_board_cfg()

to the 3.0-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-convert-firmware-subtypes-to-native-byte-order-in-efx_mcdi_get_board_cfg.patch
and it can be found in the queue-3.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 6d7cf8ca06e28ea10f95a3f8af14e69a19df63ff Mon Sep 17 00:00:00 2001
From: Ben Hutchings <[email protected]>
Date: Fri, 7 Sep 2012 00:58:10 +0100
Subject: sfc: Convert firmware subtypes to native byte order in 
efx_mcdi_get_board_cfg()


From: Ben Hutchings <[email protected]>

[ Upstream commit bfeed902946a31692e7a24ed355b6d13ac37d014 ]

On big-endian systems the MTD partition names currently have mangled
subtype numbers and are not recognised by the firmware update tool
(sfupdate).

Signed-off-by: Ben Hutchings <[email protected]>
[bwh: Backported to 3.0: use old macros for length of firmware subtype array]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 drivers/net/sfc/mcdi.c |   17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

--- a/drivers/net/sfc/mcdi.c
+++ b/drivers/net/sfc/mcdi.c
@@ -666,9 +666,8 @@ int efx_mcdi_get_board_cfg(struct efx_ni
                           u16 *fw_subtype_list)
 {
        uint8_t outbuf[MC_CMD_GET_BOARD_CFG_OUT_LEN];
-       size_t outlen;
+       size_t outlen, offset, i;
        int port_num = efx_port_num(efx);
-       int offset;
        int rc;
 
        BUILD_BUG_ON(MC_CMD_GET_BOARD_CFG_IN_LEN != 0);
@@ -688,10 +687,16 @@ int efx_mcdi_get_board_cfg(struct efx_ni
                : MC_CMD_GET_BOARD_CFG_OUT_MAC_ADDR_BASE_PORT0_OFST;
        if (mac_address)
                memcpy(mac_address, outbuf + offset, ETH_ALEN);
-       if (fw_subtype_list)
-               memcpy(fw_subtype_list,
-                      outbuf + MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_OFST,
-                      MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_LEN);
+       if (fw_subtype_list) {
+               offset = MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_OFST;
+               for (i = 0;
+                    i < MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_LEN / 2;
+                    i++) {
+                       fw_subtype_list[i] =
+                               le16_to_cpup((__le16 *)(outbuf + offset));
+                       offset += 2;
+               }
+       }
 
        return 0;
 


Patches currently in stable-queue which might be from [email protected] 
are

queue-3.0/sfc-fix-siena-mac-statistics-on-big-endian-platforms.patch
queue-3.0/sfc-do-not-attempt-to-flush-queues-if-dma-is-disabled.patch
queue-3.0/sfc-fix-two-causes-of-flush-failure.patch
queue-3.0/sfc-properly-sync-rx-dma-buffer-when-it-is-not-the-last-in-the-page.patch
queue-3.0/sfc-only-use-tx-push-if-a-single-descriptor-is-to-be-written.patch
queue-3.0/sfc-fix-efx_rx_buf_offset-in-the-presence-of-swiotlb.patch
queue-3.0/sfc-lock-tx-queues-when-calling-netif_device_detach.patch
queue-3.0/sfc-convert-firmware-subtypes-to-native-byte-order-in-efx_mcdi_get_board_cfg.patch
queue-3.0/sfc-fix-timekeeping-in-efx_mcdi_poll.patch
queue-3.0/sfc-disable-soft-interrupt-handling-during-efx_device_detach_sync.patch
queue-3.0/sfc-fix-loop-condition-for-efx_filter_search-when-for_insert.patch
queue-3.0/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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to