aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/siimage.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 14:13:03 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 14:13:03 -0500
commitf01393e48c44e30f7c9a36c8b98a07b0232580fe (patch)
treed585310ef7ee6509285a96b849af2e544e5fea25 /drivers/ide/pci/siimage.c
parent6dd9b8376adbee95ddc321cc83c7f641577e01f6 (diff)
ide: merge ->fixup and ->quirkproc methods
* Assign drive->quirk_list in ->quirkproc implementations: - hpt366.c::hpt3xx_quirkproc() - pdc202xx_new.c::pdcnew_quirkproc() - pdc202xx_old.c::pdc202xx_quirkproc() * Make ->quirkproc void. * Move calling ->quirkproc from do_identify() to probe_hwif(). * Convert it821x_fixups() to it821x_quirkproc() in it821x.c. * Convert siimage_fixup() to sil_quirkproc() in siimage.c, also remove no longer needed drive->present check from is_dev_seagate_sata(). * Convert ide_undecoded_slave() to accept 'drive' instead of 'hwif' as an argument. Then convert ide_register_hw() to accept 'quirkproc' argument instead of 'fixup' one. * Remove no longer needed ->fixup method. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
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, \