lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <473452AA.7080503@infracomspa.it>
Date:	Fri, 09 Nov 2007 13:29:30 +0100
From:	Roberto Oppedisano <roppedisano@...racomspa.it>
To:	Matthew Garrett <mjg59@...f.ucam.org>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	Jeff Garzik <jeff@...zik.org>, linux-kernel@...r.kernel.org,
	linux-ide@...r.kernel.org, rjw@...k.pl, linux-acpi@...r.kernel.org
Subject: Re: [PATCH] Don't fail ata device revalidation for bad _GTF methods

I can confirm that this patch solves the problem with s2ram on my laptop.

R

Matthew Garrett wrote:
> Experience suggests that the _GTF method may be bad. We currently fail 
> device revalidation in that case, which seems excessive.
>
> Signed-off-by: Matthew Garrett <mjg59@...f.ucam.org>
>
> ---
>
> diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c
> index 08a52dd..545ea86 100644
> --- a/drivers/ata/libata-acpi.c
> +++ b/drivers/ata/libata-acpi.c
> @@ -312,7 +312,7 @@ EXPORT_SYMBOL_GPL(ata_acpi_stm);
>   *
>   * RETURNS:
>   * Number of taskfiles on success, 0 if _GTF doesn't exist or doesn't
> - * contain valid data.  -errno on other errors.
> + * contain valid data.
>   */
>  static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf,
>  			   void **ptr_to_free)
> @@ -339,7 +339,6 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf,
>  			ata_dev_printk(dev, KERN_WARNING,
>  				       "_GTF evaluation failed (AE 0x%x)\n",
>  				       status);
> -			rc = -EIO;
>  		}
>  		goto out_free;
>  	}
> @@ -359,7 +358,6 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf,
>  		ata_dev_printk(dev, KERN_WARNING,
>  			       "_GTF unexpected object type 0x%x\n",
>  			       out_obj->type);
> -		rc = -EINVAL;
>  		goto out_free;
>  	}
>  
> @@ -367,7 +365,6 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf,
>  		ata_dev_printk(dev, KERN_WARNING,
>  			       "unexpected _GTF length (%d)\n",
>  			       out_obj->buffer.length);
> -		rc = -EINVAL;
>  		goto out_free;
>  	}
>  
> @@ -511,10 +508,7 @@ static int ata_acpi_exec_tfs(struct ata_device *dev)
>  	int gtf_count, i, rc;
>  
>  	/* get taskfiles */
> -	rc = ata_dev_get_GTF(dev, &gtf, &ptr_to_free);
> -	if (rc < 0)
> -		return rc;
> -	gtf_count = rc;
> +	gtf_count = ata_dev_get_GTF(dev, &gtf, &ptr_to_free);
>  
>  	/* execute them */
>  	for (i = 0, rc = 0; i < gtf_count; i++) {
>   
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