aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptlan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/message/fusion/mptlan.c')
-rw-r--r--drivers/message/fusion/mptlan.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/message/fusion/mptlan.c b/drivers/message/fusion/mptlan.c
index 014085d8ec85..73f59528212a 100644
--- a/drivers/message/fusion/mptlan.c
+++ b/drivers/message/fusion/mptlan.c
@@ -411,14 +411,12 @@ mpt_lan_open(struct net_device *dev)
411 goto out; 411 goto out;
412 priv->mpt_txfidx_tail = -1; 412 priv->mpt_txfidx_tail = -1;
413 413
414 priv->SendCtl = kmalloc(priv->tx_max_out * sizeof(struct BufferControl), 414 priv->SendCtl = kcalloc(priv->tx_max_out, sizeof(struct BufferControl),
415 GFP_KERNEL); 415 GFP_KERNEL);
416 if (priv->SendCtl == NULL) 416 if (priv->SendCtl == NULL)
417 goto out_mpt_txfidx; 417 goto out_mpt_txfidx;
418 for (i = 0; i < priv->tx_max_out; i++) { 418 for (i = 0; i < priv->tx_max_out; i++)
419 memset(&priv->SendCtl[i], 0, sizeof(struct BufferControl));
420 priv->mpt_txfidx[++priv->mpt_txfidx_tail] = i; 419 priv->mpt_txfidx[++priv->mpt_txfidx_tail] = i;
421 }
422 420
423 dlprintk((KERN_INFO MYNAM "@lo: Finished initializing SendCtl\n")); 421 dlprintk((KERN_INFO MYNAM "@lo: Finished initializing SendCtl\n"));
424 422
@@ -428,15 +426,13 @@ mpt_lan_open(struct net_device *dev)
428 goto out_SendCtl; 426 goto out_SendCtl;
429 priv->mpt_rxfidx_tail = -1; 427 priv->mpt_rxfidx_tail = -1;
430 428
431 priv->RcvCtl = kmalloc(priv->max_buckets_out * 429 priv->RcvCtl = kcalloc(priv->max_buckets_out,
432 sizeof(struct BufferControl), 430 sizeof(struct BufferControl),
433 GFP_KERNEL); 431 GFP_KERNEL);
434 if (priv->RcvCtl == NULL) 432 if (priv->RcvCtl == NULL)
435 goto out_mpt_rxfidx; 433 goto out_mpt_rxfidx;
436 for (i = 0; i < priv->max_buckets_out; i++) { 434 for (i = 0; i < priv->max_buckets_out; i++)
437 memset(&priv->RcvCtl[i], 0, sizeof(struct BufferControl));
438 priv->mpt_rxfidx[++priv->mpt_rxfidx_tail] = i; 435 priv->mpt_rxfidx[++priv->mpt_rxfidx_tail] = i;
439 }
440 436
441/**/ dlprintk((KERN_INFO MYNAM "/lo: txfidx contains - ")); 437/**/ dlprintk((KERN_INFO MYNAM "/lo: txfidx contains - "));
442/**/ for (i = 0; i < priv->tx_max_out; i++) 438/**/ for (i = 0; i < priv->tx_max_out; i++)
@@ -848,7 +844,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, struct net_device *dev)
848} 844}
849 845
850/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 846/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
851static inline void 847static void
852mpt_lan_wake_post_buckets_task(struct net_device *dev, int priority) 848mpt_lan_wake_post_buckets_task(struct net_device *dev, int priority)
853/* 849/*
854 * @priority: 0 = put it on the timer queue, 1 = put it on the immediate queue 850 * @priority: 0 = put it on the timer queue, 1 = put it on the immediate queue
@@ -870,7 +866,7 @@ mpt_lan_wake_post_buckets_task(struct net_device *dev, int priority)
870} 866}
871 867
872/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 868/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
873static inline int 869static int
874mpt_lan_receive_skb(struct net_device *dev, struct sk_buff *skb) 870mpt_lan_receive_skb(struct net_device *dev, struct sk_buff *skb)
875{ 871{
876 struct mpt_lan_priv *priv = dev->priv; 872 struct mpt_lan_priv *priv = dev->priv;