mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 08:44:41 +00:00 
			
		
		
		
	net: stmmac: xgmac: Correctly return that RX descriptor is not last one
Return the correct value when RX descriptor is not the last one. Signed-off-by: Jose Abreu <joabreu@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
		
							parent
							
								
									ec222003bd
								
							
						
					
					
						commit
						c887e02a93
					
				
					 1 changed files with 3 additions and 4 deletions
				
			
		|  | @ -26,16 +26,15 @@ static int dwxgmac2_get_rx_status(void *data, struct stmmac_extra_stats *x, | |||
| 				  struct dma_desc *p) | ||||
| { | ||||
| 	unsigned int rdes3 = le32_to_cpu(p->des3); | ||||
| 	int ret = good_frame; | ||||
| 
 | ||||
| 	if (unlikely(rdes3 & XGMAC_RDES3_OWN)) | ||||
| 		return dma_own; | ||||
| 	if (likely(!(rdes3 & XGMAC_RDES3_LD))) | ||||
| 		return rx_not_ls; | ||||
| 	if (unlikely((rdes3 & XGMAC_RDES3_ES) && (rdes3 & XGMAC_RDES3_LD))) | ||||
| 		return discard_frame; | ||||
| 	if (unlikely(rdes3 & XGMAC_RDES3_ES)) | ||||
| 		ret = discard_frame; | ||||
| 
 | ||||
| 	return ret; | ||||
| 	return good_frame; | ||||
| } | ||||
| 
 | ||||
| static int dwxgmac2_get_tx_len(struct dma_desc *p) | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Jose Abreu
						Jose Abreu