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
a19d03a3
Commit
a19d03a3
authored
Mar 20, 2002
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge 2.4.x Sun GEM/HME net driver fixes.
parent
71c54597
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
306 additions
and
75 deletions
+306
-75
drivers/net/sungem.c
drivers/net/sungem.c
+287
-73
drivers/net/sungem.h
drivers/net/sungem.h
+5
-0
drivers/net/sunhme.c
drivers/net/sunhme.c
+14
-2
No files found.
drivers/net/sungem.c
View file @
a19d03a3
This diff is collapsed.
Click to expand it.
drivers/net/sungem.h
View file @
a19d03a3
...
...
@@ -94,6 +94,8 @@
#define GREG_SWRST_TXRST 0x00000001
/* TX Software Reset */
#define GREG_SWRST_RXRST 0x00000002
/* RX Software Reset */
#define GREG_SWRST_RSTOUT 0x00000004
/* Force RST# pin active */
#define GREG_SWRST_CACHESIZE 0x00ff0000
/* RIO only: cache line size */
#define GREG_SWRST_CACHE_SHIFT 16
/* TX DMA Registers */
#define TXDMA_KICK 0x2000UL
/* TX Kick Register */
...
...
@@ -986,6 +988,9 @@ struct gem {
int
mii_phy_addr
;
int
gigabit_capable
;
u32
mac_rx_cfg
;
u32
swrst_base
;
/* Autoneg & PHY control */
int
link_cntl
;
int
link_advertise
;
...
...
drivers/net/sunhme.c
View file @
a19d03a3
...
...
@@ -34,6 +34,7 @@ static char version[] =
#include <linux/ethtool.h>
#include <linux/mii.h>
#include <linux/crc32.h>
#include <linux/random.h>
#include <asm/system.h>
#include <asm/bitops.h>
#include <asm/io.h>
...
...
@@ -2929,8 +2930,10 @@ static void get_hme_mac_nonsparc(struct pci_dev *pdev, unsigned char *dev_addr)
if
(
is_quattro_p
(
pdev
))
index
=
PCI_SLOT
(
pdev
->
devfn
);
if
(
pdev
->
resource
[
PCI_ROM_RESOURCE
].
parent
==
NULL
)
pci_assign_resource
(
pdev
,
PCI_ROM_RESOURCE
);
if
(
pdev
->
resource
[
PCI_ROM_RESOURCE
].
parent
==
NULL
)
{
if
(
pci_assign_resource
(
pdev
,
PCI_ROM_RESOURCE
)
<
0
)
goto
use_random
;
}
pci_read_config_dword
(
pdev
,
pdev
->
rom_base_reg
,
&
rom_reg_orig
);
pci_write_config_dword
(
pdev
,
pdev
->
rom_base_reg
,
...
...
@@ -2944,6 +2947,15 @@ static void get_hme_mac_nonsparc(struct pci_dev *pdev, unsigned char *dev_addr)
iounmap
(
p
);
pci_write_config_dword
(
pdev
,
pdev
->
rom_base_reg
,
rom_reg_orig
);
return
;
use_random:
/* Sun MAC prefix then 3 random bytes. */
dev_addr
[
0
]
=
0x08
;
dev_addr
[
1
]
=
0x00
;
dev_addr
[
2
]
=
0x20
;
get_random_bytes
(
dev_addr
,
3
);
return
;
}
#endif
/* !(__sparc__) */
...
...
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