diff options
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/ide-cd.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-gd.c | 17 | ||||
-rw-r--r-- | drivers/ide/palm_bk3710.c | 26 |
3 files changed, 29 insertions, 16 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 392a5bdf2fd3..673628790f10 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -577,7 +577,7 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive) | |||
577 | struct request *rq = hwif->rq; | 577 | struct request *rq = hwif->rq; |
578 | ide_expiry_t *expiry = NULL; | 578 | ide_expiry_t *expiry = NULL; |
579 | int dma_error = 0, dma, thislen, uptodate = 0; | 579 | int dma_error = 0, dma, thislen, uptodate = 0; |
580 | int write = (rq_data_dir(rq) == WRITE) ? 1 : 0, rc, nsectors; | 580 | int write = (rq_data_dir(rq) == WRITE) ? 1 : 0, rc = 0, nsectors; |
581 | int sense = blk_sense_request(rq); | 581 | int sense = blk_sense_request(rq); |
582 | unsigned int timeout; | 582 | unsigned int timeout; |
583 | u16 len; | 583 | u16 len; |
diff --git a/drivers/ide/ide-gd.c b/drivers/ide/ide-gd.c index 1aebdf1a4f58..4b6b71e2cdf5 100644 --- a/drivers/ide/ide-gd.c +++ b/drivers/ide/ide-gd.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/mutex.h> | 7 | #include <linux/mutex.h> |
8 | #include <linux/ide.h> | 8 | #include <linux/ide.h> |
9 | #include <linux/hdreg.h> | 9 | #include <linux/hdreg.h> |
10 | #include <linux/dmi.h> | ||
10 | 11 | ||
11 | #if !defined(CONFIG_DEBUG_BLOCK_EXT_DEVT) | 12 | #if !defined(CONFIG_DEBUG_BLOCK_EXT_DEVT) |
12 | #define IDE_DISK_MINORS (1 << PARTN_BITS) | 13 | #define IDE_DISK_MINORS (1 << PARTN_BITS) |
@@ -99,6 +100,19 @@ static void ide_gd_resume(ide_drive_t *drive) | |||
99 | (void)drive->disk_ops->get_capacity(drive); | 100 | (void)drive->disk_ops->get_capacity(drive); |
100 | } | 101 | } |
101 | 102 | ||
103 | static const struct dmi_system_id ide_coldreboot_table[] = { | ||
104 | { | ||
105 | /* Acer TravelMate 66x cuts power during reboot */ | ||
106 | .ident = "Acer TravelMate 660", | ||
107 | .matches = { | ||
108 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | ||
109 | DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 660"), | ||
110 | }, | ||
111 | }, | ||
112 | |||
113 | { } /* terminate list */ | ||
114 | }; | ||
115 | |||
102 | static void ide_gd_shutdown(ide_drive_t *drive) | 116 | static void ide_gd_shutdown(ide_drive_t *drive) |
103 | { | 117 | { |
104 | #ifdef CONFIG_ALPHA | 118 | #ifdef CONFIG_ALPHA |
@@ -115,7 +129,8 @@ static void ide_gd_shutdown(ide_drive_t *drive) | |||
115 | the disk to expire its write cache. */ | 129 | the disk to expire its write cache. */ |
116 | if (system_state != SYSTEM_POWER_OFF) { | 130 | if (system_state != SYSTEM_POWER_OFF) { |
117 | #else | 131 | #else |
118 | if (system_state == SYSTEM_RESTART) { | 132 | if (system_state == SYSTEM_RESTART && |
133 | !dmi_check_system(ide_coldreboot_table)) { | ||
119 | #endif | 134 | #endif |
120 | drive->disk_ops->flush(drive); | 135 | drive->disk_ops->flush(drive); |
121 | return; | 136 | return; |
diff --git a/drivers/ide/palm_bk3710.c b/drivers/ide/palm_bk3710.c index c7acca0b8733..d1513b4a457c 100644 --- a/drivers/ide/palm_bk3710.c +++ b/drivers/ide/palm_bk3710.c | |||
@@ -39,14 +39,6 @@ | |||
39 | /* Primary Control Offset */ | 39 | /* Primary Control Offset */ |
40 | #define IDE_PALM_ATA_PRI_CTL_OFFSET 0x3F6 | 40 | #define IDE_PALM_ATA_PRI_CTL_OFFSET 0x3F6 |
41 | 41 | ||
42 | /* | ||
43 | * PalmChip 3710 IDE Controller UDMA timing structure Definition | ||
44 | */ | ||
45 | struct palm_bk3710_udmatiming { | ||
46 | unsigned int rptime; /* Ready to pause time */ | ||
47 | unsigned int cycletime; /* Cycle Time */ | ||
48 | }; | ||
49 | |||
50 | #define BK3710_BMICP 0x00 | 42 | #define BK3710_BMICP 0x00 |
51 | #define BK3710_BMISP 0x02 | 43 | #define BK3710_BMISP 0x02 |
52 | #define BK3710_BMIDTP 0x04 | 44 | #define BK3710_BMIDTP 0x04 |
@@ -75,13 +67,19 @@ struct palm_bk3710_udmatiming { | |||
75 | 67 | ||
76 | static unsigned ideclk_period; /* in nanoseconds */ | 68 | static unsigned ideclk_period; /* in nanoseconds */ |
77 | 69 | ||
70 | struct palm_bk3710_udmatiming { | ||
71 | unsigned int rptime; /* tRP -- Ready to pause time (nsec) */ | ||
72 | unsigned int cycletime; /* tCYCTYP2/2 -- avg Cycle Time (nsec) */ | ||
73 | /* tENV is always a minimum of 20 nsec */ | ||
74 | }; | ||
75 | |||
78 | static const struct palm_bk3710_udmatiming palm_bk3710_udmatimings[6] = { | 76 | static const struct palm_bk3710_udmatiming palm_bk3710_udmatimings[6] = { |
79 | {160, 240}, /* UDMA Mode 0 */ | 77 | {160, 240 / 2,}, /* UDMA Mode 0 */ |
80 | {125, 160}, /* UDMA Mode 1 */ | 78 | {125, 160 / 2,}, /* UDMA Mode 1 */ |
81 | {100, 120}, /* UDMA Mode 2 */ | 79 | {100, 120 / 2,}, /* UDMA Mode 2 */ |
82 | {100, 90}, /* UDMA Mode 3 */ | 80 | {100, 90 / 2,}, /* UDMA Mode 3 */ |
83 | {100, 60}, /* UDMA Mode 4 */ | 81 | {100, 60 / 2,}, /* UDMA Mode 4 */ |
84 | {85, 40}, /* UDMA Mode 5 */ | 82 | {85, 40 / 2,}, /* UDMA Mode 5 */ |
85 | }; | 83 | }; |
86 | 84 | ||
87 | static void palm_bk3710_setudmamode(void __iomem *base, unsigned int dev, | 85 | static void palm_bk3710_setudmamode(void __iomem *base, unsigned int dev, |