summaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-disk.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-06-12 22:34:34 -0400
committerJeff Garzik <jeff@garzik.org>2007-06-12 22:34:34 -0400
commitb232923966f1210e1183353bbd1d52ee53b79fbf (patch)
treee90c72b2cb400af53e1f92aff0af122782d7f65c /drivers/ide/ide-disk.c
parentbca1a5518cab2d58c766863c61ee4ef5f1cc4caa (diff)
parent99f9f3d49cbc7d944476f6fde53a77ec789ab2aa (diff)
Merge branch 'master' into upstream-fixes
Diffstat (limited to 'drivers/ide/ide-disk.c')
-rw-r--r--drivers/ide/ide-disk.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index 7fff773f2df..dc2175c81f5 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -1037,6 +1037,17 @@ static void ide_disk_release(struct kref *kref)
static int ide_disk_probe(ide_drive_t *drive);
+/*
+ * On HPA drives the capacity needs to be
+ * reinitilized on resume otherwise the disk
+ * can not be used and a hard reset is required
+ */
+static void ide_disk_resume(ide_drive_t *drive)
+{
+ if (idedisk_supports_hpa(drive->id))
+ init_idedisk_capacity(drive);
+}
+
static void ide_device_shutdown(ide_drive_t *drive)
{
#ifdef CONFIG_ALPHA
@@ -1071,6 +1082,7 @@ static ide_driver_t idedisk_driver = {
},
.probe = ide_disk_probe,
.remove = ide_disk_remove,
+ .resume = ide_disk_resume,
.shutdown = ide_device_shutdown,
.version = IDEDISK_VERSION,
.media = ide_disk,