diff options
| author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-22 22:11:06 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-22 22:11:06 -0400 |
| commit | 69450bb5eb8e9df28281c62f98e971c9969dc4ff (patch) | |
| tree | 85991e6e8b74cb08b5013fd7e419c3df67d23e35 /drivers/scsi/ps3rom.c | |
| parent | e38f981758118d829cd40cfe9c09e3fa81e422aa (diff) | |
| parent | d6ec084200c37683278c821338f74ddf21ab80f5 (diff) | |
Merge branch 'sg' of git://git.kernel.dk/linux-2.6-block
* 'sg' of git://git.kernel.dk/linux-2.6-block:
Add CONFIG_DEBUG_SG sg validation
Change table chaining layout
Update arch/ to use sg helpers
Update swiotlb to use sg helpers
Update net/ to use sg helpers
Update fs/ to use sg helpers
[SG] Update drivers to use sg helpers
[SG] Update crypto/ to sg helpers
[SG] Update block layer to use sg helpers
[SG] Add helpers for manipulating SG entries
Diffstat (limited to 'drivers/scsi/ps3rom.c')
| -rw-r--r-- | drivers/scsi/ps3rom.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/ps3rom.c b/drivers/scsi/ps3rom.c index 0f43d1d046d9..03f19b8d19c9 100644 --- a/drivers/scsi/ps3rom.c +++ b/drivers/scsi/ps3rom.c | |||
| @@ -111,14 +111,14 @@ static int fill_from_dev_buffer(struct scsi_cmnd *cmd, const void *buf) | |||
| 111 | req_len = act_len = 0; | 111 | req_len = act_len = 0; |
| 112 | scsi_for_each_sg(cmd, sgpnt, scsi_sg_count(cmd), k) { | 112 | scsi_for_each_sg(cmd, sgpnt, scsi_sg_count(cmd), k) { |
| 113 | if (active) { | 113 | if (active) { |
| 114 | kaddr = kmap_atomic(sgpnt->page, KM_IRQ0); | 114 | kaddr = kmap_atomic(sg_page(sgpnt), KM_IRQ0); |
| 115 | len = sgpnt->length; | 115 | len = sgpnt->length; |
| 116 | if ((req_len + len) > buflen) { | 116 | if ((req_len + len) > buflen) { |
| 117 | active = 0; | 117 | active = 0; |
| 118 | len = buflen - req_len; | 118 | len = buflen - req_len; |
| 119 | } | 119 | } |
| 120 | memcpy(kaddr + sgpnt->offset, buf + req_len, len); | 120 | memcpy(kaddr + sgpnt->offset, buf + req_len, len); |
| 121 | flush_kernel_dcache_page(sgpnt->page); | 121 | flush_kernel_dcache_page(sg_page(sgpnt)); |
| 122 | kunmap_atomic(kaddr, KM_IRQ0); | 122 | kunmap_atomic(kaddr, KM_IRQ0); |
| 123 | act_len += len; | 123 | act_len += len; |
| 124 | } | 124 | } |
| @@ -147,7 +147,7 @@ static int fetch_to_dev_buffer(struct scsi_cmnd *cmd, void *buf) | |||
| 147 | 147 | ||
| 148 | req_len = fin = 0; | 148 | req_len = fin = 0; |
| 149 | scsi_for_each_sg(cmd, sgpnt, scsi_sg_count(cmd), k) { | 149 | scsi_for_each_sg(cmd, sgpnt, scsi_sg_count(cmd), k) { |
| 150 | kaddr = kmap_atomic(sgpnt->page, KM_IRQ0); | 150 | kaddr = kmap_atomic(sg_page(sgpnt->page), KM_IRQ0); |
| 151 | len = sgpnt->length; | 151 | len = sgpnt->length; |
| 152 | if ((req_len + len) > buflen) { | 152 | if ((req_len + len) > buflen) { |
| 153 | len = buflen - req_len; | 153 | len = buflen - req_len; |
