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
d3045064
Commit
d3045064
authored
Jun 04, 2005
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of 'misc-fixes' branch from
rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
parents
8be3de3f
910313aa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
6 deletions
+28
-6
drivers/net/pcmcia/3c574_cs.c
drivers/net/pcmcia/3c574_cs.c
+3
-0
drivers/net/r8169.c
drivers/net/r8169.c
+25
-6
No files found.
drivers/net/pcmcia/3c574_cs.c
View file @
d3045064
...
...
@@ -1274,6 +1274,9 @@ static int el3_close(struct net_device *dev)
spin_lock_irqsave
(
&
lp
->
window_lock
,
flags
);
update_stats
(
dev
);
spin_unlock_irqrestore
(
&
lp
->
window_lock
,
flags
);
/* force interrupts off */
outw
(
SetIntrEnb
|
0x0000
,
ioaddr
+
EL3_CMD
);
}
link
->
open
--
;
...
...
drivers/net/r8169.c
View file @
d3045064
...
...
@@ -1585,8 +1585,8 @@ rtl8169_hw_start(struct net_device *dev)
RTL_W8
(
ChipCmd
,
CmdTxEnb
|
CmdRxEnb
);
RTL_W8
(
EarlyTxThres
,
EarlyTxThld
);
/*
For gigabit rtl8169, MTU + header + CRC + VLAN
*/
RTL_W16
(
RxMaxSize
,
tp
->
rx_buf_sz
);
/*
Low hurts. Let's disable the filtering.
*/
RTL_W16
(
RxMaxSize
,
16383
);
/* Set Rx Config register */
i
=
rtl8169_rx_config
|
...
...
@@ -2127,6 +2127,11 @@ rtl8169_tx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
}
}
static
inline
int
rtl8169_fragmented_frame
(
u32
status
)
{
return
(
status
&
(
FirstFrag
|
LastFrag
))
!=
(
FirstFrag
|
LastFrag
);
}
static
inline
void
rtl8169_rx_csum
(
struct
sk_buff
*
skb
,
struct
RxDesc
*
desc
)
{
u32
opts1
=
le32_to_cpu
(
desc
->
opts1
);
...
...
@@ -2177,27 +2182,41 @@ rtl8169_rx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
while
(
rx_left
>
0
)
{
unsigned
int
entry
=
cur_rx
%
NUM_RX_DESC
;
struct
RxDesc
*
desc
=
tp
->
RxDescArray
+
entry
;
u32
status
;
rmb
();
status
=
le32_to_cpu
(
tp
->
RxDescArray
[
entry
].
opts1
);
status
=
le32_to_cpu
(
desc
->
opts1
);
if
(
status
&
DescOwn
)
break
;
if
(
status
&
RxRES
)
{
printk
(
KERN_INFO
"%s: Rx ERROR!!!
\n
"
,
dev
->
name
);
printk
(
KERN_INFO
"%s: Rx ERROR. status = %08x
\n
"
,
dev
->
name
,
status
);
tp
->
stats
.
rx_errors
++
;
if
(
status
&
(
RxRWT
|
RxRUNT
))
tp
->
stats
.
rx_length_errors
++
;
if
(
status
&
RxCRC
)
tp
->
stats
.
rx_crc_errors
++
;
rtl8169_mark_to_asic
(
desc
,
tp
->
rx_buf_sz
);
}
else
{
struct
RxDesc
*
desc
=
tp
->
RxDescArray
+
entry
;
struct
sk_buff
*
skb
=
tp
->
Rx_skbuff
[
entry
];
int
pkt_size
=
(
status
&
0x00001FFF
)
-
4
;
void
(
*
pci_action
)(
struct
pci_dev
*
,
dma_addr_t
,
size_t
,
int
)
=
pci_dma_sync_single_for_device
;
/*
* The driver does not support incoming fragmented
* frames. They are seen as a symptom of over-mtu
* sized frames.
*/
if
(
unlikely
(
rtl8169_fragmented_frame
(
status
)))
{
tp
->
stats
.
rx_dropped
++
;
tp
->
stats
.
rx_length_errors
++
;
rtl8169_mark_to_asic
(
desc
,
tp
->
rx_buf_sz
);
goto
move_on
;
}
rtl8169_rx_csum
(
skb
,
desc
);
pci_dma_sync_single_for_cpu
(
tp
->
pci_dev
,
...
...
@@ -2224,7 +2243,7 @@ rtl8169_rx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
tp
->
stats
.
rx_bytes
+=
pkt_size
;
tp
->
stats
.
rx_packets
++
;
}
move_on:
cur_rx
++
;
rx_left
--
;
}
...
...
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