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
bb42d290
Commit
bb42d290
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 11/13
- CD/CTS change notification; - more DEBUG/if (debug >...) conversion;
parent
cc39e9ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
17 deletions
+24
-17
drivers/net/wan/dscc4.c
drivers/net/wan/dscc4.c
+24
-17
No files found.
drivers/net/wan/dscc4.c
View file @
bb42d290
...
@@ -115,7 +115,6 @@ static int quartz;
...
@@ -115,7 +115,6 @@ static int quartz;
#define DRV_NAME "dscc4"
#define DRV_NAME "dscc4"
#undef DSCC4_POLLING
#undef DSCC4_POLLING
#define DEBUG
/* Module parameters */
/* Module parameters */
...
@@ -152,8 +151,6 @@ struct RxFD {
...
@@ -152,8 +151,6 @@ struct RxFD {
u32
end
;
u32
end
;
};
};
#define CONFIG_DSCC4_DEBUG
#define DUMMY_SKB_SIZE 64
#define DUMMY_SKB_SIZE 64
#define TX_LOW 8
#define TX_LOW 8
#define TX_RING_SIZE 32
#define TX_RING_SIZE 32
...
@@ -307,10 +304,12 @@ struct dscc4_dev_priv {
...
@@ -307,10 +304,12 @@ struct dscc4_dev_priv {
#define TxEvt 0x0f000000
#define TxEvt 0x0f000000
#define Alls 0x00040000
#define Alls 0x00040000
#define Xdu 0x00010000
#define Xdu 0x00010000
#define Cts 0x00004000
#define Xmr 0x00002000
#define Xmr 0x00002000
#define Xpr 0x00001000
#define Xpr 0x00001000
#define Rdo 0x00000080
#define Rdo 0x00000080
#define Rfs 0x00000040
#define Rfs 0x00000040
#define Cd 0x00000004
#define Rfo 0x00000002
#define Rfo 0x00000002
#define Flex 0x00000001
#define Flex 0x00000001
...
@@ -806,7 +805,8 @@ static void dscc4_init_registers(struct dscc4_dev_priv *dpriv,
...
@@ -806,7 +805,8 @@ static void dscc4_init_registers(struct dscc4_dev_priv *dpriv,
scc_writel
(
0xfffeef7f
,
dpriv
,
dev
,
IMR
);
/* Interrupt mask */
scc_writel
(
0xfffeef7f
,
dpriv
,
dev
,
IMR
);
/* Interrupt mask */
#else
#else
//scc_writel(0xfffaef7f, dpriv, dev, IMR); /* Interrupt mask */
//scc_writel(0xfffaef7f, dpriv, dev, IMR); /* Interrupt mask */
scc_writel
(
0xfffaef7e
,
dpriv
,
dev
,
IMR
);
/* Interrupt mask */
//scc_writel(0xfffaef7e, dpriv, dev, IMR); /* Interrupt mask */
scc_writel
(
0xfffa8f7a
,
dpriv
,
dev
,
IMR
);
/* Interrupt mask */
#endif
#endif
}
}
...
@@ -1346,10 +1346,8 @@ static inline void dscc4_tx_irq(struct dscc4_pci_priv *ppriv,
...
@@ -1346,10 +1346,8 @@ static inline void dscc4_tx_irq(struct dscc4_pci_priv *ppriv,
cur
=
dpriv
->
iqtx_current
%
IRQ_RING_SIZE
;
cur
=
dpriv
->
iqtx_current
%
IRQ_RING_SIZE
;
state
=
dpriv
->
iqtx
[
cur
];
state
=
dpriv
->
iqtx
[
cur
];
if
(
!
state
)
{
if
(
!
state
)
{
#ifdef DEBUG
if
((
debug
>
1
)
&&
(
loop
>
1
))
if
(
loop
>
1
)
printk
(
KERN_DEBUG
"%s: Tx irq loop=%d
\n
"
,
dev
->
name
,
loop
);
printk
(
KERN_DEBUG
"%s: Tx irq loop=%d
\n
"
,
dev
->
name
,
loop
);
#endif
if
(
loop
&&
netif_queue_stopped
(
dev
))
if
(
loop
&&
netif_queue_stopped
(
dev
))
if
((
dpriv
->
tx_current
-
dpriv
->
tx_dirty
)
<=
TX_LOW
)
if
((
dpriv
->
tx_current
-
dpriv
->
tx_dirty
)
<=
TX_LOW
)
netif_wake_queue
(
dev
);
netif_wake_queue
(
dev
);
...
@@ -1421,6 +1419,11 @@ static inline void dscc4_tx_irq(struct dscc4_pci_priv *ppriv,
...
@@ -1421,6 +1419,11 @@ static inline void dscc4_tx_irq(struct dscc4_pci_priv *ppriv,
writel
(
Action
,
dev
->
base_addr
+
GCMDR
);
writel
(
Action
,
dev
->
base_addr
+
GCMDR
);
return
;
return
;
}
}
if
(
state
&
Cts
)
{
printk
(
KERN_INFO
"%s: CTS transition
\n
"
,
dev
->
name
);
if
(
!
(
state
&=
~
Cts
))
/* DEBUG */
goto
try
;
}
if
(
state
&
Xmr
)
{
if
(
state
&
Xmr
)
{
/* Frame needs to be sent again - FIXME */
/* Frame needs to be sent again - FIXME */
printk
(
KERN_ERR
"%s: Xmr. Ask maintainer
\n
"
,
DRV_NAME
);
printk
(
KERN_ERR
"%s: Xmr. Ask maintainer
\n
"
,
DRV_NAME
);
...
@@ -1463,6 +1466,11 @@ static inline void dscc4_tx_irq(struct dscc4_pci_priv *ppriv,
...
@@ -1463,6 +1466,11 @@ static inline void dscc4_tx_irq(struct dscc4_pci_priv *ppriv,
if
(
!
(
state
&=
~
Xpr
))
if
(
!
(
state
&=
~
Xpr
))
goto
try
;
goto
try
;
}
}
if
(
state
&
Cd
)
{
printk
(
KERN_INFO
"%s: CD transition
\n
"
,
dev
->
name
);
if
(
!
(
state
&=
~
Cd
))
/* DEBUG */
goto
try
;
}
}
else
{
/* ! SccEvt */
}
else
{
/* ! SccEvt */
if
(
state
&
Hi
)
{
if
(
state
&
Hi
)
{
#ifdef DSCC4_POLLING
#ifdef DSCC4_POLLING
...
@@ -1543,7 +1551,7 @@ static inline void dscc4_rx_irq(struct dscc4_pci_priv *priv,
...
@@ -1543,7 +1551,7 @@ static inline void dscc4_rx_irq(struct dscc4_pci_priv *priv,
state
&=
~
Hi
;
state
&=
~
Hi
;
goto
try
;
goto
try
;
}
}
}
else
{
/*
!
SccEvt */
}
else
{
/* SccEvt */
if
(
debug
>
1
)
{
if
(
debug
>
1
)
{
//FIXME: verifier la presence de tous les evenements
//FIXME: verifier la presence de tous les evenements
static
struct
{
static
struct
{
...
@@ -1551,11 +1559,9 @@ static inline void dscc4_rx_irq(struct dscc4_pci_priv *priv,
...
@@ -1551,11 +1559,9 @@ static inline void dscc4_rx_irq(struct dscc4_pci_priv *priv,
const
char
*
irq_name
;
const
char
*
irq_name
;
}
evts
[]
=
{
}
evts
[]
=
{
{
0x00008000
,
"TIN"
},
{
0x00008000
,
"TIN"
},
{
0x00004000
,
"CSC"
},
{
0x00000020
,
"RSC"
},
{
0x00000020
,
"RSC"
},
{
0x00000010
,
"PCE"
},
{
0x00000010
,
"PCE"
},
{
0x00000008
,
"PLLA"
},
{
0x00000008
,
"PLLA"
},
{
0x00000004
,
"CDSC"
},
{
0
,
NULL
}
{
0
,
NULL
}
},
*
evt
;
},
*
evt
;
...
@@ -1571,6 +1577,11 @@ static inline void dscc4_rx_irq(struct dscc4_pci_priv *priv,
...
@@ -1571,6 +1577,11 @@ static inline void dscc4_rx_irq(struct dscc4_pci_priv *priv,
if
(
!
(
state
&=
~
0x0000c03c
))
if
(
!
(
state
&=
~
0x0000c03c
))
goto
try
;
goto
try
;
}
}
if
(
state
&
Cts
)
{
printk
(
KERN_INFO
"%s: CTS transition
\n
"
,
dev
->
name
);
if
(
!
(
state
&=
~
Cts
))
/* DEBUG */
goto
try
;
}
/*
/*
* Receive Data Overflow (FIXME: fscked)
* Receive Data Overflow (FIXME: fscked)
*/
*/
...
@@ -1641,13 +1652,9 @@ static inline void dscc4_rx_irq(struct dscc4_pci_priv *priv,
...
@@ -1641,13 +1652,9 @@ static inline void dscc4_rx_irq(struct dscc4_pci_priv *priv,
scc_patchl
(
0
,
RxActivate
,
dpriv
,
dev
,
CCR2
);
scc_patchl
(
0
,
RxActivate
,
dpriv
,
dev
,
CCR2
);
goto
try
;
goto
try
;
}
}
/* These will be used later */
if
(
state
&
Cd
)
{
if
(
state
&
Rfs
)
{
printk
(
KERN_INFO
"%s: CD transition
\n
"
,
dev
->
name
);
if
(
!
(
state
&=
~
Rfs
))
if
(
!
(
state
&=
~
Cd
))
/* DEBUG */
goto
try
;
}
if
(
state
&
Rfo
)
{
if
(
!
(
state
&=
~
Rfo
))
goto
try
;
goto
try
;
}
}
if
(
state
&
Flex
)
{
if
(
state
&
Flex
)
{
...
...
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