I've had several drives that ceased working after a while (usually >2-years), when directly attached via sata or pata motherboard plugs, but work fine in usb enclosures.
I had my first BSOD in aaaaages yesterday, by plugging in an SD card that had been corrupted by a bad Raspberry Pi. One corrupted card completely brought down the OS as the disk management service got stuck trying to interpret it and ignored all other requests.
Had to disable automount in diskpart in order to access the card and delete the partitions, after which the card worked fine again.
Yeah, looking around t'interweb, it seems to be a "thing". Thing is, this drive has now passed a ten hour checkdsk scan and an almost as long SMART scan (HDDScan), and it works perfectly in two different SATA slots on a different, newer, PC. As far as I know, it's only in the old PC with it's 11 year old mobo that it can't be seen. But that said, 4 other drives and a DVD drive work fine, in any slot. So there's obviously something about this particular HDD that stops it shaking hands. And it's something that happened over the weekend.
I've stuck on the latest BIOS and chipset drivers, but without any improvement. It's working OK through USB, and there's a card in a PCIE slot giving USB3 with a spare socket, so I'll mount it inside but connect it via USB.
Yeah, that is SOOO annoying and a real issue with Windows: the way one misbehaving process can hang or crash the entire OS, and there's no way to kill it.