In case you have unlocked your iPhone 3G / 3GS by update to iPad baseband 6.15.00 with ultrasn0w 1.2 on iOS 4.2.1, and have issues while restoring your device, here is Sherif Hashim the guy behind ultrasn0w unlock tool, has posted a simple guide showing how to restore your iPhone 3G / 3GS to avoid iTunes errors.
Note: To restore your iPhone 3GS from 4.2.1 to 4.1, you must have saved SHSH blobs for iOS 4.1.
For PwnageTool users:
For Redsn0w users:
How to go again to iOS 4.2.1:
Try Hashim's methods above to restore you device between 4.2.1 and 4.1, it worth trying. Don't forget.