aic94xx_task.c (5929faf3334f4c69f3bb02be59d7c127e0cefa1f) | aic94xx_task.c (366ca51f30de1cbb5b356c70b7bb22051c558e41) |
---|---|
1/* 2 * Aic94xx SAS/SATA Tasks 3 * 4 * Copyright (C) 2005 Adaptec, Inc. All rights reserved. 5 * Copyright (C) 2005 Luben Tuikov <luben_tuikov@adaptec.com> 6 * 7 * This file is licensed under GPLv2. 8 * --- 178 unchanged lines hidden (view full) --- 187 ts->buf_valid_size = 0; 188 edb = asd_ha->seq.edb_arr[edb_id + escb->edb_index]; 189 r = edb->vaddr; 190 if (task->task_proto == SAS_PROTOCOL_SSP) { 191 struct ssp_response_iu *iu = 192 r + 16 + sizeof(struct ssp_frame_hdr); 193 194 ts->residual = le32_to_cpu(*(__le32 *)r); | 1/* 2 * Aic94xx SAS/SATA Tasks 3 * 4 * Copyright (C) 2005 Adaptec, Inc. All rights reserved. 5 * Copyright (C) 2005 Luben Tuikov <luben_tuikov@adaptec.com> 6 * 7 * This file is licensed under GPLv2. 8 * --- 178 unchanged lines hidden (view full) --- 187 ts->buf_valid_size = 0; 188 edb = asd_ha->seq.edb_arr[edb_id + escb->edb_index]; 189 r = edb->vaddr; 190 if (task->task_proto == SAS_PROTOCOL_SSP) { 191 struct ssp_response_iu *iu = 192 r + 16 + sizeof(struct ssp_frame_hdr); 193 194 ts->residual = le32_to_cpu(*(__le32 *)r); |
195 ts->resp = SAS_TASK_COMPLETE; 196 if (iu->datapres == 0) 197 ts->stat = iu->status; 198 else if (iu->datapres == 1) 199 ts->stat = iu->resp_data[3]; 200 else if (iu->datapres == 2) { 201 ts->stat = SAM_CHECK_COND; 202 ts->buf_valid_size = min((u32) SAS_STATUS_BUF_SIZE, 203 be32_to_cpu(iu->sense_data_len)); 204 memcpy(ts->buf, iu->sense_data, ts->buf_valid_size); 205 if (iu->status != SAM_CHECK_COND) { 206 ASD_DPRINTK("device %llx sent sense data, but " 207 "stat(0x%x) is not CHECK_CONDITION" 208 "\n", 209 SAS_ADDR(task->dev->sas_addr), 210 iu->status); 211 } 212 } | 195 196 sas_ssp_task_response(&asd_ha->pcidev->dev, task, iu); |
213 } else { 214 struct ata_task_resp *resp = (void *) &ts->buf[0]; 215 216 ts->residual = le32_to_cpu(*(__le32 *)r); 217 218 if (SAS_STATUS_BUF_SIZE >= sizeof(*resp)) { 219 resp->frame_len = le16_to_cpu(*(__le16 *)(r+6)); 220 memcpy(&resp->ending_fis[0], r+16, 24); --- 437 unchanged lines hidden --- | 197 } else { 198 struct ata_task_resp *resp = (void *) &ts->buf[0]; 199 200 ts->residual = le32_to_cpu(*(__le32 *)r); 201 202 if (SAS_STATUS_BUF_SIZE >= sizeof(*resp)) { 203 resp->frame_len = le16_to_cpu(*(__le16 *)(r+6)); 204 memcpy(&resp->ending_fis[0], r+16, 24); --- 437 unchanged lines hidden --- |