|
@@ -1215,25 +1215,15 @@ 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
|
|
|
- * depth via sysfs.
|
|
|
+ * __ata_change_queue_depth - helper for ata_scsi_change_queue_depth
|
|
|
*
|
|
|
- * LOCKING:
|
|
|
- * SCSI layer (we don't care)
|
|
|
+ * libsas and libata have different approaches for associating a sdev to
|
|
|
+ * its ata_port.
|
|
|
*
|
|
|
- * RETURNS:
|
|
|
- * Newly configured queue depth.
|
|
|
*/
|
|
|
-int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth,
|
|
|
- int reason)
|
|
|
+int __ata_change_queue_depth(struct ata_port *ap, 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;
|
|
|
|
|
@@ -1268,6 +1258,30 @@ int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth,
|
|
|
return queue_depth;
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * 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
|
|
|
+ * depth via sysfs.
|
|
|
+ *
|
|
|
+ * LOCKING:
|
|
|
+ * SCSI layer (we don't care)
|
|
|
+ *
|
|
|
+ * RETURNS:
|
|
|
+ * Newly configured 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);
|
|
|
+
|
|
|
+ return __ata_change_queue_depth(ap, sdev, queue_depth, reason);
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* ata_scsi_start_stop_xlat - Translate SCSI START STOP UNIT command
|
|
|
* @qc: Storage for translated ATA taskfile
|