Message ID | 1350427518-7230-3-git-send-email-mugunthanvnm@ti.com |
---|---|
State | Deferred, archived |
Delegated to: | David Miller |
Headers | show |
On Wed, Oct 17, 2012 at 04:15:14AM +0530, Mugunthan V N wrote: > Adding api to clear statistics interrupt which is generated by > CPTS event pend, stat pend, mdio interrupts As I said, we don't need or want the interrupt for the CPTS. If you want to add this for the statistics function, go right ahead, but please make a separate patch or series for that. Thanks, Richard -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
> -----Original Message----- > From: Richard Cochran [mailto:richardcochran@gmail.com] > Sent: Thursday, October 18, 2012 8:18 AM > To: N, Mugunthan V > Cc: netdev@vger.kernel.org; davem@davemloft.net > Subject: Re: [PATCH 2/6] drivers: net: ethernet: davinci_cpdma: add > clear api for statistics interrupt > > On Wed, Oct 17, 2012 at 04:15:14AM +0530, Mugunthan V N wrote: > > Adding api to clear statistics interrupt which is generated by > > CPTS event pend, stat pend, mdio interrupts > > As I said, we don't need or want the interrupt for the CPTS. If you > want to add this for the statistics function, go right ahead, but > please make a separate patch or series for that. > What happens when Hardware timestamps are used? It will be good to notify the application immediately using the interrupts instead of using workqueue which can delay the event in hardware for max about HZ*8. Regards Mugunthan V N -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Oct 22, 2012 at 10:42:26AM +0000, N, Mugunthan V wrote: > > What happens when Hardware timestamps are used? They are not being used. > It will be good to > notify the application immediately using the interrupts instead of > using workqueue which can delay the event in hardware for max about > HZ*8. Yes, it would make sense to use the interrupt in that case, but I did not see any code supporting external events. In any case, I still want to handle the overflow in the same way as in the other PHC drivers, for the sake of consistency, and to avoid wasting CPU time "in interrupt" with silly counter overflow code. Thanks, Richard -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethernet/ti/davinci_cpdma.c index d15c888..656712c 100644 --- a/drivers/net/ethernet/ti/davinci_cpdma.c +++ b/drivers/net/ethernet/ti/davinci_cpdma.c @@ -63,6 +63,8 @@ #define CPDMA_TEARDOWN_VALUE 0xfffffffc +#define CPDMA_STAT_PEND_EOI 0x3 + struct cpdma_desc { /* hardware fields */ u32 hw_next; @@ -479,6 +481,12 @@ void cpdma_ctlr_eoi(struct cpdma_ctlr *ctlr) dma_reg_write(ctlr, CPDMA_MACEOIVECTOR, 0); } +void cpdma_ctlr_eoi_statistics(struct cpdma_ctlr *ctlr) +{ + dma_reg_write(ctlr, CPDMA_MACEOIVECTOR, CPDMA_STAT_PEND_EOI); +} +EXPORT_SYMBOL_GPL(cpdma_ctlr_eoi_statistics); + struct cpdma_chan *cpdma_chan_create(struct cpdma_ctlr *ctlr, int chan_num, cpdma_handler_fn handler) { diff --git a/drivers/net/ethernet/ti/davinci_cpdma.h b/drivers/net/ethernet/ti/davinci_cpdma.h index afa19a0..e25e9d5 100644 --- a/drivers/net/ethernet/ti/davinci_cpdma.h +++ b/drivers/net/ethernet/ti/davinci_cpdma.h @@ -87,6 +87,7 @@ int cpdma_chan_process(struct cpdma_chan *chan, int quota); int cpdma_ctlr_int_ctrl(struct cpdma_ctlr *ctlr, bool enable); void cpdma_ctlr_eoi(struct cpdma_ctlr *ctlr); +void cpdma_ctlr_eoi_statistics(struct cpdma_ctlr *ctlr); int cpdma_chan_int_ctrl(struct cpdma_chan *chan, bool enable); enum cpdma_control {
Adding api to clear statistics interrupt which is generated by CPTS event pend, stat pend, mdio interrupts Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> --- drivers/net/ethernet/ti/davinci_cpdma.c | 8 ++++++++ drivers/net/ethernet/ti/davinci_cpdma.h | 1 + 2 files changed, 9 insertions(+), 0 deletions(-)