aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/sbp2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ieee1394/sbp2.c')
-rw-r--r--drivers/ieee1394/sbp2.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index 4325aac7733d..4edfff46b1e6 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -51,7 +51,6 @@
51 * Grep for inline FIXME comments below. 51 * Grep for inline FIXME comments below.
52 */ 52 */
53 53
54#include <linux/blkdev.h>
55#include <linux/compiler.h> 54#include <linux/compiler.h>
56#include <linux/delay.h> 55#include <linux/delay.h>
57#include <linux/device.h> 56#include <linux/device.h>
@@ -304,10 +303,11 @@ static struct scsi_host_template sbp2_shost_template = {
304 .use_clustering = ENABLE_CLUSTERING, 303 .use_clustering = ENABLE_CLUSTERING,
305 .cmd_per_lun = SBP2_MAX_CMDS, 304 .cmd_per_lun = SBP2_MAX_CMDS,
306 .can_queue = SBP2_MAX_CMDS, 305 .can_queue = SBP2_MAX_CMDS,
307 .emulated = 1,
308 .sdev_attrs = sbp2_sysfs_sdev_attrs, 306 .sdev_attrs = sbp2_sysfs_sdev_attrs,
309}; 307};
310 308
309/* for match-all entries in sbp2_workarounds_table */
310#define SBP2_ROM_VALUE_WILDCARD 0x1000000
311 311
312/* 312/*
313 * List of devices with known bugs. 313 * List of devices with known bugs.
@@ -329,22 +329,14 @@ static const struct {
329 }, 329 },
330 /* Initio bridges, actually only needed for some older ones */ { 330 /* Initio bridges, actually only needed for some older ones */ {
331 .firmware_revision = 0x000200, 331 .firmware_revision = 0x000200,
332 .model_id = SBP2_ROM_VALUE_WILDCARD,
332 .workarounds = SBP2_WORKAROUND_INQUIRY_36, 333 .workarounds = SBP2_WORKAROUND_INQUIRY_36,
333 }, 334 },
334 /* Symbios bridge */ { 335 /* Symbios bridge */ {
335 .firmware_revision = 0xa0b800, 336 .firmware_revision = 0xa0b800,
337 .model_id = SBP2_ROM_VALUE_WILDCARD,
336 .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS, 338 .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS,
337 }, 339 },
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 */ { 340 /* iPod 4th generation */ {
349 .firmware_revision = 0x0a2700, 341 .firmware_revision = 0x0a2700,
350 .model_id = 0x000021, 342 .model_id = 0x000021,
@@ -1307,11 +1299,13 @@ static void sbp2_parse_unit_directory(struct sbp2_lu *lu,
1307 1299
1308 if (!(workarounds & SBP2_WORKAROUND_OVERRIDE)) 1300 if (!(workarounds & SBP2_WORKAROUND_OVERRIDE))
1309 for (i = 0; i < ARRAY_SIZE(sbp2_workarounds_table); i++) { 1301 for (i = 0; i < ARRAY_SIZE(sbp2_workarounds_table); i++) {
1310 if (sbp2_workarounds_table[i].firmware_revision && 1302 if (sbp2_workarounds_table[i].firmware_revision !=
1303 SBP2_ROM_VALUE_WILDCARD &&
1311 sbp2_workarounds_table[i].firmware_revision != 1304 sbp2_workarounds_table[i].firmware_revision !=
1312 (firmware_revision & 0xffff00)) 1305 (firmware_revision & 0xffff00))
1313 continue; 1306 continue;
1314 if (sbp2_workarounds_table[i].model_id && 1307 if (sbp2_workarounds_table[i].model_id !=
1308 SBP2_ROM_VALUE_WILDCARD &&
1315 sbp2_workarounds_table[i].model_id != ud->model_id) 1309 sbp2_workarounds_table[i].model_id != ud->model_id)
1316 continue; 1310 continue;
1317 workarounds |= sbp2_workarounds_table[i].workarounds; 1311 workarounds |= sbp2_workarounds_table[i].workarounds;
@@ -2017,7 +2011,6 @@ static int sbp2scsi_slave_configure(struct scsi_device *sdev)
2017{ 2011{
2018 struct sbp2_lu *lu = (struct sbp2_lu *)sdev->host->hostdata[0]; 2012 struct sbp2_lu *lu = (struct sbp2_lu *)sdev->host->hostdata[0];
2019 2013
2020 blk_queue_dma_alignment(sdev->request_queue, (512 - 1));
2021 sdev->use_10_for_rw = 1; 2014 sdev->use_10_for_rw = 1;
2022 2015
2023 if (sdev->type == TYPE_ROM) 2016 if (sdev->type == TYPE_ROM)