aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-io.c6
-rw-r--r--drivers/ide/ide-tape.c3
-rw-r--r--drivers/ide/ide-timing.h25
-rw-r--r--drivers/ide/legacy/ide-cs.c10
4 files changed, 23 insertions, 21 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index f174aee659e5..9e9cf1407311 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -560,7 +560,7 @@ ide_startstop_t __ide_abort(ide_drive_t *drive, struct request *rq)
560EXPORT_SYMBOL_GPL(__ide_abort); 560EXPORT_SYMBOL_GPL(__ide_abort);
561 561
562/** 562/**
563 * ide_abort - abort pending IDE operatins 563 * ide_abort - abort pending IDE operations
564 * @drive: drive the error occurred on 564 * @drive: drive the error occurred on
565 * @msg: message to report 565 * @msg: message to report
566 * 566 *
@@ -623,7 +623,7 @@ static void ide_cmd (ide_drive_t *drive, u8 cmd, u8 nsect,
623 * @drive: drive the completion interrupt occurred on 623 * @drive: drive the completion interrupt occurred on
624 * 624 *
625 * drive_cmd_intr() is invoked on completion of a special DRIVE_CMD. 625 * drive_cmd_intr() is invoked on completion of a special DRIVE_CMD.
626 * We do any necessary daya reading and then wait for the drive to 626 * We do any necessary data reading and then wait for the drive to
627 * go non busy. At that point we may read the error data and complete 627 * go non busy. At that point we may read the error data and complete
628 * the request 628 * the request
629 */ 629 */
@@ -773,7 +773,7 @@ EXPORT_SYMBOL_GPL(ide_init_sg_cmd);
773 773
774/** 774/**
775 * execute_drive_command - issue special drive command 775 * execute_drive_command - issue special drive command
776 * @drive: the drive to issue th command on 776 * @drive: the drive to issue the command on
777 * @rq: the request structure holding the command 777 * @rq: the request structure holding the command
778 * 778 *
779 * execute_drive_cmd() issues a special drive command, usually 779 * execute_drive_cmd() issues a special drive command, usually
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 5a3dc46008e6..ee38e6b143a4 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -2903,8 +2903,7 @@ static int idetape_wait_ready(ide_drive_t *drive, unsigned long timeout)
2903 } else if (!(tape->sense_key == 2 && tape->asc == 4 && 2903 } else if (!(tape->sense_key == 2 && tape->asc == 4 &&
2904 (tape->ascq == 1 || tape->ascq == 8))) 2904 (tape->ascq == 1 || tape->ascq == 8)))
2905 return -EIO; 2905 return -EIO;
2906 current->state = TASK_INTERRUPTIBLE; 2906 msleep(100);
2907 schedule_timeout(HZ / 10);
2908 } 2907 }
2909 return -EIO; 2908 return -EIO;
2910} 2909}
diff --git a/drivers/ide/ide-timing.h b/drivers/ide/ide-timing.h
index c1196ce15b4d..2fcfac6e967a 100644
--- a/drivers/ide/ide-timing.h
+++ b/drivers/ide/ide-timing.h
@@ -27,6 +27,7 @@
27 * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic 27 * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
28 */ 28 */
29 29
30#include <linux/kernel.h>
30#include <linux/hdreg.h> 31#include <linux/hdreg.h>
31 32
32#define XFER_PIO_5 0x0d 33#define XFER_PIO_5 0x0d
@@ -96,11 +97,9 @@ static struct ide_timing ide_timing[] = {
96#define IDE_TIMING_UDMA 0x80 97#define IDE_TIMING_UDMA 0x80
97#define IDE_TIMING_ALL 0xff 98#define IDE_TIMING_ALL 0xff
98 99
99#define MIN(a,b) ((a)<(b)?(a):(b)) 100#define FIT(v,vmin,vmax) max_t(short,min_t(short,v,vmax),vmin)
100#define MAX(a,b) ((a)>(b)?(a):(b)) 101#define ENOUGH(v,unit) (((v)-1)/(unit)+1)
101#define FIT(v,min,max) MAX(MIN(v,max),min) 102#define EZ(v,unit) ((v)?ENOUGH(v,unit):0)
102#define ENOUGH(v,unit) (((v)-1)/(unit)+1)
103#define EZ(v,unit) ((v)?ENOUGH(v,unit):0)
104 103
105#define XFER_MODE 0xf0 104#define XFER_MODE 0xf0
106#define XFER_UDMA_133 0x48 105#define XFER_UDMA_133 0x48
@@ -188,14 +187,14 @@ static void ide_timing_quantize(struct ide_timing *t, struct ide_timing *q, int
188 187
189static void ide_timing_merge(struct ide_timing *a, struct ide_timing *b, struct ide_timing *m, unsigned int what) 188static void ide_timing_merge(struct ide_timing *a, struct ide_timing *b, struct ide_timing *m, unsigned int what)
190{ 189{
191 if (what & IDE_TIMING_SETUP ) m->setup = MAX(a->setup, b->setup); 190 if (what & IDE_TIMING_SETUP ) m->setup = max(a->setup, b->setup);
192 if (what & IDE_TIMING_ACT8B ) m->act8b = MAX(a->act8b, b->act8b); 191 if (what & IDE_TIMING_ACT8B ) m->act8b = max(a->act8b, b->act8b);
193 if (what & IDE_TIMING_REC8B ) m->rec8b = MAX(a->rec8b, b->rec8b); 192 if (what & IDE_TIMING_REC8B ) m->rec8b = max(a->rec8b, b->rec8b);
194 if (what & IDE_TIMING_CYC8B ) m->cyc8b = MAX(a->cyc8b, b->cyc8b); 193 if (what & IDE_TIMING_CYC8B ) m->cyc8b = max(a->cyc8b, b->cyc8b);
195 if (what & IDE_TIMING_ACTIVE ) m->active = MAX(a->active, b->active); 194 if (what & IDE_TIMING_ACTIVE ) m->active = max(a->active, b->active);
196 if (what & IDE_TIMING_RECOVER) m->recover = MAX(a->recover, b->recover); 195 if (what & IDE_TIMING_RECOVER) m->recover = max(a->recover, b->recover);
197 if (what & IDE_TIMING_CYCLE ) m->cycle = MAX(a->cycle, b->cycle); 196 if (what & IDE_TIMING_CYCLE ) m->cycle = max(a->cycle, b->cycle);
198 if (what & IDE_TIMING_UDMA ) m->udma = MAX(a->udma, b->udma); 197 if (what & IDE_TIMING_UDMA ) m->udma = max(a->udma, b->udma);
199} 198}
200 199
201static struct ide_timing* ide_timing_find_mode(short speed) 200static struct ide_timing* ide_timing_find_mode(short speed)
diff --git a/drivers/ide/legacy/ide-cs.c b/drivers/ide/legacy/ide-cs.c
index f1d1ec4e9677..0ccf85fcee34 100644
--- a/drivers/ide/legacy/ide-cs.c
+++ b/drivers/ide/legacy/ide-cs.c
@@ -43,6 +43,7 @@
43#include <linux/ide.h> 43#include <linux/ide.h>
44#include <linux/hdreg.h> 44#include <linux/hdreg.h>
45#include <linux/major.h> 45#include <linux/major.h>
46#include <linux/delay.h>
46#include <asm/io.h> 47#include <asm/io.h>
47#include <asm/system.h> 48#include <asm/system.h>
48 49
@@ -340,8 +341,7 @@ static void ide_config(dev_link_t *link)
340 break; 341 break;
341 } 342 }
342 } 343 }
343 __set_current_state(TASK_UNINTERRUPTIBLE); 344 msleep(100);
344 schedule_timeout(HZ/10);
345 } 345 }
346 346
347 if (hd < 0) { 347 if (hd < 0) {
@@ -454,9 +454,12 @@ int ide_event(event_t event, int priority,
454static struct pcmcia_device_id ide_ids[] = { 454static struct pcmcia_device_id ide_ids[] = {
455 PCMCIA_DEVICE_FUNC_ID(4), 455 PCMCIA_DEVICE_FUNC_ID(4),
456 PCMCIA_DEVICE_MANF_CARD(0x0032, 0x0704), 456 PCMCIA_DEVICE_MANF_CARD(0x0032, 0x0704),
457 PCMCIA_DEVICE_MANF_CARD(0x0045, 0x0401),
458 PCMCIA_DEVICE_MANF_CARD(0x0098, 0x0000), /* Toshiba */
457 PCMCIA_DEVICE_MANF_CARD(0x00a4, 0x002d), 459 PCMCIA_DEVICE_MANF_CARD(0x00a4, 0x002d),
460 PCMCIA_DEVICE_MANF_CARD(0x00ce, 0x0000), /* Samsung */
458 PCMCIA_DEVICE_MANF_CARD(0x2080, 0x0001), 461 PCMCIA_DEVICE_MANF_CARD(0x2080, 0x0001),
459 PCMCIA_DEVICE_MANF_CARD(0x0045, 0x0401), 462 PCMCIA_DEVICE_MANF_CARD(0x4e01, 0x0200), /* Lexar */
460 PCMCIA_DEVICE_PROD_ID123("Caravelle", "PSC-IDE ", "PSC000", 0x8c36137c, 0xd0693ab8, 0x2768a9f0), 463 PCMCIA_DEVICE_PROD_ID123("Caravelle", "PSC-IDE ", "PSC000", 0x8c36137c, 0xd0693ab8, 0x2768a9f0),
461 PCMCIA_DEVICE_PROD_ID123("CDROM", "IDE", "MCD-601p", 0x1b9179ca, 0xede88951, 0x0d902f74), 464 PCMCIA_DEVICE_PROD_ID123("CDROM", "IDE", "MCD-601p", 0x1b9179ca, 0xede88951, 0x0d902f74),
462 PCMCIA_DEVICE_PROD_ID123("PCMCIA", "IDE CARD", "F1", 0x281f1c5d, 0x1907960c, 0xf7fde8b9), 465 PCMCIA_DEVICE_PROD_ID123("PCMCIA", "IDE CARD", "F1", 0x281f1c5d, 0x1907960c, 0xf7fde8b9),
@@ -481,6 +484,7 @@ static struct pcmcia_device_id ide_ids[] = {
481 PCMCIA_DEVICE_PROD_ID12("TOSHIBA", "MK2001MPL", 0xb4585a1a, 0x3489e003), 484 PCMCIA_DEVICE_PROD_ID12("TOSHIBA", "MK2001MPL", 0xb4585a1a, 0x3489e003),
482 PCMCIA_DEVICE_PROD_ID12("WIT", "IDE16", 0x244e5994, 0x3e232852), 485 PCMCIA_DEVICE_PROD_ID12("WIT", "IDE16", 0x244e5994, 0x3e232852),
483 PCMCIA_DEVICE_PROD_ID1("STI Flash", 0xe4a13209), 486 PCMCIA_DEVICE_PROD_ID1("STI Flash", 0xe4a13209),
487 PCMCIA_DEVICE_PROD_ID12("STI", "Flash 5.0", 0xbf2df18d, 0x8cb57a0e),
484 PCMCIA_MFC_DEVICE_PROD_ID12(1, "SanDisk", "ConnectPlus", 0x7a954bd9, 0x74be00c6), 488 PCMCIA_MFC_DEVICE_PROD_ID12(1, "SanDisk", "ConnectPlus", 0x7a954bd9, 0x74be00c6),
485 PCMCIA_DEVICE_NULL, 489 PCMCIA_DEVICE_NULL,
486}; 490};