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
1703ecc7
Commit
1703ecc7
authored
19 years ago
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Plain Diff
/spare/repo/netdev-2.6 branch 'uli-tulip'
parents
bf4e70e5
945a7876
No related merge requests found
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1775 additions
and
66 deletions
+1775
-66
drivers/net/tulip/Kconfig
drivers/net/tulip/Kconfig
+12
-0
drivers/net/tulip/Makefile
drivers/net/tulip/Makefile
+1
-0
drivers/net/tulip/media.c
drivers/net/tulip/media.c
+0
-36
drivers/net/tulip/timer.c
drivers/net/tulip/timer.c
+0
-1
drivers/net/tulip/tulip.h
drivers/net/tulip/tulip.h
+2
-6
drivers/net/tulip/tulip_core.c
drivers/net/tulip/tulip_core.c
+11
-23
drivers/net/tulip/uli526x.c
drivers/net/tulip/uli526x.c
+1749
-0
No files found.
drivers/net/tulip/Kconfig
View file @
1703ecc7
...
...
@@ -135,6 +135,18 @@ config DM9102
<file:Documentation/networking/net-modules.txt>. The module will
be called dmfe.
config ULI526X
tristate "ULi M526x controller support"
depends on NET_TULIP && PCI
select CRC32
---help---
This driver is for ULi M5261/M5263 10/100M Ethernet Controller
(<http://www.uli.com.tw/>).
To compile this driver as a module, choose M here and read
<file:Documentation/networking/net-modules.txt>. The module will
be called uli526x.
config PCMCIA_XIRCOM
tristate "Xircom CardBus support (new driver)"
depends on NET_TULIP && CARDBUS
...
...
This diff is collapsed.
Click to expand it.
drivers/net/tulip/Makefile
View file @
1703ecc7
...
...
@@ -9,6 +9,7 @@ obj-$(CONFIG_WINBOND_840) += winbond-840.o
obj-$(CONFIG_DE2104X)
+=
de2104x.o
obj-$(CONFIG_TULIP)
+=
tulip.o
obj-$(CONFIG_DE4X5)
+=
de4x5.o
obj-$(CONFIG_ULI526X)
+=
uli526x.o
# Declare multi-part drivers.
...
...
This diff is collapsed.
Click to expand it.
drivers/net/tulip/media.c
View file @
1703ecc7
...
...
@@ -81,25 +81,6 @@ int tulip_mdio_read(struct net_device *dev, int phy_id, int location)
return
retval
&
0xffff
;
}
if
(
tp
->
chip_id
==
ULI526X
&&
tp
->
revision
>=
0x40
)
{
int
value
;
int
i
=
1000
;
value
=
ioread32
(
ioaddr
+
CSR9
);
iowrite32
(
value
&
0xFFEFFFFF
,
ioaddr
+
CSR9
);
value
=
(
phy_id
<<
21
)
|
(
location
<<
16
)
|
0x08000000
;
iowrite32
(
value
,
ioaddr
+
CSR10
);
while
(
--
i
>
0
)
{
mdio_delay
();
if
(
ioread32
(
ioaddr
+
CSR10
)
&
0x10000000
)
break
;
}
retval
=
ioread32
(
ioaddr
+
CSR10
);
spin_unlock_irqrestore
(
&
tp
->
mii_lock
,
flags
);
return
retval
&
0xFFFF
;
}
/* Establish sync by sending at least 32 logic ones. */
for
(
i
=
32
;
i
>=
0
;
i
--
)
{
iowrite32
(
MDIO_ENB
|
MDIO_DATA_WRITE1
,
mdio_addr
);
...
...
@@ -159,23 +140,6 @@ void tulip_mdio_write(struct net_device *dev, int phy_id, int location, int val)
spin_unlock_irqrestore
(
&
tp
->
mii_lock
,
flags
);
return
;
}
if
(
tp
->
chip_id
==
ULI526X
&&
tp
->
revision
>=
0x40
)
{
int
value
;
int
i
=
1000
;
value
=
ioread32
(
ioaddr
+
CSR9
);
iowrite32
(
value
&
0xFFEFFFFF
,
ioaddr
+
CSR9
);
value
=
(
phy_id
<<
21
)
|
(
location
<<
16
)
|
0x04000000
|
(
val
&
0xFFFF
);
iowrite32
(
value
,
ioaddr
+
CSR10
);
while
(
--
i
>
0
)
{
if
(
ioread32
(
ioaddr
+
CSR10
)
&
0x10000000
)
break
;
}
spin_unlock_irqrestore
(
&
tp
->
mii_lock
,
flags
);
return
;
}
/* Establish sync by sending 32 logic ones. */
for
(
i
=
32
;
i
>=
0
;
i
--
)
{
...
...
This diff is collapsed.
Click to expand it.
drivers/net/tulip/timer.c
View file @
1703ecc7
...
...
@@ -39,7 +39,6 @@ void tulip_timer(unsigned long data)
case
MX98713
:
case
COMPEX9881
:
case
DM910X
:
case
ULI526X
:
default:
{
struct
medialeaf
*
mleaf
;
unsigned
char
*
p
;
...
...
This diff is collapsed.
Click to expand it.
drivers/net/tulip/tulip.h
View file @
1703ecc7
...
...
@@ -88,7 +88,6 @@ enum chips {
I21145
,
DM910X
,
CONEXANT
,
ULI526X
};
...
...
@@ -482,11 +481,8 @@ static inline void tulip_stop_rxtx(struct tulip_private *tp)
static
inline
void
tulip_restart_rxtx
(
struct
tulip_private
*
tp
)
{
if
(
!
(
tp
->
chip_id
==
ULI526X
&&
(
tp
->
revision
==
0x40
||
tp
->
revision
==
0x50
)))
{
tulip_stop_rxtx
(
tp
);
udelay
(
5
);
}
tulip_stop_rxtx
(
tp
);
udelay
(
5
);
tulip_start_rxtx
(
tp
);
}
...
...
This diff is collapsed.
Click to expand it.
drivers/net/tulip/tulip_core.c
View file @
1703ecc7
...
...
@@ -199,9 +199,6 @@ struct tulip_chip_table tulip_tbl[] = {
{
"Conexant LANfinity"
,
256
,
0x0001ebef
,
HAS_MII
|
HAS_ACPI
,
tulip_timer
},
/* ULi526X */
{
"ULi M5261/M5263"
,
128
,
0x0001ebef
,
HAS_MII
|
HAS_MEDIA_TABLE
|
CSR12_IN_SROM
|
HAS_ACPI
,
tulip_timer
},
};
...
...
@@ -239,8 +236,6 @@ static struct pci_device_id tulip_pci_tbl[] = {
{
0x1737
,
0xAB09
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
COMET
},
{
0x1737
,
0xAB08
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
COMET
},
{
0x17B3
,
0xAB08
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
COMET
},
{
0x10b9
,
0x5261
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
ULI526X
},
/* ALi 1563 integrated ethernet */
{
0x10b9
,
0x5263
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
ULI526X
},
/* ALi 1563 integrated ethernet */
{
0x10b7
,
0x9300
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
COMET
},
/* 3Com 3CSOHO100B-TX */
{
0x14ea
,
0xab08
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
COMET
},
/* Planex FNW-3602-TX */
{
}
/* terminate list */
...
...
@@ -522,7 +517,7 @@ static void tulip_tx_timeout(struct net_device *dev)
dev
->
name
);
}
else
if
(
tp
->
chip_id
==
DC21140
||
tp
->
chip_id
==
DC21142
||
tp
->
chip_id
==
MX98713
||
tp
->
chip_id
==
COMPEX9881
||
tp
->
chip_id
==
DM910X
||
tp
->
chip_id
==
ULI526X
)
{
||
tp
->
chip_id
==
DM910X
)
{
printk
(
KERN_WARNING
"%s: 21140 transmit timed out, status %8.8x, "
"SIA %8.8x %8.8x %8.8x %8.8x, resetting...
\n
"
,
dev
->
name
,
ioread32
(
ioaddr
+
CSR5
),
ioread32
(
ioaddr
+
CSR12
),
...
...
@@ -1103,18 +1098,16 @@ static void set_rx_mode(struct net_device *dev)
entry
=
tp
->
cur_tx
++
%
TX_RING_SIZE
;
if
(
entry
!=
0
)
{
/* Avoid a chip errata by prefixing a dummy entry. Don't do
this on the ULI526X as it triggers a different problem */
if
(
!
(
tp
->
chip_id
==
ULI526X
&&
(
tp
->
revision
==
0x40
||
tp
->
revision
==
0x50
)))
{
tp
->
tx_buffers
[
entry
].
skb
=
NULL
;
tp
->
tx_buffers
[
entry
].
mapping
=
0
;
tp
->
tx_ring
[
entry
].
length
=
(
entry
==
TX_RING_SIZE
-
1
)
?
cpu_to_le32
(
DESC_RING_WRAP
)
:
0
;
tp
->
tx_ring
[
entry
].
buffer1
=
0
;
/* Must set DescOwned later to avoid race with chip */
dummy
=
entry
;
entry
=
tp
->
cur_tx
++
%
TX_RING_SIZE
;
}
/* Avoid a chip errata by prefixing a dummy entry. */
tp
->
tx_buffers
[
entry
].
skb
=
NULL
;
tp
->
tx_buffers
[
entry
].
mapping
=
0
;
tp
->
tx_ring
[
entry
].
length
=
(
entry
==
TX_RING_SIZE
-
1
)
?
cpu_to_le32
(
DESC_RING_WRAP
)
:
0
;
tp
->
tx_ring
[
entry
].
buffer1
=
0
;
/* Must set DescOwned later to avoid race with chip */
dummy
=
entry
;
entry
=
tp
->
cur_tx
++
%
TX_RING_SIZE
;
}
tp
->
tx_buffers
[
entry
].
skb
=
NULL
;
...
...
@@ -1235,10 +1228,6 @@ static int tulip_uli_dm_quirk(struct pci_dev *pdev)
{
if
(
pdev
->
vendor
==
0x1282
&&
pdev
->
device
==
0x9102
)
return
1
;
if
(
pdev
->
vendor
==
0x10b9
&&
pdev
->
device
==
0x5261
)
return
1
;
if
(
pdev
->
vendor
==
0x10b9
&&
pdev
->
device
==
0x5263
)
return
1
;
return
0
;
}
...
...
@@ -1680,7 +1669,6 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
switch
(
chip_idx
)
{
case
DC21140
:
case
DM910X
:
case
ULI526X
:
default:
if
(
tp
->
mtable
)
iowrite32
(
tp
->
mtable
->
csr12dir
|
0x100
,
ioaddr
+
CSR12
);
...
...
This diff is collapsed.
Click to expand it.
drivers/net/tulip/uli526x.c
0 → 100644
View file @
1703ecc7
This diff is collapsed.
Click to expand it.
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