aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/sbp2.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-03-18 02:44:31 -0400
committerDavid S. Miller <davem@davemloft.net>2008-03-18 02:44:31 -0400
commit2f633928cbba8a5858bb39b11e7219a41b0fbef5 (patch)
tree9a82f4b7f2c3afe4b0208d8e44ea61bae90a7d22 /drivers/ieee1394/sbp2.c
parent5e226e4d9016daee170699f8a4188a5505021756 (diff)
parentbde4f8fa8db2abd5ac9c542d76012d0fedab050f (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/ieee1394/sbp2.c')
-rw-r--r--drivers/ieee1394/sbp2.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index 28e155a9e2a5..f53f72daae34 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -183,6 +183,9 @@ MODULE_PARM_DESC(exclusive_login, "Exclusive login to sbp2 device "
183 * Avoids access beyond actual disk limits on devices with an off-by-one bug. 183 * Avoids access beyond actual disk limits on devices with an off-by-one bug.
184 * Don't use this with devices which don't have this bug. 184 * Don't use this with devices which don't have this bug.
185 * 185 *
186 * - delay inquiry
187 * Wait extra SBP2_INQUIRY_DELAY seconds after login before SCSI inquiry.
188 *
186 * - override internal blacklist 189 * - override internal blacklist
187 * Instead of adding to the built-in blacklist, use only the workarounds 190 * Instead of adding to the built-in blacklist, use only the workarounds
188 * specified in the module load parameter. 191 * specified in the module load parameter.
@@ -195,6 +198,7 @@ MODULE_PARM_DESC(workarounds, "Work around device bugs (default = 0"
195 ", 36 byte inquiry = " __stringify(SBP2_WORKAROUND_INQUIRY_36) 198 ", 36 byte inquiry = " __stringify(SBP2_WORKAROUND_INQUIRY_36)
196 ", skip mode page 8 = " __stringify(SBP2_WORKAROUND_MODE_SENSE_8) 199 ", skip mode page 8 = " __stringify(SBP2_WORKAROUND_MODE_SENSE_8)
197 ", fix capacity = " __stringify(SBP2_WORKAROUND_FIX_CAPACITY) 200 ", fix capacity = " __stringify(SBP2_WORKAROUND_FIX_CAPACITY)
201 ", delay inquiry = " __stringify(SBP2_WORKAROUND_DELAY_INQUIRY)
198 ", override internal blacklist = " __stringify(SBP2_WORKAROUND_OVERRIDE) 202 ", override internal blacklist = " __stringify(SBP2_WORKAROUND_OVERRIDE)
199 ", or a combination)"); 203 ", or a combination)");
200 204
@@ -357,6 +361,11 @@ static const struct {
357 .workarounds = SBP2_WORKAROUND_INQUIRY_36 | 361 .workarounds = SBP2_WORKAROUND_INQUIRY_36 |
358 SBP2_WORKAROUND_MODE_SENSE_8, 362 SBP2_WORKAROUND_MODE_SENSE_8,
359 }, 363 },
364 /* DViCO Momobay FX-3A with TSB42AA9A bridge */ {
365 .firmware_revision = 0x002800,
366 .model_id = 0x000000,
367 .workarounds = SBP2_WORKAROUND_DELAY_INQUIRY,
368 },
360 /* Initio bridges, actually only needed for some older ones */ { 369 /* Initio bridges, actually only needed for some older ones */ {
361 .firmware_revision = 0x000200, 370 .firmware_revision = 0x000200,
362 .model_id = SBP2_ROM_VALUE_WILDCARD, 371 .model_id = SBP2_ROM_VALUE_WILDCARD,
@@ -367,6 +376,11 @@ static const struct {
367 .model_id = SBP2_ROM_VALUE_WILDCARD, 376 .model_id = SBP2_ROM_VALUE_WILDCARD,
368 .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS, 377 .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS,
369 }, 378 },
379 /* Datafab MD2-FW2 with Symbios/LSILogic SYM13FW500 bridge */ {
380 .firmware_revision = 0x002600,
381 .model_id = SBP2_ROM_VALUE_WILDCARD,
382 .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS,
383 },
370 /* iPod 4th generation */ { 384 /* iPod 4th generation */ {
371 .firmware_revision = 0x0a2700, 385 .firmware_revision = 0x0a2700,
372 .model_id = 0x000021, 386 .model_id = 0x000021,
@@ -914,6 +928,9 @@ static int sbp2_start_device(struct sbp2_lu *lu)
914 sbp2_agent_reset(lu, 1); 928 sbp2_agent_reset(lu, 1);
915 sbp2_max_speed_and_size(lu); 929 sbp2_max_speed_and_size(lu);
916 930
931 if (lu->workarounds & SBP2_WORKAROUND_DELAY_INQUIRY)
932 ssleep(SBP2_INQUIRY_DELAY);
933
917 error = scsi_add_device(lu->shost, 0, lu->ud->id, 0); 934 error = scsi_add_device(lu->shost, 0, lu->ud->id, 0);
918 if (error) { 935 if (error) {
919 SBP2_ERR("scsi_add_device failed"); 936 SBP2_ERR("scsi_add_device failed");
@@ -1962,6 +1979,9 @@ static int sbp2scsi_slave_alloc(struct scsi_device *sdev)
1962{ 1979{
1963 struct sbp2_lu *lu = (struct sbp2_lu *)sdev->host->hostdata[0]; 1980 struct sbp2_lu *lu = (struct sbp2_lu *)sdev->host->hostdata[0];
1964 1981
1982 if (sdev->lun != 0 || sdev->id != lu->ud->id || sdev->channel != 0)
1983 return -ENODEV;
1984
1965 lu->sdev = sdev; 1985 lu->sdev = sdev;
1966 sdev->allow_restart = 1; 1986 sdev->allow_restart = 1;
1967 1987