aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-10 13:52:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-10 13:52:45 -0400
commite26feff647ef34423b048b940540a0059001ddb0 (patch)
treeacafe68602ee2f6f1a438c113073ffcc0040e949 /drivers/ata
parentd403a6484f0341bf0624d17ece46f24f741b6a92 (diff)
parentb911e473d24633c19414b54b82b9ff0b1a2419d7 (diff)
Merge branch 'for-2.6.28' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.28' of git://git.kernel.dk/linux-2.6-block: (132 commits) doc/cdrom: Trvial documentation error, file not present block_dev: fix kernel-doc in new functions block: add some comments around the bio read-write flags block: mark bio_split_pool static block: Find bio sector offset given idx and offset block: gendisk integrity wrapper block: Switch blk_integrity_compare from bdev to gendisk block: Fix double put in blk_integrity_unregister block: Introduce integrity data ownership flag block: revert part of d7533ad0e132f92e75c1b2eb7c26387b25a583c1 bio.h: Remove unused conditional code block: remove end_{queued|dequeued}_request() block: change elevator to use __blk_end_request() gdrom: change to use __blk_end_request() memstick: change to use __blk_end_request() virtio_blk: change to use __blk_end_request() blktrace: use BLKTRACE_BDEV_SIZE as the name size for setup structure block: add lld busy state exporting interface block: Fix blk_start_queueing() to not kick a stopped queue include blktrace_api.h in headers_install ...
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/libata-eh.c13
-rw-r--r--drivers/ata/libata-scsi.c4
-rw-r--r--drivers/ata/libata.h2
3 files changed, 12 insertions, 7 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index f2dd99122bd6..a93247cc395a 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -33,6 +33,7 @@
33 */ 33 */
34 34
35#include <linux/kernel.h> 35#include <linux/kernel.h>
36#include <linux/blkdev.h>
36#include <linux/pci.h> 37#include <linux/pci.h>
37#include <scsi/scsi.h> 38#include <scsi/scsi.h>
38#include <scsi/scsi_host.h> 39#include <scsi/scsi_host.h>
@@ -459,29 +460,29 @@ static void ata_eh_clear_action(struct ata_link *link, struct ata_device *dev,
459 * RETURNS: 460 * RETURNS:
460 * EH_HANDLED or EH_NOT_HANDLED 461 * EH_HANDLED or EH_NOT_HANDLED
461 */ 462 */
462enum scsi_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd) 463enum blk_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd)
463{ 464{
464 struct Scsi_Host *host = cmd->device->host; 465 struct Scsi_Host *host = cmd->device->host;
465 struct ata_port *ap = ata_shost_to_port(host); 466 struct ata_port *ap = ata_shost_to_port(host);
466 unsigned long flags; 467 unsigned long flags;
467 struct ata_queued_cmd *qc; 468 struct ata_queued_cmd *qc;
468 enum scsi_eh_timer_return ret; 469 enum blk_eh_timer_return ret;
469 470
470 DPRINTK("ENTER\n"); 471 DPRINTK("ENTER\n");
471 472
472 if (ap->ops->error_handler) { 473 if (ap->ops->error_handler) {
473 ret = EH_NOT_HANDLED; 474 ret = BLK_EH_NOT_HANDLED;
474 goto out; 475 goto out;
475 } 476 }
476 477
477 ret = EH_HANDLED; 478 ret = BLK_EH_HANDLED;
478 spin_lock_irqsave(ap->lock, flags); 479 spin_lock_irqsave(ap->lock, flags);
479 qc = ata_qc_from_tag(ap, ap->link.active_tag); 480 qc = ata_qc_from_tag(ap, ap->link.active_tag);
480 if (qc) { 481 if (qc) {
481 WARN_ON(qc->scsicmd != cmd); 482 WARN_ON(qc->scsicmd != cmd);
482 qc->flags |= ATA_QCFLAG_EH_SCHEDULED; 483 qc->flags |= ATA_QCFLAG_EH_SCHEDULED;
483 qc->err_mask |= AC_ERR_TIMEOUT; 484 qc->err_mask |= AC_ERR_TIMEOUT;
484 ret = EH_NOT_HANDLED; 485 ret = BLK_EH_NOT_HANDLED;
485 } 486 }
486 spin_unlock_irqrestore(ap->lock, flags); 487 spin_unlock_irqrestore(ap->lock, flags);
487 488
@@ -833,7 +834,7 @@ void ata_qc_schedule_eh(struct ata_queued_cmd *qc)
833 * Note that ATA_QCFLAG_FAILED is unconditionally set after 834 * Note that ATA_QCFLAG_FAILED is unconditionally set after
834 * this function completes. 835 * this function completes.
835 */ 836 */
836 scsi_req_abort_cmd(qc->scsicmd); 837 blk_abort_request(qc->scsicmd->request);
837} 838}
838 839
839/** 840/**
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index fccd5e496c62..59fe051957ef 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -1085,6 +1085,10 @@ static int ata_scsi_dev_config(struct scsi_device *sdev,
1085 1085
1086 blk_queue_dma_drain(q, atapi_drain_needed, buf, ATAPI_MAX_DRAIN); 1086 blk_queue_dma_drain(q, atapi_drain_needed, buf, ATAPI_MAX_DRAIN);
1087 } else { 1087 } else {
1088 if (ata_id_is_ssd(dev->id))
1089 queue_flag_set_unlocked(QUEUE_FLAG_NONROT,
1090 sdev->request_queue);
1091
1088 /* ATA devices must be sector aligned */ 1092 /* ATA devices must be sector aligned */
1089 blk_queue_update_dma_alignment(sdev->request_queue, 1093 blk_queue_update_dma_alignment(sdev->request_queue,
1090 ATA_SECT_SIZE - 1); 1094 ATA_SECT_SIZE - 1);
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h
index e96de96e3020..fe2839e58774 100644
--- a/drivers/ata/libata.h
+++ b/drivers/ata/libata.h
@@ -155,7 +155,7 @@ extern int ata_bus_probe(struct ata_port *ap);
155/* libata-eh.c */ 155/* libata-eh.c */
156extern unsigned long ata_internal_cmd_timeout(struct ata_device *dev, u8 cmd); 156extern unsigned long ata_internal_cmd_timeout(struct ata_device *dev, u8 cmd);
157extern void ata_internal_cmd_timed_out(struct ata_device *dev, u8 cmd); 157extern void ata_internal_cmd_timed_out(struct ata_device *dev, u8 cmd);
158extern enum scsi_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd); 158extern enum blk_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd);
159extern void ata_scsi_error(struct Scsi_Host *host); 159extern void ata_scsi_error(struct Scsi_Host *host);
160extern void ata_port_wait_eh(struct ata_port *ap); 160extern void ata_port_wait_eh(struct ata_port *ap);
161extern void ata_eh_fastdrain_timerfn(unsigned long arg); 161extern void ata_eh_fastdrain_timerfn(unsigned long arg);