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()
330 buf = dma_alloc_coherent(&pHba->pDev->dev, 80, &addr, GFP_KERNEL); in adpt_inquiry()
394 dma_free_coherent(&pHba->pDev->dev, 80, buf, addr); in adpt_inquiry()
403 dma_free_coherent(&pHba->pDev->dev, 80, buf, addr); in adpt_inquiry()
427 struct adpt_device* pDev = NULL; /* dpt per device information */ in adpt_queue_lck() local
454 if((pDev = (struct adpt_device*) (cmd->device->hostdata)) == NULL) { in adpt_queue_lck()
460 …if ((pDev = adpt_find_device(pHba, (u32)cmd->device->channel, (u32)cmd->device->id, cmd->device->l… in adpt_queue_lck()
467 cmd->device->hostdata = pDev; in adpt_queue_lck()
469 pDev->pScsi_dev = cmd->device; in adpt_queue_lck()
475 if (pDev->state & DPTI_DEV_RESET ) { in adpt_queue_lck()
478 return adpt_scsi_to_i2o(pHba, cmd, pDev); in adpt_queue_lck()
904 static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev) in adpt_install_hba() argument
919 if(pci_enable_device(pDev)) { in adpt_install_hba()
923 if (pci_request_regions(pDev, "dpt_i2o")) { in adpt_install_hba()
928 pci_set_master(pDev); in adpt_install_hba()
934 pci_set_dma_mask(pDev, DMA_BIT_MASK(64)) == 0) { in adpt_install_hba()
935 if (dma_get_required_mask(&pDev->dev) > DMA_BIT_MASK(32)) in adpt_install_hba()
938 if (!dma64 && pci_set_dma_mask(pDev, DMA_BIT_MASK(32)) != 0) in adpt_install_hba()
942 pci_set_consistent_dma_mask(pDev, DMA_BIT_MASK(32)); in adpt_install_hba()
944 base_addr0_phys = pci_resource_start(pDev,0); in adpt_install_hba()
945 hba_map0_area_size = pci_resource_len(pDev,0); in adpt_install_hba()
948 if(pDev->device == PCI_DPT_DEVICE_ID){ in adpt_install_hba()
949 if(pDev->subsystem_device >=0xc032 && pDev->subsystem_device <= 0xc03b){ in adpt_install_hba()
959 base_addr1_phys = pci_resource_start(pDev,1); in adpt_install_hba()
960 hba_map1_area_size = pci_resource_len(pDev,1); in adpt_install_hba()
985 pci_release_regions(pDev); in adpt_install_hba()
995 pci_release_regions(pDev); in adpt_install_hba()
1008 pci_release_regions(pDev); in adpt_install_hba()
1027 pHba->pDev = pDev; in adpt_install_hba()
1043 pHba->pDev = pDev; in adpt_install_hba()
1055 hba_map0_area_size, pDev->irq, in adpt_install_hba()
1059 hba_count-1, pDev->irq, in adpt_install_hba()
1065 if (request_irq (pDev->irq, adpt_isr, IRQF_SHARED, pHba->name, pHba)) { in adpt_install_hba()
1066 printk(KERN_ERR"%s: Couldn't register IRQ %d\n", pHba->name, pDev->irq); in adpt_install_hba()
1083 struct adpt_device* pDev; in adpt_i2o_delete_hba() local
1109 pci_release_regions(pHba->pDev); in adpt_i2o_delete_hba()
1116 dma_free_coherent(&pHba->pDev->dev, in adpt_i2o_delete_hba()
1121 dma_free_coherent(&pHba->pDev->dev, pHba->lct_size, in adpt_i2o_delete_hba()
1125 dma_free_coherent(&pHba->pDev->dev, sizeof(i2o_status_block), in adpt_i2o_delete_hba()
1129 dma_free_coherent(&pHba->pDev->dev, in adpt_i2o_delete_hba()
1141 for(pDev = pHba->channel[i].device[j]; pDev; pDev = pNext){ in adpt_i2o_delete_hba()
1142 pNext = pDev->next_lun; in adpt_i2o_delete_hba()
1143 kfree(pDev); in adpt_i2o_delete_hba()
1148 pci_dev_put(pHba->pDev); in adpt_i2o_delete_hba()
1377 status = dma_alloc_coherent(&pHba->pDev->dev, 4, &addr, GFP_KERNEL); in adpt_i2o_reset_hba()
1444 dma_free_coherent(&pHba->pDev->dev, 4, status, addr); in adpt_i2o_reset_hba()
1465 struct adpt_device* pDev; in adpt_i2o_parse_lct() local
1580 pDev = kzalloc(sizeof(struct adpt_device),GFP_KERNEL); in adpt_i2o_parse_lct()
1581 if(pDev == NULL) { in adpt_i2o_parse_lct()
1584 pHba->channel[bus_no].device[scsi_id] = pDev; in adpt_i2o_parse_lct()
1586 for( pDev = pHba->channel[bus_no].device[scsi_id]; in adpt_i2o_parse_lct()
1587 pDev->next_lun; pDev = pDev->next_lun){ in adpt_i2o_parse_lct()
1589 pDev->next_lun = kzalloc(sizeof(struct adpt_device),GFP_KERNEL); in adpt_i2o_parse_lct()
1590 if(pDev->next_lun == NULL) { in adpt_i2o_parse_lct()
1593 pDev = pDev->next_lun; in adpt_i2o_parse_lct()
1595 pDev->tid = tid; in adpt_i2o_parse_lct()
1596 pDev->scsi_channel = bus_no; in adpt_i2o_parse_lct()
1597 pDev->scsi_id = scsi_id; in adpt_i2o_parse_lct()
1598 pDev->scsi_lun = scsi_lun; in adpt_i2o_parse_lct()
1599 pDev->pI2o_dev = d; in adpt_i2o_parse_lct()
1600 d->owner = pDev; in adpt_i2o_parse_lct()
1601 pDev->type = (buf[0])&0xff; in adpt_i2o_parse_lct()
1602 pDev->flags = (buf[0]>>8)&0xff; in adpt_i2o_parse_lct()
1778 p = dma_alloc_coherent(&pHba->pDev->dev, sg_size, &addr, GFP_KERNEL); in adpt_i2o_passthru()
1887 dma_free_coherent(&pHba->pDev->dev, in adpt_i2o_passthru()
2033 HbaInfo.pciBusNum = pHba->pDev->bus->number; in adpt_ioctl()
2034 HbaInfo.pciDeviceNum=PCI_SLOT(pHba->pDev->devfn); in adpt_ioctl()
2035 HbaInfo.Interrupt = pHba->pDev->irq; in adpt_ioctl()
2350 host->irq = pHba->pDev->irq; in adpt_scsi_host_alloc()
2521 struct adpt_device* pDev = NULL; in adpt_i2o_reparse_lct() local
2535 pDev =(struct adpt_device*) d->owner; in adpt_i2o_reparse_lct()
2536 if(!pDev){ in adpt_i2o_reparse_lct()
2539 pDev->state |= DPTI_DEV_UNSCANNED; in adpt_i2o_reparse_lct()
2567 pDev = pHba->channel[bus_no].device[scsi_id]; in adpt_i2o_reparse_lct()
2569 while(pDev) { in adpt_i2o_reparse_lct()
2570 if(pDev->scsi_lun == scsi_lun) { in adpt_i2o_reparse_lct()
2573 pDev = pDev->next_lun; in adpt_i2o_reparse_lct()
2575 if(!pDev ) { // Something new add it in adpt_i2o_reparse_lct()
2593 pDev = pHba->channel[bus_no].device[scsi_id]; in adpt_i2o_reparse_lct()
2594 if( pDev == NULL){ in adpt_i2o_reparse_lct()
2595 pDev = in adpt_i2o_reparse_lct()
2598 if(pDev == NULL) { in adpt_i2o_reparse_lct()
2601 pHba->channel[bus_no].device[scsi_id] = pDev; in adpt_i2o_reparse_lct()
2603 while (pDev->next_lun) { in adpt_i2o_reparse_lct()
2604 pDev = pDev->next_lun; in adpt_i2o_reparse_lct()
2606 pDev = pDev->next_lun = in adpt_i2o_reparse_lct()
2609 if(pDev == NULL) { in adpt_i2o_reparse_lct()
2613 pDev->tid = d->lct_data.tid; in adpt_i2o_reparse_lct()
2614 pDev->scsi_channel = bus_no; in adpt_i2o_reparse_lct()
2615 pDev->scsi_id = scsi_id; in adpt_i2o_reparse_lct()
2616 pDev->scsi_lun = scsi_lun; in adpt_i2o_reparse_lct()
2617 pDev->pI2o_dev = d; in adpt_i2o_reparse_lct()
2618 d->owner = pDev; in adpt_i2o_reparse_lct()
2619 pDev->type = (buf[0])&0xff; in adpt_i2o_reparse_lct()
2620 pDev->flags = (buf[0]>>8)&0xff; in adpt_i2o_reparse_lct()
2632 while(pDev) { in adpt_i2o_reparse_lct()
2633 if(pDev->scsi_lun == scsi_lun) { in adpt_i2o_reparse_lct()
2634 if(!scsi_device_online(pDev->pScsi_dev)) { in adpt_i2o_reparse_lct()
2637 if (pDev->pScsi_dev) { in adpt_i2o_reparse_lct()
2638 scsi_device_set_state(pDev->pScsi_dev, SDEV_RUNNING); in adpt_i2o_reparse_lct()
2641 d = pDev->pI2o_dev; in adpt_i2o_reparse_lct()
2643 pDev->tid = tid; in adpt_i2o_reparse_lct()
2645 if (pDev->pScsi_dev) { in adpt_i2o_reparse_lct()
2646 pDev->pScsi_dev->changed = TRUE; in adpt_i2o_reparse_lct()
2647 pDev->pScsi_dev->removable = TRUE; in adpt_i2o_reparse_lct()
2651 pDev->state = DPTI_DEV_ONLINE; in adpt_i2o_reparse_lct()
2654 pDev = pDev->next_lun; in adpt_i2o_reparse_lct()
2659 pDev =(struct adpt_device*) pI2o_dev->owner; in adpt_i2o_reparse_lct()
2660 if(!pDev){ in adpt_i2o_reparse_lct()
2665 if (pDev->state & DPTI_DEV_UNSCANNED){ in adpt_i2o_reparse_lct()
2666 pDev->state = DPTI_DEV_OFFLINE; in adpt_i2o_reparse_lct()
2667 …ERN_WARNING"%s: Device (%d,%d,%llu) offline\n",pHba->name,pDev->scsi_channel,pDev->scsi_id,pDev->s… in adpt_i2o_reparse_lct()
2668 if (pDev->pScsi_dev) { in adpt_i2o_reparse_lct()
2669 scsi_device_set_state(pDev->pScsi_dev, SDEV_OFFLINE); in adpt_i2o_reparse_lct()
2832 status = dma_alloc_coherent(&pHba->pDev->dev, 4, &addr, GFP_KERNEL); in adpt_i2o_init_outbound_q()
2875 dma_free_coherent(&pHba->pDev->dev, 4, status, addr); in adpt_i2o_init_outbound_q()
2878 dma_free_coherent(&pHba->pDev->dev, 4, status, addr); in adpt_i2o_init_outbound_q()
2881 dma_free_coherent(&pHba->pDev->dev, in adpt_i2o_init_outbound_q()
2886 pHba->reply_pool = dma_alloc_coherent(&pHba->pDev->dev, in adpt_i2o_init_outbound_q()
2924 pHba->status_block = dma_alloc_coherent(&pHba->pDev->dev, in adpt_i2o_status_get()
3051 pHba->lct = dma_alloc_coherent(&pHba->pDev->dev, in adpt_i2o_lct_get()
3080 dma_free_coherent(&pHba->pDev->dev, pHba->lct_size, in adpt_i2o_lct_get()
3116 dma_free_coherent(&pHba->pDev->dev, sys_tbl_len, in adpt_i2o_build_sys_table()
3122 sys_tbl = dma_alloc_coherent(&pHba->pDev->dev, in adpt_i2o_build_sys_table()
3289 pHba->hrt = dma_alloc_coherent(&pHba->pDev->dev, in adpt_i2o_hrt_get()
3311 dma_free_coherent(&pHba->pDev->dev, size, in adpt_i2o_hrt_get()
3335 resblk_va = dma_alloc_coherent(&pHba->pDev->dev, in adpt_i2o_query_scalar()
3342 opblk_va = dma_alloc_coherent(&pHba->pDev->dev, in adpt_i2o_query_scalar()
3345 dma_free_coherent(&pHba->pDev->dev, sizeof(u8) * (8+buflen), in adpt_i2o_query_scalar()
3358 dma_free_coherent(&pHba->pDev->dev, sizeof(opblk), opblk_va, opblk_pa); in adpt_i2o_query_scalar()
3360 dma_free_coherent(&pHba->pDev->dev, sizeof(u8) * (8+buflen), in adpt_i2o_query_scalar()
3365 dma_free_coherent(&pHba->pDev->dev, sizeof(u8) * (8+buflen), in adpt_i2o_query_scalar()
3373 dma_free_coherent(&pHba->pDev->dev, sizeof(u8) * (8+buflen), in adpt_i2o_query_scalar()
3583 error = scsi_add_host(pHba->host, &pHba->pDev->dev); in adpt_init()