diff options
Diffstat (limited to 'drivers/ieee1394/sbp2.c')
-rw-r--r-- | drivers/ieee1394/sbp2.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index 4325aac7733d..4f1b743e09ed 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c | |||
@@ -308,6 +308,8 @@ static struct scsi_host_template sbp2_shost_template = { | |||
308 | .sdev_attrs = sbp2_sysfs_sdev_attrs, | 308 | .sdev_attrs = sbp2_sysfs_sdev_attrs, |
309 | }; | 309 | }; |
310 | 310 | ||
311 | /* for match-all entries in sbp2_workarounds_table */ | ||
312 | #define SBP2_ROM_VALUE_WILDCARD 0x1000000 | ||
311 | 313 | ||
312 | /* | 314 | /* |
313 | * List of devices with known bugs. | 315 | * List of devices with known bugs. |
@@ -329,22 +331,14 @@ static const struct { | |||
329 | }, | 331 | }, |
330 | /* Initio bridges, actually only needed for some older ones */ { | 332 | /* Initio bridges, actually only needed for some older ones */ { |
331 | .firmware_revision = 0x000200, | 333 | .firmware_revision = 0x000200, |
334 | .model_id = SBP2_ROM_VALUE_WILDCARD, | ||
332 | .workarounds = SBP2_WORKAROUND_INQUIRY_36, | 335 | .workarounds = SBP2_WORKAROUND_INQUIRY_36, |
333 | }, | 336 | }, |
334 | /* Symbios bridge */ { | 337 | /* Symbios bridge */ { |
335 | .firmware_revision = 0xa0b800, | 338 | .firmware_revision = 0xa0b800, |
339 | .model_id = SBP2_ROM_VALUE_WILDCARD, | ||
336 | .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS, | 340 | .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS, |
337 | }, | 341 | }, |
338 | /* | ||
339 | * Note about the following Apple iPod blacklist entries: | ||
340 | * | ||
341 | * There are iPods (2nd gen, 3rd gen) with model_id==0. Since our | ||
342 | * matching logic treats 0 as a wildcard, we cannot match this ID | ||
343 | * without rewriting the matching routine. Fortunately these iPods | ||
344 | * do not feature the read_capacity bug according to one report. | ||
345 | * Read_capacity behaviour as well as model_id could change due to | ||
346 | * Apple-supplied firmware updates though. | ||
347 | */ | ||
348 | /* iPod 4th generation */ { | 342 | /* iPod 4th generation */ { |
349 | .firmware_revision = 0x0a2700, | 343 | .firmware_revision = 0x0a2700, |
350 | .model_id = 0x000021, | 344 | .model_id = 0x000021, |
@@ -1307,11 +1301,13 @@ static void sbp2_parse_unit_directory(struct sbp2_lu *lu, | |||
1307 | 1301 | ||
1308 | if (!(workarounds & SBP2_WORKAROUND_OVERRIDE)) | 1302 | if (!(workarounds & SBP2_WORKAROUND_OVERRIDE)) |
1309 | for (i = 0; i < ARRAY_SIZE(sbp2_workarounds_table); i++) { | 1303 | for (i = 0; i < ARRAY_SIZE(sbp2_workarounds_table); i++) { |
1310 | if (sbp2_workarounds_table[i].firmware_revision && | 1304 | if (sbp2_workarounds_table[i].firmware_revision != |
1305 | SBP2_ROM_VALUE_WILDCARD && | ||
1311 | sbp2_workarounds_table[i].firmware_revision != | 1306 | sbp2_workarounds_table[i].firmware_revision != |
1312 | (firmware_revision & 0xffff00)) | 1307 | (firmware_revision & 0xffff00)) |
1313 | continue; | 1308 | continue; |
1314 | if (sbp2_workarounds_table[i].model_id && | 1309 | if (sbp2_workarounds_table[i].model_id != |
1310 | SBP2_ROM_VALUE_WILDCARD && | ||
1315 | sbp2_workarounds_table[i].model_id != ud->model_id) | 1311 | sbp2_workarounds_table[i].model_id != ud->model_id) |
1316 | continue; | 1312 | continue; |
1317 | workarounds |= sbp2_workarounds_table[i].workarounds; | 1313 | workarounds |= sbp2_workarounds_table[i].workarounds; |