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
68ad0509
Commit
68ad0509
authored
Aug 19, 2003
by
Chas Williams
Committed by
Stephen Hemminger
Aug 19, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ATM]: atmdev api cleanup -- remove sg_send() and feedback() (mitch@sfgoth.com).
parent
635d0b51
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
8 additions
and
148 deletions
+8
-148
drivers/atm/ambassador.c
drivers/atm/ambassador.c
+0
-28
drivers/atm/eni.c
drivers/atm/eni.c
+0
-10
drivers/atm/firestream.c
drivers/atm/firestream.c
+0
-10
drivers/atm/he.c
drivers/atm/he.c
+0
-12
drivers/atm/horizon.c
drivers/atm/horizon.c
+0
-13
drivers/atm/idt77252.c
drivers/atm/idt77252.c
+1
-1
drivers/atm/iphase.c
drivers/atm/iphase.c
+0
-9
drivers/atm/lanai.c
drivers/atm/lanai.c
+0
-3
drivers/atm/zatm.c
drivers/atm/zatm.c
+0
-44
include/linux/atmdev.h
include/linux/atmdev.h
+7
-15
net/atm/common.c
net/atm/common.c
+0
-3
No files found.
drivers/atm/ambassador.c
View file @
68ad0509
...
...
@@ -1556,33 +1556,6 @@ static int amb_send (struct atm_vcc * atm_vcc, struct sk_buff * skb) {
return
0
;
}
/********** Scatter Gather Send Capability **********/
static
int
amb_sg_send
(
struct
atm_vcc
*
atm_vcc
,
unsigned
long
start
,
unsigned
long
size
)
{
PRINTD
(
DBG_FLOW
|
DBG_VCC
,
"amb_sg_send: never"
);
return
0
;
if
(
atm_vcc
->
qos
.
aal
==
ATM_AAL5
)
{
PRINTD
(
DBG_FLOW
|
DBG_VCC
,
"amb_sg_send: yes"
);
return
1
;
}
else
{
PRINTD
(
DBG_FLOW
|
DBG_VCC
,
"amb_sg_send: no"
);
return
0
;
}
PRINTD
(
DBG_FLOW
|
DBG_VCC
,
"amb_sg_send: always"
);
return
1
;
}
/********** Send OAM **********/
// static int amb_send_oam (struct atm_vcc * atm_vcc, void * cell, int flags);
/********** Feedback to Driver **********/
// void amb_feedback (struct atm_vcc * atm_vcc, struct sk_buff * skb,
// unsigned long start, unsigned long dest, int len);
/********** Change QoS on a VC **********/
// int amb_change_qos (struct atm_vcc * atm_vcc, struct atm_qos * qos, int flags);
...
...
@@ -1693,7 +1666,6 @@ static const struct atmdev_ops amb_ops = {
.
open
=
amb_open
,
.
close
=
amb_close
,
.
send
=
amb_send
,
.
sg_send
=
amb_sg_send
,
.
proc_read
=
amb_proc_read
,
.
owner
=
THIS_MODULE
,
};
...
...
drivers/atm/eni.c
View file @
68ad0509
...
...
@@ -2122,15 +2122,6 @@ backlogged++;
return
0
;
}
static
int
eni_sg_send
(
struct
atm_vcc
*
vcc
,
unsigned
long
start
,
unsigned
long
size
)
{
return
vcc
->
qos
.
aal
==
ATM_AAL5
&&
!
((
start
|
size
)
&
3
);
/* don't tolerate misalignment */
}
static
void
eni_phy_put
(
struct
atm_dev
*
dev
,
unsigned
char
value
,
unsigned
long
addr
)
{
...
...
@@ -2269,7 +2260,6 @@ static const struct atmdev_ops ops = {
.
getsockopt
=
eni_getsockopt
,
.
setsockopt
=
eni_setsockopt
,
.
send
=
eni_send
,
.
sg_send
=
eni_sg_send
,
.
phy_put
=
eni_phy_put
,
.
phy_get
=
eni_phy_get
,
.
change_qos
=
eni_change_qos
,
...
...
drivers/atm/firestream.c
View file @
68ad0509
...
...
@@ -1268,14 +1268,6 @@ static unsigned char fs_phy_get(struct atm_dev *dev,unsigned long addr)
}
static void fs_feedback(struct atm_vcc *vcc,struct sk_buff *skb,
unsigned long start,unsigned long dest,int len)
{
func_enter ();
func_exit ();
}
static int fs_change_qos(struct atm_vcc *vcc,struct atm_qos *qos,int flags)
{
func_enter ();
...
...
@@ -1293,11 +1285,9 @@ static const struct atmdev_ops ops = {
#if 0
.owner = THIS_MODULE,
#endif
/* fs_sg_send */
/* ioctl: fs_ioctl, */
/* getsockopt: fs_getsockopt, */
/* setsockopt: fs_setsockopt, */
/* feedback: fs_feedback, */
/* change_qos: fs_change_qos, */
/* For now implement these internally here... */
...
...
drivers/atm/he.c
View file @
68ad0509
...
...
@@ -138,7 +138,6 @@ static char *version = "$Id: he.c,v 1.18 2003/05/06 22:57:15 chas Exp $";
static
int
he_open
(
struct
atm_vcc
*
vcc
,
short
vpi
,
int
vci
);
static
void
he_close
(
struct
atm_vcc
*
vcc
);
static
int
he_send
(
struct
atm_vcc
*
vcc
,
struct
sk_buff
*
skb
);
static
int
he_sg_send
(
struct
atm_vcc
*
vcc
,
unsigned
long
start
,
unsigned
long
size
);
static
int
he_ioctl
(
struct
atm_dev
*
dev
,
unsigned
int
cmd
,
void
*
arg
);
static
irqreturn_t
he_irq_handler
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
);
static
void
he_tasklet
(
unsigned
long
data
);
...
...
@@ -166,7 +165,6 @@ static struct atmdev_ops he_ops =
.
close
=
he_close
,
.
ioctl
=
he_ioctl
,
.
send
=
he_send
,
.
sg_send
=
he_sg_send
,
.
phy_put
=
he_phy_put
,
.
phy_get
=
he_phy_get
,
.
proc_read
=
he_proc_read
,
...
...
@@ -2726,16 +2724,6 @@ he_close(struct atm_vcc *vcc)
clear_bit
(
ATM_VF_ADDR
,
&
vcc
->
flags
);
}
static
int
he_sg_send
(
struct
atm_vcc
*
vcc
,
unsigned
long
start
,
unsigned
long
size
)
{
#ifdef USE_SCATTERGATHER
return
1
;
#else
return
0
;
#endif
}
static
int
he_send
(
struct
atm_vcc
*
vcc
,
struct
sk_buff
*
skb
)
{
...
...
drivers/atm/horizon.c
View file @
68ad0509
...
...
@@ -2663,18 +2663,6 @@ static int hrz_setsockopt (struct atm_vcc * atm_vcc, int level, int optname,
}
#endif
static
int
hrz_sg_send
(
struct
atm_vcc
*
atm_vcc
,
unsigned
long
start
,
unsigned
long
size
)
{
if
(
atm_vcc
->
qos
.
aal
==
ATM_AAL5
)
{
PRINTD
(
DBG_FLOW
|
DBG_VCC
,
"hrz_sg_send: yes"
);
return
1
;
}
else
{
PRINTD
(
DBG_FLOW
|
DBG_VCC
,
"hrz_sg_send: no"
);
return
0
;
}
}
#if 0
static int hrz_ioctl (struct atm_dev * atm_dev, unsigned int cmd, void *arg) {
hrz_dev * dev = HRZ_DEV(atm_dev);
...
...
@@ -2748,7 +2736,6 @@ static const struct atmdev_ops hrz_ops = {
.
open
=
hrz_open
,
.
close
=
hrz_close
,
.
send
=
hrz_send
,
.
sg_send
=
hrz_sg_send
,
.
proc_read
=
hrz_proc_read
,
.
owner
=
THIS_MODULE
,
};
...
...
drivers/atm/idt77252.c
View file @
68ad0509
...
...
@@ -1954,7 +1954,7 @@ idt77252_phy_get(struct atm_dev *dev, unsigned long addr)
return
read_utility
(
dev
->
dev_data
,
0x100
+
(
addr
&
0x1ff
));
}
static
int
static
in
line
in
t
idt77252_send_skb
(
struct
atm_vcc
*
vcc
,
struct
sk_buff
*
skb
,
int
oam
)
{
struct
atm_dev
*
dev
=
vcc
->
dev
;
...
...
drivers/atm/iphase.c
View file @
68ad0509
...
...
@@ -3112,14 +3112,6 @@ static int ia_send(struct atm_vcc *vcc, struct sk_buff *skb)
}
static
int
ia_sg_send
(
struct
atm_vcc
*
vcc
,
unsigned
long
start
,
unsigned
long
size
)
{
IF_EVENT
(
printk
(
">ia_sg_send
\n
"
);)
return
0
;
}
static
int
ia_proc_read
(
struct
atm_dev
*
dev
,
loff_t
*
pos
,
char
*
page
)
{
int
left
=
*
pos
,
n
;
...
...
@@ -3179,7 +3171,6 @@ static const struct atmdev_ops ops = {
.
getsockopt
=
ia_getsockopt
,
.
setsockopt
=
ia_setsockopt
,
.
send
=
ia_send
,
.
sg_send
=
ia_sg_send
,
.
phy_put
=
ia_phy_put
,
.
phy_get
=
ia_phy_get
,
.
change_qos
=
ia_change_qos
,
...
...
drivers/atm/lanai.c
View file @
68ad0509
...
...
@@ -2788,11 +2788,8 @@ static const struct atmdev_ops ops = {
.
getsockopt
=
NULL
,
.
setsockopt
=
NULL
,
.
send
=
lanai_send
,
.
sg_send
=
NULL
,
/* no scatter-gather on card */
.
send_oam
=
NULL
,
/* OAM support not in linux yet */
.
phy_put
=
NULL
,
.
phy_get
=
NULL
,
.
feedback
=
NULL
,
.
change_qos
=
lanai_change_qos
,
.
proc_read
=
lanai_proc_read
};
...
...
drivers/atm/zatm.c
View file @
68ad0509
...
...
@@ -307,37 +307,6 @@ static void unuse_pool(struct atm_dev *dev,int pool)
drain_free
(
dev
,
pool
);
}
static
void
zatm_feedback
(
struct
atm_vcc
*
vcc
,
struct
sk_buff
*
skb
,
unsigned
long
start
,
unsigned
long
dest
,
int
len
)
{
struct
zatm_pool_info
*
pool
;
unsigned
long
offset
,
flags
;
struct
zatm_dev
*
zatm_dev
=
ZATM_DEV
(
vcc
->
dev
);
DPRINTK
(
"start 0x%08lx dest 0x%08lx len %d
\n
"
,
start
,
dest
,
len
);
if
(
len
<
PAGE_SIZE
)
return
;
pool
=
&
zatm_dev
->
pool_info
[
ZATM_VCC
(
vcc
)
->
pool
];
offset
=
(
dest
-
start
)
&
(
PAGE_SIZE
-
1
);
spin_lock_irqsave
(
&
zatm_dev
->
lock
,
flags
);
if
(
!
offset
||
pool
->
offset
==
offset
)
{
pool
->
next_cnt
=
0
;
spin_unlock_irqrestore
(
&
zatm_dev
->
lock
,
flags
);
return
;
}
if
(
offset
!=
pool
->
next_off
)
{
pool
->
next_off
=
offset
;
pool
->
next_cnt
=
0
;
spin_unlock_irqrestore
(
&
zatm_dev
->
lock
,
flags
);
return
;
}
if
(
++
pool
->
next_cnt
>=
pool
->
next_thres
)
{
pool
->
offset
=
pool
->
next_off
;
pool
->
next_cnt
=
0
;
}
spin_unlock_irqrestore
(
&
zatm_dev
->
lock
,
flags
);
}
/*----------------------------------- RX ------------------------------------*/
...
...
@@ -1548,17 +1517,6 @@ static int zatm_setsockopt(struct atm_vcc *vcc,int level,int optname,
return
-
EINVAL
;
}
#if 0
static int zatm_sg_send(struct atm_vcc *vcc,unsigned long start,
unsigned long size)
{
return vcc->aal == ATM_AAL5;
/* @@@ should check size and maybe alignment*/
}
#endif
static
int
zatm_send
(
struct
atm_vcc
*
vcc
,
struct
sk_buff
*
skb
)
{
int
error
;
...
...
@@ -1615,10 +1573,8 @@ static const struct atmdev_ops ops = {
.
getsockopt
=
zatm_getsockopt
,
.
setsockopt
=
zatm_setsockopt
,
.
send
=
zatm_send
,
/*zatm_sg_send*/
.
phy_put
=
zatm_phy_put
,
.
phy_get
=
zatm_phy_get
,
.
feedback
=
zatm_feedback
,
.
change_qos
=
zatm_change_qos
,
};
...
...
include/linux/atmdev.h
View file @
68ad0509
...
...
@@ -335,15 +335,16 @@ struct atm_dev {
struct
list_head
dev_list
;
/* linkage */
};
/* OF: send_Oam Flags */
/*
* ioctl, getsockopt, setsockopt, and sg_send are optional and can be set to
* NULL. */
#define ATM_OF_IMMED 1
/* Attempt immediate delivery */
#define ATM_OF_INRATE 2
/* Attempt in-rate delivery */
/* OF: send_Oam Flags */
#define ATM_OF_IMMED 1
/* Attempt immediate delivery */
#define ATM_OF_INRATE 2
/* Attempt in-rate delivery */
/*
* ioctl, getsockopt, and setsockopt are optional and can be set to NULL.
*/
struct
atmdev_ops
{
/* only send is required */
void
(
*
dev_close
)(
struct
atm_dev
*
dev
);
...
...
@@ -355,24 +356,15 @@ struct atmdev_ops { /* only send is required */
int
(
*
setsockopt
)(
struct
atm_vcc
*
vcc
,
int
level
,
int
optname
,
void
*
optval
,
int
optlen
);
int
(
*
send
)(
struct
atm_vcc
*
vcc
,
struct
sk_buff
*
skb
);
int
(
*
sg_send
)(
struct
atm_vcc
*
vcc
,
unsigned
long
start
,
unsigned
long
size
);
#if 0 /* keep the current hack for now */
int (*send_iovec)(struct atm_vcc *vcc,struct iovec *iov,int size,
void (*discard)(struct atm_vcc *vcc,void *user),void *user);
#endif
int
(
*
send_oam
)(
struct
atm_vcc
*
vcc
,
void
*
cell
,
int
flags
);
void
(
*
phy_put
)(
struct
atm_dev
*
dev
,
unsigned
char
value
,
unsigned
long
addr
);
unsigned
char
(
*
phy_get
)(
struct
atm_dev
*
dev
,
unsigned
long
addr
);
void
(
*
feedback
)(
struct
atm_vcc
*
vcc
,
struct
sk_buff
*
skb
,
unsigned
long
start
,
unsigned
long
dest
,
int
len
);
int
(
*
change_qos
)(
struct
atm_vcc
*
vcc
,
struct
atm_qos
*
qos
,
int
flags
);
int
(
*
proc_read
)(
struct
atm_dev
*
dev
,
loff_t
*
pos
,
char
*
page
);
struct
module
*
owner
;
};
struct
atmphy_ops
{
int
(
*
start
)(
struct
atm_dev
*
dev
);
int
(
*
ioctl
)(
struct
atm_dev
*
dev
,
unsigned
int
cmd
,
void
*
arg
);
...
...
net/atm/common.c
View file @
68ad0509
...
...
@@ -545,9 +545,6 @@ int vcc_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
if
(
error
)
return
error
;
sock_recv_timestamp
(
msg
,
sk
,
skb
);
if
(
vcc
->
dev
->
ops
->
feedback
)
vcc
->
dev
->
ops
->
feedback
(
vcc
,
skb
,
(
unsigned
long
)
skb
->
data
,
(
unsigned
long
)
msg
->
msg_iov
->
iov_base
,
copied
);
DPRINTK
(
"RcvM %d -= %d
\n
"
,
atomic_read
(
&
vcc
->
sk
->
rmem_alloc
),
skb
->
truesize
);
atm_return
(
vcc
,
skb
->
truesize
);
skb_free_datagram
(
sk
,
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