提交 cd238faa 编写于 作者: B Benjamin Li 提交者: Jeff Garzik

qla3xxx: Changed to use netdev_alloc_skb() from dev_alloc_skb

Signed-off-by: NBenjamin Li <benjamin.li@qlogic.com>
Signed-off-by: NRon Mercer <ron.mercer@qlogic.com>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 d2d76b8d
...@@ -287,9 +287,10 @@ static void ql_release_to_lrg_buf_free_list(struct ql3_adapter *qdev, ...@@ -287,9 +287,10 @@ static void ql_release_to_lrg_buf_free_list(struct ql3_adapter *qdev,
} }
if (!lrg_buf_cb->skb) { if (!lrg_buf_cb->skb) {
lrg_buf_cb->skb = dev_alloc_skb(qdev->lrg_buffer_len); lrg_buf_cb->skb = netdev_alloc_skb(qdev->ndev,
qdev->lrg_buffer_len);
if (unlikely(!lrg_buf_cb->skb)) { if (unlikely(!lrg_buf_cb->skb)) {
printk(KERN_ERR PFX "%s: failed dev_alloc_skb().\n", printk(KERN_ERR PFX "%s: failed netdev_alloc_skb().\n",
qdev->ndev->name); qdev->ndev->name);
qdev->lrg_buf_skb_check++; qdev->lrg_buf_skb_check++;
} else { } else {
...@@ -1619,10 +1620,11 @@ static int ql_populate_free_queue(struct ql3_adapter *qdev) ...@@ -1619,10 +1620,11 @@ static int ql_populate_free_queue(struct ql3_adapter *qdev)
while (lrg_buf_cb) { while (lrg_buf_cb) {
if (!lrg_buf_cb->skb) { if (!lrg_buf_cb->skb) {
lrg_buf_cb->skb = dev_alloc_skb(qdev->lrg_buffer_len); lrg_buf_cb->skb = netdev_alloc_skb(qdev->ndev,
qdev->lrg_buffer_len);
if (unlikely(!lrg_buf_cb->skb)) { if (unlikely(!lrg_buf_cb->skb)) {
printk(KERN_DEBUG PFX printk(KERN_DEBUG PFX
"%s: Failed dev_alloc_skb().\n", "%s: Failed netdev_alloc_skb().\n",
qdev->ndev->name); qdev->ndev->name);
break; break;
} else { } else {
...@@ -2514,7 +2516,8 @@ static int ql_alloc_large_buffers(struct ql3_adapter *qdev) ...@@ -2514,7 +2516,8 @@ static int ql_alloc_large_buffers(struct ql3_adapter *qdev)
u64 map; u64 map;
for (i = 0; i < NUM_LARGE_BUFFERS; i++) { for (i = 0; i < NUM_LARGE_BUFFERS; i++) {
skb = dev_alloc_skb(qdev->lrg_buffer_len); skb = netdev_alloc_skb(qdev->ndev,
qdev->lrg_buffer_len);
if (unlikely(!skb)) { if (unlikely(!skb)) {
/* Better luck next round */ /* Better luck next round */
printk(KERN_ERR PFX printk(KERN_ERR PFX
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册