diff options
author | Byungho An <bh74.an@samsung.com> | 2014-04-29 00:15:27 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-04-30 16:12:22 -0400 |
commit | 3dc638d13aced7baad40517a3d70b3b43bf6b90f (patch) | |
tree | 71e6d8a495920021ee75e51303e3fbc508760ef5 /drivers/net | |
parent | 325b94f7e63080f3e371e35f063a8be138c1873b (diff) |
net: sxgbe: Added set function for interrupt on complete
This patch adds set_rx_int_on_com function for interrupt when
dma is completed.
Signed-off-by: Byungho An <bh74.an@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.c | 7 | ||||
-rw-r--r-- | drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.h | 3 | ||||
-rw-r--r-- | drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c | 1 |
3 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.c b/drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.c index d71691be4136..2686bb5b6765 100644 --- a/drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.c +++ b/drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.c | |||
@@ -233,6 +233,12 @@ static void sxgbe_set_rx_owner(struct sxgbe_rx_norm_desc *p) | |||
233 | p->rdes23.rx_rd_des23.own_bit = 1; | 233 | p->rdes23.rx_rd_des23.own_bit = 1; |
234 | } | 234 | } |
235 | 235 | ||
236 | /* Set Interrupt on completion bit */ | ||
237 | static void sxgbe_set_rx_int_on_com(struct sxgbe_rx_norm_desc *p) | ||
238 | { | ||
239 | p->rdes23.rx_rd_des23.int_on_com = 1; | ||
240 | } | ||
241 | |||
236 | /* Get the receive frame size */ | 242 | /* Get the receive frame size */ |
237 | static int sxgbe_get_rx_frame_len(struct sxgbe_rx_norm_desc *p) | 243 | static int sxgbe_get_rx_frame_len(struct sxgbe_rx_norm_desc *p) |
238 | { | 244 | { |
@@ -498,6 +504,7 @@ static const struct sxgbe_desc_ops desc_ops = { | |||
498 | .init_rx_desc = sxgbe_init_rx_desc, | 504 | .init_rx_desc = sxgbe_init_rx_desc, |
499 | .get_rx_owner = sxgbe_get_rx_owner, | 505 | .get_rx_owner = sxgbe_get_rx_owner, |
500 | .set_rx_owner = sxgbe_set_rx_owner, | 506 | .set_rx_owner = sxgbe_set_rx_owner, |
507 | .set_rx_int_on_com = sxgbe_set_rx_int_on_com, | ||
501 | .get_rx_frame_len = sxgbe_get_rx_frame_len, | 508 | .get_rx_frame_len = sxgbe_get_rx_frame_len, |
502 | .get_rx_fd_status = sxgbe_get_rx_fd_status, | 509 | .get_rx_fd_status = sxgbe_get_rx_fd_status, |
503 | .get_rx_ld_status = sxgbe_get_rx_ld_status, | 510 | .get_rx_ld_status = sxgbe_get_rx_ld_status, |
diff --git a/drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.h b/drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.h index 022630098aea..18609324db72 100644 --- a/drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.h +++ b/drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.h | |||
@@ -258,6 +258,9 @@ struct sxgbe_desc_ops { | |||
258 | /* Set own bit */ | 258 | /* Set own bit */ |
259 | void (*set_rx_owner)(struct sxgbe_rx_norm_desc *p); | 259 | void (*set_rx_owner)(struct sxgbe_rx_norm_desc *p); |
260 | 260 | ||
261 | /* Set Interrupt on completion bit */ | ||
262 | void (*set_rx_int_on_com)(struct sxgbe_rx_norm_desc *p); | ||
263 | |||
261 | /* Get the receive frame size */ | 264 | /* Get the receive frame size */ |
262 | int (*get_rx_frame_len)(struct sxgbe_rx_norm_desc *p); | 265 | int (*get_rx_frame_len)(struct sxgbe_rx_norm_desc *p); |
263 | 266 | ||
diff --git a/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c b/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c index fd5c428411eb..82a9a983869f 100644 --- a/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c +++ b/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c | |||
@@ -1456,6 +1456,7 @@ static void sxgbe_rx_refill(struct sxgbe_priv_data *priv) | |||
1456 | /* Added memory barrier for RX descriptor modification */ | 1456 | /* Added memory barrier for RX descriptor modification */ |
1457 | wmb(); | 1457 | wmb(); |
1458 | priv->hw->desc->set_rx_owner(p); | 1458 | priv->hw->desc->set_rx_owner(p); |
1459 | priv->hw->desc->set_rx_int_on_com(p); | ||
1459 | /* Added memory barrier for RX descriptor modification */ | 1460 | /* Added memory barrier for RX descriptor modification */ |
1460 | wmb(); | 1461 | wmb(); |
1461 | } | 1462 | } |