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
ea8f400c
Commit
ea8f400c
authored
Aug 11, 2005
by
Peer Chen
Committed by
Jeff Garzik
Aug 11, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[netdrvr tulip] Remove ULi-specific code from generic tulip driver
It has a separate driver now, 'uli526x'.
parent
4689ced9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
66 deletions
+13
-66
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
No files found.
drivers/net/tulip/media.c
View file @
ea8f400c
...
@@ -81,25 +81,6 @@ int tulip_mdio_read(struct net_device *dev, int phy_id, int location)
...
@@ -81,25 +81,6 @@ int tulip_mdio_read(struct net_device *dev, int phy_id, int location)
return
retval
&
0xffff
;
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. */
/* Establish sync by sending at least 32 logic ones. */
for
(
i
=
32
;
i
>=
0
;
i
--
)
{
for
(
i
=
32
;
i
>=
0
;
i
--
)
{
iowrite32
(
MDIO_ENB
|
MDIO_DATA_WRITE1
,
mdio_addr
);
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)
...
@@ -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
);
spin_unlock_irqrestore
(
&
tp
->
mii_lock
,
flags
);
return
;
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. */
/* Establish sync by sending 32 logic ones. */
for
(
i
=
32
;
i
>=
0
;
i
--
)
{
for
(
i
=
32
;
i
>=
0
;
i
--
)
{
...
...
drivers/net/tulip/timer.c
View file @
ea8f400c
...
@@ -39,7 +39,6 @@ void tulip_timer(unsigned long data)
...
@@ -39,7 +39,6 @@ void tulip_timer(unsigned long data)
case
MX98713
:
case
MX98713
:
case
COMPEX9881
:
case
COMPEX9881
:
case
DM910X
:
case
DM910X
:
case
ULI526X
:
default:
{
default:
{
struct
medialeaf
*
mleaf
;
struct
medialeaf
*
mleaf
;
unsigned
char
*
p
;
unsigned
char
*
p
;
...
...
drivers/net/tulip/tulip.h
View file @
ea8f400c
...
@@ -88,7 +88,6 @@ enum chips {
...
@@ -88,7 +88,6 @@ enum chips {
I21145
,
I21145
,
DM910X
,
DM910X
,
CONEXANT
,
CONEXANT
,
ULI526X
};
};
...
@@ -482,11 +481,8 @@ static inline void tulip_stop_rxtx(struct tulip_private *tp)
...
@@ -482,11 +481,8 @@ static inline void tulip_stop_rxtx(struct tulip_private *tp)
static
inline
void
tulip_restart_rxtx
(
struct
tulip_private
*
tp
)
static
inline
void
tulip_restart_rxtx
(
struct
tulip_private
*
tp
)
{
{
if
(
!
(
tp
->
chip_id
==
ULI526X
&&
tulip_stop_rxtx
(
tp
);
(
tp
->
revision
==
0x40
||
tp
->
revision
==
0x50
)))
{
udelay
(
5
);
tulip_stop_rxtx
(
tp
);
udelay
(
5
);
}
tulip_start_rxtx
(
tp
);
tulip_start_rxtx
(
tp
);
}
}
...
...
drivers/net/tulip/tulip_core.c
View file @
ea8f400c
...
@@ -199,9 +199,6 @@ struct tulip_chip_table tulip_tbl[] = {
...
@@ -199,9 +199,6 @@ struct tulip_chip_table tulip_tbl[] = {
{
"Conexant LANfinity"
,
256
,
0x0001ebef
,
{
"Conexant LANfinity"
,
256
,
0x0001ebef
,
HAS_MII
|
HAS_ACPI
,
tulip_timer
},
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[] = {
...
@@ -239,8 +236,6 @@ static struct pci_device_id tulip_pci_tbl[] = {
{
0x1737
,
0xAB09
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
COMET
},
{
0x1737
,
0xAB09
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
COMET
},
{
0x1737
,
0xAB08
,
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
},
{
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 */
{
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 */
{
0x14ea
,
0xab08
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
COMET
},
/* Planex FNW-3602-TX */
{
}
/* terminate list */
{
}
/* terminate list */
...
@@ -522,7 +517,7 @@ static void tulip_tx_timeout(struct net_device *dev)
...
@@ -522,7 +517,7 @@ static void tulip_tx_timeout(struct net_device *dev)
dev
->
name
);
dev
->
name
);
}
else
if
(
tp
->
chip_id
==
DC21140
||
tp
->
chip_id
==
DC21142
}
else
if
(
tp
->
chip_id
==
DC21140
||
tp
->
chip_id
==
DC21142
||
tp
->
chip_id
==
MX98713
||
tp
->
chip_id
==
COMPEX9881
||
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, "
printk
(
KERN_WARNING
"%s: 21140 transmit timed out, status %8.8x, "
"SIA %8.8x %8.8x %8.8x %8.8x, resetting...
\n
"
,
"SIA %8.8x %8.8x %8.8x %8.8x, resetting...
\n
"
,
dev
->
name
,
ioread32
(
ioaddr
+
CSR5
),
ioread32
(
ioaddr
+
CSR12
),
dev
->
name
,
ioread32
(
ioaddr
+
CSR5
),
ioread32
(
ioaddr
+
CSR12
),
...
@@ -1103,18 +1098,16 @@ static void set_rx_mode(struct net_device *dev)
...
@@ -1103,18 +1098,16 @@ static void set_rx_mode(struct net_device *dev)
entry
=
tp
->
cur_tx
++
%
TX_RING_SIZE
;
entry
=
tp
->
cur_tx
++
%
TX_RING_SIZE
;
if
(
entry
!=
0
)
{
if
(
entry
!=
0
)
{
/* Avoid a chip errata by prefixing a dummy entry. Don't do
/* Avoid a chip errata by prefixing a dummy entry. */
this on the ULI526X as it triggers a different problem */
tp
->
tx_buffers
[
entry
].
skb
=
NULL
;
if
(
!
(
tp
->
chip_id
==
ULI526X
&&
(
tp
->
revision
==
0x40
||
tp
->
revision
==
0x50
)))
{
tp
->
tx_buffers
[
entry
].
mapping
=
0
;
tp
->
tx_buffers
[
entry
].
skb
=
NULL
;
tp
->
tx_ring
[
entry
].
length
=
tp
->
tx_buffers
[
entry
].
mapping
=
0
;
(
entry
==
TX_RING_SIZE
-
1
)
?
cpu_to_le32
(
DESC_RING_WRAP
)
:
0
;
tp
->
tx_ring
[
entry
].
length
=
tp
->
tx_ring
[
entry
].
buffer1
=
0
;
(
entry
==
TX_RING_SIZE
-
1
)
?
cpu_to_le32
(
DESC_RING_WRAP
)
:
0
;
/* Must set DescOwned later to avoid race with chip */
tp
->
tx_ring
[
entry
].
buffer1
=
0
;
dummy
=
entry
;
/* Must set DescOwned later to avoid race with chip */
entry
=
tp
->
cur_tx
++
%
TX_RING_SIZE
;
dummy
=
entry
;
entry
=
tp
->
cur_tx
++
%
TX_RING_SIZE
;
}
}
}
tp
->
tx_buffers
[
entry
].
skb
=
NULL
;
tp
->
tx_buffers
[
entry
].
skb
=
NULL
;
...
@@ -1235,10 +1228,6 @@ static int tulip_uli_dm_quirk(struct pci_dev *pdev)
...
@@ -1235,10 +1228,6 @@ static int tulip_uli_dm_quirk(struct pci_dev *pdev)
{
{
if
(
pdev
->
vendor
==
0x1282
&&
pdev
->
device
==
0x9102
)
if
(
pdev
->
vendor
==
0x1282
&&
pdev
->
device
==
0x9102
)
return
1
;
return
1
;
if
(
pdev
->
vendor
==
0x10b9
&&
pdev
->
device
==
0x5261
)
return
1
;
if
(
pdev
->
vendor
==
0x10b9
&&
pdev
->
device
==
0x5263
)
return
1
;
return
0
;
return
0
;
}
}
...
@@ -1680,7 +1669,6 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
...
@@ -1680,7 +1669,6 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
switch
(
chip_idx
)
{
switch
(
chip_idx
)
{
case
DC21140
:
case
DC21140
:
case
DM910X
:
case
DM910X
:
case
ULI526X
:
default:
default:
if
(
tp
->
mtable
)
if
(
tp
->
mtable
)
iowrite32
(
tp
->
mtable
->
csr12dir
|
0x100
,
ioaddr
+
CSR12
);
iowrite32
(
tp
->
mtable
->
csr12dir
|
0x100
,
ioaddr
+
CSR12
);
...
...
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