|If your USB ports are integrated onto the motherboard, then in order to troubleshoot this take another device with a USB plug and try it in all of the questioned ports. |
If the other device works in the ports, then your initial device is bad you'll need a new one or at least a new USB cable.
Otherwise if a different device doesn't work in all affected USB ports, then yes you'll have to replace the motherboard - or as a workaround if you have at least 1 working USB port then get yourself a USB Root Hub - most computer/electronics stores should have them.
If your motherboard is out of warranty, this will be the cheaper option to go with.