linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: jgarzik@pobox.com, alan@lxorguk.ukuu.org.uk, albertcc@tw.ibm.com,
	linux-ide@vger.kernel.org
Cc: Tejun Heo <htejun@gmail.com>
Subject: [PATCH 14/14] libata: make some libata-core routines extern
Date: Sat, 1 Apr 2006 19:48:37 +0900	[thread overview]
Message-ID: <11438885173883-git-send-email-htejun@gmail.com> (raw)
In-Reply-To: <11438885151530-git-send-email-htejun@gmail.com>

Make libata-core routines which will be used by EH implementation
extern.

Signed-off-by: Tejun Heo <htejun@gmail.com>

---

 drivers/scsi/libata-core.c |   31 +++++++++++++------------------
 drivers/scsi/libata.h      |   14 ++++++++++++++
 2 files changed, 27 insertions(+), 18 deletions(-)

5349c724ad0a9c179ff3e56c235dfd4b20fa12d1
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index c893129..681ef82 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -65,10 +65,6 @@ static unsigned int ata_dev_init_params(
 					struct ata_device *dev,
 					u16 heads,
 					u16 sectors);
-static int ata_down_sata_spd_limit(struct ata_port *ap, struct ata_device *dev);
-static int ata_down_xfermask_limit(struct ata_port *ap, struct ata_device *dev,
-				   int force_pio0);
-static int ata_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev);
 static unsigned int ata_dev_set_xfermode(struct ata_port *ap,
 					 struct ata_device *dev);
 static void ata_dev_xfermask(struct ata_port *ap, struct ata_device *dev);
@@ -412,7 +408,7 @@ static const char *sata_spd_string(unsig
 	return spd_str[spd - 1];
 }
 
