From: Mark Lord <liml@rtr.ca>
To: Jeff Garzik <jeff@garzik.org>
Cc: Linus Torvalds <torvalds@osdl.org>, Jens Axboe <axboe@suse.de>,
"zhao, forrest" <forrest.zhao@intel.com>,
Tejun Heo <htejun@gmail.com>,
linux-ide@vger.kernel.org
Subject: Re: [PATCH] Re: 2.6.17-rc5-git1: regression: resume from suspend(RAM) fails: libata issue
Date: Sat, 27 May 2006 14:23:39 -0400 [thread overview]
Message-ID: <200605271423.40037.liml@rtr.ca> (raw)
In-Reply-To: <4477CEF5.9000908@garzik.org>
On Saturday 27 May 2006 00:00, Jeff Garzik wrote:
> Although I didn't even bother to compile-test it, here is the
> recommended solution, as described multiple times...
..
That patch has ZERO (positive) effect on my machine.
It still crashes miserably with a zillion "read errors" on resume
(drive not accessible).
The original "bad layering" patch still works perfectly in it's place.
Repeated below for Linus's benefit.
Signed-off-by: Mark Lord <lkml@rtr.ca>
---
--- a/drivers/scsi/ata_piix.c
+++ b/drivers/scsi/ata_piix.c
@@ -90,6 +90,7 @@
#include <linux/delay.h>
#include <linux/device.h>
#include <scsi/scsi_host.h>
+#include <scsi/scsi_device.h>
#include <linux/libata.h>
#define DRV_NAME "ata_piix"
@@ -151,6 +152,7 @@ static int piix_pata_probe_reset(struct
static int piix_sata_probe_reset(struct ata_port *ap, unsigned int *classes);
static void piix_set_piomode (struct ata_port *ap, struct ata_device *adev);
static void piix_set_dmamode (struct ata_port *ap, struct ata_device *adev);
+static int piix_scsi_device_resume(struct scsi_device *sdev);
static unsigned int in_module_init = 1;
@@ -220,7 +222,7 @@ static struct scsi_host_template piix_sh
.dma_boundary = ATA_DMA_BOUNDARY,
.slave_configure = ata_scsi_slave_config,
.bios_param = ata_std_bios_param,
- .resume = ata_scsi_device_resume,
+ .resume = piix_scsi_device_resume,
.suspend = ata_scsi_device_suspend,
};
@@ -710,6 +712,21 @@ static void piix_set_dmamode (struct ata
}
}
+int piix_scsi_device_resume(struct scsi_device *sdev)
+{
+ struct ata_port *ap = (struct ata_port *) &sdev->host->hostdata[0];
+ struct ata_device *dev = &ap->device[sdev->id];
+ u8 status;
+
+ status = ata_busy_wait(ap, ATA_BUSY, 200000);
+ if (status & ATA_BUSY) {
+ printk(KERN_ERR "libata port failed to resume "
+ "in 2 secs)\n");
+ return 1;
+ }
+ return ata_device_resume(ap, dev);
+}
+
#define AHCI_PCI_BAR 5
#define AHCI_GLOBAL_CTL 0x04
#define AHCI_ENABLE (1 << 31)
next prev parent reply other threads:[~2006-05-27 18:23 UTC|newest]
Thread overview: 100+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-26 9:04 [PATCH] Add ata_piix's own resume function zhao, forrest
2006-05-26 23:05 ` Jens Axboe
2006-05-26 23:28 ` Jeff Garzik
2006-05-26 23:38 ` Jeff Garzik
2006-05-26 23:50 ` Jeff Garzik
2006-05-27 6:21 ` Jens Axboe
2006-05-27 6:31 ` Jeff Garzik
2006-05-27 6:46 ` Jens Axboe
2006-05-27 6:52 ` Jeff Garzik
2006-05-27 3:22 ` 2.6.17-rc5-git1: regression: resume from suspend(RAM) fails: libata issue Mark Lord
2006-05-27 3:32 ` Linus Torvalds
2006-05-27 3:41 ` Jeff Garzik
2006-05-27 4:00 ` [PATCH] " Jeff Garzik
2006-05-27 18:23 ` Mark Lord [this message]
2006-05-27 18:47 ` Linus Torvalds
2006-05-27 19:01 ` Jeff Garzik
2006-05-27 19:06 ` Jeff Garzik
2006-05-27 19:01 ` Mark Lord
2006-05-27 20:45 ` Jens Axboe
2006-05-27 20:58 ` Jeff Garzik
2006-05-27 21:11 ` Jens Axboe
2006-05-27 21:17 ` Jeff Garzik
2006-05-27 21:20 ` Jens Axboe
2006-05-27 21:23 ` Mark Lord
2006-05-27 21:25 ` Jens Axboe
2006-05-27 21:30 ` Mark Lord
2006-05-27 21:24 ` Jeff Garzik
2006-05-27 21:26 ` Jens Axboe
2006-05-27 21:31 ` Mark Lord
2006-05-27 21:32 ` Jeff Garzik
2006-05-27 21:33 ` Jens Axboe
2006-05-27 21:34 ` Jeff Garzik
2006-05-27 21:37 ` Mark Lord
2006-05-27 21:51 ` Jeff Garzik
2006-05-27 21:41 ` Tejun Heo
2006-05-27 21:45 ` Jeff Garzik
2006-05-27 21:38 ` Linus Torvalds
2006-05-27 21:50 ` Jeff Garzik
2006-05-27 21:57 ` Linus Torvalds
2006-05-27 22:11 ` Jeff Garzik
2006-05-27 21:50 ` Linus Torvalds
2006-05-27 21:53 ` Jeff Garzik
2006-05-27 22:14 ` Linus Torvalds
2006-05-27 22:06 ` Mark Lord
2006-05-27 22:11 ` Jens Axboe
2006-05-27 22:13 ` Jeff Garzik
2006-05-27 22:15 ` Jens Axboe
2006-05-27 22:15 ` Mark Lord
2006-05-27 22:17 ` Jens Axboe
2006-05-27 22:21 ` Linus Torvalds
2006-05-27 22:29 ` Mark Lord
2006-05-27 22:36 ` Jens Axboe
2006-05-27 22:48 ` Mark Lord
2006-05-27 22:53 ` Jens Axboe
2006-05-27 22:55 ` Jeff Garzik
2006-05-27 23:10 ` Mark Lord
2006-05-28 0:24 ` Linus Torvalds
2006-05-28 0:26 ` Linus Torvalds
2006-05-28 0:56 ` Jeff Garzik
2006-05-28 0:35 ` Linus Torvalds
2006-05-28 0:51 ` Mark Lord
2006-05-28 0:53 ` Jeff Garzik
2006-05-28 0:56 ` Mark Lord
2006-05-28 1:01 ` Linus Torvalds
2006-05-28 1:03 ` Jeff Garzik
2006-05-28 1:01 ` Jeff Garzik
2006-05-28 15:28 ` [PATCH] 2.6.17-rc5: the latest consensus libata resume fix Mark Lord
2006-05-28 17:14 ` Jens Axboe
2006-05-28 19:05 ` Jeff Garzik
2006-05-28 19:18 ` Mark Lord
2006-05-28 20:10 ` Jeff Garzik
2006-05-28 20:27 ` Mark Lord
2006-05-28 22:28 ` Jens Axboe
2006-05-29 1:28 ` Jeff Garzik
2006-05-29 2:53 ` Mark Lord
2006-05-29 3:18 ` Jeff Garzik
2006-05-29 3:28 ` zhao, forrest
2006-05-29 2:43 ` Mark Lord
2006-05-27 22:35 ` [PATCH] Re: 2.6.17-rc5-git1: regression: resume from suspend(RAM) fails: libata issue Jens Axboe
2006-05-27 22:52 ` Jeff Garzik
2006-05-27 22:54 ` Jens Axboe
2006-05-27 23:06 ` Jens Axboe
2006-05-27 22:56 ` Mark Lord
2006-05-27 23:03 ` Jeff Garzik
2006-05-27 22:18 ` Linus Torvalds
2006-05-27 22:23 ` Mark Lord
2006-05-27 22:43 ` Mark Lord
2006-05-28 0:13 ` Linus Torvalds
2006-05-27 18:54 ` Jeff Garzik
2006-05-27 19:08 ` Mark Lord
2006-05-27 19:15 ` Jeff Garzik
2006-05-27 19:24 ` Mark Lord
2006-05-27 20:24 ` Jens Axboe
2006-05-27 6:29 ` Jens Axboe
2006-05-27 6:36 ` Jeff Garzik
2006-05-27 7:01 ` Jens Axboe
2006-05-27 7:06 ` Jeff Garzik
2006-05-27 18:46 ` Mark Lord
2006-05-27 3:35 ` Jeff Garzik
2006-05-27 6:20 ` Jens Axboe
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=200605271423.40037.liml@rtr.ca \
--to=liml@rtr.ca \
--cc=axboe@suse.de \
--cc=forrest.zhao@intel.com \
--cc=htejun@gmail.com \
--cc=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
--cc=torvalds@osdl.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).