Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fd995f70 authored by Tejun Heo's avatar Tejun Heo Committed by Jeff Garzik
Browse files

libata-pmp-prep: implement ATA_LFLAG_NO_RETRY



Some PMP links are connected to internal pseudo devices which may come
and go depending on situation.  There's no reason to try hard to
recover them.  ATA_LFLAG_NO_RETRY tells EH to not retry if the device
attached to the link fails.

Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent ae791c05
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -2335,6 +2335,9 @@ int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset,
		struct ata_eh_context *ehc = &link->eh_context;
		struct ata_eh_context *ehc = &link->eh_context;


		ata_link_for_each_dev(dev, link) {
		ata_link_for_each_dev(dev, link) {
			if (link->flags & ATA_LFLAG_NO_RETRY)
				ehc->tries[dev->devno] = 1;
			else
				ehc->tries[dev->devno] = ATA_EH_DEV_TRIES;
				ehc->tries[dev->devno] = ATA_EH_DEV_TRIES;


			/* collect port action mask recorded in dev actions */
			/* collect port action mask recorded in dev actions */
+1 −0
Original line number Original line Diff line number Diff line
@@ -169,6 +169,7 @@ enum {
	ATA_LFLAG_ASSUME_ATA	= (1 << 3), /* assume ATA class */
	ATA_LFLAG_ASSUME_ATA	= (1 << 3), /* assume ATA class */
	ATA_LFLAG_ASSUME_SEMB	= (1 << 4), /* assume SEMB class */
	ATA_LFLAG_ASSUME_SEMB	= (1 << 4), /* assume SEMB class */
	ATA_LFLAG_ASSUME_CLASS	= ATA_LFLAG_ASSUME_ATA | ATA_LFLAG_ASSUME_SEMB,
	ATA_LFLAG_ASSUME_CLASS	= ATA_LFLAG_ASSUME_ATA | ATA_LFLAG_ASSUME_SEMB,
	ATA_LFLAG_NO_RETRY	= (1 << 5), /* don't retry this link */


	/* struct ata_port flags */
	/* struct ata_port flags */
	ATA_FLAG_SLAVE_POSS	= (1 << 0), /* host supports slave dev */
	ATA_FLAG_SLAVE_POSS	= (1 << 0), /* host supports slave dev */