瀏覽代碼

[myri10ge] Fix compilation error in myri10ge_command() with gcc 4.7

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Olaf Hering 12 年之前
父節點
當前提交
0e81ff2297
共有 2 個檔案被更改,包括 4 行新增4 行删除
  1. 3
    3
      src/drivers/net/myri10ge.c
  2. 1
    1
      src/drivers/net/myri10ge_mcp.h

+ 3
- 3
src/drivers/net/myri10ge.c 查看文件

@@ -304,10 +304,10 @@ static int myri10ge_command ( struct myri10ge_private *priv,
304 304
 	command->response_addr.high = 0;
305 305
 	command->response_addr.low
306 306
 		= htonl ( virt_to_bus ( &priv->dma->command_response ) );
307
-	for ( i=0; i<36; i+=4 )
308
-		* ( uint32 * ) &command->pad[i] = 0;
307
+	for ( i=0; i<9; i++ )
308
+		command->pad[i] = 0;
309 309
 	wmb();
310
-	* ( uint32 * ) &command->pad[36] = 0;
310
+	command->pad[9] = 0;
311 311
 
312 312
 	/* Wait up to 2 seconds for a response. */
313 313
 

+ 1
- 1
src/drivers/net/myri10ge_mcp.h 查看文件

@@ -80,7 +80,7 @@ struct mcp_cmd {
80 80
   /* 16 */
81 81
   struct mcp_dma_addr response_addr;
82 82
   /* 24 */
83
-  uint8_t pad[40];
83
+  uint32_t pad[10];
84 84
 };
85 85
 typedef struct mcp_cmd mcp_cmd_t;
86 86
 

Loading…
取消
儲存