diff options
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r-- | drivers/ata/libata-core.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index fbc24358ada0..4bbe31f98ef8 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -106,14 +106,15 @@ static struct ata_force_ent *ata_force_tbl; | |||
106 | static int ata_force_tbl_size; | 106 | static int ata_force_tbl_size; |
107 | 107 | ||
108 | static char ata_force_param_buf[PAGE_SIZE] __initdata; | 108 | static char ata_force_param_buf[PAGE_SIZE] __initdata; |
109 | module_param_string(force, ata_force_param_buf, sizeof(ata_force_param_buf), 0444); | 109 | /* param_buf is thrown away after initialization, disallow read */ |
110 | module_param_string(force, ata_force_param_buf, sizeof(ata_force_param_buf), 0); | ||
110 | MODULE_PARM_DESC(force, "Force ATA configurations including cable type, link speed and transfer mode (see Documentation/kernel-parameters.txt for details)"); | 111 | MODULE_PARM_DESC(force, "Force ATA configurations including cable type, link speed and transfer mode (see Documentation/kernel-parameters.txt for details)"); |
111 | 112 | ||
112 | int atapi_enabled = 1; | 113 | int atapi_enabled = 1; |
113 | module_param(atapi_enabled, int, 0444); | 114 | module_param(atapi_enabled, int, 0444); |
114 | MODULE_PARM_DESC(atapi_enabled, "Enable discovery of ATAPI devices (0=off, 1=on)"); | 115 | MODULE_PARM_DESC(atapi_enabled, "Enable discovery of ATAPI devices (0=off, 1=on)"); |
115 | 116 | ||
116 | int atapi_dmadir = 0; | 117 | static int atapi_dmadir = 0; |
117 | module_param(atapi_dmadir, int, 0444); | 118 | module_param(atapi_dmadir, int, 0444); |
118 | MODULE_PARM_DESC(atapi_dmadir, "Enable ATAPI DMADIR bridge support (0=off, 1=on)"); | 119 | MODULE_PARM_DESC(atapi_dmadir, "Enable ATAPI DMADIR bridge support (0=off, 1=on)"); |
119 | 120 | ||
@@ -1719,7 +1720,7 @@ void ata_port_flush_task(struct ata_port *ap) | |||
1719 | cancel_rearming_delayed_work(&ap->port_task); | 1720 | cancel_rearming_delayed_work(&ap->port_task); |
1720 | 1721 | ||
1721 | if (ata_msg_ctl(ap)) | 1722 | if (ata_msg_ctl(ap)) |
1722 | ata_port_printk(ap, KERN_DEBUG, "%s: EXIT\n", __FUNCTION__); | 1723 | ata_port_printk(ap, KERN_DEBUG, "%s: EXIT\n", __func__); |
1723 | } | 1724 | } |
1724 | 1725 | ||
1725 | static void ata_qc_complete_internal(struct ata_queued_cmd *qc) | 1726 | static void ata_qc_complete_internal(struct ata_queued_cmd *qc) |
@@ -2056,7 +2057,7 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class, | |||
2056 | int rc; | 2057 | int rc; |
2057 | 2058 | ||
2058 | if (ata_msg_ctl(ap)) | 2059 | if (ata_msg_ctl(ap)) |
2059 | ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER\n", __FUNCTION__); | 2060 | ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER\n", __func__); |
2060 | 2061 | ||
2061 | ata_dev_select(ap, dev->devno, 1, 1); /* select device 0/1 */ | 2062 | ata_dev_select(ap, dev->devno, 1, 1); /* select device 0/1 */ |
2062 | retry: | 2063 | retry: |
@@ -2253,12 +2254,12 @@ int ata_dev_configure(struct ata_device *dev) | |||
2253 | 2254 | ||
2254 | if (!ata_dev_enabled(dev) && ata_msg_info(ap)) { | 2255 | if (!ata_dev_enabled(dev) && ata_msg_info(ap)) { |
2255 | ata_dev_printk(dev, KERN_INFO, "%s: ENTER/EXIT -- nodev\n", | 2256 | ata_dev_printk(dev, KERN_INFO, "%s: ENTER/EXIT -- nodev\n", |
2256 | __FUNCTION__); | 2257 | __func__); |
2257 | return 0; | 2258 | return 0; |
2258 | } | 2259 | } |
2259 | 2260 | ||
2260 | if (ata_msg_probe(ap)) | 2261 | if (ata_msg_probe(ap)) |
2261 | ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER\n", __FUNCTION__); | 2262 | ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER\n", __func__); |
2262 | 2263 | ||
2263 | /* set horkage */ | 2264 | /* set horkage */ |
2264 | dev->horkage |= ata_dev_blacklisted(dev); | 2265 | dev->horkage |= ata_dev_blacklisted(dev); |
@@ -2279,7 +2280,7 @@ int ata_dev_configure(struct ata_device *dev) | |||
2279 | ata_dev_printk(dev, KERN_DEBUG, | 2280 | ata_dev_printk(dev, KERN_DEBUG, |
2280 | "%s: cfg 49:%04x 82:%04x 83:%04x 84:%04x " | 2281 | "%s: cfg 49:%04x 82:%04x 83:%04x 84:%04x " |
2281 | "85:%04x 86:%04x 87:%04x 88:%04x\n", | 2282 | "85:%04x 86:%04x 87:%04x 88:%04x\n", |
2282 | __FUNCTION__, | 2283 | __func__, |
2283 | id[49], id[82], id[83], id[84], | 2284 | id[49], id[82], id[83], id[84], |
2284 | id[85], id[86], id[87], id[88]); | 2285 | id[85], id[86], id[87], id[88]); |
2285 | 2286 | ||
@@ -2511,13 +2512,13 @@ int ata_dev_configure(struct ata_device *dev) | |||
2511 | 2512 | ||
2512 | if (ata_msg_probe(ap)) | 2513 | if (ata_msg_probe(ap)) |
2513 | ata_dev_printk(dev, KERN_DEBUG, "%s: EXIT, drv_stat = 0x%x\n", | 2514 | ata_dev_printk(dev, KERN_DEBUG, "%s: EXIT, drv_stat = 0x%x\n", |
2514 | __FUNCTION__, ata_chk_status(ap)); | 2515 | __func__, ata_chk_status(ap)); |
2515 | return 0; | 2516 | return 0; |
2516 | 2517 | ||
2517 | err_out_nosup: | 2518 | err_out_nosup: |
2518 | if (ata_msg_probe(ap)) | 2519 | if (ata_msg_probe(ap)) |
2519 | ata_dev_printk(dev, KERN_DEBUG, | 2520 | ata_dev_printk(dev, KERN_DEBUG, |
2520 | "%s: EXIT, err\n", __FUNCTION__); | 2521 | "%s: EXIT, err\n", __func__); |
2521 | return rc; | 2522 | return rc; |
2522 | } | 2523 | } |
2523 | 2524 | ||
@@ -6567,6 +6568,8 @@ int ata_host_suspend(struct ata_host *host, pm_message_t mesg) | |||
6567 | ata_lpm_enable(host); | 6568 | ata_lpm_enable(host); |
6568 | 6569 | ||
6569 | rc = ata_host_request_pm(host, mesg, 0, ATA_EHI_QUIET, 1); | 6570 | rc = ata_host_request_pm(host, mesg, 0, ATA_EHI_QUIET, 1); |
6571 | if (rc == 0) | ||
6572 | host->dev->power.power_state = mesg; | ||
6570 | return rc; | 6573 | return rc; |
6571 | } | 6574 | } |
6572 | 6575 | ||
@@ -6585,6 +6588,7 @@ void ata_host_resume(struct ata_host *host) | |||
6585 | { | 6588 | { |
6586 | ata_host_request_pm(host, PMSG_ON, ATA_EH_SOFTRESET, | 6589 | ata_host_request_pm(host, PMSG_ON, ATA_EH_SOFTRESET, |
6587 | ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET, 0); | 6590 | ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET, 0); |
6591 | host->dev->power.power_state = PMSG_ON; | ||
6588 | 6592 | ||
6589 | /* reenable link pm */ | 6593 | /* reenable link pm */ |
6590 | ata_lpm_disable(host); | 6594 | ata_lpm_disable(host); |