Initial INC MR3 commit with EVO/BRAVO included and majority of the compile warnings ...
/drivers/ata/libata-eh.c
blob:7d8d3c3b4c80b09dbf5f9d7742094cffd2f212c6 -> blob:fa9bed06b397b3c845e75a3d1820df8e524a4a27
--- drivers/ata/libata-eh.c
+++ drivers/ata/libata-eh.c
@@ -870,6 +870,8 @@ static void ata_eh_set_pending(struct at
void ata_qc_schedule_eh(struct ata_queued_cmd *qc)
{
struct ata_port *ap = qc->ap;
+ struct request_queue *q = qc->scsicmd->device->request_queue;
+ unsigned long flags;
WARN_ON(!ap->ops->error_handler);
@@ -881,7 +883,9 @@ void ata_qc_schedule_eh(struct ata_queue
* Note that ATA_QCFLAG_FAILED is unconditionally set after
* this function completes.
*/
+ spin_lock_irqsave(q->queue_lock, flags);
blk_abort_request(qc->scsicmd->request);
+ spin_unlock_irqrestore(q->queue_lock, flags);
}
/**
@@ -1615,6 +1619,7 @@ void ata_eh_analyze_ncq_error(struct ata
}
/* okay, this error is ours */
+ memset(&tf, 0, sizeof(tf));
rc = ata_eh_read_log_10h(dev, &tag, &tf);
if (rc) {
ata_link_printk(link, KERN_ERR, "failed to read log page 10h "
@@ -3144,6 +3149,10 @@ static int ata_eh_skip_recovery(struct a
if (link->flags & ATA_LFLAG_DISABLED)
return 1;
+ /* skip if explicitly requested */
+ if (ehc->i.flags & ATA_EHI_NO_RECOVERY)
+ return 1;
+
/* thaw frozen port and recover failed devices */
if ((ap->pflags & ATA_PFLAG_FROZEN) || ata_link_nr_enabled(link))
return 0;