Ha! This may be a SOLUTION! At least it worked for me.
I had a USB 120GB WD Passport that had been working fine. Somehow, between using it to transfer files and as a Time Machine Backup, it got into the situation most of you are describing.
I tried to Erase it, Partition it, wipe it...everything through DiskUtility and Terminal. Tried all the solutions. Unfortunately, I didn't have an extra mac or pc to put it in. And, worse...it only has a USB Port. I just kept getting the "Cannot unmount the drive" and "OSIX reports: The operation couldn’t be completed. Cannot allocate memory." I'm using Snow Leopard 10.6 btw.
FINALLY THIS WORKED:
Put in your Snow Leopard install disc (or restore discs). Restart the machine, and hold down the Option key as it restarts (before you see the Apple icon). It will give you a choice of which to boot from: Hard Drive, CD, etc.
Boot from the CD. Once it comes up, choose your language, and then when the top menubar appears choose Utilities-->Disk Utility:
http://basshead.files.wordpress.com/2010/03/10-6install2.jpg (not my site, but a nice screenshot)
Then partition the drive! It works! After that, the drive should work fine.
I first partitioned mine drive into 2 parts (Mac OS Extended and Fat32). That may not matter. Then I was able to erase it, and format it any way I wanted.
Hope that helps!