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()
331 buf = dma_alloc_coherent(&pHba->pDev->dev, 80, &addr, GFP_KERNEL); in adpt_inquiry()
395 dma_free_coherent(&pHba->pDev->dev, 80, buf, addr); in adpt_inquiry()
404 dma_free_coherent(&pHba->pDev->dev, 80, buf, addr); in adpt_inquiry()
428 struct adpt_device* pDev = NULL; /* dpt per device information */ in adpt_queue_lck() local
455 if((pDev = (struct adpt_device*) (cmd->device->hostdata)) == NULL) { in adpt_queue_lck()
461 …if ((pDev = adpt_find_device(pHba, (u32)cmd->device->channel, (u32)cmd->device->id, cmd->device->l… in adpt_queue_lck()
468 cmd->device->hostdata = pDev; in adpt_queue_lck()
470 pDev->pScsi_dev = cmd->device; in adpt_queue_lck()
476 if (pDev->state & DPTI_DEV_RESET ) { in adpt_queue_lck()
479 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
1110 pci_release_regions(pHba->pDev); in adpt_i2o_delete_hba()
1117 dma_free_coherent(&pHba->pDev->dev, in adpt_i2o_delete_hba()
1122 dma_free_coherent(&pHba->pDev->dev, pHba->lct_size, in adpt_i2o_delete_hba()
1126 dma_free_coherent(&pHba->pDev->dev, sizeof(i2o_status_block), in adpt_i2o_delete_hba()
1130 dma_free_coherent(&pHba->pDev->dev, in adpt_i2o_delete_hba()
1142 for(pDev = pHba->channel[i].device[j]; pDev; pDev = pNext){ in adpt_i2o_delete_hba()
1143 pNext = pDev->next_lun; in adpt_i2o_delete_hba()
1144 kfree(pDev); in adpt_i2o_delete_hba()
1149 pci_dev_put(pHba->pDev); in adpt_i2o_delete_hba()
1373 status = dma_alloc_coherent(&pHba->pDev->dev, 4, &addr, GFP_KERNEL); in adpt_i2o_reset_hba()
1440 dma_free_coherent(&pHba->pDev->dev, 4, status, addr); in adpt_i2o_reset_hba()
1461 struct adpt_device* pDev; in adpt_i2o_parse_lct() local
1576 pDev = kzalloc(sizeof(struct adpt_device),GFP_KERNEL); in adpt_i2o_parse_lct()
1577 if(pDev == NULL) { in adpt_i2o_parse_lct()
1580 pHba->channel[bus_no].device[scsi_id] = pDev; in adpt_i2o_parse_lct()
1582 for( pDev = pHba->channel[bus_no].device[scsi_id]; in adpt_i2o_parse_lct()
1583 pDev->next_lun; pDev = pDev->next_lun){ in adpt_i2o_parse_lct()
1585 pDev->next_lun = kzalloc(sizeof(struct adpt_device),GFP_KERNEL); in adpt_i2o_parse_lct()
1586 if(pDev->next_lun == NULL) { in adpt_i2o_parse_lct()
1589 pDev = pDev->next_lun; in adpt_i2o_parse_lct()
1591 pDev->tid = tid; in adpt_i2o_parse_lct()
1592 pDev->scsi_channel = bus_no; in adpt_i2o_parse_lct()
1593 pDev->scsi_id = scsi_id; in adpt_i2o_parse_lct()
1594 pDev->scsi_lun = scsi_lun; in adpt_i2o_parse_lct()
1595 pDev->pI2o_dev = d; in adpt_i2o_parse_lct()
1596 d->owner = pDev; in adpt_i2o_parse_lct()
1597 pDev->type = (buf[0])&0xff; in adpt_i2o_parse_lct()
1598 pDev->flags = (buf[0]>>8)&0xff; in adpt_i2o_parse_lct()
1780 p = dma_alloc_coherent(&pHba->pDev->dev, sg_size, &addr, GFP_KERNEL); in adpt_i2o_passthru()
1888 dma_free_coherent(&pHba->pDev->dev, in adpt_i2o_passthru()
2041 HbaInfo.pciBusNum = pHba->pDev->bus->number; in adpt_ioctl()
2042 HbaInfo.pciDeviceNum=PCI_SLOT(pHba->pDev->devfn); in adpt_ioctl()
2043 HbaInfo.Interrupt = pHba->pDev->irq; in adpt_ioctl()
2361 host->irq = pHba->pDev->irq; in adpt_scsi_host_alloc()
2532 struct adpt_device* pDev = NULL; in adpt_i2o_reparse_lct() local
2546 pDev =(struct adpt_device*) d->owner; in adpt_i2o_reparse_lct()
2547 if(!pDev){ in adpt_i2o_reparse_lct()
2550 pDev->state |= DPTI_DEV_UNSCANNED; in adpt_i2o_reparse_lct()
2578 pDev = pHba->channel[bus_no].device[scsi_id]; in adpt_i2o_reparse_lct()
2580 while(pDev) { in adpt_i2o_reparse_lct()
2581 if(pDev->scsi_lun == scsi_lun) { in adpt_i2o_reparse_lct()
2584 pDev = pDev->next_lun; in adpt_i2o_reparse_lct()
2586 if(!pDev ) { // Something new add it in adpt_i2o_reparse_lct()
2604 pDev = pHba->channel[bus_no].device[scsi_id]; in adpt_i2o_reparse_lct()
2605 if( pDev == NULL){ in adpt_i2o_reparse_lct()
2606 pDev = in adpt_i2o_reparse_lct()
2609 if(pDev == NULL) { in adpt_i2o_reparse_lct()
2612 pHba->channel[bus_no].device[scsi_id] = pDev; in adpt_i2o_reparse_lct()
2614 while (pDev->next_lun) { in adpt_i2o_reparse_lct()
2615 pDev = pDev->next_lun; in adpt_i2o_reparse_lct()
2617 pDev = pDev->next_lun = in adpt_i2o_reparse_lct()
2620 if(pDev == NULL) { in adpt_i2o_reparse_lct()
2624 pDev->tid = d->lct_data.tid; in adpt_i2o_reparse_lct()
2625 pDev->scsi_channel = bus_no; in adpt_i2o_reparse_lct()
2626 pDev->scsi_id = scsi_id; in adpt_i2o_reparse_lct()
2627 pDev->scsi_lun = scsi_lun; in adpt_i2o_reparse_lct()
2628 pDev->pI2o_dev = d; in adpt_i2o_reparse_lct()
2629 d->owner = pDev; in adpt_i2o_reparse_lct()
2630 pDev->type = (buf[0])&0xff; in adpt_i2o_reparse_lct()
2631 pDev->flags = (buf[0]>>8)&0xff; in adpt_i2o_reparse_lct()
2643 while(pDev) { in adpt_i2o_reparse_lct()
2644 if(pDev->scsi_lun == scsi_lun) { in adpt_i2o_reparse_lct()
2645 if(!scsi_device_online(pDev->pScsi_dev)) { in adpt_i2o_reparse_lct()
2648 if (pDev->pScsi_dev) { in adpt_i2o_reparse_lct()
2649 scsi_device_set_state(pDev->pScsi_dev, SDEV_RUNNING); in adpt_i2o_reparse_lct()
2652 d = pDev->pI2o_dev; in adpt_i2o_reparse_lct()
2654 pDev->tid = tid; in adpt_i2o_reparse_lct()
2656 if (pDev->pScsi_dev) { in adpt_i2o_reparse_lct()
2657 pDev->pScsi_dev->changed = TRUE; in adpt_i2o_reparse_lct()
2658 pDev->pScsi_dev->removable = TRUE; in adpt_i2o_reparse_lct()
2662 pDev->state = DPTI_DEV_ONLINE; in adpt_i2o_reparse_lct()
2665 pDev = pDev->next_lun; in adpt_i2o_reparse_lct()
2670 pDev =(struct adpt_device*) pI2o_dev->owner; in adpt_i2o_reparse_lct()
2671 if(!pDev){ in adpt_i2o_reparse_lct()
2676 if (pDev->state & DPTI_DEV_UNSCANNED){ in adpt_i2o_reparse_lct()
2677 pDev->state = DPTI_DEV_OFFLINE; in adpt_i2o_reparse_lct()
2678 …ERN_WARNING"%s: Device (%d,%d,%llu) offline\n",pHba->name,pDev->scsi_channel,pDev->scsi_id,pDev->s… in adpt_i2o_reparse_lct()
2679 if (pDev->pScsi_dev) { in adpt_i2o_reparse_lct()
2680 scsi_device_set_state(pDev->pScsi_dev, SDEV_OFFLINE); in adpt_i2o_reparse_lct()
2839 status = dma_alloc_coherent(&pHba->pDev->dev, 4, &addr, GFP_KERNEL); in adpt_i2o_init_outbound_q()
2882 dma_free_coherent(&pHba->pDev->dev, 4, status, addr); in adpt_i2o_init_outbound_q()
2885 dma_free_coherent(&pHba->pDev->dev, 4, status, addr); in adpt_i2o_init_outbound_q()
2888 dma_free_coherent(&pHba->pDev->dev, in adpt_i2o_init_outbound_q()
2893 pHba->reply_pool = dma_alloc_coherent(&pHba->pDev->dev, in adpt_i2o_init_outbound_q()
2931 pHba->status_block = dma_alloc_coherent(&pHba->pDev->dev, in adpt_i2o_status_get()
3058 pHba->lct = dma_alloc_coherent(&pHba->pDev->dev, in adpt_i2o_lct_get()
3087 dma_free_coherent(&pHba->pDev->dev, pHba->lct_size, in adpt_i2o_lct_get()
3123 dma_free_coherent(&pHba->pDev->dev, sys_tbl_len, in adpt_i2o_build_sys_table()
3129 sys_tbl = dma_alloc_coherent(&pHba->pDev->dev, in adpt_i2o_build_sys_table()
3296 pHba->hrt = dma_alloc_coherent(&pHba->pDev->dev, in adpt_i2o_hrt_get()
3318 dma_free_coherent(&pHba->pDev->dev, size, in adpt_i2o_hrt_get()
3342 resblk_va = dma_alloc_coherent(&pHba->pDev->dev, in adpt_i2o_query_scalar()
3349 opblk_va = dma_alloc_coherent(&pHba->pDev->dev, in adpt_i2o_query_scalar()
3352 dma_free_coherent(&pHba->pDev->dev, sizeof(u8) * (8+buflen), in adpt_i2o_query_scalar()
3365 dma_free_coherent(&pHba->pDev->dev, sizeof(opblk), opblk_va, opblk_pa); in adpt_i2o_query_scalar()
3367 dma_free_coherent(&pHba->pDev->dev, sizeof(u8) * (8+buflen), in adpt_i2o_query_scalar()
3372 dma_free_coherent(&pHba->pDev->dev, sizeof(u8) * (8+buflen), in adpt_i2o_query_scalar()
3380 dma_free_coherent(&pHba->pDev->dev, sizeof(u8) * (8+buflen), in adpt_i2o_query_scalar()
3589 error = scsi_add_host(pHba->host, &pHba->pDev->dev); in adpt_init()