···311 dma_addr_t page_table_bus;312};313000314/*315 * List of devices with known bugs.316 *317 * The firmware_revision field, masked with 0xffff00, is the best318 * indicator for the type of bridge chip of a device. It yields a few319 * false positives but this did not break correctly behaving devices320- * so far. We use ~0 as a wildcard, since the 24 bit values we get321- * from the config rom can never match that.322 */323static const struct {324 u32 firmware_revision;···342 },343 /* Initio bridges, actually only needed for some older ones */ {344 .firmware_revision = 0x000200,345- .model = ~0,346 .workarounds = SBP2_WORKAROUND_INQUIRY_36,347 },348 /* PL-3507 bridge with Prolific firmware */ {349 .firmware_revision = 0x012800,350- .model = ~0,351 .workarounds = SBP2_WORKAROUND_POWER_CONDITION,352 },353 /* Symbios bridge */ {354 .firmware_revision = 0xa0b800,355- .model = ~0,356 .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS,357 },358 /* Datafab MD2-FW2 with Symbios/LSILogic SYM13FW500 bridge */ {359 .firmware_revision = 0x002600,360- .model = ~0,361 .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS,362 },363···1095 continue;10961097 if (sbp2_workarounds_table[i].model != model &&1098- sbp2_workarounds_table[i].model != ~0)1099 continue;11001101 w |= sbp2_workarounds_table[i].workarounds;···1145 fw_device_get(device);1146 fw_unit_get(unit);11471148- /* Initialize to values that won't match anything in our table. */1149- firmware_revision = 0xff000000;1150- model = 0xff000000;1151-1152 /* implicit directory ID */1153 tgt->directory_id = ((unit->directory - device->config_rom) * 41154 + CSR_CONFIG_ROM) & 0xffffff;00011551156 if (sbp2_scan_unit_dir(tgt, unit->directory, &model,1157 &firmware_revision) < 0)
···311 dma_addr_t page_table_bus;312};313314+#define SBP2_ROM_VALUE_WILDCARD ~0 /* match all */315+#define SBP2_ROM_VALUE_MISSING 0xff000000 /* not present in the unit dir. */316+317/*318 * List of devices with known bugs.319 *320 * The firmware_revision field, masked with 0xffff00, is the best321 * indicator for the type of bridge chip of a device. It yields a few322 * false positives but this did not break correctly behaving devices323+ * so far.0324 */325static const struct {326 u32 firmware_revision;···340 },341 /* Initio bridges, actually only needed for some older ones */ {342 .firmware_revision = 0x000200,343+ .model = SBP2_ROM_VALUE_WILDCARD,344 .workarounds = SBP2_WORKAROUND_INQUIRY_36,345 },346 /* PL-3507 bridge with Prolific firmware */ {347 .firmware_revision = 0x012800,348+ .model = SBP2_ROM_VALUE_WILDCARD,349 .workarounds = SBP2_WORKAROUND_POWER_CONDITION,350 },351 /* Symbios bridge */ {352 .firmware_revision = 0xa0b800,353+ .model = SBP2_ROM_VALUE_WILDCARD,354 .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS,355 },356 /* Datafab MD2-FW2 with Symbios/LSILogic SYM13FW500 bridge */ {357 .firmware_revision = 0x002600,358+ .model = SBP2_ROM_VALUE_WILDCARD,359 .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS,360 },361···1093 continue;10941095 if (sbp2_workarounds_table[i].model != model &&1096+ sbp2_workarounds_table[i].model != SBP2_ROM_VALUE_WILDCARD)1097 continue;10981099 w |= sbp2_workarounds_table[i].workarounds;···1143 fw_device_get(device);1144 fw_unit_get(unit);114500001146 /* implicit directory ID */1147 tgt->directory_id = ((unit->directory - device->config_rom) * 41148 + CSR_CONFIG_ROM) & 0xffffff;1149+1150+ firmware_revision = SBP2_ROM_VALUE_MISSING;1151+ model = SBP2_ROM_VALUE_MISSING;11521153 if (sbp2_scan_unit_dir(tgt, unit->directory, &model,1154 &firmware_revision) < 0)