forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/scsi/isci/request.c
....@@ -224,7 +224,7 @@
224224 idev = ireq->target_device;
225225 iport = idev->owning_port;
226226
227
- /* Fill in the TC with the its required data */
227
+ /* Fill in the TC with its required data */
228228 task_context->abort = 0;
229229 task_context->priority = 0;
230230 task_context->initiator_request = 1;
....@@ -506,7 +506,7 @@
506506 idev = ireq->target_device;
507507 iport = idev->owning_port;
508508
509
- /* Fill in the TC with the its required data */
509
+ /* Fill in the TC with its required data */
510510 task_context->abort = 0;
511511 task_context->priority = SCU_TASK_PRIORITY_NORMAL;
512512 task_context->initiator_request = 1;
....@@ -894,7 +894,7 @@
894894 * and don't wait for the task response.
895895 */
896896 sci_change_state(&ireq->sm, SCI_REQ_ABORTING);
897
- /* Fall through and handle like ABORTING... */
897
+ fallthrough; /* and handle like ABORTING */
898898 case SCI_REQ_ABORTING:
899899 if (!isci_remote_device_is_safe_to_abort(ireq->target_device))
900900 set_bit(IREQ_PENDING_ABORT, &ireq->flags);
....@@ -2574,7 +2574,7 @@
25742574 if (!idev)
25752575 *status_ptr = SAS_DEVICE_UNKNOWN;
25762576 else
2577
- *status_ptr = SAM_STAT_TASK_ABORTED;
2577
+ *status_ptr = SAS_SAM_STAT_TASK_ABORTED;
25782578
25792579 clear_bit(IREQ_COMPLETE_IN_TARGET, &request->flags);
25802580 }
....@@ -2704,7 +2704,7 @@
27042704 default:
27052705 /* Task in the target is not done. */
27062706 *response_ptr = SAS_TASK_UNDELIVERED;
2707
- *status_ptr = SAM_STAT_TASK_ABORTED;
2707
+ *status_ptr = SAS_SAM_STAT_TASK_ABORTED;
27082708
27092709 if (task->task_proto == SAS_PROTOCOL_SMP)
27102710 set_bit(IREQ_COMPLETE_IN_TARGET, &request->flags);
....@@ -2727,7 +2727,7 @@
27272727 if (ac_err_mask(fis->status))
27282728 ts->stat = SAS_PROTO_RESPONSE;
27292729 else
2730
- ts->stat = SAM_STAT_GOOD;
2730
+ ts->stat = SAS_SAM_STAT_GOOD;
27312731
27322732 ts->resp = SAS_TASK_COMPLETE;
27332733 }
....@@ -2790,7 +2790,7 @@
27902790 case SCI_IO_SUCCESS_IO_DONE_EARLY:
27912791
27922792 response = SAS_TASK_COMPLETE;
2793
- status = SAM_STAT_GOOD;
2793
+ status = SAS_SAM_STAT_GOOD;
27942794 set_bit(IREQ_COMPLETE_IN_TARGET, &request->flags);
27952795
27962796 if (completion_status == SCI_IO_SUCCESS_IO_DONE_EARLY) {
....@@ -2860,7 +2860,7 @@
28602860
28612861 /* Fail the I/O. */
28622862 response = SAS_TASK_UNDELIVERED;
2863
- status = SAM_STAT_TASK_ABORTED;
2863
+ status = SAS_SAM_STAT_TASK_ABORTED;
28642864
28652865 clear_bit(IREQ_COMPLETE_IN_TARGET, &request->flags);
28662866 break;
....@@ -3101,7 +3101,7 @@
31013101 /* pass */;
31023102 else if (dev_is_sata(dev))
31033103 memset(&ireq->stp.cmd, 0, sizeof(ireq->stp.cmd));
3104
- else if (dev_is_expander(dev))
3104
+ else if (dev_is_expander(dev->dev_type))
31053105 /* pass */;
31063106 else
31073107 return SCI_FAILURE_UNSUPPORTED_PROTOCOL;
....@@ -3235,7 +3235,7 @@
32353235 iport = idev->owning_port;
32363236
32373237 /*
3238
- * Fill in the TC with the its required data
3238
+ * Fill in the TC with its required data
32393239 * 00h
32403240 */
32413241 task_context->priority = 0;
....@@ -3444,7 +3444,7 @@
34443444 int isci_request_execute(struct isci_host *ihost, struct isci_remote_device *idev,
34453445 struct sas_task *task, u16 tag)
34463446 {
3447
- enum sci_status status = SCI_FAILURE_UNSUPPORTED_PROTOCOL;
3447
+ enum sci_status status;
34483448 struct isci_request *ireq;
34493449 unsigned long flags;
34503450 int ret = 0;