I had the same problem with my HTC Magic.
I tried to put sd card into adapter and format it on the PC,
how ever it didn't work. After may tries I was able to move things
from the card, but it was still locked partly - when I tried to scan card
with windows scandisc it was automatically disconecting the telefon from my PC.
Lately I decidet to update my android to 2.2 and I noticed something weird
After android update was complete, it shown a sign 'unlocking sd card'.
When this was complete my SD card was back.
Thats why I'm surre this lock is comming from software.