You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'suspend' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 into linux-next
This commit is contained in:
@@ -62,8 +62,6 @@ static u32 acpi_suspend_states[] = {
|
||||
[PM_SUSPEND_MAX] = ACPI_STATE_S5
|
||||
};
|
||||
|
||||
static int init_8259A_after_S1;
|
||||
|
||||
/**
|
||||
* acpi_suspend_begin - Set the target system sleep state to the state
|
||||
* associated with given @pm_state, if supported.
|
||||
@@ -186,13 +184,6 @@ static void acpi_suspend_finish(void)
|
||||
acpi_set_firmware_waking_vector((acpi_physical_address) 0);
|
||||
|
||||
acpi_target_sleep_state = ACPI_STATE_S0;
|
||||
|
||||
#ifdef CONFIG_X86
|
||||
if (init_8259A_after_S1) {
|
||||
printk("Broken toshiba laptop -> kicking interrupts\n");
|
||||
init_8259A(0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -232,26 +223,6 @@ static struct platform_suspend_ops acpi_suspend_ops = {
|
||||
.finish = acpi_suspend_finish,
|
||||
.end = acpi_suspend_end,
|
||||
};
|
||||
|
||||
/*
|
||||
* Toshiba fails to preserve interrupts over S1, reinitialization
|
||||
* of 8259 is needed after S1 resume.
|
||||
*/
|
||||
static int __init init_ints_after_s1(const struct dmi_system_id *d)
|
||||
{
|
||||
printk(KERN_WARNING "%s with broken S1 detected.\n", d->ident);
|
||||
init_8259A_after_S1 = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct dmi_system_id __initdata acpisleep_dmi_table[] = {
|
||||
{
|
||||
.callback = init_ints_after_s1,
|
||||
.ident = "Toshiba Satellite 4030cdt",
|
||||
.matches = {DMI_MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"),},
|
||||
},
|
||||
{},
|
||||
};
|
||||
#endif /* CONFIG_SUSPEND */
|
||||
|
||||
#ifdef CONFIG_HIBERNATION
|
||||
@@ -369,8 +340,8 @@ int acpi_suspend(u32 acpi_state)
|
||||
/**
|
||||
* acpi_pm_device_sleep_state - return preferred power state of ACPI device
|
||||
* in the system sleep state given by %acpi_target_sleep_state
|
||||
* @dev: device to examine
|
||||
* @wake: if set, the device should be able to wake up the system
|
||||
* @dev: device to examine; its driver model wakeup flags control
|
||||
* whether it should be able to wake up the system
|
||||
* @d_min_p: used to store the upper limit of allowed states range
|
||||
* Return value: preferred power state of the device on success, -ENODEV on
|
||||
* failure (ie. if there's no 'struct acpi_device' for @dev)
|
||||
@@ -388,7 +359,7 @@ int acpi_suspend(u32 acpi_state)
|
||||
* via @wake.
|
||||
*/
|
||||
|
||||
int acpi_pm_device_sleep_state(struct device *dev, int wake, int *d_min_p)
|
||||
int acpi_pm_device_sleep_state(struct device *dev, int *d_min_p)
|
||||
{
|
||||
acpi_handle handle = DEVICE_ACPI_HANDLE(dev);
|
||||
struct acpi_device *adev;
|
||||
@@ -427,7 +398,7 @@ int acpi_pm_device_sleep_state(struct device *dev, int wake, int *d_min_p)
|
||||
* can wake the system. _S0W may be valid, too.
|
||||
*/
|
||||
if (acpi_target_sleep_state == ACPI_STATE_S0 ||
|
||||
(wake && adev->wakeup.state.enabled &&
|
||||
(device_may_wakeup(dev) && adev->wakeup.state.enabled &&
|
||||
adev->wakeup.sleep_state <= acpi_target_sleep_state)) {
|
||||
acpi_status status;
|
||||
|
||||
@@ -473,8 +444,6 @@ int __init acpi_sleep_init(void)
|
||||
u8 type_a, type_b;
|
||||
#ifdef CONFIG_SUSPEND
|
||||
int i = 0;
|
||||
|
||||
dmi_check_system(acpisleep_dmi_table);
|
||||
#endif
|
||||
|
||||
if (acpi_disabled)
|
||||
|
||||
@@ -1028,6 +1028,7 @@ endif
|
||||
|
||||
config BLK_DEV_HD_ONLY
|
||||
bool "Old hard disk (MFM/RLL/IDE) driver"
|
||||
depends on !ARM || ARCH_RPC || ARCH_SHARK || BROKEN
|
||||
help
|
||||
There are two drivers for MFM/RLL/IDE hard disks. Most people use
|
||||
the newer enhanced driver, but this old one is still around for two
|
||||
|
||||
@@ -42,6 +42,7 @@ static int __init bastide_register(unsigned int base, unsigned int aux, int irq)
|
||||
|
||||
hw.io_ports.ctl_addr = aux + (6 * 0x20);
|
||||
hw.irq = irq;
|
||||
hw.chipset = ide_generic;
|
||||
|
||||
hwif = ide_find_port();
|
||||
if (hwif == NULL)
|
||||
|
||||
@@ -49,6 +49,7 @@ static int __init ide_arm_init(void)
|
||||
memset(&hw, 0, sizeof(hw));
|
||||
ide_std_init_ports(&hw, base, ctl);
|
||||
hw.irq = IDE_ARM_IRQ;
|
||||
hw.chipset = ide_generic;
|
||||
|
||||
hwif = ide_find_port();
|
||||
if (hwif) {
|
||||
|
||||
@@ -409,9 +409,6 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev)
|
||||
|
||||
ide_device_add(idx, &palm_bk3710_port_info);
|
||||
|
||||
if (!hwif->present)
|
||||
goto out;
|
||||
|
||||
return 0;
|
||||
out:
|
||||
printk(KERN_WARNING "Palm Chip BK3710 IDE Register Fail\n");
|
||||
|
||||
@@ -125,6 +125,7 @@ static int __init ide_generic_init(void)
|
||||
memset(&hw, 0, sizeof(hw));
|
||||
ide_std_init_ports(&hw, io_addr, io_addr + 0x206);
|
||||
hw.irq = ide_default_irq(io_addr);
|
||||
hw.chipset = ide_generic;
|
||||
ide_init_port_hw(hwif, &hw);
|
||||
|
||||
idx[i] = i;
|
||||
|
||||
@@ -55,6 +55,7 @@ static int idepnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
|
||||
memset(&hw, 0, sizeof(hw));
|
||||
ide_std_init_ports(&hw, base, ctl);
|
||||
hw.irq = pnp_irq(dev, 0);
|
||||
hw.chipset = ide_generic;
|
||||
|
||||
hwif = ide_find_port();
|
||||
if (hwif) {
|
||||
|
||||
@@ -1333,8 +1333,7 @@ static void ide_port_init_devices(ide_hwif_t *hwif)
|
||||
static void ide_init_port(ide_hwif_t *hwif, unsigned int port,
|
||||
const struct ide_port_info *d)
|
||||
{
|
||||
if (d->chipset != ide_etrax100)
|
||||
hwif->channel = port;
|
||||
hwif->channel = port;
|
||||
|
||||
if (d->chipset)
|
||||
hwif->chipset = d->chipset;
|
||||
@@ -1519,7 +1518,7 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (d->chipset != ide_etrax100 && (i & 1) && mate) {
|
||||
if ((i & 1) && mate) {
|
||||
hwif->mate = mate;
|
||||
mate->mate = hwif;
|
||||
}
|
||||
@@ -1665,6 +1664,7 @@ static void ide_legacy_init_one(u8 *idx, hw_regs_t *hw, u8 port_no,
|
||||
|
||||
ide_std_init_ports(hw, base, ctl);
|
||||
hw->irq = irq;
|
||||
hw->chipset = d->chipset;
|
||||
|
||||
hwif = ide_find_port_slot(d);
|
||||
if (hwif) {
|
||||
|
||||
@@ -63,7 +63,6 @@ static int proc_ide_read_imodel
|
||||
case ide_pmac: name = "mac-io"; break;
|
||||
case ide_au1xxx: name = "au1xxx"; break;
|
||||
case ide_palm3710: name = "palm3710"; break;
|
||||
case ide_etrax100: name = "etrax100"; break;
|
||||
case ide_acorn: name = "acorn"; break;
|
||||
default: name = "(unknown)"; break;
|
||||
}
|
||||
|
||||
@@ -138,6 +138,8 @@ static void __init buddha_setup_ports(hw_regs_t *hw, unsigned long base,
|
||||
|
||||
hw->irq = IRQ_AMIGA_PORTS;
|
||||
hw->ack_intr = ack_intr;
|
||||
|
||||
hw->chipset = ide_generic;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -81,6 +81,8 @@ static void __init falconide_setup_ports(hw_regs_t *hw)
|
||||
|
||||
hw->irq = IRQ_MFP_IDE;
|
||||
hw->ack_intr = NULL;
|
||||
|
||||
hw->chipset = ide_generic;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <linux/ide.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/zorro.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
#include <asm/setup.h>
|
||||
#include <asm/amigahw.h>
|
||||
@@ -62,7 +63,10 @@
|
||||
GAYLE_NUM_HWIFS-1)
|
||||
#define GAYLE_HAS_CONTROL_REG (!ide_doubler)
|
||||
#define GAYLE_IDEREG_SIZE (ide_doubler ? 0x1000 : 0x2000)
|
||||
|
||||
int ide_doubler = 0; /* support IDE doublers? */
|
||||
EXPORT_SYMBOL_GPL(ide_doubler);
|
||||
|
||||
module_param_named(doubler, ide_doubler, bool, 0);
|
||||
MODULE_PARM_DESC(doubler, "enable support for IDE doublers");
|
||||
#endif /* CONFIG_BLK_DEV_IDEDOUBLER */
|
||||
@@ -112,6 +116,8 @@ static void __init gayle_setup_ports(hw_regs_t *hw, unsigned long base,
|
||||
|
||||
hw->irq = IRQ_AMIGA_PORTS;
|
||||
hw->ack_intr = ack_intr;
|
||||
|
||||
hw->chipset = ide_generic;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -78,6 +78,8 @@ static void __init macide_setup_ports(hw_regs_t *hw, unsigned long base,
|
||||
|
||||
hw->irq = irq;
|
||||
hw->ack_intr = ack_intr;
|
||||
|
||||
hw->chipset = ide_generic;
|
||||
}
|
||||
|
||||
static const char *mac_ide_name[] =
|
||||
|
||||
@@ -70,6 +70,8 @@ static void q40_ide_setup_ports(hw_regs_t *hw, unsigned long base,
|
||||
|
||||
hw->irq = irq;
|
||||
hw->ack_intr = ack_intr;
|
||||
|
||||
hw->chipset = ide_generic;
|
||||
}
|
||||
|
||||
static void q40ide_input_data(ide_drive_t *drive, struct request *rq,
|
||||
|
||||
@@ -747,9 +747,11 @@ static int __init cmd640x_init(void)
|
||||
|
||||
ide_std_init_ports(&hw[0], 0x1f0, 0x3f6);
|
||||
hw[0].irq = 14;
|
||||
hw[0].chipset = ide_cmd640;
|
||||
|
||||
ide_std_init_ports(&hw[1], 0x170, 0x376);
|
||||
hw[1].irq = 15;
|
||||
hw[1].chipset = ide_cmd640;
|
||||
|
||||
printk(KERN_INFO "cmd640: buggy cmd640%c interface on %s, config=0x%02x"
|
||||
"\n", 'a' + cmd640_chip_version - 1, bus_type, cfr);
|
||||
|
||||
+11
-17
@@ -47,13 +47,18 @@ static const struct ide_port_ops delkin_cb_port_ops = {
|
||||
.quirkproc = ide_undecoded_slave,
|
||||
};
|
||||
|
||||
static const struct ide_port_info delkin_cb_port_info = {
|
||||
.port_ops = &delkin_cb_port_ops,
|
||||
.host_flags = IDE_HFLAG_IO_32BIT | IDE_HFLAG_UNMASK_IRQS |
|
||||
IDE_HFLAG_NO_DMA,
|
||||
};
|
||||
|
||||
static int __devinit
|
||||
delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id)
|
||||
{
|
||||
unsigned long base;
|
||||
hw_regs_t hw;
|
||||
ide_hwif_t *hwif = NULL;
|
||||
ide_drive_t *drive;
|
||||
int i, rc;
|
||||
u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
|
||||
|
||||
@@ -79,6 +84,7 @@ delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id)
|
||||
memset(&hw, 0, sizeof(hw));
|
||||
ide_std_init_ports(&hw, base + 0x10, base + 0x1e);
|
||||
hw.irq = dev->irq;
|
||||
hw.dev = &dev->dev;
|
||||
hw.chipset = ide_pci; /* this enables IRQ sharing */
|
||||
|
||||
hwif = ide_find_port();
|
||||
@@ -89,26 +95,16 @@ delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id)
|
||||
|
||||
ide_init_port_data(hwif, i);
|
||||
ide_init_port_hw(hwif, &hw);
|
||||
hwif->port_ops = &delkin_cb_port_ops;
|
||||
|
||||
idx[0] = i;
|
||||
|
||||
ide_device_add(idx, NULL);
|
||||
|
||||
if (!hwif->present)
|
||||
goto out_disable;
|
||||
ide_device_add(idx, &delkin_cb_port_info);
|
||||
|
||||
pci_set_drvdata(dev, hwif);
|
||||
hwif->dev = &dev->dev;
|
||||
drive = &hwif->drives[0];
|
||||
if (drive->present) {
|
||||
drive->io_32bit = 1;
|
||||
drive->unmask = 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
out_disable:
|
||||
printk(KERN_ERR "delkin_cb: no IDE devices found\n");
|
||||
pci_release_regions(dev);
|
||||
pci_disable_device(dev);
|
||||
return -ENODEV;
|
||||
@@ -139,14 +135,12 @@ static struct pci_driver driver = {
|
||||
.remove = delkin_cb_remove,
|
||||
};
|
||||
|
||||
static int
|
||||
delkin_cb_init (void)
|
||||
static int __init delkin_cb_init(void)
|
||||
{
|
||||
return pci_register_driver(&driver);
|
||||
}
|
||||
|
||||
static void
|
||||
delkin_cb_exit (void)
|
||||
static void __exit delkin_cb_exit(void)
|
||||
{
|
||||
pci_unregister_driver(&driver);
|
||||
}
|
||||
|
||||
@@ -569,6 +569,11 @@ static int __devinit sis5513_init_one(struct pci_dev *dev, const struct pci_devi
|
||||
{
|
||||
struct ide_port_info d = sis5513_chipset;
|
||||
u8 udma_rates[] = { 0x00, 0x00, 0x07, 0x1f, 0x3f, 0x3f, 0x7f, 0x7f };
|
||||
int rc;
|
||||
|
||||
rc = pci_enable_device(dev);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
if (sis_find_family(dev) == 0)
|
||||
return -ENOTSUPP;
|
||||
|
||||
@@ -303,6 +303,8 @@ static int __init m8xx_ide_init_ports(hw_regs_t *hw, unsigned long data_port)
|
||||
pcmp->pcmc_per = 0x100000 >> (16 * _slot_);
|
||||
#endif /* CONFIG_IDE_8xx_PCCARD */
|
||||
|
||||
hw->chipset = ide_generic;
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_IDE_8xx_PCCARD || CONFIG_IDE_8xx_DIRECT */
|
||||
@@ -377,6 +379,8 @@ static int __init m8xx_ide_init_ports(hw_regs_t *hw, unsigned long data_port)
|
||||
((immap_t *) IMAP_ADDR)->im_siu_conf.sc_siel |=
|
||||
(0x80000000 >> ioport_dsc[data_port].irq);
|
||||
|
||||
hw->chipset = ide_generic;
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_IDE_8xx_DIRECT */
|
||||
|
||||
@@ -239,13 +239,11 @@ EXPORT_SYMBOL(pci_osc_control_set);
|
||||
* choose highest power _SxD or any lower power
|
||||
*/
|
||||
|
||||
static pci_power_t acpi_pci_choose_state(struct pci_dev *pdev,
|
||||
pm_message_t state)
|
||||
static pci_power_t acpi_pci_choose_state(struct pci_dev *pdev)
|
||||
{
|
||||
int acpi_state;
|
||||
|
||||
acpi_state = acpi_pm_device_sleep_state(&pdev->dev,
|
||||
device_may_wakeup(&pdev->dev), NULL);
|
||||
acpi_state = acpi_pm_device_sleep_state(&pdev->dev, NULL);
|
||||
if (acpi_state < 0)
|
||||
return PCI_POWER_ERROR;
|
||||
|
||||
|
||||
+2
-2
@@ -506,7 +506,7 @@ pci_set_power_state(struct pci_dev *dev, pci_power_t state)
|
||||
return 0;
|
||||
}
|
||||
|
||||
pci_power_t (*platform_pci_choose_state)(struct pci_dev *dev, pm_message_t state);
|
||||
pci_power_t (*platform_pci_choose_state)(struct pci_dev *dev);
|
||||
|
||||
/**
|
||||
* pci_choose_state - Choose the power state of a PCI device
|
||||
@@ -526,7 +526,7 @@ pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state)
|
||||
return PCI_D0;
|
||||
|
||||
if (platform_pci_choose_state) {
|
||||
ret = platform_pci_choose_state(dev, state);
|
||||
ret = platform_pci_choose_state(dev);
|
||||
if (ret != PCI_POWER_ERROR)
|
||||
return ret;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user