libata-pmp.c (341c2c958ec7bdd9f54733a8b0b432fe76842a82) libata-pmp.c (0a2c0f56159999e20015241d3b8fa89b1ab14309)
1/*
2 * libata-pmp.c - libata port multiplier support
3 *
4 * Copyright (c) 2007 SUSE Linux Products GmbH
5 * Copyright (c) 2007 Tejun Heo <teheo@suse.de>
6 *
7 * This file is released under the GPLv2.
8 */

--- 713 unchanged lines hidden (view full) ---

722 if (rc == -ENODEV) {
723 ehc->i.probe_mask |= ATA_ALL_DEVICES;
724 detach = 1;
725 /* give it just two more chances */
726 tries = min(tries, 2);
727 }
728
729 if (tries) {
1/*
2 * libata-pmp.c - libata port multiplier support
3 *
4 * Copyright (c) 2007 SUSE Linux Products GmbH
5 * Copyright (c) 2007 Tejun Heo <teheo@suse.de>
6 *
7 * This file is released under the GPLv2.
8 */

--- 713 unchanged lines hidden (view full) ---

722 if (rc == -ENODEV) {
723 ehc->i.probe_mask |= ATA_ALL_DEVICES;
724 detach = 1;
725 /* give it just two more chances */
726 tries = min(tries, 2);
727 }
728
729 if (tries) {
730 int sleep = ehc->i.flags & ATA_EHI_DID_RESET;
731
732 /* consecutive revalidation failures? speed down */
733 if (reval_failed)
734 sata_down_spd_limit(link);
735 else
736 reval_failed = 1;
737
730 /* consecutive revalidation failures? speed down */
731 if (reval_failed)
732 sata_down_spd_limit(link);
733 else
734 reval_failed = 1;
735
738 ata_dev_printk(dev, KERN_WARNING,
739 "retrying reset%s\n",
740 sleep ? " in 5 secs" : "");
741 if (sleep)
742 ssleep(5);
743 ehc->i.action |= ATA_EH_RESET;
744 goto retry;
745 } else {
746 ata_dev_printk(dev, KERN_ERR, "failed to recover PMP "
747 "after %d tries, giving up\n",
748 ATA_EH_PMP_TRIES);
749 goto fail;
750 }

--- 235 unchanged lines hidden (view full) ---

986 */
987 if (ap->pflags & ATA_PFLAG_UNLOADING)
988 return rc;
989
990 if (!sata_pmp_attached(ap))
991 goto retry;
992
993 if (--pmp_tries) {
736 ehc->i.action |= ATA_EH_RESET;
737 goto retry;
738 } else {
739 ata_dev_printk(dev, KERN_ERR, "failed to recover PMP "
740 "after %d tries, giving up\n",
741 ATA_EH_PMP_TRIES);
742 goto fail;
743 }

--- 235 unchanged lines hidden (view full) ---

979 */
980 if (ap->pflags & ATA_PFLAG_UNLOADING)
981 return rc;
982
983 if (!sata_pmp_attached(ap))
984 goto retry;
985
986 if (--pmp_tries) {
994 ata_port_printk(ap, KERN_WARNING,
995 "failed to recover PMP, retrying in 5 secs\n");
996 pmp_ehc->i.action |= ATA_EH_RESET;
987 pmp_ehc->i.action |= ATA_EH_RESET;
997 ssleep(5);
998 goto retry;
999 }
1000
1001 ata_port_printk(ap, KERN_ERR,
1002 "failed to recover PMP after %d tries, giving up\n",
1003 ATA_EH_PMP_TRIES);
1004 sata_pmp_detach(pmp_dev);
1005 ata_dev_disable(pmp_dev);

--- 25 unchanged lines hidden ---
988 goto retry;
989 }
990
991 ata_port_printk(ap, KERN_ERR,
992 "failed to recover PMP after %d tries, giving up\n",
993 ATA_EH_PMP_TRIES);
994 sata_pmp_detach(pmp_dev);
995 ata_dev_disable(pmp_dev);

--- 25 unchanged lines hidden ---