Re: [PATCH] libata: Power off empty ports

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On Fri, Mar 04, 2011 at 10:24:11AM -0800, Kristen Carlson Accardi wrote:
>  	case ATA_LPM_MIN_POWER:
> -		/* no restrictions on LPM transitions */
> -		scontrol &= ~(0x3 << 8);
> +		if (ata_link_nr_enabled(link) > 0)
> +			/* no restrictions on LPM transitions */
> +			scontrol &= ~(0x3 << 8);
> +		else {
> +			/* empty port, power off */
> +			scontrol &= ~0xf;
> +			scontrol |= (0x1 << 2);
> +		}

Why not just do the following?

	scontrol &= ~(0x3 << 8);
	/* if empty, power off */
	if (!ata_link_nr_enabled(link)) {
		scontrol &= ~0xf;
		scontrol |= 0x1 << 2;
	}

Also, can you please provide some details on on which hardware you
tested the change and how much power it actually saved?

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux