This message is from the T13 list server.
On other operating systems that implement hot-plug support for PCI (and other buses), the software gets a notification from the underlying bus controller that the device has been removed. Is this not the case in your environment? A simple status read of the SStatus register would also verify if the controller is alive or not. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 29, 2004 12:26 PM To: [EMAIL PROTECTED] Subject: [t13] Serial ATA HBA app note for NCQ This message is from the T13 list server. Please forward to implementors of Serial ATA host controllers (HBAs). I am currently implementing bits of Native Command Queueing (NCQ) on Linux, with the help of several device and HBA vendors (thanks!). Serial ATA (SActive) itself, AHCI and certain other controllers (for which I have under NDA, but cannot name names) use a 32-bit bitmap for purposes such as indicating which queued commands are active. This is a problem because when the HBA is hot-unplugged from PCI or Cardbus, all I/O reads from the address space where the HBA previous existed will return all 1's. In the case of a 32-bit read from I/O space, this means the OS driver returns a 0xffffffff. An OS driver may behave incorrectly if all 32 tags are active, and some sort of hardware fault or hardware unplug occurs. Linux will therefore limit queueing to a maximum of 31 active commands, to guarantee that SActive and various hardware registers always have at least one zero bit on all register reads. I recommend that other OS's follow suit, to ensure 100% stable operation. HBA implementors would be wise to guarantee there is _always_ at least one zero bit in their HBA's Interrupt Status register(s), for this same reason. "All interrupts asserted" cannot be distinguished from "hardware is not there", if all 32 bits are used. If someone is interested in more details, feel free to contact me. Jeff
