linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHSET 01/03] prep for hotplug support, take 3
@ 2006-05-19 13:16 Tejun Heo
  2006-05-19 13:16 ` [PATCH 03/14] libata-hp-prep: make some ata_device fields persistent Tejun Heo
                   ` (13 more replies)
  0 siblings, 14 replies; 35+ messages in thread
From: Tejun Heo @ 2006-05-19 13:16 UTC (permalink / raw)
  To: jgarzik, mlord, albertcc, alan, axboe, forrest.zhao, linux-ide,
	htejun

Hello,

This is This is part of patchset series described in [T].

This is the third take of prep-for-hotplug-support patchset.  Changes
from the last take[L] are

* sata_phy_debounce() now takes const array of three ulongs for timing
  parameters.  This makes it easy to define and export different
  predefined timing parameters and to pass timing parameter through
  other functions.  sata_phy_resume() is changed to take timing
  parameters and pass it to sata_phy_debounce() intead of crude
  boolean @quick.

* Three predefined parameters are provided - sata_deb_timing_boot,
  sata_deb_timing_eh and sata_deb_timing_before_fsrst.  These
  predefined parameters are used in the new hotplug framework and
  don't have to be long enough to cover all the cases.  The goal is to
  cover most cases in reasonable amount of time.  If timeout occurs,
  libata will give it more time and then retry.

* prereset() framework has been updated such that prereset() can tell
  EH what reset mechanism to use or to skip reset completely.  This
  way, HRST_TO_RESUME handling is confined into prereset() and device
  detection from prereset() is handled cleanly.

* ata_std_prereset() has been updated to handle different behaviors
  controllers show on hotplug.  Some controllers can wait for the
  first FIS34, some can only after COMRESET, others just can't.  These
  are controlled by two flags - ATA_FLAG_HRST_TO_RESUME and
  ATA_FLAG_CANT_WAIT_FIS34.  Note that those two flags describe PHY
  property.  They will move out to ata_link later.

  If necessary, ata_std_prereset() waits for spinup until hotplug
  event timestamp + spinup wait time (currently 8s).  This mechanism
  will allow later PMP support to avoid excessive amount of waiting.

This patchset is against

  upstream (8d4ee71ff6de5255ebfdf44fb83419d27bd06368)
  + enforce-default-EH-actions patch [1]
  + scsi_implement_eh-patch [2]

Thanks.

--
tejun

[T] http://article.gmane.org/gmane.linux.ide/10530
[L] http://article.gmane.org/gmane.linux.ide/10073
[1] http://article.gmane.org/gmane.linux.ide/10317
[2] http://article.gmane.org/gmane.linux.ide/10529


^ permalink raw reply	[flat|nested] 35+ messages in thread
* [PATCH 12/14] libata-hp-prep: implement ata_noop_check_status()
@ 2006-05-19 13:06 Tejun Heo
  2006-05-19 13:06 ` [PATCH 13/14] libata-hp-prep: add prereset() method and implement ata_std_prereset() Tejun Heo
  0 siblings, 1 reply; 35+ messages in thread
From: Tejun Heo @ 2006-05-19 13:06 UTC (permalink / raw)
  To: jgarzik, mlord, albertcc, alan, axboe, forrest.zhao, linux-ide; +Cc: Tejun Heo

As with ops->tf_read, ops->check_status() and ops->check_altstatus()
don't make sense for controllers without single TF image.  As
->check_status() and ->check_altstatus() are deeply integrated into
libata core layer, implement ata_noop_check_status() as a temporary
measure.  This function always returns ATA_DRDY without doing
anything.

In the long term, these IO ops should be made optional and removed
from top level ata_port_operations such that driver implementing
high-level behavior don't have to bother with these.

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

---

 drivers/scsi/libata-core.c |   19 +++++++++++++++++++
 include/linux/libata.h     |    1 +
 2 files changed, 20 insertions(+), 0 deletions(-)

89c675e09ffd6c3cdf7cc656152f6a1ea03533f0
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 9a4124e..72eef00 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -707,6 +707,24 @@ static u64 ata_id_n_sectors(const u16 *i
 }
 
 /**
+ *	ata_noop_check_status - Fake device status reg
+ *	@ap: target port
+ *
+ *	This function performs no actual function and always returns
+ *	ATA_DRDY.
+ *
+ *	May be used as the check_status/altstatus() entry in
+ *	ata_port_operations.
+ *
+ *	LOCKING:
+ *	caller.
+ */
+u8 ata_noop_check_status(struct ata_port *ap)
+{
+	return ATA_DRDY;
+}
+
+/**
  *	ata_noop_dev_select - Select device 0/1 on ATA bus
  *	@ap: ATA channel to manipulate
  *	@device: ATA device (numbered from zero) to select
@@ -5769,6 +5787,7 @@ EXPORT_SYMBOL_GPL(ata_qc_issue_prot);
 EXPORT_SYMBOL_GPL(ata_tf_load);
 EXPORT_SYMBOL_GPL(ata_tf_read);
 EXPORT_SYMBOL_GPL(ata_noop_dev_select);
+EXPORT_SYMBOL_GPL(ata_noop_check_status);
 EXPORT_SYMBOL_GPL(ata_std_dev_select);
 EXPORT_SYMBOL_GPL(ata_tf_to_fis);
 EXPORT_SYMBOL_GPL(ata_tf_from_fis);
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 3d7c3e3..35f6d3b 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -665,6 +665,7 @@ extern void ata_tf_load(struct ata_port 
 extern void ata_tf_read(struct ata_port *ap, struct ata_taskfile *tf);
 extern void ata_tf_to_fis(const struct ata_taskfile *tf, u8 *fis, u8 pmp);
 extern void ata_tf_from_fis(const u8 *fis, struct ata_taskfile *tf);
+extern u8 ata_noop_check_status(struct ata_port *ap);
 extern void ata_noop_dev_select (struct ata_port *ap, unsigned int device);
 extern void ata_std_dev_select (struct ata_port *ap, unsigned int device);
 extern u8 ata_check_status(struct ata_port *ap);
-- 
1.3.2


^ permalink raw reply related	[flat|nested] 35+ messages in thread
* [PATCHSET 07/11] prep LLDDs for hotplug support, take 1
@ 2006-05-11 15:11 Tejun Heo
  2006-05-11 15:12 ` [PATCH 13/14] libata-hp-prep: add prereset() method and implement ata_std_prereset() Tejun Heo
  0 siblings, 1 reply; 35+ messages in thread
