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
43d8a6fd
Commit
43d8a6fd
authored
May 07, 2003
by
Stephen Hemminger
Committed by
David S. Miller
May 07, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SYSKONNECT]: /proc module handling fixup.
parent
b4bfddcf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
32 deletions
+10
-32
drivers/net/sk98lin/skge.c
drivers/net/sk98lin/skge.c
+8
-18
drivers/net/sk98lin/skproc.c
drivers/net/sk98lin/skproc.c
+2
-14
No files found.
drivers/net/sk98lin/skge.c
View file @
43d8a6fd
...
@@ -348,12 +348,12 @@ static void PortReInitBmu(SK_AC*, int);
...
@@ -348,12 +348,12 @@ static void PortReInitBmu(SK_AC*, int);
static
int
SkGeIocMib
(
DEV_NET
*
,
unsigned
int
,
int
);
static
int
SkGeIocMib
(
DEV_NET
*
,
unsigned
int
,
int
);
/*Extern */
static
const
char
SK_Root_Dir_entry
[]
=
"sk98lin"
;
static
struct
proc_dir_entry
*
pSkRootDir
;
extern
struct
proc_dir_entry
*
pSkRootDir
;
//extern struct proc_dir_entry Our_Proc_Dir;
//extern struct proc_dir_entry Our_Proc_Dir;
extern
int
proc_read
(
char
*
buffer
,
char
**
buffer_location
,
extern
int
sk_
proc_read
(
char
*
buffer
,
char
**
buffer_location
,
off_t
offset
,
int
buffer_length
,
int
*
eof
,
void
*
data
);
off_t
offset
,
int
buffer_length
,
int
*
eof
,
void
*
data
);
...
@@ -376,17 +376,6 @@ static uintptr_t TxQueueAddr[SK_MAX_MACS][2] = {{0x680, 0x600},{0x780, 0x700}};
...
@@ -376,17 +376,6 @@ static uintptr_t TxQueueAddr[SK_MAX_MACS][2] = {{0x680, 0x600},{0x780, 0x700}};
static
uintptr_t
RxQueueAddr
[
SK_MAX_MACS
]
=
{
0x400
,
0x480
};
static
uintptr_t
RxQueueAddr
[
SK_MAX_MACS
]
=
{
0x400
,
0x480
};
void
proc_fill_inode
(
struct
inode
*
inode
,
int
fill
)
{
if
(
fill
)
MOD_INC_USE_COUNT
;
else
MOD_DEC_USE_COUNT
;
}
/*****************************************************************************
/*****************************************************************************
*
*
* skge_probe - find all SK-98xx adapters
* skge_probe - find all SK-98xx adapters
...
@@ -481,20 +470,20 @@ static int __init skge_probe (void)
...
@@ -481,20 +470,20 @@ static int __init skge_probe (void)
dev
->
change_mtu
=
&
SkGeChangeMtu
;
dev
->
change_mtu
=
&
SkGeChangeMtu
;
if
(
!
proc_root_initialized
)
{
if
(
!
proc_root_initialized
)
{
pSkRootDir
=
create_proc_entry
(
"sk98lin"
,
pSkRootDir
=
create_proc_entry
(
SK_Root_Dir_entry
,
S_IFDIR
|
S_IWUSR
|
S_IRUGO
|
S_IXUGO
,
proc_net
);
S_IFDIR
|
S_IWUSR
|
S_IRUGO
|
S_IXUGO
,
proc_net
);
pSkRootDir
->
owner
=
THIS_MODULE
;
pSkRootDir
->
owner
=
THIS_MODULE
;
proc_root_initialized
=
1
;
proc_root_initialized
=
1
;
}
}
pProcFile
=
create_proc_entry
(
dev
->
name
,
pProcFile
=
create_proc_entry
(
dev
->
name
,
S_IFREG
|
0444
,
pSkRootDir
);
S_IFREG
|
0444
,
pSkRootDir
);
pProcFile
->
read_proc
=
proc_read
;
pProcFile
->
read_proc
=
sk_
proc_read
;
pProcFile
->
write_proc
=
NULL
;
pProcFile
->
write_proc
=
NULL
;
pProcFile
->
nlink
=
1
;
pProcFile
->
nlink
=
1
;
pProcFile
->
size
=
sizeof
(
dev
->
name
+
1
);
pProcFile
->
size
=
sizeof
(
dev
->
name
+
1
);
pProcFile
->
data
=
(
void
*
)
pProcFile
;
pProcFile
->
data
=
(
void
*
)
pProcFile
;
pProcFile
->
owner
=
THIS_MODULE
;
/*
/*
* Dummy value.
* Dummy value.
...
@@ -571,11 +560,12 @@ static int __init skge_probe (void)
...
@@ -571,11 +560,12 @@ static int __init skge_probe (void)
pProcFile
=
create_proc_entry
(
dev
->
name
,
pProcFile
=
create_proc_entry
(
dev
->
name
,
S_IFREG
|
0444
,
pSkRootDir
);
S_IFREG
|
0444
,
pSkRootDir
);
pProcFile
->
read_proc
=
proc_read
;
pProcFile
->
read_proc
=
sk_
proc_read
;
pProcFile
->
write_proc
=
NULL
;
pProcFile
->
write_proc
=
NULL
;
pProcFile
->
nlink
=
1
;
pProcFile
->
nlink
=
1
;
pProcFile
->
size
=
sizeof
(
dev
->
name
+
1
);
pProcFile
->
size
=
sizeof
(
dev
->
name
+
1
);
pProcFile
->
data
=
(
void
*
)
pProcFile
;
pProcFile
->
data
=
(
void
*
)
pProcFile
;
pProcFile
->
owner
=
THIS_MODULE
;
memcpy
((
caddr_t
)
&
dev
->
dev_addr
,
memcpy
((
caddr_t
)
&
dev
->
dev_addr
,
(
caddr_t
)
&
pAC
->
Addr
.
Net
[
1
].
CurrentMacAddress
,
6
);
(
caddr_t
)
&
pAC
->
Addr
.
Net
[
1
].
CurrentMacAddress
,
6
);
...
...
drivers/net/sk98lin/skproc.c
View file @
43d8a6fd
...
@@ -54,7 +54,6 @@
...
@@ -54,7 +54,6 @@
//#define SPECIAL 32 /* 0x */
//#define SPECIAL 32 /* 0x */
#define LARGE 64
#define LARGE 64
extern
void
proc_fill_inode
(
struct
inode
*
inode
,
int
fill
);
extern
char
*
SkNumber
(
char
*
str
,
long
long
num
,
int
base
,
int
size
,
extern
char
*
SkNumber
(
char
*
str
,
long
long
num
,
int
base
,
int
size
,
int
precision
,
int
type
);
int
precision
,
int
type
);
int
proc_read
(
char
*
buffer
,
int
proc_read
(
char
*
buffer
,
...
@@ -64,19 +63,8 @@ int proc_read(char *buffer,
...
@@ -64,19 +63,8 @@ int proc_read(char *buffer,
int
*
eof
,
int
*
eof
,
void
*
data
);
void
*
data
);
static
const
char
SK_Root_Dir_entry
[]
=
"sk98lin"
;
extern
struct
net_device
*
sk98lin_root_dev
;
struct
proc_dir_entry
pSkRootDir
=
{
0
,
sizeof
(
SK_Root_Dir_entry
)
-
1
,
(
const
char
*
)
SK_Root_Dir_entry
,
S_IFDIR
|
S_IRUGO
,
2
,
0
,
0
,
0
,
NULL
,
NULL
};
extern
struct
net_device
*
sk98lin_root_dev
;
/*****************************************************************************
/*****************************************************************************
*
*
...
@@ -90,7 +78,7 @@ struct proc_dir_entry pSkRootDir = {
...
@@ -90,7 +78,7 @@ struct proc_dir_entry pSkRootDir = {
* Returns: buffer with statistic data
* Returns: buffer with statistic data
*
*
*/
*/
int
proc_read
(
char
*
buffer
,
int
sk_
proc_read
(
char
*
buffer
,
char
**
buffer_location
,
char
**
buffer_location
,
off_t
offset
,
off_t
offset
,
int
buffer_length
,
int
buffer_length
,
...
...
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