Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 130874
b: refs/heads/master
c: 2635147
h: refs/heads/master
v: v3
  • Loading branch information
Ron Mercer authored and David S. Miller committed Feb 2, 2009
1 parent 8c498e7 commit df2ca98
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 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: e408b8dcb5ce42243a902205005208e590f28454
refs/heads/master: 26351479ed43288be92935826c215fbe01e2abb2
10 changes: 5 additions & 5 deletions trunk/drivers/net/qlge/qlge.h
Original file line number Diff line number Diff line change
Expand Up @@ -787,12 +787,12 @@ struct mbox_params {

struct flash_params {
u8 dev_id_str[4];
u16 size;
u16 csum;
u16 ver;
u16 sub_dev_id;
__le16 size;
__le16 csum;
__le16 ver;
__le16 sub_dev_id;
u8 mac_addr[6];
u16 res;
__le16 res;
};


Expand Down
11 changes: 7 additions & 4 deletions trunk/drivers/net/qlge/qlge_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ static void ql_enable_all_completion_interrupts(struct ql_adapter *qdev)

}

static int ql_read_flash_word(struct ql_adapter *qdev, int offset, u32 *data)
static int ql_read_flash_word(struct ql_adapter *qdev, int offset, __le32 *data)
{
int status = 0;
/* wait for reg to come ready */
Expand All @@ -656,8 +656,11 @@ static int ql_read_flash_word(struct ql_adapter *qdev, int offset, u32 *data)
FLASH_ADDR, FLASH_ADDR_RDY, FLASH_ADDR_ERR);
if (status)
goto exit;
/* get the data */
*data = ql_read32(qdev, FLASH_DATA);
/* This data is stored on flash as an array of
* __le32. Since ql_read32() returns cpu endian
* we need to swap it back.
*/
*data = cpu_to_le32(ql_read32(qdev, FLASH_DATA));
exit:
return status;
}
Expand All @@ -666,7 +669,7 @@ static int ql_get_flash_params(struct ql_adapter *qdev)
{
int i;
int status;
u32 *p = (u32 *)&qdev->flash;
__le32 *p = (__le32 *)&qdev->flash;

if (ql_sem_spinlock(qdev, SEM_FLASH_MASK))
return -ETIMEDOUT;
Expand Down

0 comments on commit df2ca98

Please sign in to comment.