npcm7xx-emc: ignore alignment error only

Sometimes we see packets with correct CRC and length but with hw
alignment error. This packets is still usable and we probably want to
allow them.

Change-Id: Ic7f4413b3232f9be13552beee778b62769997a0d
Signed-off-by: Yuxiao Zhang <yuxiaozhang@google.com>
(cherry picked from commit 8a8d2b60fa9d184530abd183afceabb052cffd5f)
(cherry picked from commit f6e9c190d4ee6f90cf467189824692e36b314ade)
diff --git a/recipes-kernel/linux/5.15/0001-Diorite-workaround-for-c0-card.patch b/recipes-kernel/linux/5.15/0001-Diorite-workaround-for-c0-card.patch
index d87ea97..ce02f3a 100644
--- a/recipes-kernel/linux/5.15/0001-Diorite-workaround-for-c0-card.patch
+++ b/recipes-kernel/linux/5.15/0001-Diorite-workaround-for-c0-card.patch
@@ -1,4 +1,4 @@
-From 6394781fddc8bb2d48f08994595fff4e77c238e5 Mon Sep 17 00:00:00 2001
+From 5744aa24925d86fae13469d7c5526cbdeb856ffd Mon Sep 17 00:00:00 2001
 From: invalid_git config <unknown@unknown>
 Date: Tue, 29 Aug 2023 20:48:42 +0000
 Subject: [PATCH] Diorite workaround for c0 card
@@ -7,10 +7,10 @@
 patch is a workaround of removing it and redo the checksum.
 ---
  drivers/net/ethernet/nuvoton/npcm7xx_emc.c | 50 ++++++++++++++++++++--
- 1 file changed, 47 insertions(+), 3 deletions(-)
+ 1 file changed, 46 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/net/ethernet/nuvoton/npcm7xx_emc.c b/drivers/net/ethernet/nuvoton/npcm7xx_emc.c
-index 2c58a82a56fd..a2ce9d976d18 100644
+index 2c58a82a56fd..4a646349c62d 100644
 --- a/drivers/net/ethernet/nuvoton/npcm7xx_emc.c
 +++ b/drivers/net/ethernet/nuvoton/npcm7xx_emc.c
 @@ -92,6 +92,7 @@ static struct dentry *npcm7xx_fs_dir;
@@ -34,9 +34,12 @@
  	writel(readl((ether->reg + REG_MCMDR)) | MCMDR_RXON,
  	       (ether->reg + REG_MCMDR));
  }
-@@ -1585,18 +1592,18 @@ static int npcm7xx_poll(struct napi_struct *napi, int budget)
+@@ -1583,20 +1590,20 @@ static int npcm7xx_poll(struct napi_struct *napi, int budget)
+ 		/* If VLAN is not supported RXDS_PTLE (packet too long) is also
+ 		 * an error
  		 */
- 		if (likely((status & (RXDS_RXGD | RXDS_CRCE | RXDS_ALIE |
+-		if (likely((status & (RXDS_RXGD | RXDS_CRCE | RXDS_ALIE |
++		if (likely((status & (RXDS_RXGD | RXDS_CRCE |
  				      RXDS_RP | (IS_VLAN ? 0 : RXDS_PTLE))) ==
 -			   RXDS_RXGD) && likely(length <= MAX_PACKET_SIZE)) {
 +			   RXDS_RXGD) && likely(length <= MAX_PACKET_SIZE_W_CRC)) {
@@ -56,7 +59,7 @@
  			} else
  				ether->stats.rx_dropped++;
  			rx_cnt++;
-@@ -1605,6 +1609,40 @@ static int npcm7xx_poll(struct napi_struct *napi, int budget)
+@@ -1605,6 +1612,40 @@ static int npcm7xx_poll(struct napi_struct *napi, int budget)
  			/* now we allocate new skb instead if the used one. */
  			get_new_skb(netdev, ether->cur_rx);
  		} else {
@@ -106,5 +109,5 @@
  		wmb();
  
 -- 
-2.42.0.459.ge4e396fd5e-goog
+2.42.0.758.gaed0368e0e-goog