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
757ea6b3
Commit
757ea6b3
authored
Apr 18, 2002
by
François Romieu
Committed by
Linus Torvalds
Apr 18, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] 2.4.8 - dscc4 update 6/13
- code removal; - turn old cruft into definitely modern cruft.
parent
d55a1d35
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
drivers/net/wan/dscc4.c
drivers/net/wan/dscc4.c
+8
-12
No files found.
drivers/net/wan/dscc4.c
View file @
757ea6b3
...
@@ -921,7 +921,6 @@ static int dscc4_open(struct net_device *dev)
...
@@ -921,7 +921,6 @@ static int dscc4_open(struct net_device *dev)
struct
dscc4_dev_priv
*
dpriv
=
dscc4_priv
(
dev
);
struct
dscc4_dev_priv
*
dpriv
=
dscc4_priv
(
dev
);
hdlc_device
*
hdlc
=
&
dpriv
->
hdlc
;
hdlc_device
*
hdlc
=
&
dpriv
->
hdlc
;
struct
dscc4_pci_priv
*
ppriv
;
struct
dscc4_pci_priv
*
ppriv
;
u32
ioaddr
;
int
ret
=
-
EAGAIN
;
int
ret
=
-
EAGAIN
;
if
((
dscc4_loopback_check
(
dpriv
)
<
0
)
||
!
dev
->
hard_start_xmit
)
if
((
dscc4_loopback_check
(
dpriv
)
<
0
)
||
!
dev
->
hard_start_xmit
)
...
@@ -937,8 +936,6 @@ static int dscc4_open(struct net_device *dev)
...
@@ -937,8 +936,6 @@ static int dscc4_open(struct net_device *dev)
if
(
dscc4_init_ring
(
dev
))
if
(
dscc4_init_ring
(
dev
))
goto
err_out
;
goto
err_out
;
ioaddr
=
dev
->
base_addr
+
SCC_REG_START
(
dpriv
);
/* IDT+IDR during XPR */
/* IDT+IDR during XPR */
dpriv
->
flags
=
NeedIDR
|
NeedIDT
;
dpriv
->
flags
=
NeedIDR
|
NeedIDT
;
...
@@ -1381,7 +1378,6 @@ static inline void dscc4_tx_irq(struct dscc4_pci_priv *ppriv, struct dscc4_dev_p
...
@@ -1381,7 +1378,6 @@ static inline void dscc4_tx_irq(struct dscc4_pci_priv *ppriv, struct dscc4_dev_p
if
(
state_check
(
state
,
dpriv
,
dev
,
"Tx"
))
if
(
state_check
(
state
,
dpriv
,
dev
,
"Tx"
))
return
;
return
;
// state &= 0x0fffffff; /* Tracking the analyzed bits */
if
(
state
&
SccEvt
)
{
if
(
state
&
SccEvt
)
{
if
(
state
&
Alls
)
{
if
(
state
&
Alls
)
{
struct
TxFD
*
tx_fd
;
struct
TxFD
*
tx_fd
;
...
@@ -1441,13 +1437,13 @@ static inline void dscc4_tx_irq(struct dscc4_pci_priv *ppriv, struct dscc4_dev_p
...
@@ -1441,13 +1437,13 @@ static inline void dscc4_tx_irq(struct dscc4_pci_priv *ppriv, struct dscc4_dev_p
/* Tx reset */
/* Tx reset */
writel
(
MTFi
|
Rdt
,
writel
(
MTFi
|
Rdt
,
dev
->
base_addr
+
0x0c
*
dpriv
->
dev_id
+
CH0CFG
);
dev
->
base_addr
+
0x0c
*
dpriv
->
dev_id
+
CH0CFG
);
writel
(
0x00000001
,
dev
->
base_addr
+
GCMDR
);
writel
(
Action
,
dev
->
base_addr
+
GCMDR
);
return
;
return
;
}
}
if
(
state
&
Xmr
)
{
if
(
state
&
Xmr
)
{
/* Frame needs to be sent again - FIXME */
/* Frame needs to be sent again - FIXME */
//dscc4_start_xmit(dpriv->tx_skbuff[dpriv->tx_dirty], dev
);
printk
(
KERN_ERR
"%s: Xmr. Ask maintainer
\n
"
,
DRV_NAME
);
if
(
!
(
state
&=
~
0x00002000
))
/* DEBUG */
if
(
!
(
state
&=
~
Xmr
))
/* DEBUG */
goto
try
;
goto
try
;
}
}
if
(
state
&
Xpr
)
{
if
(
state
&
Xpr
)
{
...
@@ -1694,11 +1690,11 @@ static int dscc4_init_ring(struct net_device *dev)
...
@@ -1694,11 +1690,11 @@ static int dscc4_init_ring(struct net_device *dev)
int
i
;
int
i
;
tx_fd
=
(
struct
TxFD
*
)
pci_alloc_consistent
(
dpriv
->
pci_priv
->
pdev
,
tx_fd
=
(
struct
TxFD
*
)
pci_alloc_consistent
(
dpriv
->
pci_priv
->
pdev
,
TX_RING_SIZE
*
sizeof
(
struct
TxFD
),
&
dpriv
->
tx_fd_dma
);
TX_RING_SIZE
*
sizeof
(
*
tx_fd
),
&
dpriv
->
tx_fd_dma
);
if
(
!
tx_fd
)
if
(
!
tx_fd
)
goto
err_out
;
goto
err_out
;
rx_fd
=
(
struct
RxFD
*
)
pci_alloc_consistent
(
dpriv
->
pci_priv
->
pdev
,
rx_fd
=
(
struct
RxFD
*
)
pci_alloc_consistent
(
dpriv
->
pci_priv
->
pdev
,
RX_RING_SIZE
*
sizeof
(
struct
RxFD
),
&
dpriv
->
rx_fd_dma
);
RX_RING_SIZE
*
sizeof
(
*
rx_fd
),
&
dpriv
->
rx_fd_dma
);
if
(
!
rx_fd
)
if
(
!
rx_fd
)
goto
err_free_dma_tx
;
goto
err_free_dma_tx
;
...
@@ -1732,11 +1728,11 @@ static int dscc4_init_ring(struct net_device *dev)
...
@@ -1732,11 +1728,11 @@ static int dscc4_init_ring(struct net_device *dev)
*/
*/
struct
sk_buff
*
skb
;
struct
sk_buff
*
skb
;
skb
=
dev_alloc_skb
(
32
);
skb
=
dev_alloc_skb
(
DUMMY_SKB_SIZE
);
if
(
!
skb
)
if
(
!
skb
)
goto
err_free_dma_tx
;
goto
err_free_dma_tx
;
skb
->
len
=
32
;
skb
->
len
=
DUMMY_SKB_SIZE
;
mem
set
(
skb
->
data
,
0xaa
,
16
);
mem
cpy
(
skb
->
data
,
version
,
strlen
(
version
)
%
DUMMY_SKB_SIZE
);
tx_fd
-=
(
TX_RING_SIZE
-
1
);
tx_fd
-=
(
TX_RING_SIZE
-
1
);
tx_fd
->
state
=
0xc0000000
;
tx_fd
->
state
=
0xc0000000
;
tx_fd
->
state
|=
((
u32
)(
skb
->
len
&
TxSizeMax
))
<<
16
;
tx_fd
->
state
|=
((
u32
)(
skb
->
len
&
TxSizeMax
))
<<
16
;
...
...
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