Skip to contentSkip to conversation

liquidio: remove PTP support in 23XX adapters

PATCH Applied Felix Manlunas 2 participants 2 messages Jan 3, 2017 – Jan 4, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 liquidio: remove PTP support in 23XX adapters

From: Prasad Kanneganti <[email protected]>

liquidio driver incorrectly indicates that PTP is supported in 23XX adapters; this patch fixes that. PTP is supported in 66XX and 68XX adapters, and the driver correctly indicates that.

---
 drivers/net/ethernet/cavium/liquidio/lio_main.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/net/ethernet/cavium/liquidio/lio_main.c +8 -2
index 39a9665..6443bc1 100644
@@ -2629,7 +2629,9 @@ static int liquidio_open(struct net_device *netdev)
 			oct->droq[0]->ops.poll_mode = 1;
 	}
 
-	oct_ptp_open(netdev);
+	if ((oct->chip_id == OCTEON_CN66XX || oct->chip_id == OCTEON_CN68XX) &&
+	    ptp_enable)
+		oct_ptp_open(netdev);
 
 	ifstate_set(lio, LIO_IFSTATE_RUNNING);
 
@@ -2973,9 +2975,13 @@ static int hwtstamp_ioctl(struct net_device *netdev, struct ifreq *ifr)
  */
 static int liquidio_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
 {
+	struct lio *lio = GET_LIO(netdev);
+
 	switch (cmd) {
 	case SIOCSHWTSTAMP:
-		return hwtstamp_ioctl(netdev, ifr);
+		if ((lio->oct_dev->chip_id == OCTEON_CN66XX ||
+		     lio->oct_dev->chip_id == OCTEON_CN68XX) && ptp_enable)
+			return hwtstamp_ioctl(netdev, ifr);
 	default:
 		return -EOPNOTSUPP;
 	}
maintainer Applied
#1 lore raw

From: Felix Manlunas <[email protected]>
Date: Tue, 3 Jan 2017 11:27:33 -0800

Quoted 10 lines

From: Prasad Kanneganti <[email protected]>

liquidio driver incorrectly indicates that PTP is supported in 23XX adapters; this patch fixes that. PTP is supported in 66XX and 68XX adapters, and the driver correctly indicates that.

Applied.