Have usb device supply some kind of a checksum/key of its firmware when connecting to the computer.. the driver would then compare that checksum/key to the list of trusted checksums.
But of course, hackers could extract the checksum from the driver, and hack the firmware to always return it :/