diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-19 17:28:00 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-19 17:28:00 -0700 |
commit | b1b749c07fd1a961b9fd5e8a3ebaac70650501a1 (patch) | |
tree | 06996e68c962bd071db3d1871ffc8df75da9e255 | |
parent | c709f78bb38ddf3dad04758d859a2aa346859c68 (diff) | |
download | stable-queue-b1b749c07fd1a961b9fd5e8a3ebaac70650501a1.tar.gz |
3.0 patches
-rw-r--r-- | queue-3.0/isci-fix-sata-response-handling.patch | 70 | ||||
-rw-r--r-- | queue-3.0/series | 1 |
2 files changed, 71 insertions, 0 deletions
diff --git a/queue-3.0/isci-fix-sata-response-handling.patch b/queue-3.0/isci-fix-sata-response-handling.patch new file mode 100644 index 0000000000..3864058698 --- /dev/null +++ b/queue-3.0/isci-fix-sata-response-handling.patch @@ -0,0 +1,70 @@ +From 1a878284473284f9577d44babf16d87152a05c33 Mon Sep 17 00:00:00 2001 +From: Dan Williams <dan.j.williams@intel.com> +Date: Fri, 29 Jul 2011 17:16:40 -0700 +Subject: [SCSI] isci: fix sata response handling + +From: Dan Williams <dan.j.williams@intel.com> + +commit 1a878284473284f9577d44babf16d87152a05c33 upstream. + +A bug (likely copy/paste) that has been carried from the original +implementation. The unsolicited frame handling structure returns the +d2h fis in the isci_request.stp.rsp buffer. + +Signed-off-by: Dan Williams <dan.j.williams@intel.com> +Signed-off-by: James Bottomley <JBottomley@Parallels.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/scsi/isci/request.c | 18 ++++++------------ + 1 file changed, 6 insertions(+), 12 deletions(-) + +--- a/drivers/scsi/isci/request.c ++++ b/drivers/scsi/isci/request.c +@@ -2399,22 +2399,19 @@ static void isci_task_save_for_upper_lay + } + } + +-static void isci_request_process_stp_response(struct sas_task *task, +- void *response_buffer) ++static void isci_process_stp_response(struct sas_task *task, struct dev_to_host_fis *fis) + { +- struct dev_to_host_fis *d2h_reg_fis = response_buffer; + struct task_status_struct *ts = &task->task_status; + struct ata_task_resp *resp = (void *)&ts->buf[0]; + +- resp->frame_len = le16_to_cpu(*(__le16 *)(response_buffer + 6)); +- memcpy(&resp->ending_fis[0], response_buffer + 16, 24); ++ resp->frame_len = sizeof(*fis); ++ memcpy(resp->ending_fis, fis, sizeof(*fis)); + ts->buf_valid_size = sizeof(*resp); + +- /** +- * If the device fault bit is set in the status register, then ++ /* If the device fault bit is set in the status register, then + * set the sense data and return. + */ +- if (d2h_reg_fis->status & ATA_DF) ++ if (fis->status & ATA_DF) + ts->stat = SAS_PROTO_RESPONSE; + else + ts->stat = SAM_STAT_GOOD; +@@ -2428,7 +2425,6 @@ static void isci_request_io_request_comp + { + struct sas_task *task = isci_request_access_task(request); + struct ssp_response_iu *resp_iu; +- void *resp_buf; + unsigned long task_flags; + struct isci_remote_device *idev = isci_lookup_device(task->dev); + enum service_response response = SAS_TASK_UNDELIVERED; +@@ -2565,9 +2561,7 @@ static void isci_request_io_request_comp + task); + + if (sas_protocol_ata(task->task_proto)) { +- resp_buf = &request->stp.rsp; +- isci_request_process_stp_response(task, +- resp_buf); ++ isci_process_stp_response(task, &request->stp.rsp); + } else if (SAS_PROTOCOL_SSP == task->task_proto) { + + /* crack the iu response buffer. */ diff --git a/queue-3.0/series b/queue-3.0/series index a053dd23d2..13daeb95c0 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -99,3 +99,4 @@ fs-9p-use-protocol-defined-value-for-lock-getlock-type-field.patch pci-set-pci-e-max-payload-size-on-fabric.patch pci-export-pcie_bus_configure_settings-symbol.patch pci-remove-mrrs-modification-from-mps-setting-code.patch +isci-fix-sata-response-handling.patch |