diff options
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/icside.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-io.c | 4 | ||||
-rw-r--r-- | drivers/ide/ide-iops.c | 21 | ||||
-rw-r--r-- | drivers/ide/ide-lib.c | 27 | ||||
-rw-r--r-- | drivers/ide/ide-probe.c | 9 | ||||
-rw-r--r-- | drivers/ide/ide-tape.c | 6 | ||||
-rw-r--r-- | drivers/ide/piix.c | 1 | ||||
-rw-r--r-- | drivers/ide/via82cxxx.c | 2 |
8 files changed, 35 insertions, 37 deletions
diff --git a/drivers/ide/icside.c b/drivers/ide/icside.c index 4e16ce68b063..36da913cc553 100644 --- a/drivers/ide/icside.c +++ b/drivers/ide/icside.c | |||
@@ -466,7 +466,7 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec) | |||
466 | struct ide_host *host; | 466 | struct ide_host *host; |
467 | unsigned int sel = 0; | 467 | unsigned int sel = 0; |
468 | int ret; | 468 | int ret; |
469 | hw_regs_t hw[2], *hws[] = { &hw[0], NULL, NULL, NULL }; | 469 | hw_regs_t hw[2], *hws[] = { &hw[0], &hw[1], NULL, NULL }; |
470 | struct ide_port_info d = icside_v6_port_info; | 470 | struct ide_port_info d = icside_v6_port_info; |
471 | 471 | ||
472 | ioc_base = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, 0); | 472 | ioc_base = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, 0); |
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 35dc38d3b2c5..6415a2e2ba87 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -696,7 +696,7 @@ void ide_timer_expiry (unsigned long data) | |||
696 | } | 696 | } |
697 | spin_lock_irq(&hwif->lock); | 697 | spin_lock_irq(&hwif->lock); |
698 | enable_irq(hwif->irq); | 698 | enable_irq(hwif->irq); |
699 | if (startstop == ide_stopped) { | 699 | if (startstop == ide_stopped && hwif->polling == 0) { |
700 | ide_unlock_port(hwif); | 700 | ide_unlock_port(hwif); |
701 | plug_device = 1; | 701 | plug_device = 1; |
702 | } | 702 | } |
@@ -868,7 +868,7 @@ irqreturn_t ide_intr (int irq, void *dev_id) | |||
868 | * same irq as is currently being serviced here, and Linux | 868 | * same irq as is currently being serviced here, and Linux |
869 | * won't allow another of the same (on any CPU) until we return. | 869 | * won't allow another of the same (on any CPU) until we return. |
870 | */ | 870 | */ |
871 | if (startstop == ide_stopped) { | 871 | if (startstop == ide_stopped && hwif->polling == 0) { |
872 | BUG_ON(hwif->handler); | 872 | BUG_ON(hwif->handler); |
873 | ide_unlock_port(hwif); | 873 | ide_unlock_port(hwif); |
874 | plug_device = 1; | 874 | plug_device = 1; |
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index c19a221b1e18..06fe002116ec 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -206,8 +206,6 @@ EXPORT_SYMBOL_GPL(ide_in_drive_list); | |||
206 | 206 | ||
207 | /* | 207 | /* |
208 | * Early UDMA66 devices don't set bit14 to 1, only bit13 is valid. | 208 | * Early UDMA66 devices don't set bit14 to 1, only bit13 is valid. |
209 | * We list them here and depend on the device side cable detection for them. | ||
210 | * | ||
211 | * Some optical devices with the buggy firmwares have the same problem. | 209 | * Some optical devices with the buggy firmwares have the same problem. |
212 | */ | 210 | */ |
213 | static const struct drive_list_entry ivb_list[] = { | 211 | static const struct drive_list_entry ivb_list[] = { |
@@ -251,10 +249,25 @@ u8 eighty_ninty_three(ide_drive_t *drive) | |||
251 | * - force bit13 (80c cable present) check also for !ivb devices | 249 | * - force bit13 (80c cable present) check also for !ivb devices |
252 | * (unless the slave device is pre-ATA3) | 250 | * (unless the slave device is pre-ATA3) |
253 | */ | 251 | */ |
254 | if ((id[ATA_ID_HW_CONFIG] & 0x4000) || | 252 | if (id[ATA_ID_HW_CONFIG] & 0x4000) |
255 | (ivb && (id[ATA_ID_HW_CONFIG] & 0x2000))) | ||
256 | return 1; | 253 | return 1; |
257 | 254 | ||
255 | if (ivb) { | ||
256 | const char *model = (char *)&id[ATA_ID_PROD]; | ||
257 | |||
258 | if (strstr(model, "TSSTcorp CDDVDW SH-S202")) { | ||
259 | /* | ||
260 | * These ATAPI devices always report 80c cable | ||
261 | * so we have to depend on the host in this case. | ||
262 | */ | ||
263 | if (hwif->cbl == ATA_CBL_PATA80) | ||
264 | return 1; | ||
265 | } else { | ||
266 | /* Depend on the device side cable detection. */ | ||
267 | if (id[ATA_ID_HW_CONFIG] & 0x2000) | ||
268 | return 1; | ||
269 | } | ||
270 | } | ||
258 | no_80w: | 271 | no_80w: |
259 | if (drive->dev_flags & IDE_DFLAG_UDMA33_WARNED) | 272 | if (drive->dev_flags & IDE_DFLAG_UDMA33_WARNED) |
260 | return 0; | 273 | return 0; |
diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c index 56ff8c46c7d1..2148df836ce7 100644 --- a/drivers/ide/ide-lib.c +++ b/drivers/ide/ide-lib.c | |||
@@ -31,24 +31,6 @@ void ide_toggle_bounce(ide_drive_t *drive, int on) | |||
31 | blk_queue_bounce_limit(drive->queue, addr); | 31 | blk_queue_bounce_limit(drive->queue, addr); |
32 | } | 32 | } |
33 | 33 | ||
34 | static void ide_dump_opcode(ide_drive_t *drive) | ||
35 | { | ||
36 | struct request *rq = drive->hwif->rq; | ||
37 | struct ide_cmd *cmd = NULL; | ||
38 | |||
39 | if (!rq) | ||
40 | return; | ||
41 | |||
42 | if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) | ||
43 | cmd = rq->special; | ||
44 | |||
45 | printk(KERN_ERR "ide: failed opcode was: "); | ||
46 | if (cmd == NULL) | ||
47 | printk(KERN_CONT "unknown\n"); | ||
48 | else | ||
49 | printk(KERN_CONT "0x%02x\n", cmd->tf.command); | ||
50 | } | ||
51 | |||
52 | u64 ide_get_lba_addr(struct ide_cmd *cmd, int lba48) | 34 | u64 ide_get_lba_addr(struct ide_cmd *cmd, int lba48) |
53 | { | 35 | { |
54 | struct ide_taskfile *tf = &cmd->tf; | 36 | struct ide_taskfile *tf = &cmd->tf; |
@@ -91,7 +73,7 @@ static void ide_dump_sector(ide_drive_t *drive) | |||
91 | 73 | ||
92 | static void ide_dump_ata_error(ide_drive_t *drive, u8 err) | 74 | static void ide_dump_ata_error(ide_drive_t *drive, u8 err) |
93 | { | 75 | { |
94 | printk(KERN_ERR "{ "); | 76 | printk(KERN_CONT "{ "); |
95 | if (err & ATA_ABORTED) | 77 | if (err & ATA_ABORTED) |
96 | printk(KERN_CONT "DriveStatusError "); | 78 | printk(KERN_CONT "DriveStatusError "); |
97 | if (err & ATA_ICRC) | 79 | if (err & ATA_ICRC) |
@@ -121,7 +103,7 @@ static void ide_dump_ata_error(ide_drive_t *drive, u8 err) | |||
121 | 103 | ||
122 | static void ide_dump_atapi_error(ide_drive_t *drive, u8 err) | 104 | static void ide_dump_atapi_error(ide_drive_t *drive, u8 err) |
123 | { | 105 | { |
124 | printk(KERN_ERR "{ "); | 106 | printk(KERN_CONT "{ "); |
125 | if (err & ATAPI_ILI) | 107 | if (err & ATAPI_ILI) |
126 | printk(KERN_CONT "IllegalLengthIndication "); | 108 | printk(KERN_CONT "IllegalLengthIndication "); |
127 | if (err & ATAPI_EOM) | 109 | if (err & ATAPI_EOM) |
@@ -179,7 +161,10 @@ u8 ide_dump_status(ide_drive_t *drive, const char *msg, u8 stat) | |||
179 | else | 161 | else |
180 | ide_dump_atapi_error(drive, err); | 162 | ide_dump_atapi_error(drive, err); |
181 | } | 163 | } |
182 | ide_dump_opcode(drive); | 164 | |
165 | printk(KERN_ERR "%s: possibly failed opcode: 0x%02x\n", | ||
166 | drive->name, drive->hwif->cmd.tf.command); | ||
167 | |||
183 | return err; | 168 | return err; |
184 | } | 169 | } |
185 | EXPORT_SYMBOL(ide_dump_status); | 170 | EXPORT_SYMBOL(ide_dump_status); |
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 7f264ed1141b..c895ed52b2e8 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -295,7 +295,7 @@ int ide_dev_read_id(ide_drive_t *drive, u8 cmd, u16 *id) | |||
295 | 295 | ||
296 | timeout = ((cmd == ATA_CMD_ID_ATA) ? WAIT_WORSTCASE : WAIT_PIDENTIFY) / 2; | 296 | timeout = ((cmd == ATA_CMD_ID_ATA) ? WAIT_WORSTCASE : WAIT_PIDENTIFY) / 2; |
297 | 297 | ||
298 | if (ide_busy_sleep(hwif, timeout, use_altstatus)) | 298 | if (ide_busy_sleep(drive, timeout, use_altstatus)) |
299 | return 1; | 299 | return 1; |
300 | 300 | ||
301 | /* wait for IRQ and ATA_DRQ */ | 301 | /* wait for IRQ and ATA_DRQ */ |
@@ -316,8 +316,9 @@ int ide_dev_read_id(ide_drive_t *drive, u8 cmd, u16 *id) | |||
316 | return rc; | 316 | return rc; |
317 | } | 317 | } |
318 | 318 | ||
319 | int ide_busy_sleep(ide_hwif_t *hwif, unsigned long timeout, int altstatus) | 319 | int ide_busy_sleep(ide_drive_t *drive, unsigned long timeout, int altstatus) |
320 | { | 320 | { |
321 | ide_hwif_t *hwif = drive->hwif; | ||
321 | u8 stat; | 322 | u8 stat; |
322 | 323 | ||
323 | timeout += jiffies; | 324 | timeout += jiffies; |
@@ -330,6 +331,8 @@ int ide_busy_sleep(ide_hwif_t *hwif, unsigned long timeout, int altstatus) | |||
330 | return 0; | 331 | return 0; |
331 | } while (time_before(jiffies, timeout)); | 332 | } while (time_before(jiffies, timeout)); |
332 | 333 | ||
334 | printk(KERN_ERR "%s: timeout in %s\n", drive->name, __func__); | ||
335 | |||
333 | return 1; /* drive timed-out */ | 336 | return 1; /* drive timed-out */ |
334 | } | 337 | } |
335 | 338 | ||
@@ -420,7 +423,7 @@ static int do_probe (ide_drive_t *drive, u8 cmd) | |||
420 | tp_ops->dev_select(drive); | 423 | tp_ops->dev_select(drive); |
421 | msleep(50); | 424 | msleep(50); |
422 | tp_ops->exec_command(hwif, ATA_CMD_DEV_RESET); | 425 | tp_ops->exec_command(hwif, ATA_CMD_DEV_RESET); |
423 | (void)ide_busy_sleep(hwif, WAIT_WORSTCASE, 0); | 426 | (void)ide_busy_sleep(drive, WAIT_WORSTCASE, 0); |
424 | rc = ide_dev_read_id(drive, cmd, id); | 427 | rc = ide_dev_read_id(drive, cmd, id); |
425 | } | 428 | } |
426 | 429 | ||
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index cb942a9b580f..3a53e0834cf7 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -614,12 +614,6 @@ static ide_startstop_t ide_tape_issue_pc(ide_drive_t *drive, | |||
614 | { | 614 | { |
615 | idetape_tape_t *tape = drive->driver_data; | 615 | idetape_tape_t *tape = drive->driver_data; |
616 | 616 | ||
617 | if (drive->pc->c[0] == REQUEST_SENSE && | ||
618 | pc->c[0] == REQUEST_SENSE) { | ||
619 | printk(KERN_ERR "ide-tape: possible ide-tape.c bug - " | ||
620 | "Two request sense in serial were issued\n"); | ||
621 | } | ||
622 | |||
623 | if (drive->failed_pc == NULL && pc->c[0] != REQUEST_SENSE) | 617 | if (drive->failed_pc == NULL && pc->c[0] != REQUEST_SENSE) |
624 | drive->failed_pc = pc; | 618 | drive->failed_pc = pc; |
625 | 619 | ||
diff --git a/drivers/ide/piix.c b/drivers/ide/piix.c index 2aa699933064..69860dea3820 100644 --- a/drivers/ide/piix.c +++ b/drivers/ide/piix.c | |||
@@ -263,6 +263,7 @@ static const struct ich_laptop ich_laptop[] = { | |||
263 | { 0x24CA, 0x1025, 0x003d }, /* ICH4 on ACER TM290 */ | 263 | { 0x24CA, 0x1025, 0x003d }, /* ICH4 on ACER TM290 */ |
264 | { 0x266F, 0x1025, 0x0066 }, /* ICH6 on ACER Aspire 1694WLMi */ | 264 | { 0x266F, 0x1025, 0x0066 }, /* ICH6 on ACER Aspire 1694WLMi */ |
265 | { 0x2653, 0x1043, 0x82D8 }, /* ICH6M on Asus Eee 701 */ | 265 | { 0x2653, 0x1043, 0x82D8 }, /* ICH6M on Asus Eee 701 */ |
266 | { 0x27df, 0x104d, 0x900e }, /* ICH7 on Sony TZ-90 */ | ||
266 | /* end marker */ | 267 | /* end marker */ |
267 | { 0, } | 268 | { 0, } |
268 | }; | 269 | }; |
diff --git a/drivers/ide/via82cxxx.c b/drivers/ide/via82cxxx.c index 3ff7231e4858..028de26a25fe 100644 --- a/drivers/ide/via82cxxx.c +++ b/drivers/ide/via82cxxx.c | |||
@@ -67,6 +67,7 @@ static struct via_isa_bridge { | |||
67 | u8 udma_mask; | 67 | u8 udma_mask; |
68 | u8 flags; | 68 | u8 flags; |
69 | } via_isa_bridges[] = { | 69 | } via_isa_bridges[] = { |
70 | { "vx855", PCI_DEVICE_ID_VIA_VX855, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST }, | ||
70 | { "vx800", PCI_DEVICE_ID_VIA_VX800, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST }, | 71 | { "vx800", PCI_DEVICE_ID_VIA_VX800, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST }, |
71 | { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST }, | 72 | { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST }, |
72 | { "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST }, | 73 | { "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST }, |
@@ -474,6 +475,7 @@ static const struct pci_device_id via_pci_tbl[] = { | |||
474 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C576_1), 0 }, | 475 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C576_1), 0 }, |
475 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C586_1), 0 }, | 476 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C586_1), 0 }, |
476 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_CX700_IDE), 0 }, | 477 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_CX700_IDE), 0 }, |
478 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_VX855_IDE), 0 }, | ||
477 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_6410), 1 }, | 479 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_6410), 1 }, |
478 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_SATA_EIDE), 1 }, | 480 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_SATA_EIDE), 1 }, |
479 | { 0, }, | 481 | { 0, }, |