What's up with this?
void motor_speed2(boolean motor, char speed)
The motor to use is the first argument. That's not a boolean. A byte, maybe.
The second argument if the speed, from -255 to 255. That's not a char. It should be an int.
Some Serial.print() statements might help identify where the holdup is. motor_speed2() and motor_speed() do not appear to be the culprits, though.