Thread (15 messages) read the whole thread 15 messages, 3 authors, 2017-06-08

RE: [PATCH v2 4/4] net: macb: Add hardware PTP support

From: Rafal Ozieblo <hidden>
Date: 2017-06-06 08:54:59
Also in: linux-arm-kernel, lkml, netdev

From: Richard Cochran [mailto:richardcochran@gmail.com]
Sent: 4 czerwca 2017 22:55
To: Rafal Ozieblo <redacted>
Cc: David Miller <davem@davemloft.net>; nicolas.ferre@atmel.com;
netdev@vger.kernel.org; linux-kernel@vger.kernel.org;
devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
harini.katakam@xilinx.com; andrei.pistirica@microchip.com
Subject: Re: [PATCH v2 4/4] net: macb: Add hardware PTP support

On Fri, Jun 02, 2017 at 03:28:10PM +0100, Rafal Ozieblo wrote:
quoted
+int gem_get_hwtst(struct net_device *dev, struct ifreq *rq)
+{
+	struct macb *bp = netdev_priv(dev);
+	struct hwtstamp_config *tstamp_config = &bp->tstamp_config;
+
+	if ((bp->hw_dma_cap & HW_DMA_CAP_PTP) == 0)
+		return -EFAULT;
Segmentation fault?  Really?

...
quoted
+int gem_set_hwtst(struct net_device *dev, struct ifreq *ifr, int cmd)
+{
+	struct macb *bp = netdev_priv(dev);
+	struct hwtstamp_config *tstamp_config = &bp->tstamp_config;
+	enum macb_bd_control tx_bd_control = TSTAMP_DISABLED;
+	enum macb_bd_control rx_bd_control = TSTAMP_DISABLED;
+	u32 regval;
+
+	if ((bp->hw_dma_cap & HW_DMA_CAP_PTP) == 0)
+		return -EFAULT;
here again
Would "ENOTSUP" be sufficient ?
Thanks,
Richard
Regards,
Rafal
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help