aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-probe.c
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
commitada47b5fe13d89735805b566185f4885f5a3f750 (patch)
tree644b88f8a71896307d71438e9b3af49126ffb22b /drivers/ide/ide-probe.c
parent43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff)
parent3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff)
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/ide/ide-probe.c')
-rw-r--r--drivers/ide/ide-probe.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 4d76ba473097..4c3d1bfec0c5 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -695,14 +695,8 @@ static int ide_probe_port(ide_hwif_t *hwif)
695 if (irqd) 695 if (irqd)
696 disable_irq(hwif->irq); 696 disable_irq(hwif->irq);
697 697
698 rc = ide_port_wait_ready(hwif); 698 if (ide_port_wait_ready(hwif) == -EBUSY)
699 if (rc == -ENODEV) { 699 printk(KERN_DEBUG "%s: Wait for ready failed before probe !\n", hwif->name);
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;
706 700
707 /* 701 /*
708 * Second drive should only exist if first drive was found, 702 * Second drive should only exist if first drive was found,
@@ -713,7 +707,7 @@ static int ide_probe_port(ide_hwif_t *hwif)
713 if (drive->dev_flags & IDE_DFLAG_PRESENT) 707 if (drive->dev_flags & IDE_DFLAG_PRESENT)
714 rc = 0; 708 rc = 0;
715 } 709 }
716out: 710
717 /* 711 /*
718 * Use cached IRQ number. It might be (and is...) changed by probe 712 * Use cached IRQ number. It might be (and is...) changed by probe
719 * code above 713 * code above
@@ -774,7 +768,7 @@ static int ide_init_queue(ide_drive_t *drive)
774 768
775 if (hwif->rqsize < max_sectors) 769 if (hwif->rqsize < max_sectors)
776 max_sectors = hwif->rqsize; 770 max_sectors = hwif->rqsize;
777 blk_queue_max_sectors(q, max_sectors); 771 blk_queue_max_hw_sectors(q, max_sectors);
778 772
779#ifdef CONFIG_PCI 773#ifdef CONFIG_PCI
780 /* When we have an IOMMU, we may have a problem where pci_map_sg() 774 /* When we have an IOMMU, we may have a problem where pci_map_sg()
@@ -790,8 +784,7 @@ static int ide_init_queue(ide_drive_t *drive)
790 max_sg_entries >>= 1; 784 max_sg_entries >>= 1;
791#endif /* CONFIG_PCI */ 785#endif /* CONFIG_PCI */
792 786
793 blk_queue_max_hw_segments(q, max_sg_entries); 787 blk_queue_max_segments(q, max_sg_entries);
794 blk_queue_max_phys_segments(q, max_sg_entries);
795 788
796 /* assign drive queue */ 789 /* assign drive queue */
797 drive->queue = q; 790 drive->queue = q;
@@ -1043,6 +1036,8 @@ static void ide_port_init_devices(ide_hwif_t *hwif)
1043 if (hwif->host_flags & IDE_HFLAG_NO_UNMASK_IRQS) 1036 if (hwif->host_flags & IDE_HFLAG_NO_UNMASK_IRQS)
1044 drive->dev_flags |= IDE_DFLAG_NO_UNMASK; 1037 drive->dev_flags |= IDE_DFLAG_NO_UNMASK;
1045 1038
1039 drive->pio_mode = XFER_PIO_0;
1040
1046 if (port_ops && port_ops->init_dev) 1041 if (port_ops && port_ops->init_dev)
1047 port_ops->init_dev(drive); 1042 port_ops->init_dev(drive);
1048 } 1043 }