To perform jailbreak or manual firmware flash, you require IPSW file. Here are the direct download links for the iOS 5.0.1 firmware update for the iPhone 4 and 3GS models. It is also being offered OTA (over the air) to the ones that are running iOS 5.0.
We recommend you to stay updated to prevent issues or bugs.
You can get the iPad 5.0.1 IPSW from iPad nn.