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
Kirill Smelkov
linux
Commits
fd628a5c
Commit
fd628a5c
authored
Sep 28, 2003
by
Geert Uytterhoeven
Committed by
Linus Torvalds
Sep 28, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Macintosh 8390 Ethernet update
Mac8390: Update for netdevice/8390 core changes in 2.5.8
parent
e754ffbc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
15 deletions
+16
-15
drivers/net/mac8390.c
drivers/net/mac8390.c
+16
-15
No files found.
drivers/net/mac8390.c
View file @
fd628a5c
...
@@ -442,14 +442,14 @@ int __init mac8390_initdev(struct net_device * dev, struct nubus_dev * ndev,
...
@@ -442,14 +442,14 @@ int __init mac8390_initdev(struct net_device * dev, struct nubus_dev * ndev,
ei_status
.
tx_start_page
=
CABLETRON_TX_START_PG
;
ei_status
.
tx_start_page
=
CABLETRON_TX_START_PG
;
ei_status
.
rx_start_page
=
CABLETRON_RX_START_PG
;
ei_status
.
rx_start_page
=
CABLETRON_RX_START_PG
;
ei_status
.
stop_page
=
CABLETRON_RX_STOP_PG
;
ei_status
.
stop_page
=
CABLETRON_RX_STOP_PG
;
dev
->
rmem_start
=
dev
->
mem_start
;
ei_status
.
rmem_start
=
dev
->
mem_start
;
dev
->
rmem_end
=
dev
->
mem_start
+
CABLETRON_RX_STOP_PG
*
256
;
ei_status
.
rmem_end
=
dev
->
mem_start
+
CABLETRON_RX_STOP_PG
*
256
;
}
else
{
}
else
{
ei_status
.
tx_start_page
=
WD_START_PG
;
ei_status
.
tx_start_page
=
WD_START_PG
;
ei_status
.
rx_start_page
=
WD_START_PG
+
TX_PAGES
;
ei_status
.
rx_start_page
=
WD_START_PG
+
TX_PAGES
;
ei_status
.
stop_page
=
(
dev
->
mem_end
-
dev
->
mem_start
)
/
256
;
ei_status
.
stop_page
=
(
dev
->
mem_end
-
dev
->
mem_start
)
/
256
;
dev
->
rmem_start
=
dev
->
mem_start
+
TX_PAGES
*
256
;
ei_status
.
rmem_start
=
dev
->
mem_start
+
TX_PAGES
*
256
;
dev
->
rmem_end
=
dev
->
mem_end
;
ei_status
.
rmem_end
=
dev
->
mem_end
;
}
}
/* Fill in model-specific information and functions */
/* Fill in model-specific information and functions */
...
@@ -621,12 +621,12 @@ static void sane_block_input(struct net_device *dev, int count,
...
@@ -621,12 +621,12 @@ static void sane_block_input(struct net_device *dev, int count,
unsigned
long
xfer_base
=
ring_offset
-
(
WD_START_PG
<<
8
);
unsigned
long
xfer_base
=
ring_offset
-
(
WD_START_PG
<<
8
);
unsigned
long
xfer_start
=
xfer_base
+
dev
->
mem_start
;
unsigned
long
xfer_start
=
xfer_base
+
dev
->
mem_start
;
if
(
xfer_start
+
count
>
dev
->
rmem_end
)
{
if
(
xfer_start
+
count
>
ei_status
.
rmem_end
)
{
/* We must wrap the input move. */
/* We must wrap the input move. */
int
semi_count
=
dev
->
rmem_end
-
xfer_start
;
int
semi_count
=
ei_status
.
rmem_end
-
xfer_start
;
memcpy_fromio
(
skb
->
data
,
(
char
*
)
dev
->
mem_start
+
xfer_base
,
semi_count
);
memcpy_fromio
(
skb
->
data
,
(
char
*
)
dev
->
mem_start
+
xfer_base
,
semi_count
);
count
-=
semi_count
;
count
-=
semi_count
;
memcpy_toio
(
skb
->
data
+
semi_count
,
(
char
*
)
dev
->
rmem_start
,
count
);
memcpy_toio
(
skb
->
data
+
semi_count
,
(
char
*
)
ei_status
.
rmem_start
,
count
);
}
else
{
}
else
{
memcpy_fromio
(
skb
->
data
,
(
char
*
)
dev
->
mem_start
+
xfer_base
,
count
);
memcpy_fromio
(
skb
->
data
,
(
char
*
)
dev
->
mem_start
+
xfer_base
,
count
);
}
}
...
@@ -657,15 +657,16 @@ static void dayna_block_input(struct net_device *dev, int count, struct sk_buff
...
@@ -657,15 +657,16 @@ static void dayna_block_input(struct net_device *dev, int count, struct sk_buff
/* Note the offset math is done in card memory space which is word
/* Note the offset math is done in card memory space which is word
per long onto our space. */
per long onto our space. */
if
(
xfer_start
+
count
>
dev
->
rmem_end
)
if
(
xfer_start
+
count
>
ei_status
.
rmem_end
)
{
{
/* We must wrap the input move. */
/* We must wrap the input move. */
int
semi_count
=
dev
->
rmem_end
-
xfer_start
;
int
semi_count
=
ei_status
.
rmem_end
-
xfer_start
;
dayna_memcpy_fromcard
(
dev
,
skb
->
data
,
xfer_base
,
semi_count
);
dayna_memcpy_fromcard
(
dev
,
skb
->
data
,
xfer_base
,
semi_count
);
count
-=
semi_count
;
count
-=
semi_count
;
dayna_memcpy_fromcard
(
dev
,
skb
->
data
+
semi_count
,
dayna_memcpy_fromcard
(
dev
,
skb
->
data
+
semi_count
,
dev
->
rmem_start
-
dev
->
mem_start
,
count
);
ei_status
.
rmem_start
-
dev
->
mem_start
,
count
);
}
}
else
else
{
{
...
@@ -697,15 +698,15 @@ static void slow_sane_block_input(struct net_device *dev, int count, struct sk_b
...
@@ -697,15 +698,15 @@ static void slow_sane_block_input(struct net_device *dev, int count, struct sk_b
unsigned
long
xfer_base
=
ring_offset
-
(
WD_START_PG
<<
8
);
unsigned
long
xfer_base
=
ring_offset
-
(
WD_START_PG
<<
8
);
unsigned
long
xfer_start
=
xfer_base
+
dev
->
mem_start
;
unsigned
long
xfer_start
=
xfer_base
+
dev
->
mem_start
;
if
(
xfer_start
+
count
>
dev
->
rmem_end
)
if
(
xfer_start
+
count
>
ei_status
.
rmem_end
)
{
{
/* We must wrap the input move. */
/* We must wrap the input move. */
int
semi_count
=
dev
->
rmem_end
-
xfer_start
;
int
semi_count
=
ei_status
.
rmem_end
-
xfer_start
;
word_memcpy_fromcard
(
skb
->
data
,
(
char
*
)
dev
->
mem_start
+
word_memcpy_fromcard
(
skb
->
data
,
(
char
*
)
dev
->
mem_start
+
xfer_base
,
semi_count
);
xfer_base
,
semi_count
);
count
-=
semi_count
;
count
-=
semi_count
;
word_memcpy_fromcard
(
skb
->
data
+
semi_count
,
word_memcpy_fromcard
(
skb
->
data
+
semi_count
,
(
char
*
)
dev
->
rmem_start
,
count
);
(
char
*
)
ei_status
.
rmem_start
,
count
);
}
}
else
else
{
{
...
...
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