From: Tejun Heo @ 2006-05-11 15:11 UTC (permalink / raw)
  To: jgarzik, alan, axboe, albertcc, forrest.zhao, efalk, linux-ide,
	htejun

Hairu.

This is part of patchset series described in [T].

This is the first take of prep-LLDDs-for-hotplug-support patchset.
Some of patches in this patchset are from the first take of
add-hotplug-support patchset.

Things worth noting are

* Simply exporting ata_hsm_move() and calling the function with
  appropriate status is good enough for driving HSM for LLDDs
  implementing their own irq handlers.  sata_sil's new irq handler
  now uses it.

* TF faking is removed from sata_sil24.

This patchset is against

  upstream (acc696d93dcf993dec123d69d599979e1456ffec)
  + [1] prep-for-new-EH patchset
  + [2] new-EH-framework patchset, take 3
  + [3] new-EH-implementation patchset, take 3
  + [4] merge-irq-pio patchset
  + [5] add-NCQ-support patchset, take 3
  + [6] prep for hotplug support, take 2

--
tejun

[T] http://article.gmane.org/gmane.linux.ide/9957
[1] http://article.gmane.org/gmane.linux.ide/9959
[2] http://article.gmane.org/gmane.linux.ide/9984
[3] http://article.gmane.org/gmane.linux.ide/9995
[4] http://article.gmane.org/gmane.linux.ide/10005
[5] http://article.gmane.org/gmane.linux.ide/10011
[6] http://article.gmane.org/gmane.linux.ide/10028



