This is quite easy.
You'll need to create a udev rule triggered on the USB unplug event for that device. These would be files in
etc/udev/rules.d. Take a look at this question over at ServerFault for details.
So, we've established that you can trigger arbitrary commands on USB unplug events with the
The second part to this is to use the "magic" sysrq key. See this article about Magic SysRq on Wikipedia for things you can do with the sysrq key. The key can also be triggered by echoing the letter of the action to
/proc/sysrq-trigger. This will have the same effect as pressing the key combination on your physically attached keyboard.
Therefore, the udev rule would be:
DRIVER="some_device", ACTION="remove", PROGRAM="/bin/echo b > /proc/sysrq-trigger"
This will trigger the system to reboot when the device
some_device is removed.
And this of course assumes that by "wedged" you don't mean "kernel panic".