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
68ace479
Commit
68ace479
authored
Nov 24, 2002
by
Kai Germaschewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ISDN/HiSax: Share D-channel PH_DATA request handling
As usual, lots of duplicated code gone.
parent
cc0f4b0d
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
35 additions
and
145 deletions
+35
-145
drivers/isdn/hisax/hfc_2bds0.c
drivers/isdn/hisax/hfc_2bds0.c
+1
-24
drivers/isdn/hisax/hfc_pci.c
drivers/isdn/hisax/hfc_pci.c
+1
-24
drivers/isdn/hisax/hfc_sx.c
drivers/isdn/hisax/hfc_sx.c
+1
-24
drivers/isdn/hisax/icc.c
drivers/isdn/hisax/icc.c
+1
-19
drivers/isdn/hisax/ipacx.c
drivers/isdn/hisax/ipacx.c
+1
-16
drivers/isdn/hisax/isac.c
drivers/isdn/hisax/isac.c
+1
-19
drivers/isdn/hisax/isdnl1.h
drivers/isdn/hisax/isdnl1.h
+28
-0
drivers/isdn/hisax/w6692.c
drivers/isdn/hisax/w6692.c
+1
-19
No files found.
drivers/isdn/hisax/hfc_2bds0.c
View file @
68ace479
...
...
@@ -938,30 +938,7 @@ HFCD_l1hw(struct PStack *st, int pr, void *arg)
switch
(
pr
)
{
case
(
PH_DATA
|
REQUEST
):
if
(
cs
->
debug
&
DEB_DLOG_HEX
)
LogFrame
(
cs
,
skb
->
data
,
skb
->
len
);
if
(
cs
->
debug
&
DEB_DLOG_VERBOSE
)
dlogframe
(
cs
,
skb
,
0
);
if
(
cs
->
tx_skb
)
{
skb_queue_tail
(
&
cs
->
sq
,
skb
);
#ifdef L2FRAME_DEBUG
/* psa */
if
(
cs
->
debug
&
L1_DEB_LAPD
)
Logl2Frame
(
cs
,
skb
,
"PH_DATA Queued"
,
0
);
#endif
}
else
{
cs
->
tx_skb
=
skb
;
cs
->
tx_cnt
=
0
;
#ifdef L2FRAME_DEBUG
/* psa */
if
(
cs
->
debug
&
L1_DEB_LAPD
)
Logl2Frame
(
cs
,
skb
,
"PH_DATA"
,
0
);
#endif
if
(
!
test_and_set_bit
(
FLG_LOCK_ATOMIC
,
&
cs
->
HW_Flags
))
{
hfc_fill_dfifo
(
cs
);
test_and_clear_bit
(
FLG_LOCK_ATOMIC
,
&
cs
->
HW_Flags
);
}
else
debugl1
(
cs
,
"hfc_fill_dfifo blocked"
);
}
xmit_data_req_d
(
cs
,
skb
);
break
;
case
(
PH_PULL
|
INDICATION
):
if
(
cs
->
tx_skb
)
{
...
...
drivers/isdn/hisax/hfc_pci.c
View file @
68ace479
...
...
@@ -1082,30 +1082,7 @@ HFCPCI_l1hw(struct PStack *st, int pr, void *arg)
switch
(
pr
)
{
case
(
PH_DATA
|
REQUEST
):
if
(
cs
->
debug
&
DEB_DLOG_HEX
)
LogFrame
(
cs
,
skb
->
data
,
skb
->
len
);
if
(
cs
->
debug
&
DEB_DLOG_VERBOSE
)
dlogframe
(
cs
,
skb
,
0
);
if
(
cs
->
tx_skb
)
{
skb_queue_tail
(
&
cs
->
sq
,
skb
);
#ifdef L2FRAME_DEBUG
/* psa */
if
(
cs
->
debug
&
L1_DEB_LAPD
)
Logl2Frame
(
cs
,
skb
,
"PH_DATA Queued"
,
0
);
#endif
}
else
{
cs
->
tx_skb
=
skb
;
cs
->
tx_cnt
=
0
;
#ifdef L2FRAME_DEBUG
/* psa */
if
(
cs
->
debug
&
L1_DEB_LAPD
)
Logl2Frame
(
cs
,
skb
,
"PH_DATA"
,
0
);
#endif
if
(
!
test_and_set_bit
(
FLG_LOCK_ATOMIC
,
&
cs
->
HW_Flags
))
{
hfcpci_fill_dfifo
(
cs
);
test_and_clear_bit
(
FLG_LOCK_ATOMIC
,
&
cs
->
HW_Flags
);
}
else
debugl1
(
cs
,
"hfcpci_fill_dfifo blocked"
);
}
xmit_data_req
(
cs
,
skb
);
break
;
case
(
PH_PULL
|
INDICATION
):
if
(
cs
->
tx_skb
)
{
...
...
drivers/isdn/hisax/hfc_sx.c
View file @
68ace479
...
...
@@ -882,30 +882,7 @@ HFCSX_l1hw(struct PStack *st, int pr, void *arg)
switch
(
pr
)
{
case
(
PH_DATA
|
REQUEST
):
if
(
cs
->
debug
&
DEB_DLOG_HEX
)
LogFrame
(
cs
,
skb
->
data
,
skb
->
len
);
if
(
cs
->
debug
&
DEB_DLOG_VERBOSE
)
dlogframe
(
cs
,
skb
,
0
);
if
(
cs
->
tx_skb
)
{
skb_queue_tail
(
&
cs
->
sq
,
skb
);
#ifdef L2FRAME_DEBUG
/* psa */
if
(
cs
->
debug
&
L1_DEB_LAPD
)
Logl2Frame
(
cs
,
skb
,
"PH_DATA Queued"
,
0
);
#endif
}
else
{
cs
->
tx_skb
=
skb
;
cs
->
tx_cnt
=
0
;
#ifdef L2FRAME_DEBUG
/* psa */
if
(
cs
->
debug
&
L1_DEB_LAPD
)
Logl2Frame
(
cs
,
skb
,
"PH_DATA"
,
0
);
#endif
if
(
!
test_and_set_bit
(
FLG_LOCK_ATOMIC
,
&
cs
->
HW_Flags
))
{
hfcsx_fill_dfifo
(
cs
);
test_and_clear_bit
(
FLG_LOCK_ATOMIC
,
&
cs
->
HW_Flags
);
}
else
debugl1
(
cs
,
"hfcsx_fill_dfifo blocked"
);
}
xmit_data_req_d
(
cs
,
skb
);
break
;
case
(
PH_PULL
|
INDICATION
):
if
(
cs
->
tx_skb
)
{
...
...
drivers/isdn/hisax/icc.c
View file @
68ace479
...
...
@@ -394,25 +394,7 @@ ICC_l1hw(struct PStack *st, int pr, void *arg)
switch
(
pr
)
{
case
(
PH_DATA
|
REQUEST
):
if
(
cs
->
debug
&
DEB_DLOG_HEX
)
LogFrame
(
cs
,
skb
->
data
,
skb
->
len
);
if
(
cs
->
debug
&
DEB_DLOG_VERBOSE
)
dlogframe
(
cs
,
skb
,
0
);
if
(
cs
->
tx_skb
)
{
skb_queue_tail
(
&
cs
->
sq
,
skb
);
#ifdef L2FRAME_DEBUG
/* psa */
if
(
cs
->
debug
&
L1_DEB_LAPD
)
Logl2Frame
(
cs
,
skb
,
"PH_DATA Queued"
,
0
);
#endif
}
else
{
cs
->
tx_skb
=
skb
;
cs
->
tx_cnt
=
0
;
#ifdef L2FRAME_DEBUG
/* psa */
if
(
cs
->
debug
&
L1_DEB_LAPD
)
Logl2Frame
(
cs
,
skb
,
"PH_DATA"
,
0
);
#endif
icc_fill_fifo
(
cs
);
}
xmit_data_req_d
(
cs
,
skb
);
break
;
case
(
PH_PULL
|
INDICATION
):
if
(
cs
->
tx_skb
)
{
...
...
drivers/isdn/hisax/ipacx.c
View file @
68ace479
...
...
@@ -95,23 +95,8 @@ dch_l2l1(struct PStack *st, int pr, void *arg)
switch
(
pr
)
{
case
(
PH_DATA
|
REQUEST
):
if
(
cs
->
debug
&
DEB_DLOG_HEX
)
LogFrame
(
cs
,
skb
->
data
,
skb
->
len
);
if
(
cs
->
debug
&
DEB_DLOG_VERBOSE
)
dlogframe
(
cs
,
skb
,
0
);
if
(
cs
->
tx_skb
)
{
skb_queue_tail
(
&
cs
->
sq
,
skb
);
#ifdef L2FRAME_DEBUG
if
(
cs
->
debug
&
L1_DEB_LAPD
)
Logl2Frame
(
cs
,
skb
,
"PH_DATA Queued"
,
0
);
#endif
}
else
{
cs
->
tx_skb
=
skb
;
cs
->
tx_cnt
=
0
;
#ifdef L2FRAME_DEBUG
if
(
cs
->
debug
&
L1_DEB_LAPD
)
Logl2Frame
(
cs
,
skb
,
"PH_DATA"
,
0
);
#endif
dch_fill_fifo
(
cs
);
}
xmit_data_req_d
(
cs
,
skb
);
break
;
case
(
PH_PULL
|
INDICATION
):
if
(
cs
->
tx_skb
)
{
if
(
cs
->
debug
&
L1_DEB_WARN
)
...
...
drivers/isdn/hisax/isac.c
View file @
68ace479
...
...
@@ -388,25 +388,7 @@ ISAC_l1hw(struct PStack *st, int pr, void *arg)
switch
(
pr
)
{
case
(
PH_DATA
|
REQUEST
):
if
(
cs
->
debug
&
DEB_DLOG_HEX
)
LogFrame
(
cs
,
skb
->
data
,
skb
->
len
);
if
(
cs
->
debug
&
DEB_DLOG_VERBOSE
)
dlogframe
(
cs
,
skb
,
0
);
if
(
cs
->
tx_skb
)
{
skb_queue_tail
(
&
cs
->
sq
,
skb
);
#ifdef L2FRAME_DEBUG
/* psa */
if
(
cs
->
debug
&
L1_DEB_LAPD
)
Logl2Frame
(
cs
,
skb
,
"PH_DATA Queued"
,
0
);
#endif
}
else
{
cs
->
tx_skb
=
skb
;
cs
->
tx_cnt
=
0
;
#ifdef L2FRAME_DEBUG
/* psa */
if
(
cs
->
debug
&
L1_DEB_LAPD
)
Logl2Frame
(
cs
,
skb
,
"PH_DATA"
,
0
);
#endif
isac_fill_fifo
(
cs
);
}
xmit_data_req_d
(
cs
,
skb
);
break
;
case
(
PH_PULL
|
INDICATION
):
if
(
cs
->
tx_skb
)
{
...
...
drivers/isdn/hisax/isdnl1.h
View file @
68ace479
...
...
@@ -112,6 +112,34 @@ xmit_data_req_b(struct BCState *bcs, struct sk_buff *skb)
spin_unlock_irqrestore
(
&
cs
->
lock
,
flags
);
}
static
inline
void
xmit_data_req_d
(
struct
IsdnCardState
*
cs
,
struct
sk_buff
*
skb
)
{
unsigned
long
flags
;
spin_lock_irqsave
(
&
cs
->
lock
,
flags
);
if
(
cs
->
debug
&
DEB_DLOG_HEX
)
LogFrame
(
cs
,
skb
->
data
,
skb
->
len
);
if
(
cs
->
debug
&
DEB_DLOG_VERBOSE
)
dlogframe
(
cs
,
skb
,
0
);
if
(
cs
->
tx_skb
)
{
skb_queue_tail
(
&
cs
->
sq
,
skb
);
#ifdef L2FRAME_DEBUG
if
(
cs
->
debug
&
L1_DEB_LAPD
)
Logl2Frame
(
cs
,
skb
,
"PH_DATA Queued"
,
0
);
#endif
}
else
{
cs
->
tx_skb
=
skb
;
cs
->
tx_cnt
=
0
;
#ifdef L2FRAME_DEBUG
if
(
cs
->
debug
&
L1_DEB_LAPD
)
Logl2Frame
(
cs
,
skb
,
"PH_DATA"
,
0
);
#endif
cs
->
DC_Send_Data
(
cs
);
}
spin_unlock_irqrestore
(
&
cs
->
lock
,
flags
);
}
static
inline
void
xmit_pull_ind_b
(
struct
BCState
*
bcs
,
struct
sk_buff
*
skb
)
{
...
...
drivers/isdn/hisax/w6692.c
View file @
68ace479
...
...
@@ -432,25 +432,7 @@ W6692_l1hw(struct PStack *st, int pr, void *arg)
switch
(
pr
)
{
case
(
PH_DATA
|
REQUEST
):
if
(
cs
->
debug
&
DEB_DLOG_HEX
)
LogFrame
(
cs
,
skb
->
data
,
skb
->
len
);
if
(
cs
->
debug
&
DEB_DLOG_VERBOSE
)
dlogframe
(
cs
,
skb
,
0
);
if
(
cs
->
tx_skb
)
{
skb_queue_tail
(
&
cs
->
sq
,
skb
);
#ifdef L2FRAME_DEBUG
/* psa */
if
(
cs
->
debug
&
L1_DEB_LAPD
)
Logl2Frame
(
cs
,
skb
,
"PH_DATA Queued"
,
0
);
#endif
}
else
{
cs
->
tx_skb
=
skb
;
cs
->
tx_cnt
=
0
;
#ifdef L2FRAME_DEBUG
/* psa */
if
(
cs
->
debug
&
L1_DEB_LAPD
)
Logl2Frame
(
cs
,
skb
,
"PH_DATA"
,
0
);
#endif
W6692_fill_fifo
(
cs
);
}
xmit_data_req_d
(
cs
,
skb
);
break
;
case
(
PH_PULL
|
INDICATION
):
if
(
cs
->
tx_skb
)
{
...
...
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