If you have unlocked -- for use on a carrier other than AT&T -- your iPhone and want to restore it (because of troubleshooting issues or other reasons) while avoiding firmware/software update 1.1.1, which may cause your iPhone to become non-functional, use this method to restore using iPhone firmware 1.0.2 instead:
On a Mac hold down the option button while clicking "Restore," on a Windows sytem hold down "Shift" while clicking "Restore." This will bring up a window to select the firmware file you would like to use. (On a Mac, it's located in ~/Library/iTunes/iPhone Software Updates). The old firmware file is named iPhone1,1_1.0.2_1C28_Restore.ipsw
Note that this will not downgrade your iPhone's firmware, but will only allow you to restore your iPhone that is running firmware 1.0.2 with the same firmware 1.0.2 revision rather than updating to version 1.1.1, which is the default under iTunes 7.4.x when performing a rstore.