Re: CFT: major update to if_ure (patch did not apply cleanly for head -r363510)

From: Mark Millard <marklmi_at_yahoo.com>
Date: Sat, 25 Jul 2020 19:13:33 -0700
For reference for what applying the patch
reported (see Hunk #14):

# patch < D25809.diff 
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: sys/dev/usb/net/if_ure.c
|===================================================================
|--- sys/dev/usb/net/if_ure.c
|+++ sys/dev/usb/net/if_ure.c
--------------------------
Patching file sys/dev/usb/net/if_ure.c using Plan A...
Hunk #1 succeeded at 43.
Hunk #2 succeeded at 64.
Hunk #3 succeeded at 75.
Hunk #4 succeeded at 149.
Hunk #5 succeeded at 503.
Hunk #6 succeeded at 561.
Hunk #7 succeeded at 607.
Hunk #8 succeeded at 658.
Hunk #9 succeeded at 764.
Hunk #10 succeeded at 880.
Hunk #11 succeeded at 935.
Hunk #12 succeeded at 977.
Hunk #13 succeeded at 1007.
Hunk #14 failed at 1033.
Hunk #15 succeeded at 1057.
Hunk #16 succeeded at 1071.
Hunk #17 succeeded at 1153.
Hunk #18 succeeded at 1250.
Hunk #19 succeeded at 1282.
Hunk #20 succeeded at 1340 with fuzz 2.
Hunk #21 succeeded at 1492.
Hunk #22 succeeded at 1519.
Hunk #23 succeeded at 1652.
1 out of 23 hunks failed--saving rejects to sys/dev/usb/net/if_ure.c.rej
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: sys/dev/usb/net/if_urereg.h
|===================================================================
|--- sys/dev/usb/net/if_urereg.h
|+++ sys/dev/usb/net/if_urereg.h
--------------------------
Patching file sys/dev/usb/net/if_urereg.h using Plan A...
Hunk #1 succeeded at 391.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: sys/modules/usb/ure/Makefile
|===================================================================
|--- sys/modules/usb/ure/Makefile
|+++ sys/modules/usb/ure/Makefile
--------------------------
Patching file sys/modules/usb/ure/Makefile using Plan A...
Hunk #1 succeeded at 5.
done

As for the .rej file content:

# more sys/dev/usb/net/if_ure.c.rej
_at__at_ -752,6 +1033,18 _at__at_
            ure_read_2(sc, URE_PLA_FMC, URE_MCU_TYPE_PLA) |
            URE_FMC_FCR_MCU_EN);
 
+       /* Enable RX VLANs if enabled */
+       cpcr = ure_read_2(sc, URE_PLA_CPCR, URE_MCU_TYPE_PLA);
+       if (if_getcapenable(ifp) & IFCAP_VLAN_HWTAGGING) {
+               DEVPRINTFN(13, sc->sc_ue.ue_dev, "enabled hw vlan tag\n");
+               cpcr |= URE_CPCR_RX_VLAN;
+       } else {
+               DEVPRINTFN(13, sc->sc_ue.ue_dev, "disabled hw vlan tag\n");
+               cpcr &= ~URE_CPCR_RX_VLAN;
+       }
+       ure_write_2(sc, URE_PLA_CPCR, URE_MCU_TYPE_PLA,
+           cpcr);
+
        /* Enable transmit and receive. */
        ure_write_1(sc, URE_PLA_CR, URE_MCU_TYPE_PLA,
            ure_read_1(sc, URE_PLA_CR, URE_MCU_TYPE_PLA) | URE_CR_RE |



===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)
Received on Sun Jul 26 2020 - 00:13:40 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:24 UTC