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
05d018c2
Commit
05d018c2
authored
May 29, 2003
by
Chas Williams
Committed by
David S. Miller
May 29, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ATM]: Move rategrid off stack in HE driver.
parent
79824a43
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
drivers/atm/he.c
drivers/atm/he.c
+15
-7
No files found.
drivers/atm/he.c
View file @
05d018c2
...
...
@@ -669,10 +669,10 @@ he_init_cs_block(struct he_dev *he_dev)
}
static
void
__init
static
int
__init
he_init_cs_block_rcm
(
struct
he_dev
*
he_dev
)
{
unsigned
rategrid
[
16
][
16
];
unsigned
(
*
rategrid
)
[
16
][
16
];
unsigned
rate
,
delta
;
int
i
,
j
,
reg
;
...
...
@@ -680,6 +680,10 @@ he_init_cs_block_rcm(struct he_dev *he_dev)
unsigned
long
long
rate_cps
;
int
mult
,
buf
,
buf_limit
=
4
;
rategrid
=
kmalloc
(
sizeof
(
unsigned
)
*
16
*
16
,
GFP_KERNEL
);
if
(
!
rategrid
)
return
-
ENOMEM
;
/* initialize rate grid group table */
for
(
reg
=
0x0
;
reg
<
0xff
;
++
reg
)
...
...
@@ -709,16 +713,16 @@ he_init_cs_block_rcm(struct he_dev *he_dev)
*/
for
(
j
=
0
;
j
<
16
;
j
++
)
{
rategrid
[
0
][
j
]
=
rate
;
(
*
rategrid
)
[
0
][
j
]
=
rate
;
rate
-=
delta
;
}
for
(
i
=
1
;
i
<
16
;
i
++
)
for
(
j
=
0
;
j
<
16
;
j
++
)
if
(
i
>
14
)
rategrid
[
i
][
j
]
=
rategrid
[
i
-
1
][
j
]
/
4
;
(
*
rategrid
)[
i
][
j
]
=
(
*
rategrid
)
[
i
-
1
][
j
]
/
4
;
else
rategrid
[
i
][
j
]
=
rategrid
[
i
-
1
][
j
]
/
2
;
(
*
rategrid
)[
i
][
j
]
=
(
*
rategrid
)
[
i
-
1
][
j
]
/
2
;
/*
* 2.4 transmit internal function
...
...
@@ -743,7 +747,7 @@ he_init_cs_block_rcm(struct he_dev *he_dev)
rate_cps
=
10
;
/* 2.2.1 minimum payload rate is 10 cps */
for
(
i
=
255
;
i
>
0
;
i
--
)
if
(
rategrid
[
i
/
16
][
i
%
16
]
>=
rate_cps
)
if
(
(
*
rategrid
)
[
i
/
16
][
i
%
16
]
>=
rate_cps
)
break
;
/* pick nearest rate instead? */
/*
...
...
@@ -780,6 +784,9 @@ he_init_cs_block_rcm(struct he_dev *he_dev)
++
rate_atmf
;
}
kfree
(
rategrid
);
return
0
;
}
static
int
__init
...
...
@@ -1477,7 +1484,8 @@ he_start(struct atm_dev *dev)
/* 5.1.8 cs block connection memory initialization */
he_init_cs_block_rcm
(
he_dev
);
if
(
he_init_cs_block_rcm
(
he_dev
)
<
0
)
return
-
ENOMEM
;
/* 5.1.10 initialize host structures */
...
...
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