Patch 2.6.32.33 to 2.6.32.35
/drivers/ata/libata-core.c
blob:d4f7f99ccdd7b0f09dde41d18c7b8cbe7f3fc64c -> blob:91fed3c93d660a8e7d2934e21142c3d1a8dfa6a2
--- drivers/ata/libata-core.c
+++ drivers/ata/libata-core.c
@@ -159,10 +159,6 @@ int libata_allow_tpm = 0;
module_param_named(allow_tpm, libata_allow_tpm, int, 0444);
MODULE_PARM_DESC(allow_tpm, "Permit the use of TPM commands (0=off [default], 1=on)");
-static int atapi_an;
-module_param(atapi_an, int, 0444);
-MODULE_PARM_DESC(atapi_an, "Enable ATAPI AN media presence notification (0=0ff [default], 1=on)");
-
MODULE_AUTHOR("Jeff Garzik");
MODULE_DESCRIPTION("Library module for ATA devices");
MODULE_LICENSE("GPL");
@@ -2574,8 +2570,7 @@ int ata_dev_configure(struct ata_device
* to enable ATAPI AN to discern between PHY status
* changed notifications and ATAPI ANs.
*/
- if (atapi_an &&
- (ap->flags & ATA_FLAG_AN) && ata_id_has_atapi_AN(id) &&
+ if ((ap->flags & ATA_FLAG_AN) && ata_id_has_atapi_AN(id) &&
(!sata_pmp_attached(ap) ||
sata_scr_read(&ap->link, SCR_NOTIFICATION, &sntf) == 0)) {
unsigned int err_mask;
@@ -4353,9 +4348,6 @@ static const struct ata_blacklist_entry
{ "HTS541080G9SA00", "MB4OC60D", ATA_HORKAGE_NONCQ, },
{ "HTS541010G9SA00", "MBZOC60D", ATA_HORKAGE_NONCQ, },
- /* https://bugzilla.kernel.org/show_bug.cgi?id=15573 */
- { "C300-CTFDDAC128MAG", "0001", ATA_HORKAGE_NONCQ, },
-
/* devices which puke on READ_NATIVE_MAX */
{ "HDS724040KLSA80", "KFAOA20N", ATA_HORKAGE_BROKEN_HPA, },
{ "WDC WD3200JD-00KLB0", "WD-WCAMR1130137", ATA_HORKAGE_BROKEN_HPA },
@@ -5016,6 +5008,9 @@ static void ata_verify_xfer(struct ata_q
{
struct ata_device *dev = qc->dev;
+ if (ata_tag_internal(qc->tag))
+ return;
+
if (ata_is_nodata(qc->tf.protocol))
return;
@@ -5059,23 +5054,14 @@ void ata_qc_complete(struct ata_queued_c
if (unlikely(qc->err_mask))
qc->flags |= ATA_QCFLAG_FAILED;
- /*
- * Finish internal commands without any further processing
- * and always with the result TF filled.
- */
- if (unlikely(ata_tag_internal(qc->tag))) {
- fill_result_tf(qc);
- __ata_qc_complete(qc);
- return;
- }
-
- /*
- * Non-internal qc has failed. Fill the result TF and
- * summon EH.
- */
if (unlikely(qc->flags & ATA_QCFLAG_FAILED)) {
+ /* always fill result TF for failed qc */
fill_result_tf(qc);
- ata_qc_schedule_eh(qc);
+
+ if (!ata_tag_internal(qc->tag))
+ ata_qc_schedule_eh(qc);
+ else
+ __ata_qc_complete(qc);
return;
}
@@ -5510,7 +5496,6 @@ static int ata_host_request_pm(struct at
*/
int ata_host_suspend(struct ata_host *host, pm_message_t mesg)
{
- unsigned int ehi_flags = ATA_EHI_QUIET;
int rc;
/*
@@ -5519,18 +5504,7 @@ int ata_host_suspend(struct ata_host *ho
*/
ata_lpm_enable(host);
- /*
- * On some hardware, device fails to respond after spun down
- * for suspend. As the device won't be used before being
- * resumed, we don't need to touch the device. Ask EH to skip
- * the usual stuff and proceed directly to suspend.
- *
- * http://thread.gmane.org/gmane.linux.ide/46764
- */
- if (mesg.event == PM_EVENT_SUSPEND)
- ehi_flags |= ATA_EHI_NO_AUTOPSY | ATA_EHI_NO_RECOVERY;
-
- rc = ata_host_request_pm(host, mesg, 0, ehi_flags, 1);
+ rc = ata_host_request_pm(host, mesg, 0, ATA_EHI_QUIET, 1);
if (rc == 0)
host->dev->power.power_state = mesg;
return rc;