From: Jeff Garzik Date: Sun, 30 Oct 2005 06:58:18 +0000 (-0500) Subject: Merge branch 'upstream' X-Git-Tag: v2.6.15-rc1~730 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0612bbc41f65f5a684f69d714a1a17a6f0f40c5;p=linux-2.6 Merge branch 'upstream' --- f0612bbc41f65f5a684f69d714a1a17a6f0f40c5 diff --cc drivers/scsi/libata-core.c index 3171e386f7,771bc7d376..0d58f4d3e5 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@@ -2598,20 -2555,12 +2577,18 @@@ void ata_qc_prep(struct ata_queued_cmd void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf, unsigned int buflen) { + struct scatterlist *sg; + qc->flags |= ATA_QCFLAG_SINGLE; - qc->sg = &qc->sgent; + memset(&qc->sgent, 0, sizeof(qc->sgent)); + qc->__sg = &qc->sgent; qc->n_elem = 1; + qc->orig_n_elem = 1; qc->buf_virt = buf; - sg_init_one(qc->sg, buf, buflen); + + sg = qc->__sg; - sg->page = virt_to_page(buf); - sg->offset = (unsigned long) buf & ~PAGE_MASK; - sg->length = buflen; ++ sg_init_one(sg, buf, buflen); } /**