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
6f5abb00
Commit
6f5abb00
authored
Apr 09, 2004
by
Chas Williams
Committed by
David S. Miller
Apr 09, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ATM]: [nicstar] using dev_alloc_skb() (reported by Johnston,
parent
cd73f644
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
drivers/atm/nicstar.c
drivers/atm/nicstar.c
+20
-20
No files found.
drivers/atm/nicstar.c
View file @
6f5abb00
...
...
@@ -757,7 +757,7 @@ static int __devinit ns_init_card(int i, struct pci_dev *pcidev)
for
(
j
=
0
;
j
<
NUM_HB
;
j
++
)
{
struct
sk_buff
*
hb
;
hb
=
alloc_skb
(
NS_HBUFSIZE
,
GFP_KERNEL
);
hb
=
__dev_
alloc_skb
(
NS_HBUFSIZE
,
GFP_KERNEL
);
if
(
hb
==
NULL
)
{
printk
(
"nicstar%d: can't allocate %dth of %d huge buffers.
\n
"
,
...
...
@@ -777,7 +777,7 @@ static int __devinit ns_init_card(int i, struct pci_dev *pcidev)
for
(
j
=
0
;
j
<
NUM_LB
;
j
++
)
{
struct
sk_buff
*
lb
;
lb
=
alloc_skb
(
NS_LGSKBSIZE
,
GFP_KERNEL
);
lb
=
__dev_
alloc_skb
(
NS_LGSKBSIZE
,
GFP_KERNEL
);
if
(
lb
==
NULL
)
{
printk
(
"nicstar%d: can't allocate %dth of %d large buffers.
\n
"
,
...
...
@@ -813,7 +813,7 @@ static int __devinit ns_init_card(int i, struct pci_dev *pcidev)
for
(
j
=
0
;
j
<
NUM_SB
;
j
++
)
{
struct
sk_buff
*
sb
;
sb
=
alloc_skb
(
NS_SMSKBSIZE
,
GFP_KERNEL
);
sb
=
__dev_
alloc_skb
(
NS_SMSKBSIZE
,
GFP_KERNEL
);
if
(
sb
==
NULL
)
{
printk
(
"nicstar%d: can't allocate %dth of %d small buffers.
\n
"
,
...
...
@@ -1315,7 +1315,7 @@ static irqreturn_t ns_irq_handler(int irq, void *dev_id, struct pt_regs *regs)
card
->
index
);
for
(
i
=
0
;
i
<
card
->
sbnr
.
min
;
i
++
)
{
sb
=
alloc_skb
(
NS_SMSKBSIZE
,
GFP_ATOMIC
);
sb
=
dev_alloc_skb
(
NS_SMSKBSIZE
);
if
(
sb
==
NULL
)
{
writel
(
readl
(
card
->
membase
+
CFG
)
&
~
NS_CFG_EFBIE
,
card
->
membase
+
CFG
);
...
...
@@ -1341,7 +1341,7 @@ static irqreturn_t ns_irq_handler(int irq, void *dev_id, struct pt_regs *regs)
card
->
index
);
for
(
i
=
0
;
i
<
card
->
lbnr
.
min
;
i
++
)
{
lb
=
alloc_skb
(
NS_LGSKBSIZE
,
GFP_ATOMIC
);
lb
=
dev_alloc_skb
(
NS_LGSKBSIZE
);
if
(
lb
==
NULL
)
{
writel
(
readl
(
card
->
membase
+
CFG
)
&
~
NS_CFG_EFBIE
,
card
->
membase
+
CFG
);
...
...
@@ -2178,7 +2178,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe)
cell
=
skb
->
data
;
for
(
i
=
ns_rsqe_cellcount
(
rsqe
);
i
;
i
--
)
{
if
((
sb
=
alloc_skb
(
NS_SMSKBSIZE
,
GFP_ATOMIC
))
==
NULL
)
if
((
sb
=
dev_alloc_skb
(
NS_SMSKBSIZE
))
==
NULL
)
{
printk
(
"nicstar%d: Can't allocate buffers for aal0.
\n
"
,
card
->
index
);
...
...
@@ -2410,7 +2410,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe)
if
(
hb
==
NULL
)
/* No buffers in the queue */
{
hb
=
alloc_skb
(
NS_HBUFSIZE
,
GFP_ATOMIC
);
hb
=
dev_alloc_skb
(
NS_HBUFSIZE
);
if
(
hb
==
NULL
)
{
printk
(
"nicstar%d: Out of huge buffers.
\n
"
,
card
->
index
);
...
...
@@ -2424,7 +2424,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe)
else
if
(
card
->
hbpool
.
count
<
card
->
hbnr
.
min
)
{
struct
sk_buff
*
new_hb
;
if
((
new_hb
=
alloc_skb
(
NS_HBUFSIZE
,
GFP_ATOMIC
))
!=
NULL
)
if
((
new_hb
=
dev_alloc_skb
(
NS_HBUFSIZE
))
!=
NULL
)
{
skb_queue_tail
(
&
card
->
hbpool
.
queue
,
new_hb
);
card
->
hbpool
.
count
++
;
...
...
@@ -2435,14 +2435,14 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe)
if
(
--
card
->
hbpool
.
count
<
card
->
hbnr
.
min
)
{
struct
sk_buff
*
new_hb
;
if
((
new_hb
=
alloc_skb
(
NS_HBUFSIZE
,
GFP_ATOMIC
))
!=
NULL
)
if
((
new_hb
=
dev_alloc_skb
(
NS_HBUFSIZE
))
!=
NULL
)
{
skb_queue_tail
(
&
card
->
hbpool
.
queue
,
new_hb
);
card
->
hbpool
.
count
++
;
}
if
(
card
->
hbpool
.
count
<
card
->
hbnr
.
min
)
{
if
((
new_hb
=
alloc_skb
(
NS_HBUFSIZE
,
GFP_ATOMIC
))
!=
NULL
)
if
((
new_hb
=
dev_alloc_skb
(
NS_HBUFSIZE
))
!=
NULL
)
{
skb_queue_tail
(
&
card
->
hbpool
.
queue
,
new_hb
);
card
->
hbpool
.
count
++
;
...
...
@@ -2524,7 +2524,7 @@ static void ns_sb_destructor(struct sk_buff *sb)
do
{
sb
=
alloc_skb
(
NS_SMSKBSIZE
,
GFP_KERNEL
);
sb
=
__dev_
alloc_skb
(
NS_SMSKBSIZE
,
GFP_KERNEL
);
if
(
sb
==
NULL
)
break
;
skb_queue_tail
(
&
card
->
sbpool
.
queue
,
sb
);
...
...
@@ -2547,7 +2547,7 @@ static void ns_lb_destructor(struct sk_buff *lb)
do
{
lb
=
alloc_skb
(
NS_LGSKBSIZE
,
GFP_KERNEL
);
lb
=
__dev_
alloc_skb
(
NS_LGSKBSIZE
,
GFP_KERNEL
);
if
(
lb
==
NULL
)
break
;
skb_queue_tail
(
&
card
->
lbpool
.
queue
,
lb
);
...
...
@@ -2566,7 +2566,7 @@ static void ns_hb_destructor(struct sk_buff *hb)
while
(
card
->
hbpool
.
count
<
card
->
hbnr
.
init
)
{
hb
=
alloc_skb
(
NS_HBUFSIZE
,
GFP_KERNEL
);
hb
=
__dev_
alloc_skb
(
NS_HBUFSIZE
,
GFP_KERNEL
);
if
(
hb
==
NULL
)
break
;
skb_queue_tail
(
&
card
->
hbpool
.
queue
,
hb
);
...
...
@@ -2638,7 +2638,7 @@ static void dequeue_sm_buf(ns_dev *card, struct sk_buff *sb)
if
(
card
->
sbfqc
<
card
->
sbnr
.
init
)
{
struct
sk_buff
*
new_sb
;
if
((
new_sb
=
alloc_skb
(
NS_SMSKBSIZE
,
GFP_ATOMIC
))
!=
NULL
)
if
((
new_sb
=
dev_alloc_skb
(
NS_SMSKBSIZE
))
!=
NULL
)
{
skb_queue_tail
(
&
card
->
sbpool
.
queue
,
new_sb
);
skb_reserve
(
new_sb
,
NS_AAL0_HEADER
);
...
...
@@ -2650,7 +2650,7 @@ static void dequeue_sm_buf(ns_dev *card, struct sk_buff *sb)
#endif
/* NS_USE_DESTRUCTORS */
{
struct
sk_buff
*
new_sb
;
if
((
new_sb
=
alloc_skb
(
NS_SMSKBSIZE
,
GFP_ATOMIC
))
!=
NULL
)
if
((
new_sb
=
dev_alloc_skb
(
NS_SMSKBSIZE
))
!=
NULL
)
{
skb_queue_tail
(
&
card
->
sbpool
.
queue
,
new_sb
);
skb_reserve
(
new_sb
,
NS_AAL0_HEADER
);
...
...
@@ -2671,7 +2671,7 @@ static void dequeue_lg_buf(ns_dev *card, struct sk_buff *lb)
if
(
card
->
lbfqc
<
card
->
lbnr
.
init
)
{
struct
sk_buff
*
new_lb
;
if
((
new_lb
=
alloc_skb
(
NS_LGSKBSIZE
,
GFP_ATOMIC
))
!=
NULL
)
if
((
new_lb
=
dev_alloc_skb
(
NS_LGSKBSIZE
))
!=
NULL
)
{
skb_queue_tail
(
&
card
->
lbpool
.
queue
,
new_lb
);
skb_reserve
(
new_lb
,
NS_SMBUFSIZE
);
...
...
@@ -2683,7 +2683,7 @@ static void dequeue_lg_buf(ns_dev *card, struct sk_buff *lb)
#endif
/* NS_USE_DESTRUCTORS */
{
struct
sk_buff
*
new_lb
;
if
((
new_lb
=
alloc_skb
(
NS_LGSKBSIZE
,
GFP_ATOMIC
))
!=
NULL
)
if
((
new_lb
=
dev_alloc_skb
(
NS_LGSKBSIZE
))
!=
NULL
)
{
skb_queue_tail
(
&
card
->
lbpool
.
queue
,
new_lb
);
skb_reserve
(
new_lb
,
NS_SMBUFSIZE
);
...
...
@@ -2877,7 +2877,7 @@ static int ns_ioctl(struct atm_dev *dev, unsigned int cmd, void *arg)
{
struct
sk_buff
*
sb
;
sb
=
alloc_skb
(
NS_SMSKBSIZE
,
GFP_KERNEL
);
sb
=
__dev_
alloc_skb
(
NS_SMSKBSIZE
,
GFP_KERNEL
);
if
(
sb
==
NULL
)
return
-
ENOMEM
;
skb_queue_tail
(
&
card
->
sbpool
.
queue
,
sb
);
...
...
@@ -2891,7 +2891,7 @@ static int ns_ioctl(struct atm_dev *dev, unsigned int cmd, void *arg)
{
struct
sk_buff
*
lb
;
lb
=
alloc_skb
(
NS_LGSKBSIZE
,
GFP_KERNEL
);
lb
=
__dev_
alloc_skb
(
NS_LGSKBSIZE
,
GFP_KERNEL
);
if
(
lb
==
NULL
)
return
-
ENOMEM
;
skb_queue_tail
(
&
card
->
lbpool
.
queue
,
lb
);
...
...
@@ -2920,7 +2920,7 @@ static int ns_ioctl(struct atm_dev *dev, unsigned int cmd, void *arg)
{
struct
sk_buff
*
hb
;
hb
=
alloc_skb
(
NS_HBUFSIZE
,
GFP_KERNEL
);
hb
=
__dev_
alloc_skb
(
NS_HBUFSIZE
,
GFP_KERNEL
);
if
(
hb
==
NULL
)
return
-
ENOMEM
;
ns_grab_int_lock
(
card
,
flags
);
...
...
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