/[packages]/updates/1/kernel/current/PATCHES/patches/scsi-isci-fix-sata-response-handling.patch
ViewVC logotype

Contents of /updates/1/kernel/current/PATCHES/patches/scsi-isci-fix-sata-response-handling.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 162471 - (show annotations) (download)
Thu Nov 3 18:35:16 2011 UTC (12 years, 5 months ago) by tmb
File size: 2610 byte(s)
- scsi/isci: fix sata response handling
- scsi/isci: fix 32-bit operation when CONFIG_HIGHMEM64G=n
- scsi/isci: change sas phy timeouts from 54us to 59us
- scsi/isci: fix sgpio register definitions
- scsi/isci: fix support for large smp requests
- scsi/isci: fix missed unlock in apc_agent_timeout()


1 From 1a878284473284f9577d44babf16d87152a05c33 Mon Sep 17 00:00:00 2001
2 From: Dan Williams <dan.j.williams@intel.com>
3 Date: Fri, 29 Jul 2011 17:16:40 -0700
4 Subject: [PATCH] [SCSI] isci: fix sata response handling
5
6 A bug (likely copy/paste) that has been carried from the original
7 implementation. The unsolicited frame handling structure returns the
8 d2h fis in the isci_request.stp.rsp buffer.
9
10 Cc: <stable@kernel.org>
11 Signed-off-by: Dan Williams <dan.j.williams@intel.com>
12 Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 ---
14 drivers/scsi/isci/request.c | 18 ++++++------------
15 1 files changed, 6 insertions(+), 12 deletions(-)
16
17 diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c
18 index a46e07a..b4cf998 100644
19 --- a/drivers/scsi/isci/request.c
20 +++ b/drivers/scsi/isci/request.c
21 @@ -2399,22 +2399,19 @@ static void isci_task_save_for_upper_layer_completion(
22 }
23 }
24
25 -static void isci_request_process_stp_response(struct sas_task *task,
26 - void *response_buffer)
27 +static void isci_process_stp_response(struct sas_task *task, struct dev_to_host_fis *fis)
28 {
29 - struct dev_to_host_fis *d2h_reg_fis = response_buffer;
30 struct task_status_struct *ts = &task->task_status;
31 struct ata_task_resp *resp = (void *)&ts->buf[0];
32
33 - resp->frame_len = le16_to_cpu(*(__le16 *)(response_buffer + 6));
34 - memcpy(&resp->ending_fis[0], response_buffer + 16, 24);
35 + resp->frame_len = sizeof(*fis);
36 + memcpy(resp->ending_fis, fis, sizeof(*fis));
37 ts->buf_valid_size = sizeof(*resp);
38
39 - /**
40 - * If the device fault bit is set in the status register, then
41 + /* If the device fault bit is set in the status register, then
42 * set the sense data and return.
43 */
44 - if (d2h_reg_fis->status & ATA_DF)
45 + if (fis->status & ATA_DF)
46 ts->stat = SAS_PROTO_RESPONSE;
47 else
48 ts->stat = SAM_STAT_GOOD;
49 @@ -2428,7 +2425,6 @@ static void isci_request_io_request_complete(struct isci_host *ihost,
50 {
51 struct sas_task *task = isci_request_access_task(request);
52 struct ssp_response_iu *resp_iu;
53 - void *resp_buf;
54 unsigned long task_flags;
55 struct isci_remote_device *idev = isci_lookup_device(task->dev);
56 enum service_response response = SAS_TASK_UNDELIVERED;
57 @@ -2565,9 +2561,7 @@ static void isci_request_io_request_complete(struct isci_host *ihost,
58 task);
59
60 if (sas_protocol_ata(task->task_proto)) {
61 - resp_buf = &request->stp.rsp;
62 - isci_request_process_stp_response(task,
63 - resp_buf);
64 + isci_process_stp_response(task, &request->stp.rsp);
65 } else if (SAS_PROTOCOL_SSP == task->task_proto) {
66
67 /* crack the iu response buffer. */
68 --
69 1.7.7.2
70

  ViewVC Help
Powered by ViewVC 1.1.30