Searched refs:hostdata (Results 1 - 152 of 152) sorted by relevance

/linux-4.1.27/drivers/scsi/
H A D53c700.c245 NCR_700_offset_period_to_sxfer(struct NCR_700_Host_Parameters *hostdata, NCR_700_offset_period_to_sxfer() argument
250 __u8 min_xferp = (hostdata->chip710 NCR_700_offset_period_to_sxfer()
252 __u8 max_offset = (hostdata->chip710 NCR_700_offset_period_to_sxfer()
258 if(period < hostdata->min_period) { NCR_700_offset_period_to_sxfer()
260 period = hostdata->min_period; NCR_700_offset_period_to_sxfer()
262 XFERP = (period*4 * hostdata->sync_clock)/1000 - 4; NCR_700_offset_period_to_sxfer()
277 struct NCR_700_Host_Parameters *hostdata = NCR_700_get_SXFER() local
278 (struct NCR_700_Host_Parameters *)SDp->host->hostdata[0]; NCR_700_get_SXFER()
280 return NCR_700_offset_period_to_sxfer(hostdata, NCR_700_get_SXFER()
287 struct NCR_700_Host_Parameters *hostdata, struct device *dev) NCR_700_detect()
299 memory = dma_alloc_noncoherent(hostdata->dev, TOTAL_MEM_SIZE, NCR_700_detect()
307 hostdata->msgin = memory + MSGIN_OFFSET; NCR_700_detect()
308 hostdata->msgout = memory + MSGOUT_OFFSET; NCR_700_detect()
309 hostdata->status = memory + STATUS_OFFSET; NCR_700_detect()
310 hostdata->slots = (struct NCR_700_command_slot *)(memory + SLOTS_OFFSET); NCR_700_detect()
311 hostdata->dev = dev; NCR_700_detect()
338 memset(hostdata->slots, 0, sizeof(struct NCR_700_command_slot) NCR_700_detect()
341 dma_addr_t offset = (dma_addr_t)((unsigned long)&hostdata->slots[j].SG[0] NCR_700_detect()
342 - (unsigned long)&hostdata->slots[0].SG[0]); NCR_700_detect()
343 hostdata->slots[j].pSG = (struct NCR_700_SG_List *)((unsigned long)(pSlots + offset)); NCR_700_detect()
345 hostdata->free_list = &hostdata->slots[j]; NCR_700_detect()
347 hostdata->slots[j-1].ITL_forw = &hostdata->slots[j]; NCR_700_detect()
348 hostdata->slots[j].state = NCR_700_SLOT_FREE; NCR_700_detect()
358 script_patch_32(hostdata->dev, script, MessageLocation, NCR_700_detect()
360 script_patch_32(hostdata->dev, script, StatusAddress, NCR_700_detect()
362 script_patch_32(hostdata->dev, script, ReceiveMsgAddress, NCR_700_detect()
365 hostdata->script = script; NCR_700_detect()
366 hostdata->pScript = pScript; NCR_700_detect()
367 dma_sync_single_for_device(hostdata->dev, pScript, sizeof(SCRIPT), DMA_TO_DEVICE); NCR_700_detect()
368 hostdata->state = NCR_700_HOST_FREE; NCR_700_detect()
369 hostdata->cmd = NULL; NCR_700_detect()
374 host->unique_id = (unsigned long)hostdata->base; NCR_700_detect()
375 hostdata->eh_complete = NULL; NCR_700_detect()
376 host->hostdata[0] = (unsigned long)hostdata; NCR_700_detect()
379 if (hostdata->chip710) NCR_700_detect()
380 hostdata->rev = (NCR_700_readb(host, CTEST8_REG)>>4) & 0x0f; NCR_700_detect()
382 hostdata->rev = (NCR_700_readb(host, CTEST7_REG)>>4) & 0x0f; NCR_700_detect()
383 hostdata->fast = (NCR_700_readb(host, CTEST9_REG) == 0); NCR_700_detect()
389 hostdata->chip710 ? "53c710" : NCR_700_detect()
390 (hostdata->fast ? "53c700-66" : "53c700"), NCR_700_detect()
391 hostdata->rev, hostdata->differential ? NCR_700_detect()
402 spi_signalling(host) = hostdata->differential ? SPI_SIGNAL_HVD : NCR_700_detect()
411 struct NCR_700_Host_Parameters *hostdata = NCR_700_release() local
412 (struct NCR_700_Host_Parameters *)host->hostdata[0]; NCR_700_release()
414 dma_free_noncoherent(hostdata->dev, TOTAL_MEM_SIZE, NCR_700_release()
415 hostdata->script, hostdata->pScript); NCR_700_release()
439 struct NCR_700_Host_Parameters *hostdata = NCR_700_data_residual() local
440 (struct NCR_700_Host_Parameters *)host->hostdata[0]; NCR_700_data_residual()
444 if(hostdata->chip710) { NCR_700_data_residual()
452 if(hostdata->fast) NCR_700_data_residual()
509 find_empty_slot(struct NCR_700_Host_Parameters *hostdata) find_empty_slot() argument
511 struct NCR_700_command_slot *slot = hostdata->free_list; find_empty_slot()
515 if(hostdata->command_slot_count != NCR_700_COMMAND_SLOTS_PER_HOST) find_empty_slot()
516 printk(KERN_ERR "SLOTS FULL, but count is %d, should be %d\n", hostdata->command_slot_count, NCR_700_COMMAND_SLOTS_PER_HOST); find_empty_slot()
525 hostdata->free_list = slot->ITL_forw; find_empty_slot()
535 hostdata->command_slot_count++; find_empty_slot()
542 struct NCR_700_Host_Parameters *hostdata) free_slot()
554 slot->ITL_forw = hostdata->free_list; free_slot()
555 hostdata->free_list = slot; free_slot()
556 hostdata->command_slot_count--; free_slot()
563 save_for_reselection(struct NCR_700_Host_Parameters *hostdata, save_for_reselection() argument
573 hostdata->state = NCR_700_HOST_FREE; save_for_reselection()
574 hostdata->cmd = NULL; save_for_reselection()
578 NCR_700_unmap(struct NCR_700_Host_Parameters *hostdata, struct scsi_cmnd *SCp, NCR_700_unmap() argument
587 NCR_700_scsi_done(struct NCR_700_Host_Parameters *hostdata, NCR_700_scsi_done() argument
590 hostdata->state = NCR_700_HOST_FREE; NCR_700_scsi_done()
591 hostdata->cmd = NULL; NCR_700_scsi_done()
597 dma_unmap_single(hostdata->dev, slot->pCmd, NCR_700_scsi_done()
602 dma_unmap_single(hostdata->dev, slot->dma_handle, NCR_700_scsi_done()
611 NCR_700_unmap(hostdata, SCp, slot); NCR_700_scsi_done()
613 free_slot(slot, hostdata); NCR_700_scsi_done()
644 struct NCR_700_Host_Parameters *hostdata = NCR_700_chip_setup() local
645 (struct NCR_700_Host_Parameters *)host->hostdata[0]; NCR_700_chip_setup()
647 __u8 min_xferp = (hostdata->chip710 ? NCR_710_MIN_XFERP : NCR_700_MIN_XFERP); NCR_700_chip_setup()
649 if(hostdata->chip710) { NCR_700_chip_setup()
653 switch (hostdata->burst_length) { NCR_700_chip_setup()
670 hostdata->dcntl_extra |= COMPAT_700_MODE; NCR_700_chip_setup()
672 NCR_700_writeb(hostdata->dcntl_extra, host, DCNTL_REG); NCR_700_chip_setup()
673 NCR_700_writeb(burst_length | hostdata->dmode_extra, NCR_700_chip_setup()
675 NCR_700_writeb(burst_disable | hostdata->ctest7_extra | NCR_700_chip_setup()
676 (hostdata->differential ? DIFF : 0), NCR_700_chip_setup()
682 NCR_700_writeb(BURST_LENGTH_8 | hostdata->dmode_extra, NCR_700_chip_setup()
684 NCR_700_writeb(hostdata->differential ? NCR_700_chip_setup()
686 if(hostdata->fast) { NCR_700_chip_setup()
706 if(hostdata->clock > 75) { NCR_700_chip_setup()
707 printk(KERN_ERR "53c700: Clock speed %dMHz is too high: 75Mhz is the maximum this chip can be driven at\n", hostdata->clock); NCR_700_chip_setup()
712 NCR_700_writeb(ASYNC_DIV_3_0 | hostdata->dcntl_extra, host, DCNTL_REG); NCR_700_chip_setup()
713 hostdata->sync_clock = hostdata->clock/2; NCR_700_chip_setup()
714 } else if(hostdata->clock > 50 && hostdata->clock <= 75) { NCR_700_chip_setup()
718 NCR_700_writeb(ASYNC_DIV_3_0 | hostdata->dcntl_extra, host, DCNTL_REG); NCR_700_chip_setup()
719 hostdata->sync_clock = hostdata->clock*2; NCR_700_chip_setup()
720 hostdata->sync_clock /= 3; NCR_700_chip_setup()
722 } else if(hostdata->clock > 37 && hostdata->clock <= 50) { NCR_700_chip_setup()
726 NCR_700_writeb(ASYNC_DIV_2_0 | hostdata->dcntl_extra, host, DCNTL_REG); NCR_700_chip_setup()
727 hostdata->sync_clock = hostdata->clock; NCR_700_chip_setup()
728 } else if(hostdata->clock > 25 && hostdata->clock <=37) { NCR_700_chip_setup()
732 NCR_700_writeb(ASYNC_DIV_1_5 | hostdata->dcntl_extra, host, DCNTL_REG); NCR_700_chip_setup()
733 hostdata->sync_clock = hostdata->clock; NCR_700_chip_setup()
737 NCR_700_writeb(ASYNC_DIV_1_0 | hostdata->dcntl_extra, host, DCNTL_REG); NCR_700_chip_setup()
739 hostdata->sync_clock = hostdata->clock; NCR_700_chip_setup()
745 min_period = 1000*(4+min_xferp)/(4*hostdata->sync_clock); NCR_700_chip_setup()
746 hostdata->min_period = NCR_700_MIN_PERIOD; NCR_700_chip_setup()
748 hostdata->min_period = min_period; NCR_700_chip_setup()
754 struct NCR_700_Host_Parameters *hostdata = NCR_700_chip_reset() local
755 (struct NCR_700_Host_Parameters *)host->hostdata[0]; NCR_700_chip_reset()
756 if(hostdata->chip710) { NCR_700_chip_reset()
781 struct NCR_700_Host_Parameters *hostdata, process_extended_message()
792 switch(hostdata->msgin[2]) { process_extended_message()
796 __u8 period = hostdata->msgin[3]; process_extended_message()
797 __u8 offset = hostdata->msgin[4]; process_extended_message()
822 hostdata->msgout[0] = A_REJECT_MSG; process_extended_message()
823 dma_cache_sync(hostdata->dev, hostdata->msgout, 1, DMA_TO_DEVICE); process_extended_message()
824 script_patch_16(hostdata->dev, hostdata->script, process_extended_message()
828 resume_offset = hostdata->pScript + Ent_SendMessageWithATN; process_extended_message()
835 hostdata->msgout[0] = A_REJECT_MSG; process_extended_message()
836 dma_cache_sync(hostdata->dev, hostdata->msgout, 1, DMA_TO_DEVICE); process_extended_message()
837 script_patch_16(hostdata->dev, hostdata->script, MessageCount, process_extended_message()
839 resume_offset = hostdata->pScript + Ent_SendMessageWithATN; process_extended_message()
847 spi_print_msg(hostdata->msgin); process_extended_message()
850 hostdata->msgout[0] = A_REJECT_MSG; process_extended_message()
851 dma_cache_sync(hostdata->dev, hostdata->msgout, 1, DMA_TO_DEVICE); process_extended_message()
852 script_patch_16(hostdata->dev, hostdata->script, MessageCount, process_extended_message()
856 resume_offset = hostdata->pScript + Ent_SendMessageWithATN; process_extended_message()
863 process_message(struct Scsi_Host *host, struct NCR_700_Host_Parameters *hostdata, process_message() argument
878 spi_print_msg(hostdata->msgin); process_message()
882 switch(hostdata->msgin[0]) { process_message()
885 resume_offset = process_extended_message(host, hostdata, SCp, process_message()
902 hostdata->tag_negotiated &= ~(1<<scmd_id(SCp)); process_message()
923 pun, lun, hostdata->msgin[1], process_message()
932 spi_print_msg(hostdata->msgin); process_message()
935 hostdata->msgout[0] = A_REJECT_MSG; process_message()
936 dma_cache_sync(hostdata->dev, hostdata->msgout, 1, DMA_TO_DEVICE); process_message()
937 script_patch_16(hostdata->dev, hostdata->script, MessageCount, process_message()
941 resume_offset = hostdata->pScript + Ent_SendMessageWithATN; process_message()
947 dma_cache_sync(hostdata->dev, hostdata->msgin, MSG_ARRAY_SIZE, DMA_FROM_DEVICE); process_message()
954 struct NCR_700_Host_Parameters *hostdata) process_script_interrupt()
966 hostdata->status[0])); process_script_interrupt()
973 if(status_byte(hostdata->status[0]) == CHECK_CONDITION || process_script_interrupt()
974 status_byte(hostdata->status[0]) == COMMAND_TERMINATED) { process_script_interrupt()
982 NCR_700_scsi_done(hostdata, SCp, hostdata->status[0]); process_script_interrupt()
989 SCp, hostdata->status[0]); process_script_interrupt()
998 NCR_700_unmap(hostdata, SCp, slot); process_script_interrupt()
999 dma_unmap_single(hostdata->dev, slot->pCmd, process_script_interrupt()
1016 cmnd[7] = hostdata->status[0]; process_script_interrupt()
1020 slot->pCmd = dma_map_single(hostdata->dev, cmnd, MAX_COMMAND_SIZE, DMA_TO_DEVICE); process_script_interrupt()
1021 slot->dma_handle = dma_map_single(hostdata->dev, SCp->sense_buffer, SCSI_SENSE_BUFFERSIZE, DMA_FROM_DEVICE); process_script_interrupt()
1026 slot->resume_offset = hostdata->pScript; process_script_interrupt()
1027 dma_cache_sync(hostdata->dev, slot->SG, sizeof(slot->SG[0])*2, DMA_TO_DEVICE); process_script_interrupt()
1028 dma_cache_sync(hostdata->dev, SCp->sense_buffer, SCSI_SENSE_BUFFERSIZE, DMA_FROM_DEVICE); process_script_interrupt()
1033 hostdata->state = NCR_700_HOST_FREE; process_script_interrupt()
1034 hostdata->cmd = NULL; process_script_interrupt()
1040 //if(status_byte(hostdata->status[0]) == GOOD && process_script_interrupt()
1044 // dma_sync_single_for_cpu(hostdata->dev, process_script_interrupt()
1051 // hostdata->tag_negotiated |= (1<<scmd_id(SCp)); process_script_interrupt()
1055 // hostdata->tag_negotiated &= ~(1<<scmd_id(SCp)); process_script_interrupt()
1058 NCR_700_scsi_done(hostdata, SCp, hostdata->status[0]); process_script_interrupt()
1078 hostdata->msgin[0], hostdata->msgin[1]); process_script_interrupt()
1089 save_for_reselection(hostdata, SCp, dsp); process_script_interrupt()
1094 __u8 reselection_id = hostdata->reselection_id; process_script_interrupt()
1097 lun = hostdata->msgin[0] & 0x1f; process_script_interrupt()
1099 hostdata->reselection_id = 0xff; process_script_interrupt()
1109 if(hostdata->msgin[1] == A_SIMPLE_TAG_MSG) { process_script_interrupt()
1110 struct scsi_cmnd *SCp = scsi_find_tag(SDp, hostdata->msgin[2]); process_script_interrupt()
1113 host->host_no, reselection_id, lun, hostdata->msgin[2]); process_script_interrupt()
1120 hostdata->msgin[2], slot, slot->tag); process_script_interrupt()
1134 hostdata->msgin[0], hostdata->msgin[1], process_script_interrupt()
1135 hostdata->msgin[2]); process_script_interrupt()
1137 if(hostdata->state != NCR_700_HOST_BUSY) process_script_interrupt()
1141 hostdata->cmd = slot->cmnd; process_script_interrupt()
1144 script_patch_32_abs(hostdata->dev, hostdata->script, process_script_interrupt()
1146 script_patch_16(hostdata->dev, hostdata->script, process_script_interrupt()
1148 script_patch_32_abs(hostdata->dev, hostdata->script, process_script_interrupt()
1157 NCR_700_writeb(NCR_700_get_SXFER(hostdata->cmd->device), process_script_interrupt()
1159 dma_cache_sync(hostdata->dev, hostdata->msgin, process_script_interrupt()
1161 dma_cache_sync(hostdata->dev, hostdata->msgout, process_script_interrupt()
1165 dma_cache_sync(hostdata->dev, slot->cmnd->cmnd, process_script_interrupt()
1189 host->host_no, reselection_id, lun, dsp, dsp - hostdata->pScript, hostdata->state, hostdata->command_slot_count); process_script_interrupt()
1193 __u32 SG = (__u32)bS_to_cpu(hostdata->script[A_SGScriptStartAddress_used[0]]); process_script_interrupt()
1197 if(SG >= to32bit(&hostdata->slots[i].pSG[0]) process_script_interrupt()
1198 && SG <= to32bit(&hostdata->slots[i].pSG[NCR_700_SG_SEGMENTS])) process_script_interrupt()
1201 printk(KERN_INFO "IDENTIFIED SG segment as being %08x in slot %p, cmd %p, slot->resume_offset=%08x\n", SG, &hostdata->slots[i], hostdata->slots[i].cmnd, hostdata->slots[i].resume_offset); process_script_interrupt()
1202 SCp = hostdata->slots[i].cmnd; process_script_interrupt()
1210 hostdata->cmd = NULL; process_script_interrupt()
1213 if(hostdata->reselection_id == 0xff) { process_script_interrupt()
1219 reselection_id = hostdata->reselection_id; process_script_interrupt()
1226 hostdata->reselection_id = reselection_id; process_script_interrupt()
1228 hostdata->msgin[1] = 0; process_script_interrupt()
1229 dma_cache_sync(hostdata->dev, hostdata->msgin, process_script_interrupt()
1231 if(hostdata->tag_negotiated & (1<<reselection_id)) { process_script_interrupt()
1232 resume_offset = hostdata->pScript + Ent_GetReselectionWithTag; process_script_interrupt()
1234 resume_offset = hostdata->pScript + Ent_GetReselectionData; process_script_interrupt()
1242 resume_offset = process_message(host, hostdata, SCp, process_script_interrupt()
1248 NCR_700_phase[j], dsp - hostdata->pScript); process_script_interrupt()
1260 host->host_no, pun, lun, dsps & 0xfff, dsp, dsp - hostdata->pScript);
1264 host->host_no, pun, lun, dsps, dsp - hostdata->pScript);
1283 struct NCR_700_Host_Parameters *hostdata = process_selection() local
1284 (struct NCR_700_Host_Parameters *)host->hostdata[0]; process_selection()
1285 struct scsi_cmnd *SCp = hostdata->cmd; process_selection()
1289 id = NCR_700_readb(host, hostdata->chip710 ? process_selection()
1304 hostdata->reselection_id = id = bitmap_to_number(id); process_selection()
1308 if(hostdata->state == NCR_700_HOST_BUSY && SCp != NULL) { process_selection()
1311 DEBUG((" ID %d WARNING: RESELECTION OF BUSY HOST, saving cmd %p, slot %p, addr %x [%04x], resume %x!\n", id, hostdata->cmd, slot, dsp, dsp - hostdata->pScript, resume_offset)); process_selection()
1313 switch(dsp - hostdata->pScript) { process_selection()
1316 save_for_reselection(hostdata, SCp, Ent_Disconnect2 + hostdata->pScript); process_selection()
1320 save_for_reselection(hostdata, SCp, Ent_Disconnect4 + hostdata->pScript); process_selection()
1324 save_for_reselection(hostdata, SCp, Ent_Disconnect6 + hostdata->pScript); process_selection()
1328 save_for_reselection(hostdata, SCp, Ent_Disconnect8 + hostdata->pScript); process_selection()
1332 process_script_interrupt(A_GOOD_STATUS_AFTER_STATUS, dsp, SCp, host, hostdata); process_selection()
1340 hostdata->state = NCR_700_HOST_BUSY; process_selection()
1341 hostdata->cmd = NULL; process_selection()
1343 hostdata->msgin[1] = 0; process_selection()
1344 dma_cache_sync(hostdata->dev, hostdata->msgin, MSG_ARRAY_SIZE, process_selection()
1349 resume_offset = hostdata->pScript + Ent_SelectedAsTarget; process_selection()
1350 } else if(hostdata->tag_negotiated & (1<<id)) { process_selection()
1351 resume_offset = hostdata->pScript + Ent_GetReselectionWithTag; process_selection()
1353 resume_offset = hostdata->pScript + Ent_GetReselectionData; process_selection()
1360 const struct NCR_700_Host_Parameters *hostdata NCR_700_clear_fifo() local
1361 = (struct NCR_700_Host_Parameters *)host->hostdata[0]; NCR_700_clear_fifo()
1362 if(hostdata->chip710) { NCR_700_clear_fifo()
1371 const struct NCR_700_Host_Parameters *hostdata NCR_700_flush_fifo() local
1372 = (struct NCR_700_Host_Parameters *)host->hostdata[0]; NCR_700_flush_fifo()
1373 if(hostdata->chip710) { NCR_700_flush_fifo()
1392 struct NCR_700_Host_Parameters *hostdata = NCR_700_start_command() local
1393 (struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0]; NCR_700_start_command()
1397 if(hostdata->state != NCR_700_HOST_FREE) { NCR_700_start_command()
1407 hostdata->state = NCR_700_HOST_BUSY; NCR_700_start_command()
1408 hostdata->cmd = SCp; NCR_700_start_command()
1413 hostdata->msgout[0] = NCR_700_identify((SCp->cmnd[0] != REQUEST_SENSE && NCR_700_start_command()
1428 if((hostdata->tag_negotiated & (1<<scmd_id(SCp))) NCR_700_start_command()
1431 count += spi_populate_tag_msg(&hostdata->msgout[count], SCp); NCR_700_start_command()
1434 if(hostdata->fast && NCR_700_start_command()
1436 count += spi_populate_sync_msg(&hostdata->msgout[count], NCR_700_start_command()
1442 script_patch_16(hostdata->dev, hostdata->script, MessageCount, count); NCR_700_start_command()
1445 script_patch_ID(hostdata->dev, hostdata->script, NCR_700_start_command()
1448 script_patch_32_abs(hostdata->dev, hostdata->script, CommandAddress, NCR_700_start_command()
1450 script_patch_16(hostdata->dev, hostdata->script, CommandCount, NCR_700_start_command()
1454 script_patch_32_abs(hostdata->dev, hostdata->script, NCR_700_start_command()
1459 slot->resume_offset = hostdata->pScript; NCR_700_start_command()
1461 dma_cache_sync(hostdata->dev, hostdata->msgout, count, DMA_TO_DEVICE); NCR_700_start_command()
1462 dma_cache_sync(hostdata->dev, hostdata->msgin, MSG_ARRAY_SIZE, NCR_700_start_command()
1464 dma_cache_sync(hostdata->dev, SCp->cmnd, SCp->cmd_len, DMA_TO_DEVICE); NCR_700_start_command()
1465 dma_cache_sync(hostdata->dev, hostdata->status, 1, DMA_FROM_DEVICE); NCR_700_start_command()
1480 struct NCR_700_Host_Parameters *hostdata = NCR_700_intr() local
1481 (struct NCR_700_Host_Parameters *)host->hostdata[0]; NCR_700_intr()
1499 struct scsi_cmnd *SCp = hostdata->cmd; NCR_700_intr()
1503 state = hostdata->state; NCR_700_intr()
1504 SCp = hostdata->cmd; NCR_700_intr()
1523 (dsp - (__u32)(hostdata->pScript))/4, NCR_700_intr()
1535 hostdata->state = NCR_700_HOST_BUSY; NCR_700_intr()
1538 host->host_no, SCp, SCp == NULL ? NULL : SCp->host_scribble, dsp, dsp - hostdata->pScript); NCR_700_intr()
1550 &hostdata->slots[i]; __shost_for_each_device()
1558 free_slot(slot, hostdata); __shost_for_each_device()
1566 * hostdata->state_lock */ __shost_for_each_device()
1573 hostdata->state = NCR_700_HOST_FREE;
1574 hostdata->cmd = NULL;
1576 if(hostdata->eh_complete != NULL)
1577 complete(hostdata->eh_complete);
1582 NCR_700_scsi_done(hostdata, SCp, DID_NO_CONNECT<<16);
1587 if(dsp == Ent_SendMessage + 8 + hostdata->pScript) {
1592 int count = (hostdata->script[Ent_SendMessage/4] & 0xffffff) - ((NCR_700_readl(host, DBC_REG) & 0xffffff) + NCR_700_data_residual(host));
1593 printk("scsi%d (%d:%d) PHASE MISMATCH IN SEND MESSAGE %d remain, return %p[%04x], phase %s\n", host->host_no, pun, lun, count, (void *)temp, temp - hostdata->pScript, sbcl_to_string(NCR_700_readb(host, SBCL_REG)));
1595 resume_offset = hostdata->pScript + Ent_SendMessagePhaseMismatch;
1641 dma_cache_sync(hostdata->dev, slot->SG, sizeof(slot->SG), DMA_TO_DEVICE);
1644 resume_offset = hostdata->pScript + Ent_MsgInDuringData;
1650 host->host_no, pun, lun, dsp - hostdata->pScript, sbcl_to_string(sbcl));
1657 NCR_700_scsi_done(hostdata, SCp, DID_ERROR<<16);
1661 NCR_700_scsi_done(hostdata, SCp, DID_ERROR<<16);
1665 resume_offset = process_script_interrupt(dsps, dsp, SCp, host, hostdata);
1670 dsp, dsp - hostdata->pScript);
1671 NCR_700_scsi_done(hostdata, SCp, DID_ERROR<<16);
1675 NCR_700_scsi_done(hostdata, SCp, DID_ERROR<<16);
1707 if(hostdata->state != NCR_700_HOST_BUSY) {
1709 host->host_no, resume_offset, resume_offset - hostdata->pScript);
1710 hostdata->state = NCR_700_HOST_BUSY;
1722 if(hostdata->state == NCR_700_HOST_FREE) {
1728 int j = (i + hostdata->saved_slot_position)
1731 if(hostdata->slots[j].state != NCR_700_SLOT_QUEUED)
1733 if(NCR_700_start_command(hostdata->slots[j].cmnd)) {
1735 host->host_no, &hostdata->slots[j],
1736 hostdata->slots[j].cmnd));
1737 hostdata->saved_slot_position = j + 1;
1751 struct NCR_700_Host_Parameters *hostdata = NCR_700_queuecommand_lck() local
1752 (struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0]; NCR_700_queuecommand_lck()
1757 if(hostdata->command_slot_count >= NCR_700_COMMAND_SLOTS_PER_HOST) { NCR_700_queuecommand_lck()
1770 && (!(hostdata->tag_negotiated & (1<<scmd_id(SCp))) NCR_700_queuecommand_lck()
1786 slot = find_empty_slot(hostdata); NCR_700_queuecommand_lck()
1800 && (hostdata->tag_negotiated &(1<<scmd_id(SCp))) == 0 NCR_700_queuecommand_lck()
1803 hostdata->tag_negotiated |= (1<<scmd_id(SCp)); NCR_700_queuecommand_lck()
1814 && (hostdata->tag_negotiated &(1<<scmd_id(SCp)))) { NCR_700_queuecommand_lck()
1816 hostdata->tag_negotiated &= ~(1<<scmd_id(SCp)); NCR_700_queuecommand_lck()
1819 if ((hostdata->tag_negotiated & (1<<scmd_id(SCp))) && NCR_700_queuecommand_lck()
1891 dma_cache_sync(hostdata->dev, slot->SG, sizeof(slot->SG), DMA_TO_DEVICE);
1897 slot->pCmd = dma_map_single(hostdata->dev, SCp->cmnd,
1939 struct NCR_700_Host_Parameters *hostdata = NCR_700_bus_reset() local
1940 (struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0]; NCR_700_bus_reset()
1950 while (hostdata->eh_complete != NULL) { NCR_700_bus_reset()
1956 hostdata->eh_complete = &complete; NCR_700_bus_reset()
1963 hostdata->eh_complete = NULL; NCR_700_bus_reset()
1965 if(hostdata->fast) NCR_700_bus_reset()
1992 struct NCR_700_Host_Parameters *hostdata = NCR_700_set_period() local
1993 (struct NCR_700_Host_Parameters *)SHp->hostdata[0]; NCR_700_set_period()
1995 if(!hostdata->fast) NCR_700_set_period()
1998 if(period < hostdata->min_period) NCR_700_set_period()
1999 period = hostdata->min_period; NCR_700_set_period()
2011 struct NCR_700_Host_Parameters *hostdata = NCR_700_set_offset() local
2012 (struct NCR_700_Host_Parameters *)SHp->hostdata[0]; NCR_700_set_offset()
2013 int max_offset = hostdata->chip710 NCR_700_set_offset()
2016 if(!hostdata->fast) NCR_700_set_offset()
2023 if(spi_offset(STp) == 0 && (spi_period(STp) < hostdata->min_period || NCR_700_set_offset()
2025 spi_period(STp) = hostdata->min_period; NCR_700_set_offset()
2036 SDp->hostdata = kzalloc(sizeof(struct NCR_700_Device_Parameters), NCR_700_slave_alloc()
2039 if (!SDp->hostdata) NCR_700_slave_alloc()
2048 struct NCR_700_Host_Parameters *hostdata = NCR_700_slave_configure() local
2049 (struct NCR_700_Host_Parameters *)SDp->host->hostdata[0]; NCR_700_slave_configure()
2057 if(hostdata->fast) { NCR_700_slave_configure()
2071 kfree(SDp->hostdata); NCR_700_slave_destroy()
2072 SDp->hostdata = NULL; NCR_700_slave_destroy()
286 NCR_700_detect(struct scsi_host_template *tpnt, struct NCR_700_Host_Parameters *hostdata, struct device *dev) NCR_700_detect() argument
541 free_slot(struct NCR_700_command_slot *slot, struct NCR_700_Host_Parameters *hostdata) free_slot() argument
780 process_extended_message(struct Scsi_Host *host, struct NCR_700_Host_Parameters *hostdata, struct scsi_cmnd *SCp, __u32 dsp, __u32 dsps) process_extended_message() argument
952 process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp, struct Scsi_Host *host, struct NCR_700_Host_Parameters *hostdata) process_script_interrupt() argument
H A Dbvme6000_scsi.c41 struct NCR_700_Host_Parameters *hostdata; bvme6000_probe() local
46 hostdata = kzalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL); bvme6000_probe()
47 if (!hostdata) { bvme6000_probe()
53 /* Fill in the required pieces of hostdata */ bvme6000_probe()
54 hostdata->base = (void __iomem *)BVME_NCR53C710_BASE; bvme6000_probe()
55 hostdata->clock = 40; /* XXX - depends on the CPU clock! */ bvme6000_probe()
56 hostdata->chip710 = 1; bvme6000_probe()
57 hostdata->dmode_extra = DMODE_FC2; bvme6000_probe()
58 hostdata->dcntl_extra = EA_710; bvme6000_probe()
59 hostdata->ctest7_extra = CTEST7_TT1; bvme6000_probe()
62 host = NCR_700_detect(&bvme6000_scsi_driver_template, hostdata, bvme6000_probe()
86 kfree(hostdata); bvme6000_probe()
95 struct NCR_700_Host_Parameters *hostdata = shost_priv(host); bvme6000_device_remove() local
99 kfree(hostdata); bvme6000_device_remove()
H A Dsni_53c710.c71 struct NCR_700_Host_Parameters *hostdata; snirm710_probe() local
80 hostdata = kzalloc(sizeof(*hostdata), GFP_KERNEL); snirm710_probe()
81 if (!hostdata) { snirm710_probe()
86 hostdata->dev = &dev->dev; snirm710_probe()
88 hostdata->base = ioremap_nocache(base, 0x100); snirm710_probe()
89 hostdata->differential = 0; snirm710_probe()
91 hostdata->clock = SNIRM710_CLOCK; snirm710_probe()
92 hostdata->force_le_on_be = 1; snirm710_probe()
93 hostdata->chip710 = 1; snirm710_probe()
94 hostdata->burst_length = 4; snirm710_probe()
96 host = NCR_700_detect(&snirm710_template, hostdata, &dev->dev); snirm710_probe()
115 iounmap(hostdata->base); snirm710_probe()
116 kfree(hostdata); snirm710_probe()
123 struct NCR_700_Host_Parameters *hostdata = snirm710_driver_remove() local
124 (struct NCR_700_Host_Parameters *)host->hostdata[0]; snirm710_driver_remove()
129 iounmap(hostdata->base); snirm710_driver_remove()
130 kfree(hostdata); snirm710_driver_remove()
H A Da4000t.c38 struct NCR_700_Host_Parameters *hostdata; amiga_a4000t_scsi_probe() local
49 hostdata = kzalloc(sizeof(struct NCR_700_Host_Parameters), amiga_a4000t_scsi_probe()
51 if (!hostdata) { amiga_a4000t_scsi_probe()
58 /* Fill in the required pieces of hostdata */ amiga_a4000t_scsi_probe()
59 hostdata->base = ZTWO_VADDR(scsi_addr); amiga_a4000t_scsi_probe()
60 hostdata->clock = 50; amiga_a4000t_scsi_probe()
61 hostdata->chip710 = 1; amiga_a4000t_scsi_probe()
62 hostdata->dmode_extra = DMODE_FC2; amiga_a4000t_scsi_probe()
63 hostdata->dcntl_extra = EA_710; amiga_a4000t_scsi_probe()
66 host = NCR_700_detect(&a4000t_scsi_driver_template, hostdata, amiga_a4000t_scsi_probe()
91 kfree(hostdata); amiga_a4000t_scsi_probe()
100 struct NCR_700_Host_Parameters *hostdata = shost_priv(host); amiga_a4000t_scsi_remove() local
105 kfree(hostdata); amiga_a4000t_scsi_remove()
H A Din2000.c190 static inline uchar read_3393(struct IN2000_hostdata *hostdata, uchar reg_num) read_3393() argument
200 static inline void write_3393(struct IN2000_hostdata *hostdata, uchar reg_num, uchar value) write_3393() argument
207 static inline void write_3393_cmd(struct IN2000_hostdata *hostdata, uchar cmd) write_3393_cmd() argument
216 static uchar read_1_byte(struct IN2000_hostdata *hostdata) read_1_byte() argument
220 write_3393(hostdata, WD_CONTROL, CTRL_IDI | CTRL_EDI | CTRL_POLLED); read_1_byte()
221 write_3393_cmd(hostdata, WD_CMD_TRANS_INFO | 0x80); read_1_byte()
225 x = read_3393(hostdata, WD_DATA); read_1_byte()
231 static void write_3393_count(struct IN2000_hostdata *hostdata, unsigned long value) write_3393_count() argument
240 static unsigned long read_3393_count(struct IN2000_hostdata *hostdata) read_3393_count() argument
339 struct IN2000_hostdata *hostdata; in2000_queuecommand_lck() local
343 hostdata = (struct IN2000_hostdata *) instance->hostdata; in2000_queuecommand_lck()
415 if (!(hostdata->input_Q) || (cmd->cmnd[0] == REQUEST_SENSE)) { in2000_queuecommand_lck()
416 cmd->host_scribble = (uchar *) hostdata->input_Q; in2000_queuecommand_lck()
417 hostdata->input_Q = cmd; in2000_queuecommand_lck()
419 for (tmp = (Scsi_Cmnd *) hostdata->input_Q; tmp->host_scribble; tmp = (Scsi_Cmnd *) tmp->host_scribble); in2000_queuecommand_lck()
447 struct IN2000_hostdata *hostdata; in2000_execute() local
455 hostdata = (struct IN2000_hostdata *) instance->hostdata; in2000_execute()
459 if (hostdata->selecting || hostdata->connected) { in2000_execute()
471 cmd = (Scsi_Cmnd *) hostdata->input_Q; in2000_execute()
474 if (!(hostdata->busy[cmd->device->id] & (1 << cmd->device->lun))) in2000_execute()
494 hostdata->input_Q = (Scsi_Cmnd *) cmd->host_scribble; in2000_execute()
497 hostdata->cmd_cnt[cmd->device->id]++; in2000_execute()
505 write_3393(hostdata, WD_DESTINATION_ID, cmd->device->id); in2000_execute()
507 write_3393(hostdata, WD_DESTINATION_ID, cmd->device->id | DSTID_DPD); in2000_execute()
517 * + Commands should NEVER disconnect if hostdata->disconnect = in2000_execute()
519 * disconnect if hostdata->disconnect = DIS_ALWAYS. in2000_execute()
533 if (hostdata->disconnect == DIS_NEVER) in2000_execute()
535 if (hostdata->disconnect == DIS_ALWAYS) in2000_execute()
539 if (hostdata->disconnected_Q) /* other commands disconnected? */ in2000_execute()
541 if (!(hostdata->input_Q)) /* input_Q empty? */ in2000_execute()
543 for (prev = (Scsi_Cmnd *) hostdata->input_Q; prev; prev = (Scsi_Cmnd *) prev->host_scribble) { in2000_execute()
545 for (prev = (Scsi_Cmnd *) hostdata->input_Q; prev; prev = (Scsi_Cmnd *) prev->host_scribble) in2000_execute()
556 hostdata->disc_allowed_cnt[cmd->device->id]++; in2000_execute()
560 write_3393(hostdata, WD_SOURCE_ID, ((cmd->SCp.phase) ? SRCID_ER : 0)); in2000_execute()
562 write_3393(hostdata, WD_TARGET_LUN, cmd->device->lun); in2000_execute()
563 write_3393(hostdata, WD_SYNCHRONOUS_TRANSFER, hostdata->sync_xfer[cmd->device->id]); in2000_execute()
564 hostdata->busy[cmd->device->id] |= (1 << cmd->device->lun); in2000_execute()
566 if ((hostdata->level2 <= L2_NONE) || (hostdata->sync_stat[cmd->device->id] == SS_UNSET)) { in2000_execute()
576 hostdata->selecting = cmd; in2000_execute()
588 if (hostdata->sync_stat[cmd->device->id] == SS_UNSET) { in2000_execute()
589 if (hostdata->sync_off & (1 << cmd->device->id)) in2000_execute()
590 hostdata->sync_stat[cmd->device->id] = SS_SET; in2000_execute()
592 hostdata->sync_stat[cmd->device->id] = SS_FIRST; in2000_execute()
594 hostdata->state = S_SELECTING; in2000_execute()
595 write_3393_count(hostdata, 0); /* this guarantees a DATA_PHASE interrupt */ in2000_execute()
596 write_3393_cmd(hostdata, WD_CMD_SEL_ATN); in2000_execute()
609 hostdata->connected = cmd; in2000_execute()
610 write_3393(hostdata, WD_COMMAND_PHASE, 0); in2000_execute()
626 write_3393(hostdata, WD_OWN_ID, cmd->cmd_len); in2000_execute()
647 write_3393_count(hostdata, cmd->SCp.this_residual); in2000_execute()
648 write_3393(hostdata, WD_CONTROL, CTRL_IDI | CTRL_EDI | CTRL_BUS); in2000_execute()
652 hostdata->fifo = FI_FIFO_WRITING; in2000_execute()
658 f = hostdata->io_base + IO_FIFO; in2000_execute()
689 hostdata->fifo = FI_FIFO_READING; in2000_execute()
694 write_3393_count(hostdata, 0); /* this guarantees a DATA_PHASE interrupt */ in2000_execute()
696 hostdata->state = S_RUNNING_LEVEL2; in2000_execute()
697 write_3393_cmd(hostdata, WD_CMD_SEL_ATN_XFER); in2000_execute()
713 static void transfer_pio(uchar * buf, int cnt, int data_in_dir, struct IN2000_hostdata *hostdata) transfer_pio() argument
719 write_3393(hostdata, WD_CONTROL, CTRL_IDI | CTRL_EDI | CTRL_POLLED); transfer_pio()
720 write_3393_count(hostdata, cnt); transfer_pio()
721 write_3393_cmd(hostdata, WD_CMD_TRANS_INFO); transfer_pio()
726 *buf++ = read_3393(hostdata, WD_DATA); transfer_pio()
732 write_3393(hostdata, WD_DATA, *buf++); transfer_pio()
749 struct IN2000_hostdata *hostdata; transfer_bytes() local
754 hostdata = (struct IN2000_hostdata *) cmd->device->host->hostdata; transfer_bytes()
773 write_3393(hostdata, WD_SYNCHRONOUS_TRANSFER, hostdata->sync_xfer[cmd->device->id]); transfer_bytes()
774 write_3393_count(hostdata, cmd->SCp.this_residual); transfer_bytes()
775 write_3393(hostdata, WD_CONTROL, CTRL_IDI | CTRL_EDI | CTRL_BUS); transfer_bytes()
784 if ((hostdata->level2 >= L2_DATA) || (hostdata->level2 == L2_BASIC && cmd->SCp.phase == 0)) { transfer_bytes()
785 write_3393(hostdata, WD_COMMAND_PHASE, 0x45); transfer_bytes()
786 write_3393_cmd(hostdata, WD_CMD_SEL_ATN_XFER); transfer_bytes()
787 hostdata->state = S_RUNNING_LEVEL2; transfer_bytes()
789 write_3393_cmd(hostdata, WD_CMD_TRANS_INFO); transfer_bytes()
790 hostdata->fifo = FI_FIFO_READING; transfer_bytes()
800 if ((hostdata->level2 >= L2_DATA) || (hostdata->level2 == L2_BASIC && cmd->SCp.phase == 0)) { transfer_bytes()
801 write_3393(hostdata, WD_COMMAND_PHASE, 0x45); transfer_bytes()
802 write_3393_cmd(hostdata, WD_CMD_SEL_ATN_XFER); transfer_bytes()
803 hostdata->state = S_RUNNING_LEVEL2; transfer_bytes()
805 write_3393_cmd(hostdata, WD_CMD_TRANS_INFO); transfer_bytes()
806 hostdata->fifo = FI_FIFO_WRITING; transfer_bytes()
813 f = hostdata->io_base + IO_FIFO; transfer_bytes()
836 struct IN2000_hostdata *hostdata; in2000_intr() local
845 hostdata = (struct IN2000_hostdata *) instance->hostdata; in2000_intr()
852 hostdata->int_cnt++; in2000_intr()
913 cmd = (Scsi_Cmnd *) hostdata->connected; /* assume we're connected */ in2000_intr()
916 if (hostdata->fifo == FI_FIFO_READING) { in2000_intr()
923 f = hostdata->io_base + IO_FIFO; in2000_intr()
939 else if (hostdata->fifo == FI_FIFO_WRITING) { in2000_intr()
995 cmd = (Scsi_Cmnd *) hostdata->connected; /* assume we're connected */ in2000_intr()
996 sr = read_3393(hostdata, WD_SCSI_STATUS); /* clear the interrupt */ in2000_intr()
997 phs = read_3393(hostdata, WD_COMMAND_PHASE); in2000_intr()
1022 if (hostdata->fifo == FI_FIFO_READING) { in2000_intr()
1030 i = (cmd->SCp.this_residual - read_3393_count(hostdata)) - cmd->SCp.have_data_in; in2000_intr()
1032 f = hostdata->io_base + IO_FIFO; in2000_intr()
1043 hostdata->fifo = FI_FIFO_UNUSED; in2000_intr()
1045 cmd->SCp.this_residual = read_3393_count(hostdata); in2000_intr()
1052 else if (hostdata->fifo == FI_FIFO_WRITING) { in2000_intr()
1053 hostdata->fifo = FI_FIFO_UNUSED; in2000_intr()
1055 cmd->SCp.this_residual = read_3393_count(hostdata); in2000_intr()
1069 if (hostdata->state == S_RUNNING_LEVEL2) in2000_intr()
1070 hostdata->connected = NULL; in2000_intr()
1072 cmd = (Scsi_Cmnd *) hostdata->selecting; /* get a valid cmd */ in2000_intr()
1074 hostdata->selecting = NULL; in2000_intr()
1078 hostdata->busy[cmd->device->id] &= ~(1 << cmd->device->lun); in2000_intr()
1079 hostdata->state = S_UNCONNECTED; in2000_intr()
1094 hostdata->connected = cmd = (Scsi_Cmnd *) hostdata->selecting; in2000_intr()
1096 hostdata->selecting = NULL; in2000_intr()
1100 hostdata->outgoing_msg[0] = (0x80 | 0x00 | cmd->device->lun); in2000_intr()
1102 hostdata->outgoing_msg[0] |= 0x40; in2000_intr()
1104 if (hostdata->sync_stat[cmd->device->id] == SS_FIRST) { in2000_intr()
1109 hostdata->sync_stat[cmd->device->id] = SS_WAITING; in2000_intr()
1113 hostdata->outgoing_msg[1] = EXTENDED_MESSAGE; in2000_intr()
1114 hostdata->outgoing_msg[2] = 3; in2000_intr()
1115 hostdata->outgoing_msg[3] = EXTENDED_SDTR; in2000_intr()
1116 hostdata->outgoing_msg[4] = OPTIMUM_SX_PER / 4; in2000_intr()
1117 hostdata->outgoing_msg[5] = OPTIMUM_SX_OFF; in2000_intr()
1118 hostdata->outgoing_len = 6; in2000_intr()
1120 hostdata->outgoing_len = 1; in2000_intr()
1122 hostdata->state = S_CONNECTED; in2000_intr()
1131 if (hostdata->state != S_RUNNING_LEVEL2) in2000_intr()
1132 hostdata->state = S_CONNECTED; in2000_intr()
1141 if (hostdata->state != S_RUNNING_LEVEL2) in2000_intr()
1142 hostdata->state = S_CONNECTED; in2000_intr()
1152 transfer_pio(cmd->cmnd, cmd->cmd_len, DATA_OUT_DIR, hostdata); in2000_intr()
1153 hostdata->state = S_CONNECTED; in2000_intr()
1162 cmd->SCp.Status = read_1_byte(hostdata); in2000_intr()
1164 if (hostdata->level2 >= L2_BASIC) { in2000_intr()
1165 sr = read_3393(hostdata, WD_SCSI_STATUS); /* clear interrupt */ in2000_intr()
1166 hostdata->state = S_RUNNING_LEVEL2; in2000_intr()
1167 write_3393(hostdata, WD_COMMAND_PHASE, 0x50); in2000_intr()
1168 write_3393_cmd(hostdata, WD_CMD_SEL_ATN_XFER); in2000_intr()
1170 hostdata->state = S_CONNECTED; in2000_intr()
1180 msg = read_1_byte(hostdata); in2000_intr()
1181 sr = read_3393(hostdata, WD_SCSI_STATUS); /* clear interrupt */ in2000_intr()
1183 hostdata->incoming_msg[hostdata->incoming_ptr] = msg; in2000_intr()
1184 if (hostdata->incoming_msg[0] == EXTENDED_MESSAGE) in2000_intr()
1187 hostdata->incoming_ptr = 0; in2000_intr()
1194 write_3393_cmd(hostdata, WD_CMD_NEGATE_ACK); in2000_intr()
1195 hostdata->state = S_PRE_CMP_DISC; in2000_intr()
1200 write_3393_cmd(hostdata, WD_CMD_NEGATE_ACK); in2000_intr()
1201 hostdata->state = S_CONNECTED; in2000_intr()
1206 if (hostdata->level2 >= L2_BASIC) { in2000_intr()
1207 write_3393(hostdata, WD_COMMAND_PHASE, 0x45); in2000_intr()
1208 write_3393_cmd(hostdata, WD_CMD_SEL_ATN_XFER); in2000_intr()
1209 hostdata->state = S_RUNNING_LEVEL2; in2000_intr()
1211 write_3393_cmd(hostdata, WD_CMD_NEGATE_ACK); in2000_intr()
1212 hostdata->state = S_CONNECTED; in2000_intr()
1219 write_3393_cmd(hostdata, WD_CMD_NEGATE_ACK); in2000_intr()
1220 hostdata->state = S_PRE_TMP_DISC; in2000_intr()
1228 if (hostdata->sync_stat[cmd->device->id] == SS_WAITING) in2000_intr()
1229 hostdata->sync_stat[cmd->device->id] = SS_SET; in2000_intr()
1230 write_3393_cmd(hostdata, WD_CMD_NEGATE_ACK); in2000_intr()
1231 hostdata->state = S_CONNECTED; in2000_intr()
1237 ucp = hostdata->incoming_msg; in2000_intr()
1240 printk("%02x", ucp[hostdata->incoming_ptr]); in2000_intr()
1244 if ((hostdata->incoming_ptr >= 2) && (hostdata->incoming_ptr == (ucp[1] + 1))) { in2000_intr()
1249 if (hostdata->sync_stat[cmd->device->id] != SS_WAITING) { in2000_intr()
1260 write_3393_cmd(hostdata, WD_CMD_ASSERT_ATN); /* want MESS_OUT */ in2000_intr()
1261 hostdata->outgoing_msg[0] = EXTENDED_MESSAGE; in2000_intr()
1262 hostdata->outgoing_msg[1] = 3; in2000_intr()
1263 hostdata->outgoing_msg[2] = EXTENDED_SDTR; in2000_intr()
1264 hostdata->outgoing_msg[3] = hostdata->default_sx_per / 4; in2000_intr()
1265 hostdata->outgoing_msg[4] = 0; in2000_intr()
1266 hostdata->outgoing_len = 5; in2000_intr()
1267 hostdata->sync_xfer[cmd->device->id] = calc_sync_xfer(hostdata->default_sx_per / 4, 0); in2000_intr()
1269 hostdata->sync_xfer[cmd->device->id] = id; in2000_intr()
1272 printk("sync_xfer=%02x", hostdata->sync_xfer[cmd->device->id]); in2000_intr()
1274 hostdata->sync_stat[cmd->device->id] = SS_SET; in2000_intr()
1275 write_3393_cmd(hostdata, WD_CMD_NEGATE_ACK); in2000_intr()
1276 hostdata->state = S_CONNECTED; in2000_intr()
1279 write_3393_cmd(hostdata, WD_CMD_ASSERT_ATN); /* want MESS_OUT */ in2000_intr()
1281 hostdata->outgoing_msg[0] = EXTENDED_MESSAGE; in2000_intr()
1282 hostdata->outgoing_msg[1] = 2; in2000_intr()
1283 hostdata->outgoing_msg[2] = EXTENDED_WDTR; in2000_intr()
1284 hostdata->outgoing_msg[3] = 0; /* 8 bit transfer width */ in2000_intr()
1285 hostdata->outgoing_len = 4; in2000_intr()
1286 write_3393_cmd(hostdata, WD_CMD_NEGATE_ACK); in2000_intr()
1287 hostdata->state = S_CONNECTED; in2000_intr()
1290 write_3393_cmd(hostdata, WD_CMD_ASSERT_ATN); /* want MESS_OUT */ in2000_intr()
1292 hostdata->outgoing_msg[0] = MESSAGE_REJECT; in2000_intr()
1293 hostdata->outgoing_len = 1; in2000_intr()
1294 write_3393_cmd(hostdata, WD_CMD_NEGATE_ACK); in2000_intr()
1295 hostdata->state = S_CONNECTED; in2000_intr()
1298 hostdata->incoming_ptr = 0; in2000_intr()
1304 hostdata->incoming_ptr++; in2000_intr()
1305 write_3393_cmd(hostdata, WD_CMD_NEGATE_ACK); in2000_intr()
1306 hostdata->state = S_CONNECTED; in2000_intr()
1312 write_3393_cmd(hostdata, WD_CMD_ASSERT_ATN); /* want MESS_OUT */ in2000_intr()
1313 hostdata->outgoing_msg[0] = MESSAGE_REJECT; in2000_intr()
1314 hostdata->outgoing_len = 1; in2000_intr()
1315 write_3393_cmd(hostdata, WD_CMD_NEGATE_ACK); in2000_intr()
1316 hostdata->state = S_CONNECTED; in2000_intr()
1329 write_3393(hostdata, WD_SOURCE_ID, SRCID_ER); in2000_intr()
1333 lun = read_3393(hostdata, WD_TARGET_LUN); in2000_intr()
1335 hostdata->connected = NULL; in2000_intr()
1336 hostdata->busy[cmd->device->id] &= ~(1 << cmd->device->lun); in2000_intr()
1337 hostdata->state = S_UNCONNECTED; in2000_intr()
1361 hostdata->state = S_RUNNING_LEVEL2; in2000_intr()
1362 write_3393(hostdata, WD_COMMAND_PHASE, 0x41); in2000_intr()
1363 write_3393_cmd(hostdata, WD_CMD_SEL_ATN_XFER); in2000_intr()
1384 if (hostdata->outgoing_len == 0) { in2000_intr()
1385 hostdata->outgoing_len = 1; in2000_intr()
1386 hostdata->outgoing_msg[0] = NOP; in2000_intr()
1388 transfer_pio(hostdata->outgoing_msg, hostdata->outgoing_len, DATA_OUT_DIR, hostdata); in2000_intr()
1389 DB(DB_INTR, printk("%02x", hostdata->outgoing_msg[0])) in2000_intr()
1390 hostdata->outgoing_len = 0; in2000_intr()
1391 hostdata->state = S_CONNECTED; in2000_intr()
1410 write_3393(hostdata, WD_SOURCE_ID, SRCID_ER); in2000_intr()
1413 hostdata->state = S_UNCONNECTED; in2000_intr()
1420 hostdata->connected = NULL; in2000_intr()
1421 hostdata->busy[cmd->device->id] &= ~(1 << cmd->device->lun); in2000_intr()
1422 hostdata->state = S_UNCONNECTED; in2000_intr()
1443 write_3393(hostdata, WD_SOURCE_ID, SRCID_ER); in2000_intr()
1447 hostdata->state = S_UNCONNECTED; in2000_intr()
1449 switch (hostdata->state) { in2000_intr()
1451 hostdata->connected = NULL; in2000_intr()
1452 hostdata->busy[cmd->device->id] &= ~(1 << cmd->device->lun); in2000_intr()
1453 hostdata->state = S_UNCONNECTED; in2000_intr()
1463 cmd->host_scribble = (uchar *) hostdata->disconnected_Q; in2000_intr()
1464 hostdata->disconnected_Q = cmd; in2000_intr()
1465 hostdata->connected = NULL; in2000_intr()
1466 hostdata->state = S_UNCONNECTED; in2000_intr()
1469 hostdata->disc_done_cnt[cmd->device->id]++; in2000_intr()
1475 hostdata->state = S_UNCONNECTED; in2000_intr()
1492 if (hostdata->level2 <= L2_NONE) { in2000_intr()
1494 if (hostdata->selecting) { in2000_intr()
1495 cmd = (Scsi_Cmnd *) hostdata->selecting; in2000_intr()
1496 hostdata->selecting = NULL; in2000_intr()
1497 hostdata->busy[cmd->device->id] &= ~(1 << cmd->device->lun); in2000_intr()
1498 cmd->host_scribble = (uchar *) hostdata->input_Q; in2000_intr()
1499 hostdata->input_Q = cmd; in2000_intr()
1507 hostdata->busy[cmd->device->id] &= ~(1 << cmd->device->lun); in2000_intr()
1508 cmd->host_scribble = (uchar *) hostdata->input_Q; in2000_intr()
1509 hostdata->input_Q = cmd; in2000_intr()
1521 id = read_3393(hostdata, WD_SOURCE_ID); in2000_intr()
1529 lun = read_3393(hostdata, WD_DATA); in2000_intr()
1530 if (hostdata->level2 < L2_RESELECT) in2000_intr()
1531 write_3393_cmd(hostdata, WD_CMD_NEGATE_ACK); in2000_intr()
1536 cmd = (Scsi_Cmnd *) hostdata->disconnected_Q; in2000_intr()
1557 hostdata->disconnected_Q = (Scsi_Cmnd *) cmd->host_scribble; in2000_intr()
1558 hostdata->connected = cmd; in2000_intr()
1560 /* We don't need to worry about 'initialize_SCp()' or 'hostdata->busy[]' in2000_intr()
1566 write_3393(hostdata, WD_DESTINATION_ID, cmd->device->id); in2000_intr()
1568 write_3393(hostdata, WD_DESTINATION_ID, cmd->device->id | DSTID_DPD); in2000_intr()
1569 if (hostdata->level2 >= L2_RESELECT) { in2000_intr()
1570 write_3393_count(hostdata, 0); /* we want a DATA_PHASE interrupt */ in2000_intr()
1571 write_3393(hostdata, WD_COMMAND_PHASE, 0x45); in2000_intr()
1572 write_3393_cmd(hostdata, WD_CMD_SEL_ATN_XFER); in2000_intr()
1573 hostdata->state = S_RUNNING_LEVEL2; in2000_intr()
1575 hostdata->state = S_CONNECTED; in2000_intr()
1604 struct IN2000_hostdata *hostdata; reset_hardware() local
1607 hostdata = (struct IN2000_hostdata *) instance->hostdata; reset_hardware()
1614 x = read_3393(hostdata, WD_SCSI_STATUS); /* clear any WD intrpt */ reset_hardware()
1615 write_3393(hostdata, WD_OWN_ID, instance->this_id | OWNID_EAF | OWNID_RAF | OWNID_FS_8); reset_hardware()
1616 write_3393(hostdata, WD_CONTROL, CTRL_IDI | CTRL_EDI | CTRL_POLLED); reset_hardware()
1617 write_3393(hostdata, WD_SYNCHRONOUS_TRANSFER, calc_sync_xfer(hostdata->default_sx_per / 4, DEFAULT_SX_OFF)); reset_hardware()
1621 write_3393(hostdata, WD_COMMAND, WD_CMD_RESET); reset_hardware()
1626 x = read_3393(hostdata, WD_SCSI_STATUS); /* clear interrupt */ reset_hardware()
1628 write_3393(hostdata, WD_QUEUE_TAG, 0xa5); /* any random number */ reset_hardware()
1629 qt = read_3393(hostdata, WD_QUEUE_TAG); reset_hardware()
1632 write_3393(hostdata, WD_QUEUE_TAG, 0); reset_hardware()
1634 write_3393(hostdata, WD_TIMEOUT_PERIOD, TIMEOUT_PERIOD_VALUE); reset_hardware()
1635 write_3393(hostdata, WD_CONTROL, CTRL_IDI | CTRL_EDI | CTRL_POLLED); reset_hardware()
1645 struct IN2000_hostdata *hostdata; in2000_bus_reset() local
1650 hostdata = (struct IN2000_hostdata *) instance->hostdata; in2000_bus_reset()
1659 hostdata->busy[x] = 0; in2000_bus_reset()
1660 hostdata->sync_xfer[x] = calc_sync_xfer(DEFAULT_SX_PER / 4, DEFAULT_SX_OFF); in2000_bus_reset()
1661 hostdata->sync_stat[x] = SS_UNSET; /* using default sync values */ in2000_bus_reset()
1663 hostdata->input_Q = NULL; in2000_bus_reset()
1664 hostdata->selecting = NULL; in2000_bus_reset()
1665 hostdata->connected = NULL; in2000_bus_reset()
1666 hostdata->disconnected_Q = NULL; in2000_bus_reset()
1667 hostdata->state = S_UNCONNECTED; in2000_bus_reset()
1668 hostdata->fifo = FI_FIFO_UNUSED; in2000_bus_reset()
1669 hostdata->incoming_ptr = 0; in2000_bus_reset()
1670 hostdata->outgoing_len = 0; in2000_bus_reset()
1681 struct IN2000_hostdata *hostdata; __in2000_abort() local
1687 hostdata = (struct IN2000_hostdata *) instance->hostdata; __in2000_abort()
1690 printk("(asr=%02x,count=%ld,resid=%d,buf_resid=%d,have_data=%d,FC=%02x)- ", READ_AUX_STAT(), read_3393_count(hostdata), cmd->SCp.this_residual, cmd->SCp.buffers_residual, cmd->SCp.have_data_in, read1_io(IO_FIFO_COUNT)); __in2000_abort()
1697 tmp = (Scsi_Cmnd *) hostdata->input_Q; __in2000_abort()
1724 if (hostdata->connected == cmd) { __in2000_abort()
1729 write_3393(hostdata, WD_CONTROL, CTRL_IDI | CTRL_EDI | CTRL_POLLED); __in2000_abort()
1730 write_3393_cmd(hostdata, WD_CMD_ABORT); __in2000_abort()
1739 read_3393(hostdata, WD_DATA); __in2000_abort()
1741 sr = read_3393(hostdata, WD_SCSI_STATUS); __in2000_abort()
1742 printk("asr=%02x, sr=%02x, %ld bytes un-transferred (timeout=%ld) - ", asr, sr, read_3393_count(hostdata), timeout); __in2000_abort()
1751 write_3393_cmd(hostdata, WD_CMD_DISCONNECT); __in2000_abort()
1757 sr = read_3393(hostdata, WD_SCSI_STATUS); __in2000_abort()
1760 hostdata->busy[cmd->device->id] &= ~(1 << cmd->device->lun); __in2000_abort()
1761 hostdata->connected = NULL; __in2000_abort()
1762 hostdata->state = S_UNCONNECTED; __in2000_abort()
1777 for (tmp = (Scsi_Cmnd *) hostdata->disconnected_Q; tmp; tmp = (Scsi_Cmnd *) tmp->host_scribble) __in2000_abort()
1920 struct IN2000_hostdata *hostdata; in2000_detect() local
2009 hostdata = (struct IN2000_hostdata *) instance->hostdata; in2000_detect()
2010 instance->io_port = hostdata->io_base = base; in2000_detect()
2011 hostdata->dip_switch = switches; in2000_detect()
2012 hostdata->hrev = hrev; in2000_detect()
2028 hostdata->busy[x] = 0; in2000_detect()
2029 hostdata->sync_xfer[x] = calc_sync_xfer(DEFAULT_SX_PER / 4, DEFAULT_SX_OFF); in2000_detect()
2030 hostdata->sync_stat[x] = SS_UNSET; /* using default sync values */ in2000_detect()
2032 hostdata->cmd_cnt[x] = 0; in2000_detect()
2033 hostdata->disc_allowed_cnt[x] = 0; in2000_detect()
2034 hostdata->disc_done_cnt[x] = 0; in2000_detect()
2037 hostdata->input_Q = NULL; in2000_detect()
2038 hostdata->selecting = NULL; in2000_detect()
2039 hostdata->connected = NULL; in2000_detect()
2040 hostdata->disconnected_Q = NULL; in2000_detect()
2041 hostdata->state = S_UNCONNECTED; in2000_detect()
2042 hostdata->fifo = FI_FIFO_UNUSED; in2000_detect()
2043 hostdata->level2 = L2_BASIC; in2000_detect()
2044 hostdata->disconnect = DIS_ADAPTIVE; in2000_detect()
2045 hostdata->args = DEBUG_DEFAULTS; in2000_detect()
2046 hostdata->incoming_ptr = 0; in2000_detect()
2047 hostdata->outgoing_len = 0; in2000_detect()
2048 hostdata->default_sx_per = DEFAULT_SX_PER; in2000_detect()
2053 hostdata->sync_off = 0x00; /* sync defaults to on */ in2000_detect()
2055 hostdata->sync_off = 0xff; /* sync defaults to off */ in2000_detect()
2058 hostdata->proc = PR_VERSION | PR_INFO | PR_STATISTICS | PR_CONNECTED | PR_INPUTQ | PR_DISCQ | PR_STOP; in2000_detect()
2060 hostdata->int_cnt = 0; in2000_detect()
2065 hostdata->sync_off = val; in2000_detect()
2068 hostdata->default_sx_per = sx_table[round_period((unsigned int) val)].period_ns; in2000_detect()
2072 hostdata->disconnect = val; in2000_detect()
2074 hostdata->disconnect = DIS_ADAPTIVE; in2000_detect()
2078 hostdata->args ^= A_NO_SCSI_RESET; in2000_detect()
2081 hostdata->level2 = val; in2000_detect()
2084 hostdata->args = (val & DB_MASK); in2000_detect()
2088 hostdata->proc = val; in2000_detect()
2095 x = reset_hardware(instance, (hostdata->args & A_NO_SCSI_RESET) ? RESET_CARD : RESET_CARD_AND_BUS); in2000_detect()
2098 hostdata->microcode = read_3393(hostdata, WD_CDB_1); in2000_detect()
2101 hostdata->chip = C_WD33C93B; in2000_detect()
2103 hostdata->chip = C_WD33C93A; in2000_detect()
2105 hostdata->chip = C_WD33C93; in2000_detect()
2107 printk("dip_switch=%02x irq=%d ioport=%02x floppy=%s sync/DOS5=%s ", (switches & 0x7f), instance->irq, hostdata->io_base, (switches & SW_FLOPPY) ? "Yes" : "No", (switches & SW_SYNC_DOS5) ? "Yes" : "No"); in2000_detect()
2108 printk("hardware_ver=%02x chip=%s microcode=%02x\n", hrev, (hostdata->chip == C_WD33C93) ? "WD33c93" : (hostdata->chip == C_WD33C93A) ? "WD33c93A" : (hostdata->chip == C_WD33C93B) ? "WD33c93B" : "unknown", hostdata->microcode); in2000_detect()
2115 if (hostdata->sync_off == 0xff) in2000_detect()
2178 hd = (struct IN2000_hostdata *) instance->hostdata; in2000_write_info()
2221 hd = (struct IN2000_hostdata *) instance->hostdata; in2000_show_info()
H A Dlasi700.c102 struct NCR_700_Host_Parameters *hostdata; lasi700_probe() local
105 hostdata = kzalloc(sizeof(*hostdata), GFP_KERNEL); lasi700_probe()
106 if (!hostdata) { lasi700_probe()
111 hostdata->dev = &dev->dev; lasi700_probe()
113 hostdata->base = ioremap_nocache(base, 0x100); lasi700_probe()
114 hostdata->differential = 0; lasi700_probe()
117 hostdata->clock = LASI700_CLOCK; lasi700_probe()
118 hostdata->force_le_on_be = 1; lasi700_probe()
120 hostdata->clock = LASI710_CLOCK; lasi700_probe()
121 hostdata->force_le_on_be = 0; lasi700_probe()
122 hostdata->chip710 = 1; lasi700_probe()
123 hostdata->dmode_extra = DMODE_FC2; lasi700_probe()
124 hostdata->burst_length = 8; lasi700_probe()
127 host = NCR_700_detect(&lasi700_template, hostdata, &dev->dev); lasi700_probe()
146 iounmap(hostdata->base); lasi700_probe()
147 kfree(hostdata); lasi700_probe()
155 struct NCR_700_Host_Parameters *hostdata = lasi700_driver_remove() local
156 (struct NCR_700_Host_Parameters *)host->hostdata[0]; lasi700_driver_remove()
161 iounmap(hostdata->base); lasi700_driver_remove()
162 kfree(hostdata); lasi700_driver_remove()
H A Dmvme16x_scsi.c40 struct NCR_700_Host_Parameters *hostdata; mvme16x_probe() local
51 hostdata = kzalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL); mvme16x_probe()
52 if (hostdata == NULL) { mvme16x_probe()
58 /* Fill in the required pieces of hostdata */ mvme16x_probe()
59 hostdata->base = (void __iomem *)0xfff47000UL; mvme16x_probe()
60 hostdata->clock = 50; /* XXX - depends on the CPU clock! */ mvme16x_probe()
61 hostdata->chip710 = 1; mvme16x_probe()
62 hostdata->dmode_extra = DMODE_FC2; mvme16x_probe()
63 hostdata->dcntl_extra = EA_710; mvme16x_probe()
64 hostdata->ctest7_extra = CTEST7_TT1; mvme16x_probe()
67 host = NCR_700_detect(&mvme16x_scsi_driver_template, hostdata, mvme16x_probe()
100 kfree(hostdata); mvme16x_probe()
108 struct NCR_700_Host_Parameters *hostdata = shost_priv(host); mvme16x_device_remove() local
120 kfree(hostdata); mvme16x_device_remove()
H A Dzorro7xx.c78 struct NCR_700_Host_Parameters *hostdata; zorro7xx_init_one() local
97 hostdata = kzalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL); zorro7xx_init_one()
98 if (!hostdata) { zorro7xx_init_one()
103 /* Fill in the required pieces of hostdata */ zorro7xx_init_one()
105 hostdata->base = ioremap(ioaddr, zorro_resource_len(z)); zorro7xx_init_one()
107 hostdata->base = ZTWO_VADDR(ioaddr); zorro7xx_init_one()
109 hostdata->clock = 50; zorro7xx_init_one()
110 hostdata->chip710 = 1; zorro7xx_init_one()
113 hostdata->ctest7_extra = CTEST7_TT1; zorro7xx_init_one()
118 host = NCR_700_detect(&zorro7xx_scsi_driver_template, hostdata, zorro7xx_init_one()
145 iounmap(hostdata->base); zorro7xx_init_one()
146 kfree(hostdata); zorro7xx_init_one()
156 struct NCR_700_Host_Parameters *hostdata = shost_priv(host); zorro7xx_remove_one() local
161 kfree(hostdata); zorro7xx_remove_one()
H A Dwd33c93.c96 #define optimum_sx_per(hostdata) (hostdata)->sx_table[1].period_ns
378 struct WD33C93_hostdata *hostdata; wd33c93_queuecommand_lck() local
381 hostdata = (struct WD33C93_hostdata *) cmd->device->host->hostdata; wd33c93_queuecommand_lck()
447 spin_lock_irq(&hostdata->lock); wd33c93_queuecommand_lck()
449 if (!(hostdata->input_Q) || (cmd->cmnd[0] == REQUEST_SENSE)) { wd33c93_queuecommand_lck()
450 cmd->host_scribble = (uchar *) hostdata->input_Q; wd33c93_queuecommand_lck()
451 hostdata->input_Q = cmd; wd33c93_queuecommand_lck()
453 for (tmp = (struct scsi_cmnd *) hostdata->input_Q; wd33c93_queuecommand_lck()
467 spin_unlock_irq(&hostdata->lock); wd33c93_queuecommand_lck()
486 struct WD33C93_hostdata *hostdata = wd33c93_execute() local
487 (struct WD33C93_hostdata *) instance->hostdata; wd33c93_execute()
488 const wd33c93_regs regs = hostdata->regs; wd33c93_execute()
492 if (hostdata->selecting || hostdata->connected) { wd33c93_execute()
502 cmd = (struct scsi_cmnd *) hostdata->input_Q; wd33c93_execute()
505 if (!(hostdata->busy[cmd->device->id] & wd33c93_execute()
524 hostdata->input_Q = (struct scsi_cmnd *) cmd->host_scribble; wd33c93_execute()
527 hostdata->cmd_cnt[cmd->device->id]++; wd33c93_execute()
547 * + Commands should NEVER disconnect if hostdata->disconnect = wd33c93_execute()
549 * disconnect if hostdata->disconnect = DIS_ALWAYS. wd33c93_execute()
563 if (hostdata->disconnect == DIS_NEVER) wd33c93_execute()
565 if (hostdata->disconnect == DIS_ALWAYS) wd33c93_execute()
569 if (hostdata->disconnected_Q) /* other commands disconnected? */ wd33c93_execute()
571 if (!(hostdata->input_Q)) /* input_Q empty? */ wd33c93_execute()
573 for (prev = (struct scsi_cmnd *) hostdata->input_Q; prev; wd33c93_execute()
577 for (prev = (struct scsi_cmnd *) hostdata->input_Q; prev; wd33c93_execute()
590 hostdata->disc_allowed_cnt[cmd->device->id]++; wd33c93_execute()
599 hostdata->sync_xfer[cmd->device->id]); wd33c93_execute()
600 hostdata->busy[cmd->device->id] |= (1 << (cmd->device->lun & 0xFF)); wd33c93_execute()
602 if ((hostdata->level2 == L2_NONE) || wd33c93_execute()
603 (hostdata->sync_stat[cmd->device->id] == SS_UNSET)) { wd33c93_execute()
613 hostdata->selecting = cmd; wd33c93_execute()
627 if (hostdata->sync_stat[cmd->device->id] == SS_UNSET) wd33c93_execute()
628 hostdata->sync_stat[cmd->device->id] = SS_FIRST; wd33c93_execute()
629 hostdata->state = S_SELECTING; wd33c93_execute()
642 hostdata->connected = cmd; wd33c93_execute()
664 if ((cmd->SCp.phase == 0) && (hostdata->no_dma == 0)) { wd33c93_execute()
665 if (hostdata->dma_setup(cmd, wd33c93_execute()
673 CTRL_IDI | CTRL_EDI | hostdata->dma_mode); wd33c93_execute()
674 hostdata->dma = D_DMA_RUNNING; wd33c93_execute()
679 hostdata->state = S_RUNNING_LEVEL2; wd33c93_execute()
696 int data_in_dir, struct WD33C93_hostdata *hostdata) transfer_pio()
733 struct WD33C93_hostdata *hostdata; transfer_bytes() local
736 hostdata = (struct WD33C93_hostdata *) cmd->device->host->hostdata; transfer_bytes()
756 hostdata->sync_xfer[cmd->device->id]); transfer_bytes()
758 /* 'hostdata->no_dma' is TRUE if we don't even want to try DMA. transfer_bytes()
762 if (hostdata->no_dma || hostdata->dma_setup(cmd, data_in_dir)) { transfer_bytes()
764 hostdata->pio_cnt++; transfer_bytes()
767 cmd->SCp.this_residual, data_in_dir, hostdata); transfer_bytes() local
775 * We set 'hostdata->dma' = D_DMA_RUNNING so that when the transfer_bytes()
784 hostdata->dma_cnt++; transfer_bytes()
786 write_wd33c93(regs, WD_CONTROL, CTRL_IDI | CTRL_EDI | hostdata->dma_mode); transfer_bytes()
789 if ((hostdata->level2 >= L2_DATA) || transfer_bytes()
790 (hostdata->level2 == L2_BASIC && cmd->SCp.phase == 0)) { transfer_bytes()
793 hostdata->state = S_RUNNING_LEVEL2; transfer_bytes()
797 hostdata->dma = D_DMA_RUNNING; transfer_bytes()
804 struct WD33C93_hostdata *hostdata = wd33c93_intr() local
805 (struct WD33C93_hostdata *) instance->hostdata; wd33c93_intr()
806 const wd33c93_regs regs = hostdata->regs; wd33c93_intr()
815 spin_lock_irqsave(&hostdata->lock, flags); wd33c93_intr()
818 hostdata->int_cnt++; wd33c93_intr()
821 cmd = (struct scsi_cmnd *) hostdata->connected; /* assume we're connected */ wd33c93_intr()
841 if (hostdata->dma == D_DMA_RUNNING) { wd33c93_intr()
844 hostdata->dma_stop(cmd->device->host, cmd, 1); wd33c93_intr()
845 hostdata->dma = D_DMA_OFF; wd33c93_intr()
858 if (hostdata->state == S_RUNNING_LEVEL2) wd33c93_intr()
859 hostdata->connected = NULL; wd33c93_intr()
861 cmd = (struct scsi_cmnd *) hostdata->selecting; /* get a valid cmd */ wd33c93_intr()
862 hostdata->selecting = NULL; wd33c93_intr()
866 hostdata->busy[cmd->device->id] &= ~(1 << (cmd->device->lun & 0xff)); wd33c93_intr()
867 hostdata->state = S_UNCONNECTED; wd33c93_intr()
880 spin_unlock_irqrestore(&hostdata->lock, flags); wd33c93_intr()
893 hostdata->connected = cmd = wd33c93_intr()
894 (struct scsi_cmnd *) hostdata->selecting; wd33c93_intr()
895 hostdata->selecting = NULL; wd33c93_intr()
899 hostdata->outgoing_msg[0] = IDENTIFY(0, cmd->device->lun); wd33c93_intr()
901 hostdata->outgoing_msg[0] |= 0x40; wd33c93_intr()
903 if (hostdata->sync_stat[cmd->device->id] == SS_FIRST) { wd33c93_intr()
905 hostdata->sync_stat[cmd->device->id] = SS_WAITING; wd33c93_intr()
913 hostdata->outgoing_msg[1] = EXTENDED_MESSAGE; wd33c93_intr()
914 hostdata->outgoing_msg[2] = 3; wd33c93_intr()
915 hostdata->outgoing_msg[3] = EXTENDED_SDTR; wd33c93_intr()
916 if (hostdata->no_sync & (1 << cmd->device->id)) { wd33c93_intr()
917 calc_sync_msg(hostdata->default_sx_per, 0, wd33c93_intr()
918 0, hostdata->outgoing_msg + 4); wd33c93_intr()
920 calc_sync_msg(optimum_sx_per(hostdata), wd33c93_intr()
922 hostdata->fast, wd33c93_intr()
923 hostdata->outgoing_msg + 4); wd33c93_intr()
925 hostdata->outgoing_len = 6; wd33c93_intr()
927 ucp = hostdata->outgoing_msg + 1; wd33c93_intr()
932 hostdata->outgoing_len = 1; wd33c93_intr()
934 hostdata->state = S_CONNECTED; wd33c93_intr()
935 spin_unlock_irqrestore(&hostdata->lock, flags); wd33c93_intr()
945 if (hostdata->state != S_RUNNING_LEVEL2) wd33c93_intr()
946 hostdata->state = S_CONNECTED; wd33c93_intr()
947 spin_unlock_irqrestore(&hostdata->lock, flags); wd33c93_intr()
957 if (hostdata->state != S_RUNNING_LEVEL2) wd33c93_intr()
958 hostdata->state = S_CONNECTED; wd33c93_intr()
959 spin_unlock_irqrestore(&hostdata->lock, flags); wd33c93_intr()
969 hostdata); wd33c93_intr()
970 hostdata->state = S_CONNECTED; wd33c93_intr()
971 spin_unlock_irqrestore(&hostdata->lock, flags); wd33c93_intr()
980 if (hostdata->level2 >= L2_BASIC) { wd33c93_intr()
983 hostdata->state = S_RUNNING_LEVEL2; wd33c93_intr()
987 hostdata->state = S_CONNECTED; wd33c93_intr()
989 spin_unlock_irqrestore(&hostdata->lock, flags); wd33c93_intr()
1001 hostdata->incoming_msg[hostdata->incoming_ptr] = msg; wd33c93_intr()
1002 if (hostdata->incoming_msg[0] == EXTENDED_MESSAGE) wd33c93_intr()
1005 hostdata->incoming_ptr = 0; wd33c93_intr()
1013 hostdata->state = S_PRE_CMP_DISC; wd33c93_intr()
1019 hostdata->state = S_CONNECTED; wd33c93_intr()
1024 if (hostdata->level2 >= L2_BASIC) { wd33c93_intr()
1027 hostdata->state = S_RUNNING_LEVEL2; wd33c93_intr()
1030 hostdata->state = S_CONNECTED; wd33c93_intr()
1038 hostdata->state = S_PRE_TMP_DISC; wd33c93_intr()
1046 if (hostdata->sync_stat[cmd->device->id] == SS_WAITING) { wd33c93_intr()
1047 hostdata->sync_stat[cmd->device->id] = SS_SET; wd33c93_intr()
1049 hostdata->sync_xfer[cmd->device->id] = wd33c93_intr()
1050 calc_sync_xfer(hostdata->default_sx_per wd33c93_intr()
1051 / 4, 0, 0, hostdata->sx_table); wd33c93_intr()
1054 hostdata->state = S_CONNECTED; wd33c93_intr()
1060 ucp = hostdata->incoming_msg; wd33c93_intr()
1063 printk("%02x", ucp[hostdata->incoming_ptr]); wd33c93_intr()
1067 if ((hostdata->incoming_ptr >= 2) && wd33c93_intr()
1068 (hostdata->incoming_ptr == (ucp[1] + 1))) { wd33c93_intr()
1073 id = calc_sync_xfer(hostdata-> wd33c93_intr()
1075 0, hostdata->sx_table); wd33c93_intr()
1076 if (hostdata->sync_stat[cmd->device->id] != wd33c93_intr()
1089 hostdata->outgoing_msg[0] = wd33c93_intr()
1091 hostdata->outgoing_msg[1] = 3; wd33c93_intr()
1092 hostdata->outgoing_msg[2] = wd33c93_intr()
1094 calc_sync_msg(hostdata-> wd33c93_intr()
1096 0, hostdata->outgoing_msg + 3); wd33c93_intr()
1097 hostdata->outgoing_len = 5; wd33c93_intr()
1101 hostdata->fast, wd33c93_intr()
1102 hostdata->sx_table); wd33c93_intr()
1105 0, hostdata->sx_table); wd33c93_intr()
1107 hostdata->sync_xfer[cmd->device->id] = id; wd33c93_intr()
1110 hostdata->sync_xfer[cmd->device->id]); wd33c93_intr()
1112 hostdata->sync_stat[cmd->device->id] = wd33c93_intr()
1116 hostdata->state = S_CONNECTED; wd33c93_intr()
1121 hostdata->outgoing_msg[0] = wd33c93_intr()
1123 hostdata->outgoing_msg[1] = 2; wd33c93_intr()
1124 hostdata->outgoing_msg[2] = wd33c93_intr()
1126 hostdata->outgoing_msg[3] = 0; /* 8 bit transfer width */ wd33c93_intr()
1127 hostdata->outgoing_len = 4; wd33c93_intr()
1130 hostdata->state = S_CONNECTED; wd33c93_intr()
1137 hostdata->outgoing_msg[0] = wd33c93_intr()
1139 hostdata->outgoing_len = 1; wd33c93_intr()
1142 hostdata->state = S_CONNECTED; wd33c93_intr()
1145 hostdata->incoming_ptr = 0; wd33c93_intr()
1151 hostdata->incoming_ptr++; wd33c93_intr()
1153 hostdata->state = S_CONNECTED; wd33c93_intr()
1160 hostdata->outgoing_msg[0] = MESSAGE_REJECT; wd33c93_intr()
1161 hostdata->outgoing_len = 1; wd33c93_intr()
1163 hostdata->state = S_CONNECTED; wd33c93_intr()
1165 spin_unlock_irqrestore(&hostdata->lock, flags); wd33c93_intr()
1182 hostdata->connected = NULL; wd33c93_intr()
1183 hostdata->busy[cmd->device->id] &= ~(1 << (cmd->device->lun & 0xff)); wd33c93_intr()
1184 hostdata->state = S_UNCONNECTED; wd33c93_intr()
1200 spin_unlock_irqrestore(&hostdata->lock, flags); wd33c93_intr()
1206 spin_unlock_irqrestore(&hostdata->lock, flags); wd33c93_intr()
1214 hostdata->state = S_RUNNING_LEVEL2; wd33c93_intr()
1217 spin_unlock_irqrestore(&hostdata->lock, flags); wd33c93_intr()
1237 if (hostdata->outgoing_len == 0) { wd33c93_intr()
1238 hostdata->outgoing_len = 1; wd33c93_intr()
1239 hostdata->outgoing_msg[0] = NOP; wd33c93_intr()
1241 transfer_pio(regs, hostdata->outgoing_msg, wd33c93_intr()
1242 hostdata->outgoing_len, DATA_OUT_DIR, hostdata); wd33c93_intr()
1243 DB(DB_INTR, printk("%02x", hostdata->outgoing_msg[0])) wd33c93_intr()
1244 hostdata->outgoing_len = 0; wd33c93_intr()
1245 hostdata->state = S_CONNECTED; wd33c93_intr()
1246 spin_unlock_irqrestore(&hostdata->lock, flags); wd33c93_intr()
1266 hostdata->state = S_UNCONNECTED; wd33c93_intr()
1267 spin_unlock_irqrestore(&hostdata->lock, flags); wd33c93_intr()
1271 hostdata->connected = NULL; wd33c93_intr()
1272 hostdata->busy[cmd->device->id] &= ~(1 << (cmd->device->lun & 0xff)); wd33c93_intr()
1273 hostdata->state = S_UNCONNECTED; wd33c93_intr()
1285 spin_unlock_irqrestore(&hostdata->lock, flags); wd33c93_intr()
1299 hostdata->state = S_UNCONNECTED; wd33c93_intr()
1301 switch (hostdata->state) { wd33c93_intr()
1303 hostdata->connected = NULL; wd33c93_intr()
1304 hostdata->busy[cmd->device->id] &= ~(1 << (cmd->device->lun & 0xff)); wd33c93_intr()
1305 hostdata->state = S_UNCONNECTED; wd33c93_intr()
1319 cmd->host_scribble = (uchar *) hostdata->disconnected_Q; wd33c93_intr()
1320 hostdata->disconnected_Q = cmd; wd33c93_intr()
1321 hostdata->connected = NULL; wd33c93_intr()
1322 hostdata->state = S_UNCONNECTED; wd33c93_intr()
1325 hostdata->disc_done_cnt[cmd->device->id]++; wd33c93_intr()
1331 hostdata->state = S_UNCONNECTED; wd33c93_intr()
1337 spin_unlock_irqrestore(&hostdata->lock, flags); wd33c93_intr()
1352 if (hostdata->level2 <= L2_NONE) { wd33c93_intr()
1354 if (hostdata->selecting) { wd33c93_intr()
1355 cmd = (struct scsi_cmnd *) hostdata->selecting; wd33c93_intr()
1356 hostdata->selecting = NULL; wd33c93_intr()
1357 hostdata->busy[cmd->device->id] &= ~(1 << (cmd->device->lun & 0xff)); wd33c93_intr()
1359 (uchar *) hostdata->input_Q; wd33c93_intr()
1360 hostdata->input_Q = cmd; wd33c93_intr()
1368 hostdata->busy[cmd->device->id] &= wd33c93_intr()
1371 (uchar *) hostdata->input_Q; wd33c93_intr()
1372 hostdata->input_Q = cmd; wd33c93_intr()
1396 if (hostdata->level2 < L2_RESELECT) wd33c93_intr()
1449 cmd = (struct scsi_cmnd *) hostdata->disconnected_Q; wd33c93_intr()
1464 spin_unlock_irqrestore(&hostdata->lock, flags); wd33c93_intr()
1473 hostdata->disconnected_Q = wd33c93_intr()
1475 hostdata->connected = cmd; wd33c93_intr()
1477 /* We don't need to worry about 'initialize_SCp()' or 'hostdata->busy[]' wd33c93_intr()
1487 if (hostdata->level2 >= L2_RESELECT) { wd33c93_intr()
1491 hostdata->state = S_RUNNING_LEVEL2; wd33c93_intr()
1493 hostdata->state = S_CONNECTED; wd33c93_intr()
1495 spin_unlock_irqrestore(&hostdata->lock, flags); wd33c93_intr()
1500 spin_unlock_irqrestore(&hostdata->lock, flags); wd33c93_intr()
1510 struct WD33C93_hostdata *hostdata = reset_wd33c93() local
1511 (struct WD33C93_hostdata *) instance->hostdata; reset_wd33c93()
1512 const wd33c93_regs regs = hostdata->regs; reset_wd33c93()
1536 instance->this_id | hostdata->clock_freq); reset_wd33c93()
1539 calc_sync_xfer(hostdata->default_sx_per / 4, reset_wd33c93()
1540 DEFAULT_SX_OFF, 0, hostdata->sx_table)); reset_wd33c93()
1552 hostdata->microcode = read_wd33c93(regs, WD_CDB_1); reset_wd33c93()
1554 hostdata->chip = C_WD33C93; reset_wd33c93()
1559 hostdata->chip = C_WD33C93B; reset_wd33c93()
1562 hostdata->chip = C_WD33C93A; reset_wd33c93()
1564 hostdata->chip = C_UNKNOWN_CHIP; reset_wd33c93()
1566 if (hostdata->chip != C_WD33C93B) /* Fast SCSI unavailable */ reset_wd33c93()
1567 hostdata->fast = 0; reset_wd33c93()
1577 struct WD33C93_hostdata *hostdata; wd33c93_host_reset() local
1581 hostdata = (struct WD33C93_hostdata *) instance->hostdata; wd33c93_host_reset()
1586 hostdata->dma_stop(instance, NULL, 0); wd33c93_host_reset()
1588 hostdata->busy[i] = 0; wd33c93_host_reset()
1589 hostdata->sync_xfer[i] = wd33c93_host_reset()
1591 0, hostdata->sx_table); wd33c93_host_reset()
1592 hostdata->sync_stat[i] = SS_UNSET; /* using default sync values */ wd33c93_host_reset()
1594 hostdata->input_Q = NULL; wd33c93_host_reset()
1595 hostdata->selecting = NULL; wd33c93_host_reset()
1596 hostdata->connected = NULL; wd33c93_host_reset()
1597 hostdata->disconnected_Q = NULL; wd33c93_host_reset()
1598 hostdata->state = S_UNCONNECTED; wd33c93_host_reset()
1599 hostdata->dma = D_DMA_OFF; wd33c93_host_reset()
1600 hostdata->incoming_ptr = 0; wd33c93_host_reset()
1601 hostdata->outgoing_len = 0; wd33c93_host_reset()
1613 struct WD33C93_hostdata *hostdata; wd33c93_abort() local
1620 hostdata = (struct WD33C93_hostdata *) instance->hostdata; wd33c93_abort()
1621 regs = hostdata->regs; wd33c93_abort()
1628 tmp = (struct scsi_cmnd *) hostdata->input_Q; wd33c93_abort()
1635 hostdata->input_Q = wd33c93_abort()
1661 if (hostdata->connected == cmd) { wd33c93_abort()
1669 if (hostdata->dma == D_DMA_RUNNING) { wd33c93_abort()
1670 hostdata->dma_stop(instance, cmd, 0); wd33c93_abort()
1671 hostdata->dma = D_DMA_OFF; wd33c93_abort()
1709 hostdata->busy[cmd->device->id] &= ~(1 << (cmd->device->lun & 0xff)); wd33c93_abort()
1710 hostdata->connected = NULL; wd33c93_abort()
1711 hostdata->state = S_UNCONNECTED; wd33c93_abort()
1728 tmp = (struct scsi_cmnd *) hostdata->disconnected_Q; wd33c93_abort()
1936 struct WD33C93_hostdata *hostdata; wd33c93_init() local
1945 hostdata = (struct WD33C93_hostdata *) instance->hostdata; wd33c93_init()
1947 hostdata->regs = regs; wd33c93_init()
1948 hostdata->clock_freq = set_clk_freq(clock_freq, &i); wd33c93_init()
1949 calc_sx_table(i, hostdata->sx_table); wd33c93_init()
1950 hostdata->dma_setup = setup; wd33c93_init()
1951 hostdata->dma_stop = stop; wd33c93_init()
1952 hostdata->dma_bounce_buffer = NULL; wd33c93_init()
1953 hostdata->dma_bounce_len = 0; wd33c93_init()
1955 hostdata->busy[i] = 0; wd33c93_init()
1956 hostdata->sync_xfer[i] = wd33c93_init()
1958 0, hostdata->sx_table); wd33c93_init()
1959 hostdata->sync_stat[i] = SS_UNSET; /* using default sync values */ wd33c93_init()
1961 hostdata->cmd_cnt[i] = 0; wd33c93_init()
1962 hostdata->disc_allowed_cnt[i] = 0; wd33c93_init()
1963 hostdata->disc_done_cnt[i] = 0; wd33c93_init()
1966 hostdata->input_Q = NULL; wd33c93_init()
1967 hostdata->selecting = NULL; wd33c93_init()
1968 hostdata->connected = NULL; wd33c93_init()
1969 hostdata->disconnected_Q = NULL; wd33c93_init()
1970 hostdata->state = S_UNCONNECTED; wd33c93_init()
1971 hostdata->dma = D_DMA_OFF; wd33c93_init()
1972 hostdata->level2 = L2_BASIC; wd33c93_init()
1973 hostdata->disconnect = DIS_ADAPTIVE; wd33c93_init()
1974 hostdata->args = DEBUG_DEFAULTS; wd33c93_init()
1975 hostdata->incoming_ptr = 0; wd33c93_init()
1976 hostdata->outgoing_len = 0; wd33c93_init()
1977 hostdata->default_sx_per = DEFAULT_SX_PER; wd33c93_init()
1978 hostdata->no_dma = 0; /* default is DMA enabled */ wd33c93_init()
1981 hostdata->proc = PR_VERSION | PR_INFO | PR_STATISTICS | wd33c93_init()
1984 hostdata->dma_cnt = 0; wd33c93_init()
1985 hostdata->pio_cnt = 0; wd33c93_init()
1986 hostdata->int_cnt = 0; wd33c93_init()
1991 hostdata->clock_freq = set_clk_freq(val, &val); wd33c93_init()
1992 calc_sx_table(val, hostdata->sx_table); wd33c93_init()
1996 hostdata->no_sync = val; wd33c93_init()
1999 hostdata->no_dma = (val == -1) ? 1 : val; wd33c93_init()
2002 hostdata->default_sx_per = wd33c93_init()
2003 hostdata->sx_table[round_period((unsigned int) val, wd33c93_init()
2004 hostdata->sx_table)].period_ns; wd33c93_init()
2008 hostdata->disconnect = val; wd33c93_init()
2010 hostdata->disconnect = DIS_ADAPTIVE; wd33c93_init()
2014 hostdata->level2 = val; wd33c93_init()
2017 hostdata->args = val & DB_MASK; wd33c93_init()
2020 hostdata->dma_mode = val ? CTRL_BURST:CTRL_DMA; wd33c93_init()
2022 if (WD33C93_FS_16_20 == hostdata->clock_freq /* divisor 4 */ wd33c93_init()
2024 hostdata->fast = !!val; wd33c93_init()
2032 hostdata->proc = val; wd33c93_init()
2035 spin_lock_irq(&hostdata->lock); wd33c93_init()
2037 spin_unlock_irq(&hostdata->lock); wd33c93_init()
2041 (hostdata->chip == C_WD33C93) ? "WD33c93" : (hostdata->chip == wd33c93_init()
2043 "WD33c93A" : (hostdata->chip == wd33c93_init()
2045 hostdata->microcode, hostdata->no_sync, hostdata->no_dma); wd33c93_init()
2047 printk(" debug_flags=0x%02x\n", hostdata->args); wd33c93_init()
2065 hd = (struct WD33C93_hostdata *) instance->hostdata; wd33c93_write_info()
2135 hd = (struct WD33C93_hostdata *) instance->hostdata; wd33c93_show_info()
695 transfer_pio(const wd33c93_regs regs, uchar * buf, int cnt, int data_in_dir, struct WD33C93_hostdata *hostdata) transfer_pio() argument
H A Datari_NCR5380.c226 struct NCR5380_hostdata *hostdata = \
227 (struct NCR5380_hostdata *)(in)->hostdata
228 #define HOSTDATA(in) ((struct NCR5380_hostdata *)(in)->hostdata)
274 static void __init init_tags(struct NCR5380_hostdata *hostdata) init_tags() argument
279 if (!(hostdata->flags & FLAG_TAGGED_QUEUING)) init_tags()
284 ta = &hostdata->TagAlloc[target][lun]; init_tags()
309 if (hostdata->busy[cmd->device->id] & (1 << lun)) is_lun_busy()
312 !(hostdata->flags & FLAG_TAGGED_QUEUING) || is_lun_busy()
315 if (hostdata->TagAlloc[scmd_id(cmd)][lun].nr_allocated >= is_lun_busy()
316 hostdata->TagAlloc[scmd_id(cmd)][lun].queue_size) { is_lun_busy()
339 !(hostdata->flags & FLAG_TAGGED_QUEUING) || cmd_get_tag()
342 hostdata->busy[cmd->device->id] |= (1 << lun); cmd_get_tag()
346 struct tag_alloc *ta = &hostdata->TagAlloc[scmd_id(cmd)][lun]; cmd_get_tag()
369 hostdata->busy[cmd->device->id] &= ~(1 << lun); cmd_free_tag()
376 struct tag_alloc *ta = &hostdata->TagAlloc[scmd_id(cmd)][lun]; cmd_free_tag()
385 static void free_all_tags(struct NCR5380_hostdata *hostdata) free_all_tags() argument
390 if (!(hostdata->flags & FLAG_TAGGED_QUEUING)) free_all_tags()
395 ta = &hostdata->TagAlloc[target][lun]; free_all_tags()
595 static inline void queue_main(struct NCR5380_hostdata *hostdata) queue_main() argument
597 if (!hostdata->main_running) { queue_main()
602 schedule_work(&hostdata->main_task); queue_main()
619 struct NCR5380_hostdata *hostdata = shost_priv(instance); NCR5380_info() local
621 return hostdata->info; NCR5380_info()
626 struct NCR5380_hostdata *hostdata = shost_priv(instance); prepare_info() local
628 snprintf(hostdata->info, sizeof(hostdata->info), prepare_info()
639 hostdata->flags & FLAG_TAGGED_QUEUING ? "TAGGED_QUEUING " : "", prepare_info()
679 struct NCR5380_hostdata *hostdata; NCR5380_print_status() local
686 hostdata = (struct NCR5380_hostdata *)instance->hostdata; NCR5380_print_status()
690 hostdata->main_running ? "" : "n't"); NCR5380_print_status()
691 if (!hostdata->connected) NCR5380_print_status()
694 lprint_Scsi_Cmnd((struct scsi_cmnd *) hostdata->connected); NCR5380_print_status()
696 for (ptr = (struct scsi_cmnd *)hostdata->issue_queue; ptr; ptr = NEXT(ptr)) NCR5380_print_status()
700 for (ptr = (struct scsi_cmnd *) hostdata->disconnected_queue; ptr; NCR5380_print_status()
725 struct NCR5380_hostdata *hostdata; NCR5380_show_info() local
729 hostdata = (struct NCR5380_hostdata *)instance->hostdata; NCR5380_show_info()
733 hostdata->main_running ? "" : "n't"); NCR5380_show_info()
734 if (!hostdata->connected) NCR5380_show_info()
737 show_Scsi_Cmnd((struct scsi_cmnd *) hostdata->connected, m); NCR5380_show_info()
739 for (ptr = (struct scsi_cmnd *)hostdata->issue_queue; ptr; ptr = NEXT(ptr)) NCR5380_show_info()
743 for (ptr = (struct scsi_cmnd *) hostdata->disconnected_queue; ptr; NCR5380_show_info()
770 hostdata->host = instance; NCR5380_init()
771 hostdata->aborted = 0; NCR5380_init()
772 hostdata->id_mask = 1 << instance->this_id; NCR5380_init()
773 hostdata->id_higher_mask = 0; NCR5380_init()
774 for (i = hostdata->id_mask; i <= 0x80; i <<= 1) NCR5380_init()
775 if (i > hostdata->id_mask) NCR5380_init()
776 hostdata->id_higher_mask |= i; NCR5380_init()
778 hostdata->busy[i] = 0; NCR5380_init()
780 init_tags(hostdata); NCR5380_init()
783 hostdata->dma_len = 0; NCR5380_init()
785 hostdata->targets_present = 0; NCR5380_init()
786 hostdata->connected = NULL; NCR5380_init()
787 hostdata->issue_queue = NULL; NCR5380_init()
788 hostdata->disconnected_queue = NULL; NCR5380_init()
789 hostdata->flags = flags; NCR5380_init()
791 INIT_WORK(&hostdata->main_task, NCR5380_main); NCR5380_init()
812 struct NCR5380_hostdata *hostdata = shost_priv(instance); NCR5380_exit() local
814 cancel_work_sync(&hostdata->main_task); NCR5380_exit()
830 struct NCR5380_hostdata *hostdata = shost_priv(instance); NCR5380_queue_command() local
885 if (!(hostdata->issue_queue) || (cmd->cmnd[0] == REQUEST_SENSE)) { NCR5380_queue_command()
886 LIST(cmd, hostdata->issue_queue); NCR5380_queue_command()
887 SET_NEXT(cmd, hostdata->issue_queue); NCR5380_queue_command()
888 hostdata->issue_queue = cmd; NCR5380_queue_command()
890 for (tmp = (struct scsi_cmnd *)hostdata->issue_queue; NCR5380_queue_command()
909 queue_main(hostdata); NCR5380_queue_command()
911 NCR5380_main(&hostdata->main_task); NCR5380_queue_command()
917 struct NCR5380_hostdata *hostdata = shost_priv(instance); maybe_release_dma_irq() local
920 if (!hostdata->disconnected_queue && maybe_release_dma_irq()
921 !hostdata->issue_queue && maybe_release_dma_irq()
922 !hostdata->connected && maybe_release_dma_irq()
923 !hostdata->retain_dma_intr) maybe_release_dma_irq()
940 struct NCR5380_hostdata *hostdata = NCR5380_main() local
942 struct Scsi_Host *instance = hostdata->host; NCR5380_main()
968 if (hostdata->main_running) NCR5380_main()
970 hostdata->main_running = 1; NCR5380_main()
977 if (!hostdata->connected) { NCR5380_main()
984 for (tmp = (struct scsi_cmnd *) hostdata->issue_queue, prev = NULL; NCR5380_main()
992 for (tmp = (struct scsi_cmnd *) hostdata->issue_queue, NCR5380_main()
998 tmp, scmd_id(tmp), hostdata->busy[scmd_id(tmp)], NCR5380_main()
1006 !(hostdata->busy[tmp->device->id] & (1 << lun)) NCR5380_main()
1015 REMOVE(-1, hostdata->issue_queue, tmp, NEXT(tmp)); NCR5380_main()
1016 hostdata->issue_queue = NEXT(tmp); NCR5380_main()
1019 hostdata->retain_dma_intr++; NCR5380_main()
1026 * On success, instance->hostdata->connected is set. NCR5380_main()
1048 hostdata->retain_dma_intr--; NCR5380_main()
1055 LIST(tmp, hostdata->issue_queue); NCR5380_main()
1056 SET_NEXT(tmp, hostdata->issue_queue); NCR5380_main()
1057 hostdata->issue_queue = tmp; NCR5380_main()
1061 hostdata->retain_dma_intr--; NCR5380_main()
1065 if (hostdata->connected) NCR5380_main()
1070 } /* if (!hostdata->connected) */ NCR5380_main()
1072 if (hostdata->connected NCR5380_main()
1074 && !hostdata->dma_len NCR5380_main()
1089 hostdata->main_running = 0; NCR5380_main()
1114 if (!hostdata->connected) { NCR5380_dma_complete()
1120 if (hostdata->read_overruns) { NCR5380_dma_complete()
1121 p = hostdata->connected->SCp.phase; NCR5380_dma_complete()
1139 if ((sun3scsi_dma_finish(rq_data_dir(hostdata->connected->request)))) { NCR5380_dma_complete()
1160 transferred = hostdata->dma_len - NCR5380_dma_residual(instance); NCR5380_dma_complete()
1161 hostdata->dma_len = 0; NCR5380_dma_complete()
1163 data = (unsigned char **)&hostdata->connected->SCp.ptr; NCR5380_dma_complete()
1164 count = &hostdata->connected->SCp.this_residual; NCR5380_dma_complete()
1168 if (hostdata->read_overruns) { NCR5380_dma_complete()
1172 cnt = toPIO = hostdata->read_overruns; NCR5380_dma_complete()
1316 hostdata->restart_select = 0; NCR5380_select()
1327 if (hostdata->connected) { NCR5380_select()
1337 NCR5380_write(OUTPUT_DATA_REG, hostdata->id_mask); NCR5380_select()
1348 time_before(jiffies, timeout) && !hostdata->connected) NCR5380_select()
1353 NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); NCR5380_select()
1359 !hostdata->connected) NCR5380_select()
1365 if (hostdata->connected) { NCR5380_select()
1380 (NCR5380_read(CURRENT_SCSI_DATA_REG) & hostdata->id_higher_mask) || NCR5380_select()
1382 hostdata->connected) { NCR5380_select()
1396 hostdata->connected) { NCR5380_select()
1416 if (hostdata->connected) { NCR5380_select()
1429 NCR5380_write(OUTPUT_DATA_REG, (hostdata->id_mask | (1 << cmd->device->id))); NCR5380_select()
1446 if (hostdata->connected) { NCR5380_select()
1514 NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); NCR5380_select()
1534 if (hostdata->targets_present & (1 << cmd->device->id)) { NCR5380_select()
1536 if (hostdata->restart_select) NCR5380_select()
1539 NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); NCR5380_select()
1547 NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); NCR5380_select()
1549 NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); NCR5380_select()
1553 hostdata->targets_present |= (1 << cmd->device->id); NCR5380_select()
1580 tmp[1] = hostdata->last_message = SIMPLE_QUEUE_TAG; NCR5380_select()
1596 hostdata->connected = cmd; NCR5380_select()
1598 hostdata->busy[cmd->device->id] |= (1 << cmd->device->lun); NCR5380_select()
1835 hostdata->dma_len = c; NCR5380_transfer_dma()
1880 if (hostdata->read_overruns && (p & SR_IO)) NCR5380_transfer_dma()
1881 c -= hostdata->read_overruns; NCR5380_transfer_dma()
1893 if (!(hostdata->flags & FLAG_LATE_DMA_SETUP)) { NCR5380_transfer_dma()
1898 hostdata->dma_len = (p & SR_IO) ? NCR5380_transfer_dma()
1911 if (hostdata->flags & FLAG_LATE_DMA_SETUP) { NCR5380_transfer_dma()
1916 hostdata->dma_len = (p & SR_IO) ? NCR5380_transfer_dma()
1956 struct scsi_cmnd *cmd = (struct scsi_cmnd *) hostdata->connected; NCR5380_information_transfer()
2133 NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); NCR5380_information_transfer()
2158 cmd = hostdata->connected; NCR5380_information_transfer()
2169 hostdata->retain_dma_intr++; NCR5380_information_transfer()
2170 hostdata->connected = NULL; NCR5380_information_transfer()
2182 struct tag_alloc *ta = &hostdata->TagAlloc[scmd_id(cmd)][cmd->device->lun]; NCR5380_information_transfer()
2191 hostdata->busy[cmd->device->id] &= ~(1 << cmd->device->lun); NCR5380_information_transfer()
2194 NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); NCR5380_information_transfer()
2218 hostdata->ses.cmd_len) { NCR5380_information_transfer()
2219 scsi_eh_restore_cmnd(cmd, &hostdata->ses); NCR5380_information_transfer()
2220 hostdata->ses.cmd_len = 0 ; NCR5380_information_transfer()
2225 scsi_eh_prep_cmnd(cmd, &hostdata->ses, NULL, 0, ~0); NCR5380_information_transfer()
2229 LIST(cmd,hostdata->issue_queue); NCR5380_information_transfer()
2230 SET_NEXT(cmd, hostdata->issue_queue); NCR5380_information_transfer()
2231 hostdata->issue_queue = (struct scsi_cmnd *) cmd; NCR5380_information_transfer()
2240 NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); NCR5380_information_transfer()
2247 while ((NCR5380_read(STATUS_REG) & SR_BSY) && !hostdata->connected) NCR5380_information_transfer()
2251 hostdata->retain_dma_intr--; NCR5380_information_transfer()
2263 NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); NCR5380_information_transfer()
2264 switch (hostdata->last_message) { NCR5380_information_transfer()
2275 hostdata->busy[cmd->device->id] |= (1 << cmd->device->lun); NCR5380_information_transfer()
2289 LIST(cmd,hostdata->disconnected_queue); NCR5380_information_transfer()
2290 SET_NEXT(cmd, hostdata->disconnected_queue); NCR5380_information_transfer()
2291 hostdata->connected = NULL; NCR5380_information_transfer()
2292 hostdata->disconnected_queue = cmd; NCR5380_information_transfer()
2305 NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); NCR5380_information_transfer()
2307 while ((NCR5380_read(STATUS_REG) & SR_BSY) && !hostdata->connected) NCR5380_information_transfer()
2328 NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); NCR5380_information_transfer()
2414 hostdata->last_message = msgout; NCR5380_information_transfer()
2421 hostdata->busy[cmd->device->id] &= ~(1 << cmd->device->lun); NCR5380_information_transfer()
2423 hostdata->connected = NULL; NCR5380_information_transfer()
2425 NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); NCR5380_information_transfer()
2491 hostdata->restart_select = 1; NCR5380_reselect()
2493 target_mask = NCR5380_read(CURRENT_SCSI_DATA_REG) & ~(hostdata->id_mask); NCR5380_reselect()
2546 if (phase == PHASE_MSGIN && (hostdata->flags & FLAG_TAGGED_QUEUING)) { NCR5380_reselect()
2564 for (tmp = (struct scsi_cmnd *) hostdata->disconnected_queue, prev = NULL; NCR5380_reselect()
2575 REMOVE(-1, hostdata->disconnected_queue, tmp, NEXT(tmp)); NCR5380_reselect()
2576 hostdata->disconnected_queue = NEXT(tmp); NCR5380_reselect()
2647 hostdata->connected = tmp; NCR5380_reselect()
2695 if (hostdata->connected == cmd) { NCR5380_abort()
2716 hostdata->aborted = 1; NCR5380_abort()
2717 hostdata->connected = NULL; NCR5380_abort()
2722 hostdata->busy[cmd->device->id] &= ~(1 << cmd->device->lun); NCR5380_abort()
2740 for (prev = (struct scsi_cmnd **)&(hostdata->issue_queue), NCR5380_abort()
2741 tmp = (struct scsi_cmnd *)hostdata->issue_queue; NCR5380_abort()
2770 if (hostdata->connected) { NCR5380_abort()
2801 for (tmp = (struct scsi_cmnd *) hostdata->disconnected_queue; tmp; NCR5380_abort()
2815 for (prev = (struct scsi_cmnd **)&(hostdata->disconnected_queue), NCR5380_abort()
2816 tmp = (struct scsi_cmnd *)hostdata->disconnected_queue; NCR5380_abort()
2830 hostdata->busy[cmd->device->id] &= ~(1 << cmd->device->lun); NCR5380_abort()
2876 struct NCR5380_hostdata *hostdata = shost_priv(instance); NCR5380_bus_reset() local
2903 if (hostdata->issue_queue) NCR5380_bus_reset()
2905 if (hostdata->connected) NCR5380_bus_reset()
2907 if (hostdata->disconnected_queue) NCR5380_bus_reset()
2911 hostdata->issue_queue = NULL; NCR5380_bus_reset()
2912 hostdata->connected = NULL; NCR5380_bus_reset()
2913 hostdata->disconnected_queue = NULL; NCR5380_bus_reset()
2915 free_all_tags(hostdata); NCR5380_bus_reset()
2918 hostdata->busy[i] = 0; NCR5380_bus_reset()
2920 hostdata->dma_len = 0; NCR5380_bus_reset()
H A DNCR5380.c404 * Locks: caller holds hostdata lock (not essential)
530 static void NCR5380_set_timer(struct NCR5380_hostdata *hostdata, unsigned long timeout) NCR5380_set_timer() argument
532 hostdata->time_expires = jiffies + timeout; NCR5380_set_timer()
533 schedule_delayed_work(&hostdata->coroutine, timeout); NCR5380_set_timer()
570 struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *) instance->hostdata; NCR5380_probe_irq() local
593 NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); NCR5380_probe_irq()
594 NCR5380_write(OUTPUT_DATA_REG, hostdata->id_mask); NCR5380_probe_irq()
621 struct NCR5380_hostdata *hostdata = shost_priv(instance); NCR5380_info() local
623 return hostdata->info; NCR5380_info()
628 struct NCR5380_hostdata *hostdata = shost_priv(instance); prepare_info() local
630 snprintf(hostdata->info, sizeof(hostdata->info), prepare_info()
644 hostdata->flags & FLAG_NCR53C400 ? "NCR53C400 " : "", prepare_info()
645 hostdata->flags & FLAG_DTC3181E ? "DTC3181E " : "", prepare_info()
646 hostdata->flags & FLAG_NO_PSEUDO_DMA ? "NO_PSEUDO_DMA " : "", prepare_info()
711 struct NCR5380_hostdata *hostdata = shost_priv(instance); NCR5380_write_info() local
713 hostdata->spin_max_r = 0; NCR5380_write_info()
714 hostdata->spin_max_w = 0; NCR5380_write_info()
729 struct NCR5380_hostdata *hostdata; NCR5380_show_info() local
732 hostdata = (struct NCR5380_hostdata *) instance->hostdata; NCR5380_show_info()
736 hostdata->spin_max_w, hostdata->spin_max_r); NCR5380_show_info()
739 if (!hostdata->connected) NCR5380_show_info()
742 lprint_Scsi_Cmnd((struct scsi_cmnd *) hostdata->connected, m); NCR5380_show_info()
744 for (ptr = (struct scsi_cmnd *) hostdata->issue_queue; ptr; ptr = (struct scsi_cmnd *) ptr->host_scribble) NCR5380_show_info()
748 for (ptr = (struct scsi_cmnd *) hostdata->disconnected_queue; ptr; ptr = (struct scsi_cmnd *) ptr->host_scribble) NCR5380_show_info()
797 struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *) instance->hostdata; NCR5380_init() local
813 hostdata->aborted = 0; NCR5380_init()
814 hostdata->id_mask = 1 << instance->this_id; NCR5380_init()
815 for (i = hostdata->id_mask; i <= 0x80; i <<= 1) NCR5380_init()
816 if (i > hostdata->id_mask) NCR5380_init()
817 hostdata->id_higher_mask |= i; NCR5380_init()
819 hostdata->busy[i] = 0; NCR5380_init()
821 hostdata->dmalen = 0; NCR5380_init()
823 hostdata->targets_present = 0; NCR5380_init()
824 hostdata->connected = NULL; NCR5380_init()
825 hostdata->issue_queue = NULL; NCR5380_init()
826 hostdata->disconnected_queue = NULL; NCR5380_init()
828 INIT_DELAYED_WORK(&hostdata->coroutine, NCR5380_main); NCR5380_init()
832 hostdata->flags = FLAG_HAS_LAST_BYTE_SENT | flags; NCR5380_init()
834 hostdata->flags = FLAG_CHECK_LAST_BYTE_SENT | flags; NCR5380_init()
836 hostdata->host = instance; NCR5380_init()
837 hostdata->time_expires = 0; NCR5380_init()
847 if (hostdata->flags & FLAG_NCR53C400) { NCR5380_init()
896 struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *) instance->hostdata; NCR5380_exit() local
898 cancel_delayed_work_sync(&hostdata->coroutine); NCR5380_exit()
916 struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *) instance->hostdata; NCR5380_queue_command_lck() local
946 if (!(hostdata->issue_queue) || (cmd->cmnd[0] == REQUEST_SENSE)) { NCR5380_queue_command_lck()
947 LIST(cmd, hostdata->issue_queue); NCR5380_queue_command_lck()
948 cmd->host_scribble = (unsigned char *) hostdata->issue_queue; NCR5380_queue_command_lck()
949 hostdata->issue_queue = cmd; NCR5380_queue_command_lck()
951 for (tmp = (struct scsi_cmnd *) hostdata->issue_queue; tmp->host_scribble; tmp = (struct scsi_cmnd *) tmp->host_scribble); NCR5380_queue_command_lck()
959 schedule_delayed_work(&hostdata->coroutine, 0); NCR5380_queue_command_lck()
979 struct NCR5380_hostdata *hostdata = NCR5380_main() local
981 struct Scsi_Host *instance = hostdata->host; NCR5380_main()
989 if (!hostdata->connected && !hostdata->selecting) { NCR5380_main()
995 for (tmp = (struct scsi_cmnd *) hostdata->issue_queue, prev = NULL; tmp; prev = tmp, tmp = (struct scsi_cmnd *) tmp->host_scribble) NCR5380_main()
998 dprintk(NDEBUG_LISTS, "MAIN tmp=%p target=%d busy=%d lun=%llu\n", tmp, tmp->device->id, hostdata->busy[tmp->device->id], tmp->device->lun); NCR5380_main()
1000 if (!(hostdata->busy[tmp->device->id] & NCR5380_main()
1006 REMOVE(-1, hostdata->issue_queue, tmp, tmp->host_scribble); NCR5380_main()
1007 hostdata->issue_queue = (struct scsi_cmnd *) tmp->host_scribble; NCR5380_main()
1013 * On success, instance->hostdata->connected is set. NCR5380_main()
1022 * in hostdata->connected, OR has terminated the NCR5380_main()
1029 hostdata->selecting = NULL; NCR5380_main()
1042 LIST(tmp, hostdata->issue_queue); NCR5380_main()
1043 tmp->host_scribble = (unsigned char *) hostdata->issue_queue; NCR5380_main()
1044 hostdata->issue_queue = tmp; NCR5380_main()
1052 } /* if (!hostdata->connected) */ NCR5380_main()
1053 if (hostdata->selecting) { NCR5380_main()
1054 tmp = (struct scsi_cmnd *) hostdata->selecting; NCR5380_main()
1064 LIST(tmp, hostdata->issue_queue); NCR5380_main()
1065 tmp->host_scribble = (unsigned char *) hostdata->issue_queue; NCR5380_main()
1066 hostdata->issue_queue = tmp; NCR5380_main()
1067 NCR5380_set_timer(hostdata, USLEEP_WAITLONG); NCR5380_main()
1069 } /* if hostdata->selecting */ NCR5380_main()
1070 if (hostdata->connected NCR5380_main()
1072 && !hostdata->dmalen NCR5380_main()
1074 && (!hostdata->time_expires || time_before_eq(hostdata->time_expires, jiffies)) NCR5380_main()
1105 struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *) instance->hostdata; NCR5380_intr() local
1144 if (!hostdata->connected) NCR5380_intr()
1147 transferred = (hostdata->dmalen - NCR5380_dma_residual(instance)); NCR5380_intr()
1148 hostdata->connected->SCp.this_residual -= transferred; NCR5380_intr()
1149 hostdata->connected->SCp.ptr += transferred; NCR5380_intr()
1150 hostdata->dmalen = 0; NCR5380_intr()
1155 NCR5380_poll_politely(hostdata, BUS_AND_STATUS_REG, BASR_ACK, 0, 2*HZ); NCR5380_intr()
1168 schedule_delayed_work(&hostdata->coroutine, 0); NCR5380_intr()
1203 * Locks: caller holds hostdata lock in IRQ mode
1209 struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *) instance->hostdata; NCR5380_select() local
1218 if (hostdata->selecting) NCR5380_select()
1221 hostdata->restart_select = 0; NCR5380_select()
1237 NCR5380_write(OUTPUT_DATA_REG, hostdata->id_mask); NCR5380_select()
1249 NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); NCR5380_select()
1265 if ((NCR5380_read(INITIATOR_COMMAND_REG) & ICR_ARBITRATION_LOST) || (NCR5380_read(CURRENT_SCSI_DATA_REG) & hostdata->id_higher_mask) || (NCR5380_read(INITIATOR_COMMAND_REG) & ICR_ARBITRATION_LOST)) { NCR5380_select()
1272 if (!(hostdata->flags & FLAG_DTC3181E) && NCR5380_select()
1297 NCR5380_write(OUTPUT_DATA_REG, (hostdata->id_mask | (1 << scmd_id(cmd)))); NCR5380_select()
1357 hostdata->select_time = 0; /* we count the clock ticks at which we polled */ NCR5380_select()
1358 hostdata->selecting = cmd; NCR5380_select()
1366 if (!value && (hostdata->select_time < HZ/4)) { NCR5380_select()
1368 hostdata->select_time++; /* after 25 ticks the device has failed */ NCR5380_select()
1369 NCR5380_set_timer(hostdata, 1); NCR5380_select()
1370 return 0; /* RvC: we return here with hostdata->selecting set, NCR5380_select()
1374 hostdata->selecting = NULL;/* clear this pointer, because we passed the NCR5380_select()
1380 NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); NCR5380_select()
1395 if (hostdata->targets_present & (1 << scmd_id(cmd))) { NCR5380_select()
1397 if (hostdata->restart_select) NCR5380_select()
1400 NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); NCR5380_select()
1405 NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); NCR5380_select()
1407 NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); NCR5380_select()
1410 hostdata->targets_present |= (1 << scmd_id(cmd)); NCR5380_select()
1435 NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); NCR5380_select()
1451 hostdata->connected = cmd; NCR5380_select()
1452 hostdata->busy[cmd->device->id] |= (1 << (cmd->device->lun & 0xFF)); NCR5380_select()
1498 struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *) instance->hostdata; NCR5380_transfer_pio() local
1535 NCR5380_set_timer(hostdata, USLEEP_SLEEP); NCR5380_transfer_pio()
1733 struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *) instance->hostdata; NCR5380_transfer_dma() local
1748 hostdata->dma_len = (p & SR_IO) ? NCR5380_dma_read_setup(instance, d, c) : NCR5380_dma_write_setup(instance, d, c); NCR5380_transfer_dma()
1768 if (hostdata->flags & FLAG_NCR53C400) NCR5380_transfer_dma()
1893 if (hostdata->flags & FLAG_NCR53C400) { NCR5380_transfer_dma()
1919 if (!(hostdata->flags & FLAG_NCR53C400)) { NCR5380_transfer_dma()
1938 if (!(hostdata->flags & FLAG_HAS_LAST_BYTE_SENT)) { NCR5380_transfer_dma()
1945 if (hostdata->flags & FLAG_CHECK_LAST_BYTE_SENT) { NCR5380_transfer_dma()
1946 hostdata->flags &= ~FLAG_CHECK_LAST_BYTE_SENT; NCR5380_transfer_dma()
1948 hostdata->flags |= FLAG_HAS_LAST_BYTE_SENT; NCR5380_transfer_dma()
1963 if ((!(p & SR_IO)) && (hostdata->flags & FLAG_NCR53C400)) { NCR5380_transfer_dma()
2004 struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *)instance->hostdata; local
2013 struct scsi_cmnd *cmd = (struct scsi_cmnd *) hostdata->connected;
2079 if (!cmd->device->borken && !(hostdata->flags & FLAG_NO_PSEUDO_DMA) && (transfersize = NCR5380_dma_xfer_len(instance, cmd)) != 0) {
2088 if (!cmd->device->borken && transfersize && !(hostdata->flags & FLAG_NO_PSEUDO_DMA) && cmd->SCp.this_residual && !(cmd->SCp.this_residual % transfersize)) {
2156 cmd = hostdata->connected;
2164 hostdata->connected = NULL;
2166 hostdata->busy[cmd->device->id] &= ~(1 << (cmd->device->lun & 0xFF));
2190 hostdata->ses.cmd_len) {
2191 scsi_eh_restore_cmnd(cmd, &hostdata->ses);
2192 hostdata->ses.cmd_len = 0 ;
2196 scsi_eh_prep_cmnd(cmd, &hostdata->ses, NULL, 0, ~0);
2200 LIST(cmd, hostdata->issue_queue);
2202 hostdata->issue_queue;
2203 hostdata->issue_queue = (struct scsi_cmnd *) cmd;
2209 NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask);
2216 while ((NCR5380_read(STATUS_REG) & SR_BSY) && !hostdata->connected)
2222 switch (hostdata->last_message) {
2227 hostdata->busy[cmd->device->id] |= (1 << (cmd->device->lun & 0xFF));
2236 LIST(cmd, hostdata->disconnected_queue);
2238 hostdata->disconnected_queue;
2239 hostdata->connected = NULL;
2240 hostdata->disconnected_queue = cmd;
2249 NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask);
2252 while ((NCR5380_read(STATUS_REG) & SR_BSY) && !hostdata->connected)
2346 hostdata->last_message = msgout;
2349 hostdata->busy[cmd->device->id] &= ~(1 << (cmd->device->lun & 0xFF));
2350 hostdata->connected = NULL;
2353 NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask);
2368 NCR5380_set_timer(hostdata, USLEEP_SLEEP);
2369 dprintk(NDEBUG_USLEEP, "scsi%d : issued command, sleeping until %lu\n", instance->host_no, hostdata->time_expires);
2388 NCR5380_set_timer(hostdata, USLEEP_SLEEP);
2389 dprintk(NDEBUG_USLEEP, "scsi%d : poll timed out, sleeping until %lu\n", instance->host_no, hostdata->time_expires);
2410 struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *) NCR5380_reselect() local
2411 instance->hostdata; NCR5380_reselect()
2427 hostdata->restart_select = 1; NCR5380_reselect()
2429 target_mask = NCR5380_read(CURRENT_SCSI_DATA_REG) & ~(hostdata->id_mask); NCR5380_reselect()
2483 for (tmp = (struct scsi_cmnd *) hostdata->disconnected_queue, prev = NULL; tmp; prev = tmp, tmp = (struct scsi_cmnd *) tmp->host_scribble) NCR5380_reselect()
2490 REMOVE(-1, hostdata->disconnected_queue, tmp, tmp->host_scribble); NCR5380_reselect()
2491 hostdata->disconnected_queue = (struct scsi_cmnd *) tmp->host_scribble; NCR5380_reselect()
2509 hostdata->connected = tmp; NCR5380_reselect()
2529 struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *) instance->hostdata; NCR5380_dma_complete() local
2555 if (!(hostdata->connected->SCp.phase & SR_CD)) { NCR5380_dma_complete()
2557 hostdata->connected->SCp.this_residual -= transferred; NCR5380_dma_complete()
2558 hostdata->connected->SCp.ptr += transferred; NCR5380_dma_complete()
2586 struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *) instance->hostdata; NCR5380_abort() local
2605 if (hostdata->connected == cmd) { NCR5380_abort()
2607 hostdata->aborted = 1; NCR5380_abort()
2635 for (prev = (struct scsi_cmnd **) &(hostdata->issue_queue), tmp = (struct scsi_cmnd *) hostdata->issue_queue; tmp; prev = (struct scsi_cmnd **) &(tmp->host_scribble), tmp = (struct scsi_cmnd *) tmp->host_scribble) NCR5380_abort()
2662 if (hostdata->connected) { NCR5380_abort()
2691 for (tmp = (struct scsi_cmnd *) hostdata->disconnected_queue; tmp; tmp = (struct scsi_cmnd *) tmp->host_scribble) NCR5380_abort()
2701 for (prev = (struct scsi_cmnd **) &(hostdata->disconnected_queue), tmp = (struct scsi_cmnd *) hostdata->disconnected_queue; tmp; prev = (struct scsi_cmnd **) &(tmp->host_scribble), tmp = (struct scsi_cmnd *) tmp->host_scribble) NCR5380_abort()
H A D53c700.h108 struct NCR_700_Device_Parameters *hostdata = SDp->hostdata; NCR_700_get_sense_cmnd() local
110 return hostdata->cmnd; NCR_700_get_sense_cmnd()
116 struct NCR_700_Device_Parameters *hostdata = SDp->hostdata; NCR_700_set_depth() local
118 hostdata->depth = depth; NCR_700_set_depth()
123 struct NCR_700_Device_Parameters *hostdata = SDp->hostdata; NCR_700_get_depth() local
125 return hostdata->depth; NCR_700_get_depth()
256 #define bE (hostdata->force_le_on_be ? 0 : 3)
257 #define bSWAP (hostdata->force_le_on_be)
258 #define bEBus (!hostdata->force_le_on_be)
479 const struct NCR_700_Host_Parameters *hostdata NCR_700_readb() local
480 = (struct NCR_700_Host_Parameters *)host->hostdata[0]; NCR_700_readb()
482 return ioread8(hostdata->base + (reg^bE)); NCR_700_readb()
488 const struct NCR_700_Host_Parameters *hostdata NCR_700_readl() local
489 = (struct NCR_700_Host_Parameters *)host->hostdata[0]; NCR_700_readl()
490 __u32 value = bEBus ? ioread32be(hostdata->base + reg) : NCR_700_readl()
491 ioread32(hostdata->base + reg); NCR_700_readl()
503 const struct NCR_700_Host_Parameters *hostdata NCR_700_writeb() local
504 = (struct NCR_700_Host_Parameters *)host->hostdata[0]; NCR_700_writeb()
506 iowrite8(value, hostdata->base + (reg^bE)); NCR_700_writeb()
512 const struct NCR_700_Host_Parameters *hostdata NCR_700_writel() local
513 = (struct NCR_700_Host_Parameters *)host->hostdata[0]; NCR_700_writel()
520 bEBus ? iowrite32be(value, hostdata->base + reg): NCR_700_writel()
521 iowrite32(value, hostdata->base + reg); NCR_700_writel()
H A Dsim710.c102 struct NCR_700_Host_Parameters *hostdata = sim710_probe_common() local
109 if(hostdata == NULL) { sim710_probe_common()
120 /* Fill in the three required pieces of hostdata */ sim710_probe_common()
121 hostdata->base = ioport_map(base_addr, 64); sim710_probe_common()
122 hostdata->differential = differential; sim710_probe_common()
123 hostdata->clock = clock; sim710_probe_common()
124 hostdata->chip710 = 1; sim710_probe_common()
125 hostdata->burst_length = 8; sim710_probe_common()
128 if((host = NCR_700_detect(&sim710_driver_template, hostdata, dev)) sim710_probe_common()
151 kfree(hostdata); sim710_probe_common()
159 struct NCR_700_Host_Parameters *hostdata = sim710_device_remove() local
160 (struct NCR_700_Host_Parameters *)host->hostdata[0]; sim710_device_remove()
164 kfree(hostdata); sim710_device_remove()
H A DNCR_D700.c180 struct NCR_700_Host_Parameters *hostdata; NCR_D700_probe_one() local
184 hostdata = kzalloc(sizeof(*hostdata), GFP_KERNEL); NCR_D700_probe_one()
185 if (!hostdata) { NCR_D700_probe_one()
198 /* Fill in the three required pieces of hostdata */ NCR_D700_probe_one()
199 hostdata->base = ioport_map(region, 64); NCR_D700_probe_one()
200 hostdata->differential = (((1<<siop) & differential) != 0); NCR_D700_probe_one()
201 hostdata->clock = NCR_D700_CLOCK_MHZ; NCR_D700_probe_one()
202 hostdata->burst_length = 8; NCR_D700_probe_one()
205 host = NCR_700_detect(&NCR_D700_driver_template, hostdata, p->dev); NCR_D700_probe_one()
223 kfree(hostdata); NCR_D700_probe_one()
357 kfree((struct NCR_700_Host_Parameters *)host->hostdata[0]); NCR_D700_remove_one()
H A Dwd33c93.h37 #define DB(f,a) if (hostdata->args & (f)) a;
221 /* FEF: defines for hostdata->dma_buffer_pool */
276 /* defines for hostdata->chip */
283 /* defines for hostdata->state */
292 /* defines for hostdata->dma */
297 /* defines for hostdata->level2 */
308 /* defines for hostdata->disconnect */
314 /* defines for hostdata->args */
324 /* defines for hostdata->sync_stat[] */
331 /* defines for hostdata->proc */
H A Din2000.h43 #define DB(f,a) if (hostdata->args & (f)) a;
52 #define read1_io(a) (inb(hostdata->io_base+(a)))
53 #define read2_io(a) (inw(hostdata->io_base+(a)))
54 #define write1_io(b,a) (outb((b),hostdata->io_base+(a)))
55 #define write2_io(w,a) (outw((w),hostdata->io_base+(a)))
315 /* defines for hostdata->chip */
322 /* defines for hostdata->state */
331 /* defines for hostdata->fifo */
337 /* defines for hostdata->level2 */
351 /* defines for hostdata->disconnect */
357 /* defines for hostdata->args */
370 /* defines for hostdata->sync_xfer[] */
377 /* defines for hostdata->proc */
H A Dmac_scsi.c234 struct NCR5380_hostdata *hostdata = shost_priv(instance); macscsi_pread() local
241 s = hostdata->pdma_base + (INPUT_DATA_REG << 4); macscsi_pread()
328 struct NCR5380_hostdata *hostdata = shost_priv(instance); macscsi_pwrite() local
336 d = hostdata->pdma_base + (OUTPUT_DATA_REG << 4); macscsi_pwrite()
429 struct NCR5380_hostdata *hostdata = shost_priv(instance); mac_scsi_probe() local
431 hostdata->pdma_base = (unsigned char *)pdma_mem->start; mac_scsi_probe()
H A Ddtc.c241 ((struct NCR5380_hostdata *)(instance)->hostdata)->base = base; dtc_detect()
333 struct NCR5380_hostdata *hostdata = shost_priv(instance); NCR5380_pread() local
364 if (i > hostdata->spin_max_r) NCR5380_pread()
365 hostdata->spin_max_r = i; NCR5380_pread()
385 struct NCR5380_hostdata *hostdata = shost_priv(instance); NCR5380_pwrite() local
418 if (i > hostdata->spin_max_w) NCR5380_pwrite()
419 hostdata->spin_max_w = i; NCR5380_pwrite()
H A Ddtc.h32 base = ((struct NCR5380_hostdata *)(instance)->hostdata)->base
H A Dg_NCR5380.h88 iomem = (((struct NCR5380_hostdata *)(instance)->hostdata)->iomem)
H A Dpas16.c502 struct NCR5380_hostdata *hostdata = shost_priv(instance); NCR5380_pread() local
515 if (ii > hostdata->spin_max_r) NCR5380_pread()
516 hostdata->spin_max_r = ii; NCR5380_pread()
539 struct NCR5380_hostdata *hostdata = shost_priv(instance); NCR5380_pwrite() local
552 if (ii > hostdata->spin_max_w) NCR5380_pwrite()
553 hostdata->spin_max_w = ii; NCR5380_pwrite()
H A Dqlogicfas408.h102 #define get_priv_by_cmd(x) (struct qlogicfas408_priv *)&((x)->device->host->hostdata[0])
103 #define get_priv_by_host(x) (struct qlogicfas408_priv *)&((x)->hostdata[0])
H A Deata_generic.h86 #define HD(cmd) ((hostdata *)&(cmd->device->host->hostdata))
88 #define SD(host) ((hostdata *)&(host->hostdata))
363 }hostdata; typedef in typeref:struct:hstd
H A Deata.c816 struct hostdata { struct
878 static void flush_dev(struct scsi_device *, unsigned long, struct hostdata *,
1084 struct hostdata *ha; port_detect()
1262 sh[j] = shost = scsi_register(tpnt, sizeof(struct hostdata)); port_detect()
1278 ha = (struct hostdata *)shost->hostdata; port_detect()
1280 memset(ha, 0, sizeof(struct hostdata)); port_detect()
1598 static void map_dma(unsigned int i, struct hostdata *ha) map_dma()
1639 static void unmap_dma(unsigned int i, struct hostdata *ha) unmap_dma()
1665 static void sync_dma(unsigned int i, struct hostdata *ha) sync_dma()
1693 static void scsi_to_dev_dir(unsigned int i, struct hostdata *ha) scsi_to_dev_dir()
1752 struct hostdata *ha = (struct hostdata *)shost->hostdata; eata2x_queuecommand_lck()
1837 struct hostdata *ha = (struct hostdata *)shost->hostdata; eata2x_eh_abort()
1905 struct hostdata *ha = (struct hostdata *)shost->hostdata; eata2x_eh_host_reset()
2098 static int reorder(struct hostdata *ha, unsigned long cursec, reorder()
2239 struct hostdata *ha, unsigned int ihdlr) flush_dev()
2290 struct hostdata *ha = (struct hostdata *)shost->hostdata; ihdlr()
2550 struct hostdata *ha = (struct hostdata *)shost->hostdata; eata2x_release()
H A Dnsp32.c370 nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata; nsp32_build_identify()
391 nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata; nsp32_build_sdtr()
408 nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata; nsp32_build_nop()
426 nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata; nsp32_build_reject()
457 nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata; nsp32_selection_autopara()
588 nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata; nsp32_selection_autoscsi()
812 nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata; nsp32_reselection()
866 nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata; nsp32_setup_sg_table()
912 nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata; nsp32_queuecommand_lck()
1456 data = (nsp32_hw_data *)host->hostdata; nsp32_show_info()
1525 nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata; nsp32_scsi_done()
1563 nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata; nsp32_busfree_occur()
1721 nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata; nsp32_adjust_busfree()
1780 /* update hostdata and lun */ nsp32_adjust_busfree()
1794 nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata; nsp32_msgout_occur()
1870 nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata; nsp32_restart_autoscsi()
1938 nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata; nsp32_msgin_occur()
2233 nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata; nsp32_analyze_sdtr()
2581 data = (nsp32_hw_data *)host->hostdata; nsp32_detect()
2783 nsp32_hw_data *data = (nsp32_hw_data *)host->hostdata; nsp32_release()
2812 nsp32_hw_data *data = (nsp32_hw_data *)shpnt->hostdata; nsp32_info()
2823 nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata; nsp32_eh_abort()
2851 nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata; nsp32_eh_bus_reset()
2913 nsp32_hw_data *data = (nsp32_hw_data *)host->hostdata; nsp32_eh_host_reset()
3324 nsp32_hw_data *data = (nsp32_hw_data *)host->hostdata; nsp32_resume()
H A Dt128.h91 base = ((struct NCR5380_hostdata *)(instance->hostdata))->base
H A Dipr.c3354 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; ipr_read_trace()
3388 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; ipr_show_fw_version()
3422 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; ipr_show_log_level()
3445 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; ipr_store_log_level()
3480 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; ipr_store_diagnostics()
3536 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; ipr_show_adapter_state()
3565 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; ipr_store_adapter_state()
3616 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; ipr_store_reset_adapter()
3653 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; ipr_show_iopoll_weight()
3677 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; ipr_store_iopoll_weight()
3999 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; ipr_store_update_fw()
4070 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; ipr_show_fw_type()
4119 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; ipr_read_dump()
4306 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; ipr_write_dump()
4349 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata; ipr_change_queue_depth()
4354 res = (struct ipr_resource_entry *)sdev->hostdata; ipr_change_queue_depth()
4376 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata; ipr_show_adapter_handle()
4382 res = (struct ipr_resource_entry *)sdev->hostdata; ipr_show_adapter_handle()
4410 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata; ipr_show_resource_path()
4417 res = (struct ipr_resource_entry *)sdev->hostdata; ipr_show_resource_path()
4450 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata; ipr_show_device_id()
4456 res = (struct ipr_resource_entry *)sdev->hostdata; ipr_show_device_id()
4486 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata; ipr_show_resource_type()
4492 res = (struct ipr_resource_entry *)sdev->hostdata; ipr_show_resource_type()
4521 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata; ipr_show_raw_mode()
4527 res = (struct ipr_resource_entry *)sdev->hostdata; ipr_show_raw_mode()
4549 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata; ipr_store_raw_mode()
4555 res = (struct ipr_resource_entry *)sdev->hostdata; ipr_store_raw_mode()
4634 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) shost->hostdata; ipr_find_starget()
4662 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) shost->hostdata; ipr_target_alloc()
4670 starget->hostdata = NULL; ipr_target_alloc()
4687 starget->hostdata = sata_port; ipr_target_alloc()
4708 struct ipr_sata_port *sata_port = starget->hostdata; ipr_target_destroy()
4710 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) shost->hostdata; ipr_target_destroy()
4724 starget->hostdata = NULL; ipr_target_destroy()
4739 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) sdev->host->hostdata; ipr_find_sdev()
4765 ioa_cfg = (struct ipr_ioa_cfg *) sdev->host->hostdata; ipr_slave_destroy()
4768 res = (struct ipr_resource_entry *) sdev->hostdata; ipr_slave_destroy()
4772 sdev->hostdata = NULL; ipr_slave_destroy()
4790 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) sdev->host->hostdata; ipr_slave_configure()
4797 res = sdev->hostdata; ipr_slave_configure()
4847 sata_port = sdev->sdev_target->hostdata; ipr_ata_slave_alloc()
4875 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) sdev->host->hostdata; ipr_slave_alloc()
4880 sdev->hostdata = NULL; ipr_slave_alloc()
4889 sdev->hostdata = res; ipr_slave_alloc()
4989 ioa_cfg = (struct ipr_ioa_cfg *) cmd->device->host->hostdata; ipr_eh_host_reset()
5135 ioa_cfg = (struct ipr_ioa_cfg *) scsi_cmd->device->host->hostdata; __ipr_eh_dev_reset()
5136 res = scsi_cmd->device->hostdata; __ipr_eh_dev_reset()
5203 ioa_cfg = (struct ipr_ioa_cfg *) cmd->device->host->hostdata; ipr_eh_dev_reset()
5311 ioa_cfg = (struct ipr_ioa_cfg *)scsi_cmd->device->host->hostdata; ipr_cancel_op()
5312 res = scsi_cmd->device->hostdata; ipr_cancel_op()
5388 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) shost->hostdata; ipr_scan_finished()
5415 ioa_cfg = (struct ipr_ioa_cfg *) scsi_cmd->device->host->hostdata; ipr_eh_abort()
5844 struct ipr_resource_entry *res = scsi_cmd->device->hostdata; ipr_erp_done()
5948 struct ipr_resource_entry *res = scsi_cmd->device->hostdata; ipr_erp_cancel_all()
6048 struct ipr_resource_entry *res = ipr_cmd->scsi_cmd->device->hostdata; ipr_gen_sense()
6171 struct ipr_resource_entry *res = scsi_cmd->device->hostdata; ipr_erp_start()
6316 ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; ipr_queuecommand()
6319 res = scsi_cmd->device->hostdata; ipr_queuecommand()
6442 res = (struct ipr_resource_entry *)sdev->hostdata; ipr_ioctl()
6465 ioa_cfg = (struct ipr_ioa_cfg *) host->hostdata; ipr_ioa_info()
9858 ioa_cfg = (struct ipr_ioa_cfg *)host->hostdata; ipr_probe_ioa()
H A Dsgiwd93.c41 #define host_to_hostdata(host) ((struct ip22_hostdata *)((host)->hostdata))
303 struct ip22_hostdata *hdata = (struct ip22_hostdata *) host->hostdata; sgiwd93_remove()
H A Du14-34f.c590 struct hostdata { struct
630 #define HD(board) ((struct hostdata *) &sh[board]->hostdata)
691 j = ((struct hostdata *) host->hostdata)->board_number; u14_34f_slave_configure()
891 sh[j] = scsi_register(tpnt, sizeof(struct hostdata)); port_detect()
925 memset(HD(j), 0, sizeof(struct hostdata)); port_detect()
1255 j = ((struct hostdata *) SCpnt->device->host->hostdata)->board_number; u14_34f_queuecommand_lck()
1336 j = ((struct hostdata *) SCarg->device->host->hostdata)->board_number; u14_34f_eh_abort()
1401 j = ((struct hostdata *) SCarg->device->host->hostdata)->board_number; u14_34f_eh_host_reset()
H A Da100u2w.c919 host = (struct orc_host *) cmd->device->host->hostdata; inia100_queue_lck()
947 host = (struct orc_host *) cmd->device->host->hostdata; inia100_abort()
962 host = (struct orc_host *) cmd->device->host->hostdata; inia100_bus_reset()
976 host = (struct orc_host *) cmd->device->host->hostdata; inia100_device_reset()
1060 struct orc_host *host = (struct orc_host *)shost->hostdata; inia100_intr()
1120 host = (struct orc_host *)shost->hostdata; inia100_probe_one()
1199 struct orc_host *host = (struct orc_host *)shost->hostdata; inia100_remove_one()
H A Dmac53c94.c88 state = (struct fsc_state *) cmd->device->host->hostdata; mac53c94_queue_lck()
106 struct fsc_state *state = (struct fsc_state *) cmd->device->host->hostdata; mac53c94_host_reset()
439 state = (struct fsc_state *) host->hostdata; mac53c94_probe()
H A Desp_scsi.c695 struct esp_lun_data *lp = dev->hostdata; find_and_prep_issuable_command()
748 lp = dev->hostdata; esp_maybe_execute_command()
898 esp_free_lun_tag(ent, dev->hostdata); esp_cmd_is_done()
949 struct esp_lun_data *lp = dev->hostdata; esp_event_queue_full()
1202 lp = dev->hostdata; esp_reconnect()
1264 esp_free_lun_tag(ent, cmd->device->hostdata); esp_finish_select()
2046 esp_free_lun_tag(ent, cmd->device->hostdata); esp_reset_cleanup_one()
2062 struct esp_lun_data *lp = dev->hostdata; esp_clear_hold()
2468 dev->hostdata = lp; esp_slave_alloc()
2499 struct esp_lun_data *lp = dev->hostdata; esp_slave_destroy()
2502 dev->hostdata = NULL; esp_slave_destroy()
H A Dhptiop.c860 struct hptiop_hba *hba = (struct hptiop_hba *)host->hostdata; hptiop_buildsgl()
1011 struct hptiop_hba *hba = (struct hptiop_hba *)host->hostdata; hptiop_queuecommand_lck()
1111 struct hptiop_hba * hba = (struct hptiop_hba *)host->hostdata; hptiop_reset()
1123 struct hptiop_hba *hba = (struct hptiop_hba *)sdev->host->hostdata; hptiop_adjust_disk_queue_depth()
1140 struct hptiop_hba *hba = (struct hptiop_hba *)host->hostdata; hptiop_show_fw_version()
1325 hba = (struct hptiop_hba *)host->hostdata; hptiop_probe()
1505 struct hptiop_hba *hba = (struct hptiop_hba *)host->hostdata; hptiop_shutdown()
1548 struct hptiop_hba *hba = (struct hptiop_hba *)host->hostdata; hptiop_remove()
H A Ddpt_i2o.c307 adpt_hba* pHba = (adpt_hba*) host->hostdata[0]; adpt_release()
415 pHba = (adpt_hba *) host->hostdata[0]; adpt_slave_configure()
443 pHba = (adpt_hba*)cmd->device->host->hostdata[0]; adpt_queue_lck()
454 if((pDev = (struct adpt_device*) (cmd->device->hostdata)) == NULL) { adpt_queue_lck()
467 cmd->device->hostdata = pDev; adpt_queue_lck()
539 pHba = (adpt_hba *) host->hostdata[0]; adpt_info()
691 pHba = (adpt_hba*) cmd->device->host->hostdata[0]; adpt_abort()
693 if ((dptdevice = (void*) (cmd->device->hostdata)) == NULL) { adpt_abort()
732 struct adpt_device* d = cmd->device->hostdata; adpt_device_reset()
734 pHba = (void*) cmd->device->host->hostdata[0]; adpt_device_reset()
776 pHba = (adpt_hba*)cmd->device->host->hostdata[0]; adpt_bus_reset()
802 pHba = (adpt_hba*)cmd->device->host->hostdata[0]; __adpt_reset()
2347 host->hostdata[0] = (unsigned long)pHba; adpt_scsi_host_alloc()
2386 pHba = (adpt_hba*) cmd->device->host->hostdata[0]; adpt_i2o_to_scsi()
2480 ((struct adpt_device*)(cmd->device->hostdata))->tid, cmd->cmnd[0]); adpt_i2o_to_scsi()
H A D3w-sas.c107 TW_Device_Extension *tw_dev = (TW_Device_Extension *)shost->hostdata; twl_sysfs_aen_read()
138 TW_Device_Extension *tw_dev = (TW_Device_Extension *)shost->hostdata; twl_sysfs_compat_info()
167 TW_Device_Extension *tw_dev = (TW_Device_Extension *)host->hostdata; twl_show_stats()
1416 tw_dev = (TW_Device_Extension *)sdev->host->hostdata; twl_scsi_biosparam()
1439 tw_dev = (TW_Device_Extension *)SCpnt->device->host->hostdata; twl_scsi_eh_reset()
1466 TW_Device_Extension *tw_dev = (TW_Device_Extension *)SCpnt->device->host->hostdata; twl_scsi_queue_lck()
1528 tw_dev = (TW_Device_Extension *)host->hostdata; twl_shutdown()
1722 tw_dev = (TW_Device_Extension *)host->hostdata; twl_remove()
1765 TW_Device_Extension *tw_dev = (TW_Device_Extension *)host->hostdata; twl_suspend()
1795 TW_Device_Extension *tw_dev = (TW_Device_Extension *)host->hostdata; twl_resume()
H A Dscsi_scan.c199 * @hostdata: usually NULL and set by ->slave_alloc instead
210 u64 lun, void *hostdata) scsi_alloc_sdev()
245 sdev->hostdata = hostdata; scsi_alloc_sdev()
1033 * @hostdata: passed to scsi_alloc_sdev()
1048 void *hostdata) scsi_probe_and_add_lun()
1078 sdev = scsi_alloc_sdev(starget, lun, hostdata); scsi_probe_and_add_lun()
1529 uint id, u64 lun, void *hostdata) __scsi_add_device()
1548 scsi_probe_and_add_lun(starget, lun, NULL, &sdev, 1, hostdata); __scsi_add_device()
209 scsi_alloc_sdev(struct scsi_target *starget, u64 lun, void *hostdata) scsi_alloc_sdev() argument
1045 scsi_probe_and_add_lun(struct scsi_target *starget, u64 lun, int *bflagsp, struct scsi_device **sdevp, int rescan, void *hostdata) scsi_probe_and_add_lun() argument
1528 __scsi_add_device(struct Scsi_Host *shost, uint channel, uint id, u64 lun, void *hostdata) __scsi_add_device() argument
H A D3w-9xxx.c160 TW_Device_Extension *tw_dev = (TW_Device_Extension *)host->hostdata; twa_show_stats()
1701 tw_dev = (TW_Device_Extension *)sdev->host->hostdata; twa_scsi_biosparam()
1726 tw_dev = (TW_Device_Extension *)SCpnt->device->host->hostdata; twa_scsi_eh_reset()
1753 TW_Device_Extension *tw_dev = (TW_Device_Extension *)SCpnt->device->host->hostdata; twa_scsi_queue_lck()
1959 TW_Device_Extension *tw_dev = (TW_Device_Extension *)host->hostdata; twa_shutdown()
2035 tw_dev = (TW_Device_Extension *)host->hostdata; twa_probe()
2156 TW_Device_Extension *tw_dev = (TW_Device_Extension *)host->hostdata; twa_remove()
2192 TW_Device_Extension *tw_dev = (TW_Device_Extension *)host->hostdata; twa_suspend()
2222 TW_Device_Extension *tw_dev = (TW_Device_Extension *)host->hostdata; twa_resume()
H A Dqlogicpti.c317 struct qlogicpti *qpti = (struct qlogicpti *) host->hostdata; qlogicpti_reset_hardware()
838 struct qlogicpti *qpti = (struct qlogicpti *) host->hostdata; qlogicpti_info()
1008 struct qlogicpti *qpti = (struct qlogicpti *) host->hostdata; qlogicpti_queuecommand_lck()
1219 struct qlogicpti *qpti = (struct qlogicpti *) host->hostdata; qlogicpti_abort()
1257 struct qlogicpti *qpti = (struct qlogicpti *) host->hostdata; qlogicpti_reset()
H A Deata_pio.c115 hostdata *hd = SD(sh); eata_pio_release()
162 hostdata *hd; eata_pio_int_handler()
308 hostdata *hd; eata_pio_queue_lck()
663 hostdata *hd; register_pio_HBA()
683 size = sizeof(hostdata) + (sizeof(struct eata_ccb) * be16_to_cpu(gc->queuesiz)); register_pio_HBA()
H A Dvirtio_scsi.c154 scsi_target(sc->device)->hostdata; virtscsi_complete_cmd()
569 scsi_target(sc->device)->hostdata; virtscsi_queuecommand_single()
626 scsi_target(sc->device)->hostdata; virtscsi_queuecommand_multi()
744 starget->hostdata = tgt; virtscsi_target_alloc()
750 struct virtio_scsi_target_state *tgt = starget->hostdata; virtscsi_target_destroy()
H A Dpmcraid.c201 scsi_dev->hostdata = res; pmcraid_slave_alloc()
226 struct pmcraid_resource_entry *res = scsi_dev->hostdata; pmcraid_slave_configure()
276 res = (struct pmcraid_resource_entry *)scsi_dev->hostdata; pmcraid_slave_destroy()
281 scsi_dev->hostdata = NULL; pmcraid_slave_destroy()
2521 struct pmcraid_resource_entry *res = scsi_cmd->device->hostdata; pmcraid_cancel_all()
2557 struct pmcraid_resource_entry *res = cmd->scsi_cmd->device->hostdata; pmcraid_frame_auto_sense()
2629 struct pmcraid_resource_entry *res = scsi_cmd->device->hostdata; pmcraid_error_handler()
2756 (struct pmcraid_instance *)scsi_cmd->device->host->hostdata; pmcraid_reset_device()
2757 res = scsi_cmd->device->hostdata; pmcraid_reset_device()
2909 res = cmd->scsi_cmd->device->hostdata; pmcraid_abort_cmd()
2997 (struct pmcraid_instance *)scsi_cmd->device->host->hostdata; pmcraid_eh_abort_handler()
3002 res = scsi_cmd->device->hostdata; pmcraid_eh_abort_handler()
3048 cancel_cmd->res = cmd->scsi_cmd->device->hostdata; pmcraid_eh_abort_handler()
3111 (struct pmcraid_instance *)(scmd->device->host->hostdata); pmcraid_eh_host_reset_handler()
3423 (struct pmcraid_instance *)scsi_cmd->device->host->hostdata; pmcraid_queuecommand_lck()
3426 res = scsi_cmd->device->hostdata; pmcraid_queuecommand_lck()
4119 (struct pmcraid_instance *)shost->hostdata; pmcraid_show_log_level()
4150 pinstance = (struct pmcraid_instance *)shost->hostdata; pmcraid_store_log_level()
4207 (struct pmcraid_instance *)shost->hostdata; pmcraid_show_adapter_id()
5197 (struct pmcraid_instance *)host->hostdata; pmcraid_init_instance()
5877 pinstance = (struct pmcraid_instance *)host->hostdata; pmcraid_probe()
H A Datp870u.c61 struct atp_unit *dev = (struct atp_unit *)&host->hostdata; atp870u_intr_handle()
628 dev = (struct atp_unit *)&host->hostdata; atp870u_queuecommand_lck()
1046 struct atp_unit *dev = (struct atp_unit *)&host->hostdata; tscam()
2513 struct atp_unit *atp_dev = (struct atp_unit *)&host->hostdata; atp870u_free_tables()
2527 struct atp_unit *atp_dev = (struct atp_unit *)&host->hostdata; atp870u_init_tables()
2689 p = (struct atp_unit *)&shpnt->hostdata; atp870u_probe()
2759 p = (struct atp_unit *)&shpnt->hostdata; atp870u_probe()
2769 printk("request_irq() shpnt %p hostdata %p\n", shpnt, p); atp870u_probe()
2944 p = (struct atp_unit *)&shpnt->hostdata; atp870u_probe()
3063 dev = (struct atp_unit *)&host->hostdata; atp870u_abort()
H A Dwd7000.c1093 Adapter *host = (Adapter *) SCpnt->device->host->hostdata; wd7000_queuecommand_lck()
1312 Adapter *adapter = (Adapter *)host->hostdata; wd7000_show_info()
1474 * array hostdata. wd7000_detect()
1480 host = (Adapter *) sh->hostdata; wd7000_detect()
1553 Adapter *host = (Adapter *) SCpnt->device->host->hostdata;
1570 Adapter *host = (Adapter *) SCpnt->device->host->hostdata; wd7000_host_reset()
H A Dg_NCR5380.c420 ((struct NCR5380_hostdata *)instance->hostdata)->iomem = iomem; generic_NCR5380_detect()
473 iounmap(((struct NCR5380_hostdata *)instance->hostdata)->iomem); generic_NCR5380_release_resources()
H A Dstex.c568 hba = (struct st_hba *) &host->hostdata[0]; stex_queuecommand_lck()
1140 struct st_hba *hba = (struct st_hba *)host->hostdata; stex_abort()
1333 hba = (struct st_hba *) &cmd->device->host->hostdata[0]; stex_reset()
1544 hba = (struct st_hba *)host->hostdata; stex_probe()
H A Dt128.c219 ((struct NCR5380_hostdata *)instance->hostdata)->base = p; t128_detect()
H A Datari_scsi.c165 (atari_scsi_host->hostdata))->dma_len)
960 struct NCR5380_hostdata *hostdata = atari_scsi_probe() local
963 hostdata->read_overruns = 4; atari_scsi_probe()
H A Dscsi_debug.c3467 devip = (struct sdebug_dev_info *)scp->device->hostdata; sdebug_q_cmd_complete()
3527 devip = (struct sdebug_dev_info *)scp->device->hostdata; sdebug_q_cmd_hrt_complete()
3581 (struct sdebug_dev_info *)sdev->hostdata; devInfoReg()
3640 sdp->hostdata = devip; scsi_debug_slave_configure()
3650 (struct sdebug_dev_info *)sdp->hostdata; scsi_debug_slave_destroy()
3658 sdp->hostdata = NULL; scsi_debug_slave_destroy()
3680 cmnd->device->hostdata; stop_queued_cmnd()
3721 sqcp->a_cmnd->device->hostdata; stop_all_queued()
5092 devip = (struct sdebug_dev_info *)sdev->hostdata; sdebug_change_qdepth()
5191 devip = (struct sdebug_dev_info *)sdp->hostdata; scsi_debug_queuecommand()
5351 *((struct sdebug_host_info **)hpnt->hostdata) = sdbg_host; sdebug_driver_probe()
H A D3w-xxxx.c495 TW_Device_Extension *tw_dev = (TW_Device_Extension *)host->hostdata; tw_show_stats()
1337 tw_dev = (TW_Device_Extension *)sdev->host->hostdata; tw_scsi_biosparam()
1363 tw_dev = (TW_Device_Extension *)SCpnt->device->host->hostdata; tw_scsi_eh_reset()
1917 TW_Device_Extension *tw_dev = (TW_Device_Extension *)SCpnt->device->host->hostdata; tw_scsi_queue_lck()
2210 TW_Device_Extension *tw_dev = (TW_Device_Extension *)host->hostdata; tw_shutdown()
2270 tw_dev = (TW_Device_Extension *)host->hostdata; tw_probe()
2360 TW_Device_Extension *tw_dev = (TW_Device_Extension *)host->hostdata; tw_remove()
H A Dhpsa.c536 hdev = sdev->hostdata; raid_level_show()
569 hdev = sdev->hostdata; lunid_show()
593 hdev = sdev->hostdata; unique_id_show()
621 hdev = sdev->hostdata; host_show_hp_ssd_smart_path_enabled()
1515 /* link sdev->hostdata to our per-device structure. */ hpsa_slave_alloc()
1527 sdev->hostdata = sd; hpsa_slave_alloc()
1774 dev = cmd->device->hostdata; complete_scsi_command()
2878 d = scmd->device->hostdata; hpsa_get_pdisk_of_ioaccel2()
3455 struct hpsa_scsi_dev_t *dev = cmd->device->hostdata; hpsa_scsi_ioaccel_direct_map()
3470 struct hpsa_scsi_dev_t *dev = cmd->device->hostdata; set_encrypt_ioaccel2()
3673 struct hpsa_scsi_dev_t *dev = cmd->device->hostdata; hpsa_scsi_ioaccel_raid_map()
4069 dev = cmd->device->hostdata; hpsa_command_resubmit_worker()
4097 dev = cmd->device->hostdata; hpsa_scsi_queue_command()
4205 struct hpsa_scsi_dev_t *logical_drive = sdev->hostdata; hpsa_change_queue_depth()
4262 sh->hostdata[0] = (unsigned long) h; hpsa_register_scsi()
4357 dev = scsicmd->device->hostdata; hpsa_eh_device_reset_handler()
4477 dev = (struct hpsa_scsi_dev_t *)(scmd->device->hostdata); hpsa_send_reset_as_abort_ioaccel2()
4594 dev = sc->device->hostdata; hpsa_eh_abort_handler()
H A Ddc395x.c1088 (struct AdapterCtlBlk *)cmd->device->host->hostdata; dc395x_queue_command_lck()
1171 acb = (struct AdapterCtlBlk *)sdev->host->hostdata; dc395x_bios_param()
1302 (struct AdapterCtlBlk *)cmd->device->host->hostdata; __dc395x_eh_bus_reset()
1368 (struct AdapterCtlBlk *)cmd->device->host->hostdata; dc395x_eh_abort()
3905 struct AdapterCtlBlk *acb = (struct AdapterCtlBlk *)scsi_device->host->hostdata; dc395x_slave_alloc()
3925 struct AdapterCtlBlk *acb = (struct AdapterCtlBlk *)scsi_device->host->hostdata; dc395x_slave_destroy()
4417 struct AdapterCtlBlk *acb = (struct AdapterCtlBlk *)host->hostdata; adapter_init_scsi_host()
4620 struct AdapterCtlBlk *acb = (struct AdapterCtlBlk *)host->hostdata; dc395x_show_info()
4803 acb = (struct AdapterCtlBlk*)scsi_host->hostdata; dc395x_init_one()
4844 struct AdapterCtlBlk *acb = (struct AdapterCtlBlk *)(scsi_host->hostdata); dc395x_remove_one()
H A Dinitio.c2542 r = initio_isr((struct initio_host *)dev->hostdata); i91u_intr()
2645 struct initio_host *host = (struct initio_host *) cmd->device->host->hostdata; i91u_queuecommand_lck()
2672 host = (struct initio_host *) cmnd->device->host->hostdata; i91u_bus_reset()
2700 host = (struct initio_host *) sdev->host->hostdata; i91u_biosparam()
2871 host = (struct initio_host *)shost->hostdata; initio_probe_one()
2971 struct initio_host *s = (struct initio_host *)host->hostdata; initio_remove_one()
H A Dmesh.c1635 ms = (struct mesh_state *) cmd->device->host->hostdata; mesh_queue_lck()
1688 struct mesh_state *ms = (struct mesh_state *) cmd->device->host->hostdata; mesh_abort()
1705 struct mesh_state *ms = (struct mesh_state *) cmd->device->host->hostdata; mesh_host_reset()
1889 ms = (struct mesh_state *) mesh_host->hostdata; mesh_probe()
H A DBusLogic.c156 (struct blogic_adapter *) host->hostdata; blogic_drvr_info()
2321 (struct blogic_adapter *) dev->host->hostdata; blogic_slaveconfig()
2464 myadapter = (struct blogic_adapter *) host->hostdata; blogic_init()
3004 (struct blogic_adapter *) SCpnt->device->host->hostdata; blogic_hostreset()
3028 (struct blogic_adapter *) command->device->host->hostdata; blogic_qcmd_lck()
3251 (struct blogic_adapter *) command->device->host->hostdata;
3392 (struct blogic_adapter *) sdev->host->hostdata; blogic_diskparam()
3467 (struct blogic_adapter *) shost->hostdata; blogic_write_info()
3479 struct blogic_adapter *adapter = (struct blogic_adapter *) shost->hostdata; blogic_show_info()
H A Dmegaraid.c379 adapter = (adapter_t *)scmd->device->host->hostdata; megaraid_queue_lck()
1857 adapter = (adapter_t *)host->hostdata; megaraid_info()
1877 adapter = (adapter_t *)cmd->device->host->hostdata; megaraid_abort()
1898 adapter = (adapter_t *)cmd->device->host->hostdata; megaraid_reset()
2843 adapter = (adapter_t *)sdev->host->hostdata; megaraid_biosparam()
4285 adapter = (adapter_t *)host->hostdata; megaraid_probe_one()
4588 adapter_t *adapter = (adapter_t *)host->hostdata; megaraid_remove_one()
4658 adapter_t *adapter = (adapter_t *)host->hostdata; megaraid_shutdown()
H A Dppa.c49 return *(ppa_struct **)&host->hostdata; ppa_dev()
1075 *(ppa_struct **)&host->hostdata = dev; __ppa_attach()
H A Dimm.c58 return *(imm_struct **)&host->hostdata; imm_dev()
1209 *(imm_struct **)&host->hostdata = dev; __imm_attach()
H A Dqla1280.c698 ha = (struct scsi_qla_host *)host->hostdata; qla1280_info()
725 struct scsi_qla_host *ha = (struct scsi_qla_host *)host->hostdata; qla1280_queuecommand_lck()
861 ha = (struct scsi_qla_host *)(CMD_HOST(cmd)->hostdata); qla1280_error_action()
1219 ha = (struct scsi_qla_host *)device->host->hostdata; qla1280_slave_configure()
4038 ha = (struct scsi_qla_host *)host->hostdata; __qla1280_print_scsi_cmd()
4260 ha = (struct scsi_qla_host *)host->hostdata; qla1280_probe_one()
4398 struct scsi_qla_host *ha = (struct scsi_qla_host *)host->hostdata; qla1280_remove_one()
H A Dmvumi.c727 mhba = (struct mvumi_hba *) scmd->device->host->hostdata; mvumi_host_reset()
2045 mhba = (struct mvumi_hba *) sdev->host->hostdata; mvumi_slave_configure()
2129 mhba = (struct mvumi_hba *) shost->hostdata; mvumi_queue_command()
H A Dncr53c8xx.c7966 struct ncb *np = ((struct host_data *) host->hostdata)->ncb; ncr53c8xx_slave_alloc()
7976 struct ncb *np = ((struct host_data *) host->hostdata)->ncb; ncr53c8xx_slave_configure()
8030 struct ncb *np = ((struct host_data *) cmd->device->host->hostdata)->ncb; ncr53c8xx_queue_command_lck()
8073 struct host_data *host_data = (struct host_data *)shost->hostdata; DEF_SCSI_QCMD()
8114 struct ncb *np = ((struct host_data *) cmd->device->host->hostdata)->ncb; ncr53c8xx_bus_reset()
8141 struct ncb *np = ((struct host_data *) cmd->device->host->hostdata)->ncb;
8249 struct host_data *host_data = (struct host_data *)host->hostdata; show_ncr53c8xx_revision()
8327 host_data = (struct host_data *) instance->hostdata; ncr_attach()
8541 struct ncb *np = ((struct host_data *)shost->hostdata)->ncb; ncr53c8xx_set_period()
8557 struct ncb *np = ((struct host_data *)shost->hostdata)->ncb; ncr53c8xx_set_offset()
8573 struct ncb *np = ((struct host_data *)shost->hostdata)->ncb; ncr53c8xx_set_width()
8588 struct ncb *np = ((struct host_data *)shost->hostdata)->ncb; ncr53c8xx_get_signalling()
H A Daha152x.c518 /* access macros for hostdata */
520 #define HOSTDATA(shpnt) ((struct aha152x_hostdata *) &shpnt->hostdata)
1315 struct Scsi_Host *shost = container_of((void *)hd, struct Scsi_Host, hostdata); run()
3355 struct Scsi_Host *shost = container_of((void *)hd, struct Scsi_Host, hostdata); aha152x_exit()
H A Daha1740.c86 #define HOSTDATA(host) ((struct aha1740_hostdata *) &host->hostdata)
H A Dips.c797 ha = (ips_ha_t *) SC->device->host->hostdata; ips_eh_abort()
861 ha = (ips_ha_t *) SC->device->host->hostdata; __ips_eh_reset()
1057 ha = (ips_ha_t *) SC->device->host->hostdata; ips_queue_lck()
1155 ips_ha_t *ha = (ips_ha_t *) sdev->host->hostdata; ips_biosparam()
1447 ha = (ips_ha_t *) ips_sh[i]->hostdata; ips_write_info()
1469 ha = (ips_ha_t *) ips_sh[i]->hostdata; ips_show_info()
H A Dips.h60 #define IPS_HA(x) ((ips_ha_t *) x->hostdata)
H A Dxen-scsifront.c844 info = (struct vscsifrnt_info *)host->hostdata; scsifront_probe()
H A Dscsi_transport_fc.c3175 * Note: We do not remove or clear the hostdata area. This allows fc_timeout_deleted_rport()
3177 * scsi_target_id. It's up to the host to manage it's hostdata area. fc_timeout_deleted_rport()
H A Dadvansys.c2343 * of the 'Scsi_Host' structure starting at the 'hostdata'
/linux-4.1.27/drivers/scsi/ibmvscsi/
H A Dibmvscsi.c122 struct ibmvscsi_host_data *hostdata);
137 struct ibmvscsi_host_data *hostdata = ibmvscsi_handle_event() local
139 vio_disable_interrupts(to_vio_dev(hostdata->dev)); ibmvscsi_handle_event()
140 tasklet_schedule(&hostdata->srp_task); ibmvscsi_handle_event()
153 struct ibmvscsi_host_data *hostdata, ibmvscsi_release_crq_queue()
157 struct vio_dev *vdev = to_vio_dev(hostdata->dev); ibmvscsi_release_crq_queue()
158 free_irq(vdev->irq, (void *)hostdata); ibmvscsi_release_crq_queue()
159 tasklet_kill(&hostdata->srp_task); ibmvscsi_release_crq_queue()
165 dma_unmap_single(hostdata->dev, ibmvscsi_release_crq_queue()
202 * @hostdata: the adapter
206 static int ibmvscsi_send_crq(struct ibmvscsi_host_data *hostdata, ibmvscsi_send_crq() argument
209 struct vio_dev *vdev = to_vio_dev(hostdata->dev); ibmvscsi_send_crq()
225 struct ibmvscsi_host_data *hostdata = (struct ibmvscsi_host_data *)data; ibmvscsi_task() local
226 struct vio_dev *vdev = to_vio_dev(hostdata->dev); ibmvscsi_task()
232 while ((crq = crq_queue_next_crq(&hostdata->queue)) != NULL) { ibmvscsi_task()
233 ibmvscsi_handle_crq(crq, hostdata); ibmvscsi_task()
238 crq = crq_queue_next_crq(&hostdata->queue); ibmvscsi_task()
241 ibmvscsi_handle_crq(crq, hostdata); ibmvscsi_task()
272 static void set_adapter_info(struct ibmvscsi_host_data *hostdata) set_adapter_info() argument
274 memset(&hostdata->madapter_info, 0x00, set_adapter_info()
275 sizeof(hostdata->madapter_info)); set_adapter_info()
277 dev_info(hostdata->dev, "SRP_VERSION: %s\n", SRP_VERSION); set_adapter_info()
278 strcpy(hostdata->madapter_info.srp_version, SRP_VERSION); set_adapter_info()
280 strncpy(hostdata->madapter_info.partition_name, partition_name, set_adapter_info()
281 sizeof(hostdata->madapter_info.partition_name)); set_adapter_info()
283 hostdata->madapter_info.partition_number = set_adapter_info()
286 hostdata->madapter_info.mad_version = cpu_to_be32(1); set_adapter_info()
287 hostdata->madapter_info.os_type = cpu_to_be32(2); set_adapter_info()
293 * @hostdata: ibmvscsi_host_data of host
297 struct ibmvscsi_host_data *hostdata) ibmvscsi_reset_crq_queue()
300 struct vio_dev *vdev = to_vio_dev(hostdata->dev); ibmvscsi_reset_crq_queue()
313 set_adapter_info(hostdata); ibmvscsi_reset_crq_queue()
321 dev_warn(hostdata->dev, "Partner adapter not ready\n"); ibmvscsi_reset_crq_queue()
323 dev_warn(hostdata->dev, "couldn't register crq--rc 0x%x\n", rc); ibmvscsi_reset_crq_queue()
331 * @hostdata: ibmvscsi_host_data of host
338 struct ibmvscsi_host_data *hostdata, ibmvscsi_init_crq_queue()
343 struct vio_dev *vdev = to_vio_dev(hostdata->dev); ibmvscsi_init_crq_queue()
351 queue->msg_token = dma_map_single(hostdata->dev, queue->msgs, ibmvscsi_init_crq_queue()
355 if (dma_mapping_error(hostdata->dev, queue->msg_token)) ibmvscsi_init_crq_queue()
359 set_adapter_info(hostdata); ibmvscsi_init_crq_queue()
367 hostdata); ibmvscsi_init_crq_queue()
371 dev_warn(hostdata->dev, "Partner adapter not ready\n"); ibmvscsi_init_crq_queue()
374 dev_warn(hostdata->dev, "Error %d opening adapter\n", rc); ibmvscsi_init_crq_queue()
381 tasklet_init(&hostdata->srp_task, (void *)ibmvscsi_task, ibmvscsi_init_crq_queue()
382 (unsigned long)hostdata); ibmvscsi_init_crq_queue()
386 0, "ibmvscsi", (void *)hostdata) != 0) { ibmvscsi_init_crq_queue()
387 dev_err(hostdata->dev, "couldn't register irq 0x%x\n", ibmvscsi_init_crq_queue()
394 dev_err(hostdata->dev, "Error %d enabling interrupts!!!\n", rc); ibmvscsi_init_crq_queue()
401 tasklet_kill(&hostdata->srp_task); ibmvscsi_init_crq_queue()
409 dma_unmap_single(hostdata->dev, ibmvscsi_init_crq_queue()
421 * @hostdata: ibmvscsi_host_data of host
425 struct ibmvscsi_host_data *hostdata) ibmvscsi_reenable_crq_queue()
428 struct vio_dev *vdev = to_vio_dev(hostdata->dev); ibmvscsi_reenable_crq_queue()
438 dev_err(hostdata->dev, "Error %d enabling adapter\n", rc); ibmvscsi_reenable_crq_queue()
449 * @hostdata: ibmvscsi_host_data who owns the event pool
454 int size, struct ibmvscsi_host_data *hostdata) initialize_event_pool()
465 dma_alloc_coherent(hostdata->dev, initialize_event_pool()
482 evt->hostdata = hostdata; initialize_event_pool()
493 * @hostdata: ibmvscsi_host_data who owns the even pool
498 struct ibmvscsi_host_data *hostdata) release_event_pool()
505 dma_free_coherent(hostdata->dev, release_event_pool()
512 dev_warn(hostdata->dev, "releasing event pool with %d " release_event_pool()
515 dma_free_coherent(hostdata->dev, release_event_pool()
548 dev_err(evt->hostdata->dev, "Freeing invalid event_struct %p " free_event_struct()
553 dev_err(evt->hostdata->dev, "Freeing event_struct %p " free_event_struct()
790 * @hostdata: the adapter
792 static void purge_requests(struct ibmvscsi_host_data *hostdata, int error_code) purge_requests() argument
797 spin_lock_irqsave(hostdata->host->host_lock, flags); purge_requests()
798 while (!list_empty(&hostdata->sent)) { purge_requests()
799 evt = list_first_entry(&hostdata->sent, struct srp_event_struct, list); purge_requests()
803 spin_unlock_irqrestore(hostdata->host->host_lock, flags); purge_requests()
807 evt->hostdata->dev); purge_requests()
813 free_event_struct(&evt->hostdata->pool, evt); purge_requests()
814 spin_lock_irqsave(hostdata->host->host_lock, flags); purge_requests()
816 spin_unlock_irqrestore(hostdata->host->host_lock, flags); purge_requests()
821 * @hostdata: struct ibmvscsi_host_data to reset
823 static void ibmvscsi_reset_host(struct ibmvscsi_host_data *hostdata) ibmvscsi_reset_host() argument
825 scsi_block_requests(hostdata->host); ibmvscsi_reset_host()
826 atomic_set(&hostdata->request_limit, 0); ibmvscsi_reset_host()
828 purge_requests(hostdata, DID_ERROR); ibmvscsi_reset_host()
829 hostdata->reset_crq = 1; ibmvscsi_reset_host()
830 wake_up(&hostdata->work_wait_q); ibmvscsi_reset_host()
841 struct ibmvscsi_host_data *hostdata = evt_struct->hostdata; ibmvscsi_timeout() local
843 dev_err(hostdata->dev, "Command timed out (%x). Resetting connection\n", ibmvscsi_timeout()
846 ibmvscsi_reset_host(hostdata); ibmvscsi_timeout()
856 * @hostdata: ibmvscsi_host_data of host
863 struct ibmvscsi_host_data *hostdata, ibmvscsi_send_srp_event()
880 atomic_dec_if_positive(&hostdata->request_limit); ibmvscsi_send_srp_event()
910 list_for_each_entry(tmp_evt, &hostdata->sent, list) { ibmvscsi_send_srp_event()
927 list_add_tail(&evt_struct->list, &hostdata->sent); ibmvscsi_send_srp_event()
937 rc = ibmvscsi_send_crq(hostdata, be64_to_cpu(crq_as_u64[0]), ibmvscsi_send_srp_event()
949 dev_warn(hostdata->dev, "send warning. " ibmvscsi_send_srp_event()
953 dev_err(hostdata->dev, "send error %d\n", rc); ibmvscsi_send_srp_event()
955 atomic_inc(&hostdata->request_limit); ibmvscsi_send_srp_event()
962 unmap_cmd_data(&evt_struct->iu.srp.cmd, evt_struct, hostdata->dev); ibmvscsi_send_srp_event()
964 free_event_struct(&hostdata->pool, evt_struct); ibmvscsi_send_srp_event()
966 atomic_inc(&hostdata->request_limit); ibmvscsi_send_srp_event()
970 unmap_cmd_data(&evt_struct->iu.srp.cmd, evt_struct, hostdata->dev); ibmvscsi_send_srp_event()
978 free_event_struct(&hostdata->pool, evt_struct); ibmvscsi_send_srp_event()
996 dev_warn(evt_struct->hostdata->dev, handle_cmd_rsp()
1008 evt_struct->hostdata->dev); handle_cmd_rsp()
1042 struct ibmvscsi_host_data *hostdata = shost_priv(cmnd->device->host); ibmvscsi_queuecommand_lck() local
1047 evt_struct = get_event_struct(&hostdata->pool); ibmvscsi_queuecommand_lck()
1058 if (!map_data_for_srp_cmd(cmnd, evt_struct, srp_cmd, hostdata->dev)) { ibmvscsi_queuecommand_lck()
1062 free_event_struct(&hostdata->pool, evt_struct); ibmvscsi_queuecommand_lck()
1087 return ibmvscsi_send_srp_event(evt_struct, hostdata, 0); ibmvscsi_queuecommand_lck()
1098 * @hostdata: ibmvscsi_host_data of host
1103 static int map_persist_bufs(struct ibmvscsi_host_data *hostdata) map_persist_bufs() argument
1106 hostdata->caps_addr = dma_map_single(hostdata->dev, &hostdata->caps, map_persist_bufs()
1107 sizeof(hostdata->caps), DMA_BIDIRECTIONAL); map_persist_bufs()
1109 if (dma_mapping_error(hostdata->dev, hostdata->caps_addr)) { map_persist_bufs()
1110 dev_err(hostdata->dev, "Unable to map capabilities buffer!\n"); map_persist_bufs()
1114 hostdata->adapter_info_addr = dma_map_single(hostdata->dev, map_persist_bufs()
1115 &hostdata->madapter_info, map_persist_bufs()
1116 sizeof(hostdata->madapter_info), map_persist_bufs()
1118 if (dma_mapping_error(hostdata->dev, hostdata->adapter_info_addr)) { map_persist_bufs()
1119 dev_err(hostdata->dev, "Unable to map adapter info buffer!\n"); map_persist_bufs()
1120 dma_unmap_single(hostdata->dev, hostdata->caps_addr, map_persist_bufs()
1121 sizeof(hostdata->caps), DMA_BIDIRECTIONAL); map_persist_bufs()
1130 * @hostdata: ibmvscsi_host_data of host
1134 static void unmap_persist_bufs(struct ibmvscsi_host_data *hostdata) unmap_persist_bufs() argument
1136 dma_unmap_single(hostdata->dev, hostdata->caps_addr, unmap_persist_bufs()
1137 sizeof(hostdata->caps), DMA_BIDIRECTIONAL); unmap_persist_bufs()
1139 dma_unmap_single(hostdata->dev, hostdata->adapter_info_addr, unmap_persist_bufs()
1140 sizeof(hostdata->madapter_info), DMA_BIDIRECTIONAL); unmap_persist_bufs()
1152 struct ibmvscsi_host_data *hostdata = evt_struct->hostdata; login_rsp() local
1157 dev_info(hostdata->dev, "SRP_LOGIN_REJ reason %u\n", login_rsp()
1160 atomic_set(&hostdata->request_limit, -1); login_rsp()
1163 dev_err(hostdata->dev, "Invalid login response typecode 0x%02x!\n", login_rsp()
1166 atomic_set(&hostdata->request_limit, -1); login_rsp()
1170 dev_info(hostdata->dev, "SRP_LOGIN succeeded\n"); login_rsp()
1171 hostdata->client_migrated = 0; login_rsp()
1177 atomic_set(&hostdata->request_limit, login_rsp()
1181 scsi_unblock_requests(hostdata->host); login_rsp()
1186 * @hostdata: ibmvscsi_host_data of host
1190 static int send_srp_login(struct ibmvscsi_host_data *hostdata) send_srp_login() argument
1195 struct srp_event_struct *evt_struct = get_event_struct(&hostdata->pool); send_srp_login()
1208 spin_lock_irqsave(hostdata->host->host_lock, flags); send_srp_login()
1213 atomic_set(&hostdata->request_limit, 0); send_srp_login()
1215 rc = ibmvscsi_send_srp_event(evt_struct, hostdata, login_timeout * 2); send_srp_login()
1216 spin_unlock_irqrestore(hostdata->host->host_lock, flags); send_srp_login()
1217 dev_info(hostdata->dev, "sent SRP login\n"); send_srp_login()
1229 struct ibmvscsi_host_data *hostdata = evt_struct->hostdata; capabilities_rsp() local
1232 dev_err(hostdata->dev, "error 0x%X getting capabilities info\n", capabilities_rsp()
1235 if (hostdata->caps.migration.common.server_support != capabilities_rsp()
1237 dev_info(hostdata->dev, "Partition migration not supported\n"); capabilities_rsp()
1240 if (hostdata->caps.reserve.common.server_support == capabilities_rsp()
1242 dev_info(hostdata->dev, "Client reserve enabled\n"); capabilities_rsp()
1244 dev_info(hostdata->dev, "Client reserve not supported\n"); capabilities_rsp()
1248 send_srp_login(hostdata); capabilities_rsp()
1254 * @hostdata: ibmvscsi_host_data of host
1256 static void send_mad_capabilities(struct ibmvscsi_host_data *hostdata) send_mad_capabilities() argument
1261 struct device_node *of_node = hostdata->dev->of_node; send_mad_capabilities()
1264 evt_struct = get_event_struct(&hostdata->pool); send_mad_capabilities()
1273 hostdata->caps.flags = cpu_to_be32(CAP_LIST_SUPPORTED); send_mad_capabilities()
1274 if (hostdata->client_migrated) send_mad_capabilities()
1275 hostdata->caps.flags |= cpu_to_be32(CLIENT_MIGRATED); send_mad_capabilities()
1277 strncpy(hostdata->caps.name, dev_name(&hostdata->host->shost_gendev), send_mad_capabilities()
1278 sizeof(hostdata->caps.name)); send_mad_capabilities()
1279 hostdata->caps.name[sizeof(hostdata->caps.name) - 1] = '\0'; send_mad_capabilities()
1282 location = location ? location : dev_name(hostdata->dev); send_mad_capabilities()
1283 strncpy(hostdata->caps.loc, location, sizeof(hostdata->caps.loc)); send_mad_capabilities()
1284 hostdata->caps.loc[sizeof(hostdata->caps.loc) - 1] = '\0'; send_mad_capabilities()
1287 req->buffer = cpu_to_be64(hostdata->caps_addr); send_mad_capabilities()
1289 hostdata->caps.migration.common.cap_type = send_mad_capabilities()
1291 hostdata->caps.migration.common.length = send_mad_capabilities()
1292 cpu_to_be16(sizeof(hostdata->caps.migration)); send_mad_capabilities()
1293 hostdata->caps.migration.common.server_support = send_mad_capabilities()
1295 hostdata->caps.migration.ecl = cpu_to_be32(1); send_mad_capabilities()
1298 hostdata->caps.reserve.common.cap_type = send_mad_capabilities()
1300 hostdata->caps.reserve.common.length = send_mad_capabilities()
1301 cpu_to_be16(sizeof(hostdata->caps.reserve)); send_mad_capabilities()
1302 hostdata->caps.reserve.common.server_support = send_mad_capabilities()
1304 hostdata->caps.reserve.type = send_mad_capabilities()
1307 cpu_to_be16(sizeof(hostdata->caps)); send_mad_capabilities()
1309 req->common.length = cpu_to_be16(sizeof(hostdata->caps) - send_mad_capabilities()
1310 sizeof(hostdata->caps.reserve)); send_mad_capabilities()
1312 spin_lock_irqsave(hostdata->host->host_lock, flags); send_mad_capabilities()
1313 if (ibmvscsi_send_srp_event(evt_struct, hostdata, info_timeout * 2)) send_mad_capabilities()
1314 dev_err(hostdata->dev, "couldn't send CAPABILITIES_REQ!\n"); send_mad_capabilities()
1315 spin_unlock_irqrestore(hostdata->host->host_lock, flags); send_mad_capabilities()
1327 struct ibmvscsi_host_data *hostdata = evt_struct->hostdata; fast_fail_rsp() local
1331 dev_err(hostdata->dev, "fast_fail not supported in server\n"); fast_fail_rsp()
1333 dev_err(hostdata->dev, "fast_fail request failed\n"); fast_fail_rsp()
1335 dev_err(hostdata->dev, "error 0x%X enabling fast_fail\n", status); fast_fail_rsp()
1337 send_mad_capabilities(hostdata); fast_fail_rsp()
1342 * @hostdata: ibmvscsi_host_data of host
1346 static int enable_fast_fail(struct ibmvscsi_host_data *hostdata) enable_fast_fail() argument
1354 send_mad_capabilities(hostdata); enable_fast_fail()
1358 evt_struct = get_event_struct(&hostdata->pool); enable_fast_fail()
1368 spin_lock_irqsave(hostdata->host->host_lock, flags); enable_fast_fail()
1369 rc = ibmvscsi_send_srp_event(evt_struct, hostdata, info_timeout * 2); enable_fast_fail()
1370 spin_unlock_irqrestore(hostdata->host->host_lock, flags); enable_fast_fail()
1383 struct ibmvscsi_host_data *hostdata = evt_struct->hostdata; adapter_info_rsp() local
1386 dev_err(hostdata->dev, "error %d getting adapter info\n", adapter_info_rsp()
1389 dev_info(hostdata->dev, "host srp version: %s, " adapter_info_rsp()
1391 hostdata->madapter_info.srp_version, adapter_info_rsp()
1392 hostdata->madapter_info.partition_name, adapter_info_rsp()
1393 be32_to_cpu(hostdata->madapter_info.partition_number), adapter_info_rsp()
1394 be32_to_cpu(hostdata->madapter_info.os_type), adapter_info_rsp()
1395 be32_to_cpu(hostdata->madapter_info.port_max_txu[0])); adapter_info_rsp()
1397 if (hostdata->madapter_info.port_max_txu[0]) adapter_info_rsp()
1398 hostdata->host->max_sectors = adapter_info_rsp()
1399 be32_to_cpu(hostdata->madapter_info.port_max_txu[0]) >> 9; adapter_info_rsp()
1401 if (be32_to_cpu(hostdata->madapter_info.os_type) == 3 && adapter_info_rsp()
1402 strcmp(hostdata->madapter_info.srp_version, "1.6a") <= 0) { adapter_info_rsp()
1403 dev_err(hostdata->dev, "host (Ver. %s) doesn't support large transfers\n", adapter_info_rsp()
1404 hostdata->madapter_info.srp_version); adapter_info_rsp()
1405 dev_err(hostdata->dev, "limiting scatterlists to %d\n", adapter_info_rsp()
1407 hostdata->host->sg_tablesize = MAX_INDIRECT_BUFS; adapter_info_rsp()
1410 if (be32_to_cpu(hostdata->madapter_info.os_type) == 3) { adapter_info_rsp()
1411 enable_fast_fail(hostdata); adapter_info_rsp()
1416 send_srp_login(hostdata); adapter_info_rsp()
1424 * @hostdata: ibmvscsi_host_data of host
1428 static void send_mad_adapter_info(struct ibmvscsi_host_data *hostdata) send_mad_adapter_info() argument
1434 evt_struct = get_event_struct(&hostdata->pool); send_mad_adapter_info()
1446 req->common.length = cpu_to_be16(sizeof(hostdata->madapter_info)); send_mad_adapter_info()
1447 req->buffer = cpu_to_be64(hostdata->adapter_info_addr); send_mad_adapter_info()
1449 spin_lock_irqsave(hostdata->host->host_lock, flags); send_mad_adapter_info()
1450 if (ibmvscsi_send_srp_event(evt_struct, hostdata, info_timeout * 2)) send_mad_adapter_info()
1451 dev_err(hostdata->dev, "couldn't send ADAPTER_INFO_REQ!\n"); send_mad_adapter_info()
1452 spin_unlock_irqrestore(hostdata->host->host_lock, flags); send_mad_adapter_info()
1459 static void init_adapter(struct ibmvscsi_host_data *hostdata) init_adapter() argument
1461 send_mad_adapter_info(hostdata); init_adapter()
1485 struct ibmvscsi_host_data *hostdata = shost_priv(cmd->device->host); ibmvscsi_eh_abort_handler() local
1498 spin_lock_irqsave(hostdata->host->host_lock, flags); ibmvscsi_eh_abort_handler()
1502 list_for_each_entry(tmp_evt, &hostdata->sent, list) { ibmvscsi_eh_abort_handler()
1510 spin_unlock_irqrestore(hostdata->host->host_lock, flags); ibmvscsi_eh_abort_handler()
1514 evt = get_event_struct(&hostdata->pool); ibmvscsi_eh_abort_handler()
1516 spin_unlock_irqrestore(hostdata->host->host_lock, flags); ibmvscsi_eh_abort_handler()
1539 rsp_rc = ibmvscsi_send_srp_event(evt, hostdata, abort_timeout * 2); ibmvscsi_eh_abort_handler()
1544 spin_unlock_irqrestore(hostdata->host->host_lock, flags); ibmvscsi_eh_abort_handler()
1546 spin_lock_irqsave(hostdata->host->host_lock, flags); ibmvscsi_eh_abort_handler()
1549 spin_unlock_irqrestore(hostdata->host->host_lock, flags); ibmvscsi_eh_abort_handler()
1588 spin_lock_irqsave(hostdata->host->host_lock, flags); ibmvscsi_eh_abort_handler()
1590 list_for_each_entry(tmp_evt, &hostdata->sent, list) { ibmvscsi_eh_abort_handler()
1598 spin_unlock_irqrestore(hostdata->host->host_lock, flags); ibmvscsi_eh_abort_handler()
1610 found_evt->hostdata->dev); ibmvscsi_eh_abort_handler()
1611 free_event_struct(&found_evt->hostdata->pool, found_evt); ibmvscsi_eh_abort_handler()
1612 spin_unlock_irqrestore(hostdata->host->host_lock, flags); ibmvscsi_eh_abort_handler()
1613 atomic_inc(&hostdata->request_limit); ibmvscsi_eh_abort_handler()
1624 struct ibmvscsi_host_data *hostdata = shost_priv(cmd->device->host); ibmvscsi_eh_device_reset_handler() local
1634 spin_lock_irqsave(hostdata->host->host_lock, flags); ibmvscsi_eh_device_reset_handler()
1637 evt = get_event_struct(&hostdata->pool); ibmvscsi_eh_device_reset_handler()
1639 spin_unlock_irqrestore(hostdata->host->host_lock, flags); ibmvscsi_eh_device_reset_handler()
1661 rsp_rc = ibmvscsi_send_srp_event(evt, hostdata, reset_timeout * 2); ibmvscsi_eh_device_reset_handler()
1666 spin_unlock_irqrestore(hostdata->host->host_lock, flags); ibmvscsi_eh_device_reset_handler()
1668 spin_lock_irqsave(hostdata->host->host_lock, flags); ibmvscsi_eh_device_reset_handler()
1671 spin_unlock_irqrestore(hostdata->host->host_lock, flags); ibmvscsi_eh_device_reset_handler()
1708 spin_lock_irqsave(hostdata->host->host_lock, flags); ibmvscsi_eh_device_reset_handler()
1709 list_for_each_entry_safe(tmp_evt, pos, &hostdata->sent, list) { ibmvscsi_eh_device_reset_handler()
1715 tmp_evt->hostdata->dev); ibmvscsi_eh_device_reset_handler()
1716 free_event_struct(&tmp_evt->hostdata->pool, ibmvscsi_eh_device_reset_handler()
1718 atomic_inc(&hostdata->request_limit); ibmvscsi_eh_device_reset_handler()
1725 spin_unlock_irqrestore(hostdata->host->host_lock, flags); ibmvscsi_eh_device_reset_handler()
1736 struct ibmvscsi_host_data *hostdata = shost_priv(cmd->device->host); ibmvscsi_eh_host_reset_handler() local
1738 dev_err(hostdata->dev, "Resetting connection due to error recovery\n"); ibmvscsi_eh_host_reset_handler()
1740 ibmvscsi_reset_host(hostdata); ibmvscsi_eh_host_reset_handler()
1744 atomic_read(&hostdata->request_limit) < 2;) { ibmvscsi_eh_host_reset_handler()
1749 if (atomic_read(&hostdata->request_limit) <= 0) ibmvscsi_eh_host_reset_handler()
1758 * @hostdata: ibmvscsi_host_data of host
1762 struct ibmvscsi_host_data *hostdata) ibmvscsi_handle_crq()
1773 dev_info(hostdata->dev, "partner initialized\n"); ibmvscsi_handle_crq()
1775 rc = ibmvscsi_send_crq(hostdata, 0xC002000000000000LL, 0); ibmvscsi_handle_crq()
1778 init_adapter(hostdata); ibmvscsi_handle_crq()
1780 dev_err(hostdata->dev, "Unable to send init rsp. rc=%ld\n", rc); ibmvscsi_handle_crq()
1785 dev_info(hostdata->dev, "partner initialization complete\n"); ibmvscsi_handle_crq()
1788 init_adapter(hostdata); ibmvscsi_handle_crq()
1791 dev_err(hostdata->dev, "unknown crq message type: %d\n", crq->format); ibmvscsi_handle_crq()
1795 scsi_block_requests(hostdata->host); ibmvscsi_handle_crq()
1796 atomic_set(&hostdata->request_limit, 0); ibmvscsi_handle_crq()
1799 dev_info(hostdata->dev, "Re-enabling adapter!\n"); ibmvscsi_handle_crq()
1800 hostdata->client_migrated = 1; ibmvscsi_handle_crq()
1801 hostdata->reenable_crq = 1; ibmvscsi_handle_crq()
1802 purge_requests(hostdata, DID_REQUEUE); ibmvscsi_handle_crq()
1803 wake_up(&hostdata->work_wait_q); ibmvscsi_handle_crq()
1805 dev_err(hostdata->dev, "Virtual adapter failed rc %d!\n", ibmvscsi_handle_crq()
1807 ibmvscsi_reset_host(hostdata); ibmvscsi_handle_crq()
1813 dev_err(hostdata->dev, "got an invalid message type 0x%02x\n", ibmvscsi_handle_crq()
1822 if (!valid_event_struct(&hostdata->pool, evt_struct)) { ibmvscsi_handle_crq()
1823 dev_err(hostdata->dev, "returned correlation_token 0x%p is invalid!\n", ibmvscsi_handle_crq()
1829 dev_err(hostdata->dev, "received duplicate correlation_token 0x%p!\n", ibmvscsi_handle_crq()
1836 &hostdata->request_limit); ibmvscsi_handle_crq()
1845 dev_err(hostdata->dev, "returned done() is NULL; not running it!\n"); ibmvscsi_handle_crq()
1851 spin_lock_irqsave(evt_struct->hostdata->host->host_lock, flags); ibmvscsi_handle_crq()
1853 free_event_struct(&evt_struct->hostdata->pool, evt_struct); ibmvscsi_handle_crq()
1854 spin_unlock_irqrestore(evt_struct->hostdata->host->host_lock, flags); ibmvscsi_handle_crq()
1861 static int ibmvscsi_do_host_config(struct ibmvscsi_host_data *hostdata, ibmvscsi_do_host_config() argument
1870 evt_struct = get_event_struct(&hostdata->pool); ibmvscsi_do_host_config()
1872 dev_err(hostdata->dev, "couldn't allocate event for HOST_CONFIG!\n"); ibmvscsi_do_host_config()
1890 addr = dma_map_single(hostdata->dev, buffer, length, DMA_BIDIRECTIONAL); ibmvscsi_do_host_config()
1892 if (dma_mapping_error(hostdata->dev, addr)) { ibmvscsi_do_host_config()
1894 dev_err(hostdata->dev, ibmvscsi_do_host_config()
1896 free_event_struct(&hostdata->pool, evt_struct); ibmvscsi_do_host_config()
1903 spin_lock_irqsave(hostdata->host->host_lock, flags); ibmvscsi_do_host_config()
1904 rc = ibmvscsi_send_srp_event(evt_struct, hostdata, info_timeout * 2); ibmvscsi_do_host_config()
1905 spin_unlock_irqrestore(hostdata->host->host_lock, flags); ibmvscsi_do_host_config()
1908 dma_unmap_single(hostdata->dev, addr, length, DMA_BIDIRECTIONAL); ibmvscsi_do_host_config()
1958 struct ibmvscsi_host_data *hostdata = shost_priv(shost); show_host_vhost_loc() local
1961 len = snprintf(buf, sizeof(hostdata->caps.loc), "%s\n", show_host_vhost_loc()
1962 hostdata->caps.loc); show_host_vhost_loc()
1978 struct ibmvscsi_host_data *hostdata = shost_priv(shost); show_host_vhost_name() local
1981 len = snprintf(buf, sizeof(hostdata->caps.name), "%s\n", show_host_vhost_name()
1982 hostdata->caps.name); show_host_vhost_name()
1998 struct ibmvscsi_host_data *hostdata = shost_priv(shost); show_host_srp_version() local
2002 hostdata->madapter_info.srp_version); show_host_srp_version()
2019 struct ibmvscsi_host_data *hostdata = shost_priv(shost); show_host_partition_name() local
2023 hostdata->madapter_info.partition_name); show_host_partition_name()
2040 struct ibmvscsi_host_data *hostdata = shost_priv(shost); show_host_partition_number() local
2044 hostdata->madapter_info.partition_number); show_host_partition_number()
2060 struct ibmvscsi_host_data *hostdata = shost_priv(shost); show_host_mad_version() local
2064 hostdata->madapter_info.mad_version); show_host_mad_version()
2080 struct ibmvscsi_host_data *hostdata = shost_priv(shost); show_host_os_type() local
2083 len = snprintf(buf, PAGE_SIZE, "%d\n", hostdata->madapter_info.os_type); show_host_os_type()
2099 struct ibmvscsi_host_data *hostdata = shost_priv(shost); show_host_config() local
2102 if (ibmvscsi_do_host_config(hostdata, buf, PAGE_SIZE) == 0) show_host_config()
2169 static void ibmvscsi_do_work(struct ibmvscsi_host_data *hostdata) ibmvscsi_do_work() argument
2174 if (hostdata->reset_crq) { ibmvscsi_do_work()
2176 hostdata->reset_crq = 0; ibmvscsi_do_work()
2178 rc = ibmvscsi_reset_crq_queue(&hostdata->queue, hostdata); ibmvscsi_do_work()
2180 rc = ibmvscsi_send_crq(hostdata, 0xC001000000000000LL, 0); ibmvscsi_do_work()
2181 vio_enable_interrupts(to_vio_dev(hostdata->dev)); ibmvscsi_do_work()
2182 } else if (hostdata->reenable_crq) { ibmvscsi_do_work()
2185 rc = ibmvscsi_reenable_crq_queue(&hostdata->queue, hostdata); ibmvscsi_do_work()
2186 hostdata->reenable_crq = 0; ibmvscsi_do_work()
2188 rc = ibmvscsi_send_crq(hostdata, 0xC001000000000000LL, 0); ibmvscsi_do_work()
2193 atomic_set(&hostdata->request_limit, -1); ibmvscsi_do_work()
2194 dev_err(hostdata->dev, "error after %s\n", action); ibmvscsi_do_work()
2197 scsi_unblock_requests(hostdata->host); ibmvscsi_do_work()
2200 static int ibmvscsi_work_to_do(struct ibmvscsi_host_data *hostdata) ibmvscsi_work_to_do() argument
2204 else if (hostdata->reset_crq) { ibmvscsi_work_to_do()
2207 } else if (hostdata->reenable_crq) { ibmvscsi_work_to_do()
2217 struct ibmvscsi_host_data *hostdata = data; ibmvscsi_work() local
2223 rc = wait_event_interruptible(hostdata->work_wait_q, ibmvscsi_work()
2224 ibmvscsi_work_to_do(hostdata)); ibmvscsi_work()
2231 ibmvscsi_do_work(hostdata); ibmvscsi_work()
2242 struct ibmvscsi_host_data *hostdata; ibmvscsi_probe() local
2252 host = scsi_host_alloc(&driver_template, sizeof(*hostdata)); ibmvscsi_probe()
2259 hostdata = shost_priv(host); ibmvscsi_probe()
2260 memset(hostdata, 0x00, sizeof(*hostdata)); ibmvscsi_probe()
2261 INIT_LIST_HEAD(&hostdata->sent); ibmvscsi_probe()
2262 init_waitqueue_head(&hostdata->work_wait_q); ibmvscsi_probe()
2263 hostdata->host = host; ibmvscsi_probe()
2264 hostdata->dev = dev; ibmvscsi_probe()
2265 atomic_set(&hostdata->request_limit, -1); ibmvscsi_probe()
2266 hostdata->host->max_sectors = IBMVSCSI_MAX_SECTORS_DEFAULT; ibmvscsi_probe()
2268 if (map_persist_bufs(hostdata)) { ibmvscsi_probe()
2273 hostdata->work_thread = kthread_run(ibmvscsi_work, hostdata, "%s_%d", ibmvscsi_probe()
2276 if (IS_ERR(hostdata->work_thread)) { ibmvscsi_probe()
2278 PTR_ERR(hostdata->work_thread)); ibmvscsi_probe()
2282 rc = ibmvscsi_init_crq_queue(&hostdata->queue, hostdata, max_events); ibmvscsi_probe()
2287 if (initialize_event_pool(&hostdata->pool, max_events, hostdata) != 0) { ibmvscsi_probe()
2297 if (scsi_add_host(hostdata->host, hostdata->dev)) ibmvscsi_probe()
2301 memcpy(ids.port_id, hostdata->madapter_info.partition_name, ibmvscsi_probe()
2312 if (ibmvscsi_send_crq(hostdata, 0xC001000000000000LL, 0) == 0 ibmvscsi_probe()
2322 atomic_read(&hostdata->request_limit) < 2;) { ibmvscsi_probe()
2328 if (atomic_read(&hostdata->request_limit) > 0) ibmvscsi_probe()
2332 dev_set_drvdata(&vdev->dev, hostdata); ibmvscsi_probe()
2336 scsi_remove_host(hostdata->host); ibmvscsi_probe()
2338 release_event_pool(&hostdata->pool, hostdata); ibmvscsi_probe()
2340 ibmvscsi_release_crq_queue(&hostdata->queue, hostdata, max_events); ibmvscsi_probe()
2342 kthread_stop(hostdata->work_thread); ibmvscsi_probe()
2344 unmap_persist_bufs(hostdata); ibmvscsi_probe()
2353 struct ibmvscsi_host_data *hostdata = dev_get_drvdata(&vdev->dev); ibmvscsi_remove() local
2354 unmap_persist_bufs(hostdata); ibmvscsi_remove()
2355 release_event_pool(&hostdata->pool, hostdata); ibmvscsi_remove()
2356 ibmvscsi_release_crq_queue(&hostdata->queue, hostdata, ibmvscsi_remove()
2359 kthread_stop(hostdata->work_thread); ibmvscsi_remove()
2360 srp_remove_host(hostdata->host); ibmvscsi_remove()
2361 scsi_remove_host(hostdata->host); ibmvscsi_remove()
2362 scsi_host_put(hostdata->host); ibmvscsi_remove()
2376 struct ibmvscsi_host_data *hostdata = dev_get_drvdata(dev); ibmvscsi_resume() local
2377 vio_disable_interrupts(to_vio_dev(hostdata->dev)); ibmvscsi_resume()
2378 tasklet_schedule(&hostdata->srp_task); ibmvscsi_resume()
152 ibmvscsi_release_crq_queue(struct crq_queue *queue, struct ibmvscsi_host_data *hostdata, int max_requests) ibmvscsi_release_crq_queue() argument
296 ibmvscsi_reset_crq_queue(struct crq_queue *queue, struct ibmvscsi_host_data *hostdata) ibmvscsi_reset_crq_queue() argument
337 ibmvscsi_init_crq_queue(struct crq_queue *queue, struct ibmvscsi_host_data *hostdata, int max_requests) ibmvscsi_init_crq_queue() argument
424 ibmvscsi_reenable_crq_queue(struct crq_queue *queue, struct ibmvscsi_host_data *hostdata) ibmvscsi_reenable_crq_queue() argument
453 initialize_event_pool(struct event_pool *pool, int size, struct ibmvscsi_host_data *hostdata) initialize_event_pool() argument
497 release_event_pool(struct event_pool *pool, struct ibmvscsi_host_data *hostdata) release_event_pool() argument
862 ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct, struct ibmvscsi_host_data *hostdata, unsigned long timeout) ibmvscsi_send_srp_event() argument
1761 ibmvscsi_handle_crq(struct viosrp_crq *crq, struct ibmvscsi_host_data *hostdata) ibmvscsi_handle_crq() argument
H A Dibmvscsi.h70 struct ibmvscsi_host_data *hostdata; member in struct:srp_event_struct
H A Dibmvfc.c1639 vfc_cmd->cancel_key = cpu_to_be32((unsigned long)cmnd->device->hostdata); ibmvfc_queuecommand_lck()
1985 tmf->cancel_key = cpu_to_be32((unsigned long)sdev->hostdata); ibmvfc_reset_device()
2190 tmf->cancel_key = cpu_to_be32((unsigned long)sdev->hostdata); ibmvfc_cancel_all()
2191 tmf->my_cancel_key = cpu_to_be32((unsigned long)starget->hostdata); ibmvfc_cancel_all()
2315 tmf->cancel_key = cpu_to_be32((unsigned long)sdev->hostdata); ibmvfc_abort_task_set()
2339 rc = ibmvfc_wait_for_ops(vhost, sdev->hostdata, ibmvfc_match_key); ibmvfc_abort_task_set()
2348 rc = ibmvfc_wait_for_ops(vhost, sdev->hostdata, ibmvfc_match_key); ibmvfc_abort_task_set()
2844 sdev->hostdata = (void *)(unsigned long)vhost->task_set++; ibmvfc_slave_alloc()
2866 starget->hostdata = (void *)(unsigned long)vhost->task_set++; ibmvfc_target_alloc()
/linux-4.1.27/drivers/scsi/arcmsr/
H A Darcmsr_attr.c71 struct AdapterControlBlock *acb = (struct AdapterControlBlock *) host->hostdata; arcmsr_sysfs_iop_message_read()
118 struct AdapterControlBlock *acb = (struct AdapterControlBlock *) host->hostdata; arcmsr_sysfs_iop_message_write()
166 struct AdapterControlBlock *acb = (struct AdapterControlBlock *) host->hostdata; arcmsr_sysfs_iop_message_clear()
274 (struct AdapterControlBlock *) host->hostdata; arcmsr_attr_host_driver_posted_cmd()
286 (struct AdapterControlBlock *) host->hostdata; arcmsr_attr_host_driver_reset()
298 (struct AdapterControlBlock *) host->hostdata; arcmsr_attr_host_driver_abort()
310 (struct AdapterControlBlock *) host->hostdata; arcmsr_attr_host_fw_model()
322 (struct AdapterControlBlock *) host->hostdata; arcmsr_attr_host_fw_version()
335 (struct AdapterControlBlock *) host->hostdata; arcmsr_attr_host_fw_request_len()
348 (struct AdapterControlBlock *) host->hostdata; arcmsr_attr_host_fw_numbers_queue()
361 (struct AdapterControlBlock *) host->hostdata; arcmsr_attr_host_fw_sdram_size()
374 (struct AdapterControlBlock *) host->hostdata; arcmsr_attr_host_fw_hd_channels()
H A Darcmsr_hba.c712 acb = (struct AdapterControlBlock *) host->hostdata; arcmsr_probe()
817 (struct AdapterControlBlock *)host->hostdata; arcmsr_suspend()
837 (struct AdapterControlBlock *)host->hostdata; arcmsr_resume()
1224 (struct AdapterControlBlock *) host->hostdata; arcmsr_remove()
1270 (struct AdapterControlBlock *)host->hostdata; arcmsr_shutdown()
2540 struct AdapterControlBlock *acb = (struct AdapterControlBlock *) host->hostdata; arcmsr_queue_command_lck()
3747 acb = (struct AdapterControlBlock *) cmd->device->host->hostdata; arcmsr_bus_reset()
3950 (struct AdapterControlBlock *)cmd->device->host->hostdata; arcmsr_abort()
3988 (struct AdapterControlBlock *) host->hostdata; arcmsr_info()
/linux-4.1.27/drivers/scsi/pcmcia/
H A Dnsp_message.c14 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; nsp_message_in()
55 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; nsp_message_out()
H A Dnsp_cs.c180 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; nsp_scsi_done()
195 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; nsp_queuecommand_lck()
370 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; nsphw_start_selection()
450 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; nsp_analyze_sdtr()
507 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; nsp_start_timer()
583 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; nsp_xfer()
622 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; nsp_dataphase_bypass()
656 //nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; nsp_reselected()
722 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; nsp_pio_read()
821 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; nsp_pio_write()
919 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; nsp_nexus()
974 data = (nsp_hw_data *)info->host->hostdata; nspintr()
1326 memcpy(host->hostdata, data_b, sizeof(nsp_hw_data)); nsp_detect()
1327 data = (nsp_hw_data *)host->hostdata; nsp_detect()
1333 nsp_dbg(NSP_DEBUG_INIT, "irq=%d,%d", data_b->IrqNumber, ((nsp_hw_data *)host->hostdata)->IrqNumber); nsp_detect()
1362 nsp_hw_data *data = (nsp_hw_data *)shpnt->hostdata; nsp_info()
1376 data = (nsp_hw_data *)host->hostdata; nsp_show_info()
1482 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; nsp_eh_bus_reset()
1491 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; nsp_eh_host_reset()
1659 data = (nsp_hw_data *)info->host->hostdata; nsp_cs_release()
1691 data = (nsp_hw_data *)info->host->hostdata; nsp_cs_suspend()
1713 data = (nsp_hw_data *)info->host->hostdata; nsp_cs_resume()
H A Dsym53c500_cs.c361 (struct sym53c500_data *)dev->hostdata; SYM53C500_intr()
540 (struct sym53c500_data *)SChost->hostdata; SYM53C500_info()
555 (struct sym53c500_data *)SCpnt->device->host->hostdata; SYM53C500_queue_lck()
628 (struct sym53c500_data *)SHp->hostdata; SYM53C500_show_pio()
640 (struct sym53c500_data *)SHp->hostdata; SYM53C500_store_pio()
763 data = (struct sym53c500_data *)host->hostdata; SYM53C500_config()
/linux-4.1.27/drivers/scsi/arm/
H A Dpowertec.c104 struct powertec_info *info = (struct powertec_info *)host->hostdata; powertecscsi_terminator_ctl()
134 struct powertec_info *info = (struct powertec_info *)host->hostdata; powertecscsi_dma_setup()
175 struct powertec_info *info = (struct powertec_info *)host->hostdata; powertecscsi_dma_stop()
187 struct powertec_info *info = (struct powertec_info *)host->hostdata; powertecscsi_info()
244 info = (struct powertec_info *)host->hostdata; powertecscsi_show_info()
260 struct powertec_info *info = (struct powertec_info *)host->hostdata; powertecscsi_show_term()
328 info = (struct powertec_info *)host->hostdata; powertecscsi_probe()
404 struct powertec_info *info = (struct powertec_info *)host->hostdata; powertecscsi_remove()
H A Deesox.c123 struct eesoxscsi_info *info = (struct eesoxscsi_info *)host->hostdata; eesoxscsi_terminator_ctl()
161 struct eesoxscsi_info *info = (struct eesoxscsi_info *)host->hostdata; eesoxscsi_dma_setup()
356 struct eesoxscsi_info *info = (struct eesoxscsi_info *)host->hostdata; eesoxscsi_dma_pseudo()
372 struct eesoxscsi_info *info = (struct eesoxscsi_info *)host->hostdata; eesoxscsi_dma_stop()
384 struct eesoxscsi_info *info = (struct eesoxscsi_info *)host->hostdata; eesoxscsi_info()
429 info = (struct eesoxscsi_info *)host->hostdata; eesoxscsi_show_info()
445 struct eesoxscsi_info *info = (struct eesoxscsi_info *)host->hostdata; eesoxscsi_show_term()
454 struct eesoxscsi_info *info = (struct eesoxscsi_info *)host->hostdata; eesoxscsi_store_term()
520 info = (struct eesoxscsi_info *)host->hostdata; eesoxscsi_probe()
598 struct eesoxscsi_info *info = (struct eesoxscsi_info *)host->hostdata; eesoxscsi_remove()
H A Dcumana_2.c124 struct cumanascsi2_info *info = (struct cumanascsi2_info *)host->hostdata; cumanascsi_2_terminator_ctl()
160 struct cumanascsi2_info *info = (struct cumanascsi2_info *)host->hostdata; cumanascsi_2_dma_setup()
212 struct cumanascsi2_info *info = (struct cumanascsi2_info *)host->hostdata; cumanascsi_2_dma_pseudo()
285 struct cumanascsi2_info *info = (struct cumanascsi2_info *)host->hostdata; cumanascsi_2_dma_stop()
299 struct cumanascsi2_info *info = (struct cumanascsi2_info *)host->hostdata; cumanascsi_2_info()
343 info = (struct cumanascsi2_info *)host->hostdata; cumanascsi_2_show_info()
402 info = (struct cumanascsi2_info *)host->hostdata; cumanascsi2_probe()
476 struct cumanascsi2_info *info = (struct cumanascsi2_info *)host->hostdata; cumanascsi2_remove()
H A Darxescsi.c115 struct arxescsi_info *info = (struct arxescsi_info *)host->hostdata; arxescsi_dma_pseudo()
213 struct arxescsi_info *info = (struct arxescsi_info *)host->hostdata; arxescsi_info()
227 info = (struct arxescsi_info *)host->hostdata; arxescsi_show_info()
276 info = (struct arxescsi_info *)host->hostdata; arxescsi_probe()
H A Doak.c22 #define priv(host) ((struct NCR5380_hostdata *)(host)->hostdata)
H A Dfas216.c2202 FAS216_Info *info = (FAS216_Info *)SCpnt->device->host->hostdata; fas216_queue_command_lck()
2251 FAS216_Info *info = (FAS216_Info *)SCpnt->device->host->hostdata; fas216_internal_done()
2269 FAS216_Info *info = (FAS216_Info *)SCpnt->device->host->hostdata; fas216_noqueue_command_lck()
2419 FAS216_Info *info = (FAS216_Info *)SCpnt->device->host->hostdata; fas216_eh_abort()
2472 FAS216_Info *info = (FAS216_Info *)SCpnt->device->host->hostdata; fas216_eh_device_reset()
2553 FAS216_Info *info = (FAS216_Info *)SCpnt->device->host->hostdata; fas216_eh_bus_reset()
2653 FAS216_Info *info = (FAS216_Info *)SCpnt->device->host->hostdata; fas216_eh_host_reset()
2836 FAS216_Info *info = (FAS216_Info *)host->hostdata; fas216_init()
2881 FAS216_Info *info = (FAS216_Info *)host->hostdata; fas216_add()
2932 FAS216_Info *info = (FAS216_Info *)host->hostdata; fas216_remove()
2949 FAS216_Info *info = (FAS216_Info *)host->hostdata; fas216_release()
H A Dcumana_1.c22 #define priv(host) ((struct NCR5380_hostdata *)(host)->hostdata)
H A Dacornscsi.c2472 AS_Host *host = (AS_Host *)SCpnt->device->host->hostdata; acornscsi_queuecmd_lck()
2648 AS_Host *host = (AS_Host *) SCpnt->device->host->hostdata; acornscsi_abort()
2729 AS_Host *host = (AS_Host *)SCpnt->device->host->hostdata; acornscsi_bus_reset()
2799 host = (AS_Host *)instance->hostdata; acornscsi_show_info()
2911 ashost = (AS_Host *)host->hostdata; acornscsi_probe()
2964 AS_Host *ashost = (AS_Host *)host->hostdata; acornscsi_remove()
/linux-4.1.27/drivers/scsi/bfa/
H A Dbfad_attr.c39 im_port = (struct bfad_im_port_s *) shost->hostdata[0]; bfad_im_get_starget_port_id()
65 im_port = (struct bfad_im_port_s *) shost->hostdata[0]; bfad_im_get_starget_node_name()
91 im_port = (struct bfad_im_port_s *) shost->hostdata[0]; bfad_im_get_starget_port_name()
110 (struct bfad_im_port_s *) shost->hostdata[0]; bfad_im_get_host_port_id()
124 (struct bfad_im_port_s *) shost->hostdata[0]; bfad_im_get_host_port_type()
156 (struct bfad_im_port_s *) shost->hostdata[0]; bfad_im_get_host_port_state()
193 (struct bfad_im_port_s *) shost->hostdata[0]; bfad_im_get_host_active_fc4s()
212 (struct bfad_im_port_s *) shost->hostdata[0]; bfad_im_get_host_speed()
249 (struct bfad_im_port_s *) shost->hostdata[0]; bfad_im_get_host_fabric_name()
266 (struct bfad_im_port_s *) shost->hostdata[0]; bfad_im_get_stats()
317 (struct bfad_im_port_s *) shost->hostdata[0]; bfad_im_reset_stats()
362 (struct bfad_im_port_s *) shost->hostdata[0]; bfad_im_vport_create()
449 (struct bfad_im_port_s *) shost->hostdata[0]; bfad_im_issue_fc_host_lip()
717 (struct bfad_im_port_s *) shost->hostdata[0]; bfad_im_serial_num_show()
731 (struct bfad_im_port_s *) shost->hostdata[0]; bfad_im_model_show()
745 (struct bfad_im_port_s *) shost->hostdata[0]; bfad_im_model_desc_show()
825 (struct bfad_im_port_s *) shost->hostdata[0]; bfad_im_node_name_show()
839 (struct bfad_im_port_s *) shost->hostdata[0]; bfad_im_symbolic_name_show()
856 (struct bfad_im_port_s *) shost->hostdata[0]; bfad_im_hw_version_show()
877 (struct bfad_im_port_s *) shost->hostdata[0]; bfad_im_optionrom_version_show()
891 (struct bfad_im_port_s *) shost->hostdata[0]; bfad_im_fw_version_show()
905 (struct bfad_im_port_s *) shost->hostdata[0]; bfad_im_num_of_ports_show()
925 (struct bfad_im_port_s *) shost->hostdata[0]; bfad_im_num_of_discovered_ports_show()
H A Dbfad_im.c96 itnim_data = cmnd->device->hostdata; bfa_cb_ioim_done()
129 itnim_data = cmnd->device->hostdata; bfa_cb_ioim_good_comp()
183 (struct bfad_im_port_s *) shost->hostdata[0]; bfad_im_info()
204 (struct bfad_im_port_s *) shost->hostdata[0]; bfad_im_abort_handler()
292 (struct bfad_im_port_s *) shost->hostdata[0]; bfad_im_reset_lun_handler()
293 struct bfad_itnim_data_s *itnim_data = cmnd->device->hostdata; bfad_im_reset_lun_handler()
356 (struct bfad_im_port_s *) shost->hostdata[0]; bfad_im_reset_bus_handler()
404 sdev->hostdata = NULL; bfad_im_slave_destroy()
546 im_port->shost->hostdata[0] = (unsigned long)im_port; bfad_im_scsi_host_alloc()
973 sdev->hostdata = rport->dd_data; bfad_im_slave_alloc()
1194 (struct bfad_im_port_s *) cmnd->device->host->hostdata[0]; bfad_im_queuecommand_lck()
1196 struct bfad_itnim_data_s *itnim_data = cmnd->device->hostdata; bfad_im_queuecommand_lck()
H A Dbfad_bsg.c3136 (struct bfad_im_port_s *) job->shost->hostdata[0]; bfad_im_bsg_vendor_request()
3358 (struct bfad_im_port_s *) job->shost->hostdata[0]; bfad_im_bsg_els_ct_request()
/linux-4.1.27/drivers/usb/storage/
H A Duas.c108 err = uas_submit_urbs(cmnd, cmnd->device->hostdata, GFP_ATOMIC); uas_do_work()
122 struct uas_dev_info *devinfo = cmnd->device->hostdata; uas_add_work()
222 struct uas_dev_info *devinfo = (void *)cmnd->device->hostdata; uas_try_complete()
243 err = uas_submit_urbs(cmnd, cmnd->device->hostdata, GFP_ATOMIC); uas_xfer_data()
253 struct uas_dev_info *devinfo = (struct uas_dev_info *)shost->hostdata; uas_stat_cmplt()
348 struct uas_dev_info *devinfo = (void *)cmnd->device->hostdata; uas_data_cmplt()
496 struct uas_dev_info *devinfo = cmnd->device->hostdata; uas_submit_sense_urb()
596 struct uas_dev_info *devinfo = sdev->hostdata; uas_queuecommand_lck()
681 struct uas_dev_info *devinfo = (void *)cmnd->device->hostdata; uas_eh_abort_handler()
719 struct uas_dev_info *devinfo = sdev->hostdata; uas_eh_bus_reset_handler()
763 dev_to_shost(starget->dev.parent)->hostdata; uas_target_alloc()
774 (struct uas_dev_info *)sdev->host->hostdata; uas_slave_alloc()
776 sdev->hostdata = devinfo; uas_slave_alloc()
805 struct uas_dev_info *devinfo = sdev->hostdata; uas_slave_configure()
933 devinfo = (struct uas_dev_info *)shost->hostdata; uas_probe()
1022 struct uas_dev_info *devinfo = (struct uas_dev_info *)shost->hostdata; uas_pre_reset()
1047 struct uas_dev_info *devinfo = (struct uas_dev_info *)shost->hostdata; uas_post_reset()
1074 struct uas_dev_info *devinfo = (struct uas_dev_info *)shost->hostdata; uas_suspend()
1092 struct uas_dev_info *devinfo = (struct uas_dev_info *)shost->hostdata; uas_reset_resume()
1114 struct uas_dev_info *devinfo = (struct uas_dev_info *)shost->hostdata; uas_disconnect()
1142 struct uas_dev_info *devinfo = (struct uas_dev_info *)shost->hostdata; uas_shutdown()
H A Dusb.h168 return container_of((void *) us, struct Scsi_Host, hostdata); us_to_host()
171 return (struct us_data *) host->hostdata; host_to_us()
/linux-4.1.27/drivers/scsi/lpfc/
H A Dlpfc_attr.c122 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_enable_fip_show()
136 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_bg_info_show()
155 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_bg_guard_err_show()
167 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_bg_apptag_err_show()
179 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_bg_reftag_err_show()
216 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_serialnum_show()
239 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_temp_sensor_show()
257 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_modeldesc_show()
276 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_modelname_show()
295 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_programtype_show()
313 struct lpfc_vport *vport = (struct lpfc_vport *)shost->hostdata; lpfc_mlomgmt_show()
333 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_vportnum_show()
352 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_fwrev_show()
386 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_hdw_show()
407 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_option_rom_version_show()
434 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_link_state_show()
521 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_sli4_protocol_show()
550 struct lpfc_vport *vport = (struct lpfc_vport *)shost->hostdata; lpfc_oas_supported_show()
574 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_link_state_store()
609 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_num_discovered_ports_show()
632 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_issue_lip()
820 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_issue_reset()
1015 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_nport_evt_cnt_show()
1034 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_board_mode_show()
1068 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_board_mode_store()
1253 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_max_rpi_show()
1281 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_used_rpi_show()
1309 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_max_xri_show()
1337 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_used_xri_show()
1365 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_max_vpi_show()
1393 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_used_vpi_show()
1420 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_npiv_info_show()
1446 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_poll_show()
1471 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_poll_store()
1550 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_fips_level_show()
1569 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_fips_rev_show()
1588 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_dss_show()
1615 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_sriov_hw_max_virtfn_show()
1643 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;\
1671 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;\
1777 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;\
1810 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;\
1837 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;\
1935 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;\
2146 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_soft_wwn_enable_store()
2190 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_soft_wwpn_show()
2215 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_soft_wwpn_store()
2290 struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; lpfc_soft_wwnn_show()
2310 struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; lpfc_soft_wwnn_store()
2356 struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; lpfc_oas_tgt_show()
2380 struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; lpfc_oas_tgt_store()
2424 struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; lpfc_oas_vpt_show()
2448 struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; lpfc_oas_vpt_store()
2493 struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; lpfc_oas_lun_state_show()
2517 struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; lpfc_oas_lun_state_store()
2555 struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; lpfc_oas_lun_status_show()
2686 struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; lpfc_oas_lun_show()
2733 struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; lpfc_oas_lun_store()
2833 struct lpfc_hba *phba = ((struct lpfc_vport *) shost->hostdata)->phba; lpfc_iocb_hw_show()
2844 struct lpfc_hba *phba = ((struct lpfc_vport *) shost->hostdata)->phba; lpfc_txq_hw_show()
2857 struct lpfc_hba *phba = ((struct lpfc_vport *) shost->hostdata)->phba; lpfc_txcmplq_hw_show()
2899 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_nodev_tmo_show()
3265 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_topology_store()
3339 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_static_vport_show()
3378 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_stat_data_ctrl_store()
3532 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_stat_data_ctrl_show()
3616 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; sysfs_drvr_stat_data_read()
3707 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_link_speed_store()
3855 struct lpfc_vport *vport = (struct lpfc_vport *)shost->hostdata; lpfc_aer_support_store()
3971 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_aer_cleanup_state()
4038 struct lpfc_vport *vport = (struct lpfc_vport *)shost->hostdata; lpfc_sriov_nr_virtfn_store()
4145 struct lpfc_vport *vport = (struct lpfc_vport *)shost->hostdata; lpfc_request_firmware_upgrade_store()
4217 struct lpfc_vport *vport = (struct lpfc_vport *)shost->hostdata; lpfc_fcp_imax_store()
4306 struct lpfc_vport *vport = (struct lpfc_vport *)shost->hostdata; lpfc_fcp_cpu_map_show()
4930 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; sysfs_ctlreg_write()
4990 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; sysfs_ctlreg_read()
5157 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_get_host_port_id()
5170 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_get_host_port_type()
5202 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_get_host_port_state()
5245 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_get_host_speed()
5287 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_get_host_fabric_name()
5322 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_get_stats()
5449 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_reset_stats()
5538 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_get_node_by_target()
5634 struct lpfc_rport_data *rdata = rport->hostdata; \
H A Dlpfc_scsi.c74 struct lpfc_vport *vport = (struct lpfc_vport *)sdev->host->hostdata; lpfc_rport_data_from_scsi_device()
77 return ((struct lpfc_device_data *)sdev->hostdata)->rport_data; lpfc_rport_data_from_scsi_device()
79 return (struct lpfc_rport_data *)sdev->hostdata; lpfc_rport_data_from_scsi_device()
207 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_update_stats()
3345 scsi_cmnd->device->hostdata)->oas_enabled)
3491 scsi_cmnd->device->hostdata)->oas_enabled) lpfc_bg_scsi_prep_dma_buf_s4()
4395 struct lpfc_vport *vport = (struct lpfc_vport *) host->hostdata; lpfc_info()
4499 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_queuecommand()
4652 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_abort_handler()
5112 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_device_reset_handler()
5183 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_target_reset_handler()
5260 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_bus_reset_handler()
5351 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_host_reset_handler()
5392 struct lpfc_vport *vport = (struct lpfc_vport *) sdev->host->hostdata; lpfc_slave_alloc()
5434 sdev->hostdata = device_data; lpfc_slave_alloc()
5436 sdev->hostdata = rport->dd_data; lpfc_slave_alloc()
5498 struct lpfc_vport *vport = (struct lpfc_vport *) sdev->host->hostdata; lpfc_slave_configure()
5522 struct lpfc_vport *vport = (struct lpfc_vport *) sdev->host->hostdata; lpfc_slave_destroy()
5525 struct lpfc_device_data *device_data = sdev->hostdata; lpfc_slave_destroy()
5535 sdev->hostdata = NULL; lpfc_slave_destroy()
H A Dlpfc_bsg.c383 struct lpfc_vport *vport = (struct lpfc_vport *)job->shost->hostdata; lpfc_bsg_send_mgmt_cmd()
653 struct lpfc_vport *vport = (struct lpfc_vport *)job->shost->hostdata; lpfc_bsg_rport_els()
1194 struct lpfc_vport *vport = (struct lpfc_vport *)job->shost->hostdata; lpfc_bsg_hba_set_event()
1278 struct lpfc_vport *vport = (struct lpfc_vport *)job->shost->hostdata; lpfc_bsg_hba_get_event()
1610 struct lpfc_vport *vport = (struct lpfc_vport *)job->shost->hostdata; lpfc_bsg_send_mgmt_rsp()
2181 vport = (struct lpfc_vport *)job->shost->hostdata; lpfc_bsg_diag_loopback_mode()
2219 vport = (struct lpfc_vport *)job->shost->hostdata; lpfc_sli4_bsg_diag_mode_end()
2302 vport = (struct lpfc_vport *)job->shost->hostdata; lpfc_sli4_bsg_link_diag_test()
2989 struct lpfc_vport *vport = (struct lpfc_vport *)job->shost->hostdata; lpfc_bsg_diag_loopback_run()
3294 struct lpfc_vport *vport = (struct lpfc_vport *)job->shost->hostdata; lpfc_bsg_get_dfc_rev()
4891 struct lpfc_vport *vport = (struct lpfc_vport *)job->shost->hostdata; lpfc_bsg_mbox_cmd()
5045 struct lpfc_vport *vport = (struct lpfc_vport *)job->shost->hostdata; lpfc_menlo_cmd()
5303 struct lpfc_vport *vport = (struct lpfc_vport *)job->shost->hostdata; lpfc_bsg_timeout()
H A Dlpfc_init.c3294 vport = (struct lpfc_vport *) shost->hostdata; lpfc_create_port()
3423 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_scan_finished()
3474 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_host_attrib_init()
9676 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_pci_remove_one_s3()
9784 struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; lpfc_pci_suspend_one_s3()
9827 struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; lpfc_pci_resume_one_s3()
9973 struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; lpfc_io_error_detected_s3()
10019 struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; lpfc_io_slot_reset_s3()
10080 struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; lpfc_io_resume_s3()
10446 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; lpfc_pci_remove_one_s4()
10533 struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; lpfc_pci_suspend_one_s4()
10577 struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; lpfc_pci_resume_one_s4()
10722 struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; lpfc_io_error_detected_s4()
10768 struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; lpfc_io_slot_reset_s4()
10824 struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; lpfc_io_resume_s4()
10896 struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; lpfc_pci_remove_one()
10932 struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; lpfc_pci_suspend_one()
10968 struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; lpfc_pci_resume_one()
11006 struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; lpfc_io_error_detected()
11043 struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; lpfc_io_slot_reset()
11076 struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; lpfc_io_resume()
H A Dlpfc_vport.c295 struct lpfc_vport *pport = (struct lpfc_vport *) shost->hostdata; lpfc_vport_create()
H A Dlpfc.h999 return container_of((void *) vport, struct Scsi_Host, hostdata[0]); lpfc_shost_from_vport()
/linux-4.1.27/drivers/scsi/aacraid/
H A Dlinit.c272 struct aac_dev *dev = (struct aac_dev *)shost->hostdata; aac_info()
404 struct aac_dev *aac = (struct aac_dev *)sdev->host->hostdata; aac_slave_configure()
500 struct aac_dev *aac = (struct aac_dev *)(sdev->host->hostdata); aac_show_raid_level()
524 struct aac_dev *dev = (struct aac_dev *)sdev->host->hostdata; aac_ioctl()
534 struct aac_dev * aac = (struct aac_dev *)host->hostdata; aac_eh_abort()
591 struct aac_dev * aac = (struct aac_dev *)host->hostdata; aac_eh_reset()
759 struct aac_dev *dev = (struct aac_dev *)sdev->host->hostdata; aac_compat_ioctl()
776 struct aac_dev *dev = (struct aac_dev*)class_to_shost(device)->hostdata; aac_show_model()
795 struct aac_dev *dev = (struct aac_dev*)class_to_shost(device)->hostdata; aac_show_vendor()
815 struct aac_dev *dev = (struct aac_dev*)class_to_shost(cdev)->hostdata; aac_show_flags()
841 struct aac_dev *dev = (struct aac_dev*)class_to_shost(device)->hostdata; aac_show_kernel_version()
855 struct aac_dev *dev = (struct aac_dev*)class_to_shost(device)->hostdata; aac_show_monitor_version()
869 struct aac_dev *dev = (struct aac_dev*)class_to_shost(device)->hostdata; aac_show_bios_version()
882 struct aac_dev *dev = (struct aac_dev*)class_to_shost(device)->hostdata; aac_show_serial_number()
921 retval = aac_reset_adapter((struct aac_dev*)class_to_shost(device)->hostdata, buf[0] == '!'); aac_store_reset_adapter()
931 struct aac_dev *dev = (struct aac_dev*)class_to_shost(device)->hostdata; aac_show_reset_adapter()
1174 aac = (struct aac_dev *)shost->hostdata; aac_probe_one()
1324 __aac_shutdown((struct aac_dev *)shost->hostdata); aac_shutdown()
1330 struct aac_dev *aac = (struct aac_dev *)shost->hostdata; aac_remove_one()
H A Daachba.c558 dev = (struct aac_dev *)scsicmd->device->host->hostdata; aac_get_container_name()
595 struct fsa_dev_info *fsa_dev_ptr = ((struct aac_dev *)(scsicmd->device->host->hostdata))->fsa_dev; aac_probe_container_callback2()
714 if ((fibptr = aac_fib_alloc((struct aac_dev *)scsicmd->device->host->hostdata))) { _aac_probe_container()
752 struct fsa_dev_info *fsa_dev_ptr = ((struct aac_dev *)(scsicmd->device->host->hostdata))->fsa_dev; _aac_probe_container()
1041 dev = (struct aac_dev *)scsicmd->device->host->hostdata; aac_get_container_serial()
1886 dev = (struct aac_dev *)scsicmd->device->host->hostdata; aac_read()
1993 dev = (struct aac_dev *)scsicmd->device->host->hostdata; aac_write()
2205 aac = (struct aac_dev *)sdev->host->hostdata; aac_synchronize()
2272 struct aac_dev *aac = (struct aac_dev *)sdev->host->hostdata; aac_start_stop()
2340 struct aac_dev *dev = (struct aac_dev *)host->hostdata; aac_scsi_cmd()
3164 dev = (struct aac_dev *)scsicmd->device->host->hostdata; aac_send_srb_fib()
3201 dev = (struct aac_dev *)scsicmd->device->host->hostdata; aac_build_sg()
3245 dev = (struct aac_dev *)scsicmd->device->host->hostdata; aac_build_sg64()
/linux-4.1.27/drivers/staging/i2o/
H A Di2o_scsi.c138 i2o_shost = (struct i2o_scsi_host *)scsi_host->hostdata; i2o_scsi_host_alloc()
192 if (scsi_dev->hostdata == i2o_dev) { i2o_scsi_remove()
323 struct i2o_scsi_host *hostdata; i2o_scsi_info() local
324 hostdata = (struct i2o_scsi_host *)SChost->hostdata; i2o_scsi_info()
325 return hostdata->iop->name; i2o_scsi_info()
528 i2o_dev = SCpnt->device->hostdata; i2o_scsi_queuecommand_lck()
714 i2o_dev = SCpnt->device->hostdata; i2o_scsi_abort()
/linux-4.1.27/drivers/staging/rts5208/
H A Drtsx.h142 return container_of((void *) dev, struct Scsi_Host, hostdata); rtsx_to_host()
146 return (struct rtsx_dev *) host->hostdata; host_to_rtsx()
/linux-4.1.27/drivers/message/fusion/
H A Dmptfc.c218 if (ready == DID_NO_CONNECT || !SCpnt->device->hostdata mptfc_block_error_handler()
225 ioc->active, SCpnt->device->hostdata)); mptfc_block_error_handler()
480 vtarget = ri->starget->hostdata; mptfc_register_dev()
528 kfree(starget->hostdata); mptfc_target_destroy()
529 starget->hostdata = NULL; mptfc_target_destroy()
548 starget->hostdata = vtarget; mptfc_target_alloc()
563 starget->hostdata = NULL; mptfc_target_alloc()
631 sdev->hostdata = vdevice; mptfc_slave_alloc()
632 vtarget = starget->hostdata; mptfc_slave_alloc()
656 VirtDevice *vdevice = SCpnt->device->hostdata; mptfc_qcmd()
1105 vtarget = starget->hostdata; mptfc_setup_reset()
1160 vtarget = starget->hostdata; mptfc_rescan_devices()
H A Dmptspi.c422 starget->hostdata = vtarget; mptspi_target_alloc()
464 kfree(starget->hostdata); mptspi_target_destroy()
465 starget->hostdata = NULL; mptspi_target_destroy()
691 VirtTarget *vtarget = scsi_target(sdev)->hostdata; mptspi_dv_device()
741 sdev->hostdata = vdevice; mptspi_slave_alloc()
744 vtarget = starget->hostdata; mptspi_slave_alloc()
757 VirtTarget *vtarget = scsi_target(sdev)->hostdata; mptspi_slave_configure()
785 VirtDevice *vdevice = SCpnt->device->hostdata; mptspi_qcmd()
810 VirtTarget *vtarget = starget->hostdata; mptspi_slave_destroy()
811 VirtDevice *vdevice = sdev->hostdata; mptspi_slave_destroy()
1070 VirtTarget *vtarget = starget->hostdata; mptspi_write_qas()
1136 VirtTarget *vtarget = starget->hostdata; shost_for_each_device()
1200 (struct _MPT_SCSI_HOST *)dev_to_shost(starget->dev.parent)->hostdata; mptspi_deny_binding()
H A Dmptscsih.c633 VirtDevice *vdevice = sc->device->hostdata; mptscsih_io_done()
729 vdevice = sc->device->hostdata; mptscsih_io_done()
750 sc->device->hostdata; mptscsih_io_done()
1318 VirtDevice *vdevice = SCpnt->device->hostdata; mptscsih_qcmd()
1712 vdevice = SCpnt->device->hostdata; mptscsih_abort()
1830 vdevice = SCpnt->device->hostdata; mptscsih_dev_reset()
1893 vdevice = SCpnt->device->hostdata; mptscsih_bus_reset()
2297 vtarget = starget->hostdata; mptscsih_slave_destroy()
2298 vdevice = sdev->hostdata; mptscsih_slave_destroy()
2306 sdev->hostdata = NULL; mptscsih_slave_destroy()
2327 vtarget = starget->hostdata; mptscsih_change_queue_depth()
2366 vtarget = starget->hostdata; mptscsih_slave_configure()
2367 vdevice = sdev->hostdata; mptscsih_slave_configure()
2421 vdevice = sc->device->hostdata; mptscsih_copy_sense_data()
H A Dmptsas.c367 return ((MPT_SCSI_HOST *)shost->hostdata)->ioc; phy_to_ioc()
373 return ((MPT_SCSI_HOST *)shost->hostdata)->ioc; rphy_to_ioc()
764 vtarget = starget->hostdata; mptsas_add_device_component_starget()
973 vdevice = sdev->hostdata; mptsas_find_vtarget()
1691 VirtDevice *vdevice = sdev->hostdata; mptsas_slave_configure()
1789 starget->hostdata = vtarget; mptsas_target_alloc()
1804 if (!starget->hostdata) mptsas_target_destroy()
1807 vtarget = starget->hostdata; mptsas_target_destroy()
1837 kfree(starget->hostdata); mptsas_target_destroy()
1838 starget->hostdata = NULL; mptsas_target_destroy()
1861 vdevice->vtarget = starget->hostdata; mptsas_slave_alloc()
1892 sdev->hostdata = vdevice; mptsas_slave_alloc()
1901 VirtDevice *vdevice = SCpnt->device->hostdata; mptsas_qcmd()
1958 vdevice = sc->device->hostdata; mptsas_eh_timed_out()
2216 MPT_ADAPTER *ioc = ((MPT_SCSI_HOST *) shost->hostdata)->ioc; mptsas_smp_handler()
3750 vdevice = sdev->hostdata; mptsas_send_link_status_event()
4446 vtarget = starget->hostdata; mptsas_hotplug_work()
4505 vtarget = starget->hostdata; mptsas_hotplug_work()
4666 vdevice = sdev->hostdata; mptsas_send_raid_event()
4881 vdevice = sc->device->hostdata; mptsas_broadcast_primative_work()
H A Dmptctl.c1335 vdevice = sdev->hostdata; mptctl_getiocinfo()
1458 vdevice = sdev->hostdata; mptctl_gettargetinfo()
1982 VirtTarget *vtarget = starget->hostdata; mptctl_do_mpt_command()
/linux-4.1.27/drivers/scsi/libsas/
H A Dsas_init.c453 kfree(phy->hostdata); sas_phy_release()
454 phy->hostdata = NULL; sas_phy_release()
482 phy->hostdata = d; sas_phy_setup()
491 struct sas_phy_data *d = phy->hostdata; queue_phy_reset()
518 struct sas_phy_data *d = phy->hostdata; queue_phy_enable()
H A Dsas_scsi_host.c861 starget->hostdata = found_dev; sas_target_alloc()
955 struct domain_device *found_dev = starget->hostdata; sas_target_destroy()
960 starget->hostdata = NULL; sas_target_destroy()
/linux-4.1.27/drivers/s390/scsi/
H A Dzfcp_scsi.c114 (struct zfcp_adapter *) sdev->host->hostdata[0]; zfcp_scsi_slave_alloc()
153 (struct zfcp_adapter *) scsi_host->hostdata[0]; zfcp_scsi_eh_abort_handler()
337 adapter->scsi_host->hostdata[0] = (unsigned long) adapter; zfcp_scsi_adapter_register()
451 adapter = (struct zfcp_adapter *)host->hostdata[0]; zfcp_get_fc_host_stats()
484 adapter = (struct zfcp_adapter *)shost->hostdata[0]; zfcp_reset_fc_host_stats()
503 (struct zfcp_adapter *)shost->hostdata[0]; zfcp_get_host_port_state()
537 (struct zfcp_adapter *)shost->hostdata[0]; zfcp_scsi_terminate_rport_io()
H A Dzfcp_sysfs.c530 adapter = (struct zfcp_adapter *) scsi_host->hostdata[0]; zfcp_sysfs_adapter_util_show()
555 adapter = (struct zfcp_adapter *) scsi_host->hostdata[0]; zfcp_sysfs_adapter_ex_config()
606 ((struct zfcp_adapter *) scsi_host->hostdata[0])->qdio; zfcp_sysfs_adapter_q_full_show()
H A Dzfcp_dbf.h318 scmd->device->host->hostdata[0]; _zfcp_dbf_scsi()
H A Dzfcp_dbf.c405 (struct zfcp_adapter *) sc->device->host->hostdata[0]; zfcp_dbf_scsi()
H A Dzfcp_fc.c907 adapter = (struct zfcp_adapter *) job->shost->hostdata[0]; zfcp_fc_job_wka_port()
988 adapter = (struct zfcp_adapter *)shost->hostdata[0]; zfcp_fc_exec_bsg_job()
/linux-4.1.27/drivers/staging/unisys/virthba/
H A Dvirthba.c499 virthbainfo = (struct virthba_info *)scsihost->hostdata; virthba_probe()
581 virthbainfo = (struct virthba_info *)scsihost->hostdata; virthba_remove()
602 (struct virthba_info *)scsihost->hostdata; forward_vdiskmgmt_command()
655 (struct virthba_info *)scsidev->host->hostdata; forward_taskmgmt_command()
708 for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head; virthba_abort_handler()
734 for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head; virthba_bus_reset_handler()
760 for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head; virthba_device_reset_handler()
816 (struct virthba_info *)scsihost->hostdata; virthba_queue_command_lck()
925 virthbainfo = (struct virthba_info *)scsihost->hostdata; virthba_slave_alloc()
964 virthbainfo = (struct virthba_info *)scsihost->hostdata; virthba_slave_destroy()
1000 for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head; do_scsi_linuxstat()
1062 vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head; do_scsi_nolinuxstat()
1319 scsihost)->hostdata; virthba_serverup()
1416 scsihost)->hostdata; virthba_serverdown()
/linux-4.1.27/drivers/scsi/aic7xxx/
H A Daic79xx_osm.c559 ahd = *(struct ahd_softc **)host->hostdata; ahd_linux_info()
582 ahd = *(struct ahd_softc **)cmd->device->host->hostdata; ahd_linux_queue_lck()
597 *((struct ahd_softc **)dev_to_shost(&starget->dev)->hostdata); ahd_linux_target_in_softc()
611 *((struct ahd_softc **)dev_to_shost(&starget->dev)->hostdata); ahd_linux_target_alloc()
675 *((struct ahd_softc **)sdev->host->hostdata); ahd_linux_slave_alloc()
705 ahd = *((struct ahd_softc **)sdev->host->hostdata); ahd_linux_slave_configure()
734 ahd = *((struct ahd_softc **)sdev->host->hostdata); ahd_linux_biosparam()
798 ahd = *(struct ahd_softc **)cmd->device->host->hostdata; ahd_linux_dev_reset()
886 ahd = *(struct ahd_softc **)cmd->device->host->hostdata; ahd_linux_bus_reset()
1238 *((struct ahd_softc **)host->hostdata) = ahd; ahd_linux_register_host()
1533 struct ahd_softc *ahd = *((struct ahd_softc **)sdev->host->hostdata); ahd_linux_device_queue_depth()
2170 ahd = *(struct ahd_softc **)cmd->device->host->hostdata; ahd_linux_queue_abort_cmd()
2391 struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata); ahd_linux_set_width()
2405 struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata); ahd_linux_set_period()
2458 struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata); ahd_linux_set_offset()
2493 struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata); ahd_linux_set_dt()
2535 struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata); ahd_linux_set_qas()
2574 struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata); ahd_linux_set_iu()
2614 struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata); ahd_linux_set_rd_strm()
2650 struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata); ahd_linux_set_wr_flow()
2686 struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata); ahd_linux_set_rti()
2730 struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata); ahd_linux_set_pcomp_en()
2780 struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata); ahd_linux_set_hold_mcs()
2809 struct ahd_softc *ahd = *(struct ahd_softc **)shost->hostdata; ahd_linux_get_signalling()
H A Daic7xxx_proc.c190 struct ahc_softc *ahc = *(struct ahc_softc **)shost->hostdata; ahc_proc_write_seeprom()
291 struct ahc_softc *ahc = *(struct ahc_softc **)shost->hostdata; ahc_linux_show_info()
H A Daic79xx_proc.c210 struct ahd_softc *ahd = *(struct ahd_softc **)shost->hostdata; ahd_proc_write_seeprom()
276 struct ahd_softc *ahd = *(struct ahd_softc **)shost->hostdata; ahd_linux_show_info()
H A Daic7xxx_osm.c503 ahc = *(struct ahc_softc **)host->hostdata; ahc_linux_info()
528 ahc = *(struct ahc_softc **)cmd->device->host->hostdata; ahc_linux_queue_lck()
547 *((struct ahc_softc **)dev_to_shost(&starget->dev)->hostdata); ahc_linux_target_in_softc()
561 *((struct ahc_softc **)dev_to_shost(&starget->dev)->hostdata); ahc_linux_target_alloc()
643 *((struct ahc_softc **)sdev->host->hostdata); ahc_linux_slave_alloc()
676 ahc = *((struct ahc_softc **)sdev->host->hostdata); ahc_linux_slave_configure()
707 ahc = *((struct ahc_softc **)sdev->host->hostdata); ahc_linux_biosparam()
778 ahc = *(struct ahc_softc **)cmd->device->host->hostdata; ahc_linux_bus_reset()
1102 *((struct ahc_softc **)host->hostdata) = ahc; ahc_linux_register_host()
1399 struct ahc_softc *ahc = *((struct ahc_softc **)sdev->host->hostdata); ahc_linux_device_queue_depth()
2074 ahc = *(struct ahc_softc **)cmd->device->host->hostdata; ahc_linux_queue_recovery_cmd()
2341 struct ahc_softc *ahc = *((struct ahc_softc **)shost->hostdata); ahc_linux_set_width()
2355 struct ahc_softc *ahc = *((struct ahc_softc **)shost->hostdata); ahc_linux_set_period()
2399 struct ahc_softc *ahc = *((struct ahc_softc **)shost->hostdata); ahc_linux_set_offset()
2427 struct ahc_softc *ahc = *((struct ahc_softc **)shost->hostdata); ahc_linux_set_dt()
2465 struct ahc_softc *ahc = *((struct ahc_softc **)shost->hostdata);
2493 struct ahc_softc *ahc = *((struct ahc_softc **)shost->hostdata);
2521 struct ahc_softc *ahc = *(struct ahc_softc **)shost->hostdata; ahc_linux_get_signalling()
/linux-4.1.27/arch/powerpc/platforms/powermac/
H A Dlow_i2c.c86 void *hostdata; member in struct:pmac_i2c_bus
388 struct pmac_i2c_host_kw *host = bus->hostdata; kw_i2c_open()
395 struct pmac_i2c_host_kw *host = bus->hostdata; kw_i2c_close()
402 struct pmac_i2c_host_kw *host = bus->hostdata; kw_i2c_xfer()
583 bus->hostdata = host; kw_i2c_add()
679 struct adb_request *req = bus->hostdata; pmu_i2c_xfer()
815 bus->hostdata = bus + 1; pmu_i2c_probe()
844 struct smu_i2c_cmd *cmd = bus->hostdata; smu_i2c_xfer()
938 bus->hostdata = bus + 1; smu_i2c_probe()
/linux-4.1.27/drivers/scsi/mpt3sas/
H A Dmpt3sas_scsih.c1078 sas_device_priv_data = sdev->hostdata; _scsih_change_queue_depth()
1126 starget->hostdata = sas_target_priv_data; _scsih_target_alloc()
1185 sas_target_priv_data = starget->hostdata; _scsih_target_destroy()
1214 starget->hostdata = NULL; _scsih_target_destroy()
1245 sas_target_priv_data = starget->hostdata; _scsih_slave_alloc()
1248 sdev->hostdata = sas_device_priv_data; _scsih_slave_alloc()
1295 if (!sdev->hostdata) _scsih_slave_destroy()
1299 sas_target_priv_data = starget->hostdata; _scsih_slave_destroy()
1314 kfree(sdev->hostdata); _scsih_slave_destroy()
1315 sdev->hostdata = NULL; _scsih_slave_destroy()
1639 sas_device_priv_data = sdev->hostdata; _scsih_slave_configure()
1940 sas_device_priv_data = sdev->hostdata; mpt3sas_scsih_set_tm_flag()
1968 sas_device_priv_data = sdev->hostdata; mpt3sas_scsih_clear_tm_flag()
2159 struct MPT3SAS_TARGET *priv_target = starget->hostdata; _scsih_tm_display_info()
2220 sas_device_priv_data = scmd->device->hostdata; _scsih_abort()
2280 sas_device_priv_data = scmd->device->hostdata; _scsih_dev_reset()
2340 sas_device_priv_data = scmd->device->hostdata; _scsih_target_reset()
2567 sas_device_priv_data = sdev->hostdata; _scsih_ublock_io_all_device()
2596 sas_device_priv_data = sdev->hostdata; _scsih_ublock_io_device()
2623 sas_device_priv_data = sdev->hostdata; _scsih_block_io_all_device()
2649 sas_device_priv_data = sdev->hostdata; _scsih_block_io_device()
2797 sas_device->starget->hostdata) { _scsih_tm_tr_send()
2798 sas_target_priv_data = sas_device->starget->hostdata; _scsih_tm_tr_send()
3209 raid_device->starget->hostdata) { _scsih_set_volume_delete_flag()
3211 raid_device->starget->hostdata; _scsih_set_volume_delete_flag()
3531 sas_device_priv_data = scmd->device->hostdata; _scsih_qcmd()
3690 struct MPT3SAS_TARGET *priv_target = starget->hostdata; _scsih_scsi_ioc_info()
3995 sas_target_priv_data = starget->hostdata; _scsih_smart_predicted_fault()
4072 sas_device_priv_data = scmd->device->hostdata; _scsih_io_done()
4785 sas_target_priv_data = starget->hostdata; _scsih_check_device()
4947 if (sas_device->starget && sas_device->starget->hostdata) { _scsih_remove_device()
4948 sas_target_priv_data = sas_device->starget->hostdata; _scsih_remove_device()
5302 target_priv_data = sas_device->starget->hostdata; _scsih_sas_device_status_change_event()
5432 sas_device_priv_data = sdev->hostdata; _scsih_sas_broadcast_primitive_event()
5763 sas_target_priv_data = starget->hostdata; _scsih_sas_volume_delete()
5801 if (sas_device->starget && sas_device->starget->hostdata) { _scsih_sas_pd_expose()
5803 sas_target_priv_data = starget->hostdata; _scsih_sas_pd_expose()
5846 if (sas_device->starget && sas_device->starget->hostdata) { _scsih_sas_pd_hide()
5848 sas_target_priv_data = starget->hostdata; _scsih_sas_pd_hide()
6351 sas_device_priv_data = sdev->hostdata; _scsih_prep_device_scan()
6384 if (starget && starget->hostdata) { _scsih_mark_responding_sas_device()
6385 sas_target_priv_data = starget->hostdata; _scsih_mark_responding_sas_device()
6482 if (starget && starget->hostdata) { _scsih_mark_responding_raid_device()
6483 sas_target_priv_data = starget->hostdata; _scsih_mark_responding_raid_device()
7440 raid_device->starget->hostdata; _scsih_remove()
H A Dmpt3sas_base.h204 * struct MPT3SAS_TARGET - starget private hostdata
231 * struct MPT3SAS_DEVICE - sdev private hostdata
232 * @sas_target: starget private hostdata
H A Dmpt3sas_ctl.c564 scmd->device->hostdata == NULL) _ctl_set_task_mid()
568 priv_data = scmd->device->hostdata; _ctl_set_task_mid()
3187 struct MPT3SAS_DEVICE *sas_device_priv_data = sdev->hostdata; _ctl_device_sas_address_show()
3208 struct MPT3SAS_DEVICE *sas_device_priv_data = sdev->hostdata; _ctl_device_handle_show()
/linux-4.1.27/drivers/scsi/esas2r/
H A Desas2r_main.c65 return (struct esas2r_adapter *)host->hostdata; esas2r_adapter_from_kobj()
399 memset(host->hostdata, 0, host_alloc_size); esas2r_probe()
401 a = (struct esas2r_adapter *)host->hostdata; esas2r_probe()
444 host->hostdata); esas2r_probe()
679 return esas2r_ioctl_handler(esas2r_proc_host->hostdata, esas2r_proc_ioctl()
704 struct esas2r_adapter *a = (struct esas2r_adapter *)sh->hostdata; esas2r_show_info()
771 struct esas2r_adapter *a = (struct esas2r_adapter *)sh->hostdata; esas2r_info()
881 (struct esas2r_adapter *)cmd->device->host->hostdata; esas2r_queuecommand()
1042 (struct esas2r_adapter *)cmd->device->host->hostdata; esas2r_eh_abort()
1129 (struct esas2r_adapter *)cmd->device->host->hostdata; esas2r_host_bus_reset()
1171 (struct esas2r_adapter *)cmd->device->host->hostdata; esas2r_dev_targ_reset()
H A Desas2r_init.c284 a = (struct esas2r_adapter *)host->hostdata; esas2r_init_adapter()
679 a = (struct esas2r_adapter *)host->hostdata; esas2r_cleanup()
689 struct esas2r_adapter *a = (struct esas2r_adapter *)host->hostdata; esas2r_suspend()
713 struct esas2r_adapter *a = (struct esas2r_adapter *)host->hostdata; esas2r_resume()
H A Desas2r_ioctl.c1277 int esas2r_ioctl_handler(void *hostdata, int cmd, void __user *arg) esas2r_ioctl_handler() argument
1285 esas2r_log(ESAS2R_LOG_DEBG, "ioctl (%p, %x, %p)", hostdata, cmd, arg); esas2r_ioctl_handler()
1361 a = (struct esas2r_adapter *)hostdata; esas2r_ioctl_handler()
1554 return esas2r_ioctl_handler(sd->host->hostdata, cmd, arg); esas2r_ioctl()
H A Desas2r.h969 int esas2r_ioctl_handler(void *hostdata, int cmd, void __user *arg);
/linux-4.1.27/drivers/firewire/
H A Dsbp2.c713 container_of((void *)tgt, struct Scsi_Host, hostdata[0]); sbp2_conditionally_block()
737 container_of((void *)tgt, struct Scsi_Host, hostdata[0]); sbp2_conditionally_unblock()
760 container_of((void *)tgt, struct Scsi_Host, hostdata[0]); sbp2_unblock()
875 shost = container_of((void *)tgt, struct Scsi_Host, hostdata[0]); sbp2_login()
1155 tgt = (struct sbp2_target *)shost->hostdata; sbp2_probe()
1233 container_of((void *)tgt, struct Scsi_Host, hostdata[0]); sbp2_remove()
1461 struct sbp2_logical_unit *lu = cmd->device->hostdata; sbp2_scsi_queuecommand()
1510 struct sbp2_logical_unit *lu = sdev->hostdata; sbp2_scsi_slave_alloc()
1532 struct sbp2_logical_unit *lu = sdev->hostdata; sbp2_scsi_slave_configure()
1564 struct sbp2_logical_unit *lu = cmd->device->hostdata; sbp2_scsi_abort()
1589 lu = sdev->hostdata; sbp2_sysfs_ieee1394_id_show()
/linux-4.1.27/drivers/scsi/mpt2sas/
H A Dmpt2sas_scsih.c1203 sas_device_priv_data = sdev->hostdata; _scsih_change_queue_depth()
1250 starget->hostdata = sas_target_priv_data; _scsih_target_alloc()
1309 sas_target_priv_data = starget->hostdata; _scsih_target_destroy()
1338 starget->hostdata = NULL; _scsih_target_destroy()
1369 sas_target_priv_data = starget->hostdata; _scsih_slave_alloc()
1372 sdev->hostdata = sas_device_priv_data; _scsih_slave_alloc()
1419 if (!sdev->hostdata) _scsih_slave_destroy()
1423 sas_target_priv_data = starget->hostdata; _scsih_slave_destroy()
1438 kfree(sdev->hostdata); _scsih_slave_destroy()
1439 sdev->hostdata = NULL; _scsih_slave_destroy()
1972 sas_device_priv_data = sdev->hostdata; _scsih_slave_configure()
2273 sas_device_priv_data = sdev->hostdata; mpt2sas_scsih_set_tm_flag()
2301 sas_device_priv_data = sdev->hostdata; mpt2sas_scsih_clear_tm_flag()
2493 struct MPT2SAS_TARGET *priv_target = starget->hostdata; _scsih_tm_display_info()
2556 sas_device_priv_data = scmd->device->hostdata; _scsih_abort()
2618 sas_device_priv_data = scmd->device->hostdata; _scsih_dev_reset()
2678 sas_device_priv_data = scmd->device->hostdata; _scsih_target_reset()
2882 sas_device_priv_data = sdev->hostdata; _scsih_ublock_io_all_device()
2908 sas_device_priv_data = sdev->hostdata; _scsih_ublock_io_device()
2939 sas_device_priv_data = sdev->hostdata; _scsih_block_io_all_device()
2967 sas_device_priv_data = sdev->hostdata; _scsih_block_io_device()
3115 sas_device->starget->hostdata) { _scsih_tm_tr_send()
3116 sas_target_priv_data = sas_device->starget->hostdata; _scsih_tm_tr_send()
3515 raid_device->starget->hostdata) { _scsih_set_volume_delete_flag()
3517 raid_device->starget->hostdata; _scsih_set_volume_delete_flag()
3909 sas_device_priv_data = scmd->device->hostdata; _scsih_qcmd()
4073 struct MPT2SAS_TARGET *priv_target = starget->hostdata; _scsih_scsi_ioc_info()
4379 sas_target_priv_data = starget->hostdata; _scsih_smart_predicted_fault()
4457 sas_device_priv_data = scmd->device->hostdata; _scsih_io_done()
5163 sas_target_priv_data = starget->hostdata; _scsih_check_device()
5326 if (sas_device->starget && sas_device->starget->hostdata) { _scsih_remove_device()
5327 sas_target_priv_data = sas_device->starget->hostdata; _scsih_remove_device()
5727 target_priv_data = sas_device->starget->hostdata; _scsih_sas_device_status_change_event()
5856 sas_device_priv_data = sdev->hostdata; _scsih_sas_broadcast_primitive_event()
6093 sas_target_priv_data = starget->hostdata; _scsih_sas_volume_delete()
6131 if (sas_device->starget && sas_device->starget->hostdata) { _scsih_sas_pd_expose()
6133 sas_target_priv_data = starget->hostdata; _scsih_sas_pd_expose()
6176 if (sas_device->starget && sas_device->starget->hostdata) { _scsih_sas_pd_hide()
6178 sas_target_priv_data = starget->hostdata; _scsih_sas_pd_hide()
6682 sas_device_priv_data = sdev->hostdata; _scsih_prep_device_scan()
6715 if (starget && starget->hostdata) { _scsih_mark_responding_sas_device()
6716 sas_target_priv_data = starget->hostdata; _scsih_mark_responding_sas_device()
6815 if (starget && starget->hostdata) { _scsih_mark_responding_raid_device()
6816 sas_target_priv_data = starget->hostdata; _scsih_mark_responding_raid_device()
7835 raid_device->starget->hostdata; _scsih_remove()
H A Dmpt2sas_base.h232 * struct MPT2SAS_TARGET - starget private hostdata
261 * struct MPT2SAS_DEVICE - sdev private hostdata
262 * @sas_target: starget private hostdata
H A Dmpt2sas_ctl.c570 scmd->device->hostdata == NULL) _ctl_set_task_mid()
574 priv_data = scmd->device->hostdata; _ctl_set_task_mid()
2985 struct MPT2SAS_DEVICE *sas_device_priv_data = sdev->hostdata; _ctl_device_sas_address_show()
3006 struct MPT2SAS_DEVICE *sas_device_priv_data = sdev->hostdata; _ctl_device_handle_show()
/linux-4.1.27/drivers/scsi/csiostor/
H A Dcsio_init.h85 return container_of((void *)ln, struct Scsi_Host, hostdata[0]); csio_ln_to_shost()
H A Dcsio_scsi.c1568 struct csio_rnode *rn = (struct csio_rnode *)(cmnd->device->hostdata); csio_scsi_err_handler()
1777 struct csio_rnode *rn = (struct csio_rnode *)(cmnd->device->hostdata); csio_queuecommand()
1921 struct csio_rnode *rn = (struct csio_rnode *)(cmnd->device->hostdata); csio_eh_abort_handler()
2067 struct csio_rnode *rn = (struct csio_rnode *)(cmnd->device->hostdata); csio_eh_lun_reset_handler()
2233 sdev->hostdata = *((struct csio_lnode **)(rport->dd_data)); csio_slave_alloc()
2248 sdev->hostdata = NULL; csio_slave_destroy()
/linux-4.1.27/drivers/usb/image/
H A Dmicrotek.c338 struct mts_desc* desc = (struct mts_desc*)(srb->device->host->hostdata[0]); mts_scsi_abort()
349 struct mts_desc* desc = (struct mts_desc*)(srb->device->host->hostdata[0]); mts_scsi_host_reset()
575 struct mts_desc* desc = (struct mts_desc*)(srb->device->host->hostdata[0]); mts_scsi_queuecommand_lck()
772 new_desc->host->hostdata[0] = (unsigned long)new_desc; mts_usb_probe()
/linux-4.1.27/include/scsi/
H A Dscsi_transport_sas.h73 void *hostdata; member in struct:sas_phy
H A Dscsi_device.h107 void *hostdata; /* available to low-level driver */ member in struct:scsi_device
304 void *hostdata; /* available to low-level driver */ member in struct:scsi_target
321 uint, uint, u64, void *hostdata);
H A Dlibsas.h428 #define SHOST_TO_SAS_HA(_shost) (*(struct sas_ha_struct **)(_shost)->hostdata)
432 return starget->hostdata; starget_to_domain_dev()
H A Dscsi_host.h744 unsigned long hostdata[0] /* Used for storage of host specific stuff */ member in struct:Scsi_Host
756 return (void *)shost->hostdata; shost_priv()
/linux-4.1.27/drivers/scsi/megaraid/
H A Dmega_common.h204 #define SCP2HOSTDATA(scp) SCP2HOST(scp)->hostdata // to soft state
210 #define SCSIHOST2ADAP(host) (((caddr_t *)(host->hostdata))[0])
H A Dmegaraid_sas_base.c1575 scmd->device->host->hostdata; megasas_queue_command()
2449 instance = (struct megasas_instance *)scmd->device->host->hostdata; megasas_generic_reset()
2487 instance = (struct megasas_instance *)scmd->device->host->hostdata; megasas_reset_timer()
2523 instance = (struct megasas_instance *)scmd->device->host->hostdata; megasas_reset_bus_host()
2643 (struct megasas_instance *) shost->hostdata; megasas_fw_crash_buffer_store()
2662 (struct megasas_instance *) shost->hostdata; megasas_fw_crash_buffer_show()
2708 (struct megasas_instance *) shost->hostdata; megasas_fw_crash_buffer_size_show()
2720 (struct megasas_instance *) shost->hostdata; megasas_fw_crash_state_store()
2755 (struct megasas_instance *) shost->hostdata; megasas_fw_crash_state_show()
5163 instance = (struct megasas_instance *)host->hostdata; megasas_probe_one()
H A Dmegaraid_sas_fusion.c2550 instance = (struct megasas_instance *)shost->hostdata; megasas_reset_fusion()
/linux-4.1.27/drivers/block/
H A Dcciss_scsi.c864 sh->hostdata[0] = (unsigned long) h; cciss_scsi_detect()
1309 ctlr_info_t *h = (ctlr_info_t *) sh->hostdata[0]; cciss_scsi_write_info()
1321 ctlr_info_t *h = (ctlr_info_t *) sh->hostdata[0]; cciss_scsi_show_info()
1420 h = (ctlr_info_t *) cmd->device->host->hostdata[0]; cciss_scsi_queue_command_lck()
1661 h = (ctlr_info_t *) scsicmd->device->host->hostdata[0]; cciss_eh_device_reset_handler()
1687 h = (ctlr_info_t *) scsicmd->device->host->hostdata[0]; cciss_eh_abort_handler()
/linux-4.1.27/drivers/scsi/sym53c8xx_2/
H A Dsym_glue.h228 return ((struct sym_data *)host->hostdata)->ncb; sym_get_hcb()
/linux-4.1.27/fs/gfs2/
H A Dglock.h17 /* Options for hostdata parser */
H A Dsuper.c92 {Opt_hostdata, "hostdata=%s"},
1341 seq_show_option(s, "hostdata", args->ar_hostdata); gfs2_show_options()
H A Dops_fstype.c993 fs_info(sdp, "unknown hostdata (%s)\n", o); gfs2_lm_mount()
/linux-4.1.27/arch/powerpc/sysdev/
H A Dfsl_msi.c259 /* chip_data is msi_data via host->hostdata in host->map() */ fsl_setup_msi_irqs()
/linux-4.1.27/drivers/target/loopback/
H A Dtcm_loop.c403 * Assign the struct tcm_loop_hba pointer to struct Scsi_Host->hostdata tcm_loop_driver_probe()
405 *((struct tcm_loop_hba **)sh->hostdata) = tl_hba; tcm_loop_driver_probe()
/linux-4.1.27/drivers/scsi/mvsas/
H A Dmv_init.c111 sas_phy->ha = (struct sas_ha_struct *)mvi->shost->hostdata; mvs_phy_init()
/linux-4.1.27/drivers/scsi/qla2xxx/
H A Dqla_os.c682 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; qla2xxx_queuecommand()
1086 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; __qla2xxx_eh_generic_reset()
1175 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; qla2xxx_eh_bus_reset()
1401 sdev->hostdata = *(fc_port_t **)rport->dd_data; qla2xxx_slave_alloc()
1422 sdev->hostdata = NULL; qla2xxx_slave_destroy()
/linux-4.1.27/drivers/media/platform/exynos4-is/
H A Dmedia-dev.c375 * input. Sensors are attached to the FIMC-LITE hostdata interface fimc_md_parse_port_node()
/linux-4.1.27/drivers/scsi/pm8001/
H A Dpm8001_init.c136 sas_phy->ha = (struct sas_ha_struct *)pm8001_ha->shost->hostdata; pm8001_phy_init()
/linux-4.1.27/drivers/scsi/qla4xxx/
H A Dql4_os.c4062 struct ddb_entry *ddb_entry = cmd->device->hostdata; qla4xxx_queuecommand()
9057 sdev->hostdata = ddb; qla4xxx_slave_alloc()
9260 struct ddb_entry *ddb_entry = cmd->device->hostdata; qla4xxx_eh_device_reset()
9322 struct ddb_entry *ddb_entry = cmd->device->hostdata; qla4xxx_eh_target_reset()
/linux-4.1.27/include/linux/
H A Dlibata.h1735 return *(struct ata_port **)&host->hostdata[0]; ata_shost_to_port()
/linux-4.1.27/drivers/infiniband/ulp/srp/
H A Dib_srp.c193 return (struct srp_target_port *) host->hostdata; host_to_target()
/linux-4.1.27/drivers/ata/
H A Dlibata-scsi.c3673 *(struct ata_port **)&shost->hostdata[0] = ap; ata_scsi_add_hosts()

Completed in 4210 milliseconds