-static void ata_dev_disable(struct ata_port *ap, struct ata_device *dev)
+void ata_dev_disable(struct ata_port *ap, struct ata_device *dev)
 {
 	if (ata_dev_enabled(dev)) {
 		printk(KERN_WARNING "ata%u: dev %u disabled\n",
@@ -979,10 +975,9 @@ void ata_qc_complete_internal(struct ata
  *	None.  Should be called with kernel context, might sleep.
  */
 
-static unsigned
-ata_exec_internal(struct ata_port *ap, struct ata_device *dev,
-		  struct ata_taskfile *tf, const u8 *cdb,
-		  int dma_dir, void *buf, unsigned int buflen)
+unsigned ata_exec_internal(struct ata_port *ap, struct ata_device *dev,
+			   struct ata_taskfile *tf, const u8 *cdb,
+			   int dma_dir, void *buf, unsigned int buflen)
 {
 	u8 command = tf->command;
 	struct ata_queued_cmd *qc;
@@ -1650,7 +1645,7 @@ void ata_port_disable(struct ata_port *a
  *	RETURNS:
  *	0 on success, negative errno on failure
  */
-static int ata_down_sata_spd_limit(struct ata_port *ap, struct ata_device *dev)
+int ata_down_sata_spd_limit(struct ata_port *ap, struct ata_device *dev)
 {
 	u32 spd, mask;
 	int highbit;
@@ -1715,7 +1710,7 @@ static int __ata_set_sata_spd_needed(str
  *	RETURNS:
  *	1 if SATA spd configuration is needed, 0 otherwise.
  */
-static int ata_set_sata_spd_needed(struct ata_port *ap, struct ata_device *dev)
+int ata_set_sata_spd_needed(struct ata_port *ap, struct ata_device *dev)
 {
 	u32 scontrol;
 
@@ -1742,7 +1737,7 @@ static int ata_set_sata_spd_needed(struc
  *	0 if spd doesn't need to be changed, 1 if spd has been
  *	changed.  -EOPNOTSUPP if SCR registers are inaccessible.
  */
-static int ata_set_sata_spd(struct ata_port *ap, struct ata_device *dev)
+int ata_set_sata_spd(struct ata_port *ap, struct ata_device *dev)
 {
 	u32 scontrol;
 
@@ -1924,8 +1919,8 @@ int ata_timing_compute(struct ata_device
  *	RETURNS:
  *	0 on success, negative errno on failure
  */
-static int ata_down_xfermask_limit(struct ata_port *ap, struct ata_device *dev,
-				   int force_pio0)
+int ata_down_xfermask_limit(struct ata_port *ap, struct ata_device *dev,
+			    int force_pio0)
 {
 	unsigned long xfer_mask;
 	int highbit;
@@ -2003,7 +1998,7 @@ static int ata_dev_set_mode(struct ata_p
  *	RETURNS:
  *	0 on success, negative errno otherwise
  */
-static int ata_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev)
+int ata_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev)
 {
 	struct ata_device *dev;
 	int i, rc = 0, used_dma = 0, found = 0;
@@ -2589,9 +2584,9 @@ int ata_std_probe_reset(struct ata_port 
 				     ata_std_postreset, classes);
 }
 
-static int ata_do_reset(struct ata_port *ap,
-			ata_reset_fn_t reset, ata_postreset_fn_t postreset,
-			int verbose, unsigned int *classes)
+int ata_do_reset(struct ata_port *ap,
+		 ata_reset_fn_t reset, ata_postreset_fn_t postreset,
+		 int verbose, unsigned int *classes)
 {
 	int i, rc;
 
diff --git a/drivers/scsi/libata.h b/drivers/scsi/libata.h
index 75e9bd5..3bebca9 100644
--- a/drivers/scsi/libata.h
+++ b/drivers/scsi/libata.h
@@ -45,7 +45,21 @@ extern int libata_fua;
 extern struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap,
 				      struct ata_device *dev);
 extern int ata_rwcmd_protocol(struct ata_queued_cmd *qc);
+extern void ata_dev_disable(struct ata_port *ap, struct ata_device *dev);
 extern void ata_port_flush_task(struct ata_port *ap);
+extern unsigned ata_exec_internal(struct ata_port *ap, struct ata_device *dev,
+				  struct ata_taskfile *tf, const u8 *cdb,
+				  int dma_dir, void *buf, unsigned int buflen);
+extern int ata_down_sata_spd_limit(struct ata_port *ap, struct ata_device *dev);
+extern int ata_set_sata_spd_needed(struct ata_port *ap, struct ata_device *dev);
+extern int ata_set_sata_spd(struct ata_port *ap, struct ata_device *dev);
+extern int ata_down_xfermask_limit(struct ata_port *ap, struct ata_device *dev,
+				   int force_pio0);
+extern int ata_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev);
+extern int ata_do_reset(struct ata_port *ap,
+			ata_reset_fn_t reset,
+			ata_postreset_fn_t postreset,
+			int verbose, unsigned int *classes);
 extern void ata_qc_free(struct ata_queued_cmd *qc);
 extern void ata_qc_issue(struct ata_queued_cmd *qc);
 extern int ata_check_atapi_dma(struct ata_queued_cmd *qc);
-- 
1.2.4



  parent reply	other threads:[~2006-04-01 10:48 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-01 10:48 [PATCHSET] libata: prep for new EH Tejun Heo
2006-04-01 10:48 ` [PATCH 04/14] libata: clean up constants Tejun Heo
2006-04-01 20:02   ` Jeff Garzik
2006-04-01 10:48 ` [PATCH 05/14] libata: clear only affected flags during ata_dev_configure() Tejun Heo
2006-04-01 10:48 ` [PATCH 02/14] libata: ata_dev_revalidate() printk update Tejun Heo
2006-04-01 10:48 ` [PATCH 03/14] libata: ATA_FLAG_IN_EH is not used, kill it Tejun Heo
2006-04-01 10:48 ` [PATCH 08/14] libata: pass qc around intead of ap during PIO Tejun Heo
2006-04-01 10:48 ` [PATCH 06/14] libata: clear ATA_DFLAG_PIO before setting it Tejun Heo
2006-04-01 10:48 ` [PATCH 07/14] libata: add ATA_QCFLAG_IO Tejun Heo
2006-04-01 10:48 ` [PATCH 01/14] libata: report device number when PIO fails Tejun Heo
2006-04-01 10:48 ` [PATCH 09/14] libata: always generate sense if qc->err_mask is non-zero Tejun Heo
2006-04-01 20:02   ` Jeff Garzik
2006-04-01 10:48 ` [PATCH 12/14] libata: dec scmd->retries for qcs with zero err_mask Tejun Heo
2006-04-01 10:48 ` [PATCH 10/14] libata: don't read TF directly from sense generation functions Tejun Heo
2006-04-01 20:05   ` Jeff Garzik
2006-04-01 10:48 ` [PATCH 11/14] libata: add @cdb to ata_exec_internal() Tejun Heo
2006-04-01 10:48 ` [PATCH 13/14] libata: separate out libata-eh.c Tejun Heo
2006-04-01 10:48 ` Tejun Heo [this message]
2006-04-01 10:51 ` [PATCHSET] libata: prep for new EH Tejun Heo

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=11438885173883-git-send-email-htejun@gmail.com \
    --to=htejun@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=albertcc@tw.ibm.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    /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).