aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-core.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-04-11 09:16:45 -0400
committerJeff Garzik <jeff@garzik.org>2006-04-11 13:12:46 -0400
commit2bf2cb26b2512c6a609bb152982c388329bedff6 (patch)
tree9f1f3ea5000304fd946f34b24d9904c2a1027480 /drivers/scsi/libata-core.c
parentdb70fef0750e5f8dbb64f9fadb333d2c7caf26a1 (diff)
[PATCH] libata: kill @verbose from ata_reset_fn_t
@verbose was added to ata_reset_fn_t because AHCI complained during probing if no device was attached to the port. However, muting failure message isn't the correct approach. Reset methods are responsible for detecting no device condition and finishing successfully. Now that AHCI softreset is fixed, kill @verbose. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/scsi/libata-core.c')
-rw-r--r--drivers/scsi/libata-core.c36
1 files changed, 12 insertions, 24 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index f37179623efa..92b5077ac052 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -2387,7 +2387,6 @@ void ata_std_probeinit(struct ata_port *ap)
2387/** 2387/**
2388 * ata_std_softreset - reset host port via ATA SRST 2388 * ata_std_softreset - reset host port via ATA SRST
2389 * @ap: port to reset 2389 * @ap: port to reset
2390 * @verbose: fail verbosely
2391 * @classes: resulting classes of attached devices 2390 * @classes: resulting classes of attached devices
2392 * 2391 *
2393 * Reset host port using ATA SRST. This function is to be used 2392 * Reset host port using ATA SRST. This function is to be used
@@ -2399,7 +2398,7 @@ void ata_std_probeinit(struct ata_port *ap)
2399 * RETURNS: 2398 * RETURNS:
2400 * 0 on success, -errno otherwise. 2399 * 0 on success, -errno otherwise.
2401 */ 2400 */
2402int ata_std_softreset(struct ata_port *ap, int verbose, unsigned int *classes) 2401int ata_std_softreset(struct ata_port *ap, unsigned int *classes)
2403{ 2402{
2404 unsigned int slave_possible = ap->flags & ATA_FLAG_SLAVE_POSS; 2403 unsigned int slave_possible = ap->flags & ATA_FLAG_SLAVE_POSS;
2405 unsigned int devmask = 0, err_mask; 2404 unsigned int devmask = 0, err_mask;
@@ -2425,12 +2424,8 @@ int ata_std_softreset(struct ata_port *ap, int verbose, unsigned int *classes)
2425 DPRINTK("about to softreset, devmask=%x\n", devmask); 2424 DPRINTK("about to softreset, devmask=%x\n", devmask);
2426 err_mask = ata_bus_softreset(ap, devmask); 2425 err_mask = ata_bus_softreset(ap, devmask);
2427 if (err_mask) { 2426 if (err_mask) {
2428 if (verbose) 2427 printk(KERN_ERR "ata%u: SRST failed (err_mask=0x%x)\n",
2429 printk(KERN_ERR "ata%u: SRST failed (err_mask=0x%x)\n", 2428 ap->id, err_mask);
2430 ap->id, err_mask);
2431 else
2432 DPRINTK("EXIT, softreset failed (err_mask=0x%x)\n",
2433 err_mask);
2434 return -EIO; 2429 return -EIO;
2435 } 2430 }
2436 2431
@@ -2447,7 +2442,6 @@ int ata_std_softreset(struct ata_port *ap, int verbose, unsigned int *classes)
2447/** 2442/**
2448 * sata_std_hardreset - reset host port via SATA phy reset 2443 * sata_std_hardreset - reset host port via SATA phy reset
2449 * @ap: port to reset 2444 * @ap: port to reset
2450 * @verbose: fail verbosely
2451 * @class: resulting class of attached device 2445 * @class: resulting class of attached device
2452 * 2446 *
2453 * SATA phy-reset host port using DET bits of SControl register. 2447 * SATA phy-reset host port using DET bits of SControl register.
@@ -2460,7 +2454,7 @@ int ata_std_softreset(struct ata_port *ap, int verbose, unsigned int *classes)
2460 * RETURNS: 2454 * RETURNS:
2461 * 0 on success, -errno otherwise. 2455 * 0 on success, -errno otherwise.
2462 */ 2456 */
2463int sata_std_hardreset(struct ata_port *ap, int verbose, unsigned int *class) 2457int sata_std_hardreset(struct ata_port *ap, unsigned int *class)
2464{ 2458{
2465 u32 scontrol; 2459 u32 scontrol;
2466 2460
@@ -2500,11 +2494,8 @@ int sata_std_hardreset(struct ata_port *ap, int verbose, unsigned int *class)
2500 } 2494 }
2501 2495
2502 if (ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT)) { 2496 if (ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT)) {
2503 if (verbose) 2497 printk(KERN_ERR "ata%u: COMRESET failed "
2504 printk(KERN_ERR "ata%u: COMRESET failed " 2498 "(device not ready)\n", ap->id);
2505 "(device not ready)\n", ap->id);
2506 else
2507 DPRINTK("EXIT, device not ready\n");
2508 return -EIO; 2499 return -EIO;
2509 } 2500 }
2510 2501
@@ -2592,16 +2583,15 @@ int ata_std_probe_reset(struct ata_port *ap, unsigned int *classes)
2592 ata_std_postreset, classes); 2583 ata_std_postreset, classes);
2593} 2584}
2594 2585
2595int ata_do_reset(struct ata_port *ap, 2586int ata_do_reset(struct ata_port *ap, ata_reset_fn_t reset,
2596 ata_reset_fn_t reset, ata_postreset_fn_t postreset, 2587 ata_postreset_fn_t postreset, unsigned int *classes)
2597 int verbose, unsigned int *classes)
2598{ 2588{
2599 int i, rc; 2589 int i, rc;
2600 2590
2601 for (i = 0; i < ATA_MAX_DEVICES; i++) 2591 for (i = 0; i < ATA_MAX_DEVICES; i++)
2602 classes[i] = ATA_DEV_UNKNOWN; 2592 classes[i] = ATA_DEV_UNKNOWN;
2603 2593
2604 rc = reset(ap, verbose, classes); 2594 rc = reset(ap, classes);
2605 if (rc) 2595 if (rc)
2606 return rc; 2596 return rc;
2607 2597
@@ -2645,8 +2635,6 @@ int ata_do_reset(struct ata_port *ap,
2645 * - If classification is supported, fill classes[] with 2635 * - If classification is supported, fill classes[] with
2646 * recognized class codes. 2636 * recognized class codes.
2647 * - If classification is not supported, leave classes[] alone. 2637 * - If classification is not supported, leave classes[] alone.
2648 * - If verbose is non-zero, print error message on failure;
2649 * otherwise, shut up.
2650 * 2638 *
2651 * LOCKING: 2639 * LOCKING:
2652 * Kernel thread context (may sleep) 2640 * Kernel thread context (may sleep)
@@ -2666,7 +2654,7 @@ int ata_drive_probe_reset(struct ata_port *ap, ata_probeinit_fn_t probeinit,
2666 probeinit(ap); 2654 probeinit(ap);
2667 2655
2668 if (softreset && !ata_set_sata_spd_needed(ap)) { 2656 if (softreset && !ata_set_sata_spd_needed(ap)) {
2669 rc = ata_do_reset(ap, softreset, postreset, 0, classes); 2657 rc = ata_do_reset(ap, softreset, postreset, classes);
2670 if (rc == 0 && classes[0] != ATA_DEV_UNKNOWN) 2658 if (rc == 0 && classes[0] != ATA_DEV_UNKNOWN)
2671 goto done; 2659 goto done;
2672 printk(KERN_INFO "ata%u: softreset failed, will try " 2660 printk(KERN_INFO "ata%u: softreset failed, will try "
@@ -2678,7 +2666,7 @@ int ata_drive_probe_reset(struct ata_port *ap, ata_probeinit_fn_t probeinit,
2678 goto done; 2666 goto done;
2679 2667
2680 while (1) { 2668 while (1) {
2681 rc = ata_do_reset(ap, hardreset, postreset, 0, classes); 2669 rc = ata_do_reset(ap, hardreset, postreset, classes);
2682 if (rc == 0) { 2670 if (rc == 0) {
2683 if (classes[0] != ATA_DEV_UNKNOWN) 2671 if (classes[0] != ATA_DEV_UNKNOWN)
2684 goto done; 2672 goto done;
@@ -2699,7 +2687,7 @@ int ata_drive_probe_reset(struct ata_port *ap, ata_probeinit_fn_t probeinit,
2699 ap->id); 2687 ap->id);
2700 ssleep(5); 2688 ssleep(5);
2701 2689
2702 rc = ata_do_reset(ap, softreset, postreset, 0, classes); 2690 rc = ata_do_reset(ap, softreset, postreset, classes);
2703 } 2691 }
2704 2692
2705 done: 2693 done: