return 1;
 }
 
+static void reset_rpn(struct ump_cvt_to_ump_bank *cc)
+{
+       cc->rpn_set = 0;
+       cc->nrpn_set = 0;
+       cc->cc_rpn_msb = cc->cc_rpn_lsb = 0;
+       cc->cc_data_msb = cc->cc_data_lsb = 0;
+       cc->cc_data_msb_set = cc->cc_data_lsb_set = 0;
+}
+
 /* set up the MIDI2 RPN/NRPN packet data from the parsed info */
 static int fill_rpn(struct ump_cvt_to_ump_bank *cc,
                    union snd_ump_midi2_msg *data,
                                             cc->cc_data_lsb);
        data->rpn.channel = channel;
 
-       cc->rpn_set = 0;
-       cc->nrpn_set = 0;
-       cc->cc_rpn_msb = cc->cc_rpn_lsb = 0;
-       cc->cc_data_msb = cc->cc_data_lsb = 0;
-       cc->cc_data_msb_set = cc->cc_data_lsb_set = 0;
+       reset_rpn(cc);
        return 1;
 }
 
                ret = fill_rpn(cc, data, channel, true);
                cc->rpn_set = 1;
                cc->cc_rpn_msb = val;
+               if (cc->cc_rpn_msb == 0x7f && cc->cc_rpn_lsb == 0x7f)
+                       reset_rpn(cc);
                return ret;
        case UMP_CC_RPN_LSB:
                ret = fill_rpn(cc, data, channel, true);
                cc->rpn_set = 1;
                cc->cc_rpn_lsb = val;
+               if (cc->cc_rpn_msb == 0x7f && cc->cc_rpn_lsb == 0x7f)
+                       reset_rpn(cc);
                return ret;
        case UMP_CC_NRPN_MSB:
                ret = fill_rpn(cc, data, channel, true);
                cc->cc_rpn_msb = msb;
                cc->cc_rpn_lsb = lsb;
                cc->rpn_set = 1;
+               if (cc->cc_rpn_msb == 0x7f && cc->cc_rpn_lsb == 0x7f)
+                       reset_rpn(cc);
                return ret;
        case UMP_CC_NRPN_MSB:
        case UMP_CC_NRPN_LSB: