diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-30 00:48:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-30 00:48:06 -0400 |
commit | 9f75e1eff3edb2bb07349b94c28f4f2a6c66ca43 (patch) | |
tree | 27a73405d3652dc6771fab28721b70e6d44ff47a /drivers/scsi | |
parent | b1459461f1e0abd5c28317d6bff6f2ca612a719d (diff) | |
parent | 1b40efd772f4419fbc1a8940506424246985c333 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/arm/scsi.h | 6 | ||||
-rw-r--r-- | drivers/scsi/libata-core.c | 10 | ||||
-rw-r--r-- | drivers/scsi/sg.c | 5 |
3 files changed, 7 insertions, 14 deletions
diff --git a/drivers/scsi/arm/scsi.h b/drivers/scsi/arm/scsi.h index 48e1c4d9738b..19937640e2e7 100644 --- a/drivers/scsi/arm/scsi.h +++ b/drivers/scsi/arm/scsi.h | |||
@@ -10,6 +10,8 @@ | |||
10 | * Commonly used scsi driver functions. | 10 | * Commonly used scsi driver functions. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/scatterlist.h> | ||
14 | |||
13 | #define BELT_AND_BRACES | 15 | #define BELT_AND_BRACES |
14 | 16 | ||
15 | /* | 17 | /* |
@@ -22,9 +24,7 @@ static inline int copy_SCp_to_sg(struct scatterlist *sg, Scsi_Pointer *SCp, int | |||
22 | 24 | ||
23 | BUG_ON(bufs + 1 > max); | 25 | BUG_ON(bufs + 1 > max); |
24 | 26 | ||
25 | sg->page = virt_to_page(SCp->ptr); | 27 | sg_set_buf(sg, SCp->ptr, SCp->this_residual); |
26 | sg->offset = offset_in_page(SCp->ptr); | ||
27 | sg->length = SCp->this_residual; | ||
28 | 28 | ||
29 | if (bufs) | 29 | if (bufs) |
30 | memcpy(sg + 1, SCp->buffer + 1, | 30 | memcpy(sg + 1, SCp->buffer + 1, |
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index b1b1c6f01419..5ca97605ff35 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/suspend.h> | 49 | #include <linux/suspend.h> |
50 | #include <linux/workqueue.h> | 50 | #include <linux/workqueue.h> |
51 | #include <linux/jiffies.h> | 51 | #include <linux/jiffies.h> |
52 | #include <linux/scatterlist.h> | ||
52 | #include <scsi/scsi.h> | 53 | #include <scsi/scsi.h> |
53 | #include "scsi.h" | 54 | #include "scsi.h" |
54 | #include "scsi_priv.h" | 55 | #include "scsi_priv.h" |
@@ -2576,19 +2577,12 @@ void ata_qc_prep(struct ata_queued_cmd *qc) | |||
2576 | 2577 | ||
2577 | void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf, unsigned int buflen) | 2578 | void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf, unsigned int buflen) |
2578 | { | 2579 | { |
2579 | struct scatterlist *sg; | ||
2580 | |||
2581 | qc->flags |= ATA_QCFLAG_SINGLE; | 2580 | qc->flags |= ATA_QCFLAG_SINGLE; |
2582 | 2581 | ||
2583 | memset(&qc->sgent, 0, sizeof(qc->sgent)); | ||
2584 | qc->sg = &qc->sgent; | 2582 | qc->sg = &qc->sgent; |
2585 | qc->n_elem = 1; | 2583 | qc->n_elem = 1; |
2586 | qc->buf_virt = buf; | 2584 | qc->buf_virt = buf; |
2587 | 2585 | sg_init_one(qc->sg, buf, buflen); | |
2588 | sg = qc->sg; | ||
2589 | sg->page = virt_to_page(buf); | ||
2590 | sg->offset = (unsigned long) buf & ~PAGE_MASK; | ||
2591 | sg->length = buflen; | ||
2592 | } | 2586 | } |
2593 | 2587 | ||
2594 | /** | 2588 | /** |
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 2d30b46806bf..d86d5c26061d 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c | |||
@@ -49,6 +49,7 @@ static int sg_version_num = 30533; /* 2 digits for each component */ | |||
49 | #include <linux/seq_file.h> | 49 | #include <linux/seq_file.h> |
50 | #include <linux/blkdev.h> | 50 | #include <linux/blkdev.h> |
51 | #include <linux/delay.h> | 51 | #include <linux/delay.h> |
52 | #include <linux/scatterlist.h> | ||
52 | 53 | ||
53 | #include "scsi.h" | 54 | #include "scsi.h" |
54 | #include <scsi/scsi_dbg.h> | 55 | #include <scsi/scsi_dbg.h> |
@@ -1996,9 +1997,7 @@ sg_build_indirect(Sg_scatter_hold * schp, Sg_fd * sfp, int buff_size) | |||
1996 | if (!p) | 1997 | if (!p) |
1997 | break; | 1998 | break; |
1998 | } | 1999 | } |
1999 | sclp->page = virt_to_page(p); | 2000 | sg_set_buf(sclp, p, ret_sz); |
2000 | sclp->offset = offset_in_page(p); | ||
2001 | sclp->length = ret_sz; | ||
2002 | 2001 | ||
2003 | SCSI_LOG_TIMEOUT(5, printk("sg_build_build: k=%d, a=0x%p, len=%d\n", | 2002 | SCSI_LOG_TIMEOUT(5, printk("sg_build_build: k=%d, a=0x%p, len=%d\n", |
2004 | k, sg_scatg2virt(sclp), ret_sz)); | 2003 | k, sg_scatg2virt(sclp), ret_sz)); |