Lines Matching refs:pDev

192 	struct pci_dev *pDev = NULL;  in adpt_detect()  local
199 while ((pDev = pci_get_device( PCI_DPT_VENDOR_ID, PCI_ANY_ID, pDev))) { in adpt_detect()
200 if(pDev->device == PCI_DPT_DEVICE_ID || in adpt_detect()
201 pDev->device == PCI_DPT_RAPTOR_DEVICE_ID){ in adpt_detect()
202 if(adpt_install_hba(sht, pDev) ){ in adpt_detect()
207 pci_dev_get(pDev); in adpt_detect()
328 buf = dma_alloc_coherent(&pHba->pDev->dev, 80, &addr, GFP_KERNEL); in adpt_inquiry()
392 dma_free_coherent(&pHba->pDev->dev, 80, buf, addr); in adpt_inquiry()
401 dma_free_coherent(&pHba->pDev->dev, 80, buf, addr); in adpt_inquiry()
422 struct adpt_device* pDev = NULL; /* dpt per device information */ in adpt_queue_lck() local
448 if((pDev = (struct adpt_device*) (cmd->device->hostdata)) == NULL) { in adpt_queue_lck()
454 …if ((pDev = adpt_find_device(pHba, (u32)cmd->device->channel, (u32)cmd->device->id, cmd->device->l… in adpt_queue_lck()
461 cmd->device->hostdata = pDev; in adpt_queue_lck()
463 pDev->pScsi_dev = cmd->device; in adpt_queue_lck()
469 if (pDev->state & DPTI_DEV_RESET ) { in adpt_queue_lck()
472 return adpt_scsi_to_i2o(pHba, cmd, pDev); in adpt_queue_lck()
858 static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev) in adpt_install_hba() argument
873 if(pci_enable_device(pDev)) { in adpt_install_hba()
877 if (pci_request_regions(pDev, "dpt_i2o")) { in adpt_install_hba()
882 pci_set_master(pDev); in adpt_install_hba()
888 dma_get_required_mask(&pDev->dev) > DMA_BIT_MASK(32) && in adpt_install_hba()
889 dma_set_mask(&pDev->dev, DMA_BIT_MASK(64)) == 0) in adpt_install_hba()
892 if (!dma64 && dma_set_mask(&pDev->dev, DMA_BIT_MASK(32)) != 0) in adpt_install_hba()
896 dma_set_coherent_mask(&pDev->dev, DMA_BIT_MASK(32)); in adpt_install_hba()
898 base_addr0_phys = pci_resource_start(pDev,0); in adpt_install_hba()
899 hba_map0_area_size = pci_resource_len(pDev,0); in adpt_install_hba()
902 if(pDev->device == PCI_DPT_DEVICE_ID){ in adpt_install_hba()
903 if(pDev->subsystem_device >=0xc032 && pDev->subsystem_device <= 0xc03b){ in adpt_install_hba()
913 base_addr1_phys = pci_resource_start(pDev,1); in adpt_install_hba()
914 hba_map1_area_size = pci_resource_len(pDev,1); in adpt_install_hba()
939 pci_release_regions(pDev); in adpt_install_hba()
949 pci_release_regions(pDev); in adpt_install_hba()
962 pci_release_regions(pDev); in adpt_install_hba()
981 pHba->pDev = pDev; in adpt_install_hba()
997 pHba->pDev = pDev; in adpt_install_hba()
1008 hba_map0_area_size, pDev->irq, in adpt_install_hba()
1012 hba_count-1, pDev->irq, in adpt_install_hba()
1018 if (request_irq (pDev->irq, adpt_isr, IRQF_SHARED, pHba->name, pHba)) { in adpt_install_hba()
1019 printk(KERN_ERR"%s: Couldn't register IRQ %d\n", pHba->name, pDev->irq); in adpt_install_hba()
1036 struct adpt_device* pDev; in adpt_i2o_delete_hba() local
1060 pci_release_regions(pHba->pDev); in adpt_i2o_delete_hba()
1067 dma_free_coherent(&pHba->pDev->dev, in adpt_i2o_delete_hba()
1072 dma_free_coherent(&pHba->pDev->dev, pHba->lct_size, in adpt_i2o_delete_hba()
1076 dma_free_coherent(&pHba->pDev->dev, sizeof(i2o_status_block), in adpt_i2o_delete_hba()
1080 dma_free_coherent(&pHba->pDev->dev, in adpt_i2o_delete_hba()
1092 for(pDev = pHba->channel[i].device[j]; pDev; pDev = pNext){ in adpt_i2o_delete_hba()
1093 pNext = pDev->next_lun; in adpt_i2o_delete_hba()
1094 kfree(pDev); in adpt_i2o_delete_hba()
1099 pci_dev_put(pHba->pDev); in adpt_i2o_delete_hba()
1323 status = dma_alloc_coherent(&pHba->pDev->dev, 4, &addr, GFP_KERNEL); in adpt_i2o_reset_hba()
1389 dma_free_coherent(&pHba->pDev->dev, 4, status, addr); in adpt_i2o_reset_hba()
1410 struct adpt_device* pDev; in adpt_i2o_parse_lct() local
1525 pDev = kzalloc(sizeof(struct adpt_device),GFP_KERNEL); in adpt_i2o_parse_lct()
1526 if(pDev == NULL) { in adpt_i2o_parse_lct()
1529 pHba->channel[bus_no].device[scsi_id] = pDev; in adpt_i2o_parse_lct()
1531 for( pDev = pHba->channel[bus_no].device[scsi_id]; in adpt_i2o_parse_lct()
1532 pDev->next_lun; pDev = pDev->next_lun){ in adpt_i2o_parse_lct()
1534 pDev->next_lun = kzalloc(sizeof(struct adpt_device),GFP_KERNEL); in adpt_i2o_parse_lct()
1535 if(pDev->next_lun == NULL) { in adpt_i2o_parse_lct()
1538 pDev = pDev->next_lun; in adpt_i2o_parse_lct()
1540 pDev->tid = tid; in adpt_i2o_parse_lct()
1541 pDev->scsi_channel = bus_no; in adpt_i2o_parse_lct()
1542 pDev->scsi_id = scsi_id; in adpt_i2o_parse_lct()
1543 pDev->scsi_lun = scsi_lun; in adpt_i2o_parse_lct()
1544 pDev->pI2o_dev = d; in adpt_i2o_parse_lct()
1545 d->owner = pDev; in adpt_i2o_parse_lct()
1546 pDev->type = (buf[0])&0xff; in adpt_i2o_parse_lct()
1547 pDev->flags = (buf[0]>>8)&0xff; in adpt_i2o_parse_lct()
1729 p = dma_alloc_coherent(&pHba->pDev->dev, sg_size, &addr, GFP_KERNEL); in adpt_i2o_passthru()
1837 dma_free_coherent(&pHba->pDev->dev, in adpt_i2o_passthru()
1990 HbaInfo.pciBusNum = pHba->pDev->bus->number; in adpt_ioctl()
1991 HbaInfo.pciDeviceNum=PCI_SLOT(pHba->pDev->devfn); in adpt_ioctl()
1992 HbaInfo.Interrupt = pHba->pDev->irq; in adpt_ioctl()
2318 host->irq = pHba->pDev->irq; in adpt_scsi_host_alloc()
2485 struct adpt_device* pDev = NULL; in adpt_i2o_reparse_lct() local
2499 pDev =(struct adpt_device*) d->owner; in adpt_i2o_reparse_lct()
2500 if(!pDev){ in adpt_i2o_reparse_lct()
2503 pDev->state |= DPTI_DEV_UNSCANNED; in adpt_i2o_reparse_lct()
2531 pDev = pHba->channel[bus_no].device[scsi_id]; in adpt_i2o_reparse_lct()
2533 while(pDev) { in adpt_i2o_reparse_lct()
2534 if(pDev->scsi_lun == scsi_lun) { in adpt_i2o_reparse_lct()
2537 pDev = pDev->next_lun; in adpt_i2o_reparse_lct()
2539 if(!pDev ) { // Something new add it in adpt_i2o_reparse_lct()
2557 pDev = pHba->channel[bus_no].device[scsi_id]; in adpt_i2o_reparse_lct()
2558 if( pDev == NULL){ in adpt_i2o_reparse_lct()
2559 pDev = in adpt_i2o_reparse_lct()
2562 if(pDev == NULL) { in adpt_i2o_reparse_lct()
2565 pHba->channel[bus_no].device[scsi_id] = pDev; in adpt_i2o_reparse_lct()
2567 while (pDev->next_lun) { in adpt_i2o_reparse_lct()
2568 pDev = pDev->next_lun; in adpt_i2o_reparse_lct()
2570 pDev = pDev->next_lun = in adpt_i2o_reparse_lct()
2573 if(pDev == NULL) { in adpt_i2o_reparse_lct()
2577 pDev->tid = d->lct_data.tid; in adpt_i2o_reparse_lct()
2578 pDev->scsi_channel = bus_no; in adpt_i2o_reparse_lct()
2579 pDev->scsi_id = scsi_id; in adpt_i2o_reparse_lct()
2580 pDev->scsi_lun = scsi_lun; in adpt_i2o_reparse_lct()
2581 pDev->pI2o_dev = d; in adpt_i2o_reparse_lct()
2582 d->owner = pDev; in adpt_i2o_reparse_lct()
2583 pDev->type = (buf[0])&0xff; in adpt_i2o_reparse_lct()
2584 pDev->flags = (buf[0]>>8)&0xff; in adpt_i2o_reparse_lct()
2596 while(pDev) { in adpt_i2o_reparse_lct()
2597 if(pDev->scsi_lun == scsi_lun) { in adpt_i2o_reparse_lct()
2598 if(!scsi_device_online(pDev->pScsi_dev)) { in adpt_i2o_reparse_lct()
2601 if (pDev->pScsi_dev) { in adpt_i2o_reparse_lct()
2602 scsi_device_set_state(pDev->pScsi_dev, SDEV_RUNNING); in adpt_i2o_reparse_lct()
2605 d = pDev->pI2o_dev; in adpt_i2o_reparse_lct()
2607 pDev->tid = tid; in adpt_i2o_reparse_lct()
2609 if (pDev->pScsi_dev) { in adpt_i2o_reparse_lct()
2610 pDev->pScsi_dev->changed = TRUE; in adpt_i2o_reparse_lct()
2611 pDev->pScsi_dev->removable = TRUE; in adpt_i2o_reparse_lct()
2615 pDev->state = DPTI_DEV_ONLINE; in adpt_i2o_reparse_lct()
2618 pDev = pDev->next_lun; in adpt_i2o_reparse_lct()
2623 pDev =(struct adpt_device*) pI2o_dev->owner; in adpt_i2o_reparse_lct()
2624 if(!pDev){ in adpt_i2o_reparse_lct()
2629 if (pDev->state & DPTI_DEV_UNSCANNED){ in adpt_i2o_reparse_lct()
2630 pDev->state = DPTI_DEV_OFFLINE; in adpt_i2o_reparse_lct()
2631 …ERN_WARNING"%s: Device (%d,%d,%llu) offline\n",pHba->name,pDev->scsi_channel,pDev->scsi_id,pDev->s… in adpt_i2o_reparse_lct()
2632 if (pDev->pScsi_dev) { in adpt_i2o_reparse_lct()
2633 scsi_device_set_state(pDev->pScsi_dev, SDEV_OFFLINE); in adpt_i2o_reparse_lct()
2772 status = dma_alloc_coherent(&pHba->pDev->dev, 4, &addr, GFP_KERNEL); in adpt_i2o_init_outbound_q()
2814 dma_free_coherent(&pHba->pDev->dev, 4, status, addr); in adpt_i2o_init_outbound_q()
2817 dma_free_coherent(&pHba->pDev->dev, 4, status, addr); in adpt_i2o_init_outbound_q()
2820 dma_free_coherent(&pHba->pDev->dev, in adpt_i2o_init_outbound_q()
2825 pHba->reply_pool = dma_alloc_coherent(&pHba->pDev->dev, in adpt_i2o_init_outbound_q()
2862 pHba->status_block = dma_alloc_coherent(&pHba->pDev->dev, in adpt_i2o_status_get()
2989 pHba->lct = dma_alloc_coherent(&pHba->pDev->dev, in adpt_i2o_lct_get()
3018 dma_free_coherent(&pHba->pDev->dev, pHba->lct_size, in adpt_i2o_lct_get()
3054 dma_free_coherent(&pHba->pDev->dev, sys_tbl_len, in adpt_i2o_build_sys_table()
3060 sys_tbl = dma_alloc_coherent(&pHba->pDev->dev, in adpt_i2o_build_sys_table()
3226 pHba->hrt = dma_alloc_coherent(&pHba->pDev->dev, in adpt_i2o_hrt_get()
3248 dma_free_coherent(&pHba->pDev->dev, size, in adpt_i2o_hrt_get()
3272 resblk_va = dma_alloc_coherent(&pHba->pDev->dev, in adpt_i2o_query_scalar()
3279 opblk_va = dma_alloc_coherent(&pHba->pDev->dev, in adpt_i2o_query_scalar()
3282 dma_free_coherent(&pHba->pDev->dev, sizeof(u8) * (8+buflen), in adpt_i2o_query_scalar()
3295 dma_free_coherent(&pHba->pDev->dev, sizeof(opblk), opblk_va, opblk_pa); in adpt_i2o_query_scalar()
3297 dma_free_coherent(&pHba->pDev->dev, sizeof(u8) * (8+buflen), in adpt_i2o_query_scalar()
3302 dma_free_coherent(&pHba->pDev->dev, sizeof(u8) * (8+buflen), in adpt_i2o_query_scalar()
3310 dma_free_coherent(&pHba->pDev->dev, sizeof(u8) * (8+buflen), in adpt_i2o_query_scalar()
3518 error = scsi_add_host(pHba->host, &pHba->pDev->dev); in adpt_init()