Put it back into USB storage mode, and download
http://kindle.s3.amazonaws.com/update_kindle_5.3.1.bin to the USB drive. Put it out of USB drive mode.
Then reboot, and hope that the updater kicks in before actually booting into diags.
If all else fails and you still end up in diags, try enabling USB network, but with the cable DETACHED. Wait for 20 seconds, then plug in the cable - and hope that you can SSH into diags. If you installed the rescue pack, then yes, toggling usbnetwork should enable an SSH server as well. But for some reasons, this seems to work unreliably when the cable is attached (well, at least that's often, but not always, the case for usbnetwork in main mode - so it might also happen in diags).