linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHSET 06/11] prep for hotplug support, take 2
@ 2006-05-11 15:02 Tejun Heo
  2006-05-11 15:02 ` [PATCH 04/14] libata-hp-prep: update ata_scsi_find_dev() and friends Tejun Heo
                   ` (14 more replies)
  0 siblings, 15 replies; 21+ 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] 21+ messages in thread
* [PATCHSET 07/11] prep LLDDs for hotplug support, take 1
@ 2006-05-11 15:11 Tejun Heo
  2006-05-11 15:11 ` [PATCH 10/14] libata-hp-prep: implement sata_phy_debounce() Tejun Heo
  0 siblings, 1 reply; 21+ 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] 21+ messages in thread
* [PATCH 09/14] libata-hp-prep: make probing related functions global
@ 2006-05-19 13:06 Tejun Heo
  2006-05-19 13:06 ` [PATCH 10/14] libata-hp-prep: implement sata_phy_debounce() Tejun Heo
  0 siblings, 1 reply; 21+ 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

Hotplug will be implemented in libata-eh.c.  Make ata_dev_read_id()
and ata_dev_configure() global.

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

---

 drivers/scsi/libata-core.c |    6 +++---
 drivers/scsi/libata.h      |    3 +++
 2 files changed, 6 insertions(+), 3 deletions(-)

03952258155acd6310ace4caaeb320df06cd7874
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index fba5514..8b25cb5 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -1164,8 +1164,8 @@ unsigned int ata_pio_need_iordy(const st
  *	RETURNS:
  *	0 on success, -errno otherwise.
  */
-static int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class,
-			   int post_reset, u16 *id)
+int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class,
+		    int post_reset, u16 *id)
 {
 	struct ata_port *ap = dev->ap;
 	unsigned int class = *p_class;
@@ -1289,7 +1289,7 @@ static void ata_dev_config_ncq(struct at
  *	RETURNS:
  *	0 on success, -errno otherwise
  */
-static int ata_dev_configure(struct ata_device *dev, int print_info)
+int ata_dev_configure(struct ata_device *dev, int print_info)
 {
 	struct ata_port *ap = dev->ap;
 	const u16 *id = dev->id;
diff --git a/drivers/scsi/libata.h b/drivers/scsi/libata.h
index 4a67675..d728fd5 100644
--- a/drivers/scsi/libata.h
+++ b/drivers/scsi/libata.h
@@ -50,6 +50,9 @@ extern void ata_port_flush_task(struct a
 extern unsigned ata_exec_internal(struct ata_device *dev,
 				  struct ata_taskfile *tf, const u8 *cdb,
 				  int dma_dir, void *buf, unsigned int buflen);
+extern int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class,
+			   int post_reset, u16 *id);
+extern int ata_dev_configure(struct ata_device *dev, int print_info);
 extern int sata_down_spd_limit(struct ata_port *ap);
 extern int sata_set_spd_needed(struct ata_port *ap);
 extern int ata_down_xfermask_limit(struct ata_device *dev, int force_pio0);
-- 
1.3.2


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [PATCHSET 01/03] prep for hotplug support, take 3
@ 2006-05-19 13:16 Tejun Heo
  2006-05-19 13:16 ` [PATCH 10/14] libata-hp-prep: implement sata_phy_debounce() Tejun Heo
  0 siblings, 1 reply; 21+ 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] 21+ messages in thread

end of thread, other threads:[~2006-05-19 15:07 UTC | newest]

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

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