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
a121ae85
Commit
a121ae85
authored
Jun 30, 2004
by
Don Fry
Committed by
Stephen Hemminger
Jun 30, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] pcnet32: change to use module_param
Change the pcnet32 driver to use module_param and module_param_array.
parent
dc9d5e9b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
15 deletions
+18
-15
drivers/net/pcnet32.c
drivers/net/pcnet32.c
+18
-15
No files found.
drivers/net/pcnet32.c
View file @
a121ae85
...
@@ -22,8 +22,8 @@
...
@@ -22,8 +22,8 @@
*************************************************************************/
*************************************************************************/
#define DRV_NAME "pcnet32"
#define DRV_NAME "pcnet32"
#define DRV_VERSION "1.30
h
"
#define DRV_VERSION "1.30
i
"
#define DRV_RELDATE "06.2
4
.2004"
#define DRV_RELDATE "06.2
8
.2004"
#define PFX DRV_NAME ": "
#define PFX DRV_NAME ": "
static
const
char
*
version
=
static
const
char
*
version
=
...
@@ -46,6 +46,7 @@ DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " tsbogend@alpha.franken.de\n";
...
@@ -46,6 +46,7 @@ DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " tsbogend@alpha.franken.de\n";
#include <linux/etherdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/skbuff.h>
#include <linux/spinlock.h>
#include <linux/spinlock.h>
#include <linux/moduleparam.h>
#include <asm/bitops.h>
#include <asm/bitops.h>
#include <asm/dma.h>
#include <asm/dma.h>
...
@@ -254,6 +255,7 @@ static int homepna[MAX_UNITS];
...
@@ -254,6 +255,7 @@ static int homepna[MAX_UNITS];
* v1.30g 22 Jun 2004 Patrick Simmons <psimmons@flash.net> added option
* v1.30g 22 Jun 2004 Patrick Simmons <psimmons@flash.net> added option
* homepna for selecting HomePNA mode for PCNet/Home 79C978.
* homepna for selecting HomePNA mode for PCNet/Home 79C978.
* v1.30h 24 Jun 2004 Don Fry correctly select auto, speed, duplex in bcr32.
* v1.30h 24 Jun 2004 Don Fry correctly select auto, speed, duplex in bcr32.
* v1.30i 28 Jun 2004 Don Fry change to use module_param.
*/
*/
...
@@ -2258,22 +2260,28 @@ static struct pci_driver pcnet32_driver = {
...
@@ -2258,22 +2260,28 @@ static struct pci_driver pcnet32_driver = {
.
id_table
=
pcnet32_pci_tbl
,
.
id_table
=
pcnet32_pci_tbl
,
};
};
MODULE_PARM
(
debug
,
"i"
);
/* An additional parameter that may be passed in... */
static
int
debug
=
-
1
;
static
int
tx_start_pt
=
-
1
;
static
int
pcnet32_have_pci
;
static
int
num_params
;
module_param
(
debug
,
int
,
0
);
MODULE_PARM_DESC
(
debug
,
DRV_NAME
" debug level"
);
MODULE_PARM_DESC
(
debug
,
DRV_NAME
" debug level"
);
MODULE_PARM
(
max_interrupt_work
,
"i"
);
module_param
(
max_interrupt_work
,
int
,
0
);
MODULE_PARM_DESC
(
max_interrupt_work
,
DRV_NAME
" maximum events handled per interrupt"
);
MODULE_PARM_DESC
(
max_interrupt_work
,
DRV_NAME
" maximum events handled per interrupt"
);
MODULE_PARM
(
rx_copybreak
,
"i"
);
module_param
(
rx_copybreak
,
int
,
0
);
MODULE_PARM_DESC
(
rx_copybreak
,
DRV_NAME
" copy breakpoint for copy-only-tiny-frames"
);
MODULE_PARM_DESC
(
rx_copybreak
,
DRV_NAME
" copy breakpoint for copy-only-tiny-frames"
);
MODULE_PARM
(
tx_start_pt
,
"i"
);
module_param
(
tx_start_pt
,
int
,
0
);
MODULE_PARM_DESC
(
tx_start_pt
,
DRV_NAME
" transmit start point (0-3)"
);
MODULE_PARM_DESC
(
tx_start_pt
,
DRV_NAME
" transmit start point (0-3)"
);
MODULE_PARM
(
pcnet32vlb
,
"i"
);
module_param
(
pcnet32vlb
,
int
,
0
);
MODULE_PARM_DESC
(
pcnet32vlb
,
DRV_NAME
" Vesa local bus (VLB) support (0/1)"
);
MODULE_PARM_DESC
(
pcnet32vlb
,
DRV_NAME
" Vesa local bus (VLB) support (0/1)"
);
MODULE_PARM
(
options
,
"1-"
__MODULE_STRING
(
MAX_UNITS
)
"i"
);
module_param_array
(
options
,
int
,
num_params
,
0
);
MODULE_PARM_DESC
(
options
,
DRV_NAME
" initial option setting(s) (0-15)"
);
MODULE_PARM_DESC
(
options
,
DRV_NAME
" initial option setting(s) (0-15)"
);
MODULE_PARM
(
full_duplex
,
"1-"
__MODULE_STRING
(
MAX_UNITS
)
"i"
);
module_param_array
(
full_duplex
,
int
,
num_params
,
0
);
MODULE_PARM_DESC
(
full_duplex
,
DRV_NAME
" full duplex setting(s) (1)"
);
MODULE_PARM_DESC
(
full_duplex
,
DRV_NAME
" full duplex setting(s) (1)"
);
/* Module Parameter for HomePNA cards added by Patrick Simmons, 2004 */
/* Module Parameter for HomePNA cards added by Patrick Simmons, 2004 */
MODULE_PARM
(
homepna
,
"1-"
__MODULE_STRING
(
MAX_UNITS
)
"i"
);
module_param_array
(
homepna
,
int
,
num_params
,
0
);
MODULE_PARM_DESC
(
homepna
,
DRV_NAME
" mode for 79C978 cards (1 for HomePNA, 0 for Ethernet, default Ethernet"
);
MODULE_PARM_DESC
(
homepna
,
DRV_NAME
" mode for 79C978 cards (1 for HomePNA, 0 for Ethernet, default Ethernet"
);
MODULE_AUTHOR
(
"Thomas Bogendoerfer"
);
MODULE_AUTHOR
(
"Thomas Bogendoerfer"
);
...
@@ -2282,11 +2290,6 @@ MODULE_LICENSE("GPL");
...
@@ -2282,11 +2290,6 @@ MODULE_LICENSE("GPL");
#define PCNET32_MSG_DEFAULT (NETIF_MSG_DRV | NETIF_MSG_PROBE | NETIF_MSG_LINK)
#define PCNET32_MSG_DEFAULT (NETIF_MSG_DRV | NETIF_MSG_PROBE | NETIF_MSG_LINK)
/* An additional parameter that may be passed in... */
static
int
debug
=
-
1
;
static
int
tx_start_pt
=
-
1
;
static
int
pcnet32_have_pci
;
static
int
__init
pcnet32_init_module
(
void
)
static
int
__init
pcnet32_init_module
(
void
)
{
{
printk
(
KERN_INFO
"%s"
,
version
);
printk
(
KERN_INFO
"%s"
,
version
);
...
...
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