I have a Yamaha P95 and had the same problem which really drove me crazy =,= I did all the researches and found that who had the similar problems are those who use Yamaha. And the fact is that some of the cables don't work well with Yamaha. (the $5 cable definitely has the issue. I don't know if M-calbe works but it might not work cause I saw some other posts talking about the pedal issues when coneccting some Yamaha)
So I tried to purchase a Yamaha brand MIDI/USB cable from Amazon, UX 16. Finally, it....... WORKS!!!!!! But it also took me time to find the updated driver and install it...
So you might have to download the driver from their website to see if it works on your system... cuz the CD coming with the cable doesn't work on my Mac (Guess because it came years ago)... Btw here's the link for downloading the latest driver: (If the link doesn't work you can search for it on yamaha's website as well)
http://download.yamaha.com/search/product/?site=usa.yamaha.com&language=en&categ ory_id1=16277&category_id2=16279&category_id3=16298&product_id=107905