White is the speed signal. All you have to do is tell your controller to use it - set P2=1.
If the controller doesn't receive a signal from that wire, it'll default to the motor hall sensors for the speed signal where P1 takes effect, so you should check that the 5v on the white wire is in fact pulsing when the wheel turns.
If the motor's speed sensor is faulty (quite common and caused by the magnet detatching), you can use the speed sensor from your cycle computer. Cut off the sensor and join one wire to the white going into the controller and the other to either the red 5v or black ground to see which of the two works. Which one it is depends on whether the controller uses a pull-up or pull-down resistor on the sensor wire. No harm will be done if you try it on the wrong wire, but make sure that the red wire is 5v and not battery voltage for lights, accessories, etc.