^ permalink raw reply	[flat|nested] 35+ messages in thread
* [PATCHSET 06/11] prep for hotplug support, take 2
@ 2006-05-11 15:02 Tejun Heo
  2006-05-11 15:02 ` [PATCH 13/14] libata-hp-prep: add prereset() method and implement ata_std_prereset() Tejun Heo
  0 siblings, 1 reply; 35+ messages in thread
From: Tejun Heo @ 2006-05-11 15:02 UTC (permalink / raw)
  To: jgarzik, alan, axboe, albertcc, forrest.zhao, efalk, linux-ide,
	htejun

Bang-Ga.

This is part of patchset series described in [T].

This is the second take of prep-for-hotplug-support patchset.  Changes
from the last take[L] are

* dev->flags is used for warm plug and synchronized with host_set
  lock.  ata_dev_init() is updated to clear non-persistent part of
  dev->flags while holding host_set lock.

* ap->orig_sata_spd_limit renamed to ap->hw_sata_spd_limit.

* sata_phy_debounce() implemented.  This function will be called
  before performing EH resets to settle devices instead of blind
  delay.  sata_phy_debounce() is superset of the wait used in
  sata_phy_resume() and sata_phy_resume() is converted to use it.

* TF access is made optional.  All probing (including boot probing)
  will be done via hotplug and hotplug probing is implemented such
  that ->tf_read/write() isn't necessary, so now drivers like
  sata_sil24 don't have to fake TF access.  As ->check_[alt]status()
  was embedded too deep, ata_noop_check_status() is added instead of
  making those methods optional.  In the long term, those low level
  methods should be separated from highlevel ops somehow.

* ops->prereset() added.  This function is the counterpart of
  postreset() and called before a series of resets.  This is quite
  similar to ->probe_init() except that it's called for all resets.
  prereset() can determine things like whether it's prepping for boot
  probing or not, and which reset will be performed by testing
  ap->flags and ehi.

* Followup-softreset handling implemented.

* hotplug will completely replace ->probe_init/reset().

This patchset is against

  upstream (acc696d93dcf993dec123d69d599979e1456ffec)
  + [1] prep-for-new-EH patchset
  + [2] new-EH-framework patchset, take 3
  + [3] new-EH-implementation patchset, take 3
  + [4] merge-irq-pio patchset
  + [5] add-NCQ-support patchset, take 3

--
tejun

[T] http://article.gmane.org/gmane.linux.ide/9957
[L] http://article.gmane.org/gmane.linux.ide/9579
[1] http://article.gmane.org/gmane.linux.ide/9959
[2] http://article.gmane.org/gmane.linux.ide/9984
[3] http://article.gmane.org/gmane.linux.ide/9995
[4] http://article.gmane.org/gmane.linux.ide/10005
[5] http://article.gmane.org/gmane.linux.ide/10011



^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2006-05-29  2:14 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-19 13:16 [PATCHSET 01/03] prep for hotplug support, take 3 Tejun Heo
2006-05-19 13:16 ` [PATCH 03/14] libata-hp-prep: make some ata_device fields persistent Tejun Heo
2006-05-19 15:00   ` Jeff Garzik
2006-05-19 13:16 ` [PATCH 01/14] libata-hp-prep: add flags and eh_info/context fields for hotplug Tejun Heo
2006-05-19 14:58   ` Jeff Garzik
2006-05-19 15:17     ` Tejun Heo
2006-05-19 15:28       ` Jeff Garzik
2006-05-19 13:16 ` [PATCH 02/14] libata-hp-prep: implement ata_dev_init() Tejun Heo
2006-05-19 13:16 ` [PATCH 04/14] libata-hp-prep: update ata_scsi_find_dev() and friends Tejun Heo
2006-05-19 15:03   ` Jeff Garzik
2006-05-23 14:25     ` Tejun Heo
2006-05-26  7:07       ` Jeff Garzik
2006-05-19 13:16 ` [PATCH 05/14] libata-hp-prep: use __ata_scsi_find_dev() Tejun Heo
2006-05-19 13:16 ` [PATCH 06/14] libata-hp-prep: implement ap->hw_sata_spd_limit Tejun Heo
2006-05-19 13:16 ` [PATCH 09/14] libata-hp-prep: make probing related functions global Tejun Heo
2006-05-19 13:16 ` [PATCH 07/14] libata-hp-prep: store attached SCSI device Tejun Heo
2006-05-19 15:04   ` Jeff Garzik
2006-05-19 13:16 ` [PATCH 11/14] libata-hp-prep: make ops->tf_read() optional Tejun Heo
2006-05-19 15:11   ` Jeff Garzik
2006-05-23 16:04     ` Tejun Heo
2006-05-19 13:16 ` [PATCH 12/14] libata-hp-prep: implement ata_noop_check_status() Tejun Heo
2006-05-19 15:12   ` Jeff Garzik
2006-05-19 13:16 ` [PATCH 08/14] libata-hp-prep: add ata_hotplug_wq Tejun Heo
2006-05-19 13:16 ` [PATCH 14/14] libata-hp-prep: implement followup softreset handling Tejun Heo
2006-05-19 15:21   ` Jeff Garzik
2006-05-19 13:16 ` [PATCH 10/14] libata-hp-prep: implement sata_phy_debounce() Tejun Heo
2006-05-19 15:07   ` Jeff Garzik
2006-05-19 13:16 ` [PATCH 13/14] libata-hp-prep: add prereset() method and implement ata_std_prereset() Tejun Heo
2006-05-19 15:20   ` Jeff Garzik
2006-05-23 14:44     ` Tejun Heo
2006-05-23 22:29       ` Alan Cox
2006-05-29  2:14         ` Tejun Heo
  -- strict thread matches above, loose matches on Subject: below --
2006-05-19 13:06 [PATCH 12/14] libata-hp-prep: implement ata_noop_check_status() Tejun Heo
2006-05-19 13:06 ` [PATCH 13/14] libata-hp-prep: add prereset() method and implement ata_std_prereset() Tejun Heo
2006-05-11 15:11 [PATCHSET 07/11] prep LLDDs for hotplug support, take 1 Tejun Heo
2006-05-11 15:12 ` [PATCH 13/14] libata-hp-prep: add prereset() method and implement ata_std_prereset() Tejun Heo
2006-05-11 15:02 [PATCHSET 06/11] prep for hotplug support, take 2 Tejun Heo
2006-05-11 15:02 ` [PATCH 13/14] libata-hp-prep: add prereset() method and implement ata_std_prereset() Tejun Heo

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).