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
f91642f9
Commit
f91642f9
authored
May 09, 2004
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TG3]: Correct RDMAC/WDMAC mode settings on 5705/5750.
parent
99a4c118
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
13 deletions
+27
-13
drivers/net/tg3.c
drivers/net/tg3.c
+25
-13
drivers/net/tg3.h
drivers/net/tg3.h
+2
-0
No files found.
drivers/net/tg3.c
View file @
f91642f9
...
@@ -4899,16 +4899,18 @@ static int tg3_reset_hw(struct tg3 *tp)
...
@@ -4899,16 +4899,18 @@ static int tg3_reset_hw(struct tg3 *tp)
RDMAC_MODE_LNGREAD_ENAB
);
RDMAC_MODE_LNGREAD_ENAB
);
if
(
tp
->
tg3_flags
&
TG3_FLAG_SPLIT_MODE
)
if
(
tp
->
tg3_flags
&
TG3_FLAG_SPLIT_MODE
)
rdmac_mode
|=
RDMAC_MODE_SPLIT_ENABLE
;
rdmac_mode
|=
RDMAC_MODE_SPLIT_ENABLE
;
if
(
GET_ASIC_REV
(
tp
->
pci_chip_rev_id
)
==
ASIC_REV_5705
)
{
if
((
GET_ASIC_REV
(
tp
->
pci_chip_rev_id
)
==
ASIC_REV_5705
&&
if
(
tp
->
pci_chip_rev_id
!=
CHIPREV_ID_5705_A0
)
{
tp
->
pci_chip_rev_id
!=
CHIPREV_ID_5705_A0
)
||
if
(
tp
->
tg3_flags2
&
TG3_FLG2_TSO_CAPABLE
)
{
(
GET_ASIC_REV
(
tp
->
pci_chip_rev_id
)
==
ASIC_REV_5750
))
{
if
(
tp
->
tg3_flags2
&
TG3_FLG2_TSO_CAPABLE
&&
(
tp
->
pci_chip_rev_id
==
CHIPREV_ID_5705_A1
||
tp
->
pci_chip_rev_id
==
CHIPREV_ID_5705_A2
))
{
rdmac_mode
|=
RDMAC_MODE_FIFO_SIZE_128
;
rdmac_mode
|=
RDMAC_MODE_FIFO_SIZE_128
;
}
else
if
(
!
(
tr32
(
TG3PCI_PCISTATE
)
&
PCISTATE_BUS_SPEED_HIGH
)
&&
}
else
if
(
!
(
tr32
(
TG3PCI_PCISTATE
)
&
PCISTATE_BUS_SPEED_HIGH
)
&&
!
(
tp
->
tg3_flags2
&
TG3_FLG2_IS_5788
))
{
!
(
tp
->
tg3_flags2
&
TG3_FLG2_IS_5788
))
{
rdmac_mode
|=
RDMAC_MODE_FIFO_LONG_BURST
;
rdmac_mode
|=
RDMAC_MODE_FIFO_LONG_BURST
;
}
}
}
}
}
/* Receive/send statistics. */
/* Receive/send statistics. */
if
((
rdmac_mode
&
RDMAC_MODE_FIFO_SIZE_128
)
&&
if
((
rdmac_mode
&
RDMAC_MODE_FIFO_SIZE_128
)
&&
...
@@ -5010,11 +5012,21 @@ static int tg3_reset_hw(struct tg3 *tp)
...
@@ -5010,11 +5012,21 @@ static int tg3_reset_hw(struct tg3 *tp)
WDMAC_MODE_ADDROFLOW_ENAB
|
WDMAC_MODE_FIFOOFLOW_ENAB
|
WDMAC_MODE_ADDROFLOW_ENAB
|
WDMAC_MODE_FIFOOFLOW_ENAB
|
WDMAC_MODE_FIFOURUN_ENAB
|
WDMAC_MODE_FIFOOREAD_ENAB
|
WDMAC_MODE_FIFOURUN_ENAB
|
WDMAC_MODE_FIFOOREAD_ENAB
|
WDMAC_MODE_LNGREAD_ENAB
);
WDMAC_MODE_LNGREAD_ENAB
);
/* XXX Need to handle 5750 and PCI Express cases here... -DaveM */
if
(
GET_ASIC_REV
(
tp
->
pci_chip_rev_id
)
==
ASIC_REV_5705
&&
if
((
GET_ASIC_REV
(
tp
->
pci_chip_rev_id
)
==
ASIC_REV_5705
&&
(
tr32
(
TG3PCI_PCISTATE
)
&
PCISTATE_BUS_SPEED_HIGH
)
!=
0
&&
tp
->
pci_chip_rev_id
!=
CHIPREV_ID_5705_A0
)
||
!
(
tp
->
tg3_flags2
&
TG3_FLG2_IS_5788
))
GET_ASIC_REV
(
tp
->
pci_chip_rev_id
)
==
ASIC_REV_5750
)
{
if
((
tp
->
tg3_flags
&
TG3_FLG2_TSO_CAPABLE
)
&&
(
tp
->
pci_chip_rev_id
==
CHIPREV_ID_5705_A1
||
tp
->
pci_chip_rev_id
==
CHIPREV_ID_5705_A2
))
{
/* nothing */
}
else
if
(
!
(
tr32
(
TG3PCI_PCISTATE
)
&
PCISTATE_BUS_SPEED_HIGH
)
&&
!
(
tp
->
tg3_flags2
&
TG3_FLG2_IS_5788
)
&&
!
(
tp
->
tg3_flags2
&
TG3_FLG2_PCI_EXPRESS
))
{
val
|=
WDMAC_MODE_RX_ACCEL
;
val
|=
WDMAC_MODE_RX_ACCEL
;
}
}
tw32_f
(
WDMAC_MODE
,
val
);
tw32_f
(
WDMAC_MODE
,
val
);
udelay
(
40
);
udelay
(
40
);
...
...
drivers/net/tg3.h
View file @
f91642f9
...
@@ -118,6 +118,8 @@
...
@@ -118,6 +118,8 @@
#define CHIPREV_ID_5704_A2 0x2002
#define CHIPREV_ID_5704_A2 0x2002
#define CHIPREV_ID_5705_A0 0x3000
#define CHIPREV_ID_5705_A0 0x3000
#define CHIPREV_ID_5705_A1 0x3001
#define CHIPREV_ID_5705_A1 0x3001
#define CHIPREV_ID_5705_A2 0x3002
#define CHIPREV_ID_5705_A3 0x3003
#define CHIPREV_ID_5750_A0 0x4000
#define CHIPREV_ID_5750_A0 0x4000
#define CHIPREV_ID_5750_A1 0x4001
#define CHIPREV_ID_5750_A1 0x4001
#define GET_ASIC_REV(CHIP_REV_ID) ((CHIP_REV_ID) >> 12)
#define GET_ASIC_REV(CHIP_REV_ID) ((CHIP_REV_ID) >> 12)
...
...
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