aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-07-15 15:39:44 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-15 15:39:44 -0400
commit22a37bcb7857541eb2d37806c4744ee2530baa98 (patch)
tree9b3e1a8165908ffa74b2559924ee0f18488667ba /drivers/ieee1394
parent849c529f57020cc47085400edd5e641d95cd4faf (diff)
parent82f06e86117680ada35fdb76c8852268d994cd99 (diff)
Merge branch 'sbp2-spindown' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6
* 'sbp2-spindown' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: ieee1394: sbp2: spin disks down on suspend and shutdown firewire: fw-sbp2: spin disks down on suspend and shutdown ieee1394: sbp2: fix spindown for PL-3507 and TSB42AA9 firmwares firewire: fw-sbp2: fix spindown for PL-3507 and TSB42AA9 firmwares scsi: sd: optionally set power condition in START STOP UNIT
Diffstat (limited to 'drivers/ieee1394')
-rw-r--r--drivers/ieee1394/sbp2.c22
-rw-r--r--drivers/ieee1394/sbp2.h1
2 files changed, 21 insertions, 2 deletions
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index a5ceff287a28..9cbf3154d243 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -186,6 +186,11 @@ MODULE_PARM_DESC(exclusive_login, "Exclusive login to sbp2 device "
186 * - delay inquiry 186 * - delay inquiry
187 * Wait extra SBP2_INQUIRY_DELAY seconds after login before SCSI inquiry. 187 * Wait extra SBP2_INQUIRY_DELAY seconds after login before SCSI inquiry.
188 * 188 *
189 * - power condition
190 * Set the power condition field in the START STOP UNIT commands sent by
191 * sd_mod on suspend, resume, and shutdown (if manage_start_stop is on).
192 * Some disks need this to spin down or to resume properly.
193 *
189 * - override internal blacklist 194 * - override internal blacklist
190 * Instead of adding to the built-in blacklist, use only the workarounds 195 * Instead of adding to the built-in blacklist, use only the workarounds
191 * specified in the module load parameter. 196 * specified in the module load parameter.
@@ -199,6 +204,8 @@ MODULE_PARM_DESC(workarounds, "Work around device bugs (default = 0"
199 ", skip mode page 8 = " __stringify(SBP2_WORKAROUND_MODE_SENSE_8) 204 ", skip mode page 8 = " __stringify(SBP2_WORKAROUND_MODE_SENSE_8)
200 ", fix capacity = " __stringify(SBP2_WORKAROUND_FIX_CAPACITY) 205 ", fix capacity = " __stringify(SBP2_WORKAROUND_FIX_CAPACITY)
201 ", delay inquiry = " __stringify(SBP2_WORKAROUND_DELAY_INQUIRY) 206 ", delay inquiry = " __stringify(SBP2_WORKAROUND_DELAY_INQUIRY)
207 ", set power condition in start stop unit = "
208 __stringify(SBP2_WORKAROUND_POWER_CONDITION)
202 ", override internal blacklist = " __stringify(SBP2_WORKAROUND_OVERRIDE) 209 ", override internal blacklist = " __stringify(SBP2_WORKAROUND_OVERRIDE)
203 ", or a combination)"); 210 ", or a combination)");
204 211
@@ -359,18 +366,25 @@ static const struct {
359 .firmware_revision = 0x002800, 366 .firmware_revision = 0x002800,
360 .model_id = 0x001010, 367 .model_id = 0x001010,
361 .workarounds = SBP2_WORKAROUND_INQUIRY_36 | 368 .workarounds = SBP2_WORKAROUND_INQUIRY_36 |
362 SBP2_WORKAROUND_MODE_SENSE_8, 369 SBP2_WORKAROUND_MODE_SENSE_8 |
370 SBP2_WORKAROUND_POWER_CONDITION,
363 }, 371 },
364 /* DViCO Momobay FX-3A with TSB42AA9A bridge */ { 372 /* DViCO Momobay FX-3A with TSB42AA9A bridge */ {
365 .firmware_revision = 0x002800, 373 .firmware_revision = 0x002800,
366 .model_id = 0x000000, 374 .model_id = 0x000000,
367 .workarounds = SBP2_WORKAROUND_DELAY_INQUIRY, 375 .workarounds = SBP2_WORKAROUND_DELAY_INQUIRY |
376 SBP2_WORKAROUND_POWER_CONDITION,
368 }, 377 },
369 /* Initio bridges, actually only needed for some older ones */ { 378 /* Initio bridges, actually only needed for some older ones */ {
370 .firmware_revision = 0x000200, 379 .firmware_revision = 0x000200,
371 .model_id = SBP2_ROM_VALUE_WILDCARD, 380 .model_id = SBP2_ROM_VALUE_WILDCARD,
372 .workarounds = SBP2_WORKAROUND_INQUIRY_36, 381 .workarounds = SBP2_WORKAROUND_INQUIRY_36,
373 }, 382 },
383 /* PL-3507 bridge with Prolific firmware */ {
384 .firmware_revision = 0x012800,
385 .model_id = SBP2_ROM_VALUE_WILDCARD,
386 .workarounds = SBP2_WORKAROUND_POWER_CONDITION,
387 },
374 /* Symbios bridge */ { 388 /* Symbios bridge */ {
375 .firmware_revision = 0xa0b800, 389 .firmware_revision = 0xa0b800,
376 .model_id = SBP2_ROM_VALUE_WILDCARD, 390 .model_id = SBP2_ROM_VALUE_WILDCARD,
@@ -1995,6 +2009,8 @@ static int sbp2scsi_slave_configure(struct scsi_device *sdev)
1995 2009
1996 sdev->use_10_for_rw = 1; 2010 sdev->use_10_for_rw = 1;
1997 2011
2012 if (sbp2_exclusive_login)
2013 sdev->manage_start_stop = 1;
1998 if (sdev->type == TYPE_ROM) 2014 if (sdev->type == TYPE_ROM)
1999 sdev->use_10_for_ms = 1; 2015 sdev->use_10_for_ms = 1;
2000 if (sdev->type == TYPE_DISK && 2016 if (sdev->type == TYPE_DISK &&
@@ -2002,6 +2018,8 @@ static int sbp2scsi_slave_configure(struct scsi_device *sdev)
2002 sdev->skip_ms_page_8 = 1; 2018 sdev->skip_ms_page_8 = 1;
2003 if (lu->workarounds & SBP2_WORKAROUND_FIX_CAPACITY) 2019 if (lu->workarounds & SBP2_WORKAROUND_FIX_CAPACITY)
2004 sdev->fix_capacity = 1; 2020 sdev->fix_capacity = 1;
2021 if (lu->workarounds & SBP2_WORKAROUND_POWER_CONDITION)
2022 sdev->start_stop_pwr_cond = 1;
2005 if (lu->workarounds & SBP2_WORKAROUND_128K_MAX_TRANS) 2023 if (lu->workarounds & SBP2_WORKAROUND_128K_MAX_TRANS)
2006 blk_queue_max_sectors(sdev->request_queue, 128 * 1024 / 512); 2024 blk_queue_max_sectors(sdev->request_queue, 128 * 1024 / 512);
2007 return 0; 2025 return 0;
diff --git a/drivers/ieee1394/sbp2.h b/drivers/ieee1394/sbp2.h
index 80d8e097b065..875428bc8d29 100644
--- a/drivers/ieee1394/sbp2.h
+++ b/drivers/ieee1394/sbp2.h
@@ -345,6 +345,7 @@ enum sbp2lu_state_types {
345#define SBP2_WORKAROUND_FIX_CAPACITY 0x8 345#define SBP2_WORKAROUND_FIX_CAPACITY 0x8
346#define SBP2_WORKAROUND_DELAY_INQUIRY 0x10 346#define SBP2_WORKAROUND_DELAY_INQUIRY 0x10
347#define SBP2_INQUIRY_DELAY 12 347#define SBP2_INQUIRY_DELAY 12
348#define SBP2_WORKAROUND_POWER_CONDITION 0x20
348#define SBP2_WORKAROUND_OVERRIDE 0x100 349#define SBP2_WORKAROUND_OVERRIDE 0x100
349 350
350#endif /* SBP2_H */ 351#endif /* SBP2_H */