aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/siimage.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/siimage.c')
-rw-r--r--drivers/ide/pci/siimage.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c
index 7b45eaf5afd9..908f37b4e0ee 100644
--- a/drivers/ide/pci/siimage.c
+++ b/drivers/ide/pci/siimage.c
@@ -713,9 +713,6 @@ static int is_dev_seagate_sata(ide_drive_t *drive)
713 const char *s = &drive->id->model[0]; 713 const char *s = &drive->id->model[0];
714 unsigned len; 714 unsigned len;
715 715
716 if (!drive->present)
717 return 0;
718
719 len = strnlen(s, sizeof(drive->id->model)); 716 len = strnlen(s, sizeof(drive->id->model));
720 717
721 if ((len > 4) && (!memcmp(s, "ST", 2))) { 718 if ((len > 4) && (!memcmp(s, "ST", 2))) {
@@ -730,18 +727,20 @@ static int is_dev_seagate_sata(ide_drive_t *drive)
730} 727}
731 728
732/** 729/**
733 * siimage_fixup - post probe fixups 730 * sil_quirkproc - post probe fixups
734 * @hwif: interface to fix up 731 * @drive: drive
735 * 732 *
736 * Called after drive probe we use this to decide whether the 733 * Called after drive probe we use this to decide whether the
737 * Seagate fixup must be applied. This used to be in init_iops but 734 * Seagate fixup must be applied. This used to be in init_iops but
738 * that can occur before we know what drives are present. 735 * that can occur before we know what drives are present.
739 */ 736 */
740 737
741static void __devinit siimage_fixup(ide_hwif_t *hwif) 738static void __devinit sil_quirkproc(ide_drive_t *drive)
742{ 739{
740 ide_hwif_t *hwif = drive->hwif;
741
743 /* Try and raise the rqsize */ 742 /* Try and raise the rqsize */
744 if (!is_sata(hwif) || !is_dev_seagate_sata(&hwif->drives[0])) 743 if (!is_sata(hwif) || !is_dev_seagate_sata(drive))
745 hwif->rqsize = 128; 744 hwif->rqsize = 128;
746} 745}
747 746
@@ -804,6 +803,7 @@ static void __devinit init_hwif_siimage(ide_hwif_t *hwif)
804 803
805 hwif->set_pio_mode = &sil_set_pio_mode; 804 hwif->set_pio_mode = &sil_set_pio_mode;
806 hwif->set_dma_mode = &sil_set_dma_mode; 805 hwif->set_dma_mode = &sil_set_dma_mode;
806 hwif->quirkproc = &sil_quirkproc;
807 807
808 if (sata) { 808 if (sata) {
809 static int first = 1; 809 static int first = 1;
@@ -842,7 +842,6 @@ static void __devinit init_hwif_siimage(ide_hwif_t *hwif)
842 .init_chipset = init_chipset_siimage, \ 842 .init_chipset = init_chipset_siimage, \
843 .init_iops = init_iops_siimage, \ 843 .init_iops = init_iops_siimage, \
844 .init_hwif = init_hwif_siimage, \ 844 .init_hwif = init_hwif_siimage, \
845 .fixup = siimage_fixup, \
846 .host_flags = IDE_HFLAG_BOOTABLE, \ 845 .host_flags = IDE_HFLAG_BOOTABLE, \
847 .pio_mask = ATA_PIO4, \ 846 .pio_mask = ATA_PIO4, \
848 .mwdma_mask = ATA_MWDMA2, \ 847 .mwdma_mask = ATA_MWDMA2, \