diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 14:25:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 14:25:31 -0400 |
commit | 2cca775baecbfede2fec20c99add709232311fe7 (patch) | |
tree | b0eefe80881d263ba7976174144ae4e9cf238425 /arch/ia64/hp | |
parent | eddeb0e2d863e3941d8768e70cb50c6120e61fa0 (diff) | |
parent | 94795b61e84994a3b058f92d041d1fb3d869c7d5 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (137 commits)
[SCSI] iscsi: bidi support for iscsi_tcp
[SCSI] iscsi: bidi support at the generic libiscsi level
[SCSI] iscsi: extended cdb support
[SCSI] zfcp: Fix error handling for blocked unit for send FCP command
[SCSI] zfcp: Remove zfcp_erp_wait from slave destory handler to fix deadlock
[SCSI] zfcp: fix 31 bit compile warnings
[SCSI] bsg: no need to set BSG_F_BLOCK bit in bsg_complete_all_commands
[SCSI] bsg: remove minor in struct bsg_device
[SCSI] bsg: use better helper list functions
[SCSI] bsg: replace kobject_get with blk_get_queue
[SCSI] bsg: takes a ref to struct device in fops->open
[SCSI] qla1280: remove version check
[SCSI] libsas: fix endianness bug in sas_ata
[SCSI] zfcp: fix compiler warning caused by poking inside new semaphore (linux-next)
[SCSI] aacraid: Do not describe check_reset parameter with its value
[SCSI] aacraid: Fix down_interruptible() to check the return value
[SCSI] sun3_scsi_vme: add MODULE_LICENSE
[SCSI] st: rename flush_write_buffer()
[SCSI] tgt: use KMEM_CACHE macro
[SCSI] initio: fix big endian problems for auto request sense
...
Diffstat (limited to 'arch/ia64/hp')
-rw-r--r-- | arch/ia64/hp/sim/simscsi.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/arch/ia64/hp/sim/simscsi.c b/arch/ia64/hp/sim/simscsi.c index 7661bb065fa5..3a078ad3aa44 100644 --- a/arch/ia64/hp/sim/simscsi.c +++ b/arch/ia64/hp/sim/simscsi.c | |||
@@ -201,22 +201,6 @@ simscsi_readwrite10 (struct scsi_cmnd *sc, int mode) | |||
201 | simscsi_sg_readwrite(sc, mode, offset); | 201 | simscsi_sg_readwrite(sc, mode, offset); |
202 | } | 202 | } |
203 | 203 | ||
204 | static void simscsi_fillresult(struct scsi_cmnd *sc, char *buf, unsigned len) | ||
205 | { | ||
206 | |||
207 | int i; | ||
208 | unsigned thislen; | ||
209 | struct scatterlist *slp; | ||
210 | |||
211 | scsi_for_each_sg(sc, slp, scsi_sg_count(sc), i) { | ||
212 | if (!len) | ||
213 | break; | ||
214 | thislen = min(len, slp->length); | ||
215 | memcpy(sg_virt(slp), buf, thislen); | ||
216 | len -= thislen; | ||
217 | } | ||
218 | } | ||
219 | |||
220 | static int | 204 | static int |
221 | simscsi_queuecommand (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *)) | 205 | simscsi_queuecommand (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *)) |
222 | { | 206 | { |
@@ -258,7 +242,7 @@ simscsi_queuecommand (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *)) | |||
258 | buf[6] = 0; /* reserved */ | 242 | buf[6] = 0; /* reserved */ |
259 | buf[7] = 0; /* various flags */ | 243 | buf[7] = 0; /* various flags */ |
260 | memcpy(buf + 8, "HP SIMULATED DISK 0.00", 28); | 244 | memcpy(buf + 8, "HP SIMULATED DISK 0.00", 28); |
261 | simscsi_fillresult(sc, buf, 36); | 245 | scsi_sg_copy_from_buffer(sc, buf, 36); |
262 | sc->result = GOOD; | 246 | sc->result = GOOD; |
263 | break; | 247 | break; |
264 | 248 | ||
@@ -306,14 +290,15 @@ simscsi_queuecommand (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *)) | |||
306 | buf[5] = 0; | 290 | buf[5] = 0; |
307 | buf[6] = 2; | 291 | buf[6] = 2; |
308 | buf[7] = 0; | 292 | buf[7] = 0; |
309 | simscsi_fillresult(sc, buf, 8); | 293 | scsi_sg_copy_from_buffer(sc, buf, 8); |
310 | sc->result = GOOD; | 294 | sc->result = GOOD; |
311 | break; | 295 | break; |
312 | 296 | ||
313 | case MODE_SENSE: | 297 | case MODE_SENSE: |
314 | case MODE_SENSE_10: | 298 | case MODE_SENSE_10: |
315 | /* sd.c uses this to determine whether disk does write-caching. */ | 299 | /* sd.c uses this to determine whether disk does write-caching. */ |
316 | simscsi_fillresult(sc, (char *)empty_zero_page, scsi_bufflen(sc)); | 300 | scsi_sg_copy_from_buffer(sc, (char *)empty_zero_page, |
301 | PAGE_SIZE); | ||
317 | sc->result = GOOD; | 302 | sc->result = GOOD; |
318 | break; | 303 | break; |
319 | 304 | ||