Resetting BIOSes and re-installing Windows is IMHO completely OTT and usually unnecessary. Sure it may fix the problem but there's usually another way with less aggravation than that.
The "USB Audio Device" is a bit of a misnomer. That is how the native windows MIDI device driver will show up, so if you can see "USB Audio device" within Sonar that is a MIDI device and should work. I have 2 MIDI hubs that both show as such. One is "USB Audio device" and the second an E-MU2x2 which shows as "USB audio device (2)".
Having said that - and I don't know - I'm guessing that M-Audio have their own bespoke MIDI drivers for their keyboards and if so and they are installed correctly they should show as something along the lines of "M-Audio MIDI.... "
On my system the E-MU 2x2 only shows as a native "USB Audio device (2)" because there is a problem with E-MU's drivers and Sonar keeps forgetting about the device between restarts so I uninstalled E-MU's drivers and forced Windows to use the native drivers. So even if there are M-Audio drivers available and you're using native Windows drivers it should still work.
Some keyboards may also have multiple MIDI in/outs and they'll all show as an individual port. I use an Edirol PCR800. That attaches via USB and shows as a total of 2 out - 3 in but they all have PCR in the driver so they are easily recognizable in Sonar.
Are you absolutely sure that the "USB Audio device" driver is referring to your M-Audio keyboard? What other MIDI devices do you have if any. i.e. MIDI hubs etc. etc.
If Windows can't 'see' the device then there's no way you'll see it in Sonar.