Exemplo n.º 1
0
static int
ata_cbuschannel_suspend(device_t dev)
{
    struct ata_channel *ch = device_get_softc(dev);

    if (!ch->attached)
	return (0);

    return ata_suspend(dev);
}
Exemplo n.º 2
0
static int
ata_macio_suspend(device_t dev)
{
    struct ata_dbdma_channel *ch = device_get_softc(dev);
    int error;

    if (!ch->sc_ch.attached)
        return (0);

    error = ata_suspend(dev);
    dbdma_save_state(ch->dbdma);

    return (error);
}
Exemplo n.º 3
0
static int
ata_pcichannel_suspend(device_t dev)
{
    struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev));
    struct ata_channel *ch = device_get_softc(dev);
    int error;

    if (!ch->attached)
	return (0);

    if ((error = ata_suspend(dev)))
	return (error);

    if (ctlr->ch_suspend != NULL && (error = ctlr->ch_suspend(dev)))
	return (error);

    return (0);
}