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 tag 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
Pull libata updates from Jeff Garzik:
"Notable changes:
- Updating libata to directly bind with ACPI / runtime power mgmt.
This is a pre-req for SATA ZPODD (CD-ROM power management).
Touches ACPI (exports++) and SCSI in minor ways. Has been in
linux-next for weeks.
The rest of this should come via SCSI tree, as it involves a lot of
updates to the 'sr' driver etc.
Other, minor changes:
- module_pci_driver() removes a lot of common boilerplate from each
PCI driver
- minor coding style, whitespace cleanups
- pata_pcmcia bug fix, caught by Coccinelle
- pata_imx, sata_dwc_460ex minor vendor updates
- ahci_platform: use simple PM ops, and thereby add hibernation cb's
- Add a few device-specific quirks"
* tag 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: (23 commits)
[libata] pata_cmd64x: whitespace cleanup
libata-acpi: fix up for acpi_pm_device_sleep_state API
sata_dwc_460ex: device tree may specify dma_channel
ahci, trivial: fixed coding style issues related to braces
ahci_platform: add hibernation callbacks
libata-eh.c: local functions should not be exposed globally
libata-transport.c: local functions should not be exposed globally
sata_dwc_460ex: support hardreset
ata: use module_pci_driver
drivers/ata/pata_pcmcia.c: adjust suspicious bit operation
pata_imx: Convert to clk_prepare_enable/clk_disable_unprepare
ahci: Enable SB600 64bit DMA on MSI K9AGM2 (MS-7327) v2
[libata] Prevent interface errors with Seagate FreeAgent GoFlex
drivers/acpi/glue: revert accidental license-related 6b66d95895 bits
libata-acpi: add missing inlines in libata.h
libata: tell scsi layer device supports runtime power off
libata: detect Device Attention support
libata-acpi: register/unregister device to/from power resource
libata-acpi: add ata port runtime D3Cold support
libata-acpi: set acpi state for SATA port
...
This commit is contained in:
+2
-2
@@ -39,6 +39,7 @@ int register_acpi_bus_type(struct acpi_bus_type *type)
|
||||
}
|
||||
return -ENODEV;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(register_acpi_bus_type);
|
||||
|
||||
int unregister_acpi_bus_type(struct acpi_bus_type *type)
|
||||
{
|
||||
@@ -54,6 +55,7 @@ int unregister_acpi_bus_type(struct acpi_bus_type *type)
|
||||
}
|
||||
return -ENODEV;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(unregister_acpi_bus_type);
|
||||
|
||||
static struct acpi_bus_type *acpi_get_bus_type(struct bus_type *type)
|
||||
{
|
||||
@@ -69,7 +71,6 @@ static struct acpi_bus_type *acpi_get_bus_type(struct bus_type *type)
|
||||
up_read(&bus_type_sem);
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(register_acpi_bus_type);
|
||||
|
||||
static int acpi_find_bridge_device(struct device *dev, acpi_handle * handle)
|
||||
{
|
||||
@@ -86,7 +87,6 @@ static int acpi_find_bridge_device(struct device *dev, acpi_handle * handle)
|
||||
up_read(&bus_type_sem);
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(unregister_acpi_bus_type);
|
||||
|
||||
/* Get device's handler per its address under its parent */
|
||||
struct acpi_find_child {
|
||||
|
||||
@@ -392,6 +392,7 @@ void acpi_power_resource_unregister_device(struct device *dev, acpi_handle handl
|
||||
__acpi_power_resource_unregister_device(dev,
|
||||
list->handles[i]);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(acpi_power_resource_unregister_device);
|
||||
|
||||
static int __acpi_power_resource_register_device(
|
||||
struct acpi_power_managed_device *powered_device, acpi_handle handle)
|
||||
@@ -462,6 +463,7 @@ no_power_resource:
|
||||
printk(KERN_WARNING PREFIX "Invalid Power Resource to register!");
|
||||
return -ENODEV;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(acpi_power_resource_register_device);
|
||||
|
||||
/**
|
||||
* acpi_device_sleep_wake - execute _DSW (Device Sleep Wake) or (deprecated in
|
||||
|
||||
@@ -809,6 +809,7 @@ int acpi_pm_device_sleep_state(struct device *dev, int *d_min_p, int d_max_in)
|
||||
}
|
||||
return d_max;
|
||||
}
|
||||
EXPORT_SYMBOL(acpi_pm_device_sleep_state);
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
@@ -845,6 +846,7 @@ int acpi_pm_device_run_wake(struct device *phys_dev, bool enable)
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(acpi_pm_device_run_wake);
|
||||
|
||||
/**
|
||||
* acpi_pm_device_sleep_wake - enable or disable the system wake-up
|
||||
|
||||
@@ -503,21 +503,10 @@ static int acard_ahci_init_one(struct pci_dev *pdev, const struct pci_device_id
|
||||
&acard_ahci_sht);
|
||||
}
|
||||
|
||||
static int __init acard_ahci_init(void)
|
||||
{
|
||||
return pci_register_driver(&acard_ahci_pci_driver);
|
||||
}
|
||||
|
||||
static void __exit acard_ahci_exit(void)
|
||||
{
|
||||
pci_unregister_driver(&acard_ahci_pci_driver);
|
||||
}
|
||||
module_pci_driver(acard_ahci_pci_driver);
|
||||
|
||||
MODULE_AUTHOR("Jeff Garzik");
|
||||
MODULE_DESCRIPTION("ACard AHCI SATA low-level driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DEVICE_TABLE(pci, acard_ahci_pci_tbl);
|
||||
MODULE_VERSION(DRV_VERSION);
|
||||
|
||||
module_init(acard_ahci_init);
|
||||
module_exit(acard_ahci_exit);
|
||||
|
||||
+28
-35
@@ -105,31 +105,27 @@ static struct ata_port_operations ahci_p5wdh_ops = {
|
||||
|
||||
static const struct ata_port_info ahci_port_info[] = {
|
||||
/* by features */
|
||||
[board_ahci] =
|
||||
{
|
||||
[board_ahci] = {
|
||||
.flags = AHCI_FLAG_COMMON,
|
||||
.pio_mask = ATA_PIO4,
|
||||
.udma_mask = ATA_UDMA6,
|
||||
.port_ops = &ahci_ops,
|
||||
},
|
||||
[board_ahci_ign_iferr] =
|
||||
{
|
||||
[board_ahci_ign_iferr] = {
|
||||
AHCI_HFLAGS (AHCI_HFLAG_IGN_IRQ_IF_ERR),
|
||||
.flags = AHCI_FLAG_COMMON,
|
||||
.pio_mask = ATA_PIO4,
|
||||
.udma_mask = ATA_UDMA6,
|
||||
.port_ops = &ahci_ops,
|
||||
},
|
||||
[board_ahci_nosntf] =
|
||||
{
|
||||
[board_ahci_nosntf] = {
|
||||
AHCI_HFLAGS (AHCI_HFLAG_NO_SNTF),
|
||||
.flags = AHCI_FLAG_COMMON,
|
||||
.pio_mask = ATA_PIO4,
|
||||
.udma_mask = ATA_UDMA6,
|
||||
.port_ops = &ahci_ops,
|
||||
},
|
||||
[board_ahci_yes_fbs] =
|
||||
{
|
||||
[board_ahci_yes_fbs] = {
|
||||
AHCI_HFLAGS (AHCI_HFLAG_YES_FBS),
|
||||
.flags = AHCI_FLAG_COMMON,
|
||||
.pio_mask = ATA_PIO4,
|
||||
@@ -137,8 +133,7 @@ static const struct ata_port_info ahci_port_info[] = {
|
||||
.port_ops = &ahci_ops,
|
||||
},
|
||||
/* by chipsets */
|
||||
[board_ahci_mcp65] =
|
||||
{
|
||||
[board_ahci_mcp65] = {
|
||||
AHCI_HFLAGS (AHCI_HFLAG_NO_FPDMA_AA | AHCI_HFLAG_NO_PMP |
|
||||
AHCI_HFLAG_YES_NCQ),
|
||||
.flags = AHCI_FLAG_COMMON | ATA_FLAG_NO_DIPM,
|
||||
@@ -146,24 +141,21 @@ static const struct ata_port_info ahci_port_info[] = {
|
||||
.udma_mask = ATA_UDMA6,
|
||||
.port_ops = &ahci_ops,
|
||||
},
|
||||
[board_ahci_mcp77] =
|
||||
{
|
||||
[board_ahci_mcp77] = {
|
||||
AHCI_HFLAGS (AHCI_HFLAG_NO_FPDMA_AA | AHCI_HFLAG_NO_PMP),
|
||||
.flags = AHCI_FLAG_COMMON,
|
||||
.pio_mask = ATA_PIO4,
|
||||
.udma_mask = ATA_UDMA6,
|
||||
.port_ops = &ahci_ops,
|
||||
},
|
||||
[board_ahci_mcp89] =
|
||||
{
|
||||
[board_ahci_mcp89] = {
|
||||
AHCI_HFLAGS (AHCI_HFLAG_NO_FPDMA_AA),
|
||||
.flags = AHCI_FLAG_COMMON,
|
||||
.pio_mask = ATA_PIO4,
|
||||
.udma_mask = ATA_UDMA6,
|
||||
.port_ops = &ahci_ops,
|
||||
},
|
||||
[board_ahci_mv] =
|
||||
{
|
||||
[board_ahci_mv] = {
|
||||
AHCI_HFLAGS (AHCI_HFLAG_NO_NCQ | AHCI_HFLAG_NO_MSI |
|
||||
AHCI_HFLAG_MV_PATA | AHCI_HFLAG_NO_PMP),
|
||||
.flags = ATA_FLAG_SATA | ATA_FLAG_PIO_DMA,
|
||||
@@ -171,8 +163,7 @@ static const struct ata_port_info ahci_port_info[] = {
|
||||
.udma_mask = ATA_UDMA6,
|
||||
.port_ops = &ahci_ops,
|
||||
},
|
||||
[board_ahci_sb600] =
|
||||
{
|
||||
[board_ahci_sb600] = {
|
||||
AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL |
|
||||
AHCI_HFLAG_NO_MSI | AHCI_HFLAG_SECT255 |
|
||||
AHCI_HFLAG_32BIT_ONLY),
|
||||
@@ -181,16 +172,14 @@ static const struct ata_port_info ahci_port_info[] = {
|
||||
.udma_mask = ATA_UDMA6,
|
||||
.port_ops = &ahci_pmp_retry_srst_ops,
|
||||
},
|
||||
[board_ahci_sb700] = /* for SB700 and SB800 */
|
||||
{
|
||||
[board_ahci_sb700] = { /* for SB700 and SB800 */
|
||||
AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL),
|
||||
.flags = AHCI_FLAG_COMMON,
|
||||
.pio_mask = ATA_PIO4,
|
||||
.udma_mask = ATA_UDMA6,
|
||||
.port_ops = &ahci_pmp_retry_srst_ops,
|
||||
},
|
||||
[board_ahci_vt8251] =
|
||||
{
|
||||
[board_ahci_vt8251] = {
|
||||
AHCI_HFLAGS (AHCI_HFLAG_NO_NCQ | AHCI_HFLAG_NO_PMP),
|
||||
.flags = AHCI_FLAG_COMMON,
|
||||
.pio_mask = ATA_PIO4,
|
||||
@@ -776,6 +765,22 @@ static bool ahci_sb600_enable_64bit(struct pci_dev *pdev)
|
||||
DMI_MATCH(DMI_BOARD_NAME, "MS-7376"),
|
||||
},
|
||||
},
|
||||
/*
|
||||
* All BIOS versions for the MSI K9AGM2 (MS-7327) support
|
||||
* 64bit DMA.
|
||||
*
|
||||
* This board also had the typo mentioned above in the
|
||||
* Manufacturer DMI field (fixed in BIOS version 1.5), so
|
||||
* match on DMI_BOARD_VENDOR of "MICRO-STAR INTER" again.
|
||||
*/
|
||||
{
|
||||
.ident = "MSI K9AGM2",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR,
|
||||
"MICRO-STAR INTER"),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "MS-7327"),
|
||||
},
|
||||
},
|
||||
/*
|
||||
* All BIOS versions for the Asus M3A support 64bit DMA.
|
||||
* (all release versions from 0301 to 1206 were tested)
|
||||
@@ -1233,22 +1238,10 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
&ahci_sht);
|
||||
}
|
||||
|
||||
static int __init ahci_init(void)
|
||||
{
|
||||
return pci_register_driver(&ahci_pci_driver);
|
||||
}
|
||||
|
||||
static void __exit ahci_exit(void)
|
||||
{
|
||||
pci_unregister_driver(&ahci_pci_driver);
|
||||
}
|
||||
|
||||
module_pci_driver(ahci_pci_driver);
|
||||
|
||||
MODULE_AUTHOR("Jeff Garzik");
|
||||
MODULE_DESCRIPTION("AHCI SATA low-level driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DEVICE_TABLE(pci, ahci_pci_tbl);
|
||||
MODULE_VERSION(DRV_VERSION);
|
||||
|
||||
module_init(ahci_init);
|
||||
module_exit(ahci_exit);
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/gfp.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/pm.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/device.h>
|
||||
@@ -271,13 +272,10 @@ static int ahci_resume(struct device *dev)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct dev_pm_ops ahci_pm_ops = {
|
||||
.suspend = &ahci_suspend,
|
||||
.resume = &ahci_resume,
|
||||
};
|
||||
#endif
|
||||
|
||||
SIMPLE_DEV_PM_OPS(ahci_pm_ops, ahci_suspend, ahci_resume);
|
||||
|
||||
static const struct of_device_id ahci_of_match[] = {
|
||||
{ .compatible = "calxeda,hb-ahci", },
|
||||
{ .compatible = "snps,spear-ahci", },
|
||||
@@ -291,9 +289,7 @@ static struct platform_driver ahci_driver = {
|
||||
.name = "ahci",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = ahci_of_match,
|
||||
#ifdef CONFIG_PM
|
||||
.pm = &ahci_pm_ops,
|
||||
#endif
|
||||
},
|
||||
.id_table = ahci_devtype,
|
||||
};
|
||||
|
||||
@@ -255,17 +255,7 @@ static struct pci_driver ata_generic_pci_driver = {
|
||||
#endif
|
||||
};
|
||||
|
||||
static int __init ata_generic_init(void)
|
||||
{
|
||||
return pci_register_driver(&ata_generic_pci_driver);
|
||||
}
|
||||
|
||||
|
||||
static void __exit ata_generic_exit(void)
|
||||
{
|
||||
pci_unregister_driver(&ata_generic_pci_driver);
|
||||
}
|
||||
|
||||
module_pci_driver(ata_generic_pci_driver);
|
||||
|
||||
MODULE_AUTHOR("Alan Cox");
|
||||
MODULE_DESCRIPTION("low-level driver for generic ATA");
|
||||
@@ -273,7 +263,4 @@ MODULE_LICENSE("GPL");
|
||||
MODULE_DEVICE_TABLE(pci, ata_generic);
|
||||
MODULE_VERSION(DRV_VERSION);
|
||||
|
||||
module_init(ata_generic_init);
|
||||
module_exit(ata_generic_exit);
|
||||
|
||||
module_param(all_generic_ide, int, 0);
|
||||
|
||||
+292
-116
@@ -16,6 +16,7 @@
|
||||
#include <linux/libata.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <scsi/scsi_device.h>
|
||||
#include "libata.h"
|
||||
|
||||
@@ -48,62 +49,53 @@ static void ata_acpi_clear_gtf(struct ata_device *dev)
|
||||
}
|
||||
|
||||
/**
|
||||
* ata_acpi_associate_sata_port - associate SATA port with ACPI objects
|
||||
* @ap: target SATA port
|
||||
* ata_ap_acpi_handle - provide the acpi_handle for an ata_port
|
||||
* @ap: the acpi_handle returned will correspond to this port
|
||||
*
|
||||
* Look up ACPI objects associated with @ap and initialize acpi_handle
|
||||
* fields of @ap, the port and devices accordingly.
|
||||
*
|
||||
* LOCKING:
|
||||
* EH context.
|
||||
*
|
||||
* RETURNS:
|
||||
* 0 on success, -errno on failure.
|
||||
* Returns the acpi_handle for the ACPI namespace object corresponding to
|
||||
* the ata_port passed into the function, or NULL if no such object exists
|
||||
*/
|
||||
void ata_acpi_associate_sata_port(struct ata_port *ap)
|
||||
acpi_handle ata_ap_acpi_handle(struct ata_port *ap)
|
||||
{
|
||||
WARN_ON(!(ap->flags & ATA_FLAG_ACPI_SATA));
|
||||
if (ap->flags & ATA_FLAG_ACPI_SATA)
|
||||
return NULL;
|
||||
|
||||
if (!sata_pmp_attached(ap)) {
|
||||
u64 adr = SATA_ADR(ap->port_no, NO_PORT_MULT);
|
||||
|
||||
ap->link.device->acpi_handle =
|
||||
acpi_get_child(ap->host->acpi_handle, adr);
|
||||
} else {
|
||||
struct ata_link *link;
|
||||
|
||||
ap->link.device->acpi_handle = NULL;
|
||||
|
||||
ata_for_each_link(link, ap, EDGE) {
|
||||
u64 adr = SATA_ADR(ap->port_no, link->pmp);
|
||||
|
||||
link->device->acpi_handle =
|
||||
acpi_get_child(ap->host->acpi_handle, adr);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* If acpi bind operation has already happened, we can get the handle
|
||||
* for the port by checking the corresponding scsi_host device's
|
||||
* firmware node, otherwise we will need to find out the handle from
|
||||
* its parent's acpi node.
|
||||
*/
|
||||
if (ap->scsi_host)
|
||||
return DEVICE_ACPI_HANDLE(&ap->scsi_host->shost_gendev);
|
||||
else
|
||||
return acpi_get_child(DEVICE_ACPI_HANDLE(ap->host->dev),
|
||||
ap->port_no);
|
||||
}
|
||||
EXPORT_SYMBOL(ata_ap_acpi_handle);
|
||||
|
||||
static void ata_acpi_associate_ide_port(struct ata_port *ap)
|
||||
/**
|
||||
* ata_dev_acpi_handle - provide the acpi_handle for an ata_device
|
||||
* @dev: the acpi_device returned will correspond to this port
|
||||
*
|
||||
* Returns the acpi_handle for the ACPI namespace object corresponding to
|
||||
* the ata_device passed into the function, or NULL if no such object exists
|
||||
*/
|
||||
acpi_handle ata_dev_acpi_handle(struct ata_device *dev)
|
||||
{
|
||||
int max_devices, i;
|
||||
acpi_integer adr;
|
||||
struct ata_port *ap = dev->link->ap;
|
||||
|
||||
ap->acpi_handle = acpi_get_child(ap->host->acpi_handle, ap->port_no);
|
||||
if (!ap->acpi_handle)
|
||||
return;
|
||||
|
||||
max_devices = 1;
|
||||
if (ap->flags & ATA_FLAG_SLAVE_POSS)
|
||||
max_devices++;
|
||||
|
||||
for (i = 0; i < max_devices; i++) {
|
||||
struct ata_device *dev = &ap->link.device[i];
|
||||
|
||||
dev->acpi_handle = acpi_get_child(ap->acpi_handle, i);
|
||||
}
|
||||
|
||||
if (ata_acpi_gtm(ap, &ap->__acpi_init_gtm) == 0)
|
||||
ap->pflags |= ATA_PFLAG_INIT_GTM_VALID;
|
||||
if (ap->flags & ATA_FLAG_ACPI_SATA) {
|
||||
if (!sata_pmp_attached(ap))
|
||||
adr = SATA_ADR(ap->port_no, NO_PORT_MULT);
|
||||
else
|
||||
adr = SATA_ADR(ap->port_no, dev->link->pmp);
|
||||
return acpi_get_child(DEVICE_ACPI_HANDLE(ap->host->dev), adr);
|
||||
} else
|
||||
return acpi_get_child(ata_ap_acpi_handle(ap), dev->devno);
|
||||
}
|
||||
EXPORT_SYMBOL(ata_dev_acpi_handle);
|
||||
|
||||
/* @ap and @dev are the same as ata_acpi_handle_hotplug() */
|
||||
static void ata_acpi_detach_device(struct ata_port *ap, struct ata_device *dev)
|
||||
@@ -228,56 +220,6 @@ static const struct acpi_dock_ops ata_acpi_ap_dock_ops = {
|
||||
.uevent = ata_acpi_ap_uevent,
|
||||
};
|
||||
|
||||
/**
|
||||
* ata_acpi_associate - associate ATA host with ACPI objects
|
||||
* @host: target ATA host
|
||||
*
|
||||
* Look up ACPI objects associated with @host and initialize
|
||||
* acpi_handle fields of @host, its ports and devices accordingly.
|
||||
*
|
||||
* LOCKING:
|
||||
* EH context.
|
||||
*
|
||||
* RETURNS:
|
||||
* 0 on success, -errno on failure.
|
||||
*/
|
||||
void ata_acpi_associate(struct ata_host *host)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
if (!is_pci_dev(host->dev) || libata_noacpi)
|
||||
return;
|
||||
|
||||
host->acpi_handle = DEVICE_ACPI_HANDLE(host->dev);
|
||||
if (!host->acpi_handle)
|
||||
return;
|
||||
|
||||
for (i = 0; i < host->n_ports; i++) {
|
||||
struct ata_port *ap = host->ports[i];
|
||||
|
||||
if (host->ports[0]->flags & ATA_FLAG_ACPI_SATA)
|
||||
ata_acpi_associate_sata_port(ap);
|
||||
else
|
||||
ata_acpi_associate_ide_port(ap);
|
||||
|
||||
if (ap->acpi_handle) {
|
||||
/* we might be on a docking station */
|
||||
register_hotplug_dock_device(ap->acpi_handle,
|
||||
&ata_acpi_ap_dock_ops, ap);
|
||||
}
|
||||
|
||||
for (j = 0; j < ata_link_max_devices(&ap->link); j++) {
|
||||
struct ata_device *dev = &ap->link.device[j];
|
||||
|
||||
if (dev->acpi_handle) {
|
||||
/* we might be on a docking station */
|
||||
register_hotplug_dock_device(dev->acpi_handle,
|
||||
&ata_acpi_dev_dock_ops, dev);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ata_acpi_dissociate - dissociate ATA host from ACPI objects
|
||||
* @host: target ATA host
|
||||
@@ -299,7 +241,7 @@ void ata_acpi_dissociate(struct ata_host *host)
|
||||
struct ata_port *ap = host->ports[i];
|
||||
const struct ata_acpi_gtm *gtm = ata_acpi_init_gtm(ap);
|
||||
|
||||
if (ap->acpi_handle && gtm)
|
||||
if (ata_ap_acpi_handle(ap) && gtm)
|
||||
ata_acpi_stm(ap, gtm);
|
||||
}
|
||||
}
|
||||
@@ -324,7 +266,8 @@ int ata_acpi_gtm(struct ata_port *ap, struct ata_acpi_gtm *gtm)
|
||||
acpi_status status;
|
||||
int rc = 0;
|
||||
|
||||
status = acpi_evaluate_object(ap->acpi_handle, "_GTM", NULL, &output);
|
||||
status = acpi_evaluate_object(ata_ap_acpi_handle(ap), "_GTM", NULL,
|
||||
&output);
|
||||
|
||||
rc = -ENOENT;
|
||||
if (status == AE_NOT_FOUND)
|
||||
@@ -394,7 +337,8 @@ int ata_acpi_stm(struct ata_port *ap, const struct ata_acpi_gtm *stm)
|
||||
input.count = 3;
|
||||
input.pointer = in_params;
|
||||
|
||||
status = acpi_evaluate_object(ap->acpi_handle, "_STM", &input, NULL);
|
||||
status = acpi_evaluate_object(ata_ap_acpi_handle(ap), "_STM", &input,
|
||||
NULL);
|
||||
|
||||
if (status == AE_NOT_FOUND)
|
||||
return -ENOENT;
|
||||
@@ -451,7 +395,8 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf)
|
||||
__func__, ap->port_no);
|
||||
|
||||
/* _GTF has no input parameters */
|
||||
status = acpi_evaluate_object(dev->acpi_handle, "_GTF", NULL, &output);
|
||||
status = acpi_evaluate_object(ata_dev_acpi_handle(dev), "_GTF", NULL,
|
||||
&output);
|
||||
out_obj = dev->gtf_cache = output.pointer;
|
||||
|
||||
if (ACPI_FAILURE(status)) {
|
||||
@@ -817,7 +762,8 @@ static int ata_acpi_push_id(struct ata_device *dev)
|
||||
|
||||
/* It's OK for _SDD to be missing too. */
|
||||
swap_buf_le16(dev->id, ATA_ID_WORDS);
|
||||
status = acpi_evaluate_object(dev->acpi_handle, "_SDD", &input, NULL);
|
||||
status = acpi_evaluate_object(ata_dev_acpi_handle(dev), "_SDD", &input,
|
||||
NULL);
|
||||
swap_buf_le16(dev->id, ATA_ID_WORDS);
|
||||
|
||||
if (status == AE_NOT_FOUND)
|
||||
@@ -867,7 +813,7 @@ void ata_acpi_on_resume(struct ata_port *ap)
|
||||
const struct ata_acpi_gtm *gtm = ata_acpi_init_gtm(ap);
|
||||
struct ata_device *dev;
|
||||
|
||||
if (ap->acpi_handle && gtm) {
|
||||
if (ata_ap_acpi_handle(ap) && gtm) {
|
||||
/* _GTM valid */
|
||||
|
||||
/* restore timing parameters */
|
||||
@@ -907,23 +853,39 @@ void ata_acpi_on_resume(struct ata_port *ap)
|
||||
void ata_acpi_set_state(struct ata_port *ap, pm_message_t state)
|
||||
{
|
||||
struct ata_device *dev;
|
||||
|
||||
if (!ap->acpi_handle || (ap->flags & ATA_FLAG_ACPI_SATA))
|
||||
return;
|
||||
acpi_handle handle;
|
||||
int acpi_state;
|
||||
|
||||
/* channel first and then drives for power on and vica versa
|
||||
for power off */
|
||||
if (state.event == PM_EVENT_ON)
|
||||
acpi_bus_set_power(ap->acpi_handle, ACPI_STATE_D0);
|
||||
handle = ata_ap_acpi_handle(ap);
|
||||
if (handle && state.event == PM_EVENT_ON)
|
||||
acpi_bus_set_power(handle, ACPI_STATE_D0);
|
||||
|
||||
ata_for_each_dev(dev, &ap->link, ENABLED) {
|
||||
if (dev->acpi_handle)
|
||||
acpi_bus_set_power(dev->acpi_handle,
|
||||
state.event == PM_EVENT_ON ?
|
||||
ACPI_STATE_D0 : ACPI_STATE_D3);
|
||||
handle = ata_dev_acpi_handle(dev);
|
||||
if (!handle)
|
||||
continue;
|
||||
|
||||
if (state.event != PM_EVENT_ON) {
|
||||
acpi_state = acpi_pm_device_sleep_state(
|
||||
&dev->sdev->sdev_gendev, NULL, ACPI_STATE_D3);
|
||||
if (acpi_state > 0)
|
||||
acpi_bus_set_power(handle, acpi_state);
|
||||
/* TBD: need to check if it's runtime pm request */
|
||||
acpi_pm_device_run_wake(
|
||||
&dev->sdev->sdev_gendev, true);
|
||||
} else {
|
||||
/* Ditto */
|
||||
acpi_pm_device_run_wake(
|
||||
&dev->sdev->sdev_gendev, false);
|
||||
acpi_bus_set_power(handle, ACPI_STATE_D0);
|
||||
}
|
||||
}
|
||||
if (state.event != PM_EVENT_ON)
|
||||
acpi_bus_set_power(ap->acpi_handle, ACPI_STATE_D3);
|
||||
|
||||
handle = ata_ap_acpi_handle(ap);
|
||||
if (handle && state.event != PM_EVENT_ON)
|
||||
acpi_bus_set_power(handle, ACPI_STATE_D3);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -948,7 +910,7 @@ int ata_acpi_on_devcfg(struct ata_device *dev)
|
||||
int nr_executed = 0;
|
||||
int rc;
|
||||
|
||||
if (!dev->acpi_handle)
|
||||
if (!ata_dev_acpi_handle(dev))
|
||||
return 0;
|
||||
|
||||
/* do we need to do _GTF? */
|
||||
@@ -994,7 +956,6 @@ int ata_acpi_on_devcfg(struct ata_device *dev)
|
||||
}
|
||||
|
||||
ata_dev_warn(dev, "ACPI: failed the second time, disabled\n");
|
||||
dev->acpi_handle = NULL;
|
||||
|
||||
/* We can safely continue if no _GTF command has been executed
|
||||
* and port is not frozen.
|
||||
@@ -1018,3 +979,218 @@ void ata_acpi_on_disable(struct ata_device *dev)
|
||||
{
|
||||
ata_acpi_clear_gtf(dev);
|
||||
}
|
||||
|
||||
static void ata_acpi_wake_dev(acpi_handle handle, u32 event, void *context)
|
||||
{
|
||||
struct ata_device *ata_dev = context;
|
||||
|
||||
if (event == ACPI_NOTIFY_DEVICE_WAKE && ata_dev &&
|
||||
pm_runtime_suspended(&ata_dev->sdev->sdev_gendev))
|
||||
scsi_autopm_get_device(ata_dev->sdev);
|
||||
}
|
||||
|
||||
static void ata_acpi_add_pm_notifier(struct ata_device *dev)
|
||||
{
|
||||
struct acpi_device *acpi_dev;
|
||||
acpi_handle handle;
|
||||
acpi_status status;
|
||||
|
||||
handle = ata_dev_acpi_handle(dev);
|
||||
if (!handle)
|
||||
return;
|
||||
|
||||
status = acpi_bus_get_device(handle, &acpi_dev);
|
||||
if (ACPI_FAILURE(status))
|
||||
return;
|
||||
|
||||
if (dev->sdev->can_power_off) {
|
||||
acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY,
|
||||
ata_acpi_wake_dev, dev);
|
||||
device_set_run_wake(&dev->sdev->sdev_gendev, true);
|
||||
}
|
||||
}
|
||||
|
||||
static void ata_acpi_remove_pm_notifier(struct ata_device *dev)
|
||||
{
|
||||
struct acpi_device *acpi_dev;
|
||||
acpi_handle handle;
|
||||
acpi_status status;
|
||||
|
||||
handle = ata_dev_acpi_handle(dev);
|
||||
if (!handle)
|
||||
return;
|
||||
|
||||
status = acpi_bus_get_device(handle, &acpi_dev);
|
||||
if (ACPI_FAILURE(status))
|
||||
return;
|
||||
|
||||
if (dev->sdev->can_power_off) {
|
||||
device_set_run_wake(&dev->sdev->sdev_gendev, false);
|
||||
acpi_remove_notify_handler(handle, ACPI_SYSTEM_NOTIFY,
|
||||
ata_acpi_wake_dev);
|
||||
}
|
||||
}
|
||||
|
||||
static void ata_acpi_register_power_resource(struct ata_device *dev)
|
||||
{
|
||||
struct scsi_device *sdev = dev->sdev;
|
||||
acpi_handle handle;
|
||||
struct device *device;
|
||||
|
||||
handle = ata_dev_acpi_handle(dev);
|
||||
if (!handle)
|
||||
return;
|
||||
|
||||
device = &sdev->sdev_gendev;
|
||||
|
||||
acpi_power_resource_register_device(device, handle);
|
||||
}
|
||||
|
||||
static void ata_acpi_unregister_power_resource(struct ata_device *dev)
|
||||
{
|
||||
struct scsi_device *sdev = dev->sdev;
|
||||
acpi_handle handle;
|
||||
struct device *device;
|
||||
|
||||
handle = ata_dev_acpi_handle(dev);
|
||||
if (!handle)
|
||||
return;
|
||||
|
||||
device = &sdev->sdev_gendev;
|
||||
|
||||
acpi_power_resource_unregister_device(device, handle);
|
||||
}
|
||||
|
||||
void ata_acpi_bind(struct ata_device *dev)
|
||||
{
|
||||
ata_acpi_add_pm_notifier(dev);
|
||||
ata_acpi_register_power_resource(dev);
|
||||
}
|
||||
|
||||
void ata_acpi_unbind(struct ata_device *dev)
|
||||
{
|
||||
ata_acpi_remove_pm_notifier(dev);
|
||||
ata_acpi_unregister_power_resource(dev);
|
||||
}
|
||||
|
||||
static int compat_pci_ata(struct ata_port *ap)
|
||||
{
|
||||
struct device *dev = ap->tdev.parent;
|
||||
struct pci_dev *pdev;
|
||||
|
||||
if (!is_pci_dev(dev))
|
||||
return 0;
|
||||
|
||||
pdev = to_pci_dev(dev);
|
||||
|
||||
if ((pdev->class >> 8) != PCI_CLASS_STORAGE_SATA &&
|
||||
(pdev->class >> 8) != PCI_CLASS_STORAGE_IDE)
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int ata_acpi_bind_host(struct ata_port *ap, acpi_handle *handle)
|
||||
{
|
||||
if (ap->flags & ATA_FLAG_ACPI_SATA)
|
||||
return -ENODEV;
|
||||
|
||||
*handle = acpi_get_child(DEVICE_ACPI_HANDLE(ap->tdev.parent),
|
||||
ap->port_no);
|
||||
|
||||
if (!*handle)
|
||||
return -ENODEV;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ata_acpi_bind_device(struct ata_port *ap, struct scsi_device *sdev,
|
||||
acpi_handle *handle)
|
||||
{
|
||||
struct ata_device *ata_dev;
|
||||
acpi_status status;
|
||||
struct acpi_device *acpi_dev;
|
||||
struct acpi_device_power_state *states;
|
||||
|
||||
if (ap->flags & ATA_FLAG_ACPI_SATA)
|
||||
ata_dev = &ap->link.device[sdev->channel];
|
||||
else
|
||||
ata_dev = &ap->link.device[sdev->id];
|
||||
|
||||
*handle = ata_dev_acpi_handle(ata_dev);
|
||||
|
||||
if (!*handle)
|
||||
return -ENODEV;
|
||||
|
||||
status = acpi_bus_get_device(*handle, &acpi_dev);
|
||||
if (ACPI_FAILURE(status))
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* If firmware has _PS3 or _PR3 for this device,
|
||||
* and this ata ODD device support device attention,
|
||||
* it means this device can be powered off
|
||||
*/
|
||||
states = acpi_dev->power.states;
|
||||
if ((states[ACPI_STATE_D3_HOT].flags.valid ||
|
||||
states[ACPI_STATE_D3_COLD].flags.explicit_set) &&
|
||||
ata_dev->flags & ATA_DFLAG_DA)
|
||||
sdev->can_power_off = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int is_ata_port(const struct device *dev)
|
||||
{
|
||||
return dev->type == &ata_port_type;
|
||||
}
|
||||
|
||||
static struct ata_port *dev_to_ata_port(struct device *dev)
|
||||
{
|
||||
while (!is_ata_port(dev)) {
|
||||
if (!dev->parent)
|
||||
return NULL;
|
||||
dev = dev->parent;
|
||||
}
|
||||
return to_ata_port(dev);
|
||||
}
|
||||
|
||||
static int ata_acpi_find_device(struct device *dev, acpi_handle *handle)
|
||||
{
|
||||
struct ata_port *ap = dev_to_ata_port(dev);
|
||||
|
||||
if (!ap)
|
||||
return -ENODEV;
|
||||
|
||||
if (!compat_pci_ata(ap))
|
||||
return -ENODEV;
|
||||
|
||||
if (scsi_is_host_device(dev))
|
||||
return ata_acpi_bind_host(ap, handle);
|
||||
else if (scsi_is_sdev_device(dev)) {
|
||||
struct scsi_device *sdev = to_scsi_device(dev);
|
||||
|
||||
return ata_acpi_bind_device(ap, sdev, handle);
|
||||
} else
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static int ata_acpi_find_dummy(struct device *dev, acpi_handle *handle)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static struct acpi_bus_type ata_acpi_bus = {
|
||||
.find_bridge = ata_acpi_find_dummy,
|
||||
.find_device = ata_acpi_find_device,
|
||||
};
|
||||
|
||||
int ata_acpi_register(void)
|
||||
{
|
||||
return scsi_register_acpi_bus_type(&ata_acpi_bus);
|
||||
}
|
||||
|
||||
void ata_acpi_unregister(void)
|
||||
{
|
||||
scsi_unregister_acpi_bus_type(&ata_acpi_bus);
|
||||
}
|
||||
|
||||
@@ -2376,6 +2376,9 @@ int ata_dev_configure(struct ata_device *dev)
|
||||
dma_dir_string = ", DMADIR";
|
||||
}
|
||||
|
||||
if (ata_id_has_da(dev->id))
|
||||
dev->flags |= ATA_DFLAG_DA;
|
||||
|
||||
/* print device info to dmesg */
|
||||
if (ata_msg_drv(ap) && print_info)
|
||||
ata_dev_info(dev,
|
||||
@@ -4128,6 +4131,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
|
||||
|
||||
/* Devices which aren't very happy with higher link speeds */
|
||||
{ "WD My Book", NULL, ATA_HORKAGE_1_5_GBPS, },
|
||||
{ "Seagate FreeAgent GoFlex", NULL, ATA_HORKAGE_1_5_GBPS, },
|
||||
|
||||
/*
|
||||
* Devices which choke on SETXFER. Applies only if both the
|
||||
@@ -5290,8 +5294,6 @@ static int ata_port_request_pm(struct ata_port *ap, pm_message_t mesg,
|
||||
return rc;
|
||||
}
|
||||
|
||||
#define to_ata_port(d) container_of(d, struct ata_port, tdev)
|
||||
|
||||
static int ata_port_suspend_common(struct device *dev, pm_message_t mesg)
|
||||
{
|
||||
struct ata_port *ap = to_ata_port(dev);
|
||||
@@ -6053,9 +6055,6 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
|
||||
if (rc)
|
||||
goto err_tadd;
|
||||
|
||||
/* associate with ACPI nodes */
|
||||
ata_acpi_associate(host);
|
||||
|
||||
/* set cable, sata_spd_limit and report */
|
||||
for (i = 0; i < host->n_ports; i++) {
|
||||
struct ata_port *ap = host->ports[i];
|
||||
@@ -6515,6 +6514,8 @@ static int __init ata_init(void)
|
||||
|
||||
ata_parse_force_param();
|
||||
|
||||
ata_acpi_register();
|
||||
|
||||
rc = ata_sff_init();
|
||||
if (rc) {
|
||||
kfree(ata_force_tbl);
|
||||
@@ -6541,6 +6542,7 @@ static void __exit ata_exit(void)
|
||||
ata_release_transport(ata_scsi_transport_template);
|
||||
libata_transport_exit();
|
||||
ata_sff_exit();
|
||||
ata_acpi_unregister();
|
||||
kfree(ata_force_tbl);
|
||||
}
|
||||
|
||||
|
||||
@@ -419,7 +419,7 @@ int ata_ering_map(struct ata_ering *ering,
|
||||
return rc;
|
||||
}
|
||||
|
||||
int ata_ering_clear_cb(struct ata_ering_entry *ent, void *void_arg)
|
||||
static int ata_ering_clear_cb(struct ata_ering_entry *ent, void *void_arg)
|
||||
{
|
||||
ent->eflags |= ATA_EFLAG_OLD_ER;
|
||||
return 0;
|
||||
|
||||
@@ -529,8 +529,6 @@ int sata_pmp_attach(struct ata_device *dev)
|
||||
ata_for_each_link(tlink, ap, EDGE)
|
||||
sata_link_init_spd(tlink);
|
||||
|
||||
ata_acpi_associate_sata_port(ap);
|
||||
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
@@ -570,8 +568,6 @@ static void sata_pmp_detach(struct ata_device *dev)
|
||||
ap->nr_pmp_links = 0;
|
||||
link->pmp = 0;
|
||||
spin_unlock_irqrestore(ap->lock, flags);
|
||||
|
||||
ata_acpi_associate_sata_port(ap);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -3445,6 +3445,7 @@ void ata_scsi_scan_host(struct ata_port *ap, int sync)
|
||||
if (!IS_ERR(sdev)) {
|
||||
dev->sdev = sdev;
|
||||
scsi_device_put(sdev);
|
||||
ata_acpi_bind(dev);
|
||||
} else {
|
||||
dev->sdev = NULL;
|
||||
}
|
||||
@@ -3541,6 +3542,8 @@ static void ata_scsi_remove_dev(struct ata_device *dev)
|
||||
mutex_lock(&ap->scsi_host->scan_mutex);
|
||||
spin_lock_irqsave(ap->lock, flags);
|
||||
|
||||
ata_acpi_unbind(dev);
|
||||
|
||||
/* clearing dev->sdev is protected by host lock */
|
||||
sdev = dev->sdev;
|
||||
dev->sdev = NULL;
|
||||
|
||||
@@ -232,7 +232,7 @@ static void ata_tport_release(struct device *dev)
|
||||
* Returns:
|
||||
* %1 if the device represents a ATA Port, %0 else
|
||||
*/
|
||||
int ata_is_port(const struct device *dev)
|
||||
static int ata_is_port(const struct device *dev)
|
||||
{
|
||||
return dev->release == ata_tport_release;
|
||||
}
|
||||
@@ -355,7 +355,7 @@ static void ata_tlink_release(struct device *dev)
|
||||
* Returns:
|
||||
* %1 if the device represents a ATA link, %0 else
|
||||
*/
|
||||
int ata_is_link(const struct device *dev)
|
||||
static int ata_is_link(const struct device *dev)
|
||||
{
|
||||
return dev->release == ata_tlink_release;
|
||||
}
|
||||
@@ -572,7 +572,7 @@ static void ata_tdev_release(struct device *dev)
|
||||
* Returns:
|
||||
* %1 if the device represents a ATA device, %0 else
|
||||
*/
|
||||
int ata_is_ata_dev(const struct device *dev)
|
||||
static int ata_is_ata_dev(const struct device *dev)
|
||||
{
|
||||
return dev->release == ata_tdev_release;
|
||||
}
|
||||
|
||||
+10
-5
@@ -107,21 +107,22 @@ extern const char *sata_spd_string(unsigned int spd);
|
||||
extern int ata_port_probe(struct ata_port *ap);
|
||||
extern void __ata_port_probe(struct ata_port *ap);
|
||||
|
||||
#define to_ata_port(d) container_of(d, struct ata_port, tdev)
|
||||
|
||||
/* libata-acpi.c */
|
||||
#ifdef CONFIG_ATA_ACPI
|
||||
extern unsigned int ata_acpi_gtf_filter;
|
||||
|
||||
extern void ata_acpi_associate_sata_port(struct ata_port *ap);
|
||||
extern void ata_acpi_associate(struct ata_host *host);
|
||||
extern void ata_acpi_dissociate(struct ata_host *host);
|
||||
extern int ata_acpi_on_suspend(struct ata_port *ap);
|
||||
extern void ata_acpi_on_resume(struct ata_port *ap);
|
||||
extern int ata_acpi_on_devcfg(struct ata_device *dev);
|
||||
extern void ata_acpi_on_disable(struct ata_device *dev);
|
||||
extern void ata_acpi_set_state(struct ata_port *ap, pm_message_t state);
|
||||
extern int ata_acpi_register(void);
|
||||
extern void ata_acpi_unregister(void);
|
||||
extern void ata_acpi_bind(struct ata_device *dev);
|
||||
extern void ata_acpi_unbind(struct ata_device *dev);
|
||||
#else
|
||||
static inline void ata_acpi_associate_sata_port(struct ata_port *ap) { }
|
||||
static inline void ata_acpi_associate(struct ata_host *host) { }
|
||||
static inline void ata_acpi_dissociate(struct ata_host *host) { }
|
||||
static inline int ata_acpi_on_suspend(struct ata_port *ap) { return 0; }
|
||||
static inline void ata_acpi_on_resume(struct ata_port *ap) { }
|
||||
@@ -129,6 +130,10 @@ static inline int ata_acpi_on_devcfg(struct ata_device *dev) { return 0; }
|
||||
static inline void ata_acpi_on_disable(struct ata_device *dev) { }
|
||||
static inline void ata_acpi_set_state(struct ata_port *ap,
|
||||
pm_message_t state) { }
|
||||
static inline int ata_acpi_register(void) { return 0; }
|
||||
static inline void ata_acpi_unregister(void) { }
|
||||
static inline void ata_acpi_bind(struct ata_device *dev) { }
|
||||
static inline void ata_acpi_unbind(struct ata_device *dev) { }
|
||||
#endif
|
||||
|
||||
/* libata-scsi.c */
|
||||
|
||||
+3
-15
@@ -39,7 +39,7 @@ static int pacpi_pre_reset(struct ata_link *link, unsigned long deadline)
|
||||
{
|
||||
struct ata_port *ap = link->ap;
|
||||
struct pata_acpi *acpi = ap->private_data;
|
||||
if (ap->acpi_handle == NULL || ata_acpi_gtm(ap, &acpi->gtm) < 0)
|
||||
if (ata_ap_acpi_handle(ap) == NULL || ata_acpi_gtm(ap, &acpi->gtm) < 0)
|
||||
return -ENODEV;
|
||||
|
||||
return ata_sff_prereset(link, deadline);
|
||||
@@ -195,7 +195,7 @@ static int pacpi_port_start(struct ata_port *ap)
|
||||
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
|
||||
struct pata_acpi *acpi;
|
||||
|
||||
if (ap->acpi_handle == NULL)
|
||||
if (ata_ap_acpi_handle(ap) == NULL)
|
||||
return -ENODEV;
|
||||
|
||||
acpi = ap->private_data = devm_kzalloc(&pdev->dev, sizeof(struct pata_acpi), GFP_KERNEL);
|
||||
@@ -273,22 +273,10 @@ static struct pci_driver pacpi_pci_driver = {
|
||||
#endif
|
||||
};
|
||||
|
||||
static int __init pacpi_init(void)
|
||||
{
|
||||
return pci_register_driver(&pacpi_pci_driver);
|
||||
}
|
||||
|
||||
static void __exit pacpi_exit(void)
|
||||
{
|
||||
pci_unregister_driver(&pacpi_pci_driver);
|
||||
}
|
||||
|
||||
module_init(pacpi_init);
|
||||
module_exit(pacpi_exit);
|
||||
module_pci_driver(pacpi_pci_driver);
|
||||
|
||||
MODULE_AUTHOR("Alan Cox");
|
||||
MODULE_DESCRIPTION("SCSI low-level driver for ATA in ACPI mode");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DEVICE_TABLE(pci, pacpi_pci_tbl);
|
||||
MODULE_VERSION(DRV_VERSION);
|
||||
|
||||
|
||||
+1
-12
@@ -632,21 +632,10 @@ static struct pci_driver amd_pci_driver = {
|
||||
#endif
|
||||
};
|
||||
|
||||
static int __init amd_init(void)
|
||||
{
|
||||
return pci_register_driver(&amd_pci_driver);
|
||||
}
|
||||
|
||||
static void __exit amd_exit(void)
|
||||
{
|
||||
pci_unregister_driver(&amd_pci_driver);
|
||||
}
|
||||
module_pci_driver(amd_pci_driver);
|
||||
|
||||
MODULE_AUTHOR("Alan Cox");
|
||||
MODULE_DESCRIPTION("low-level driver for AMD and Nvidia PATA IDE");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DEVICE_TABLE(pci, amd);
|
||||
MODULE_VERSION(DRV_VERSION);
|
||||
|
||||
module_init(amd_init);
|
||||
module_exit(amd_exit);
|
||||
|
||||
@@ -451,18 +451,7 @@ static struct pci_driver artop_pci_driver = {
|
||||
#endif
|
||||
};
|
||||
|
||||
static int __init artop_init(void)
|
||||
{
|
||||
return pci_register_driver(&artop_pci_driver);
|
||||
}
|
||||
|
||||
static void __exit artop_exit(void)
|
||||
{
|
||||
pci_unregister_driver(&artop_pci_driver);
|
||||
}
|
||||
|
||||
module_init(artop_init);
|
||||
module_exit(artop_exit);
|
||||
module_pci_driver(artop_pci_driver);
|
||||
|
||||
MODULE_AUTHOR("Alan Cox, Bartlomiej Zolnierkiewicz");
|
||||
MODULE_DESCRIPTION("SCSI low-level driver for ARTOP PATA");
|
||||
|
||||
@@ -289,22 +289,10 @@ static struct pci_driver atiixp_pci_driver = {
|
||||
#endif
|
||||
};
|
||||
|
||||
static int __init atiixp_init(void)
|
||||
{
|
||||
return pci_register_driver(&atiixp_pci_driver);
|
||||
}
|
||||
|
||||
|
||||
static void __exit atiixp_exit(void)
|
||||
{
|
||||
pci_unregister_driver(&atiixp_pci_driver);
|
||||
}
|
||||
module_pci_driver(atiixp_pci_driver);
|
||||
|
||||
MODULE_AUTHOR("Alan Cox");
|
||||
MODULE_DESCRIPTION("low-level driver for ATI IXP200/300/400");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DEVICE_TABLE(pci, atiixp);
|
||||
MODULE_VERSION(DRV_VERSION);
|
||||
|
||||
module_init(atiixp_init);
|
||||
module_exit(atiixp_exit);
|
||||
|
||||
@@ -565,21 +565,10 @@ static struct pci_driver atp867x_driver = {
|
||||
#endif
|
||||
};
|
||||
|
||||
static int __init atp867x_init(void)
|
||||
{
|
||||
return pci_register_driver(&atp867x_driver);
|
||||
}
|
||||
|
||||
static void __exit atp867x_exit(void)
|
||||
{
|
||||
pci_unregister_driver(&atp867x_driver);
|
||||
}
|
||||
module_pci_driver(atp867x_driver);
|
||||
|
||||
MODULE_AUTHOR("John(Jung-Ik) Lee, Google Inc.");
|
||||
MODULE_DESCRIPTION("low level driver for Artop/Acard 867x ATA controller");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DEVICE_TABLE(pci, atp867x_pci_tbl);
|
||||
MODULE_VERSION(DRV_VERSION);
|
||||
|
||||
module_init(atp867x_init);
|
||||
module_exit(atp867x_exit);
|
||||
|
||||
@@ -263,21 +263,10 @@ static struct pci_driver cmd640_pci_driver = {
|
||||
#endif
|
||||
};
|
||||
|
||||
static int __init cmd640_init(void)
|
||||
{
|
||||
return pci_register_driver(&cmd640_pci_driver);
|
||||
}
|
||||
|
||||
static void __exit cmd640_exit(void)
|
||||
{
|
||||
pci_unregister_driver(&cmd640_pci_driver);
|
||||
}
|
||||
module_pci_driver(cmd640_pci_driver);
|
||||
|
||||
MODULE_AUTHOR("Alan Cox");
|
||||
MODULE_DESCRIPTION("low-level driver for CMD640 PATA controllers");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DEVICE_TABLE(pci, cmd640);
|
||||
MODULE_VERSION(DRV_VERSION);
|
||||
|
||||
module_init(cmd640_init);
|
||||
module_exit(cmd640_exit);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user