Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35143
b: refs/heads/master
c: e700f9f
h: refs/heads/master
i:
  35141: 1ca5be8
  35139: 05be3a7
  35135: b8bf32c
v: v3
  • Loading branch information
Brice Goglin authored and Jeff Garzik committed Aug 19, 2006
1 parent b073c83 commit 356e872
Show file tree
Hide file tree
Showing 3 changed files with 24 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: 846050dd49719b1f68248807bba5c27bfc86f81a
refs/heads/master: e700f9f4a208bf6c5d2b4dd67816555930524476
17 changes: 10 additions & 7 deletions trunk/drivers/net/myri10ge/myri10ge.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ myri10ge_send_cmd(struct myri10ge_priv *mgp, u32 cmd,
struct mcp_cmd *buf;
char buf_bytes[sizeof(*buf) + 8];
struct mcp_cmd_response *response = mgp->cmd;
char __iomem *cmd_addr = mgp->sram + MXGEFW_CMD_OFFSET;
char __iomem *cmd_addr = mgp->sram + MXGEFW_ETH_CMD;
u32 dma_low, dma_high, result, value;
int sleep_total = 0;

Expand Down Expand Up @@ -404,7 +404,7 @@ static void myri10ge_dummy_rdma(struct myri10ge_priv *mgp, int enable)
buf[4] = htonl(dma_low); /* dummy addr LSW */
buf[5] = htonl(enable); /* enable? */

submit = mgp->sram + 0xfc01c0;
submit = mgp->sram + MXGEFW_BOOT_DUMMY_RDMA;

myri10ge_pio_copy(submit, &buf, sizeof(buf));
for (i = 0; mgp->cmd->data != MYRI10GE_NO_CONFIRM_DATA && i < 20; i++)
Expand Down Expand Up @@ -600,7 +600,7 @@ static int myri10ge_load_firmware(struct myri10ge_priv *mgp)
buf[5] = htonl(8); /* where to copy to */
buf[6] = htonl(0); /* where to jump to */

submit = mgp->sram + 0xfc0000;
submit = mgp->sram + MXGEFW_BOOT_HANDOFF;

myri10ge_pio_copy(submit, &buf, sizeof(buf));
mb();
Expand Down Expand Up @@ -1648,9 +1648,11 @@ static int myri10ge_open(struct net_device *dev)
}

if (mgp->mtrr >= 0) {
mgp->tx.wc_fifo = (u8 __iomem *) mgp->sram + 0x200000;
mgp->rx_small.wc_fifo = (u8 __iomem *) mgp->sram + 0x300000;
mgp->rx_big.wc_fifo = (u8 __iomem *) mgp->sram + 0x340000;
mgp->tx.wc_fifo = (u8 __iomem *) mgp->sram + MXGEFW_ETH_SEND_4;
mgp->rx_small.wc_fifo =
(u8 __iomem *) mgp->sram + MXGEFW_ETH_RECV_SMALL;
mgp->rx_big.wc_fifo =
(u8 __iomem *) mgp->sram + MXGEFW_ETH_RECV_BIG;
} else {
mgp->tx.wc_fifo = NULL;
mgp->rx_small.wc_fifo = NULL;
Expand Down Expand Up @@ -1841,7 +1843,8 @@ myri10ge_submit_req_wc(struct myri10ge_tx_buf *tx,
if (cnt > 0) {
/* pad it to 64 bytes. The src is 64 bytes bigger than it
* needs to be so that we don't overrun it */
myri10ge_pio_copy(tx->wc_fifo + (cnt << 18), src, 64);
myri10ge_pio_copy(tx->wc_fifo + MXGEFW_ETH_SEND_OFFSET(cnt),
src, 64);
mb();
}
}
Expand Down
14 changes: 13 additions & 1 deletion trunk/drivers/net/myri10ge/myri10ge_mcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,19 @@ struct mcp_kreq_ether_recv {

/* Commands */

#define MXGEFW_CMD_OFFSET 0xf80000
#define MXGEFW_BOOT_HANDOFF 0xfc0000
#define MXGEFW_BOOT_DUMMY_RDMA 0xfc01c0

#define MXGEFW_ETH_CMD 0xf80000
#define MXGEFW_ETH_SEND_4 0x200000
#define MXGEFW_ETH_SEND_1 0x240000
#define MXGEFW_ETH_SEND_2 0x280000
#define MXGEFW_ETH_SEND_3 0x2c0000
#define MXGEFW_ETH_RECV_SMALL 0x300000
#define MXGEFW_ETH_RECV_BIG 0x340000

#define MXGEFW_ETH_SEND(n) (0x200000 + (((n) & 0x03) * 0x40000))
#define MXGEFW_ETH_SEND_OFFSET(n) (MXGEFW_ETH_SEND(n) - MXGEFW_ETH_SEND_4)

enum myri10ge_mcp_cmd_type {
MXGEFW_CMD_NONE = 0,
Expand Down

0 comments on commit 356e872

Please sign in to comment.