Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 108011
b: refs/heads/master
c: ea96616
h: refs/heads/master
i:
  108009: 330ca50
  108007: b188b9c
v: v3
  • Loading branch information
Krzysztof Hałasa committed Jul 23, 2008
1 parent c66da60 commit 96d641c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 51 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: c1a0f0cdf95569c06946eed81c2fc7e04b272db4
refs/heads/master: ea966165a306ad4243b7bf62c848288c4286a8b7
36 changes: 1 addition & 35 deletions trunk/drivers/net/wan/pc300.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@
#define _PC300_H

#include <linux/hdlc.h>
#include <net/syncppp.h>
#include "hd64572.h"
#include "pc300-falc-lh.h"

Expand All @@ -112,19 +111,11 @@ typedef __u16 ucshort; /* 16 bits, unsigned */
typedef __u8 ucchar; /* 8 bits, unsigned */
#endif /* CY_TYPES */

#define PC300_PROTO_MLPPP 1
#define PC300_PROTO_MLPPP 1

#define PC300_KERNEL "2.4.x" /* Kernel supported by this driver */

#define PC300_DEVNAME "hdlc" /* Dev. name base (for hdlc0, hdlc1, etc.) */
#define PC300_MAXINDEX 100 /* Max dev. name index (the '0' in hdlc0) */

#define PC300_MAXCARDS 4 /* Max number of cards per system */
#define PC300_MAXCHAN 2 /* Number of channels per card */

#define PC300_PLX_WIN 0x80 /* PLX control window size (128b) */
#define PC300_RAMSIZE 0x40000 /* RAM window size (256Kb) */
#define PC300_SCASIZE 0x400 /* SCA window size (1Kb) */
#define PC300_FALCSIZE 0x400 /* FALC window size (1Kb) */

#define PC300_OSC_CLOCK 24576000
Expand Down Expand Up @@ -160,7 +151,6 @@ typedef __u8 ucchar; /* 8 bits, unsigned */
* Memory access functions/macros *
* (required to support Alpha systems) *
***************************************/
#ifdef __KERNEL__
#define cpc_writeb(port,val) {writeb((ucchar)(val),(port)); mb();}
#define cpc_writew(port,val) {writew((ushort)(val),(port)); mb();}
#define cpc_writel(port,val) {writel((uclong)(val),(port)); mb();}
Expand All @@ -169,17 +159,6 @@ typedef __u8 ucchar; /* 8 bits, unsigned */
#define cpc_readw(port) readw(port)
#define cpc_readl(port) readl(port)

#else /* __KERNEL__ */
#define cpc_writeb(port,val) (*(volatile ucchar *)(port) = (ucchar)(val))
#define cpc_writew(port,val) (*(volatile ucshort *)(port) = (ucshort)(val))
#define cpc_writel(port,val) (*(volatile uclong *)(port) = (uclong)(val))

#define cpc_readb(port) (*(volatile ucchar *)(port))
#define cpc_readw(port) (*(volatile ucshort *)(port))
#define cpc_readl(port) (*(volatile uclong *)(port))

#endif /* __KERNEL__ */

/****** Data Structures *****************************************************/

/*
Expand Down Expand Up @@ -321,24 +300,15 @@ typedef struct pc300patterntst {
} pc300patterntst_t;

typedef struct pc300dev {
void *if_ptr; /* General purpose pointer */
struct pc300ch *chan;
ucchar trace_on;
uclong line_on; /* DCD(X.21, RSV) / sync(TE) change counters */
uclong line_off;
#ifdef __KERNEL__
char name[16];
struct net_device *dev;

void *private;
struct sk_buff *tx_skb;
union { /* This union has all the protocol-specific structures */
struct ppp_device pppdev;
}ifu;
#ifdef CONFIG_PC300_MLPPP
void *cpc_tty; /* information to PC300 TTY driver */
#endif
#endif /* __KERNEL__ */
}pc300dev_t;

typedef struct pc300hw {
Expand Down Expand Up @@ -401,9 +371,7 @@ typedef struct pc300ch {
typedef struct pc300 {
pc300hw_t hw; /* hardware config. */
pc300ch_t chan[PC300_MAXCHAN];
#ifdef __KERNEL__
spinlock_t card_lock;
#endif /* __KERNEL__ */
} pc300_t;

typedef struct pc300conf {
Expand Down Expand Up @@ -471,12 +439,10 @@ enum pc300_loopback_cmds {
#define PC300_TX_QUEUE_LEN 100
#define PC300_DEF_MTU 1600

#ifdef __KERNEL__
/* Function Prototypes */
void tx_dma_start(pc300_t *, int);
int cpc_open(struct net_device *dev);
int cpc_set_media(hdlc_device *, int);
#endif /* __KERNEL__ */

#endif /* _PC300_H */

18 changes: 3 additions & 15 deletions trunk/drivers/net/wan/pc300_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -3150,19 +3150,10 @@ int cpc_open(struct net_device *dev)
printk("pc300: cpc_open");
#endif

#ifdef FIXME
if (hdlc->proto.id == IF_PROTO_PPP) {
d->if_ptr = &hdlc->state.ppp.pppdev;
}
#endif

result = hdlc_open(dev);
if (/* FIXME hdlc->proto.id == IF_PROTO_PPP*/ 0) {
dev->priv = d;
}
if (result) {

if (result)
return result;
}

sprintf(ifr.ifr_name, "%s", dev->name);
result = cpc_opench(d);
Expand Down Expand Up @@ -3195,9 +3186,7 @@ static int cpc_close(struct net_device *dev)
CPC_UNLOCK(card, flags);

hdlc_close(dev);
if (/* FIXME hdlc->proto.id == IF_PROTO_PPP*/ 0) {
d->if_ptr = NULL;
}

#ifdef CONFIG_PC300_MLPPP
if (chan->conf.proto == PC300_PROTO_MLPPP) {
cpc_tty_unregister_service(d);
Expand Down Expand Up @@ -3358,7 +3347,6 @@ static void cpc_init_card(pc300_t * card)
chan->nfree_tx_bd = N_DMA_TX_BUF;

d->chan = chan;
d->tx_skb = NULL;
d->trace_on = 0;
d->line_on = 0;
d->line_off = 0;
Expand Down

0 comments on commit 96d641c

Please sign in to comment.