be2net: Fixed Endianness issues in the response read log length field while retrievin...
authorSomnath Kotur <somnath.kotur@emulex.com>
Fri, 30 Sep 2011 07:24:00 +0000 (07:24 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Oct 2011 16:17:32 +0000 (12:17 -0400)
This was manifesting as a crash when FAT Dump extraction was attempted on a PPC machine.

Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be_cmds.c

index eb58a80aaddd96e3d2aa927bfca6dc5043071156..1ac031e21699f2ba0e553e9ee49ddc91289d2ca9 100644 (file)
@@ -1429,7 +1429,7 @@ void be_cmd_get_regs(struct be_adapter *adapter, u32 buf_len, void *buf)
                        struct be_cmd_resp_get_fat *resp = get_fat_cmd.va;
                        memcpy(buf + offset,
                                resp->data_buffer,
-                               resp->read_log_length);
+                               le32_to_cpu(resp->read_log_length));
                } else {
                        dev_err(&adapter->pdev->dev, "FAT Table Retrieve error\n");
                        goto err;