diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2006-12-30 09:37:09 -0500 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2007-02-08 14:57:08 -0500 |
commit | 4618fd300187132d12c06c64366729dd7a5280f2 (patch) | |
tree | 74e4796fbd147aa6b24cfe851cb653809de0545e /drivers/ieee1394/sbp2.c | |
parent | dcb71129841e5821c0cbbdd4017a6f202f180108 (diff) |
ieee1394: sbp2: use a better wildcard for blacklist
0x000000 could be a valid value to match against, but anything bigger
than 0xffffff cannot.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
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; |