* [PATCH 2/3] libata: Initialize nbytes for internal sg commands [not found] <11690587311891-patch-mail.ibm.com> @ 2007-01-17 18:32 ` Brian King 2007-01-18 1:35 ` Tejun Heo 2007-01-17 18:32 ` [PATCH 3/3] libata: Initialize qc->pad_len Brian King 1 sibling, 1 reply; 5+ messages in thread From: Brian King @ 2007-01-17 18:32 UTC (permalink / raw) To: jgarzik; +Cc: linux-ide, htejun, brking Some LLDDs, like ipr, use nbytes and pad_len to determine the total data transfer length of a command. Make sure nbytes gets initialized for internally generated commands. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> --- linux-2.6-bjking1/drivers/ata/libata-core.c | 1 + 1 files changed, 1 insertion(+) diff -puN drivers/ata/libata-core.c~libata_fix_nbytes drivers/ata/libata-core.c --- linux-2.6/drivers/ata/libata-core.c~libata_fix_nbytes 2007-01-17 11:15:17.000000000 -0600 +++ linux-2.6-bjking1/drivers/ata/libata-core.c 2007-01-17 11:15:17.000000000 -0600 @@ -1250,6 +1250,7 @@ unsigned ata_exec_internal_sg(struct ata ata_sg_init(qc, sg, n_elem); qc->nsect = buflen / ATA_SECT_SIZE; + qc->nbytes = buflen; } qc->private_data = &wait; _ ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/3] libata: Initialize nbytes for internal sg commands 2007-01-17 18:32 ` [PATCH 2/3] libata: Initialize nbytes for internal sg commands Brian King @ 2007-01-18 1:35 ` Tejun Heo 2007-01-18 19:58 ` Brian King 0 siblings, 1 reply; 5+ messages in thread From: Tejun Heo @ 2007-01-18 1:35 UTC (permalink / raw) To: Brian King; +Cc: jgarzik, linux-ide Brian King wrote: > Some LLDDs, like ipr, use nbytes and pad_len to determine > the total data transfer length of a command. Make sure > nbytes gets initialized for internally generated commands. I think it's better to apply the following patch instead of this one. http://article.gmane.org/gmane.linux.ide/14792 -- tejun ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/3] libata: Initialize nbytes for internal sg commands 2007-01-18 1:35 ` Tejun Heo @ 2007-01-18 19:58 ` Brian King 2007-01-22 21:00 ` Brian King 0 siblings, 1 reply; 5+ messages in thread From: Brian King @ 2007-01-18 19:58 UTC (permalink / raw) To: Tejun Heo; +Cc: jgarzik, linux-ide Tejun Heo wrote: > Brian King wrote: >> Some LLDDs, like ipr, use nbytes and pad_len to determine >> the total data transfer length of a command. Make sure >> nbytes gets initialized for internally generated commands. > > I think it's better to apply the following patch instead of this one. > > http://article.gmane.org/gmane.linux.ide/14792 Works for me. I loaded that patch in place of this one and verified it solved my problem as well. I still need the other two patches in this series, however. Thanks, Brian -- Brian King eServer Storage I/O IBM Linux Technology Center ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/3] libata: Initialize nbytes for internal sg commands 2007-01-18 19:58 ` Brian King @ 2007-01-22 21:00 ` Brian King 0 siblings, 0 replies; 5+ messages in thread From: Brian King @ 2007-01-22 21:00 UTC (permalink / raw) To: brking; +Cc: Tejun Heo, jgarzik, linux-ide Brian King wrote: > Tejun Heo wrote: >> Brian King wrote: >>> Some LLDDs, like ipr, use nbytes and pad_len to determine >>> the total data transfer length of a command. Make sure >>> nbytes gets initialized for internally generated commands. >> I think it's better to apply the following patch instead of this one. >> >> http://article.gmane.org/gmane.linux.ide/14792 > > Works for me. I loaded that patch in place of this one and verified > it solved my problem as well. I still need the other two patches in > this series, however. Jeff, Do you plan to pull this patch series into upstream-fixes? Without these three patches (or 1 & 3 plus Tejun's patch referenced above), ipr SATA is broken in 2.6.20. Thanks, Brian -- Brian King eServer Storage I/O IBM Linux Technology Center ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 3/3] libata: Initialize qc->pad_len [not found] <11690587311891-patch-mail.ibm.com> 2007-01-17 18:32 ` [PATCH 2/3] libata: Initialize nbytes for internal sg commands Brian King @ 2007-01-17 18:32 ` Brian King 1 sibling, 0 replies; 5+ messages in thread From: Brian King @ 2007-01-17 18:32 UTC (permalink / raw) To: jgarzik; +Cc: linux-ide, htejun, brking Initialize qc->pad_len for each new command. This ensures that pad_len is not set to a stale value for zero data length commands. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> --- linux-2.6-bjking1/include/linux/libata.h | 1 + 1 files changed, 1 insertion(+) diff -puN include/linux/libata.h~libata_init_pad_len include/linux/libata.h --- linux-2.6/include/linux/libata.h~libata_init_pad_len 2007-01-17 11:15:30.000000000 -0600 +++ linux-2.6-bjking1/include/linux/libata.h 2007-01-17 11:15:30.000000000 -0600 @@ -1151,6 +1151,7 @@ static inline void ata_qc_reinit(struct qc->nbytes = qc->curbytes = 0; qc->n_elem = 0; qc->err_mask = 0; + qc->pad_len = 0; ata_tf_init(qc->dev, &qc->tf); _ ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-01-22 21:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <11690587311891-patch-mail.ibm.com>
2007-01-17 18:32 ` [PATCH 2/3] libata: Initialize nbytes for internal sg commands Brian King
2007-01-18 1:35 ` Tejun Heo
2007-01-18 19:58 ` Brian King
2007-01-22 21:00 ` Brian King
2007-01-17 18:32 ` [PATCH 3/3] libata: Initialize qc->pad_len Brian King
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).