e220cdi dont go over 3000 rpm

I think is the gearbox, it is not going more than 3000 rpm
after a while I turned off the engine and back on, and then it was perfectly running, taking speed as I wanted.
it has no check light on the dash, and I checked with dashcommand on iphone but no errors on the diagnostic
any idea what to check?
I have cleaned the EGR 1 month ago and I saw a big difference on black smoke when speeding up, now it is clean, no smoke



