Re: [PATCH 6.1] net: stmmac: move the EST lock to struct stmmac_priv

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[ Sasha's backport helper bot ]

Hi,

The upstream commit SHA1 provided is correct: 36ac9e7f2e5786bd37c5cd91132e1f39c29b8197

WARNING: Author mismatch between patch and upstream commit:
Backport author: bin.lan.cn@xxxxxxxxxxxxxxxxx
Commit author: Xiaolei Wang <xiaolei.wang@xxxxxxxxxxxxx>


Status in newer kernel trees:
6.12.y | Present (exact SHA1)
6.6.y | Present (different SHA1: b538fefeb102)
6.1.y | Not found

Note: The patch differs from the upstream commit:
---
1:  36ac9e7f2e578 ! 1:  5bc5febe7e329 net: stmmac: move the EST lock to struct stmmac_priv
    @@ Metadata
      ## Commit message ##
         net: stmmac: move the EST lock to struct stmmac_priv
     
    +    [ Upstream commit 36ac9e7f2e5786bd37c5cd91132e1f39c29b8197 ]
    +
         Reinitialize the whole EST structure would also reset the mutex
         lock which is embedded in the EST structure, and then trigger
         the following warning. To address this, move the lock to struct
    @@ Commit message
         Reviewed-by: Andrew Halaney <ahalaney@xxxxxxxxxx>
         Link: https://lore.kernel.org/r/20240513014346.1718740-2-xiaolei.wang@xxxxxxxxxxxxx
         Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    +    [ Resolve line conflicts ]
    +    Signed-off-by: Bin Lan <bin.lan.cn@xxxxxxxxxxxxx>
     
      ## drivers/net/ethernet/stmicro/stmmac/stmmac.h ##
     @@ drivers/net/ethernet/stmicro/stmmac/stmmac.h: struct stmmac_priv {
    @@ drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c: static int stmmac_adjust_time(
     -		mutex_lock(&priv->plat->est->lock);
     +		mutex_lock(&priv->est_lock);
      		priv->plat->est->enable = false;
    - 		stmmac_est_configure(priv, priv, priv->plat->est,
    + 		stmmac_est_configure(priv, priv->ioaddr, priv->plat->est,
      				     priv->plat->clk_ptp_rate);
     -		mutex_unlock(&priv->plat->est->lock);
     +		mutex_unlock(&priv->est_lock);
    @@ drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c: static int stmmac_adjust_time(
      		time.tv_nsec = priv->plat->est->btr_reserve[0];
     @@ drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c: static int stmmac_adjust_time(struct ptp_clock_info *ptp, s64 delta)
      		priv->plat->est->enable = true;
    - 		ret = stmmac_est_configure(priv, priv, priv->plat->est,
    + 		ret = stmmac_est_configure(priv, priv->ioaddr, priv->plat->est,
      					   priv->plat->clk_ptp_rate);
     -		mutex_unlock(&priv->plat->est->lock);
     +		mutex_unlock(&priv->est_lock);
    @@ drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c: static int stmmac_adjust_time(
      	}
     
      ## drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c ##
    -@@ drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: static int tc_taprio_configure(struct stmmac_priv *priv,
    +@@ drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: static int tc_setup_taprio(struct stmmac_priv *priv,
      		if (!plat->est)
      			return -ENOMEM;
      
    @@ drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: static int tc_taprio_configure(
     -	mutex_lock(&priv->plat->est->lock);
     +	mutex_lock(&priv->est_lock);
      	priv->plat->est->gcl_size = size;
    - 	priv->plat->est->enable = qopt->cmd == TAPRIO_CMD_REPLACE;
    + 	priv->plat->est->enable = qopt->enable;
     -	mutex_unlock(&priv->plat->est->lock);
     +	mutex_unlock(&priv->est_lock);
      
      	for (i = 0; i < size; i++) {
      		s64 delta_ns = qopt->entries[i].interval;
    -@@ drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: static int tc_taprio_configure(struct stmmac_priv *priv,
    +@@ drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: static int tc_setup_taprio(struct stmmac_priv *priv,
      		priv->plat->est->gcl[i] = delta_ns | (gates << wid);
      	}
      
    @@ drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: static int tc_taprio_configure(
      	/* Adjust for real system time */
      	priv->ptp_clock_ops.gettime64(&priv->ptp_clock_ops, &current_time);
      	current_time_ns = timespec64_to_ktime(current_time);
    -@@ drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: static int tc_taprio_configure(struct stmmac_priv *priv,
    - 	tc_taprio_map_maxsdu_txq(priv, qopt);
    +@@ drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: static int tc_setup_taprio(struct stmmac_priv *priv,
    + 	priv->plat->est->ctr[1] = (u32)ctr;
      
      	if (fpe && !priv->dma_cap.fpesel) {
     -		mutex_unlock(&priv->plat->est->lock);
    @@ drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: static int tc_taprio_configure(
      		return -EOPNOTSUPP;
      	}
      
    -@@ drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: static int tc_taprio_configure(struct stmmac_priv *priv,
    +@@ drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: static int tc_setup_taprio(struct stmmac_priv *priv,
      
    - 	ret = stmmac_est_configure(priv, priv, priv->plat->est,
    + 	ret = stmmac_est_configure(priv, priv->ioaddr, priv->plat->est,
      				   priv->plat->clk_ptp_rate);
     -	mutex_unlock(&priv->plat->est->lock);
     +	mutex_unlock(&priv->est_lock);
      	if (ret) {
      		netdev_err(priv->dev, "failed to configure EST\n");
      		goto disable;
    -@@ drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: static int tc_taprio_configure(struct stmmac_priv *priv,
    +@@ drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: static int tc_setup_taprio(struct stmmac_priv *priv,
      
      disable:
      	if (priv->plat->est) {
     -		mutex_lock(&priv->plat->est->lock);
     +		mutex_lock(&priv->est_lock);
      		priv->plat->est->enable = false;
    - 		stmmac_est_configure(priv, priv, priv->plat->est,
    + 		stmmac_est_configure(priv, priv->ioaddr, priv->plat->est,
      				     priv->plat->clk_ptp_rate);
    -@@ drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: static int tc_taprio_configure(struct stmmac_priv *priv,
    - 			priv->xstats.max_sdu_txq_drop[i] = 0;
    - 			priv->xstats.mtl_est_txq_hlbf[i] = 0;
    - 		}
     -		mutex_unlock(&priv->plat->est->lock);
     +		mutex_unlock(&priv->est_lock);
      	}
---

Results of testing on various branches:

| Branch                    | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.1.y        |  Success    |  Success   |




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux