[core] fix an enumeration issue and add support for ASUS UASP Turbo Mode

* Our detection for a match in the hash table, during USB enumeration, always
  pointed to the first hub when no match was found.
* Also, some USB mass storage devices (ASUS Turbo Mode devices, iPods) may
  have an additional driver inserted, which we now try to handle by looking
  up the grandparent.
* Thanks to NaoDarkness for helping investigate this
* Closes #513
This commit is contained in:
Pete Batard 2015-05-28 18:47:53 +01:00
parent 94e7e41082
commit ac213a16e9
5 changed files with 42 additions and 28 deletions

View file

@ -153,7 +153,7 @@ uint32_t htab_hash(char* str, htab_table* htab)
// existing hash
return idx;
}
// uprintf("hash collision ('%s' vs '%s')\n", str, htab_table[idx].str);
// uprintf("hash collision ('%s' vs '%s')\n", str, htab->table[idx].str);
// Second hash function, as suggested in [Knuth]
hval2 = 1 + hval % (htab->size - 2);