diff options
author | wenxiong@linux.vnet.ibm.com <wenxiong@linux.vnet.ibm.com> | 2013-04-18 22:32:48 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-05-02 18:35:15 -0400 |
commit | 1ac7c26d88bc0e256ecd269e6f90c7343c359004 (patch) | |
tree | c60471223b566b68a9b7abcddb6df192f4bbfd0a /drivers/scsi | |
parent | bcab2ccdc61679b6e33d35ae3fe8275df8e20c61 (diff) |
[SCSI] ipr: SATA DVD probing failed with 64bit adapter
Driver passed the wrong IOADL address to IOA adapter. The patch
fixes the issue.
Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/ipr.c | 4 | ||||
-rw-r--r-- | drivers/scsi/ipr.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 7e64546bd981..82a3c1ec8706 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -6421,7 +6421,7 @@ static void ipr_build_ata_ioadl64(struct ipr_cmnd *ipr_cmd, | |||
6421 | { | 6421 | { |
6422 | u32 ioadl_flags = 0; | 6422 | u32 ioadl_flags = 0; |
6423 | struct ipr_ioarcb *ioarcb = &ipr_cmd->ioarcb; | 6423 | struct ipr_ioarcb *ioarcb = &ipr_cmd->ioarcb; |
6424 | struct ipr_ioadl64_desc *ioadl64 = ipr_cmd->i.ioadl64; | 6424 | struct ipr_ioadl64_desc *ioadl64 = ipr_cmd->i.ata_ioadl.ioadl64; |
6425 | struct ipr_ioadl64_desc *last_ioadl64 = NULL; | 6425 | struct ipr_ioadl64_desc *last_ioadl64 = NULL; |
6426 | int len = qc->nbytes; | 6426 | int len = qc->nbytes; |
6427 | struct scatterlist *sg; | 6427 | struct scatterlist *sg; |
@@ -6441,7 +6441,7 @@ static void ipr_build_ata_ioadl64(struct ipr_cmnd *ipr_cmd, | |||
6441 | ioarcb->ioadl_len = | 6441 | ioarcb->ioadl_len = |
6442 | cpu_to_be32(sizeof(struct ipr_ioadl64_desc) * ipr_cmd->dma_use_sg); | 6442 | cpu_to_be32(sizeof(struct ipr_ioadl64_desc) * ipr_cmd->dma_use_sg); |
6443 | ioarcb->u.sis64_addr_data.data_ioadl_addr = | 6443 | ioarcb->u.sis64_addr_data.data_ioadl_addr = |
6444 | cpu_to_be64(dma_addr + offsetof(struct ipr_cmnd, i.ata_ioadl)); | 6444 | cpu_to_be64(dma_addr + offsetof(struct ipr_cmnd, i.ata_ioadl.ioadl64)); |
6445 | 6445 | ||
6446 | for_each_sg(qc->sg, sg, qc->n_elem, si) { | 6446 | for_each_sg(qc->sg, sg, qc->n_elem, si) { |
6447 | ioadl64->flags = cpu_to_be32(ioadl_flags); | 6447 | ioadl64->flags = cpu_to_be32(ioadl_flags); |
diff --git a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h index 21a6ff1ed5c6..a1fb840596ef 100644 --- a/drivers/scsi/ipr.h +++ b/drivers/scsi/ipr.h | |||
@@ -552,7 +552,7 @@ struct ipr_ioarcb_ata_regs { /* 22 bytes */ | |||
552 | u8 hob_lbam; | 552 | u8 hob_lbam; |
553 | u8 hob_lbah; | 553 | u8 hob_lbah; |
554 | u8 ctl; | 554 | u8 ctl; |
555 | }__attribute__ ((packed, aligned(4))); | 555 | }__attribute__ ((packed, aligned(2))); |
556 | 556 | ||
557 | struct ipr_ioadl_desc { | 557 | struct ipr_ioadl_desc { |
558 | __be32 flags_and_data_len; | 558 | __be32 flags_and_data_len; |