Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109253
b: refs/heads/master
c: f4f6230
h: refs/heads/master
i:
  109251: 887cc4d
v: v3
  • Loading branch information
Heiko Schocher authored and Jeff Garzik committed Aug 27, 2008
1 parent 6ef4c9e commit c27140c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 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: 34a20e89739e9ac1cb89bdf430b694d2c946ebff
refs/heads/master: f4f62301c6f42127b7462274abfcbc278f84d59a
5 changes: 5 additions & 0 deletions trunk/arch/powerpc/include/asm/cpm2.h
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,11 @@ typedef struct scc_param {
uint scc_tcrc; /* Internal */
} sccp_t;

/* Function code bits.
*/
#define SCC_EB ((u_char) 0x10) /* Set big endian byte order */
#define SCC_GBL ((u_char) 0x20) /* Snooping enabled */

/* CPM Ethernet through SCC1.
*/
typedef struct scc_enet {
Expand Down
8 changes: 8 additions & 0 deletions trunk/drivers/net/fs_enet/fs_enet-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,10 @@ static int fs_enet_open(struct net_device *dev)
int r;
int err;

/* to initialize the fep->cur_rx,... */
/* not doing this, will cause a crash in fs_enet_rx_napi */
fs_init_bds(fep->ndev);

if (fep->fpi->use_napi)
napi_enable(&fep->napi);

Expand Down Expand Up @@ -1167,6 +1171,10 @@ static struct of_device_id fs_enet_match[] = {
.compatible = "fsl,cpm1-scc-enet",
.data = (void *)&fs_scc_ops,
},
{
.compatible = "fsl,cpm2-scc-enet",
.data = (void *)&fs_scc_ops,
},
#endif
#ifdef CONFIG_FS_ENET_HAS_FCC
{
Expand Down
8 changes: 7 additions & 1 deletion trunk/drivers/net/fs_enet/mac-scc.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
#include "fs_enet.h"

/*************************************************/

#if defined(CONFIG_CPM1)
/* for a 8xx __raw_xxx's are sufficient */
#define __fs_out32(addr, x) __raw_writel(x, addr)
Expand All @@ -62,6 +61,8 @@
#define __fs_out16(addr, x) out_be16(addr, x)
#define __fs_in32(addr) in_be32(addr)
#define __fs_in16(addr) in_be16(addr)
#define __fs_out8(addr, x) out_8(addr, x)
#define __fs_in8(addr) in_8(addr)
#endif

/* write, read, set bits, clear bits */
Expand Down Expand Up @@ -262,8 +263,13 @@ static void restart(struct net_device *dev)

/* Initialize function code registers for big-endian.
*/
#ifndef CONFIG_NOT_COHERENT_CACHE
W8(ep, sen_genscc.scc_rfcr, SCC_EB | SCC_GBL);
W8(ep, sen_genscc.scc_tfcr, SCC_EB | SCC_GBL);
#else
W8(ep, sen_genscc.scc_rfcr, SCC_EB);
W8(ep, sen_genscc.scc_tfcr, SCC_EB);
#endif

/* Set maximum bytes per receive buffer.
* This appears to be an Ethernet frame size, not the buffer
Expand Down

0 comments on commit c27140c

Please sign in to comment.