Jeff Garzik <[EMAIL PROTECTED]> :
[...]
> diff --git a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c
> --- a/drivers/scsi/sata_sil.c
> +++ b/drivers/scsi/sata_sil.c
[...]
> @@ -210,6 +214,37 @@ MODULE_LICENSE("GPL");
> MODULE_DEVICE_TABLE(pci, sil_pci_tbl);
> MODULE_VERSION(DRV_VERSION);
>
> +
> +static inline void sil_fill_sg(struct ata_queued_cmd *qc)
> +{
> + struct scatterlist *sg = qc->sg;
> + struct ata_port *ap = qc->ap;
> + unsigned int idx, nelem;
> +
> + assert(sg != NULL);
> + assert(qc->n_elem > 0);
> +
> + idx = 0;
> + for (nelem = qc->n_elem; nelem; nelem--,sg++) {
> + u32 addr = sg_dma_address(sg);
> + u32 sg_len = sg_dma_len(sg);
> +
> + ap->prd[idx].addr = cpu_to_le32(addr);
> + ap->prd[idx].flags_len = cpu_to_le32(sg_len);
> + }
> +
> + if (idx)
> + ap->prd[idx - 1].flags_len |= cpu_to_le32(ATA_PRD_EOT);
> +}
Does it not lack an 'idx++' somewhere ?
--
Ueimor
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html