linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
	rdunlap@xenotime.net
Subject: Re: [patch 1/2] libata: _GTF support
Date: Wed, 27 Sep 2006 18:49:27 -0400	[thread overview]
Message-ID: <451AFFF7.3050707@pobox.com> (raw)
In-Reply-To: <20060927153627.c931de2d.kristen.c.accardi@intel.com>

Kristen Carlson Accardi wrote:
> _GTF is an acpi method that is used to reinitialize the drive.  It returns
> a task file containing ata commands that are sent back to the drive to restore
> it to boot up defaults.
> 
> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>

I have minor complaints only...


> +EXPORT_SYMBOL_GPL(do_drive_get_GTF);
> +EXPORT_SYMBOL_GPL(do_drive_set_taskfiles);
> +EXPORT_SYMBOL_GPL(ata_acpi_exec_tfs);
> +
> --- 2.6-mm.orig/drivers/ata/libata-core.c
> +++ 2.6-mm/drivers/ata/libata-core.c
> @@ -90,6 +90,10 @@ static int ata_probe_timeout = ATA_TMOUT
>  module_param(ata_probe_timeout, int, 0444);
>  MODULE_PARM_DESC(ata_probe_timeout, "Set ATA probing timeout (seconds)");
>  
> +int noacpi;
> +module_param(noacpi, int, 0444);
> +MODULE_PARM_DESC(noacpi, "Disables the use of ACPI in suspend/resume when set");
> +
>  MODULE_AUTHOR("Jeff Garzik");
>  MODULE_DESCRIPTION("Library module for ATA devices");
>  MODULE_LICENSE("GPL");
> @@ -1597,6 +1601,9 @@ int ata_bus_probe(struct ata_port *ap)
>  	/* reset and determine device classes */
>  	ap->ops->phy_reset(ap);
>  
> +	/* retrieve and execute the ATA task file of _GTF */
> +	ata_acpi_exec_tfs(ap);
> +
>  	for (i = 0; i < ATA_MAX_DEVICES; i++) {
>  		dev = &ap->device[i];
>  
> --- 2.6-mm.orig/drivers/ata/libata.h
> +++ 2.6-mm/drivers/ata/libata.h
> @@ -43,6 +43,7 @@ extern struct workqueue_struct *ata_aux_
>  extern int atapi_enabled;
>  extern int atapi_dmadir;
>  extern int libata_fua;
> +extern int noacpi;
>  extern struct ata_queued_cmd *ata_qc_new_init(struct ata_device *dev);
>  extern int ata_rwcmd_protocol(struct ata_queued_cmd *qc);
>  extern void ata_dev_disable(struct ata_device *dev);
> @@ -74,6 +75,33 @@ extern void ata_port_init(struct ata_por
>  extern struct ata_probe_ent *ata_probe_ent_alloc(struct device *dev,
>  						 const struct ata_port_info *port);
>  
> +/* libata-acpi.c */
> +#ifdef CONFIG_SATA_ACPI
> +extern int do_drive_get_GTF(struct ata_port *ap, int ix,
> +			unsigned int *gtf_length, unsigned long *gtf_address,
> +			unsigned long *obj_loc);
> +extern int do_drive_set_taskfiles(struct ata_port *ap,
> +			struct ata_device *atadev, unsigned int gtf_length,
> +			unsigned long gtf_address);
> +extern int ata_acpi_exec_tfs(struct ata_port *ap);
> +#else
> +static inline int do_drive_get_GTF(struct ata_port *ap, int ix,
> +			unsigned int *gtf_length, unsigned long *gtf_address,
> +			unsigned long *obj_loc)
> +{
> +	return 0;
> +}
> +static inline int do_drive_set_taskfiles(struct ata_port *ap,
> +                       struct ata_device *atadev,
> +                       unsigned int gtf_length, unsigned long gtf_address)
> +{
> +	return 0;
> +}
> +static inline int ata_acpi_exec_tfs(struct ata_port *ap)
> +{
> +	return 0;
> +}
> +#endif

1) No symbols should be exported to external kernel modules.   Delete 
all EXPORT_SYMBOL_GPL()

2) No symbols except for ata_acpi_exec_tfs() should be exported outside 
of the libata-acpi.c C module.  Mark everything except 
ata_acpi_exec_tfs() static, and remove the 'static inline' no-op 
functions for everything but ata_acpi_exec_tfs().

Otherwise ACK.

	Jeff

  reply	other threads:[~2006-09-27 22:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060927223441.205181000@localhost.localdomain>
2006-09-27 22:36 ` [patch 1/2] libata: _GTF support Kristen Carlson Accardi
2006-09-27 22:49   ` Jeff Garzik [this message]
2006-10-09 11:41   ` Stefan Seyfried
2006-10-09 15:10     ` Randy Dunlap
2006-09-27 22:36 ` [patch 2/2] libata: _SDD support Kristen Carlson Accardi
2006-09-27 22:54   ` Jeff Garzik
     [not found] <20060928182211.076258000@localhost.localdomain>
2006-09-28 18:30 ` [patch 1/2] libata: _GTF support Kristen Carlson Accardi
     [not found] ` <20060928112901.62ee8eba.kristen.c.accardi@intel.com>
     [not found]   ` <20060929020707.GA22082@srcf.ucam.org>
2006-09-29 17:03     ` Kristen Carlson Accardi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=451AFFF7.3050707@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=kristen.c.accardi@intel.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).