include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[safe/jmp/linux-2.6] / drivers / ata / libata-scsi.c
index 62e6b9e..0088cde 100644 (file)
@@ -33,6 +33,7 @@
  *
  */
 
+#include <linux/slab.h>
 #include <linux/kernel.h>
 #include <linux/blkdev.h>
 #include <linux/spinlock.h>
@@ -1097,7 +1098,7 @@ static int ata_scsi_dev_config(struct scsi_device *sdev,
                dev->flags |= ATA_DFLAG_NO_UNLOAD;
 
        /* configure max sectors */
-       blk_queue_max_sectors(sdev->request_queue, dev->max_sectors);
+       blk_queue_max_hw_sectors(sdev->request_queue, dev->max_sectors);
 
        if (dev->class == ATA_DEV_ATAPI) {
                struct request_queue *q = sdev->request_queue;
@@ -1208,6 +1209,7 @@ void ata_scsi_slave_destroy(struct scsi_device *sdev)
  *     ata_scsi_change_queue_depth - SCSI callback for queue depth config
  *     @sdev: SCSI device to configure queue depth for
  *     @queue_depth: new queue depth
+ *     @reason: calling context
  *
  *     This is libata standard hostt->change_queue_depth callback.
  *     SCSI will call into this callback when user tries to set queue
@@ -1219,12 +1221,16 @@ void ata_scsi_slave_destroy(struct scsi_device *sdev)
  *     RETURNS:
  *     Newly configured queue depth.
  */
-int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth)
+int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth,
+                               int reason)
 {
        struct ata_port *ap = ata_shost_to_port(sdev->host);
        struct ata_device *dev;
        unsigned long flags;
 
+       if (reason != SCSI_QDEPTH_DEFAULT)
+               return -EOPNOTSUPP;
+
        if (queue_depth < 1 || queue_depth == sdev->queue_depth)
                return sdev->queue_depth;
 
@@ -2870,7 +2876,7 @@ static unsigned int ata_scsi_pass_thru(struct ata_queued_cmd *qc)
         * write indication (used for PIO/DMA setup), result TF is
         * copied back and we don't whine too much about its failure.
         */
-       tf->flags = ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
+       tf->flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
        if (scmd->sc_data_direction == DMA_TO_DEVICE)
                tf->flags |= ATA_TFLAG_WRITE;
 
@@ -3017,7 +3023,7 @@ static inline ata_xlat_func_t ata_get_xlat_func(struct ata_device *dev, u8 cmd)
        case WRITE_16:
                return ata_scsi_rw_xlat;
 
-       case 0x93 /*WRITE_SAME_16*/:
+       case WRITE_SAME_16:
                return ata_scsi_write_same_xlat;
 
        case SYNCHRONIZE_CACHE: