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
3bbc6512
Commit
3bbc6512
authored
May 16, 2002
by
Roger Luethi
Committed by
Jeff Garzik
May 16, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cosmetic cleanups, remove unused struct members from via-rhine net driver
parent
29d1408f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
drivers/net/via-rhine.c
drivers/net/via-rhine.c
+14
-10
No files found.
drivers/net/via-rhine.c
View file @
3bbc6512
...
@@ -93,6 +93,8 @@
...
@@ -93,6 +93,8 @@
- transmit frame queue message is off by one - fixed
- transmit frame queue message is off by one - fixed
- adds IntrNormalSummary to "Something Wicked" exclusion list
- adds IntrNormalSummary to "Something Wicked" exclusion list
so normal interrupts will not trigger the message (src: Donald Becker)
so normal interrupts will not trigger the message (src: Donald Becker)
(Roger Lahti)
- cosmetic cleanups, remove 3 unused members of struct netdev_private
*/
*/
...
@@ -386,6 +388,11 @@ enum register_offsets {
...
@@ -386,6 +388,11 @@ enum register_offsets {
StickyHW
=
0x83
,
WOLcrClr
=
0xA4
,
WOLcgClr
=
0xA7
,
PwrcsrClr
=
0xAC
,
StickyHW
=
0x83
,
WOLcrClr
=
0xA4
,
WOLcgClr
=
0xA7
,
PwrcsrClr
=
0xAC
,
};
};
/* Bits in ConfigD (select backoff algorithm (Ethernet capture effect)) */
enum
backoff_bits
{
BackOpt
=
0x01
,
BackAMD
=
0x02
,
BackDEC
=
0x04
,
BackRandom
=
0x08
};
#ifdef USE_MEM
#ifdef USE_MEM
/* Registers we check that mmio and reg are the same. */
/* Registers we check that mmio and reg are the same. */
int
mmio_verify_registers
[]
=
{
int
mmio_verify_registers
[]
=
{
...
@@ -434,11 +441,11 @@ struct tx_desc {
...
@@ -434,11 +441,11 @@ struct tx_desc {
u32
next_desc
;
u32
next_desc
;
};
};
/* Bits in *_desc.status */
enum
rx_status_bits
{
enum
rx_status_bits
{
RxOK
=
0x8000
,
RxWholePkt
=
0x0300
,
RxErr
=
0x008F
RxOK
=
0x8000
,
RxWholePkt
=
0x0300
,
RxErr
=
0x008F
};
};
/* Bits in *_desc.status */
enum
desc_status_bits
{
enum
desc_status_bits
{
DescOwn
=
0x80000000
,
DescEndPacket
=
0x4000
,
DescIntr
=
0x1000
,
DescOwn
=
0x80000000
,
DescEndPacket
=
0x4000
,
DescIntr
=
0x1000
,
};
};
...
@@ -486,13 +493,10 @@ struct netdev_private {
...
@@ -486,13 +493,10 @@ struct netdev_private {
u16
chip_cmd
;
/* Current setting for ChipCmd */
u16
chip_cmd
;
/* Current setting for ChipCmd */
/* These values are keep track of the transceiver/media in use. */
/* These values are keep track of the transceiver/media in use. */
unsigned
int
full_duplex
:
1
;
/* Full-duplex operation requested. */
unsigned
int
duplex_lock
:
1
;
unsigned
int
default_port
:
4
;
/* Last dev->if_port value. */
unsigned
int
default_port
:
4
;
/* Last dev->if_port value. */
u8
tx_thresh
,
rx_thresh
;
u8
tx_thresh
,
rx_thresh
;
/* MII transceiver section. */
/* MII transceiver section. */
u16
advertising
;
/* NWay media advertisement */
unsigned
char
phys
[
MAX_MII_CNT
];
/* MII device addresses. */
unsigned
char
phys
[
MAX_MII_CNT
];
/* MII device addresses. */
unsigned
int
mii_cnt
;
/* number of MIIs found, but only the first one is used */
unsigned
int
mii_cnt
;
/* number of MIIs found, but only the first one is used */
u16
mii_status
;
/* last read MII status */
u16
mii_status
;
/* last read MII status */
...
@@ -792,7 +796,7 @@ static int __devinit via_rhine_init_one (struct pci_dev *pdev,
...
@@ -792,7 +796,7 @@ static int __devinit via_rhine_init_one (struct pci_dev *pdev,
(
option
&
0x300
?
100
:
10
),
(
option
&
0x300
?
100
:
10
),
(
option
&
0x220
?
"full"
:
"half"
));
(
option
&
0x220
?
"full"
:
"half"
));
if
(
np
->
mii_cnt
)
if
(
np
->
mii_cnt
)
mdio_write
(
dev
,
np
->
phys
[
0
],
0
,
mdio_write
(
dev
,
np
->
phys
[
0
],
MII_BMCR
,
((
option
&
0x300
)
?
0x2000
:
0
)
|
/* 100mbps? */
((
option
&
0x300
)
?
0x2000
:
0
)
|
/* 100mbps? */
((
option
&
0x220
)
?
0x0100
:
0
));
/* Full duplex? */
((
option
&
0x220
)
?
0x0100
:
0
));
/* Full duplex? */
}
}
...
@@ -976,9 +980,9 @@ static void init_registers(struct net_device *dev)
...
@@ -976,9 +980,9 @@ static void init_registers(struct net_device *dev)
writeb
(
dev
->
dev_addr
[
i
],
ioaddr
+
StationAddr
+
i
);
writeb
(
dev
->
dev_addr
[
i
],
ioaddr
+
StationAddr
+
i
);
/* Initialize other registers. */
/* Initialize other registers. */
writew
(
0x0006
,
ioaddr
+
PCIBusConfig
);
/*
Tune configuration???
*/
writew
(
0x0006
,
ioaddr
+
PCIBusConfig
);
/*
Store & forward
*/
/* Configure
the
FIFO thresholds. */
/* Configure
initial
FIFO thresholds. */
writeb
(
0x20
,
ioaddr
+
TxConfig
);
/* Initial threshold 32 bytes */
writeb
(
0x20
,
ioaddr
+
TxConfig
);
np
->
tx_thresh
=
0x20
;
np
->
tx_thresh
=
0x20
;
np
->
rx_thresh
=
0x60
;
/* Written in via_rhine_set_rx_mode(). */
np
->
rx_thresh
=
0x60
;
/* Written in via_rhine_set_rx_mode(). */
...
@@ -1037,13 +1041,13 @@ static void mdio_write(struct net_device *dev, int phy_id, int regnum, int value
...
@@ -1037,13 +1041,13 @@ static void mdio_write(struct net_device *dev, int phy_id, int regnum, int value
if
(
phy_id
==
np
->
phys
[
0
])
{
if
(
phy_id
==
np
->
phys
[
0
])
{
switch
(
regnum
)
{
switch
(
regnum
)
{
case
0
:
/* Is user forcing speed/duplex? */
case
MII_BMCR
:
/* Is user forcing speed/duplex? */
if
(
value
&
0x9000
)
/* Autonegotiation. */
if
(
value
&
0x9000
)
/* Autonegotiation. */
np
->
mii_if
.
duplex_lock
=
0
;
np
->
mii_if
.
duplex_lock
=
0
;
else
else
np
->
mii_if
.
full_duplex
=
(
value
&
0x0100
)
?
1
:
0
;
np
->
mii_if
.
full_duplex
=
(
value
&
0x0100
)
?
1
:
0
;
break
;
break
;
case
4
:
case
MII_ADVERTISE
:
np
->
mii_if
.
advertising
=
value
;
np
->
mii_if
.
advertising
=
value
;
break
;
break
;
}
}
...
...
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