Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6:
Revert "ide: skip probe if there are no devices on the port (v2)"
Revert "via82cxxx: workaround h/w bugs"

+3 -66
+3 -9
drivers/ide/ide-probe.c
··· 695 695 if (irqd) 696 696 disable_irq(hwif->irq); 697 697 698 - rc = ide_port_wait_ready(hwif); 699 - if (rc == -ENODEV) { 700 - printk(KERN_INFO "%s: no devices on the port\n", hwif->name); 701 - goto out; 702 - } else if (rc == -EBUSY) 703 - printk(KERN_ERR "%s: not ready before the probe\n", hwif->name); 704 - else 705 - rc = -ENODEV; 698 + if (ide_port_wait_ready(hwif) == -EBUSY) 699 + printk(KERN_DEBUG "%s: Wait for ready failed before probe !\n", hwif->name); 706 700 707 701 /* 708 702 * Second drive should only exist if first drive was found, ··· 707 713 if (drive->dev_flags & IDE_DFLAG_PRESENT) 708 714 rc = 0; 709 715 } 710 - out: 716 + 711 717 /* 712 718 * Use cached IRQ number. It might be (and is...) changed by probe 713 719 * code above
-57
drivers/ide/via82cxxx.c
··· 110 110 { 111 111 struct via_isa_bridge *via_config; 112 112 unsigned int via_80w; 113 - u8 cached_device[2]; 114 113 }; 115 114 116 115 /** ··· 402 403 .cable_detect = via82cxxx_cable_detect, 403 404 }; 404 405 405 - static void via_write_devctl(ide_hwif_t *hwif, u8 ctl) 406 - { 407 - struct via82cxxx_dev *vdev = hwif->host->host_priv; 408 - 409 - outb(ctl, hwif->io_ports.ctl_addr); 410 - outb(vdev->cached_device[hwif->channel], hwif->io_ports.device_addr); 411 - } 412 - 413 - static void __via_dev_select(ide_drive_t *drive, u8 select) 414 - { 415 - ide_hwif_t *hwif = drive->hwif; 416 - struct via82cxxx_dev *vdev = hwif->host->host_priv; 417 - 418 - outb(select, hwif->io_ports.device_addr); 419 - vdev->cached_device[hwif->channel] = select; 420 - } 421 - 422 - static void via_dev_select(ide_drive_t *drive) 423 - { 424 - __via_dev_select(drive, drive->select | ATA_DEVICE_OBS); 425 - } 426 - 427 - static void via_tf_load(ide_drive_t *drive, struct ide_taskfile *tf, u8 valid) 428 - { 429 - ide_hwif_t *hwif = drive->hwif; 430 - struct ide_io_ports *io_ports = &hwif->io_ports; 431 - 432 - if (valid & IDE_VALID_FEATURE) 433 - outb(tf->feature, io_ports->feature_addr); 434 - if (valid & IDE_VALID_NSECT) 435 - outb(tf->nsect, io_ports->nsect_addr); 436 - if (valid & IDE_VALID_LBAL) 437 - outb(tf->lbal, io_ports->lbal_addr); 438 - if (valid & IDE_VALID_LBAM) 439 - outb(tf->lbam, io_ports->lbam_addr); 440 - if (valid & IDE_VALID_LBAH) 441 - outb(tf->lbah, io_ports->lbah_addr); 442 - if (valid & IDE_VALID_DEVICE) 443 - __via_dev_select(drive, tf->device); 444 - } 445 - 446 - const struct ide_tp_ops via_tp_ops = { 447 - .exec_command = ide_exec_command, 448 - .read_status = ide_read_status, 449 - .read_altstatus = ide_read_altstatus, 450 - .write_devctl = via_write_devctl, 451 - 452 - .dev_select = via_dev_select, 453 - .tf_load = via_tf_load, 454 - .tf_read = ide_tf_read, 455 - 456 - .input_data = ide_input_data, 457 - .output_data = ide_output_data, 458 - }; 459 - 460 406 static const struct ide_port_info via82cxxx_chipset __devinitdata = { 461 407 .name = DRV_NAME, 462 408 .init_chipset = init_chipset_via82cxxx, 463 409 .enablebits = { { 0x40, 0x02, 0x02 }, { 0x40, 0x01, 0x01 } }, 464 - .tp_ops = &via_tp_ops, 465 410 .port_ops = &via_port_ops, 466 411 .host_flags = IDE_HFLAG_PIO_NO_BLACKLIST | 467 412 IDE_HFLAG_POST_SET_MODE |