Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
via82cxxx: Add VIA VX855 PCI Device ID
ide: report timeouts in ide_busy_sleep()
ide: improve failed opcode reporting
ide: fix printk() levels in ide_dump_ata[pi]_error()
ide: fix OOPS during ide-cd error recovery
ide: fix 40-wire cable detection for TSST SH-S202* ATAPI devices (v2)

+35 -32
+2 -2
drivers/ide/ide-io.c
··· 696 696 } 697 697 spin_lock_irq(&hwif->lock); 698 698 enable_irq(hwif->irq); 699 - if (startstop == ide_stopped) { 699 + if (startstop == ide_stopped && hwif->polling == 0) { 700 700 ide_unlock_port(hwif); 701 701 plug_device = 1; 702 702 } ··· 868 868 * same irq as is currently being serviced here, and Linux 869 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 872 BUG_ON(hwif->handler); 873 873 ide_unlock_port(hwif); 874 874 plug_device = 1;
+17 -4
drivers/ide/ide-iops.c
··· 206 206 207 207 /* 208 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 209 * Some optical devices with the buggy firmwares have the same problem. 212 210 */ 213 211 static const struct drive_list_entry ivb_list[] = { ··· 249 251 * - force bit13 (80c cable present) check also for !ivb devices 250 252 * (unless the slave device is pre-ATA3) 251 253 */ 252 - if ((id[ATA_ID_HW_CONFIG] & 0x4000) || 253 - (ivb && (id[ATA_ID_HW_CONFIG] & 0x2000))) 254 + if (id[ATA_ID_HW_CONFIG] & 0x4000) 254 255 return 1; 255 256 257 + if (ivb) { 258 + const char *model = (char *)&id[ATA_ID_PROD]; 259 + 260 + if (strstr(model, "TSSTcorp CDDVDW SH-S202")) { 261 + /* 262 + * These ATAPI devices always report 80c cable 263 + * so we have to depend on the host in this case. 264 + */ 265 + if (hwif->cbl == ATA_CBL_PATA80) 266 + return 1; 267 + } else { 268 + /* Depend on the device side cable detection. */ 269 + if (id[ATA_ID_HW_CONFIG] & 0x2000) 270 + return 1; 271 + } 272 + } 256 273 no_80w: 257 274 if (drive->dev_flags & IDE_DFLAG_UDMA33_WARNED) 258 275 return 0;
+6 -21
drivers/ide/ide-lib.c
··· 31 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 34 u64 ide_get_lba_addr(struct ide_cmd *cmd, int lba48) 53 35 { 54 36 struct ide_taskfile *tf = &cmd->tf; ··· 73 91 74 92 static void ide_dump_ata_error(ide_drive_t *drive, u8 err) 75 93 { 76 - printk(KERN_ERR "{ "); 94 + printk(KERN_CONT "{ "); 77 95 if (err & ATA_ABORTED) 78 96 printk(KERN_CONT "DriveStatusError "); 79 97 if (err & ATA_ICRC) ··· 103 121 104 122 static void ide_dump_atapi_error(ide_drive_t *drive, u8 err) 105 123 { 106 - printk(KERN_ERR "{ "); 124 + printk(KERN_CONT "{ "); 107 125 if (err & ATAPI_ILI) 108 126 printk(KERN_CONT "IllegalLengthIndication "); 109 127 if (err & ATAPI_EOM) ··· 161 179 else 162 180 ide_dump_atapi_error(drive, err); 163 181 } 164 - ide_dump_opcode(drive); 182 + 183 + printk(KERN_ERR "%s: possibly failed opcode: 0x%02x\n", 184 + drive->name, drive->hwif->cmd.tf.command); 185 + 165 186 return err; 166 187 } 167 188 EXPORT_SYMBOL(ide_dump_status);
+6 -3
drivers/ide/ide-probe.c
··· 295 295 296 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 299 return 1; 300 300 301 301 /* wait for IRQ and ATA_DRQ */ ··· 316 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 322 u8 stat; 322 323 323 324 timeout += jiffies; ··· 330 329 if ((stat & ATA_BUSY) == 0) 331 330 return 0; 332 331 } while (time_before(jiffies, timeout)); 332 + 333 + printk(KERN_ERR "%s: timeout in %s\n", drive->name, __func__); 333 334 334 335 return 1; /* drive timed-out */ 335 336 } ··· 423 420 tp_ops->dev_select(drive); 424 421 msleep(50); 425 422 tp_ops->exec_command(hwif, ATA_CMD_DEV_RESET); 426 - (void)ide_busy_sleep(hwif, WAIT_WORSTCASE, 0); 423 + (void)ide_busy_sleep(drive, WAIT_WORSTCASE, 0); 427 424 rc = ide_dev_read_id(drive, cmd, id); 428 425 } 429 426
+2
drivers/ide/via82cxxx.c
··· 67 67 u8 udma_mask; 68 68 u8 flags; 69 69 } via_isa_bridges[] = { 70 + { "vx855", PCI_DEVICE_ID_VIA_VX855, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST }, 70 71 { "vx800", PCI_DEVICE_ID_VIA_VX800, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST }, 71 72 { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST }, 72 73 { "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST }, ··· 475 474 { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C576_1), 0 }, 476 475 { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C586_1), 0 }, 477 476 { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_CX700_IDE), 0 }, 477 + { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_VX855_IDE), 0 }, 478 478 { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_6410), 1 }, 479 479 { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_SATA_EIDE), 1 }, 480 480 { 0, },
+1 -1
include/linux/ide.h
··· 1109 1109 1110 1110 extern void ide_fixstring(u8 *, const int, const int); 1111 1111 1112 - int ide_busy_sleep(ide_hwif_t *, unsigned long, int); 1112 + int ide_busy_sleep(ide_drive_t *, unsigned long, int); 1113 1113 1114 1114 int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long); 1115 1115
+1 -1
include/linux/pci_ids.h
··· 1406 1406 #define PCI_DEVICE_ID_VIA_82C598_1 0x8598 1407 1407 #define PCI_DEVICE_ID_VIA_838X_1 0xB188 1408 1408 #define PCI_DEVICE_ID_VIA_83_87XX_1 0xB198 1409 - #define PCI_DEVICE_ID_VIA_C409_IDE 0XC409 1409 + #define PCI_DEVICE_ID_VIA_VX855_IDE 0xC409 1410 1410 #define PCI_DEVICE_ID_VIA_ANON 0xFFFF 1411 1411 1412 1412 #define PCI_VENDOR_ID_SIEMENS 0x110A