aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/53c700.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/53c700.h')
-rw-r--r--drivers/scsi/53c700.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/scsi/53c700.h b/drivers/scsi/53c700.h
index f5c3caf344a7..f38822db4210 100644
--- a/drivers/scsi/53c700.h
+++ b/drivers/scsi/53c700.h
@@ -415,31 +415,31 @@ struct NCR_700_Host_Parameters {
415#define NCR_710_MIN_XFERP 0 415#define NCR_710_MIN_XFERP 0
416#define NCR_700_MIN_PERIOD 25 /* for SDTR message, 100ns */ 416#define NCR_700_MIN_PERIOD 25 /* for SDTR message, 100ns */
417 417
418#define script_patch_32(script, symbol, value) \ 418#define script_patch_32(dev, script, symbol, value) \
419{ \ 419{ \
420 int i; \ 420 int i; \
421 for(i=0; i< (sizeof(A_##symbol##_used) / sizeof(__u32)); i++) { \ 421 for(i=0; i< (sizeof(A_##symbol##_used) / sizeof(__u32)); i++) { \
422 __u32 val = bS_to_cpu((script)[A_##symbol##_used[i]]) + value; \ 422 __u32 val = bS_to_cpu((script)[A_##symbol##_used[i]]) + value; \
423 (script)[A_##symbol##_used[i]] = bS_to_host(val); \ 423 (script)[A_##symbol##_used[i]] = bS_to_host(val); \
424 dma_cache_sync(&(script)[A_##symbol##_used[i]], 4, DMA_TO_DEVICE); \ 424 dma_cache_sync((dev), &(script)[A_##symbol##_used[i]], 4, DMA_TO_DEVICE); \
425 DEBUG((" script, patching %s at %d to 0x%lx\n", \ 425 DEBUG((" script, patching %s at %d to 0x%lx\n", \
426 #symbol, A_##symbol##_used[i], (value))); \ 426 #symbol, A_##symbol##_used[i], (value))); \
427 } \ 427 } \
428} 428}
429 429
430#define script_patch_32_abs(script, symbol, value) \ 430#define script_patch_32_abs(dev, script, symbol, value) \
431{ \ 431{ \
432 int i; \ 432 int i; \
433 for(i=0; i< (sizeof(A_##symbol##_used) / sizeof(__u32)); i++) { \ 433 for(i=0; i< (sizeof(A_##symbol##_used) / sizeof(__u32)); i++) { \
434 (script)[A_##symbol##_used[i]] = bS_to_host(value); \ 434 (script)[A_##symbol##_used[i]] = bS_to_host(value); \
435 dma_cache_sync(&(script)[A_##symbol##_used[i]], 4, DMA_TO_DEVICE); \ 435 dma_cache_sync((dev), &(script)[A_##symbol##_used[i]], 4, DMA_TO_DEVICE); \
436 DEBUG((" script, patching %s at %d to 0x%lx\n", \ 436 DEBUG((" script, patching %s at %d to 0x%lx\n", \
437 #symbol, A_##symbol##_used[i], (value))); \ 437 #symbol, A_##symbol##_used[i], (value))); \
438 } \ 438 } \
439} 439}
440 440
441/* Used for patching the SCSI ID in the SELECT instruction */ 441/* Used for patching the SCSI ID in the SELECT instruction */
442#define script_patch_ID(script, symbol, value) \ 442#define script_patch_ID(dev, script, symbol, value) \
443{ \ 443{ \
444 int i; \ 444 int i; \
445 for(i=0; i< (sizeof(A_##symbol##_used) / sizeof(__u32)); i++) { \ 445 for(i=0; i< (sizeof(A_##symbol##_used) / sizeof(__u32)); i++) { \
@@ -447,13 +447,13 @@ struct NCR_700_Host_Parameters {
447 val &= 0xff00ffff; \ 447 val &= 0xff00ffff; \
448 val |= ((value) & 0xff) << 16; \ 448 val |= ((value) & 0xff) << 16; \
449 (script)[A_##symbol##_used[i]] = bS_to_host(val); \ 449 (script)[A_##symbol##_used[i]] = bS_to_host(val); \
450 dma_cache_sync(&(script)[A_##symbol##_used[i]], 4, DMA_TO_DEVICE); \ 450 dma_cache_sync((dev), &(script)[A_##symbol##_used[i]], 4, DMA_TO_DEVICE); \
451 DEBUG((" script, patching ID field %s at %d to 0x%x\n", \ 451 DEBUG((" script, patching ID field %s at %d to 0x%x\n", \
452 #symbol, A_##symbol##_used[i], val)); \ 452 #symbol, A_##symbol##_used[i], val)); \
453 } \ 453 } \
454} 454}
455 455
456#define script_patch_16(script, symbol, value) \ 456#define script_patch_16(dev, script, symbol, value) \
457{ \ 457{ \
458 int i; \ 458 int i; \
459 for(i=0; i< (sizeof(A_##symbol##_used) / sizeof(__u32)); i++) { \ 459 for(i=0; i< (sizeof(A_##symbol##_used) / sizeof(__u32)); i++) { \
@@ -461,7 +461,7 @@ struct NCR_700_Host_Parameters {
461 val &= 0xffff0000; \ 461 val &= 0xffff0000; \
462 val |= ((value) & 0xffff); \ 462 val |= ((value) & 0xffff); \
463 (script)[A_##symbol##_used[i]] = bS_to_host(val); \ 463 (script)[A_##symbol##_used[i]] = bS_to_host(val); \
464 dma_cache_sync(&(script)[A_##symbol##_used[i]], 4, DMA_TO_DEVICE); \ 464 dma_cache_sync((dev), &(script)[A_##symbol##_used[i]], 4, DMA_TO_DEVICE); \
465 DEBUG((" script, patching short field %s at %d to 0x%x\n", \ 465 DEBUG((" script, patching short field %s at %d to 0x%x\n", \
466 #symbol, A_##symbol##_used[i], val)); \ 466 #symbol, A_##symbol##_used[i], val)); \
467 } \ 467 } \