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
215a574e
Commit
215a574e
authored
Nov 08, 2003
by
Pekka Pietikäinen
Committed by
Ralf Bächle
Nov 08, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[netdrvr b44] Fix irq enable/disable; fix oops due to lack of SET_NETDEV_DEV() call
Also, add suspend/resume functions.
parent
95450709
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
2 deletions
+54
-2
drivers/net/b44.c
drivers/net/b44.c
+54
-2
No files found.
drivers/net/b44.c
View file @
215a574e
...
...
@@ -25,8 +25,8 @@
#define DRV_MODULE_NAME "b44"
#define PFX DRV_MODULE_NAME ": "
#define DRV_MODULE_VERSION "0.9
1
"
#define DRV_MODULE_RELDATE "
Oct 3
, 2003"
#define DRV_MODULE_VERSION "0.9
2
"
#define DRV_MODULE_RELDATE "
Nov 4
, 2003"
#define B44_DEF_MSG_ENABLE \
(NETIF_MSG_DRV | \
...
...
@@ -942,6 +942,8 @@ static int b44_change_mtu(struct net_device *dev, int new_mtu)
b44_init_hw
(
bp
);
spin_unlock_irq
(
&
bp
->
lock
);
b44_enable_ints
(
bp
);
return
0
;
}
...
...
@@ -1558,6 +1560,8 @@ static int b44_ethtool_ioctl (struct net_device *dev, void *useraddr)
netif_wake_queue
(
bp
->
dev
);
spin_unlock_irq
(
&
bp
->
lock
);
b44_enable_ints
(
bp
);
return
0
;
}
case
ETHTOOL_GPAUSEPARAM
:
{
...
...
@@ -1601,6 +1605,8 @@ static int b44_ethtool_ioctl (struct net_device *dev, void *useraddr)
}
spin_unlock_irq
(
&
bp
->
lock
);
b44_enable_ints
(
bp
);
return
0
;
}
};
...
...
@@ -1752,6 +1758,7 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
}
SET_MODULE_OWNER
(
dev
);
SET_NETDEV_DEV
(
dev
,
&
pdev
->
dev
);
/* No interesting netdevice features in this card... */
dev
->
features
|=
0
;
...
...
@@ -1852,11 +1859,56 @@ static void __devexit b44_remove_one(struct pci_dev *pdev)
}
}
static
int
b44_suspend
(
struct
pci_dev
*
pdev
,
u32
state
)
{
struct
net_device
*
dev
=
pci_get_drvdata
(
pdev
);
struct
b44
*
bp
=
dev
->
priv
;
if
(
!
netif_running
(
dev
))
return
0
;
del_timer_sync
(
&
bp
->
timer
);
spin_lock_irq
(
&
bp
->
lock
);
b44_halt
(
bp
);
netif_carrier_off
(
bp
->
dev
);
netif_device_detach
(
bp
->
dev
);
b44_free_rings
(
bp
);
spin_unlock_irq
(
&
bp
->
lock
);
return
0
;
}
static
int
b44_resume
(
struct
pci_dev
*
pdev
)
{
struct
net_device
*
dev
=
pci_get_drvdata
(
pdev
);
struct
b44
*
bp
=
dev
->
priv
;
if
(
!
netif_running
(
dev
))
return
0
;
spin_lock_irq
(
&
bp
->
lock
);
b44_init_rings
(
bp
);
b44_init_hw
(
bp
);
netif_device_attach
(
bp
->
dev
);
spin_unlock_irq
(
&
bp
->
lock
);
bp
->
timer
.
expires
=
jiffies
+
HZ
;
add_timer
(
&
bp
->
timer
);
b44_enable_ints
(
bp
);
return
0
;
}
static
struct
pci_driver
b44_driver
=
{
.
name
=
DRV_MODULE_NAME
,
.
id_table
=
b44_pci_tbl
,
.
probe
=
b44_init_one
,
.
remove
=
__devexit_p
(
b44_remove_one
),
.
suspend
=
b44_suspend
,
.
resume
=
b44_resume
,
};
static
int
__init
b44_init
(
void
)
...
...
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