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
a6c9f7d1
Commit
a6c9f7d1
authored
May 26, 2003
by
Edward Peng
Committed by
Jeff Garzik
May 26, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[netdrvr sundance] fix flow control bug
parent
be9332c2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
drivers/net/sundance.c
drivers/net/sundance.c
+16
-7
No files found.
drivers/net/sundance.c
View file @
a6c9f7d1
...
@@ -84,11 +84,13 @@
...
@@ -84,11 +84,13 @@
- Fix bug of custom mac address
- Fix bug of custom mac address
(StationAddr register only accept word write)
(StationAddr register only accept word write)
Version LK1.09 (D-Link);
- Fix the flowctrl bug.
*/
*/
#define DRV_NAME "sundance"
#define DRV_NAME "sundance"
#define DRV_VERSION "1.01+LK1.0
8a
"
#define DRV_VERSION "1.01+LK1.0
9
"
#define DRV_RELDATE "
23-Apr
-2003"
#define DRV_RELDATE "
8-May
-2003"
/* The user-configurable values.
/* The user-configurable values.
...
@@ -671,8 +673,8 @@ static int __devinit sundance_probe1 (struct pci_dev *pdev,
...
@@ -671,8 +673,8 @@ static int __devinit sundance_probe1 (struct pci_dev *pdev,
np
->
an_enable
=
1
;
np
->
an_enable
=
1
;
}
}
}
}
if
(
flowctrl
==
0
)
if
(
flowctrl
==
1
)
np
->
flowctrl
=
0
;
np
->
flowctrl
=
1
;
}
}
/* Fibre PHY? */
/* Fibre PHY? */
...
@@ -935,7 +937,7 @@ static void check_duplex(struct net_device *dev)
...
@@ -935,7 +937,7 @@ static void check_duplex(struct net_device *dev)
printk
(
KERN_INFO
"%s: Setting %s-duplex based on MII #%d "
printk
(
KERN_INFO
"%s: Setting %s-duplex based on MII #%d "
"negotiated capability %4.4x.
\n
"
,
dev
->
name
,
"negotiated capability %4.4x.
\n
"
,
dev
->
name
,
duplex
?
"full"
:
"half"
,
np
->
phys
[
0
],
negotiated
);
duplex
?
"full"
:
"half"
,
np
->
phys
[
0
],
negotiated
);
writew
(
duplex
?
0x20
:
0
,
ioaddr
+
MACCtrl0
);
writew
(
readw
(
ioaddr
+
MACCtrl0
)
|
duplex
?
0x20
:
0
,
ioaddr
+
MACCtrl0
);
}
}
}
}
...
@@ -1455,10 +1457,13 @@ static void netdev_error(struct net_device *dev, int intr_status)
...
@@ -1455,10 +1457,13 @@ static void netdev_error(struct net_device *dev, int intr_status)
"full"
:
"half"
);
"full"
:
"half"
);
}
}
check_duplex
(
dev
);
check_duplex
(
dev
);
if
(
np
->
flowctrl
==
0
)
if
(
np
->
flowctrl
&&
np
->
mii_if
.
full_duplex
)
{
writew
(
readw
(
ioaddr
+
MACCtrl0
)
&
~
EnbFlowCtrl
,
writew
(
readw
(
ioaddr
+
MulticastFilter1
+
2
)
|
0x0200
,
ioaddr
+
MulticastFilter1
+
2
);
writew
(
readw
(
ioaddr
+
MACCtrl0
)
|
EnbFlowCtrl
,
ioaddr
+
MACCtrl0
);
ioaddr
+
MACCtrl0
);
}
}
}
if
(
intr_status
&
StatsMax
)
{
if
(
intr_status
&
StatsMax
)
{
get_stats
(
dev
);
get_stats
(
dev
);
}
}
...
@@ -1500,6 +1505,7 @@ static struct net_device_stats *get_stats(struct net_device *dev)
...
@@ -1500,6 +1505,7 @@ static struct net_device_stats *get_stats(struct net_device *dev)
static
void
set_rx_mode
(
struct
net_device
*
dev
)
static
void
set_rx_mode
(
struct
net_device
*
dev
)
{
{
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
struct
netdev_private
*
np
=
dev
->
priv
;
u16
mc_filter
[
4
];
/* Multicast hash filter */
u16
mc_filter
[
4
];
/* Multicast hash filter */
u32
rx_mode
;
u32
rx_mode
;
int
i
;
int
i
;
...
@@ -1532,6 +1538,9 @@ static void set_rx_mode(struct net_device *dev)
...
@@ -1532,6 +1538,9 @@ static void set_rx_mode(struct net_device *dev)
writeb
(
AcceptBroadcast
|
AcceptMyPhys
,
ioaddr
+
RxMode
);
writeb
(
AcceptBroadcast
|
AcceptMyPhys
,
ioaddr
+
RxMode
);
return
;
return
;
}
}
if
(
np
->
mii_if
.
full_duplex
&&
np
->
flowctrl
)
mc_filter
[
3
]
|=
0x0200
;
for
(
i
=
0
;
i
<
4
;
i
++
)
for
(
i
=
0
;
i
<
4
;
i
++
)
writew
(
mc_filter
[
i
],
ioaddr
+
MulticastFilter0
+
i
*
2
);
writew
(
mc_filter
[
i
],
ioaddr
+
MulticastFilter0
+
i
*
2
);
writeb
(
rx_mode
,
ioaddr
+
RxMode
);
writeb
(
rx_mode
,
ioaddr
+
RxMode
);
...
...
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