diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-17 18:46:23 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-17 18:46:23 -0400 |
commit | 50672e5d7486c9ab312432cbe180ac071f1de8e0 (patch) | |
tree | 23e7c391aaba0b3ddde1495bbfcb123548a50f2c /drivers | |
parent | 2dde7861afa23cd59db83515cb0b810b92b220aa (diff) |
ide: remove dead/obsolete ->busproc method
->busproc method is used by HDIO_SET_BUSSTATE ioctl but it has no chance
of working as intended (in 2.4.x days) because to issue an ioctl there
is a device node needed and:
- for BUSSTATE_TRISTATE+OFF it is too late (devices are already gone)
- for BUSSTATE_TRISTATE+ON it is too early (devices are not registered yet)
Just remove ->busproc method for now (it was only implemented by hpt366,
siimage and tc86c001 host drivers).
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ide/ide.c | 3 | ||||
-rw-r--r-- | drivers/ide/pci/hpt366.c | 59 | ||||
-rw-r--r-- | drivers/ide/pci/sgiioc4.c | 1 | ||||
-rw-r--r-- | drivers/ide/pci/siimage.c | 43 | ||||
-rw-r--r-- | drivers/ide/pci/tc86c001.c | 36 |
5 files changed, 0 insertions, 142 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index a8b5b08dd6e2..cb18ba8de22d 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -414,7 +414,6 @@ static void ide_hwif_restore(ide_hwif_t *hwif, ide_hwif_t *tmp_hwif) | |||
414 | hwif->resetproc = tmp_hwif->resetproc; | 414 | hwif->resetproc = tmp_hwif->resetproc; |
415 | hwif->maskproc = tmp_hwif->maskproc; | 415 | hwif->maskproc = tmp_hwif->maskproc; |
416 | hwif->quirkproc = tmp_hwif->quirkproc; | 416 | hwif->quirkproc = tmp_hwif->quirkproc; |
417 | hwif->busproc = tmp_hwif->busproc; | ||
418 | 417 | ||
419 | hwif->ata_input_data = tmp_hwif->ata_input_data; | 418 | hwif->ata_input_data = tmp_hwif->ata_input_data; |
420 | hwif->ata_output_data = tmp_hwif->ata_output_data; | 419 | hwif->ata_output_data = tmp_hwif->ata_output_data; |
@@ -1071,8 +1070,6 @@ int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device | |||
1071 | case HDIO_SET_BUSSTATE: | 1070 | case HDIO_SET_BUSSTATE: |
1072 | if (!capable(CAP_SYS_ADMIN)) | 1071 | if (!capable(CAP_SYS_ADMIN)) |
1073 | return -EACCES; | 1072 | return -EACCES; |
1074 | if (HWIF(drive)->busproc) | ||
1075 | return HWIF(drive)->busproc(drive, (int)arg); | ||
1076 | return -EOPNOTSUPP; | 1073 | return -EOPNOTSUPP; |
1077 | default: | 1074 | default: |
1078 | return -EINVAL; | 1075 | return -EINVAL; |
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index 6357bb6269ab..d03a231d965e 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c | |||
@@ -929,64 +929,6 @@ static void hpt3xxn_rw_disk(ide_drive_t *drive, struct request *rq) | |||
929 | hpt3xxn_set_clock(HWIF(drive), rq_data_dir(rq) ? 0x23 : 0x21); | 929 | hpt3xxn_set_clock(HWIF(drive), rq_data_dir(rq) ? 0x23 : 0x21); |
930 | } | 930 | } |
931 | 931 | ||
932 | /* | ||
933 | * Set/get power state for a drive. | ||
934 | * NOTE: affects both drives on each channel. | ||
935 | * | ||
936 | * When we turn the power back on, we need to re-initialize things. | ||
937 | */ | ||
938 | #define TRISTATE_BIT 0x8000 | ||
939 | |||
940 | static int hpt3xx_busproc(ide_drive_t *drive, int state) | ||
941 | { | ||
942 | ide_hwif_t *hwif = HWIF(drive); | ||
943 | struct pci_dev *dev = to_pci_dev(hwif->dev); | ||
944 | u8 mcr_addr = hwif->select_data + 2; | ||
945 | u8 resetmask = hwif->channel ? 0x80 : 0x40; | ||
946 | u8 bsr2 = 0; | ||
947 | u16 mcr = 0; | ||
948 | |||
949 | hwif->bus_state = state; | ||
950 | |||
951 | /* Grab the status. */ | ||
952 | pci_read_config_word(dev, mcr_addr, &mcr); | ||
953 | pci_read_config_byte(dev, 0x59, &bsr2); | ||
954 | |||
955 | /* | ||
956 | * Set the state. We don't set it if we don't need to do so. | ||
957 | * Make sure that the drive knows that it has failed if it's off. | ||
958 | */ | ||
959 | switch (state) { | ||
960 | case BUSSTATE_ON: | ||
961 | if (!(bsr2 & resetmask)) | ||
962 | return 0; | ||
963 | hwif->drives[0].failures = hwif->drives[1].failures = 0; | ||
964 | |||
965 | pci_write_config_byte(dev, 0x59, bsr2 & ~resetmask); | ||
966 | pci_write_config_word(dev, mcr_addr, mcr & ~TRISTATE_BIT); | ||
967 | return 0; | ||
968 | case BUSSTATE_OFF: | ||
969 | if ((bsr2 & resetmask) && !(mcr & TRISTATE_BIT)) | ||
970 | return 0; | ||
971 | mcr &= ~TRISTATE_BIT; | ||
972 | break; | ||
973 | case BUSSTATE_TRISTATE: | ||
974 | if ((bsr2 & resetmask) && (mcr & TRISTATE_BIT)) | ||
975 | return 0; | ||
976 | mcr |= TRISTATE_BIT; | ||
977 | break; | ||
978 | default: | ||
979 | return -EINVAL; | ||
980 | } | ||
981 | |||
982 | hwif->drives[0].failures = hwif->drives[0].max_failures + 1; | ||
983 | hwif->drives[1].failures = hwif->drives[1].max_failures + 1; | ||
984 | |||
985 | pci_write_config_word(dev, mcr_addr, mcr); | ||
986 | pci_write_config_byte(dev, 0x59, bsr2 | resetmask); | ||
987 | return 0; | ||
988 | } | ||
989 | |||
990 | /** | 932 | /** |
991 | * hpt37x_calibrate_dpll - calibrate the DPLL | 933 | * hpt37x_calibrate_dpll - calibrate the DPLL |
992 | * @dev: PCI device | 934 | * @dev: PCI device |
@@ -1334,7 +1276,6 @@ static void __devinit init_hwif_hpt366(ide_hwif_t *hwif) | |||
1334 | 1276 | ||
1335 | hwif->quirkproc = &hpt3xx_quirkproc; | 1277 | hwif->quirkproc = &hpt3xx_quirkproc; |
1336 | hwif->maskproc = &hpt3xx_maskproc; | 1278 | hwif->maskproc = &hpt3xx_maskproc; |
1337 | hwif->busproc = &hpt3xx_busproc; | ||
1338 | 1279 | ||
1339 | hwif->udma_filter = &hpt3xx_udma_filter; | 1280 | hwif->udma_filter = &hpt3xx_udma_filter; |
1340 | hwif->mdma_filter = &hpt3xx_mdma_filter; | 1281 | hwif->mdma_filter = &hpt3xx_mdma_filter; |
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c index 054626497be4..9046a69117ff 100644 --- a/drivers/ide/pci/sgiioc4.c +++ b/drivers/ide/pci/sgiioc4.c | |||
@@ -562,7 +562,6 @@ ide_init_sgiioc4(ide_hwif_t * hwif) | |||
562 | clear interrupts */ | 562 | clear interrupts */ |
563 | hwif->maskproc = &sgiioc4_maskproc; /* Mask on/off NIEN register */ | 563 | hwif->maskproc = &sgiioc4_maskproc; /* Mask on/off NIEN register */ |
564 | hwif->quirkproc = NULL; | 564 | hwif->quirkproc = NULL; |
565 | hwif->busproc = NULL; | ||
566 | 565 | ||
567 | hwif->INB = &sgiioc4_INB; | 566 | hwif->INB = &sgiioc4_INB; |
568 | 567 | ||
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c index 8d624afe8529..b6be1b45f329 100644 --- a/drivers/ide/pci/siimage.c +++ b/drivers/ide/pci/siimage.c | |||
@@ -370,48 +370,6 @@ static int siimage_mmio_ide_dma_test_irq (ide_drive_t *drive) | |||
370 | } | 370 | } |
371 | 371 | ||
372 | /** | 372 | /** |
373 | * sil_sata_busproc - bus isolation IOCTL | ||
374 | * @drive: drive to isolate/restore | ||
375 | * @state: bus state to set | ||
376 | * | ||
377 | * Used by the SII3112 to handle bus isolation. As this is a | ||
378 | * SATA controller the work required is quite limited, we | ||
379 | * just have to clean up the statistics | ||
380 | */ | ||
381 | |||
382 | static int sil_sata_busproc(ide_drive_t * drive, int state) | ||
383 | { | ||
384 | ide_hwif_t *hwif = HWIF(drive); | ||
385 | struct pci_dev *dev = to_pci_dev(hwif->dev); | ||
386 | u32 stat_config = 0; | ||
387 | unsigned long addr = siimage_selreg(hwif, 0); | ||
388 | |||
389 | if (hwif->mmio) | ||
390 | stat_config = readl((void __iomem *)addr); | ||
391 | else | ||
392 | pci_read_config_dword(dev, addr, &stat_config); | ||
393 | |||
394 | switch (state) { | ||
395 | case BUSSTATE_ON: | ||
396 | hwif->drives[0].failures = 0; | ||
397 | hwif->drives[1].failures = 0; | ||
398 | break; | ||
399 | case BUSSTATE_OFF: | ||
400 | hwif->drives[0].failures = hwif->drives[0].max_failures + 1; | ||
401 | hwif->drives[1].failures = hwif->drives[1].max_failures + 1; | ||
402 | break; | ||
403 | case BUSSTATE_TRISTATE: | ||
404 | hwif->drives[0].failures = hwif->drives[0].max_failures + 1; | ||
405 | hwif->drives[1].failures = hwif->drives[1].max_failures + 1; | ||
406 | break; | ||
407 | default: | ||
408 | return -EINVAL; | ||
409 | } | ||
410 | hwif->bus_state = state; | ||
411 | return 0; | ||
412 | } | ||
413 | |||
414 | /** | ||
415 | * sil_sata_reset_poll - wait for SATA reset | 373 | * sil_sata_reset_poll - wait for SATA reset |
416 | * @drive: drive we are resetting | 374 | * @drive: drive we are resetting |
417 | * | 375 | * |
@@ -818,7 +776,6 @@ static void __devinit init_hwif_siimage(ide_hwif_t *hwif) | |||
818 | if (sata) { | 776 | if (sata) { |
819 | static int first = 1; | 777 | static int first = 1; |
820 | 778 | ||
821 | hwif->busproc = &sil_sata_busproc; | ||
822 | hwif->reset_poll = &sil_sata_reset_poll; | 779 | hwif->reset_poll = &sil_sata_reset_poll; |
823 | hwif->pre_reset = &sil_sata_pre_reset; | 780 | hwif->pre_reset = &sil_sata_pre_reset; |
824 | hwif->udma_filter = &sil_sata_udma_filter; | 781 | hwif->udma_filter = &sil_sata_udma_filter; |
diff --git a/drivers/ide/pci/tc86c001.c b/drivers/ide/pci/tc86c001.c index 2ef2ed2f2b32..1e4a6262bcef 100644 --- a/drivers/ide/pci/tc86c001.c +++ b/drivers/ide/pci/tc86c001.c | |||
@@ -126,40 +126,6 @@ static void tc86c001_dma_start(ide_drive_t *drive) | |||
126 | ide_dma_start(drive); | 126 | ide_dma_start(drive); |
127 | } | 127 | } |
128 | 128 | ||
129 | static int tc86c001_busproc(ide_drive_t *drive, int state) | ||
130 | { | ||
131 | ide_hwif_t *hwif = HWIF(drive); | ||
132 | unsigned long sc_base = hwif->config_data; | ||
133 | u16 scr1; | ||
134 | |||
135 | /* System Control 1 Register bit 11 (ATA Hard Reset) read */ | ||
136 | scr1 = inw(sc_base + 0x00); | ||
137 | |||
138 | switch (state) { | ||
139 | case BUSSTATE_ON: | ||
140 | if (!(scr1 & 0x0800)) | ||
141 | return 0; | ||
142 | scr1 &= ~0x0800; | ||
143 | |||
144 | hwif->drives[0].failures = hwif->drives[1].failures = 0; | ||
145 | break; | ||
146 | case BUSSTATE_OFF: | ||
147 | if (scr1 & 0x0800) | ||
148 | return 0; | ||
149 | scr1 |= 0x0800; | ||
150 | |||
151 | hwif->drives[0].failures = hwif->drives[0].max_failures + 1; | ||
152 | hwif->drives[1].failures = hwif->drives[1].max_failures + 1; | ||
153 | break; | ||
154 | default: | ||
155 | return -EINVAL; | ||
156 | } | ||
157 | |||
158 | /* System Control 1 Register bit 11 (ATA Hard Reset) write */ | ||
159 | outw(scr1, sc_base + 0x00); | ||
160 | return 0; | ||
161 | } | ||
162 | |||
163 | static u8 __devinit tc86c001_cable_detect(ide_hwif_t *hwif) | 129 | static u8 __devinit tc86c001_cable_detect(ide_hwif_t *hwif) |
164 | { | 130 | { |
165 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 131 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
@@ -194,8 +160,6 @@ static void __devinit init_hwif_tc86c001(ide_hwif_t *hwif) | |||
194 | hwif->set_pio_mode = &tc86c001_set_pio_mode; | 160 | hwif->set_pio_mode = &tc86c001_set_pio_mode; |
195 | hwif->set_dma_mode = &tc86c001_set_mode; | 161 | hwif->set_dma_mode = &tc86c001_set_mode; |
196 | 162 | ||
197 | hwif->busproc = &tc86c001_busproc; | ||
198 | |||
199 | hwif->cable_detect = tc86c001_cable_detect; | 163 | hwif->cable_detect = tc86c001_cable_detect; |
200 | 164 | ||
201 | if (!hwif->dma_base) | 165 | if (!hwif->dma_base) |