diff options
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/53c700.c | 82 | ||||
-rw-r--r-- | drivers/scsi/53c700.h | 16 | ||||
-rw-r--r-- | drivers/scsi/aic94xx/aic94xx.h | 4 | ||||
-rw-r--r-- | drivers/scsi/aic94xx/aic94xx_hwi.c | 2 | ||||
-rw-r--r-- | drivers/scsi/aic94xx/aic94xx_init.c | 4 | ||||
-rw-r--r-- | drivers/scsi/ide-scsi.c | 6 | ||||
-rw-r--r-- | drivers/scsi/ipr.c | 2 | ||||
-rw-r--r-- | drivers/scsi/libsas/sas_init.c | 2 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 2 | ||||
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_os.c | 2 | ||||
-rw-r--r-- | drivers/scsi/scsi.c | 2 | ||||
-rw-r--r-- | drivers/scsi/scsi_lib.c | 4 | ||||
-rw-r--r-- | drivers/scsi/scsi_tgt_lib.c | 2 |
13 files changed, 71 insertions, 59 deletions
diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c index 335a25540c08..68103e508db7 100644 --- a/drivers/scsi/53c700.c +++ b/drivers/scsi/53c700.c | |||
@@ -313,7 +313,7 @@ NCR_700_detect(struct scsi_host_template *tpnt, | |||
313 | hostdata->status = memory + STATUS_OFFSET; | 313 | hostdata->status = memory + STATUS_OFFSET; |
314 | /* all of these offsets are L1_CACHE_BYTES separated. It is fatal | 314 | /* all of these offsets are L1_CACHE_BYTES separated. It is fatal |
315 | * if this isn't sufficient separation to avoid dma flushing issues */ | 315 | * if this isn't sufficient separation to avoid dma flushing issues */ |
316 | BUG_ON(!dma_is_consistent(pScript) && L1_CACHE_BYTES < dma_get_cache_alignment()); | 316 | BUG_ON(!dma_is_consistent(hostdata->dev, pScript) && L1_CACHE_BYTES < dma_get_cache_alignment()); |
317 | hostdata->slots = (struct NCR_700_command_slot *)(memory + SLOTS_OFFSET); | 317 | hostdata->slots = (struct NCR_700_command_slot *)(memory + SLOTS_OFFSET); |
318 | hostdata->dev = dev; | 318 | hostdata->dev = dev; |
319 | 319 | ||
@@ -362,11 +362,11 @@ NCR_700_detect(struct scsi_host_template *tpnt, | |||
362 | for (j = 0; j < PATCHES; j++) | 362 | for (j = 0; j < PATCHES; j++) |
363 | script[LABELPATCHES[j]] = bS_to_host(pScript + SCRIPT[LABELPATCHES[j]]); | 363 | script[LABELPATCHES[j]] = bS_to_host(pScript + SCRIPT[LABELPATCHES[j]]); |
364 | /* now patch up fixed addresses. */ | 364 | /* now patch up fixed addresses. */ |
365 | script_patch_32(script, MessageLocation, | 365 | script_patch_32(hostdata->dev, script, MessageLocation, |
366 | pScript + MSGOUT_OFFSET); | 366 | pScript + MSGOUT_OFFSET); |
367 | script_patch_32(script, StatusAddress, | 367 | script_patch_32(hostdata->dev, script, StatusAddress, |
368 | pScript + STATUS_OFFSET); | 368 | pScript + STATUS_OFFSET); |
369 | script_patch_32(script, ReceiveMsgAddress, | 369 | script_patch_32(hostdata->dev, script, ReceiveMsgAddress, |
370 | pScript + MSGIN_OFFSET); | 370 | pScript + MSGIN_OFFSET); |
371 | 371 | ||
372 | hostdata->script = script; | 372 | hostdata->script = script; |
@@ -821,8 +821,9 @@ process_extended_message(struct Scsi_Host *host, | |||
821 | shost_printk(KERN_WARNING, host, | 821 | shost_printk(KERN_WARNING, host, |
822 | "Unexpected SDTR msg\n"); | 822 | "Unexpected SDTR msg\n"); |
823 | hostdata->msgout[0] = A_REJECT_MSG; | 823 | hostdata->msgout[0] = A_REJECT_MSG; |
824 | dma_cache_sync(hostdata->msgout, 1, DMA_TO_DEVICE); | 824 | dma_cache_sync(hostdata->dev, hostdata->msgout, 1, DMA_TO_DEVICE); |
825 | script_patch_16(hostdata->script, MessageCount, 1); | 825 | script_patch_16(hostdata->dev, hostdata->script, |
826 | MessageCount, 1); | ||
826 | /* SendMsgOut returns, so set up the return | 827 | /* SendMsgOut returns, so set up the return |
827 | * address */ | 828 | * address */ |
828 | resume_offset = hostdata->pScript + Ent_SendMessageWithATN; | 829 | resume_offset = hostdata->pScript + Ent_SendMessageWithATN; |
@@ -833,8 +834,9 @@ process_extended_message(struct Scsi_Host *host, | |||
833 | printk(KERN_INFO "scsi%d: (%d:%d), Unsolicited WDTR after CMD, Rejecting\n", | 834 | printk(KERN_INFO "scsi%d: (%d:%d), Unsolicited WDTR after CMD, Rejecting\n", |
834 | host->host_no, pun, lun); | 835 | host->host_no, pun, lun); |
835 | hostdata->msgout[0] = A_REJECT_MSG; | 836 | hostdata->msgout[0] = A_REJECT_MSG; |
836 | dma_cache_sync(hostdata->msgout, 1, DMA_TO_DEVICE); | 837 | dma_cache_sync(hostdata->dev, hostdata->msgout, 1, DMA_TO_DEVICE); |
837 | script_patch_16(hostdata->script, MessageCount, 1); | 838 | script_patch_16(hostdata->dev, hostdata->script, MessageCount, |
839 | 1); | ||
838 | resume_offset = hostdata->pScript + Ent_SendMessageWithATN; | 840 | resume_offset = hostdata->pScript + Ent_SendMessageWithATN; |
839 | 841 | ||
840 | break; | 842 | break; |
@@ -847,8 +849,9 @@ process_extended_message(struct Scsi_Host *host, | |||
847 | printk("\n"); | 849 | printk("\n"); |
848 | /* just reject it */ | 850 | /* just reject it */ |
849 | hostdata->msgout[0] = A_REJECT_MSG; | 851 | hostdata->msgout[0] = A_REJECT_MSG; |
850 | dma_cache_sync(hostdata->msgout, 1, DMA_TO_DEVICE); | 852 | dma_cache_sync(hostdata->dev, hostdata->msgout, 1, DMA_TO_DEVICE); |
851 | script_patch_16(hostdata->script, MessageCount, 1); | 853 | script_patch_16(hostdata->dev, hostdata->script, MessageCount, |
854 | 1); | ||
852 | /* SendMsgOut returns, so set up the return | 855 | /* SendMsgOut returns, so set up the return |
853 | * address */ | 856 | * address */ |
854 | resume_offset = hostdata->pScript + Ent_SendMessageWithATN; | 857 | resume_offset = hostdata->pScript + Ent_SendMessageWithATN; |
@@ -929,8 +932,9 @@ process_message(struct Scsi_Host *host, struct NCR_700_Host_Parameters *hostdata | |||
929 | printk("\n"); | 932 | printk("\n"); |
930 | /* just reject it */ | 933 | /* just reject it */ |
931 | hostdata->msgout[0] = A_REJECT_MSG; | 934 | hostdata->msgout[0] = A_REJECT_MSG; |
932 | dma_cache_sync(hostdata->msgout, 1, DMA_TO_DEVICE); | 935 | dma_cache_sync(hostdata->dev, hostdata->msgout, 1, DMA_TO_DEVICE); |
933 | script_patch_16(hostdata->script, MessageCount, 1); | 936 | script_patch_16(hostdata->dev, hostdata->script, MessageCount, |
937 | 1); | ||
934 | /* SendMsgOut returns, so set up the return | 938 | /* SendMsgOut returns, so set up the return |
935 | * address */ | 939 | * address */ |
936 | resume_offset = hostdata->pScript + Ent_SendMessageWithATN; | 940 | resume_offset = hostdata->pScript + Ent_SendMessageWithATN; |
@@ -939,7 +943,7 @@ process_message(struct Scsi_Host *host, struct NCR_700_Host_Parameters *hostdata | |||
939 | } | 943 | } |
940 | NCR_700_writel(temp, host, TEMP_REG); | 944 | NCR_700_writel(temp, host, TEMP_REG); |
941 | /* set us up to receive another message */ | 945 | /* set us up to receive another message */ |
942 | dma_cache_sync(hostdata->msgin, MSG_ARRAY_SIZE, DMA_FROM_DEVICE); | 946 | dma_cache_sync(hostdata->dev, hostdata->msgin, MSG_ARRAY_SIZE, DMA_FROM_DEVICE); |
943 | return resume_offset; | 947 | return resume_offset; |
944 | } | 948 | } |
945 | 949 | ||
@@ -1019,9 +1023,9 @@ process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp, | |||
1019 | slot->SG[1].ins = bS_to_host(SCRIPT_RETURN); | 1023 | slot->SG[1].ins = bS_to_host(SCRIPT_RETURN); |
1020 | slot->SG[1].pAddr = 0; | 1024 | slot->SG[1].pAddr = 0; |
1021 | slot->resume_offset = hostdata->pScript; | 1025 | slot->resume_offset = hostdata->pScript; |
1022 | dma_cache_sync(slot->SG, sizeof(slot->SG[0])*2, DMA_TO_DEVICE); | 1026 | dma_cache_sync(hostdata->dev, slot->SG, sizeof(slot->SG[0])*2, DMA_TO_DEVICE); |
1023 | dma_cache_sync(SCp->sense_buffer, sizeof(SCp->sense_buffer), DMA_FROM_DEVICE); | 1027 | dma_cache_sync(hostdata->dev, SCp->sense_buffer, sizeof(SCp->sense_buffer), DMA_FROM_DEVICE); |
1024 | 1028 | ||
1025 | /* queue the command for reissue */ | 1029 | /* queue the command for reissue */ |
1026 | slot->state = NCR_700_SLOT_QUEUED; | 1030 | slot->state = NCR_700_SLOT_QUEUED; |
1027 | slot->flags = NCR_700_FLAG_AUTOSENSE; | 1031 | slot->flags = NCR_700_FLAG_AUTOSENSE; |
@@ -1136,11 +1140,12 @@ process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp, | |||
1136 | hostdata->cmd = slot->cmnd; | 1140 | hostdata->cmd = slot->cmnd; |
1137 | 1141 | ||
1138 | /* re-patch for this command */ | 1142 | /* re-patch for this command */ |
1139 | script_patch_32_abs(hostdata->script, CommandAddress, | 1143 | script_patch_32_abs(hostdata->dev, hostdata->script, |
1140 | slot->pCmd); | 1144 | CommandAddress, slot->pCmd); |
1141 | script_patch_16(hostdata->script, | 1145 | script_patch_16(hostdata->dev, hostdata->script, |
1142 | CommandCount, slot->cmnd->cmd_len); | 1146 | CommandCount, slot->cmnd->cmd_len); |
1143 | script_patch_32_abs(hostdata->script, SGScriptStartAddress, | 1147 | script_patch_32_abs(hostdata->dev, hostdata->script, |
1148 | SGScriptStartAddress, | ||
1144 | to32bit(&slot->pSG[0].ins)); | 1149 | to32bit(&slot->pSG[0].ins)); |
1145 | 1150 | ||
1146 | /* Note: setting SXFER only works if we're | 1151 | /* Note: setting SXFER only works if we're |
@@ -1150,13 +1155,13 @@ process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp, | |||
1150 | * should therefore always clear ACK */ | 1155 | * should therefore always clear ACK */ |
1151 | NCR_700_writeb(NCR_700_get_SXFER(hostdata->cmd->device), | 1156 | NCR_700_writeb(NCR_700_get_SXFER(hostdata->cmd->device), |
1152 | host, SXFER_REG); | 1157 | host, SXFER_REG); |
1153 | dma_cache_sync(hostdata->msgin, | 1158 | dma_cache_sync(hostdata->dev, hostdata->msgin, |
1154 | MSG_ARRAY_SIZE, DMA_FROM_DEVICE); | 1159 | MSG_ARRAY_SIZE, DMA_FROM_DEVICE); |
1155 | dma_cache_sync(hostdata->msgout, | 1160 | dma_cache_sync(hostdata->dev, hostdata->msgout, |
1156 | MSG_ARRAY_SIZE, DMA_TO_DEVICE); | 1161 | MSG_ARRAY_SIZE, DMA_TO_DEVICE); |
1157 | /* I'm just being paranoid here, the command should | 1162 | /* I'm just being paranoid here, the command should |
1158 | * already have been flushed from the cache */ | 1163 | * already have been flushed from the cache */ |
1159 | dma_cache_sync(slot->cmnd->cmnd, | 1164 | dma_cache_sync(hostdata->dev, slot->cmnd->cmnd, |
1160 | slot->cmnd->cmd_len, DMA_TO_DEVICE); | 1165 | slot->cmnd->cmd_len, DMA_TO_DEVICE); |
1161 | 1166 | ||
1162 | 1167 | ||
@@ -1220,7 +1225,7 @@ process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp, | |||
1220 | hostdata->reselection_id = reselection_id; | 1225 | hostdata->reselection_id = reselection_id; |
1221 | /* just in case we have a stale simple tag message, clear it */ | 1226 | /* just in case we have a stale simple tag message, clear it */ |
1222 | hostdata->msgin[1] = 0; | 1227 | hostdata->msgin[1] = 0; |
1223 | dma_cache_sync(hostdata->msgin, | 1228 | dma_cache_sync(hostdata->dev, hostdata->msgin, |
1224 | MSG_ARRAY_SIZE, DMA_BIDIRECTIONAL); | 1229 | MSG_ARRAY_SIZE, DMA_BIDIRECTIONAL); |
1225 | if(hostdata->tag_negotiated & (1<<reselection_id)) { | 1230 | if(hostdata->tag_negotiated & (1<<reselection_id)) { |
1226 | resume_offset = hostdata->pScript + Ent_GetReselectionWithTag; | 1231 | resume_offset = hostdata->pScript + Ent_GetReselectionWithTag; |
@@ -1336,7 +1341,7 @@ process_selection(struct Scsi_Host *host, __u32 dsp) | |||
1336 | hostdata->cmd = NULL; | 1341 | hostdata->cmd = NULL; |
1337 | /* clear any stale simple tag message */ | 1342 | /* clear any stale simple tag message */ |
1338 | hostdata->msgin[1] = 0; | 1343 | hostdata->msgin[1] = 0; |
1339 | dma_cache_sync(hostdata->msgin, MSG_ARRAY_SIZE, | 1344 | dma_cache_sync(hostdata->dev, hostdata->msgin, MSG_ARRAY_SIZE, |
1340 | DMA_BIDIRECTIONAL); | 1345 | DMA_BIDIRECTIONAL); |
1341 | 1346 | ||
1342 | if(id == 0xff) { | 1347 | if(id == 0xff) { |
@@ -1433,29 +1438,30 @@ NCR_700_start_command(struct scsi_cmnd *SCp) | |||
1433 | NCR_700_set_flag(SCp->device, NCR_700_DEV_BEGIN_SYNC_NEGOTIATION); | 1438 | NCR_700_set_flag(SCp->device, NCR_700_DEV_BEGIN_SYNC_NEGOTIATION); |
1434 | } | 1439 | } |
1435 | 1440 | ||
1436 | script_patch_16(hostdata->script, MessageCount, count); | 1441 | script_patch_16(hostdata->dev, hostdata->script, MessageCount, count); |
1437 | 1442 | ||
1438 | 1443 | ||
1439 | script_patch_ID(hostdata->script, | 1444 | script_patch_ID(hostdata->dev, hostdata->script, |
1440 | Device_ID, 1<<scmd_id(SCp)); | 1445 | Device_ID, 1<<scmd_id(SCp)); |
1441 | 1446 | ||
1442 | script_patch_32_abs(hostdata->script, CommandAddress, | 1447 | script_patch_32_abs(hostdata->dev, hostdata->script, CommandAddress, |
1443 | slot->pCmd); | 1448 | slot->pCmd); |
1444 | script_patch_16(hostdata->script, CommandCount, SCp->cmd_len); | 1449 | script_patch_16(hostdata->dev, hostdata->script, CommandCount, |
1450 | SCp->cmd_len); | ||
1445 | /* finally plumb the beginning of the SG list into the script | 1451 | /* finally plumb the beginning of the SG list into the script |
1446 | * */ | 1452 | * */ |
1447 | script_patch_32_abs(hostdata->script, SGScriptStartAddress, | 1453 | script_patch_32_abs(hostdata->dev, hostdata->script, |
1448 | to32bit(&slot->pSG[0].ins)); | 1454 | SGScriptStartAddress, to32bit(&slot->pSG[0].ins)); |
1449 | NCR_700_clear_fifo(SCp->device->host); | 1455 | NCR_700_clear_fifo(SCp->device->host); |
1450 | 1456 | ||
1451 | if(slot->resume_offset == 0) | 1457 | if(slot->resume_offset == 0) |
1452 | slot->resume_offset = hostdata->pScript; | 1458 | slot->resume_offset = hostdata->pScript; |
1453 | /* now perform all the writebacks and invalidates */ | 1459 | /* now perform all the writebacks and invalidates */ |
1454 | dma_cache_sync(hostdata->msgout, count, DMA_TO_DEVICE); | 1460 | dma_cache_sync(hostdata->dev, hostdata->msgout, count, DMA_TO_DEVICE); |
1455 | dma_cache_sync(hostdata->msgin, MSG_ARRAY_SIZE, | 1461 | dma_cache_sync(hostdata->dev, hostdata->msgin, MSG_ARRAY_SIZE, |
1456 | DMA_FROM_DEVICE); | 1462 | DMA_FROM_DEVICE); |
1457 | dma_cache_sync(SCp->cmnd, SCp->cmd_len, DMA_TO_DEVICE); | 1463 | dma_cache_sync(hostdata->dev, SCp->cmnd, SCp->cmd_len, DMA_TO_DEVICE); |
1458 | dma_cache_sync(hostdata->status, 1, DMA_FROM_DEVICE); | 1464 | dma_cache_sync(hostdata->dev, hostdata->status, 1, DMA_FROM_DEVICE); |
1459 | 1465 | ||
1460 | /* set the synchronous period/offset */ | 1466 | /* set the synchronous period/offset */ |
1461 | NCR_700_writeb(NCR_700_get_SXFER(SCp->device), | 1467 | NCR_700_writeb(NCR_700_get_SXFER(SCp->device), |
@@ -1631,7 +1637,7 @@ NCR_700_intr(int irq, void *dev_id) | |||
1631 | slot->SG[i].ins = bS_to_host(SCRIPT_NOP); | 1637 | slot->SG[i].ins = bS_to_host(SCRIPT_NOP); |
1632 | slot->SG[i].pAddr = 0; | 1638 | slot->SG[i].pAddr = 0; |
1633 | } | 1639 | } |
1634 | dma_cache_sync(slot->SG, sizeof(slot->SG), DMA_TO_DEVICE); | 1640 | dma_cache_sync(hostdata->dev, slot->SG, sizeof(slot->SG), DMA_TO_DEVICE); |
1635 | /* and pretend we disconnected after | 1641 | /* and pretend we disconnected after |
1636 | * the command phase */ | 1642 | * the command phase */ |
1637 | resume_offset = hostdata->pScript + Ent_MsgInDuringData; | 1643 | resume_offset = hostdata->pScript + Ent_MsgInDuringData; |
@@ -1897,9 +1903,9 @@ NCR_700_queuecommand(struct scsi_cmnd *SCp, void (*done)(struct scsi_cmnd *)) | |||
1897 | } | 1903 | } |
1898 | slot->SG[i].ins = bS_to_host(SCRIPT_RETURN); | 1904 | slot->SG[i].ins = bS_to_host(SCRIPT_RETURN); |
1899 | slot->SG[i].pAddr = 0; | 1905 | slot->SG[i].pAddr = 0; |
1900 | dma_cache_sync(slot->SG, sizeof(slot->SG), DMA_TO_DEVICE); | 1906 | dma_cache_sync(hostdata->dev, slot->SG, sizeof(slot->SG), DMA_TO_DEVICE); |
1901 | DEBUG((" SETTING %08lx to %x\n", | 1907 | DEBUG((" SETTING %08lx to %x\n", |
1902 | (&slot->pSG[i].ins), | 1908 | (&slot->pSG[i].ins), |
1903 | slot->SG[i].ins)); | 1909 | slot->SG[i].ins)); |
1904 | } | 1910 | } |
1905 | slot->resume_offset = 0; | 1911 | slot->resume_offset = 0; |
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 | } \ |
diff --git a/drivers/scsi/aic94xx/aic94xx.h b/drivers/scsi/aic94xx/aic94xx.h index 71a031df7a34..32f513b1b78a 100644 --- a/drivers/scsi/aic94xx/aic94xx.h +++ b/drivers/scsi/aic94xx/aic94xx.h | |||
@@ -56,8 +56,8 @@ | |||
56 | /* 2*ITNL timeout + 1 second */ | 56 | /* 2*ITNL timeout + 1 second */ |
57 | #define AIC94XX_SCB_TIMEOUT (5*HZ) | 57 | #define AIC94XX_SCB_TIMEOUT (5*HZ) |
58 | 58 | ||
59 | extern kmem_cache_t *asd_dma_token_cache; | 59 | extern struct kmem_cache *asd_dma_token_cache; |
60 | extern kmem_cache_t *asd_ascb_cache; | 60 | extern struct kmem_cache *asd_ascb_cache; |
61 | extern char sas_addr_str[2*SAS_ADDR_SIZE + 1]; | 61 | extern char sas_addr_str[2*SAS_ADDR_SIZE + 1]; |
62 | 62 | ||
63 | static inline void asd_stringify_sas_addr(char *p, const u8 *sas_addr) | 63 | static inline void asd_stringify_sas_addr(char *p, const u8 *sas_addr) |
diff --git a/drivers/scsi/aic94xx/aic94xx_hwi.c b/drivers/scsi/aic94xx/aic94xx_hwi.c index af7e01134364..da94e126ca83 100644 --- a/drivers/scsi/aic94xx/aic94xx_hwi.c +++ b/drivers/scsi/aic94xx/aic94xx_hwi.c | |||
@@ -1047,7 +1047,7 @@ irqreturn_t asd_hw_isr(int irq, void *dev_id) | |||
1047 | static inline struct asd_ascb *asd_ascb_alloc(struct asd_ha_struct *asd_ha, | 1047 | static inline struct asd_ascb *asd_ascb_alloc(struct asd_ha_struct *asd_ha, |
1048 | gfp_t gfp_flags) | 1048 | gfp_t gfp_flags) |
1049 | { | 1049 | { |
1050 | extern kmem_cache_t *asd_ascb_cache; | 1050 | extern struct kmem_cache *asd_ascb_cache; |
1051 | struct asd_seq_data *seq = &asd_ha->seq; | 1051 | struct asd_seq_data *seq = &asd_ha->seq; |
1052 | struct asd_ascb *ascb; | 1052 | struct asd_ascb *ascb; |
1053 | unsigned long flags; | 1053 | unsigned long flags; |
diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c index 42302ef05ee5..fbc82b00a418 100644 --- a/drivers/scsi/aic94xx/aic94xx_init.c +++ b/drivers/scsi/aic94xx/aic94xx_init.c | |||
@@ -450,8 +450,8 @@ static inline void asd_destroy_ha_caches(struct asd_ha_struct *asd_ha) | |||
450 | asd_ha->scb_pool = NULL; | 450 | asd_ha->scb_pool = NULL; |
451 | } | 451 | } |
452 | 452 | ||
453 | kmem_cache_t *asd_dma_token_cache; | 453 | struct kmem_cache *asd_dma_token_cache; |
454 | kmem_cache_t *asd_ascb_cache; | 454 | struct kmem_cache *asd_ascb_cache; |
455 | 455 | ||
456 | static int asd_create_global_caches(void) | 456 | static int asd_create_global_caches(void) |
457 | { | 457 | { |
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index 1427a41e8441..8f6b5bf580f6 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c | |||
@@ -110,6 +110,7 @@ typedef struct ide_scsi_obj { | |||
110 | } idescsi_scsi_t; | 110 | } idescsi_scsi_t; |
111 | 111 | ||
112 | static DEFINE_MUTEX(idescsi_ref_mutex); | 112 | static DEFINE_MUTEX(idescsi_ref_mutex); |
113 | static int idescsi_nocd; /* Set by module param to skip cd */ | ||
113 | 114 | ||
114 | #define ide_scsi_g(disk) \ | 115 | #define ide_scsi_g(disk) \ |
115 | container_of((disk)->private_data, struct ide_scsi_obj, driver) | 116 | container_of((disk)->private_data, struct ide_scsi_obj, driver) |
@@ -1127,6 +1128,9 @@ static int ide_scsi_probe(ide_drive_t *drive) | |||
1127 | warned = 1; | 1128 | warned = 1; |
1128 | } | 1129 | } |
1129 | 1130 | ||
1131 | if (idescsi_nocd && drive->media == ide_cdrom) | ||
1132 | return -ENODEV; | ||
1133 | |||
1130 | if (!strstr("ide-scsi", drive->driver_req) || | 1134 | if (!strstr("ide-scsi", drive->driver_req) || |
1131 | !drive->present || | 1135 | !drive->present || |
1132 | drive->media == ide_disk || | 1136 | drive->media == ide_disk || |
@@ -1187,6 +1191,8 @@ static void __exit exit_idescsi_module(void) | |||
1187 | driver_unregister(&idescsi_driver.gen_driver); | 1191 | driver_unregister(&idescsi_driver.gen_driver); |
1188 | } | 1192 | } |
1189 | 1193 | ||
1194 | module_param(idescsi_nocd, int, 0600); | ||
1195 | MODULE_PARM_DESC(idescsi_nocd, "Disable handling of CD-ROMs so they may be driven by ide-cd"); | ||
1190 | module_init(init_idescsi_module); | 1196 | module_init(init_idescsi_module); |
1191 | module_exit(exit_idescsi_module); | 1197 | module_exit(exit_idescsi_module); |
1192 | MODULE_LICENSE("GPL"); | 1198 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index ccd4dafce8e2..b318500785e5 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -6940,7 +6940,7 @@ static int __devinit ipr_alloc_cmd_blks(struct ipr_ioa_cfg *ioa_cfg) | |||
6940 | return -ENOMEM; | 6940 | return -ENOMEM; |
6941 | 6941 | ||
6942 | for (i = 0; i < IPR_NUM_CMD_BLKS; i++) { | 6942 | for (i = 0; i < IPR_NUM_CMD_BLKS; i++) { |
6943 | ipr_cmd = pci_pool_alloc (ioa_cfg->ipr_cmd_pool, SLAB_KERNEL, &dma_addr); | 6943 | ipr_cmd = pci_pool_alloc (ioa_cfg->ipr_cmd_pool, GFP_KERNEL, &dma_addr); |
6944 | 6944 | ||
6945 | if (!ipr_cmd) { | 6945 | if (!ipr_cmd) { |
6946 | ipr_free_cmd_blks(ioa_cfg); | 6946 | ipr_free_cmd_blks(ioa_cfg); |
diff --git a/drivers/scsi/libsas/sas_init.c b/drivers/scsi/libsas/sas_init.c index d65bc4e0f214..2f0c07fc3f48 100644 --- a/drivers/scsi/libsas/sas_init.c +++ b/drivers/scsi/libsas/sas_init.c | |||
@@ -36,7 +36,7 @@ | |||
36 | 36 | ||
37 | #include "../scsi_sas_internal.h" | 37 | #include "../scsi_sas_internal.h" |
38 | 38 | ||
39 | kmem_cache_t *sas_task_cache; | 39 | struct kmem_cache *sas_task_cache; |
40 | 40 | ||
41 | /*------------ SAS addr hash -----------*/ | 41 | /*------------ SAS addr hash -----------*/ |
42 | void sas_hash_addr(u8 *hashed, const u8 *sas_addr) | 42 | void sas_hash_addr(u8 *hashed, const u8 *sas_addr) |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index cbe0cad83b68..d03523d3bf38 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -24,7 +24,7 @@ char qla2x00_version_str[40]; | |||
24 | /* | 24 | /* |
25 | * SRB allocation cache | 25 | * SRB allocation cache |
26 | */ | 26 | */ |
27 | static kmem_cache_t *srb_cachep; | 27 | static struct kmem_cache *srb_cachep; |
28 | 28 | ||
29 | /* | 29 | /* |
30 | * Ioctl related information. | 30 | * Ioctl related information. |
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 969c9e431028..9ef693c8809a 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c | |||
@@ -19,7 +19,7 @@ char qla4xxx_version_str[40]; | |||
19 | /* | 19 | /* |
20 | * SRB allocation cache | 20 | * SRB allocation cache |
21 | */ | 21 | */ |
22 | static kmem_cache_t *srb_cachep; | 22 | static struct kmem_cache *srb_cachep; |
23 | 23 | ||
24 | /* | 24 | /* |
25 | * Module parameter information and variables | 25 | * Module parameter information and variables |
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index fafc00deaade..24cffd98ee63 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c | |||
@@ -136,7 +136,7 @@ const char * scsi_device_type(unsigned type) | |||
136 | EXPORT_SYMBOL(scsi_device_type); | 136 | EXPORT_SYMBOL(scsi_device_type); |
137 | 137 | ||
138 | struct scsi_host_cmd_pool { | 138 | struct scsi_host_cmd_pool { |
139 | kmem_cache_t *slab; | 139 | struct kmem_cache *slab; |
140 | unsigned int users; | 140 | unsigned int users; |
141 | char *name; | 141 | char *name; |
142 | unsigned int slab_flags; | 142 | unsigned int slab_flags; |
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index fb616c69151f..1748e27501cd 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -36,7 +36,7 @@ | |||
36 | struct scsi_host_sg_pool { | 36 | struct scsi_host_sg_pool { |
37 | size_t size; | 37 | size_t size; |
38 | char *name; | 38 | char *name; |
39 | kmem_cache_t *slab; | 39 | struct kmem_cache *slab; |
40 | mempool_t *pool; | 40 | mempool_t *pool; |
41 | }; | 41 | }; |
42 | 42 | ||
@@ -241,7 +241,7 @@ struct scsi_io_context { | |||
241 | char sense[SCSI_SENSE_BUFFERSIZE]; | 241 | char sense[SCSI_SENSE_BUFFERSIZE]; |
242 | }; | 242 | }; |
243 | 243 | ||
244 | static kmem_cache_t *scsi_io_context_cache; | 244 | static struct kmem_cache *scsi_io_context_cache; |
245 | 245 | ||
246 | static void scsi_end_async(struct request *req, int uptodate) | 246 | static void scsi_end_async(struct request *req, int uptodate) |
247 | { | 247 | { |
diff --git a/drivers/scsi/scsi_tgt_lib.c b/drivers/scsi/scsi_tgt_lib.c index 386dbae17b44..d402aff5f314 100644 --- a/drivers/scsi/scsi_tgt_lib.c +++ b/drivers/scsi/scsi_tgt_lib.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include "scsi_tgt_priv.h" | 33 | #include "scsi_tgt_priv.h" |
34 | 34 | ||
35 | static struct workqueue_struct *scsi_tgtd; | 35 | static struct workqueue_struct *scsi_tgtd; |
36 | static kmem_cache_t *scsi_tgt_cmd_cache; | 36 | static struct kmem_cache *scsi_tgt_cmd_cache; |
37 | 37 | ||
38 | /* | 38 | /* |
39 | * TODO: this struct will be killed when the block layer supports large bios | 39 | * TODO: this struct will be killed when the block layer supports large bios |