Skip to contentSkip to conversation

ipr: SATA DVD probing failed with 64bit adapter

PATCH In review [email protected] 2 participants 3 messages Apr 19, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover ipr: SATA DVD probing failed with 64bit adapter

This patch fixes the SATA DVD probing failing issue.

Thanks for your help!
Wendy

#1 lore raw

PATCH 1/1 ipr: SATA DVD probing failed with 64bit adapter

Driver passed the wrong IOADL address to IOA adapter. The patch fixes the issue.

---
 drivers/scsi/ipr.c |    4 ++--
 drivers/scsi/ipr.h |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/scsi/ipr.c +2 -2
Index: b/drivers/scsi/ipr.c
===================================================================
@@ -6421,7 +6421,7 @@ static void ipr_build_ata_ioadl64(struct
 {
 	u32 ioadl_flags = 0;
 	struct ipr_ioarcb *ioarcb = &ipr_cmd->ioarcb;
-	struct ipr_ioadl64_desc *ioadl64 = ipr_cmd->i.ioadl64;
+	struct ipr_ioadl64_desc *ioadl64 = ipr_cmd->i.ata_ioadl.ioadl64;
 	struct ipr_ioadl64_desc *last_ioadl64 = NULL;
 	int len = qc->nbytes;
 	struct scatterlist *sg;
@@ -6441,7 +6441,7 @@ static void ipr_build_ata_ioadl64(struct
 	ioarcb->ioadl_len =
 		cpu_to_be32(sizeof(struct ipr_ioadl64_desc) * ipr_cmd->dma_use_sg);
 	ioarcb->u.sis64_addr_data.data_ioadl_addr =
-		cpu_to_be64(dma_addr + offsetof(struct ipr_cmnd, i.ata_ioadl));
+		cpu_to_be64(dma_addr + offsetof(struct ipr_cmnd, i.ata_ioadl.ioadl64));
 
 	for_each_sg(qc->sg, sg, qc->n_elem, si) {
 		ioadl64->flags = cpu_to_be32(ioadl_flags);
drivers/scsi/ipr.h +1 -1
Index: b/drivers/scsi/ipr.h
===================================================================
@@ -552,7 +552,7 @@ struct ipr_ioarcb_ata_regs {	/* 22 bytes
 	u8 hob_lbam;
 	u8 hob_lbah;
 	u8 ctl;
-}__attribute__ ((packed, aligned(4)));
+}__attribute__ ((packed, aligned(2)));
 
 struct ipr_ioadl_desc {
 	__be32 flags_and_data_len;