diff options
author | Krzysztof Hałasa <khc@pm.waw.pl> | 2008-07-01 15:14:43 -0400 |
---|---|---|
committer | Krzysztof Hałasa <khc@pm.waw.pl> | 2008-07-23 17:00:37 -0400 |
commit | ea966165a306ad4243b7bf62c848288c4286a8b7 (patch) | |
tree | d9a7d7efe038cabf45c37f79269f37757d75a672 | |
parent | c1a0f0cdf95569c06946eed81c2fc7e04b272db4 (diff) |
WAN: Remove dead code from PC300 driver, part #1
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
-rw-r--r-- | drivers/net/wan/pc300.h | 36 | ||||
-rw-r--r-- | drivers/net/wan/pc300_drv.c | 18 |
2 files changed, 4 insertions, 50 deletions
diff --git a/drivers/net/wan/pc300.h b/drivers/net/wan/pc300.h index 63e9fcf31fb8..cd24ea586dba 100644 --- a/drivers/net/wan/pc300.h +++ b/drivers/net/wan/pc300.h | |||
@@ -100,7 +100,6 @@ | |||
100 | #define _PC300_H | 100 | #define _PC300_H |
101 | 101 | ||
102 | #include <linux/hdlc.h> | 102 | #include <linux/hdlc.h> |
103 | #include <net/syncppp.h> | ||
104 | #include "hd64572.h" | 103 | #include "hd64572.h" |
105 | #include "pc300-falc-lh.h" | 104 | #include "pc300-falc-lh.h" |
106 | 105 | ||
@@ -112,19 +111,11 @@ typedef __u16 ucshort; /* 16 bits, unsigned */ | |||
112 | typedef __u8 ucchar; /* 8 bits, unsigned */ | 111 | typedef __u8 ucchar; /* 8 bits, unsigned */ |
113 | #endif /* CY_TYPES */ | 112 | #endif /* CY_TYPES */ |
114 | 113 | ||
115 | #define PC300_PROTO_MLPPP 1 | 114 | #define PC300_PROTO_MLPPP 1 |
116 | 115 | ||
117 | #define PC300_KERNEL "2.4.x" /* Kernel supported by this driver */ | ||
118 | |||
119 | #define PC300_DEVNAME "hdlc" /* Dev. name base (for hdlc0, hdlc1, etc.) */ | ||
120 | #define PC300_MAXINDEX 100 /* Max dev. name index (the '0' in hdlc0) */ | ||
121 | |||
122 | #define PC300_MAXCARDS 4 /* Max number of cards per system */ | ||
123 | #define PC300_MAXCHAN 2 /* Number of channels per card */ | 116 | #define PC300_MAXCHAN 2 /* Number of channels per card */ |
124 | 117 | ||
125 | #define PC300_PLX_WIN 0x80 /* PLX control window size (128b) */ | ||
126 | #define PC300_RAMSIZE 0x40000 /* RAM window size (256Kb) */ | 118 | #define PC300_RAMSIZE 0x40000 /* RAM window size (256Kb) */ |
127 | #define PC300_SCASIZE 0x400 /* SCA window size (1Kb) */ | ||
128 | #define PC300_FALCSIZE 0x400 /* FALC window size (1Kb) */ | 119 | #define PC300_FALCSIZE 0x400 /* FALC window size (1Kb) */ |
129 | 120 | ||
130 | #define PC300_OSC_CLOCK 24576000 | 121 | #define PC300_OSC_CLOCK 24576000 |
@@ -160,7 +151,6 @@ typedef __u8 ucchar; /* 8 bits, unsigned */ | |||
160 | * Memory access functions/macros * | 151 | * Memory access functions/macros * |
161 | * (required to support Alpha systems) * | 152 | * (required to support Alpha systems) * |
162 | ***************************************/ | 153 | ***************************************/ |
163 | #ifdef __KERNEL__ | ||
164 | #define cpc_writeb(port,val) {writeb((ucchar)(val),(port)); mb();} | 154 | #define cpc_writeb(port,val) {writeb((ucchar)(val),(port)); mb();} |
165 | #define cpc_writew(port,val) {writew((ushort)(val),(port)); mb();} | 155 | #define cpc_writew(port,val) {writew((ushort)(val),(port)); mb();} |
166 | #define cpc_writel(port,val) {writel((uclong)(val),(port)); mb();} | 156 | #define cpc_writel(port,val) {writel((uclong)(val),(port)); mb();} |
@@ -169,17 +159,6 @@ typedef __u8 ucchar; /* 8 bits, unsigned */ | |||
169 | #define cpc_readw(port) readw(port) | 159 | #define cpc_readw(port) readw(port) |
170 | #define cpc_readl(port) readl(port) | 160 | #define cpc_readl(port) readl(port) |
171 | 161 | ||
172 | #else /* __KERNEL__ */ | ||
173 | #define cpc_writeb(port,val) (*(volatile ucchar *)(port) = (ucchar)(val)) | ||
174 | #define cpc_writew(port,val) (*(volatile ucshort *)(port) = (ucshort)(val)) | ||
175 | #define cpc_writel(port,val) (*(volatile uclong *)(port) = (uclong)(val)) | ||
176 | |||
177 | #define cpc_readb(port) (*(volatile ucchar *)(port)) | ||
178 | #define cpc_readw(port) (*(volatile ucshort *)(port)) | ||
179 | #define cpc_readl(port) (*(volatile uclong *)(port)) | ||
180 | |||
181 | #endif /* __KERNEL__ */ | ||
182 | |||
183 | /****** Data Structures *****************************************************/ | 162 | /****** Data Structures *****************************************************/ |
184 | 163 | ||
185 | /* | 164 | /* |
@@ -321,24 +300,15 @@ typedef struct pc300patterntst { | |||
321 | } pc300patterntst_t; | 300 | } pc300patterntst_t; |
322 | 301 | ||
323 | typedef struct pc300dev { | 302 | typedef struct pc300dev { |
324 | void *if_ptr; /* General purpose pointer */ | ||
325 | struct pc300ch *chan; | 303 | struct pc300ch *chan; |
326 | ucchar trace_on; | 304 | ucchar trace_on; |
327 | uclong line_on; /* DCD(X.21, RSV) / sync(TE) change counters */ | 305 | uclong line_on; /* DCD(X.21, RSV) / sync(TE) change counters */ |
328 | uclong line_off; | 306 | uclong line_off; |
329 | #ifdef __KERNEL__ | ||
330 | char name[16]; | 307 | char name[16]; |
331 | struct net_device *dev; | 308 | struct net_device *dev; |
332 | |||
333 | void *private; | ||
334 | struct sk_buff *tx_skb; | ||
335 | union { /* This union has all the protocol-specific structures */ | ||
336 | struct ppp_device pppdev; | ||
337 | }ifu; | ||
338 | #ifdef CONFIG_PC300_MLPPP | 309 | #ifdef CONFIG_PC300_MLPPP |
339 | void *cpc_tty; /* information to PC300 TTY driver */ | 310 | void *cpc_tty; /* information to PC300 TTY driver */ |
340 | #endif | 311 | #endif |
341 | #endif /* __KERNEL__ */ | ||
342 | }pc300dev_t; | 312 | }pc300dev_t; |
343 | 313 | ||
344 | typedef struct pc300hw { | 314 | typedef struct pc300hw { |
@@ -401,9 +371,7 @@ typedef struct pc300ch { | |||
401 | typedef struct pc300 { | 371 | typedef struct pc300 { |
402 | pc300hw_t hw; /* hardware config. */ | 372 | pc300hw_t hw; /* hardware config. */ |
403 | pc300ch_t chan[PC300_MAXCHAN]; | 373 | pc300ch_t chan[PC300_MAXCHAN]; |
404 | #ifdef __KERNEL__ | ||
405 | spinlock_t card_lock; | 374 | spinlock_t card_lock; |
406 | #endif /* __KERNEL__ */ | ||
407 | } pc300_t; | 375 | } pc300_t; |
408 | 376 | ||
409 | typedef struct pc300conf { | 377 | typedef struct pc300conf { |
@@ -471,12 +439,10 @@ enum pc300_loopback_cmds { | |||
471 | #define PC300_TX_QUEUE_LEN 100 | 439 | #define PC300_TX_QUEUE_LEN 100 |
472 | #define PC300_DEF_MTU 1600 | 440 | #define PC300_DEF_MTU 1600 |
473 | 441 | ||
474 | #ifdef __KERNEL__ | ||
475 | /* Function Prototypes */ | 442 | /* Function Prototypes */ |
476 | void tx_dma_start(pc300_t *, int); | 443 | void tx_dma_start(pc300_t *, int); |
477 | int cpc_open(struct net_device *dev); | 444 | int cpc_open(struct net_device *dev); |
478 | int cpc_set_media(hdlc_device *, int); | 445 | int cpc_set_media(hdlc_device *, int); |
479 | #endif /* __KERNEL__ */ | ||
480 | 446 | ||
481 | #endif /* _PC300_H */ | 447 | #endif /* _PC300_H */ |
482 | 448 | ||
diff --git a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c index 694df44d2e4f..3226a745571a 100644 --- a/drivers/net/wan/pc300_drv.c +++ b/drivers/net/wan/pc300_drv.c | |||
@@ -3150,19 +3150,10 @@ int cpc_open(struct net_device *dev) | |||
3150 | printk("pc300: cpc_open"); | 3150 | printk("pc300: cpc_open"); |
3151 | #endif | 3151 | #endif |
3152 | 3152 | ||
3153 | #ifdef FIXME | ||
3154 | if (hdlc->proto.id == IF_PROTO_PPP) { | ||
3155 | d->if_ptr = &hdlc->state.ppp.pppdev; | ||
3156 | } | ||
3157 | #endif | ||
3158 | |||
3159 | result = hdlc_open(dev); | 3153 | result = hdlc_open(dev); |
3160 | if (/* FIXME hdlc->proto.id == IF_PROTO_PPP*/ 0) { | 3154 | |
3161 | dev->priv = d; | 3155 | if (result) |
3162 | } | ||
3163 | if (result) { | ||
3164 | return result; | 3156 | return result; |
3165 | } | ||
3166 | 3157 | ||
3167 | sprintf(ifr.ifr_name, "%s", dev->name); | 3158 | sprintf(ifr.ifr_name, "%s", dev->name); |
3168 | result = cpc_opench(d); | 3159 | result = cpc_opench(d); |
@@ -3195,9 +3186,7 @@ static int cpc_close(struct net_device *dev) | |||
3195 | CPC_UNLOCK(card, flags); | 3186 | CPC_UNLOCK(card, flags); |
3196 | 3187 | ||
3197 | hdlc_close(dev); | 3188 | hdlc_close(dev); |
3198 | if (/* FIXME hdlc->proto.id == IF_PROTO_PPP*/ 0) { | 3189 | |
3199 | d->if_ptr = NULL; | ||
3200 | } | ||
3201 | #ifdef CONFIG_PC300_MLPPP | 3190 | #ifdef CONFIG_PC300_MLPPP |
3202 | if (chan->conf.proto == PC300_PROTO_MLPPP) { | 3191 | if (chan->conf.proto == PC300_PROTO_MLPPP) { |
3203 | cpc_tty_unregister_service(d); | 3192 | cpc_tty_unregister_service(d); |
@@ -3358,7 +3347,6 @@ static void cpc_init_card(pc300_t * card) | |||
3358 | chan->nfree_tx_bd = N_DMA_TX_BUF; | 3347 | chan->nfree_tx_bd = N_DMA_TX_BUF; |
3359 | 3348 | ||
3360 | d->chan = chan; | 3349 | d->chan = chan; |
3361 | d->tx_skb = NULL; | ||
3362 | d->trace_on = 0; | 3350 | d->trace_on = 0; |
3363 | d->line_on = 0; | 3351 | d->line_on = 0; |
3364 | d->line_off = 0; | 3352 | d->line_off = 0; |