Browse Source

[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 years ago
parent
commit
0e81ff2297
2 changed files with 4 additions and 4 deletions
  1. 3
    3
      src/drivers/net/myri10ge.c
  2. 1
    1
      src/drivers/net/myri10ge_mcp.h

+ 3
- 3
src/drivers/net/myri10ge.c View File

304
 	command->response_addr.high = 0;
304
 	command->response_addr.high = 0;
305
 	command->response_addr.low
305
 	command->response_addr.low
306
 		= htonl ( virt_to_bus ( &priv->dma->command_response ) );
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
 	wmb();
309
 	wmb();
310
-	* ( uint32 * ) &command->pad[36] = 0;
310
+	command->pad[9] = 0;
311
 
311
 
312
 	/* Wait up to 2 seconds for a response. */
312
 	/* Wait up to 2 seconds for a response. */
313
 
313
 

+ 1
- 1
src/drivers/net/myri10ge_mcp.h View File

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

Loading…
Cancel
Save