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
4667ba15
Commit
4667ba15
authored
Feb 18, 2009
by
Patrick McHardy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of /repos/git/net-2.6
parents
5955c7a2
92a0acce
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
20 deletions
+12
-20
drivers/net/forcedeth.c
drivers/net/forcedeth.c
+12
-1
include/linux/skbuff.h
include/linux/skbuff.h
+0
-9
include/net/sock.h
include/net/sock.h
+0
-1
net/core/skbuff.c
net/core/skbuff.c
+0
-8
net/core/sock.c
net/core/sock.c
+0
-1
No files found.
drivers/net/forcedeth.c
View file @
4667ba15
...
@@ -6011,9 +6011,20 @@ static void nv_shutdown(struct pci_dev *pdev)
...
@@ -6011,9 +6011,20 @@ static void nv_shutdown(struct pci_dev *pdev)
if
(
netif_running
(
dev
))
if
(
netif_running
(
dev
))
nv_close
(
dev
);
nv_close
(
dev
);
nv_restore_mac_addr
(
pdev
);
/*
* Restore the MAC so a kernel started by kexec won't get confused.
* If we really go for poweroff, we must not restore the MAC,
* otherwise the MAC for WOL will be reversed at least on some boards.
*/
if
(
system_state
!=
SYSTEM_POWER_OFF
)
{
nv_restore_mac_addr
(
pdev
);
}
pci_disable_device
(
pdev
);
pci_disable_device
(
pdev
);
/*
* Apparently it is not possible to reinitialise from D3 hot,
* only put the device into D3 if we really go for poweroff.
*/
if
(
system_state
==
SYSTEM_POWER_OFF
)
{
if
(
system_state
==
SYSTEM_POWER_OFF
)
{
if
(
pci_enable_wake
(
pdev
,
PCI_D3cold
,
np
->
wolenabled
))
if
(
pci_enable_wake
(
pdev
,
PCI_D3cold
,
np
->
wolenabled
))
pci_enable_wake
(
pdev
,
PCI_D3hot
,
np
->
wolenabled
);
pci_enable_wake
(
pdev
,
PCI_D3hot
,
np
->
wolenabled
);
...
...
include/linux/skbuff.h
View file @
4667ba15
...
@@ -416,15 +416,6 @@ extern void skb_over_panic(struct sk_buff *skb, int len,
...
@@ -416,15 +416,6 @@ extern void skb_over_panic(struct sk_buff *skb, int len,
void
*
here
);
void
*
here
);
extern
void
skb_under_panic
(
struct
sk_buff
*
skb
,
int
len
,
extern
void
skb_under_panic
(
struct
sk_buff
*
skb
,
int
len
,
void
*
here
);
void
*
here
);
extern
void
skb_truesize_bug
(
struct
sk_buff
*
skb
);
static
inline
void
skb_truesize_check
(
struct
sk_buff
*
skb
)
{
int
len
=
sizeof
(
struct
sk_buff
)
+
skb
->
len
;
if
(
unlikely
((
int
)
skb
->
truesize
<
len
))
skb_truesize_bug
(
skb
);
}
extern
int
skb_append_datato_frags
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
,
extern
int
skb_append_datato_frags
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
,
int
getfrag
(
void
*
from
,
char
*
to
,
int
offset
,
int
getfrag
(
void
*
from
,
char
*
to
,
int
offset
,
...
...
include/net/sock.h
View file @
4667ba15
...
@@ -860,7 +860,6 @@ static inline void sk_mem_uncharge(struct sock *sk, int size)
...
@@ -860,7 +860,6 @@ static inline void sk_mem_uncharge(struct sock *sk, int size)
static
inline
void
sk_wmem_free_skb
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
)
static
inline
void
sk_wmem_free_skb
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
)
{
{
skb_truesize_check
(
skb
);
sock_set_flag
(
sk
,
SOCK_QUEUE_SHRUNK
);
sock_set_flag
(
sk
,
SOCK_QUEUE_SHRUNK
);
sk
->
sk_wmem_queued
-=
skb
->
truesize
;
sk
->
sk_wmem_queued
-=
skb
->
truesize
;
sk_mem_uncharge
(
sk
,
skb
->
truesize
);
sk_mem_uncharge
(
sk
,
skb
->
truesize
);
...
...
net/core/skbuff.c
View file @
4667ba15
...
@@ -143,14 +143,6 @@ void skb_under_panic(struct sk_buff *skb, int sz, void *here)
...
@@ -143,14 +143,6 @@ void skb_under_panic(struct sk_buff *skb, int sz, void *here)
BUG
();
BUG
();
}
}
void
skb_truesize_bug
(
struct
sk_buff
*
skb
)
{
WARN
(
net_ratelimit
(),
KERN_ERR
"SKB BUG: Invalid truesize (%u) "
"len=%u, sizeof(sk_buff)=%Zd
\n
"
,
skb
->
truesize
,
skb
->
len
,
sizeof
(
struct
sk_buff
));
}
EXPORT_SYMBOL
(
skb_truesize_bug
);
/* Allocate a new skbuff. We do this ourselves so we can fill in a few
/* Allocate a new skbuff. We do this ourselves so we can fill in a few
* 'private' fields and also do memory statistics to find all the
* 'private' fields and also do memory statistics to find all the
* [BEEP] leaks.
* [BEEP] leaks.
...
...
net/core/sock.c
View file @
4667ba15
...
@@ -1137,7 +1137,6 @@ void sock_rfree(struct sk_buff *skb)
...
@@ -1137,7 +1137,6 @@ void sock_rfree(struct sk_buff *skb)
{
{
struct
sock
*
sk
=
skb
->
sk
;
struct
sock
*
sk
=
skb
->
sk
;
skb_truesize_check
(
skb
);
atomic_sub
(
skb
->
truesize
,
&
sk
->
sk_rmem_alloc
);
atomic_sub
(
skb
->
truesize
,
&
sk
->
sk_rmem_alloc
);
sk_mem_uncharge
(
skb
->
sk
,
skb
->
truesize
);
sk_mem_uncharge
(
skb
->
sk
,
skb
->
truesize
);
}
}
...
...
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