Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
80e47371
Commit
80e47371
authored
Jun 02, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: Kill PTI fddi driver, never completed and no plans to finish.
parent
73098660
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
2879 deletions
+0
-2879
drivers/net/ptifddi.c
drivers/net/ptifddi.c
+0
-259
drivers/net/ptifddi.h
drivers/net/ptifddi.h
+0
-77
drivers/net/ptifddi_asm.h
drivers/net/ptifddi_asm.h
+0
-2543
No files found.
drivers/net/ptifddi.c
deleted
100644 → 0
View file @
73098660
/* $Id: ptifddi.c,v 1.14 2001/04/14 01:12:04 davem Exp $
* ptifddi.c: Network driver for Performance Technologies single-attach
* and dual-attach FDDI sbus cards.
*
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
*/
static
char
*
version
=
"ptifddi.c:v1.0 10/Dec/96 David S. Miller (davem@caipfs.rutgers.edu)
\n
"
;
#include <linux/string.h>
#include <linux/init.h>
#include "ptifddi.h"
#include "ptifddi_asm.h"
#ifdef MODULE
static
struct
ptifddi
*
root_pti_dev
;
#endif
static
inline
void
pti_reset
(
struct
ptifddi
*
pp
)
{
pp
->
reset
=
1
;
}
static
inline
void
pti_unreset
(
struct
ptifddi
*
pp
)
{
pp
->
unreset
=
1
;
}
static
inline
void
pti_load_code_base
(
struct
dfddi_ram
*
rp
,
unsigned
short
addr
)
{
rp
->
loader_addr
=
((
addr
<<
8
)
&
0xff00
)
|
((
addr
>>
8
)
&
0x00ff
);
}
static
inline
void
pti_clear_dpram
(
struct
ptifddi
*
pp
)
{
memset
(
pp
->
dpram
,
0
,
DPRAM_SIZE
);
}
#define CARD_TEST_TIMEOUT 100000
static
inline
int
pti_card_test
(
struct
ptifddi
*
pp
)
{
struct
dfddi_ram
*
rp
=
pp
->
dpram
;
unsigned
char
*
code
=
&
rp
->
loader
;
unsigned
char
*
status
=
(
unsigned
char
*
)
rp
;
int
clicks
=
CARD_TEST_TIMEOUT
;
/* Clear it out. */
pti_clear_dpram
(
pp
);
/* Load test data. */
for
(
i
=
0
;
i
<
test_firmware_size
;
i
++
)
code
[
i
]
=
test_firmware
[
i
];
/* Tell card where to execute the code. */
pti_load_code_base
(
pp
,
test_firmware_dev_addr
);
/* Clear test run status in dpram. */
*
status
=
0
;
/* Reset single attach state machine before the test. */
rp
->
reset
=
1
;
/* Unreset, to get the test code running. */
pti_unreset
(
pp
);
/* Wait for dpram status to become 5, else fail if we time out. */
while
(
--
clicks
)
{
if
(
*
status
==
5
)
{
pti_reset
(
pp
);
return
0
;
}
udelay
(
20
);
}
return
1
;
}
static
inline
void
pti_init_firmware_loader
(
struct
ptifddi
*
pp
)
{
struct
dfddi_ram
*
rp
=
pp
->
dpram
;
int
i
;
for
(
i
=
0
;
i
<
firmware_loader_size
;
i
++
)
rp
->
loader
.
loader_firmware
[
i
]
=
firmware_loader
[
i
];
}
static
inline
void
pti_load_main_firmware
(
struct
ptifddi
*
pp
)
{
struct
dfddi_ram
*
rp
=
pp
->
dpram
;
struct
dpram_loader
*
lp
=
&
rp
.
loader
;
int
i
;
}
static
void
pti_init_rings
(
struct
ptifddi
*
pp
,
int
from_irq
)
{
}
static
int
pti_init
(
struct
ptifddi
*
pp
,
int
from_irq
)
{
}
static
void
pti_is_not_so_happy
(
struct
ptifddi
*
pp
)
{
}
static
inline
void
pti_tx
(
struct
ptifddi
*
pp
,
struct
net_device
*
dev
)
{
}
static
inline
void
myri_rx
(
struct
ptifddi
*
pp
,
struct
net_device
*
dev
)
{
}
static
void
pti_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
struct
net_device
*
dev
=
(
struct
net_device
*
)
dev_id
;
struct
ptifddi
*
pp
=
(
struct
ptifddi
*
)
dev
->
priv
;
}
static
int
pti_open
(
struct
net_device
*
dev
)
{
struct
ptifddi
*
pp
=
(
struct
ptifddi
*
)
dev
->
priv
;
return
pti_init
(
pp
,
in_interrupt
());
}
static
int
pti_close
(
struct
net_device
*
dev
)
{
struct
ptifddi
*
pp
=
(
struct
ptifddi
*
)
dev
->
priv
;
return
0
;
}
static
int
pti_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
struct
ptifddi
*
pp
=
(
struct
ptifddi
*
)
dev
->
priv
;
}
static
struct
net_device_stats
*
pti_get_stats
(
struct
net_device
*
dev
)
{
return
&
(((
struct
ptifddi
*
)
dev
->
priv
)
->
enet_stats
);
}
static
void
pti_set_multicast
(
struct
net_device
*
dev
)
{
}
static
inline
int
pti_fddi_init
(
struct
net_device
*
dev
,
struct
sbus_dev
*
sdev
,
int
num
)
{
static
unsigned
version_printed
;
struct
ptifddi
*
pp
;
int
i
;
dev
=
init_fddidev
(
0
,
sizeof
(
struct
ptifddi
));
if
(
version_printed
++
==
0
)
printk
(
version
);
/* Register 0 mapping contains DPRAM. */
pp
->
dpram
=
(
struct
dfddi_ram
*
)
sbus_ioremap
(
&
sdep
->
resource
[
0
],
0
,
sizeof
(
sturct
dfddi_ram
),
"PTI FDDI DPRAM"
);
if
(
!
pp
->
dpram
)
{
printk
(
"ptiFDDI: Cannot map DPRAM I/O area.
\n
"
);
return
-
ENODEV
;
}
/* Next, register 1 contains reset byte. */
pp
->
reset
=
(
unsigned
char
*
)
sbus_ioremap
(
&
sdep
->
resource
[
1
],
0
,
1
,
"PTI FDDI RESET Byte"
);
if
(
!
pp
->
reset
)
{
printk
(
"ptiFDDI: Cannot map RESET byte.
\n
"
);
return
-
ENODEV
;
}
/* Register 2 contains unreset byte. */
pp
->
unreset
=
(
unsigned
char
*
)
sbus_ioremap
(
&
sdep
->
resource
[
2
],
0
,
1
,
"PTI FDDI UNRESET Byte"
);
if
(
!
pp
->
unreset
)
{
printk
(
"ptiFDDI: Cannot map UNRESET byte.
\n
"
);
return
-
ENODEV
;
}
/* Reset the card. */
pti_reset
(
pp
);
/* Run boot-up card tests. */
i
=
pti_card_test
(
pp
);
if
(
i
)
{
printk
(
"ptiFDDI: Bootup card test fails.
\n
"
);
return
-
ENODEV
;
}
/* Clear DPRAM, start afresh. */
pti_clear_dpram
(
pp
);
/* Init the firmware loader. */
pti_init_firmware_loader
(
pp
);
/* Now load main card FDDI firmware, using the loader. */
pti_load_main_firmware
(
pp
);
}
int
__init
ptifddi_sbus_probe
(
struct
net_device
*
dev
)
{
struct
sbus_bus
*
bus
;
struct
sbus_dev
*
sdev
=
0
;
static
int
called
;
int
cards
=
0
,
v
;
if
(
called
)
return
-
ENODEV
;
called
++
;
for_each_sbus
(
bus
)
{
for_each_sbusdev
(
sdev
,
bus
)
{
if
(
cards
)
dev
=
NULL
;
if
(
!
strcmp
(
sdev
->
prom_name
,
"PTI,sbs600"
)
||
!
strcmp
(
sdev
->
prom_name
,
"DPV,fddid"
))
{
cards
++
;
DET
((
"Found PTI FDDI as %s
\n
"
,
sdev
->
prom_name
));
if
((
v
=
pti_fddi_init
(
dev
,
sdev
,
(
cards
-
1
))))
return
v
;
}
}
}
if
(
!
cards
)
return
-
ENODEV
;
return
0
;
}
#ifdef MODULE
int
init_module
(
void
)
{
root_pti_dev
=
NULL
;
return
ptifddi_sbus_probe
(
NULL
);
}
void
cleanup_module
(
void
)
{
struct
ptifddi
*
pp
;
while
(
root_pti_dev
)
{
pp
=
root_pti_dev
->
next_module
;
unregister_netdev
(
root_pti_dev
->
dev
);
kfree
(
root_pti_dev
->
dev
);
root_pti_dev
=
mp
;
}
}
#endif
/* MODULE */
drivers/net/ptifddi.h
deleted
100644 → 0
View file @
73098660
/* $Id: ptifddi.h,v 1.3 1999/08/20 00:31:08 davem Exp $
* ptifddi.c: Defines for Performance Technologies FDDI sbus cards.
*
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
*/
#ifndef _PTIFDDI_H
#define _PTIFDDI_H
struct
dpram_loader
{
volatile
unsigned
char
dpram_stat
;
volatile
unsigned
char
_unused
;
volatile
unsigned
char
addr_low
;
volatile
unsigned
char
addr_hi
;
volatile
unsigned
char
num_bytes
;
volatile
unsigned
char
data
[
0x3b
];
volatile
unsigned
char
loader_firmware
[
0xc0
];
};
struct
dfddi_ram
{
/*0x000*/
unsigned
char
_unused0
[
0x100
];
/*0x100*/
struct
dpram_loader
loader
;
/*0x200*/
unsigned
char
instructions
[
0x400
];
/*0x600*/
unsigned
char
msg_in
[
0x20
];
/*0x620*/
unsigned
char
msg_out
[
0x20
];
/*0x640*/
unsigned
char
_unused2
[
0x50
];
/*0x690*/
unsigned
char
smsg_in
[
0x20
];
/*0x6b0*/
unsigned
char
_unused3
[
0x30
];
/*0x6e0*/
unsigned
char
beacom_frame
[
0x20
];
/*0x700*/
unsigned
char
re_sync
;
/*0x701*/
unsigned
char
_unused4
;
/*0x702*/
unsigned
short
tswitch
;
/*0x704*/
unsigned
char
evq_lost
;
/*0x705*/
unsigned
char
_unused6
;
/*0x706*/
unsigned
char
signal_lost
;
/*0x707*/
unsigned
char
_unused7
;
/*0x708*/
unsigned
char
lerror
;
/*0x709*/
unsigned
char
_unused8
;
/*0x70a*/
unsigned
char
rstate
;
/*0x70b*/
unsigned
char
_unused9
[
0x13
];
/*0x716*/
unsigned
short
dswitch
;
/*0x718*/
unsigned
char
_unused10
[
0x48
];
/*0x750*/
unsigned
char
cbusy
;
/*0x751*/
unsigned
char
hbusy
;
/*0x752*/
unsigned
short
istat
;
/*0x754*/
unsigned
char
_unused11
[];
/*0x756*/
unsigned
char
disable
;
/*0x757*/
unsigned
char
_unused12
[];
/*0x78e*/
unsigned
char
ucvalid
;
/*0x78f*/
unsigned
char
_unused13
;
/*0x790*/
unsigned
int
u0addr
;
/*0x794*/
unsigned
char
_unused14
[];
/*0x7a8*/
unsigned
int
P_player
;
/*0x7ac*/
unsigned
int
Q_player
;
/*0x7b0*/
unsigned
int
macsi
;
/*0x7b4*/
unsigned
char
_unused15
[];
/*0x7be*/
unsigned
short
reset
;
/*0x7c0*/
unsigned
char
_unused16
[];
/*0x7fc*/
unsigned
short
iack
;
/*0x7fe*/
unsigned
short
loader_addr
;
};
#define DPRAM_SIZE 0x800
#define DPRAM_STAT_VALID 0x80
#define DPRAM_STAT_EMPTY 0x00
struct
ptifddi
{
struct
dfddi_ram
*
dpram
;
unsigned
char
*
reset
;
unsigned
char
*
unreset
;
struct
net_device
*
dev
;
struct
ptifddi
*
next_module
;
};
#endif
/* !(_PTIFDDI_H) */
drivers/net/ptifddi_asm.h
deleted
100644 → 0
View file @
73098660
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment