Re: [PATCH/RFC v6 net-next] ravb: Add dma queue interrupt support

From
Yoshihiro Kaneko <hidden>
Date
2016-03-08 17:18:07
Also in
linux-sh
Reply to
Yoshihiro Kaneko, 2016-02-28
Hi Sergei-san,

2016-02-29 0:41 GMT+09:00 Yoshihiro Kaneko [off-list ref]:

[snip]
+static bool ravb_timestamp_interrupt(struct net_device *ndev, u32 tis)
+{
I'd like to read TIS here like ravb_queue_interrupt().

quoted hunk ↗ jump to hunk
+       if (tis & TIS_TFUF) {
+               ravb_write(ndev, ~TIS_TFUF, TIS);
+               ravb_get_tx_tstamp(ndev);
+               return true;
+       }
+       return false;
+}
[snip]
quoted hunk ↗ jump to hunk
+/* Timestamp/Error/gPTP interrupt handler */
+static irqreturn_t ravb_multi_interrupt(int irq, void *dev_id)
+{
+       struct net_device *ndev = dev_id;
+       struct ravb_private *priv = netdev_priv(ndev);
+       irqreturn_t result = IRQ_NONE;
+       u32 iss, tis;
+
+       spin_lock(&priv->lock);
+       /* Get interrupt status */
+       iss = ravb_read(ndev, ISS);
+
+       /* Timestamp updated */
+       if (iss & ISS_TFUS) {
+               tis  = ravb_read(ndev, TIS);
+               if (ravb_timestamp_interrupt(ndev, tis))
+                       result = IRQ_HANDLED;
+       }
+
+       /* Error status summary */
+       if (iss & ISS_ES) {
+               ravb_error_interrupt(ndev);
+               result = IRQ_HANDLED;
+       }
+
+       /* gPTP interrupt status summary */
+       if (iss & ISS_CGIS)
+               result = ravb_ptp_interrupt(ndev);
This assignment overwrites the result above.
How about this?
    if ((iss & ISS_CGIS) && ravb_ptp_interrupt(ndev) == IRQ_HANDLED)
            result = IRQ_HANDLED;

quoted hunk ↗ jump to hunk
+
+       mmiowb();
+       spin_unlock(&priv->lock);
+       return result;
+}
[snip]


Thanks,
kaneko
Thread (6 messages) 6 messages, 2 authors, last reply 2016-03-08
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help