mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-02 03:06:43 +07:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6: Revert "ide: skip probe if there are no devices on the port (v2)" Revert "via82cxxx: workaround h/w bugs"
This commit is contained in:
commit
ad4ba05900
@ -695,14 +695,8 @@ static int ide_probe_port(ide_hwif_t *hwif)
|
||||
if (irqd)
|
||||
disable_irq(hwif->irq);
|
||||
|
||||
rc = ide_port_wait_ready(hwif);
|
||||
if (rc == -ENODEV) {
|
||||
printk(KERN_INFO "%s: no devices on the port\n", hwif->name);
|
||||
goto out;
|
||||
} else if (rc == -EBUSY)
|
||||
printk(KERN_ERR "%s: not ready before the probe\n", hwif->name);
|
||||
else
|
||||
rc = -ENODEV;
|
||||
if (ide_port_wait_ready(hwif) == -EBUSY)
|
||||
printk(KERN_DEBUG "%s: Wait for ready failed before probe !\n", hwif->name);
|
||||
|
||||
/*
|
||||
* Second drive should only exist if first drive was found,
|
||||
@ -713,7 +707,7 @@ static int ide_probe_port(ide_hwif_t *hwif)
|
||||
if (drive->dev_flags & IDE_DFLAG_PRESENT)
|
||||
rc = 0;
|
||||
}
|
||||
out:
|
||||
|
||||
/*
|
||||
* Use cached IRQ number. It might be (and is...) changed by probe
|
||||
* code above
|
||||
|
@ -110,7 +110,6 @@ struct via82cxxx_dev
|
||||
{
|
||||
struct via_isa_bridge *via_config;
|
||||
unsigned int via_80w;
|
||||
u8 cached_device[2];
|
||||
};
|
||||
|
||||
/**
|
||||
@ -403,66 +402,10 @@ static const struct ide_port_ops via_port_ops = {
|
||||
.cable_detect = via82cxxx_cable_detect,
|
||||
};
|
||||
|
||||
static void via_write_devctl(ide_hwif_t *hwif, u8 ctl)
|
||||
{
|
||||
struct via82cxxx_dev *vdev = hwif->host->host_priv;
|
||||
|
||||
outb(ctl, hwif->io_ports.ctl_addr);
|
||||
outb(vdev->cached_device[hwif->channel], hwif->io_ports.device_addr);
|
||||
}
|
||||
|
||||
static void __via_dev_select(ide_drive_t *drive, u8 select)
|
||||
{
|
||||
ide_hwif_t *hwif = drive->hwif;
|
||||
struct via82cxxx_dev *vdev = hwif->host->host_priv;
|
||||
|
||||
outb(select, hwif->io_ports.device_addr);
|
||||
vdev->cached_device[hwif->channel] = select;
|
||||
}
|
||||
|
||||
static void via_dev_select(ide_drive_t *drive)
|
||||
{
|
||||
__via_dev_select(drive, drive->select | ATA_DEVICE_OBS);
|
||||
}
|
||||
|
||||
static void via_tf_load(ide_drive_t *drive, struct ide_taskfile *tf, u8 valid)
|
||||
{
|
||||
ide_hwif_t *hwif = drive->hwif;
|
||||
struct ide_io_ports *io_ports = &hwif->io_ports;
|
||||
|
||||
if (valid & IDE_VALID_FEATURE)
|
||||
outb(tf->feature, io_ports->feature_addr);
|
||||
if (valid & IDE_VALID_NSECT)
|
||||
outb(tf->nsect, io_ports->nsect_addr);
|
||||
if (valid & IDE_VALID_LBAL)
|
||||
outb(tf->lbal, io_ports->lbal_addr);
|
||||
if (valid & IDE_VALID_LBAM)
|
||||
outb(tf->lbam, io_ports->lbam_addr);
|
||||
if (valid & IDE_VALID_LBAH)
|
||||
outb(tf->lbah, io_ports->lbah_addr);
|
||||
if (valid & IDE_VALID_DEVICE)
|
||||
__via_dev_select(drive, tf->device);
|
||||
}
|
||||
|
||||
const struct ide_tp_ops via_tp_ops = {
|
||||
.exec_command = ide_exec_command,
|
||||
.read_status = ide_read_status,
|
||||
.read_altstatus = ide_read_altstatus,
|
||||
.write_devctl = via_write_devctl,
|
||||
|
||||
.dev_select = via_dev_select,
|
||||
.tf_load = via_tf_load,
|
||||
.tf_read = ide_tf_read,
|
||||
|
||||
.input_data = ide_input_data,
|
||||
.output_data = ide_output_data,
|
||||
};
|
||||
|
||||
static const struct ide_port_info via82cxxx_chipset __devinitdata = {
|
||||
.name = DRV_NAME,
|
||||
.init_chipset = init_chipset_via82cxxx,
|
||||
.enablebits = { { 0x40, 0x02, 0x02 }, { 0x40, 0x01, 0x01 } },
|
||||
.tp_ops = &via_tp_ops,
|
||||
.port_ops = &via_port_ops,
|
||||
.host_flags = IDE_HFLAG_PIO_NO_BLACKLIST |
|
||||
IDE_HFLAG_POST_SET_MODE |
|
||||
|
Loading…
Reference in New Issue
Block a user