aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-03-27 10:55:58 -0400
committerDavid S. Miller <davem@davemloft.net>2010-03-27 10:55:58 -0400
commite4afb29fa3ea759d408fa537ab6a81800708396e (patch)
tree2b98ce80993e9ed1afb300939201f6464b8685a3 /drivers
parentb72c40949b0f04728f2993a1434598d3bad094ea (diff)
Revert "via82cxxx: workaround h/w bugs"
This reverts commit f931a5d5785d7b7c44871bd7ad2762e29dfddf29. It causes regressions for some users. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/via82cxxx.c57
1 files changed, 0 insertions, 57 deletions
diff --git a/drivers/ide/via82cxxx.c b/drivers/ide/via82cxxx.c
index e65d010b708d..48fd4efc90ad 100644
--- a/drivers/ide/via82cxxx.c
+++ b/drivers/ide/via82cxxx.c
@@ -110,7 +110,6 @@ struct via82cxxx_dev
110{ 110{
111 struct via_isa_bridge *via_config; 111 struct via_isa_bridge *via_config;
112 unsigned int via_80w; 112 unsigned int via_80w;
113 u8 cached_device[2];
114}; 113};
115 114
116/** 115/**
@@ -403,66 +402,10 @@ static const struct ide_port_ops via_port_ops = {
403 .cable_detect = via82cxxx_cable_detect, 402 .cable_detect = via82cxxx_cable_detect,
404}; 403};
405 404
406static void via_write_devctl(ide_hwif_t *hwif, u8 ctl)
407{
408 struct via82cxxx_dev *vdev = hwif->host->host_priv;
409
410 outb(ctl, hwif->io_ports.ctl_addr);
411 outb(vdev->cached_device[hwif->channel], hwif->io_ports.device_addr);
412}
413
414static void __via_dev_select(ide_drive_t *drive, u8 select)
415{
416 ide_hwif_t *hwif = drive->hwif;
417 struct via82cxxx_dev *vdev = hwif->host->host_priv;
418
419 outb(select, hwif->io_ports.device_addr);
420 vdev->cached_device[hwif->channel] = select;
421}
422
423static void via_dev_select(ide_drive_t *drive)
424{
425 __via_dev_select(drive, drive->select | ATA_DEVICE_OBS);
426}
427
428static void via_tf_load(ide_drive_t *drive, struct ide_taskfile *tf, u8 valid)
429{
430 ide_hwif_t *hwif = drive->hwif;
431 struct ide_io_ports *io_ports = &hwif->io_ports;
432
433 if (valid & IDE_VALID_FEATURE)
434 outb(tf->feature, io_ports->feature_addr);
435 if (valid & IDE_VALID_NSECT)
436 outb(tf->nsect, io_ports->nsect_addr);
437 if (valid & IDE_VALID_LBAL)
438 outb(tf->lbal, io_ports->lbal_addr);
439 if (valid & IDE_VALID_LBAM)
440 outb(tf->lbam, io_ports->lbam_addr);
441 if (valid & IDE_VALID_LBAH)
442 outb(tf->lbah, io_ports->lbah_addr);
443 if (valid & IDE_VALID_DEVICE)
444 __via_dev_select(drive, tf->device);
445}
446
447const struct ide_tp_ops via_tp_ops = {
448 .exec_command = ide_exec_command,
449 .read_status = ide_read_status,
450 .read_altstatus = ide_read_altstatus,
451 .write_devctl = via_write_devctl,
452
453 .dev_select = via_dev_select,
454 .tf_load = via_tf_load,
455 .tf_read = ide_tf_read,
456
457 .input_data = ide_input_data,
458 .output_data = ide_output_data,
459};
460
461static const struct ide_port_info via82cxxx_chipset __devinitdata = { 405static const struct ide_port_info via82cxxx_chipset __devinitdata = {
462 .name = DRV_NAME, 406 .name = DRV_NAME,
463 .init_chipset = init_chipset_via82cxxx, 407 .init_chipset = init_chipset_via82cxxx,
464 .enablebits = { { 0x40, 0x02, 0x02 }, { 0x40, 0x01, 0x01 } }, 408 .enablebits = { { 0x40, 0x02, 0x02 }, { 0x40, 0x01, 0x01 } },
465 .tp_ops = &via_tp_ops,
466 .port_ops = &via_port_ops, 409 .port_ops = &via_port_ops,
467 .host_flags = IDE_HFLAG_PIO_NO_BLACKLIST | 410 .host_flags = IDE_HFLAG_PIO_NO_BLACKLIST |
468 IDE_HFLAG_POST_SET_MODE | 411 IDE_HFLAG_POST_SET_MODE |