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
ad7f8a9b
Commit
ad7f8a9b
authored
Jan 11, 2003
by
Kai Germaschewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ISDN/HiSax: Move open/close of D-channel stack -> dc_l1_ops
Same change which happened for the B-channel earlier.
parent
6cc9cb58
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
101 additions
and
69 deletions
+101
-69
drivers/isdn/hisax/amd7930_fn.c
drivers/isdn/hisax/amd7930_fn.c
+6
-11
drivers/isdn/hisax/config.c
drivers/isdn/hisax/config.c
+3
-3
drivers/isdn/hisax/hfc_2bds0.c
drivers/isdn/hisax/hfc_2bds0.c
+11
-5
drivers/isdn/hisax/hfc_pci.c
drivers/isdn/hisax/hfc_pci.c
+10
-5
drivers/isdn/hisax/hfc_sx.c
drivers/isdn/hisax/hfc_sx.c
+10
-5
drivers/isdn/hisax/hisax.h
drivers/isdn/hisax/hisax.h
+10
-7
drivers/isdn/hisax/icc.c
drivers/isdn/hisax/icc.c
+9
-4
drivers/isdn/hisax/ipacx.c
drivers/isdn/hisax/ipacx.c
+12
-9
drivers/isdn/hisax/isac.c
drivers/isdn/hisax/isac.c
+10
-5
drivers/isdn/hisax/isdnl1.c
drivers/isdn/hisax/isdnl1.c
+2
-2
drivers/isdn/hisax/isdnl1.h
drivers/isdn/hisax/isdnl1.h
+10
-4
drivers/isdn/hisax/w6692.c
drivers/isdn/hisax/w6692.c
+8
-9
No files found.
drivers/isdn/hisax/amd7930_fn.c
View file @
ad7f8a9b
...
@@ -659,7 +659,7 @@ Amd7930_l1hw(struct PStack *st, int pr, void *arg)
...
@@ -659,7 +659,7 @@ Amd7930_l1hw(struct PStack *st, int pr, void *arg)
}
}
}
}
void
static
int
setstack_Amd7930
(
struct
PStack
*
st
,
struct
IsdnCardState
*
cs
)
setstack_Amd7930
(
struct
PStack
*
st
,
struct
IsdnCardState
*
cs
)
{
{
...
@@ -667,16 +667,9 @@ setstack_Amd7930(struct PStack *st, struct IsdnCardState *cs)
...
@@ -667,16 +667,9 @@ setstack_Amd7930(struct PStack *st, struct IsdnCardState *cs)
debugl1
(
cs
,
"Amd7930: setstack called"
);
debugl1
(
cs
,
"Amd7930: setstack called"
);
st
->
l1
.
l1hw
=
Amd7930_l1hw
;
st
->
l1
.
l1hw
=
Amd7930_l1hw
;
return
0
;
}
}
void
DC_Close_Amd7930
(
struct
IsdnCardState
*
cs
)
{
if
(
cs
->
debug
&
L1_DEB_ISAC
)
debugl1
(
cs
,
"Amd7930: DC_Close called"
);
}
static
void
static
void
dbusy_timer_handler
(
struct
IsdnCardState
*
cs
)
dbusy_timer_handler
(
struct
IsdnCardState
*
cs
)
{
{
...
@@ -764,6 +757,9 @@ static u16 initAMD[] = {
...
@@ -764,6 +757,9 @@ static u16 initAMD[] = {
0xFFFF
};
0xFFFF
};
static
struct
dc_l1_ops
amd7930_l1_ops
=
{
.
open
=
setstack_Amd7930
,
};
void
__devinit
void
__devinit
Amd7930_init
(
struct
IsdnCardState
*
cs
)
Amd7930_init
(
struct
IsdnCardState
*
cs
)
...
@@ -779,8 +775,7 @@ Amd7930_init(struct IsdnCardState *cs)
...
@@ -779,8 +775,7 @@ Amd7930_init(struct IsdnCardState *cs)
cs
->
dc
.
amd7930
.
lmr1
=
0x40
;
cs
->
dc
.
amd7930
.
lmr1
=
0x40
;
cs
->
dc
.
amd7930
.
ph_command
=
Amd7930_ph_command
;
cs
->
dc
.
amd7930
.
ph_command
=
Amd7930_ph_command
;
INIT_WORK
(
&
cs
->
work
,
Amd7930_bh
,
cs
);
INIT_WORK
(
&
cs
->
work
,
Amd7930_bh
,
cs
);
cs
->
setstack_d
=
setstack_Amd7930
;
cs
->
dc_l1_ops
=
&
amd7930_l1_ops
;
cs
->
DC_Close
=
DC_Close_Amd7930
;
cs
->
dbusytimer
.
function
=
(
void
*
)
dbusy_timer_handler
;
cs
->
dbusytimer
.
function
=
(
void
*
)
dbusy_timer_handler
;
cs
->
dbusytimer
.
data
=
(
long
)
cs
;
cs
->
dbusytimer
.
data
=
(
long
)
cs
;
init_timer
(
&
cs
->
dbusytimer
);
init_timer
(
&
cs
->
dbusytimer
);
...
...
drivers/isdn/hisax/config.c
View file @
ad7f8a9b
...
@@ -840,9 +840,9 @@ static void closecard(int cardnr)
...
@@ -840,9 +840,9 @@ static void closecard(int cardnr)
dev_kfree_skb
(
csta
->
tx_skb
);
dev_kfree_skb
(
csta
->
tx_skb
);
csta
->
tx_skb
=
NULL
;
csta
->
tx_skb
=
NULL
;
}
}
if
(
csta
->
DC_Close
!=
NULL
)
{
if
(
csta
->
dc_l1_ops
->
close
)
csta
->
DC_C
lose
(
csta
);
csta
->
dc_l1_ops
->
c
lose
(
csta
);
}
if
(
csta
->
card_ops
->
release
)
if
(
csta
->
card_ops
->
release
)
csta
->
card_ops
->
release
(
csta
);
csta
->
card_ops
->
release
(
csta
);
if
(
csta
->
dbusytimer
.
function
!=
NULL
)
// FIXME?
if
(
csta
->
dbusytimer
.
function
!=
NULL
)
// FIXME?
...
...
drivers/isdn/hisax/hfc_2bds0.c
View file @
ad7f8a9b
...
@@ -824,10 +824,11 @@ HFCD_l1hw(struct PStack *st, int pr, void *arg)
...
@@ -824,10 +824,11 @@ HFCD_l1hw(struct PStack *st, int pr, void *arg)
}
}
}
}
void
static
int
setstack_hfcd
(
struct
PStack
*
st
,
struct
IsdnCardState
*
cs
)
setstack_hfcd
(
struct
PStack
*
st
,
struct
IsdnCardState
*
cs
)
{
{
st
->
l1
.
l1hw
=
HFCD_l1hw
;
st
->
l1
.
l1hw
=
HFCD_l1hw
;
return
0
;
}
}
static
void
static
void
...
@@ -850,17 +851,23 @@ unsigned int __init
...
@@ -850,17 +851,23 @@ unsigned int __init
return
(
send
);
return
(
send
);
}
}
static
struct
bc_l1_ops
hfcd_l1_ops
=
{
static
struct
bc_l1_ops
hfcd_
bc_
l1_ops
=
{
.
fill_fifo
=
hfc_fill_fifo
,
.
fill_fifo
=
hfc_fill_fifo
,
.
open
=
setstack_2b
,
.
open
=
setstack_2b
,
.
close
=
close_2bs0
,
.
close
=
close_2bs0
,
};
};
static
struct
dc_l1_ops
hfcd_dc_l1_ops
=
{
.
fill_fifo
=
hfc_fill_dfifo
,
.
open
=
setstack_hfcd
,
};
void
__init
void
__init
init2bds0
(
struct
IsdnCardState
*
cs
)
init2bds0
(
struct
IsdnCardState
*
cs
)
{
{
cs
->
bc_l1_ops
=
&
hfcd_l1_ops
;
cs
->
setstack_d
=
setstack_hfcd
;
cs
->
bc_l1_ops
=
&
hfcd_bc_l1_ops
;
cs
->
dc_l1_ops
=
&
hfcd_dc_l1_ops
;
cs
->
dbusytimer
.
function
=
(
void
*
)
hfc_dbusy_timer
;
cs
->
dbusytimer
.
function
=
(
void
*
)
hfc_dbusy_timer
;
cs
->
dbusytimer
.
data
=
(
long
)
cs
;
cs
->
dbusytimer
.
data
=
(
long
)
cs
;
init_timer
(
&
cs
->
dbusytimer
);
init_timer
(
&
cs
->
dbusytimer
);
...
@@ -871,7 +878,6 @@ init2bds0(struct IsdnCardState *cs)
...
@@ -871,7 +878,6 @@ init2bds0(struct IsdnCardState *cs)
cs
->
bcs
[
0
].
hw
.
hfc
.
send
=
init_send_hfcd
(
32
);
cs
->
bcs
[
0
].
hw
.
hfc
.
send
=
init_send_hfcd
(
32
);
if
(
!
cs
->
bcs
[
1
].
hw
.
hfc
.
send
)
if
(
!
cs
->
bcs
[
1
].
hw
.
hfc
.
send
)
cs
->
bcs
[
1
].
hw
.
hfc
.
send
=
init_send_hfcd
(
32
);
cs
->
bcs
[
1
].
hw
.
hfc
.
send
=
init_send_hfcd
(
32
);
cs
->
DC_Send_Data
=
hfc_fill_dfifo
;
mode_2bs0
(
cs
->
bcs
,
0
,
0
);
mode_2bs0
(
cs
->
bcs
,
0
,
0
);
mode_2bs0
(
cs
->
bcs
+
1
,
0
,
1
);
mode_2bs0
(
cs
->
bcs
+
1
,
0
,
1
);
}
}
...
...
drivers/isdn/hisax/hfc_pci.c
View file @
ad7f8a9b
...
@@ -1049,10 +1049,11 @@ HFCPCI_l1hw(struct PStack *st, int pr, void *arg)
...
@@ -1049,10 +1049,11 @@ HFCPCI_l1hw(struct PStack *st, int pr, void *arg)
/***********************************************/
/***********************************************/
/* called during init setting l1 stack pointer */
/* called during init setting l1 stack pointer */
/***********************************************/
/***********************************************/
void
static
int
setstack_hfcpci
(
struct
PStack
*
st
,
struct
IsdnCardState
*
cs
)
setstack_hfcpci
(
struct
PStack
*
st
,
struct
IsdnCardState
*
cs
)
{
{
st
->
l1
.
l1hw
=
HFCPCI_l1hw
;
st
->
l1
.
l1hw
=
HFCPCI_l1hw
;
return
0
;
}
}
/***************************************************************/
/***************************************************************/
...
@@ -1337,25 +1338,29 @@ hfcpci_bh(void *data)
...
@@ -1337,25 +1338,29 @@ hfcpci_bh(void *data)
DChannel_proc_xmt
(
cs
);
DChannel_proc_xmt
(
cs
);
}
}
static
struct
bc_l1_ops
hfcpci_l1_ops
=
{
static
struct
bc_l1_ops
hfcpci_
bc_
l1_ops
=
{
.
fill_fifo
=
hfcpci_fill_fifo
,
.
fill_fifo
=
hfcpci_fill_fifo
,
.
open
=
setstack_2b
,
.
open
=
setstack_2b
,
.
close
=
close_hfcpci
,
.
close
=
close_hfcpci
,
};
};
static
struct
dc_l1_ops
hfcpci_dc_l1_ops
=
{
.
fill_fifo
=
hfcpci_fill_dfifo
,
.
open
=
setstack_hfcpci
,
};
/********************************/
/********************************/
/* called for card init message */
/* called for card init message */
/********************************/
/********************************/
void
__init
void
__init
inithfcpci
(
struct
IsdnCardState
*
cs
)
inithfcpci
(
struct
IsdnCardState
*
cs
)
{
{
cs
->
setstack_d
=
setstack_hfcpci
;
cs
->
dbusytimer
.
function
=
(
void
*
)
hfcpci_dbusy_timer
;
cs
->
dbusytimer
.
function
=
(
void
*
)
hfcpci_dbusy_timer
;
cs
->
dbusytimer
.
data
=
(
long
)
cs
;
cs
->
dbusytimer
.
data
=
(
long
)
cs
;
init_timer
(
&
cs
->
dbusytimer
);
init_timer
(
&
cs
->
dbusytimer
);
INIT_WORK
(
&
cs
->
work
,
hfcpci_bh
,
cs
);
INIT_WORK
(
&
cs
->
work
,
hfcpci_bh
,
cs
);
cs
->
bc_l1_ops
=
&
hfcpci_l1_ops
;
cs
->
bc_l1_ops
=
&
hfcpci_
bc_
l1_ops
;
cs
->
DC_Send_Data
=
hfcpci_fill_dfifo
;
cs
->
dc_l1_ops
=
&
hfcpci_dc_l1_ops
;
mode_hfcpci
(
cs
->
bcs
,
0
,
0
);
mode_hfcpci
(
cs
->
bcs
,
0
,
0
);
mode_hfcpci
(
cs
->
bcs
+
1
,
0
,
1
);
mode_hfcpci
(
cs
->
bcs
+
1
,
0
,
1
);
}
}
...
...
drivers/isdn/hisax/hfc_sx.c
View file @
ad7f8a9b
...
@@ -839,10 +839,11 @@ HFCSX_l1hw(struct PStack *st, int pr, void *arg)
...
@@ -839,10 +839,11 @@ HFCSX_l1hw(struct PStack *st, int pr, void *arg)
/***********************************************/
/***********************************************/
/* called during init setting l1 stack pointer */
/* called during init setting l1 stack pointer */
/***********************************************/
/***********************************************/
void
static
int
setstack_hfcsx
(
struct
PStack
*
st
,
struct
IsdnCardState
*
cs
)
setstack_hfcsx
(
struct
PStack
*
st
,
struct
IsdnCardState
*
cs
)
{
{
st
->
l1
.
l1hw
=
HFCSX_l1hw
;
st
->
l1
.
l1hw
=
HFCSX_l1hw
;
return
0
;
}
}
/***************************************************************/
/***************************************************************/
...
@@ -1113,25 +1114,29 @@ hfcsx_bh(void *data)
...
@@ -1113,25 +1114,29 @@ hfcsx_bh(void *data)
DChannel_proc_xmt
(
cs
);
DChannel_proc_xmt
(
cs
);
}
}
static
struct
bc_l1_ops
hfcsx_l1_ops
=
{
static
struct
bc_l1_ops
hfcsx_
bc_
l1_ops
=
{
.
fill_fifo
=
hfcsx_fill_fifo
,
.
fill_fifo
=
hfcsx_fill_fifo
,
.
open
=
setstack_2b
,
.
open
=
setstack_2b
,
.
close
=
close_hfcsx
,
.
close
=
close_hfcsx
,
};
};
static
struct
dc_l1_ops
hfcsx_dc_l1_ops
=
{
.
fill_fifo
=
hfcsx_fill_dfifo
,
.
open
=
setstack_hfcsx
,
};
/********************************/
/********************************/
/* called for card init message */
/* called for card init message */
/********************************/
/********************************/
void
__devinit
void
__devinit
inithfcsx
(
struct
IsdnCardState
*
cs
)
inithfcsx
(
struct
IsdnCardState
*
cs
)
{
{
cs
->
setstack_d
=
setstack_hfcsx
;
cs
->
dbusytimer
.
function
=
(
void
*
)
hfcsx_dbusy_timer
;
cs
->
dbusytimer
.
function
=
(
void
*
)
hfcsx_dbusy_timer
;
cs
->
dbusytimer
.
data
=
(
long
)
cs
;
cs
->
dbusytimer
.
data
=
(
long
)
cs
;
init_timer
(
&
cs
->
dbusytimer
);
init_timer
(
&
cs
->
dbusytimer
);
INIT_WORK
(
&
cs
->
work
,
hfcsx_bh
,
cs
);
INIT_WORK
(
&
cs
->
work
,
hfcsx_bh
,
cs
);
cs
->
bc_l1_ops
=
&
hfcsx_l1_ops
;
cs
->
bc_l1_ops
=
&
hfcsx_
bc_
l1_ops
;
cs
->
DC_Send_Data
=
hfcsx_fill_dfifo
;
cs
->
dc_l1_ops
=
&
hfcsx_dc_l1_ops
;
mode_hfcsx
(
cs
->
bcs
,
0
,
0
);
mode_hfcsx
(
cs
->
bcs
,
0
,
0
);
mode_hfcsx
(
cs
->
bcs
+
1
,
0
,
1
);
mode_hfcsx
(
cs
->
bcs
+
1
,
0
,
1
);
}
}
...
...
drivers/isdn/hisax/hisax.h
View file @
ad7f8a9b
...
@@ -878,7 +878,7 @@ struct dc_hw_ops {
...
@@ -878,7 +878,7 @@ struct dc_hw_ops {
void
(
*
write_fifo
)
(
struct
IsdnCardState
*
,
u8
*
,
int
);
void
(
*
write_fifo
)
(
struct
IsdnCardState
*
,
u8
*
,
int
);
};
};
/* Methods provided to shared FIFO handling */
/* Methods provided to shared
B-channel
FIFO handling */
struct
bc_l1_ops
{
struct
bc_l1_ops
{
void
(
*
fill_fifo
)
(
struct
BCState
*
);
void
(
*
fill_fifo
)
(
struct
BCState
*
);
...
@@ -886,6 +886,14 @@ struct bc_l1_ops {
...
@@ -886,6 +886,14 @@ struct bc_l1_ops {
void
(
*
close
)
(
struct
BCState
*
);
void
(
*
close
)
(
struct
BCState
*
);
};
};
/* Methods provided to shared D-channel FIFO handling */
struct
dc_l1_ops
{
void
(
*
fill_fifo
)
(
struct
IsdnCardState
*
);
int
(
*
open
)
(
struct
PStack
*
,
struct
IsdnCardState
*
);
void
(
*
close
)
(
struct
IsdnCardState
*
);
};
#define HW_IOM1 0
#define HW_IOM1 0
#define HW_IPAC 1
#define HW_IPAC 1
#define HW_ISAR 2
#define HW_ISAR 2
...
@@ -945,11 +953,9 @@ struct IsdnCardState {
...
@@ -945,11 +953,9 @@ struct IsdnCardState {
u8
*
status_end
;
u8
*
status_end
;
struct
dc_hw_ops
*
dc_hw_ops
;
struct
dc_hw_ops
*
dc_hw_ops
;
struct
bc_hw_ops
*
bc_hw_ops
;
struct
bc_hw_ops
*
bc_hw_ops
;
struct
dc_l1_ops
*
dc_l1_ops
;
struct
bc_l1_ops
*
bc_l1_ops
;
struct
bc_l1_ops
*
bc_l1_ops
;
int
(
*
cardmsg
)
(
struct
IsdnCardState
*
,
int
,
void
*
);
int
(
*
cardmsg
)
(
struct
IsdnCardState
*
,
int
,
void
*
);
void
(
*
setstack_d
)
(
struct
PStack
*
,
struct
IsdnCardState
*
);
void
(
*
DC_Send_Data
)
(
struct
IsdnCardState
*
);
void
(
*
DC_Close
)
(
struct
IsdnCardState
*
);
int
(
*
auxcmd
)
(
struct
IsdnCardState
*
,
isdn_ctrl
*
);
int
(
*
auxcmd
)
(
struct
IsdnCardState
*
,
isdn_ctrl
*
);
struct
Channel
channel
[
2
+
MAX_WAITING_CALLS
];
struct
Channel
channel
[
2
+
MAX_WAITING_CALLS
];
struct
BCState
bcs
[
2
+
MAX_WAITING_CALLS
];
struct
BCState
bcs
[
2
+
MAX_WAITING_CALLS
];
...
@@ -1365,9 +1371,6 @@ int QuickHex(char *txt, u8 * p, int cnt);
...
@@ -1365,9 +1371,6 @@ int QuickHex(char *txt, u8 * p, int cnt);
void
LogFrame
(
struct
IsdnCardState
*
cs
,
u8
*
p
,
int
size
);
void
LogFrame
(
struct
IsdnCardState
*
cs
,
u8
*
p
,
int
size
);
void
dlogframe
(
struct
IsdnCardState
*
cs
,
struct
sk_buff
*
skb
,
int
dir
);
void
dlogframe
(
struct
IsdnCardState
*
cs
,
struct
sk_buff
*
skb
,
int
dir
);
void
iecpy
(
u8
*
dest
,
u8
*
iestart
,
int
ieoffset
);
void
iecpy
(
u8
*
dest
,
u8
*
iestart
,
int
ieoffset
);
#ifdef ISDN_CHIP_ISAC
void
setstack_isac
(
struct
PStack
*
st
,
struct
IsdnCardState
*
cs
);
#endif
/* ISDN_CHIP_ISAC */
#endif
/* __KERNEL__ */
#endif
/* __KERNEL__ */
#define HZDELAY(jiffs) {int tout = jiffs; while (tout--) udelay(1000000/HZ);}
#define HZDELAY(jiffs) {int tout = jiffs; while (tout--) udelay(1000000/HZ);}
...
...
drivers/isdn/hisax/icc.c
View file @
ad7f8a9b
...
@@ -443,10 +443,11 @@ ICC_l1hw(struct PStack *st, int pr, void *arg)
...
@@ -443,10 +443,11 @@ ICC_l1hw(struct PStack *st, int pr, void *arg)
}
}
}
}
void
static
int
setstack_icc
(
struct
PStack
*
st
,
struct
IsdnCardState
*
cs
)
setstack_icc
(
struct
PStack
*
st
,
struct
IsdnCardState
*
cs
)
{
{
st
->
l1
.
l1hw
=
ICC_l1hw
;
st
->
l1
.
l1hw
=
ICC_l1hw
;
return
0
;
}
}
void
void
...
@@ -497,15 +498,19 @@ dbusy_timer_handler(struct IsdnCardState *cs)
...
@@ -497,15 +498,19 @@ dbusy_timer_handler(struct IsdnCardState *cs)
}
}
}
}
static
struct
dc_l1_ops
icc_l1_ops
=
{
.
fill_fifo
=
icc_fill_fifo
,
.
open
=
setstack_icc
,
.
close
=
DC_Close_icc
,
};
void
__init
void
__init
initicc
(
struct
IsdnCardState
*
cs
)
initicc
(
struct
IsdnCardState
*
cs
)
{
{
int
val
,
eval
;
int
val
,
eval
;
cs
->
dc_l1_ops
=
&
icc_l1_ops
;
INIT_WORK
(
&
cs
->
work
,
icc_bh
,
cs
);
INIT_WORK
(
&
cs
->
work
,
icc_bh
,
cs
);
cs
->
setstack_d
=
setstack_icc
;
cs
->
DC_Send_Data
=
icc_fill_fifo
;
cs
->
DC_Close
=
DC_Close_icc
;
cs
->
dc
.
icc
.
mon_tx
=
NULL
;
cs
->
dc
.
icc
.
mon_tx
=
NULL
;
cs
->
dc
.
icc
.
mon_rx
=
NULL
;
cs
->
dc
.
icc
.
mon_rx
=
NULL
;
cs
->
dbusytimer
.
function
=
(
void
*
)
dbusy_timer_handler
;
cs
->
dbusytimer
.
function
=
(
void
*
)
dbusy_timer_handler
;
...
...
drivers/isdn/hisax/ipacx.c
View file @
ad7f8a9b
...
@@ -41,8 +41,6 @@ static void dch_bh(void *data);
...
@@ -41,8 +41,6 @@ static void dch_bh(void *data);
static
void
dch_empty_fifo
(
struct
IsdnCardState
*
cs
,
int
count
);
static
void
dch_empty_fifo
(
struct
IsdnCardState
*
cs
,
int
count
);
static
void
dch_fill_fifo
(
struct
IsdnCardState
*
cs
);
static
void
dch_fill_fifo
(
struct
IsdnCardState
*
cs
);
static
inline
void
dch_int
(
struct
IsdnCardState
*
cs
);
static
inline
void
dch_int
(
struct
IsdnCardState
*
cs
);
static
void
__devinit
dch_setstack
(
struct
PStack
*
st
,
struct
IsdnCardState
*
cs
);
static
void
__devinit
dch_init
(
struct
IsdnCardState
*
cs
);
static
void
bch_l2l1
(
struct
PStack
*
st
,
int
pr
,
void
*
arg
);
static
void
bch_l2l1
(
struct
PStack
*
st
,
int
pr
,
void
*
arg
);
static
void
ipacx_bc_empty_fifo
(
struct
BCState
*
bcs
,
int
count
);
static
void
ipacx_bc_empty_fifo
(
struct
BCState
*
bcs
,
int
count
);
static
void
bch_int
(
struct
IsdnCardState
*
cs
,
u8
hscx
);
static
void
bch_int
(
struct
IsdnCardState
*
cs
,
u8
hscx
);
...
@@ -396,12 +394,18 @@ dch_int(struct IsdnCardState *cs)
...
@@ -396,12 +394,18 @@ dch_int(struct IsdnCardState *cs)
//----------------------------------------------------------
//----------------------------------------------------------
//----------------------------------------------------------
//----------------------------------------------------------
static
void
__devini
t
static
in
t
dch_setstack
(
struct
PStack
*
st
,
struct
IsdnCardState
*
cs
)
dch_setstack
(
struct
PStack
*
st
,
struct
IsdnCardState
*
cs
)
{
{
st
->
l1
.
l1hw
=
dch_l2l1
;
st
->
l1
.
l1hw
=
dch_l2l1
;
return
0
;
}
}
static
struct
dc_l1_ops
ipacx_dc_l1_ops
=
{
.
fill_fifo
=
dch_fill_fifo
,
.
open
=
dch_setstack
,
};
//----------------------------------------------------------
//----------------------------------------------------------
//----------------------------------------------------------
//----------------------------------------------------------
static
void
__devinit
static
void
__devinit
...
@@ -409,17 +413,16 @@ dch_init(struct IsdnCardState *cs)
...
@@ -409,17 +413,16 @@ dch_init(struct IsdnCardState *cs)
{
{
printk
(
KERN_INFO
"HiSax: IPACX ISDN driver v0.1.0
\n
"
);
printk
(
KERN_INFO
"HiSax: IPACX ISDN driver v0.1.0
\n
"
);
cs
->
dc_l1_ops
=
&
ipacx_dc_l1_ops
;
INIT_WORK
(
&
cs
->
work
,
dch_bh
,
cs
);
INIT_WORK
(
&
cs
->
work
,
dch_bh
,
cs
);
cs
->
setstack_d
=
dch_setstack
;
cs
->
DC_Send_Data
=
dch_fill_fifo
;
cs
->
dbusytimer
.
function
=
(
void
*
)
dbusy_timer_handler
;
cs
->
dbusytimer
.
function
=
(
void
*
)
dbusy_timer_handler
;
cs
->
dbusytimer
.
data
=
(
long
)
cs
;
cs
->
dbusytimer
.
data
=
(
long
)
cs
;
init_timer
(
&
cs
->
dbusytimer
);
init_timer
(
&
cs
->
dbusytimer
);
ipacx_write_reg
(
cs
,
IPACX_TR_CONF0
,
0x00
);
// clear LDD
ipacx_write_reg
(
cs
,
IPACX_TR_CONF0
,
0x00
);
// clear LDD
ipacx_write_reg
(
cs
,
IPACX_TR_CONF2
,
0x00
);
// enable transmitter
ipacx_write_reg
(
cs
,
IPACX_TR_CONF2
,
0x00
);
// enable transmitter
ipacx_write_reg
(
cs
,
IPACX_MODED
,
0xC9
);
// transparent mode 0, RAC, stop/go
ipacx_write_reg
(
cs
,
IPACX_MODED
,
0xC9
);
// transparent mode 0, RAC, stop/go
ipacx_write_reg
(
cs
,
IPACX_MON_CR
,
0x00
);
// disable monitor channel
ipacx_write_reg
(
cs
,
IPACX_MON_CR
,
0x00
);
// disable monitor channel
}
}
...
...
drivers/isdn/hisax/isac.c
View file @
ad7f8a9b
...
@@ -441,13 +441,14 @@ ISAC_l1hw(struct PStack *st, int pr, void *arg)
...
@@ -441,13 +441,14 @@ ISAC_l1hw(struct PStack *st, int pr, void *arg)
}
}
}
}
void
static
int
setstack_isac
(
struct
PStack
*
st
,
struct
IsdnCardState
*
cs
)
setstack_isac
(
struct
PStack
*
st
,
struct
IsdnCardState
*
cs
)
{
{
st
->
l1
.
l1hw
=
ISAC_l1hw
;
st
->
l1
.
l1hw
=
ISAC_l1hw
;
return
0
;
}
}
void
static
void
DC_Close_isac
(
struct
IsdnCardState
*
cs
)
{
DC_Close_isac
(
struct
IsdnCardState
*
cs
)
{
if
(
cs
->
dc
.
isac
.
mon_rx
)
{
if
(
cs
->
dc
.
isac
.
mon_rx
)
{
kfree
(
cs
->
dc
.
isac
.
mon_rx
);
kfree
(
cs
->
dc
.
isac
.
mon_rx
);
...
@@ -495,6 +496,12 @@ dbusy_timer_handler(struct IsdnCardState *cs)
...
@@ -495,6 +496,12 @@ dbusy_timer_handler(struct IsdnCardState *cs)
}
}
}
}
static
struct
dc_l1_ops
isac_l1_ops
=
{
.
fill_fifo
=
isac_fill_fifo
,
.
open
=
setstack_isac
,
.
close
=
DC_Close_isac
,
};
void
__devinit
void
__devinit
initisac
(
struct
IsdnCardState
*
cs
)
initisac
(
struct
IsdnCardState
*
cs
)
{
{
...
@@ -515,10 +522,8 @@ initisac(struct IsdnCardState *cs)
...
@@ -515,10 +522,8 @@ initisac(struct IsdnCardState *cs)
/* Disable all IRQ */
/* Disable all IRQ */
isac_write
(
cs
,
ISAC_MASK
,
0xFF
);
isac_write
(
cs
,
ISAC_MASK
,
0xFF
);
cs
->
dc_l1_ops
=
&
isac_l1_ops
;
INIT_WORK
(
&
cs
->
work
,
isac_bh
,
cs
);
INIT_WORK
(
&
cs
->
work
,
isac_bh
,
cs
);
cs
->
setstack_d
=
setstack_isac
;
cs
->
DC_Send_Data
=
isac_fill_fifo
;
cs
->
DC_Close
=
DC_Close_isac
;
cs
->
dc
.
isac
.
mon_tx
=
NULL
;
cs
->
dc
.
isac
.
mon_tx
=
NULL
;
cs
->
dc
.
isac
.
mon_rx
=
NULL
;
cs
->
dc
.
isac
.
mon_rx
=
NULL
;
cs
->
dbusytimer
.
function
=
(
void
*
)
dbusy_timer_handler
;
cs
->
dbusytimer
.
function
=
(
void
*
)
dbusy_timer_handler
;
...
...
drivers/isdn/hisax/isdnl1.c
View file @
ad7f8a9b
...
@@ -905,8 +905,8 @@ setstack_HiSax(struct PStack *st, struct IsdnCardState *cs)
...
@@ -905,8 +905,8 @@ setstack_HiSax(struct PStack *st, struct IsdnCardState *cs)
setstack_manager
(
st
);
setstack_manager
(
st
);
st
->
l1
.
stlistp
=
&
(
cs
->
stlist
);
st
->
l1
.
stlistp
=
&
(
cs
->
stlist
);
st
->
l1
.
l2l1
=
dch_l2l1
;
st
->
l1
.
l2l1
=
dch_l2l1
;
if
(
cs
->
setstack_d
)
if
(
cs
->
dc_l1_ops
->
open
)
cs
->
setstack_d
(
st
,
cs
);
cs
->
dc_l1_ops
->
open
(
st
,
cs
);
}
}
void
void
...
...
drivers/isdn/hisax/isdnl1.h
View file @
ad7f8a9b
...
@@ -37,6 +37,12 @@ fill_fifo_b(struct BCState *bcs)
...
@@ -37,6 +37,12 @@ fill_fifo_b(struct BCState *bcs)
bcs
->
cs
->
bc_l1_ops
->
fill_fifo
(
bcs
);
bcs
->
cs
->
bc_l1_ops
->
fill_fifo
(
bcs
);
}
}
static
inline
void
fill_fifo_d
(
struct
IsdnCardState
*
cs
)
{
cs
->
dc_l1_ops
->
fill_fifo
(
cs
);
}
#ifdef L2FRAME_DEBUG
#ifdef L2FRAME_DEBUG
extern
void
Logl2Frame
(
struct
IsdnCardState
*
cs
,
struct
sk_buff
*
skb
,
char
*
buf
,
int
dir
);
extern
void
Logl2Frame
(
struct
IsdnCardState
*
cs
,
struct
sk_buff
*
skb
,
char
*
buf
,
int
dir
);
#endif
#endif
...
@@ -94,7 +100,7 @@ xmit_ready_d(struct IsdnCardState *cs)
...
@@ -94,7 +100,7 @@ xmit_ready_d(struct IsdnCardState *cs)
cs
->
tx_skb
=
skb_dequeue
(
&
cs
->
sq
);
cs
->
tx_skb
=
skb_dequeue
(
&
cs
->
sq
);
if
(
cs
->
tx_skb
)
{
if
(
cs
->
tx_skb
)
{
cs
->
tx_cnt
=
0
;
cs
->
tx_cnt
=
0
;
cs
->
DC_Send_Data
(
cs
);
fill_fifo_d
(
cs
);
}
else
{
}
else
{
sched_d_event
(
cs
,
D_XMTBUFREADY
);
sched_d_event
(
cs
,
D_XMTBUFREADY
);
}
}
...
@@ -141,7 +147,7 @@ xmit_data_req_d(struct IsdnCardState *cs, struct sk_buff *skb)
...
@@ -141,7 +147,7 @@ xmit_data_req_d(struct IsdnCardState *cs, struct sk_buff *skb)
if
(
cs
->
debug
&
L1_DEB_LAPD
)
if
(
cs
->
debug
&
L1_DEB_LAPD
)
Logl2Frame
(
cs
,
skb
,
"PH_DATA"
,
0
);
Logl2Frame
(
cs
,
skb
,
"PH_DATA"
,
0
);
#endif
#endif
cs
->
DC_Send_Data
(
cs
);
fill_fifo_d
(
cs
);
}
}
spin_unlock_irqrestore
(
&
cs
->
lock
,
flags
);
spin_unlock_irqrestore
(
&
cs
->
lock
,
flags
);
}
}
...
@@ -183,7 +189,7 @@ xmit_pull_ind_d(struct IsdnCardState *cs, struct sk_buff *skb)
...
@@ -183,7 +189,7 @@ xmit_pull_ind_d(struct IsdnCardState *cs, struct sk_buff *skb)
#endif
#endif
cs
->
tx_skb
=
skb
;
cs
->
tx_skb
=
skb
;
cs
->
tx_cnt
=
0
;
cs
->
tx_cnt
=
0
;
cs
->
DC_Send_Data
(
cs
);
fill_fifo_d
(
cs
);
}
}
spin_unlock_irqrestore
(
&
cs
->
lock
,
flags
);
spin_unlock_irqrestore
(
&
cs
->
lock
,
flags
);
}
}
...
@@ -296,7 +302,7 @@ xmit_xpr_d(struct IsdnCardState *cs)
...
@@ -296,7 +302,7 @@ xmit_xpr_d(struct IsdnCardState *cs)
if
(
cs
->
tx_skb
)
{
if
(
cs
->
tx_skb
)
{
/* last frame not done yet? */
/* last frame not done yet? */
if
(
cs
->
tx_skb
->
len
)
{
if
(
cs
->
tx_skb
->
len
)
{
cs
->
DC_Send_Data
(
cs
);
fill_fifo_d
(
cs
);
return
;
return
;
}
}
xmit_complete_d
(
cs
);
xmit_complete_d
(
cs
);
...
...
drivers/isdn/hisax/w6692.c
View file @
ad7f8a9b
...
@@ -456,15 +456,11 @@ W6692_l1hw(struct PStack *st, int pr, void *arg)
...
@@ -456,15 +456,11 @@ W6692_l1hw(struct PStack *st, int pr, void *arg)
}
}
}
}
static
void
static
int
setstack_W6692
(
struct
PStack
*
st
,
struct
IsdnCardState
*
cs
)
setstack_W6692
(
struct
PStack
*
st
,
struct
IsdnCardState
*
cs
)
{
{
st
->
l1
.
l1hw
=
W6692_l1hw
;
st
->
l1
.
l1hw
=
W6692_l1hw
;
}
return
0
;
static
void
DC_Close_W6692
(
struct
IsdnCardState
*
cs
)
{
}
}
static
void
static
void
...
@@ -621,8 +617,6 @@ static void
...
@@ -621,8 +617,6 @@ static void
w6692_init
(
struct
IsdnCardState
*
cs
)
w6692_init
(
struct
IsdnCardState
*
cs
)
{
{
INIT_WORK
(
&
cs
->
work
,
W6692_bh
,
cs
);
INIT_WORK
(
&
cs
->
work
,
W6692_bh
,
cs
);
cs
->
setstack_d
=
setstack_W6692
;
cs
->
DC_Close
=
DC_Close_W6692
;
cs
->
dbusytimer
.
function
=
(
void
*
)
dbusy_timer_handler
;
cs
->
dbusytimer
.
function
=
(
void
*
)
dbusy_timer_handler
;
cs
->
dbusytimer
.
data
=
(
long
)
cs
;
cs
->
dbusytimer
.
data
=
(
long
)
cs
;
init_timer
(
&
cs
->
dbusytimer
);
init_timer
(
&
cs
->
dbusytimer
);
...
@@ -667,6 +661,11 @@ static struct card_ops w6692_ops = {
...
@@ -667,6 +661,11 @@ static struct card_ops w6692_ops = {
.
irq_func
=
w6692_interrupt
,
.
irq_func
=
w6692_interrupt
,
};
};
static
struct
dc_l1_ops
w6692_dc_l1_ops
=
{
.
fill_fifo
=
W6692_fill_fifo
,
.
open
=
setstack_W6692
,
};
static
struct
bc_l1_ops
w6692_bc_l1_ops
=
{
static
struct
bc_l1_ops
w6692_bc_l1_ops
=
{
.
fill_fifo
=
W6692B_fill_fifo
,
.
fill_fifo
=
W6692B_fill_fifo
,
.
open
=
setstack_w6692
,
.
open
=
setstack_w6692
,
...
@@ -763,8 +762,8 @@ setup_w6692(struct IsdnCard *card)
...
@@ -763,8 +762,8 @@ setup_w6692(struct IsdnCard *card)
cs
->
dc_hw_ops
=
&
w6692_dc_hw_ops
;
cs
->
dc_hw_ops
=
&
w6692_dc_hw_ops
;
cs
->
bc_hw_ops
=
&
w6692_bc_hw_ops
;
cs
->
bc_hw_ops
=
&
w6692_bc_hw_ops
;
cs
->
dc_l1_ops
=
&
w6692_dc_l1_ops
;
cs
->
bc_l1_ops
=
&
w6692_bc_l1_ops
;
cs
->
bc_l1_ops
=
&
w6692_bc_l1_ops
;
cs
->
DC_Send_Data
=
&
W6692_fill_fifo
;
cs
->
cardmsg
=
&
w6692_card_msg
;
cs
->
cardmsg
=
&
w6692_card_msg
;
cs
->
irq_flags
|=
SA_SHIRQ
;
cs
->
irq_flags
|=
SA_SHIRQ
;
cs
->
card_ops
=
&
w6692_ops
;
cs
->
card_ops
=
&
w6692_ops
;
...
...
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