Your problem sounds different, but my wife's laptop once had a problem whenever a USB device was inserted or removed. The computer didn't totally freeze (the touchpad was still active), but would no longer respond to mouse clicks. It had to be cold-booted to cure, then would start all over again with any change in a USB device.
I searched and found that a corrupt Windows Automatic Update might be the culprit. So the fix I used was:
Verify Windows Update Service Settings
* Click on Start, Run and type the following command in the open box and click OK
services.msc
* Find the Automatic Updates service and double-click on it.
* Click on the Log On Tab and make sure the "Local System Account" is selected as the logon account and the box for "allow service to interact with desktop" is UNCHECKED.
* Under the Hardware Profile section in the Log On Tab, make sure the service is enabled.
* On the General Tab, the Startup Type should be Automatic, if not, drop the box down and select Automatic.
* Under "Service Status" on the General tab, the service should be Started, click the Start button enable it.
* Repeat the steps above for the service "Background Intelligent Transfer Service (BITS)"
Re-Register Windows Update DLLs
* Click on Start, Run, and type CMD and click ok
* In the black command window type the following command and press Enter
REGSVR32 WUAPI.DLL
* Wait until you receive the "DllRegisterServer in WUAPI.DLL succeeded" message and click OK
* Repeat the last two steps above for each of the following commands:
REGSVR32 WUAUENG.DLL
REGSVR32 WUAUENG1.DLL
REGSVR32 ATL.DLL
REGSVR32 WUCLTUI.DLL
REGSVR32 WUPS.DLL
REGSVR32 WUPS2.DLL
REGSVR32 WUWEB.DLL
Remove Corrupted Windows Update Files
* At the command prompt, type the following command and press Enter
net stop WuAuServ
* Still at the command prompt, type
cd c:\WINDOWS
and press Enter
* In the opened folder, type the following command and press Enter to rename the SoftwareDistribution Folder
ren SoftwareDistribution SD_OLD
* Restart the Windows Update Service by typing the following at the command prompt
net start WuAuServ
* type Exit and Press Enter to close the command prompt
Reboot Windows
* click on Start, Shut Down, and Restart to reboot Windows XP
So this is a long shot for your problem. It resolved the problem I was troubleshooting but might be different than what you are experiencing.