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
3543aab5
Commit
3543aab5
authored
Feb 01, 2003
by
David S. Miller
Committed by
David S. Miller
Feb 01, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TG3]: Workaround 5701 back-to-back register write bug.
parent
dcdd79dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
drivers/net/tg3.c
drivers/net/tg3.c
+10
-0
drivers/net/tg3.h
drivers/net/tg3.h
+1
-0
No files found.
drivers/net/tg3.c
View file @
3543aab5
...
...
@@ -169,6 +169,8 @@ static void tg3_write_indirect_reg32(struct tg3 *tp, u32 off, u32 val)
spin_unlock_irqrestore
(
&
tp
->
indirect_lock
,
flags
);
}
else
{
writel
(
val
,
tp
->
regs
+
off
);
if
((
tp
->
tg3_flags
&
TG3_FLAG_5701_REG_WRITE_BUG
)
!=
0
)
readl
(
tp
->
regs
+
off
);
}
}
...
...
@@ -5993,6 +5995,14 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
pci_write_config_word
(
tp
->
pdev
,
PCI_COMMAND
,
pci_cmd
);
}
}
/* Back to back register writes can cause problems on this chip,
* the workaround is to read back all reg writes except those to
* mailbox regs. See tg3_write_indirect_reg32().
*/
if
(
GET_ASIC_REV
(
tp
->
pci_chip_rev_id
)
==
ASIC_REV_5701
)
tp
->
tg3_flags
|=
TG3_FLAG_5701_REG_WRITE_BUG
;
if
((
pci_state_reg
&
PCISTATE_BUS_SPEED_HIGH
)
!=
0
)
tp
->
tg3_flags
|=
TG3_FLAG_PCI_HIGH_SPEED
;
if
((
pci_state_reg
&
PCISTATE_BUS_32BIT
)
!=
0
)
...
...
drivers/net/tg3.h
View file @
3543aab5
...
...
@@ -1795,6 +1795,7 @@ struct tg3 {
#define TG3_FLAG_USE_LINKCHG_REG 0x00000008
#define TG3_FLAG_USE_MI_INTERRUPT 0x00000010
#define TG3_FLAG_ENABLE_ASF 0x00000020
#define TG3_FLAG_5701_REG_WRITE_BUG 0x00000040
#define TG3_FLAG_POLL_SERDES 0x00000080
#define TG3_FLAG_MBOX_WRITE_REORDER 0x00000100
#define TG3_FLAG_PCIX_TARGET_HWBUG 0x00000200
...
...
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