2.6.x libata fixes
PATCH 1/1 2.6.x libata fixes
Please pull from the 'upstream-fixes' branch of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git
to obtain the two fixes described in the attached diffstat/changelog/patch.
drivers/scsi/libata-scsi.c | 1 + drivers/scsi/sata_sx4.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
commit 42517438f9c1011a03e49a542cba32ac5a80dd8e
Author: Tejun Heo <[email protected]> Date: Wed Aug 10 13:38:27 2005 -0400
libata: fix EH-related lockup by properly cleaning EH command list
Yet another hack due to the fact that libata is the only user of SCSI's ->eh_strategy_handler() hook.
commit fae009847c9ea3d668bbee21ce1d76764eca5039
Author: Tejun Heo <[email protected]> Date: Sun Aug 7 14:53:40 2005 +0900
[PATCH] sata: fix sata_sx4 dma_prep to not use sg->length
sata_sx4 directly references sg->length to calculate total_len in
pdc20621_dma_prep(). This is incorrect as dma_map_sg() could have merged multiple sg's into one and, in such case, sg->length doesn't reflect true size of the entry. This patch makes it use sg_dma_len(sg).
drivers/scsi/libata-scsi.c +1 -0
@@ -385,6 +385,7 @@ int ata_scsi_error(struct Scsi_Host *hos* appropriate place */ host->host_failed--; +INIT_LIST_HEAD (&host->eh_cmd_q);DPRINTK ("EXIT\n" );return 0 ;
drivers/scsi/sata_sx4.c +1 -1
@@ -468,7 +468,7 @@ static void pdc20621_dma_prep(struct atafor (i =0 ; i < last; i++) { buf[idx++] =cpu_to_le32 (sg_dma_address (&sg[i])); buf[idx++] =cpu_to_le32 (sg_dma_len (&sg[i])); - total_len += sg[i].length; + total_len +=sg_dma_len (&sg[i]); } buf[idx -1 ] |=cpu_to_le32 (ATA_PRD_EOT ); sgt_len = idx *4 ;