Skip to content

Commit 5a47f58

Browse files
vladimirolteandavem330
authored andcommitted
net: dsa: sja1105: Really make the PTP command read-write
When activating tc-taprio offload on the switch ports, the TAS state machine will try to check whether it is running or not, but will find both the STARTED and STOPPED bits as false in the sja1105_tas_check_running function. So the function will return -EINVAL (an abnormal situation) and the kernel will keep printing this from the TAS FSM workqueue: [ 37.691971] sja1105 spi0.1: An operation returned -22 The reason is that the underlying function that gets called, sja1105_ptp_commit, does not actually do a SPI_READ, but a SPI_WRITE. So the command buffer remains initialized with zeroes instead of retrieving the hardware state. Fix that. Fixes: 41603d7 ("net: dsa: sja1105: Make the PTP command read-write") Signed-off-by: Vladimir Oltean <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9fcf024 commit 5a47f58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/dsa/sja1105/sja1105_ptp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ int sja1105_ptp_commit(struct dsa_switch *ds, struct sja1105_ptp_cmd *cmd,
234234
if (rw == SPI_WRITE)
235235
priv->info->ptp_cmd_packing(buf, cmd, PACK);
236236

237-
rc = sja1105_xfer_buf(priv, SPI_WRITE, regs->ptp_control, buf,
237+
rc = sja1105_xfer_buf(priv, rw, regs->ptp_control, buf,
238238
SJA1105_SIZE_PTP_CMD);
239239

240240
if (rw == SPI_READ)

0 commit comments

Comments
 (0)