Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266834
b: refs/heads/master
c: 79488c5
h: refs/heads/master
v: v3
  • Loading branch information
Emil Tantilov authored and Jeff Kirsher committed Oct 17, 2011
1 parent 3a0c7a8 commit 23bfef3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0224d663063d542b3d829706f3fcbd0f640f19b3
refs/heads/master: 79488c58bb5aef58cfba1917617acf0db21c23a9
16 changes: 8 additions & 8 deletions trunk/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -3341,7 +3341,7 @@ static u8 ixgbe_calculate_checksum(u8 *buffer, u32 length)
* Communicates with the manageability block. On success return 0
* else return IXGBE_ERR_HOST_INTERFACE_COMMAND.
**/
static s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u8 *buffer,
static s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,
u32 length)
{
u32 hicr, i;
Expand Down Expand Up @@ -3374,7 +3374,7 @@ static s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u8 *buffer,
*/
for (i = 0; i < dword_len; i++)
IXGBE_WRITE_REG_ARRAY(hw, IXGBE_FLEX_MNG,
i, *((u32 *)buffer + i));
i, cpu_to_le32(buffer[i]));

/* Setting this bit tells the ARC that a new command is pending. */
IXGBE_WRITE_REG(hw, IXGBE_HICR, hicr | IXGBE_HICR_C);
Expand All @@ -3398,9 +3398,10 @@ static s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u8 *buffer,
dword_len = hdr_size >> 2;

/* first pull in the header so we know the buffer length */
for (i = 0; i < dword_len; i++)
*((u32 *)buffer + i) =
IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG, i);
for (i = 0; i < dword_len; i++) {
buffer[i] = IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG, i);
le32_to_cpus(&buffer[i]);
}

/* If there is any thing in data position pull it in */
buf_len = ((struct ixgbe_hic_hdr *)buffer)->buf_len;
Expand All @@ -3418,8 +3419,7 @@ static s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u8 *buffer,

/* Pull in the rest of the buffer (i is where we left off)*/
for (; i < buf_len; i++)
*((u32 *)buffer + i) =
IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG, i);
buffer[i] = IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG, i);

out:
return ret_val;
Expand Down Expand Up @@ -3465,7 +3465,7 @@ s32 ixgbe_set_fw_drv_ver_generic(struct ixgbe_hw *hw, u8 maj, u8 min,
fw_cmd.pad2 = 0;

for (i = 0; i <= FW_CEM_MAX_RETRIES; i++) {
ret_val = ixgbe_host_interface_command(hw, (u8 *)&fw_cmd,
ret_val = ixgbe_host_interface_command(hw, (u32 *)&fw_cmd,
sizeof(fw_cmd));
if (ret_val != 0)
continue;
Expand Down

0 comments on commit 23bfef3

Please sign in to comment.