diff options
Diffstat (limited to 'drivers/firewire/fw-sbp2.c')
-rw-r--r-- | drivers/firewire/fw-sbp2.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c index 227d2e036cd8..53fc5a641e6d 100644 --- a/drivers/firewire/fw-sbp2.c +++ b/drivers/firewire/fw-sbp2.c | |||
@@ -86,6 +86,11 @@ MODULE_PARM_DESC(exclusive_login, "Exclusive login to sbp2 device " | |||
86 | * - delay inquiry | 86 | * - delay inquiry |
87 | * Wait extra SBP2_INQUIRY_DELAY seconds after login before SCSI inquiry. | 87 | * Wait extra SBP2_INQUIRY_DELAY seconds after login before SCSI inquiry. |
88 | * | 88 | * |
89 | * - power condition | ||
90 | * Set the power condition field in the START STOP UNIT commands sent by | ||
91 | * sd_mod on suspend, resume, and shutdown (if manage_start_stop is on). | ||
92 | * Some disks need this to spin down or to resume properly. | ||
93 | * | ||
89 | * - override internal blacklist | 94 | * - override internal blacklist |
90 | * Instead of adding to the built-in blacklist, use only the workarounds | 95 | * Instead of adding to the built-in blacklist, use only the workarounds |
91 | * specified in the module load parameter. | 96 | * specified in the module load parameter. |
@@ -97,6 +102,7 @@ MODULE_PARM_DESC(exclusive_login, "Exclusive login to sbp2 device " | |||
97 | #define SBP2_WORKAROUND_FIX_CAPACITY 0x8 | 102 | #define SBP2_WORKAROUND_FIX_CAPACITY 0x8 |
98 | #define SBP2_WORKAROUND_DELAY_INQUIRY 0x10 | 103 | #define SBP2_WORKAROUND_DELAY_INQUIRY 0x10 |
99 | #define SBP2_INQUIRY_DELAY 12 | 104 | #define SBP2_INQUIRY_DELAY 12 |
105 | #define SBP2_WORKAROUND_POWER_CONDITION 0x20 | ||
100 | #define SBP2_WORKAROUND_OVERRIDE 0x100 | 106 | #define SBP2_WORKAROUND_OVERRIDE 0x100 |
101 | 107 | ||
102 | static int sbp2_param_workarounds; | 108 | static int sbp2_param_workarounds; |
@@ -107,6 +113,8 @@ MODULE_PARM_DESC(workarounds, "Work around device bugs (default = 0" | |||
107 | ", skip mode page 8 = " __stringify(SBP2_WORKAROUND_MODE_SENSE_8) | 113 | ", skip mode page 8 = " __stringify(SBP2_WORKAROUND_MODE_SENSE_8) |
108 | ", fix capacity = " __stringify(SBP2_WORKAROUND_FIX_CAPACITY) | 114 | ", fix capacity = " __stringify(SBP2_WORKAROUND_FIX_CAPACITY) |
109 | ", delay inquiry = " __stringify(SBP2_WORKAROUND_DELAY_INQUIRY) | 115 | ", delay inquiry = " __stringify(SBP2_WORKAROUND_DELAY_INQUIRY) |
116 | ", set power condition in start stop unit = " | ||
117 | __stringify(SBP2_WORKAROUND_POWER_CONDITION) | ||
110 | ", override internal blacklist = " __stringify(SBP2_WORKAROUND_OVERRIDE) | 118 | ", override internal blacklist = " __stringify(SBP2_WORKAROUND_OVERRIDE) |
111 | ", or a combination)"); | 119 | ", or a combination)"); |
112 | 120 | ||
@@ -310,18 +318,25 @@ static const struct { | |||
310 | .firmware_revision = 0x002800, | 318 | .firmware_revision = 0x002800, |
311 | .model = 0x001010, | 319 | .model = 0x001010, |
312 | .workarounds = SBP2_WORKAROUND_INQUIRY_36 | | 320 | .workarounds = SBP2_WORKAROUND_INQUIRY_36 | |
313 | SBP2_WORKAROUND_MODE_SENSE_8, | 321 | SBP2_WORKAROUND_MODE_SENSE_8 | |
322 | SBP2_WORKAROUND_POWER_CONDITION, | ||
314 | }, | 323 | }, |
315 | /* DViCO Momobay FX-3A with TSB42AA9A bridge */ { | 324 | /* DViCO Momobay FX-3A with TSB42AA9A bridge */ { |
316 | .firmware_revision = 0x002800, | 325 | .firmware_revision = 0x002800, |
317 | .model = 0x000000, | 326 | .model = 0x000000, |
318 | .workarounds = SBP2_WORKAROUND_DELAY_INQUIRY, | 327 | .workarounds = SBP2_WORKAROUND_DELAY_INQUIRY | |
328 | SBP2_WORKAROUND_POWER_CONDITION, | ||
319 | }, | 329 | }, |
320 | /* Initio bridges, actually only needed for some older ones */ { | 330 | /* Initio bridges, actually only needed for some older ones */ { |
321 | .firmware_revision = 0x000200, | 331 | .firmware_revision = 0x000200, |
322 | .model = ~0, | 332 | .model = ~0, |
323 | .workarounds = SBP2_WORKAROUND_INQUIRY_36, | 333 | .workarounds = SBP2_WORKAROUND_INQUIRY_36, |
324 | }, | 334 | }, |
335 | /* PL-3507 bridge with Prolific firmware */ { | ||
336 | .firmware_revision = 0x012800, | ||
337 | .model = ~0, | ||
338 | .workarounds = SBP2_WORKAROUND_POWER_CONDITION, | ||
339 | }, | ||
325 | /* Symbios bridge */ { | 340 | /* Symbios bridge */ { |
326 | .firmware_revision = 0xa0b800, | 341 | .firmware_revision = 0xa0b800, |
327 | .model = ~0, | 342 | .model = ~0, |
@@ -1530,6 +1545,9 @@ static int sbp2_scsi_slave_configure(struct scsi_device *sdev) | |||
1530 | 1545 | ||
1531 | sdev->use_10_for_rw = 1; | 1546 | sdev->use_10_for_rw = 1; |
1532 | 1547 | ||
1548 | if (sbp2_param_exclusive_login) | ||
1549 | sdev->manage_start_stop = 1; | ||
1550 | |||
1533 | if (sdev->type == TYPE_ROM) | 1551 | if (sdev->type == TYPE_ROM) |
1534 | sdev->use_10_for_ms = 1; | 1552 | sdev->use_10_for_ms = 1; |
1535 | 1553 | ||
@@ -1540,6 +1558,9 @@ static int sbp2_scsi_slave_configure(struct scsi_device *sdev) | |||
1540 | if (lu->tgt->workarounds & SBP2_WORKAROUND_FIX_CAPACITY) | 1558 | if (lu->tgt->workarounds & SBP2_WORKAROUND_FIX_CAPACITY) |
1541 | sdev->fix_capacity = 1; | 1559 | sdev->fix_capacity = 1; |
1542 | 1560 | ||
1561 | if (lu->tgt->workarounds & SBP2_WORKAROUND_POWER_CONDITION) | ||
1562 | sdev->start_stop_pwr_cond = 1; | ||
1563 | |||
1543 | if (lu->tgt->workarounds & SBP2_WORKAROUND_128K_MAX_TRANS) | 1564 | if (lu->tgt->workarounds & SBP2_WORKAROUND_128K_MAX_TRANS) |
1544 | blk_queue_max_sectors(sdev->request_queue, 128 * 1024 / 512); | 1565 | blk_queue_max_sectors(sdev->request_queue, 128 * 1024 / 512); |
1545 | 1566 | ||