isci: kill "host quiesce" mechanism

The midlayer is already throttling i/o in the places where host_quiesce
was trying to prevent further i/o to the device.  It's also problematic
in that it holds a lock over GFP_KERNEL allocations.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
diff --git a/drivers/scsi/isci/task.c b/drivers/scsi/isci/task.c
index c637bbc..98204b0 100644
--- a/drivers/scsi/isci/task.c
+++ b/drivers/scsi/isci/task.c
@@ -81,7 +81,6 @@
 	struct isci_request *request = NULL;
 	struct isci_remote_device *device;
 	unsigned long flags;
-	unsigned long quiesce_flags = 0;
 	int ret;
 	enum sci_status status;
 
@@ -151,21 +150,7 @@
 
 		isci_host = isci_host_from_sas_ha(task->dev->port->ha);
 
-		/* check if the controller hasn't started or if the device
-		 * is ready but not accepting IO.
-		 */
-		if (device) {
-
-			spin_lock_irqsave(&device->host_quiesce_lock,
-					  quiesce_flags);
-		}
-		/* From this point onward, any process that needs to guarantee
-		 * that there is no kernel I/O being started will have to wait
-		 * for the quiesce spinlock.
-		 */
-
-		if ((device && ((isci_remote_device_get_state(device) == isci_ready) ||
-		    (isci_remote_device_get_state(device) == isci_host_quiesce)))) {
+		if (device && device->status == isci_ready) {
 
 			/* Forces a retry from scsi mid layer. */
 			dev_warn(task->dev->port->ha->dev,
@@ -179,8 +164,7 @@
 			if (device)
 				dev_dbg(task->dev->port->ha->dev,
 					"%s: device->status = 0x%x\n",
-					__func__,
-					isci_remote_device_get_state(device));
+					__func__, device->status);
 
 			/* Indicate QUEUE_FULL so that the scsi midlayer
 			 * retries.
@@ -194,7 +178,7 @@
 			isci_host_can_dequeue(isci_host, 1);
 		}
 		/* the device is going down... */
-		else if (!device || (isci_ready_for_io != isci_remote_device_get_state(device))) {
+		else if (!device || device->status != isci_ready_for_io) {
 
 			dev_dbg(task->dev->port->ha->dev,
 				"%s: task %p: isci_host->status = %d, "
@@ -207,8 +191,7 @@
 			if (device)
 				dev_dbg(task->dev->port->ha->dev,
 					"%s: device->status = 0x%x\n",
-					__func__,
-					isci_remote_device_get_state(device));
+					__func__, device->status);
 
 			/* Indicate SAS_TASK_UNDELIVERED, so that the scsi
 			 * midlayer removes the target.
@@ -247,11 +230,6 @@
 				isci_host_can_dequeue(isci_host, 1);
 			}
 		}
-		if (device) {
-			spin_unlock_irqrestore(&device->host_quiesce_lock,
-					       quiesce_flags
-					       );
-		}
 		task = list_entry(task->list.next, struct sas_task, list);
 	} while (--num > 0);
 	return 0;
@@ -442,14 +420,11 @@
 	/* sanity check, return TMF_RESP_FUNC_FAILED
 	 * if the device is not there and ready.
 	 */
-	if (!isci_device ||
-	    ((isci_ready_for_io != isci_remote_device_get_state(isci_device)) &&
-	    (isci_host_quiesce != isci_remote_device_get_state(isci_device)))) {
+	if (!isci_device || isci_device->status != isci_ready_for_io) {
 		dev_dbg(&isci_host->pdev->dev,
 			"%s: isci_device = %p not ready (%d)\n",
 			__func__,
-			isci_device,
-			isci_remote_device_get_state(isci_device));
+			isci_device, isci_device->status);
 		return TMF_RESP_FUNC_FAILED;
 	} else
 		dev_dbg(&isci_host->pdev->dev,
@@ -986,9 +961,6 @@
 		return TMF_RESP_FUNC_FAILED;
 	}
 
-	/* Stop I/O to the remote device. */
-	isci_device_set_host_quiesce_lock_state(isci_device, true);
-
 	/* Send the task management part of the reset. */
 	if (sas_protocol_ata(domain_device->tproto)) {
 		ret = isci_task_send_lu_reset_sata(
@@ -1004,9 +976,6 @@
 						isci_device,
 						terminating);
 
-	/* Resume I/O to the remote device. */
-	isci_device_set_host_quiesce_lock_state(isci_device, false);
-
 	return ret;
 }
 
@@ -1627,9 +1596,6 @@
 	if (isci_host != NULL)
 		spin_unlock_irqrestore(&isci_host->scic_lock, flags);
 
-	/* Stop I/O to the remote device. */
-	isci_device_set_host_quiesce_lock_state(isci_dev, true);
-
 	/* Make sure all pending requests are able to be fully terminated. */
 	isci_device_clear_reset_pending(isci_dev);
 
@@ -1671,8 +1637,5 @@
 		"%s: cmd %p, isci_dev %p complete.\n",
 		__func__, cmd, isci_dev);
 
-	/* Resume I/O to the remote device. */
-	isci_device_set_host_quiesce_lock_state(isci_dev, false);
-
 	return TMF_RESP_FUNC_COMPLETE;
 }