• Home
  • Raw
  • Download

Lines Matching refs:pDev

195 	struct pci_dev *pDev = NULL;  in adpt_detect()  local
202 while ((pDev = pci_get_device( PCI_DPT_VENDOR_ID, PCI_ANY_ID, pDev))) { in adpt_detect()
203 if(pDev->device == PCI_DPT_DEVICE_ID || in adpt_detect()
204 pDev->device == PCI_DPT_RAPTOR_DEVICE_ID){ in adpt_detect()
205 if(adpt_install_hba(sht, pDev) ){ in adpt_detect()
210 pci_dev_get(pDev); in adpt_detect()
333 buf = dma_alloc_coherent(&pHba->pDev->dev, 80, &addr, GFP_KERNEL); in adpt_inquiry()
397 dma_free_coherent(&pHba->pDev->dev, 80, buf, addr); in adpt_inquiry()
406 dma_free_coherent(&pHba->pDev->dev, 80, buf, addr); in adpt_inquiry()
430 struct adpt_device* pDev = NULL; /* dpt per device information */ in adpt_queue_lck() local
457 if((pDev = (struct adpt_device*) (cmd->device->hostdata)) == NULL) { in adpt_queue_lck()
463 …if ((pDev = adpt_find_device(pHba, (u32)cmd->device->channel, (u32)cmd->device->id, cmd->device->l… in adpt_queue_lck()
470 cmd->device->hostdata = pDev; in adpt_queue_lck()
472 pDev->pScsi_dev = cmd->device; in adpt_queue_lck()
478 if (pDev->state & DPTI_DEV_RESET ) { in adpt_queue_lck()
481 return adpt_scsi_to_i2o(pHba, cmd, pDev); in adpt_queue_lck()
907 static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev) in adpt_install_hba() argument
922 if(pci_enable_device(pDev)) { in adpt_install_hba()
926 if (pci_request_regions(pDev, "dpt_i2o")) { in adpt_install_hba()
931 pci_set_master(pDev); in adpt_install_hba()
937 pci_set_dma_mask(pDev, DMA_BIT_MASK(64)) == 0) { in adpt_install_hba()
938 if (dma_get_required_mask(&pDev->dev) > DMA_BIT_MASK(32)) in adpt_install_hba()
941 if (!dma64 && pci_set_dma_mask(pDev, DMA_BIT_MASK(32)) != 0) in adpt_install_hba()
945 pci_set_consistent_dma_mask(pDev, DMA_BIT_MASK(32)); in adpt_install_hba()
947 base_addr0_phys = pci_resource_start(pDev,0); in adpt_install_hba()
948 hba_map0_area_size = pci_resource_len(pDev,0); in adpt_install_hba()
951 if(pDev->device == PCI_DPT_DEVICE_ID){ in adpt_install_hba()
952 if(pDev->subsystem_device >=0xc032 && pDev->subsystem_device <= 0xc03b){ in adpt_install_hba()
962 base_addr1_phys = pci_resource_start(pDev,1); in adpt_install_hba()
963 hba_map1_area_size = pci_resource_len(pDev,1); in adpt_install_hba()
988 pci_release_regions(pDev); in adpt_install_hba()
998 pci_release_regions(pDev); in adpt_install_hba()
1011 pci_release_regions(pDev); in adpt_install_hba()
1030 pHba->pDev = pDev; in adpt_install_hba()
1046 pHba->pDev = pDev; in adpt_install_hba()
1058 hba_map0_area_size, pDev->irq, in adpt_install_hba()
1062 hba_count-1, pDev->irq, in adpt_install_hba()
1068 if (request_irq (pDev->irq, adpt_isr, IRQF_SHARED, pHba->name, pHba)) { in adpt_install_hba()
1069 printk(KERN_ERR"%s: Couldn't register IRQ %d\n", pHba->name, pDev->irq); in adpt_install_hba()
1086 struct adpt_device* pDev; in adpt_i2o_delete_hba() local
1112 pci_release_regions(pHba->pDev); in adpt_i2o_delete_hba()
1119 dma_free_coherent(&pHba->pDev->dev, in adpt_i2o_delete_hba()
1124 dma_free_coherent(&pHba->pDev->dev, pHba->lct_size, in adpt_i2o_delete_hba()
1128 dma_free_coherent(&pHba->pDev->dev, sizeof(i2o_status_block), in adpt_i2o_delete_hba()
1132 dma_free_coherent(&pHba->pDev->dev, in adpt_i2o_delete_hba()
1144 for(pDev = pHba->channel[i].device[j]; pDev; pDev = pNext){ in adpt_i2o_delete_hba()
1145 pNext = pDev->next_lun; in adpt_i2o_delete_hba()
1146 kfree(pDev); in adpt_i2o_delete_hba()
1151 pci_dev_put(pHba->pDev); in adpt_i2o_delete_hba()
1380 status = dma_alloc_coherent(&pHba->pDev->dev, 4, &addr, GFP_KERNEL); in adpt_i2o_reset_hba()
1447 dma_free_coherent(&pHba->pDev->dev, 4, status, addr); in adpt_i2o_reset_hba()
1468 struct adpt_device* pDev; in adpt_i2o_parse_lct() local
1583 pDev = kzalloc(sizeof(struct adpt_device),GFP_KERNEL); in adpt_i2o_parse_lct()
1584 if(pDev == NULL) { in adpt_i2o_parse_lct()
1587 pHba->channel[bus_no].device[scsi_id] = pDev; in adpt_i2o_parse_lct()
1589 for( pDev = pHba->channel[bus_no].device[scsi_id]; in adpt_i2o_parse_lct()
1590 pDev->next_lun; pDev = pDev->next_lun){ in adpt_i2o_parse_lct()
1592 pDev->next_lun = kzalloc(sizeof(struct adpt_device),GFP_KERNEL); in adpt_i2o_parse_lct()
1593 if(pDev->next_lun == NULL) { in adpt_i2o_parse_lct()
1596 pDev = pDev->next_lun; in adpt_i2o_parse_lct()
1598 pDev->tid = tid; in adpt_i2o_parse_lct()
1599 pDev->scsi_channel = bus_no; in adpt_i2o_parse_lct()
1600 pDev->scsi_id = scsi_id; in adpt_i2o_parse_lct()
1601 pDev->scsi_lun = scsi_lun; in adpt_i2o_parse_lct()
1602 pDev->pI2o_dev = d; in adpt_i2o_parse_lct()
1603 d->owner = pDev; in adpt_i2o_parse_lct()
1604 pDev->type = (buf[0])&0xff; in adpt_i2o_parse_lct()
1605 pDev->flags = (buf[0]>>8)&0xff; in adpt_i2o_parse_lct()
1781 p = dma_alloc_coherent(&pHba->pDev->dev, sg_size, &addr, GFP_KERNEL); in adpt_i2o_passthru()
1890 dma_free_coherent(&pHba->pDev->dev, in adpt_i2o_passthru()
2039 HbaInfo.pciBusNum = pHba->pDev->bus->number; in adpt_ioctl()
2040 HbaInfo.pciDeviceNum=PCI_SLOT(pHba->pDev->devfn); in adpt_ioctl()
2041 HbaInfo.Interrupt = pHba->pDev->irq; in adpt_ioctl()
2356 host->irq = pHba->pDev->irq; in adpt_scsi_host_alloc()
2527 struct adpt_device* pDev = NULL; in adpt_i2o_reparse_lct() local
2541 pDev =(struct adpt_device*) d->owner; in adpt_i2o_reparse_lct()
2542 if(!pDev){ in adpt_i2o_reparse_lct()
2545 pDev->state |= DPTI_DEV_UNSCANNED; in adpt_i2o_reparse_lct()
2573 pDev = pHba->channel[bus_no].device[scsi_id]; in adpt_i2o_reparse_lct()
2575 while(pDev) { in adpt_i2o_reparse_lct()
2576 if(pDev->scsi_lun == scsi_lun) { in adpt_i2o_reparse_lct()
2579 pDev = pDev->next_lun; in adpt_i2o_reparse_lct()
2581 if(!pDev ) { // Something new add it in adpt_i2o_reparse_lct()
2599 pDev = pHba->channel[bus_no].device[scsi_id]; in adpt_i2o_reparse_lct()
2600 if( pDev == NULL){ in adpt_i2o_reparse_lct()
2601 pDev = in adpt_i2o_reparse_lct()
2604 if(pDev == NULL) { in adpt_i2o_reparse_lct()
2607 pHba->channel[bus_no].device[scsi_id] = pDev; in adpt_i2o_reparse_lct()
2609 while (pDev->next_lun) { in adpt_i2o_reparse_lct()
2610 pDev = pDev->next_lun; in adpt_i2o_reparse_lct()
2612 pDev = pDev->next_lun = in adpt_i2o_reparse_lct()
2615 if(pDev == NULL) { in adpt_i2o_reparse_lct()
2619 pDev->tid = d->lct_data.tid; in adpt_i2o_reparse_lct()
2620 pDev->scsi_channel = bus_no; in adpt_i2o_reparse_lct()
2621 pDev->scsi_id = scsi_id; in adpt_i2o_reparse_lct()
2622 pDev->scsi_lun = scsi_lun; in adpt_i2o_reparse_lct()
2623 pDev->pI2o_dev = d; in adpt_i2o_reparse_lct()
2624 d->owner = pDev; in adpt_i2o_reparse_lct()
2625 pDev->type = (buf[0])&0xff; in adpt_i2o_reparse_lct()
2626 pDev->flags = (buf[0]>>8)&0xff; in adpt_i2o_reparse_lct()
2638 while(pDev) { in adpt_i2o_reparse_lct()
2639 if(pDev->scsi_lun == scsi_lun) { in adpt_i2o_reparse_lct()
2640 if(!scsi_device_online(pDev->pScsi_dev)) { in adpt_i2o_reparse_lct()
2643 if (pDev->pScsi_dev) { in adpt_i2o_reparse_lct()
2644 scsi_device_set_state(pDev->pScsi_dev, SDEV_RUNNING); in adpt_i2o_reparse_lct()
2647 d = pDev->pI2o_dev; in adpt_i2o_reparse_lct()
2649 pDev->tid = tid; in adpt_i2o_reparse_lct()
2651 if (pDev->pScsi_dev) { in adpt_i2o_reparse_lct()
2652 pDev->pScsi_dev->changed = TRUE; in adpt_i2o_reparse_lct()
2653 pDev->pScsi_dev->removable = TRUE; in adpt_i2o_reparse_lct()
2657 pDev->state = DPTI_DEV_ONLINE; in adpt_i2o_reparse_lct()
2660 pDev = pDev->next_lun; in adpt_i2o_reparse_lct()
2665 pDev =(struct adpt_device*) pI2o_dev->owner; in adpt_i2o_reparse_lct()
2666 if(!pDev){ in adpt_i2o_reparse_lct()
2671 if (pDev->state & DPTI_DEV_UNSCANNED){ in adpt_i2o_reparse_lct()
2672 pDev->state = DPTI_DEV_OFFLINE; in adpt_i2o_reparse_lct()
2673 …ERN_WARNING"%s: Device (%d,%d,%llu) offline\n",pHba->name,pDev->scsi_channel,pDev->scsi_id,pDev->s… in adpt_i2o_reparse_lct()
2674 if (pDev->pScsi_dev) { in adpt_i2o_reparse_lct()
2675 scsi_device_set_state(pDev->pScsi_dev, SDEV_OFFLINE); in adpt_i2o_reparse_lct()
2838 status = dma_alloc_coherent(&pHba->pDev->dev, 4, &addr, GFP_KERNEL); in adpt_i2o_init_outbound_q()
2881 dma_free_coherent(&pHba->pDev->dev, 4, status, addr); in adpt_i2o_init_outbound_q()
2884 dma_free_coherent(&pHba->pDev->dev, 4, status, addr); in adpt_i2o_init_outbound_q()
2887 dma_free_coherent(&pHba->pDev->dev, in adpt_i2o_init_outbound_q()
2892 pHba->reply_pool = dma_alloc_coherent(&pHba->pDev->dev, in adpt_i2o_init_outbound_q()
2930 pHba->status_block = dma_alloc_coherent(&pHba->pDev->dev, in adpt_i2o_status_get()
3057 pHba->lct = dma_alloc_coherent(&pHba->pDev->dev, in adpt_i2o_lct_get()
3086 dma_free_coherent(&pHba->pDev->dev, pHba->lct_size, in adpt_i2o_lct_get()
3122 dma_free_coherent(&pHba->pDev->dev, sys_tbl_len, in adpt_i2o_build_sys_table()
3128 sys_tbl = dma_alloc_coherent(&pHba->pDev->dev, in adpt_i2o_build_sys_table()
3295 pHba->hrt = dma_alloc_coherent(&pHba->pDev->dev, in adpt_i2o_hrt_get()
3317 dma_free_coherent(&pHba->pDev->dev, size, in adpt_i2o_hrt_get()
3341 resblk_va = dma_alloc_coherent(&pHba->pDev->dev, in adpt_i2o_query_scalar()
3348 opblk_va = dma_alloc_coherent(&pHba->pDev->dev, in adpt_i2o_query_scalar()
3351 dma_free_coherent(&pHba->pDev->dev, sizeof(u8) * (8+buflen), in adpt_i2o_query_scalar()
3364 dma_free_coherent(&pHba->pDev->dev, sizeof(opblk), opblk_va, opblk_pa); in adpt_i2o_query_scalar()
3366 dma_free_coherent(&pHba->pDev->dev, sizeof(u8) * (8+buflen), in adpt_i2o_query_scalar()
3371 dma_free_coherent(&pHba->pDev->dev, sizeof(u8) * (8+buflen), in adpt_i2o_query_scalar()
3379 dma_free_coherent(&pHba->pDev->dev, sizeof(u8) * (8+buflen), in adpt_i2o_query_scalar()
3588 error = scsi_add_host(pHba->host, &pHba->pDev->dev); in adpt_init()