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
c8bfe3a1
Commit
c8bfe3a1
authored
May 24, 2004
by
Andrew Morton
Committed by
Linus Torvalds
May 24, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] H8/300 ne driver module fix
From: Yoshinori Sato <ysato@users.sourceforge.jp> - module support fix
parent
04e9b59f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
15 deletions
+24
-15
drivers/net/8390.h
drivers/net/8390.h
+1
-1
drivers/net/Kconfig
drivers/net/Kconfig
+1
-1
drivers/net/ne-h8300.c
drivers/net/ne-h8300.c
+22
-13
No files found.
drivers/net/8390.h
View file @
c8bfe3a1
...
@@ -143,7 +143,7 @@ struct ei_device {
...
@@ -143,7 +143,7 @@ struct ei_device {
#define inb_p(_p) inb(_p)
#define inb_p(_p) inb(_p)
#define outb_p(_v,_p) outb(_v,_p)
#define outb_p(_v,_p) outb(_v,_p)
#elif defined(CONFIG_NET_CBUS) || defined(CONFIG_NE_H8300)
#elif defined(CONFIG_NET_CBUS) || defined(CONFIG_NE_H8300)
|| defined(CONFIG_NE_H8300_MODULE)
#define EI_SHIFT(x) (ei_local->reg_offset[x])
#define EI_SHIFT(x) (ei_local->reg_offset[x])
#else
#else
#define EI_SHIFT(x) (x)
#define EI_SHIFT(x) (x)
...
...
drivers/net/Kconfig
View file @
c8bfe3a1
...
@@ -1829,7 +1829,7 @@ config FEC
...
@@ -1829,7 +1829,7 @@ config FEC
controller on the Motorola ColdFire 5272 processor.
controller on the Motorola ColdFire 5272 processor.
config NE_H8300
config NE_H8300
bool
"NE2000 compatible support for H8/300"
tristate
"NE2000 compatible support for H8/300"
depends on H8300 && NET_ETHERNET
depends on H8300 && NET_ETHERNET
help
help
Say Y here if you want to use the NE2000 compatible
Say Y here if you want to use the NE2000 compatible
...
...
drivers/net/ne-h8300.c
View file @
c8bfe3a1
...
@@ -260,8 +260,8 @@ static int __init ne_probe1(struct net_device *dev, int ioaddr)
...
@@ -260,8 +260,8 @@ static int __init ne_probe1(struct net_device *dev, int ioaddr)
bus_width
&=
1
<<
((
ioaddr
>>
21
)
&
7
);
bus_width
&=
1
<<
((
ioaddr
>>
21
)
&
7
);
ei_status
.
word16
=
(
bus_width
==
0
);
/* temporary setting */
ei_status
.
word16
=
(
bus_width
==
0
);
/* temporary setting */
for
(
i
=
0
;
i
<
16
/*sizeof(SA_prom)*/
;
i
++
)
{
for
(
i
=
0
;
i
<
16
/*sizeof(SA_prom)*/
;
i
++
)
{
SA_prom
[
i
]
=
inb
(
ioaddr
+
NE_DATAPORT
);
SA_prom
[
i
]
=
inb
_p
(
ioaddr
+
NE_DATAPORT
);
inb
(
ioaddr
+
NE_DATAPORT
);
/* dummy read */
inb
_p
(
ioaddr
+
NE_DATAPORT
);
/* dummy read */
}
}
start_page
=
NESM_START_PG
;
start_page
=
NESM_START_PG
;
...
@@ -590,7 +590,7 @@ static void ne_block_output(struct net_device *dev, int count,
...
@@ -590,7 +590,7 @@ static void ne_block_output(struct net_device *dev, int count,
#ifdef MODULE
#ifdef MODULE
#define MAX_NE_CARDS
4
/* Max number of NE cards per module */
#define MAX_NE_CARDS
1
/* Max number of NE cards per module */
static
struct
net_device
*
dev_ne
[
MAX_NE_CARDS
];
static
struct
net_device
*
dev_ne
[
MAX_NE_CARDS
];
static
int
io
[
MAX_NE_CARDS
];
static
int
io
[
MAX_NE_CARDS
];
static
int
irq
[
MAX_NE_CARDS
];
static
int
irq
[
MAX_NE_CARDS
];
...
@@ -599,7 +599,7 @@ static int bad[MAX_NE_CARDS]; /* 0xbad = bad sig or no reset ack */
...
@@ -599,7 +599,7 @@ static int bad[MAX_NE_CARDS]; /* 0xbad = bad sig or no reset ack */
MODULE_PARM
(
io
,
"1-"
__MODULE_STRING
(
MAX_NE_CARDS
)
"i"
);
MODULE_PARM
(
io
,
"1-"
__MODULE_STRING
(
MAX_NE_CARDS
)
"i"
);
MODULE_PARM
(
irq
,
"1-"
__MODULE_STRING
(
MAX_NE_CARDS
)
"i"
);
MODULE_PARM
(
irq
,
"1-"
__MODULE_STRING
(
MAX_NE_CARDS
)
"i"
);
MODULE_PARM
(
bad
,
"1-"
__MODULE_STRING
(
MAX_NE_CARDS
)
"i"
);
MODULE_PARM
(
bad
,
"1-"
__MODULE_STRING
(
MAX_NE_CARDS
)
"i"
);
MODULE_PARM_DESC
(
io
,
"I/O base address(es)
,required
"
);
MODULE_PARM_DESC
(
io
,
"I/O base address(es)"
);
MODULE_PARM_DESC
(
irq
,
"IRQ number(s)"
);
MODULE_PARM_DESC
(
irq
,
"IRQ number(s)"
);
MODULE_DESCRIPTION
(
"H8/300 NE2000 Ethernet driver"
);
MODULE_DESCRIPTION
(
"H8/300 NE2000 Ethernet driver"
);
MODULE_LICENSE
(
"GPL"
);
MODULE_LICENSE
(
"GPL"
);
...
@@ -612,14 +612,22 @@ ISA device autoprobes on a running machine are not recommended anyway. */
...
@@ -612,14 +612,22 @@ ISA device autoprobes on a running machine are not recommended anyway. */
int
init_module
(
void
)
int
init_module
(
void
)
{
{
int
this_dev
,
found
=
0
;
int
this_dev
,
found
=
0
;
int
err
;
for
(
this_dev
=
0
;
this_dev
<
MAX_NE_CARDS
;
this_dev
++
)
{
for
(
this_dev
=
0
;
this_dev
<
MAX_NE_CARDS
;
this_dev
++
)
{
struct
net_device
*
dev
=
alloc_ei_netdev
();
struct
net_device
*
dev
=
alloc_ei_netdev
();
if
(
!
dev
)
if
(
!
dev
)
break
;
break
;
if
(
io
[
this_dev
])
{
dev
->
irq
=
irq
[
this_dev
];
dev
->
irq
=
irq
[
this_dev
];
dev
->
mem_end
=
bad
[
this_dev
];
dev
->
mem_end
=
bad
[
this_dev
];
dev
->
base_addr
=
io
[
this_dev
];
dev
->
base_addr
=
io
[
this_dev
];
}
else
{
dev
->
base_addr
=
h8300_ne_base
[
this_dev
];
dev
->
irq
=
h8300_ne_irq
[
this_dev
];
}
err
=
init_reg_offset
(
dev
,
dev
->
base_addr
);
if
(
!
err
)
{
if
(
do_ne_probe
(
dev
)
==
0
)
{
if
(
do_ne_probe
(
dev
)
==
0
)
{
if
(
register_netdev
(
dev
)
==
0
)
{
if
(
register_netdev
(
dev
)
==
0
)
{
dev_ne
[
found
++
]
=
dev
;
dev_ne
[
found
++
]
=
dev
;
...
@@ -627,11 +635,12 @@ int init_module(void)
...
@@ -627,11 +635,12 @@ int init_module(void)
}
}
cleanup_card
(
dev
);
cleanup_card
(
dev
);
}
}
}
free_netdev
(
dev
);
free_netdev
(
dev
);
if
(
found
)
if
(
found
)
break
;
break
;
if
(
io
[
this_dev
]
!=
0
)
if
(
io
[
this_dev
]
!=
0
)
printk
(
KERN_WARNING
"ne.c: No NE*000 card found at i/o = %#x
\n
"
,
io
[
this_dev
]
);
printk
(
KERN_WARNING
"ne.c: No NE*000 card found at i/o = %#x
\n
"
,
dev
->
base_addr
);
else
else
printk
(
KERN_NOTICE
"ne.c: You must supply
\"
io=0xNNN
\"
value(s) for ISA cards.
\n
"
);
printk
(
KERN_NOTICE
"ne.c: You must supply
\"
io=0xNNN
\"
value(s) for ISA cards.
\n
"
);
return
-
ENXIO
;
return
-
ENXIO
;
...
...
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