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
11b2884f
Commit
11b2884f
authored
Jan 10, 2004
by
Alexander Viro
Committed by
Stephen Hemminger
Jan 10, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[wan hdlc] hdlc_set_carrier() switched to net_device.
parent
6dabb069
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
15 deletions
+15
-15
drivers/net/wan/c101.c
drivers/net/wan/c101.c
+3
-4
drivers/net/wan/hd6457x.c
drivers/net/wan/hd6457x.c
+3
-3
drivers/net/wan/hdlc_generic.c
drivers/net/wan/hdlc_generic.c
+7
-6
drivers/net/wan/wanxl.c
drivers/net/wan/wanxl.c
+1
-1
include/linux/hdlc.h
include/linux/hdlc.h
+1
-1
No files found.
drivers/net/wan/c101.c
View file @
11b2884f
...
...
@@ -139,7 +139,7 @@ static void sca_msci_intr(port_t *port)
if
(
stat
&
ST1_CDCD
)
hdlc_set_carrier
(
!
(
sca_in
(
MSCI1_OFFSET
+
ST3
,
card
)
&
ST3_DCD
),
dev
_to_hdlc
(
dev
)
);
dev
);
}
...
...
@@ -193,7 +193,7 @@ static int c101_open(struct net_device *dev)
sca_out
(
IE1_UDRN
,
MSCI0_OFFSET
+
IE1
,
port
);
sca_out
(
IE0_TXINT
,
MSCI0_OFFSET
+
IE0
,
port
);
hdlc_set_carrier
(
!
(
sca_in
(
MSCI1_OFFSET
+
ST3
,
port
)
&
ST3_DCD
),
dev
_to_hdlc
(
dev
)
);
hdlc_set_carrier
(
!
(
sca_in
(
MSCI1_OFFSET
+
ST3
,
port
)
&
ST3_DCD
),
dev
);
printk
(
KERN_DEBUG
"0x%X
\n
"
,
sca_in
(
MSCI1_OFFSET
+
ST3
,
port
));
/* enable MSCI1 CDCD interrupt */
...
...
@@ -371,8 +371,7 @@ static int __init c101_run(unsigned long irq, unsigned long winbase)
}
sca_init_sync_port
(
card
);
/* Set up C101 memory */
hdlc_set_carrier
(
!
(
sca_in
(
MSCI1_OFFSET
+
ST3
,
card
)
&
ST3_DCD
),
dev_to_hdlc
(
dev
));
hdlc_set_carrier
(
!
(
sca_in
(
MSCI1_OFFSET
+
ST3
,
card
)
&
ST3_DCD
),
dev
);
printk
(
KERN_INFO
"%s: Moxa C101 on IRQ%u,"
" using %u TX + %u RX packets rings
\n
"
,
...
...
drivers/net/wan/hd6457x.c
View file @
11b2884f
...
...
@@ -250,7 +250,7 @@ static void sca_init_sync_port(port_t *port)
}
hdlc_set_carrier
(
!
(
sca_in
(
get_msci
(
port
)
+
ST3
,
card
)
&
ST3_DCD
),
dev_to_hdlc
(
port_to_dev
(
port
)
));
port_to_dev
(
port
));
}
...
...
@@ -274,7 +274,7 @@ static inline void sca_msci_intr(port_t *port)
if
(
stat
&
ST1_CDCD
)
hdlc_set_carrier
(
!
(
sca_in
(
msci
+
ST3
,
card
)
&
ST3_DCD
),
dev_to_hdlc
(
port_to_dev
(
port
)
));
port_to_dev
(
port
));
}
#endif
...
...
@@ -579,7 +579,7 @@ static void sca_open(struct net_device *dev)
- all DMA interrupts
*/
hdlc_set_carrier
(
!
(
sca_in
(
msci
+
ST3
,
card
)
&
ST3_DCD
),
dev
_to_hdlc
(
dev
)
);
hdlc_set_carrier
(
!
(
sca_in
(
msci
+
ST3
,
card
)
&
ST3_DCD
),
dev
);
#ifdef __HD64570_H
/* MSCI TX INT and RX INT A IRQ enable */
...
...
drivers/net/wan/hdlc_generic.c
View file @
11b2884f
...
...
@@ -69,8 +69,9 @@ static int hdlc_rcv(struct sk_buff *skb, struct net_device *dev,
void
hdlc_set_carrier
(
int
on
,
hdlc_device
*
hdlc
)
void
hdlc_set_carrier
(
int
on
,
struct
net_device
*
dev
)
{
hdlc_device
*
hdlc
=
dev_to_hdlc
(
dev
);
on
=
on
?
1
:
0
;
#ifdef DEBUG_LINK
...
...
@@ -82,7 +83,7 @@ void hdlc_set_carrier(int on, hdlc_device *hdlc)
if
(
hdlc
->
carrier
==
on
)
goto
carrier_exit
;
/* no change in DCD line level */
printk
(
KERN_INFO
"%s: carrier %s
\n
"
,
hdlc_to_name
(
hdlc
)
,
printk
(
KERN_INFO
"%s: carrier %s
\n
"
,
dev
->
name
,
on
?
"ON"
:
"off"
);
hdlc
->
carrier
=
on
;
...
...
@@ -92,14 +93,14 @@ void hdlc_set_carrier(int on, hdlc_device *hdlc)
if
(
hdlc
->
carrier
)
{
if
(
hdlc
->
proto
.
start
)
hdlc
->
proto
.
start
(
hdlc
);
else
if
(
!
netif_carrier_ok
(
&
hdlc
->
net
dev
))
netif_carrier_on
(
&
hdlc
->
net
dev
);
else
if
(
!
netif_carrier_ok
(
dev
))
netif_carrier_on
(
dev
);
}
else
{
/* no carrier */
if
(
hdlc
->
proto
.
stop
)
hdlc
->
proto
.
stop
(
hdlc
);
else
if
(
netif_carrier_ok
(
&
hdlc
->
net
dev
))
netif_carrier_off
(
&
hdlc
->
net
dev
);
else
if
(
netif_carrier_ok
(
dev
))
netif_carrier_off
(
dev
);
}
carrier_exit:
...
...
drivers/net/wan/wanxl.c
View file @
11b2884f
...
...
@@ -172,7 +172,7 @@ static inline void wanxl_cable_intr(port_t *port)
printk
(
KERN_INFO
"%s: %s%s module, %s cable%s%s
\n
"
,
port_name
(
port
),
pm
,
dte
,
cable
,
dsr
,
dcd
);
hdlc_set_carrier
(
value
&
STATUS_CABLE_DCD
,
&
port
->
hdlc
);
hdlc_set_carrier
(
value
&
STATUS_CABLE_DCD
,
port_to_dev
(
port
)
);
}
...
...
include/linux/hdlc.h
View file @
11b2884f
...
...
@@ -233,7 +233,7 @@ int hdlc_open(struct net_device *dev);
/* Must be called by hardware driver when HDLC device is being closed */
void
hdlc_close
(
struct
net_device
*
dev
);
/* Called by hardware driver when DCD line level changes */
void
hdlc_set_carrier
(
int
on
,
hdlc_device
*
hdlc
);
void
hdlc_set_carrier
(
int
on
,
struct
net_device
*
dev
);
/* May be used by hardware driver to gain control over HDLC device */
static
__inline__
void
hdlc_proto_detach
(
hdlc_device
*
hdlc
)
...
...
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