Re: [PATCH 1/2] libata: initialize link speed from sstatus if online.

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

 



Hello, David.

On Thu, Oct 19, 2017 at 01:30:35PM -0500, David Milburn wrote:
> @@ -3002,16 +3002,16 @@ int ata_bus_probe(struct ata_port *ap)
>   */
>  static void sata_print_link_status(struct ata_link *link)
>  {
> -	u32 sstatus, scontrol, tmp;
> +	u32 sstatus, scontrol;
>  
>  	if (sata_scr_read(link, SCR_STATUS, &sstatus))
>  		return;
>  	sata_scr_read(link, SCR_CONTROL, &scontrol);
>  
>  	if (ata_phys_link_online(link)) {
> -		tmp = (sstatus >> 4) & 0xf;
> +		link->sata_spd = (sstatus >> 4) & 0xf;
>  		ata_link_info(link, "SATA link up %s (SStatus %X SControl %X)\n",
> -			      sata_spd_string(tmp), sstatus, scontrol);
> +			      sata_spd_string(link->sata_spd), sstatus, scontrol);
>  	} else {
>  		ata_link_info(link, "SATA link down (SStatus %X SControl %X)\n",
>  			      sstatus, scontrol);

I don't think it makes sense to update a link field from a
print_status function.

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