Ok, I am sure this problem has surfaced before but I am stuck with this problem. I have an iPhone 3g which I JB and unlocked using Redsn0w 0.9.6b5 and iOS 4.2.1. The JB process went smooth and the phone worked for awhile. I felt the phone was slow, typical problem amongst iPhone 3g users, and I went to try to downgrade to iOS 3.1.3. During the downgrade process, I encountered an error message. The DG never finished. I thought, ok, I will just JBed again and I will unlock it. NOPE. The JB will start on the phone but it never gets out of the recovery mode. By RM, I mean the iTunes icon with the cable icon on the phone. So, here is what I tried:

Recboot, nope
restore in itunes, nope
restore using firmware 3.1.3, nope
restore using firmware 3.1.2, nope
restore using firmware 4.0, nope
holding down home button then hit restore in iTunes, NOTHING!
TinyUnbrella, exit recovery, nope

If I do the iTunes restore, the phone and iTunes will act like it is restoring but then at the end, it will spit out an error message. My phone doesn't want to get out of recovery mode. It will stay at the Apple logo screen.