ioc 231 arch/ia64/hp/common/sba_iommu.c struct ioc *next; /* list of IOC's in system */ ioc 241 arch/ia64/hp/common/sba_iommu.c static struct ioc *ioc_list, *ioc_found; ioc 244 arch/ia64/hp/common/sba_iommu.c static SBA_INLINE void sba_mark_invalid(struct ioc *, dma_addr_t, size_t); ioc 245 arch/ia64/hp/common/sba_iommu.c static SBA_INLINE void sba_free_range(struct ioc *, dma_addr_t, size_t); ioc 254 arch/ia64/hp/common/sba_iommu.c ? ((struct ioc *) PCI_CONTROLLER(to_pci_dev(dev))->iommu) : NULL) ioc 309 arch/ia64/hp/common/sba_iommu.c sba_dump_pdir_entry(struct ioc *ioc, char *msg, uint pide) ioc 312 arch/ia64/hp/common/sba_iommu.c u64 *ptr = &ioc->pdir_base[pide & ~(BITS_PER_LONG - 1)]; ioc 313 arch/ia64/hp/common/sba_iommu.c unsigned long *rptr = (unsigned long *) &ioc->res_map[(pide >>3) & -sizeof(unsigned long)]; ioc 340 arch/ia64/hp/common/sba_iommu.c sba_check_pdir(struct ioc *ioc, char *msg) ioc 342 arch/ia64/hp/common/sba_iommu.c u64 *rptr_end = (u64 *) &(ioc->res_map[ioc->res_size]); ioc 343 arch/ia64/hp/common/sba_iommu.c u64 *rptr = (u64 *) ioc->res_map; /* resource map ptr */ ioc 344 arch/ia64/hp/common/sba_iommu.c u64 *pptr = ioc->pdir_base; /* pdir ptr */ ioc 363 arch/ia64/hp/common/sba_iommu.c sba_dump_pdir_entry(ioc, msg, pide); ioc 387 arch/ia64/hp/common/sba_iommu.c sba_dump_sg( struct ioc *ioc, struct scatterlist *startsg, int nents) ioc 398 arch/ia64/hp/common/sba_iommu.c sba_check_sg( struct ioc *ioc, struct scatterlist *startsg, int nents) ioc 427 arch/ia64/hp/common/sba_iommu.c #define SBA_IOVA(ioc,iovp,offset) ((ioc->ibase) | (iovp) | (offset)) ioc 428 arch/ia64/hp/common/sba_iommu.c #define SBA_IOVP(ioc,iova) ((iova) & ~(ioc->ibase)) ioc 457 arch/ia64/hp/common/sba_iommu.c static unsigned long ptr_to_pide(struct ioc *ioc, unsigned long *res_ptr, ioc 460 arch/ia64/hp/common/sba_iommu.c return (((unsigned long)res_ptr - (unsigned long)ioc->res_map) << 3) ioc 475 arch/ia64/hp/common/sba_iommu.c sba_search_bitmap(struct ioc *ioc, struct device *dev, ioc 479 arch/ia64/hp/common/sba_iommu.c unsigned long *res_end = (unsigned long *) &(ioc->res_map[ioc->res_size]); ioc 485 arch/ia64/hp/common/sba_iommu.c ASSERT(((unsigned long) ioc->res_hint & (sizeof(unsigned long) - 1UL)) == 0); ioc 491 arch/ia64/hp/common/sba_iommu.c BUG_ON(ioc->ibase & ~iovp_mask); ioc 492 arch/ia64/hp/common/sba_iommu.c shift = ioc->ibase >> iovp_shift; ioc 494 arch/ia64/hp/common/sba_iommu.c spin_lock_irqsave(&ioc->res_lock, flags); ioc 498 arch/ia64/hp/common/sba_iommu.c res_ptr = ioc->res_hint; ioc 500 arch/ia64/hp/common/sba_iommu.c res_ptr = (ulong *)ioc->res_map; ioc 501 arch/ia64/hp/common/sba_iommu.c ioc->res_bitshift = 0; ioc 518 arch/ia64/hp/common/sba_iommu.c pide = ptr_to_pide(ioc, res_ptr, bitshiftcnt); ioc 519 arch/ia64/hp/common/sba_iommu.c ioc->res_bitshift = bitshiftcnt + bits_wanted; ioc 535 arch/ia64/hp/common/sba_iommu.c uint bitshiftcnt = ROUNDUP(ioc->res_bitshift, o); ioc 547 arch/ia64/hp/common/sba_iommu.c tpide = ptr_to_pide(ioc, res_ptr, bitshiftcnt); ioc 554 arch/ia64/hp/common/sba_iommu.c ioc->res_bitshift = bitshiftcnt + bits_wanted; ioc 574 arch/ia64/hp/common/sba_iommu.c tpide = ptr_to_pide(ioc, res_ptr, 0); ioc 593 arch/ia64/hp/common/sba_iommu.c ioc->res_bitshift = bits; ioc 601 arch/ia64/hp/common/sba_iommu.c prefetch(ioc->res_map); ioc 602 arch/ia64/hp/common/sba_iommu.c ioc->res_hint = (unsigned long *) ioc->res_map; ioc 603 arch/ia64/hp/common/sba_iommu.c ioc->res_bitshift = 0; ioc 604 arch/ia64/hp/common/sba_iommu.c spin_unlock_irqrestore(&ioc->res_lock, flags); ioc 608 arch/ia64/hp/common/sba_iommu.c ioc->res_hint = res_ptr; ioc 609 arch/ia64/hp/common/sba_iommu.c spin_unlock_irqrestore(&ioc->res_lock, flags); ioc 623 arch/ia64/hp/common/sba_iommu.c sba_alloc_range(struct ioc *ioc, struct device *dev, size_t size) ioc 640 arch/ia64/hp/common/sba_iommu.c pide = sba_search_bitmap(ioc, dev, pages_needed, 1); ioc 641 arch/ia64/hp/common/sba_iommu.c if (unlikely(pide >= (ioc->res_size << 3))) { ioc 642 arch/ia64/hp/common/sba_iommu.c pide = sba_search_bitmap(ioc, dev, pages_needed, 0); ioc 643 arch/ia64/hp/common/sba_iommu.c if (unlikely(pide >= (ioc->res_size << 3))) { ioc 652 arch/ia64/hp/common/sba_iommu.c spin_lock_irqsave(&ioc->saved_lock, flags); ioc 653 arch/ia64/hp/common/sba_iommu.c if (ioc->saved_cnt > 0) { ioc 655 arch/ia64/hp/common/sba_iommu.c int cnt = ioc->saved_cnt; ioc 657 arch/ia64/hp/common/sba_iommu.c d = &(ioc->saved[ioc->saved_cnt - 1]); ioc 659 arch/ia64/hp/common/sba_iommu.c spin_lock(&ioc->res_lock); ioc 661 arch/ia64/hp/common/sba_iommu.c sba_mark_invalid(ioc, d->iova, d->size); ioc 662 arch/ia64/hp/common/sba_iommu.c sba_free_range(ioc, d->iova, d->size); ioc 665 arch/ia64/hp/common/sba_iommu.c ioc->saved_cnt = 0; ioc 666 arch/ia64/hp/common/sba_iommu.c READ_REG(ioc->ioc_hpa+IOC_PCOM); /* flush purges */ ioc 667 arch/ia64/hp/common/sba_iommu.c spin_unlock(&ioc->res_lock); ioc 669 arch/ia64/hp/common/sba_iommu.c spin_unlock_irqrestore(&ioc->saved_lock, flags); ioc 671 arch/ia64/hp/common/sba_iommu.c pide = sba_search_bitmap(ioc, dev, pages_needed, 0); ioc 672 arch/ia64/hp/common/sba_iommu.c if (unlikely(pide >= (ioc->res_size << 3))) { ioc 675 arch/ia64/hp/common/sba_iommu.c __func__, ioc->ioc_hpa, ioc->res_size, ioc 682 arch/ia64/hp/common/sba_iommu.c __func__, ioc->ioc_hpa, ioc->res_size, ioc 690 arch/ia64/hp/common/sba_iommu.c ioc->avg_search[ioc->avg_idx++] = (ia64_get_itc() - itc_start) / pages_needed; ioc 691 arch/ia64/hp/common/sba_iommu.c ioc->avg_idx &= SBA_SEARCH_SAMPLE - 1; ioc 694 arch/ia64/hp/common/sba_iommu.c prefetchw(&(ioc->pdir_base[pide])); ioc 698 arch/ia64/hp/common/sba_iommu.c if(0x00 != ((u8 *) ioc->pdir_base)[pide*PDIR_ENTRY_SIZE + 7]) { ioc 699 arch/ia64/hp/common/sba_iommu.c sba_dump_pdir_entry(ioc, "sba_search_bitmap() botched it?", pide); ioc 705 arch/ia64/hp/common/sba_iommu.c (uint) ((unsigned long) ioc->res_hint - (unsigned long) ioc->res_map), ioc 706 arch/ia64/hp/common/sba_iommu.c ioc->res_bitshift ); ioc 721 arch/ia64/hp/common/sba_iommu.c sba_free_range(struct ioc *ioc, dma_addr_t iova, size_t size) ioc 723 arch/ia64/hp/common/sba_iommu.c unsigned long iovp = SBA_IOVP(ioc, iova); ioc 726 arch/ia64/hp/common/sba_iommu.c unsigned long *res_ptr = (unsigned long *) &((ioc)->res_map[ridx & ~RESMAP_IDX_MASK]); ioc 839 arch/ia64/hp/common/sba_iommu.c sba_mark_invalid(struct ioc *ioc, dma_addr_t iova, size_t byte_cnt) ioc 841 arch/ia64/hp/common/sba_iommu.c u32 iovp = (u32) SBA_IOVP(ioc,iova); ioc 851 arch/ia64/hp/common/sba_iommu.c if (!(ioc->pdir_base[off] >> 60)) { ioc 852 arch/ia64/hp/common/sba_iommu.c sba_dump_pdir_entry(ioc,"sba_mark_invalid()", PDIR_INDEX(iovp)); ioc 858 arch/ia64/hp/common/sba_iommu.c ASSERT(off < ioc->pdir_size); ioc 869 arch/ia64/hp/common/sba_iommu.c ioc->pdir_base[off] &= ~(0x80000000000000FFULL); ioc 876 arch/ia64/hp/common/sba_iommu.c ioc->pdir_base[off] = (0x80000000000000FFULL | prefetch_spill_page); ioc 886 arch/ia64/hp/common/sba_iommu.c ASSERT(ioc->pdir_base[off] >> 63); ioc 889 arch/ia64/hp/common/sba_iommu.c ioc->pdir_base[off] &= ~(0x80000000000000FFULL); ioc 891 arch/ia64/hp/common/sba_iommu.c ioc->pdir_base[off] = (0x80000000000000FFULL | prefetch_spill_page); ioc 898 arch/ia64/hp/common/sba_iommu.c WRITE_REG(iovp | ioc->ibase, ioc->ioc_hpa+IOC_PCOM); ioc 917 arch/ia64/hp/common/sba_iommu.c struct ioc *ioc; ioc 946 arch/ia64/hp/common/sba_iommu.c ioc = GET_IOC(dev); ioc 947 arch/ia64/hp/common/sba_iommu.c ASSERT(ioc); ioc 949 arch/ia64/hp/common/sba_iommu.c prefetch(ioc->res_hint); ioc 961 arch/ia64/hp/common/sba_iommu.c spin_lock_irqsave(&ioc->res_lock, flags); ioc 962 arch/ia64/hp/common/sba_iommu.c if (sba_check_pdir(ioc,"Check before sba_map_page()")) ioc 964 arch/ia64/hp/common/sba_iommu.c spin_unlock_irqrestore(&ioc->res_lock, flags); ioc 967 arch/ia64/hp/common/sba_iommu.c pide = sba_alloc_range(ioc, dev, size); ioc 975 arch/ia64/hp/common/sba_iommu.c pdir_start = &(ioc->pdir_base[pide]); ioc 992 arch/ia64/hp/common/sba_iommu.c spin_lock_irqsave(&ioc->res_lock, flags); ioc 993 arch/ia64/hp/common/sba_iommu.c sba_check_pdir(ioc,"Check after sba_map_page()"); ioc 994 arch/ia64/hp/common/sba_iommu.c spin_unlock_irqrestore(&ioc->res_lock, flags); ioc 996 arch/ia64/hp/common/sba_iommu.c return SBA_IOVA(ioc, iovp, offset); ioc 1001 arch/ia64/hp/common/sba_iommu.c sba_mark_clean(struct ioc *ioc, dma_addr_t iova, size_t size) ioc 1003 arch/ia64/hp/common/sba_iommu.c u32 iovp = (u32) SBA_IOVP(ioc,iova); ioc 1008 arch/ia64/hp/common/sba_iommu.c addr = phys_to_virt(ioc->pdir_base[off] & ioc 1013 arch/ia64/hp/common/sba_iommu.c addr = phys_to_virt(ioc->pdir_base[off] & ioc 1036 arch/ia64/hp/common/sba_iommu.c struct ioc *ioc; ioc 1043 arch/ia64/hp/common/sba_iommu.c ioc = GET_IOC(dev); ioc 1044 arch/ia64/hp/common/sba_iommu.c ASSERT(ioc); ioc 1047 arch/ia64/hp/common/sba_iommu.c if (likely((iova & ioc->imask) != ioc->ibase)) { ioc 1072 arch/ia64/hp/common/sba_iommu.c sba_mark_clean(ioc, iova, size); ioc 1076 arch/ia64/hp/common/sba_iommu.c spin_lock_irqsave(&ioc->saved_lock, flags); ioc 1077 arch/ia64/hp/common/sba_iommu.c d = &(ioc->saved[ioc->saved_cnt]); ioc 1080 arch/ia64/hp/common/sba_iommu.c if (unlikely(++(ioc->saved_cnt) >= DELAYED_RESOURCE_CNT)) { ioc 1081 arch/ia64/hp/common/sba_iommu.c int cnt = ioc->saved_cnt; ioc 1082 arch/ia64/hp/common/sba_iommu.c spin_lock(&ioc->res_lock); ioc 1084 arch/ia64/hp/common/sba_iommu.c sba_mark_invalid(ioc, d->iova, d->size); ioc 1085 arch/ia64/hp/common/sba_iommu.c sba_free_range(ioc, d->iova, d->size); ioc 1088 arch/ia64/hp/common/sba_iommu.c ioc->saved_cnt = 0; ioc 1089 arch/ia64/hp/common/sba_iommu.c READ_REG(ioc->ioc_hpa+IOC_PCOM); /* flush purges */ ioc 1090 arch/ia64/hp/common/sba_iommu.c spin_unlock(&ioc->res_lock); ioc 1092 arch/ia64/hp/common/sba_iommu.c spin_unlock_irqrestore(&ioc->saved_lock, flags); ioc 1094 arch/ia64/hp/common/sba_iommu.c spin_lock_irqsave(&ioc->res_lock, flags); ioc 1095 arch/ia64/hp/common/sba_iommu.c sba_mark_invalid(ioc, iova, size); ioc 1096 arch/ia64/hp/common/sba_iommu.c sba_free_range(ioc, iova, size); ioc 1097 arch/ia64/hp/common/sba_iommu.c READ_REG(ioc->ioc_hpa+IOC_PCOM); /* flush purges */ ioc 1098 arch/ia64/hp/common/sba_iommu.c spin_unlock_irqrestore(&ioc->res_lock, flags); ioc 1115 arch/ia64/hp/common/sba_iommu.c struct ioc *ioc; ioc 1119 arch/ia64/hp/common/sba_iommu.c ioc = GET_IOC(dev); ioc 1120 arch/ia64/hp/common/sba_iommu.c ASSERT(ioc); ioc 1122 arch/ia64/hp/common/sba_iommu.c node = ioc->node; ioc 1150 arch/ia64/hp/common/sba_iommu.c *dma_handle = sba_map_page(&ioc->sac_only_dev->dev, page, 0, size, ioc 1199 arch/ia64/hp/common/sba_iommu.c struct ioc *ioc, ioc 1231 arch/ia64/hp/common/sba_iommu.c dma_sg->dma_address = pide | ioc->ibase; ioc 1232 arch/ia64/hp/common/sba_iommu.c pdirp = &(ioc->pdir_base[pide >> iovp_shift]); ioc 1294 arch/ia64/hp/common/sba_iommu.c sba_coalesce_chunks(struct ioc *ioc, struct device *dev, ioc 1404 arch/ia64/hp/common/sba_iommu.c idx = sba_alloc_range(ioc, dev, dma_len); ioc 1434 arch/ia64/hp/common/sba_iommu.c struct ioc *ioc; ioc 1444 arch/ia64/hp/common/sba_iommu.c ioc = GET_IOC(dev); ioc 1445 arch/ia64/hp/common/sba_iommu.c ASSERT(ioc); ioc 1449 arch/ia64/hp/common/sba_iommu.c if (likely((ioc->dma_mask & ~to_pci_dev(dev)->dma_mask) == 0)) { ioc 1468 arch/ia64/hp/common/sba_iommu.c spin_lock_irqsave(&ioc->res_lock, flags); ioc 1469 arch/ia64/hp/common/sba_iommu.c if (sba_check_pdir(ioc,"Check before sba_map_sg_attrs()")) ioc 1471 arch/ia64/hp/common/sba_iommu.c sba_dump_sg(ioc, sglist, nents); ioc 1474 arch/ia64/hp/common/sba_iommu.c spin_unlock_irqrestore(&ioc->res_lock, flags); ioc 1477 arch/ia64/hp/common/sba_iommu.c prefetch(ioc->res_hint); ioc 1487 arch/ia64/hp/common/sba_iommu.c coalesced = sba_coalesce_chunks(ioc, dev, sglist, nents); ioc 1501 arch/ia64/hp/common/sba_iommu.c filled = sba_fill_pdir(ioc, sglist, nents); ioc 1504 arch/ia64/hp/common/sba_iommu.c spin_lock_irqsave(&ioc->res_lock, flags); ioc 1505 arch/ia64/hp/common/sba_iommu.c if (sba_check_pdir(ioc,"Check after sba_map_sg_attrs()")) ioc 1507 arch/ia64/hp/common/sba_iommu.c sba_dump_sg(ioc, sglist, nents); ioc 1510 arch/ia64/hp/common/sba_iommu.c spin_unlock_irqrestore(&ioc->res_lock, flags); ioc 1534 arch/ia64/hp/common/sba_iommu.c struct ioc *ioc; ioc 1542 arch/ia64/hp/common/sba_iommu.c ioc = GET_IOC(dev); ioc 1543 arch/ia64/hp/common/sba_iommu.c ASSERT(ioc); ioc 1545 arch/ia64/hp/common/sba_iommu.c spin_lock_irqsave(&ioc->res_lock, flags); ioc 1546 arch/ia64/hp/common/sba_iommu.c sba_check_pdir(ioc,"Check before sba_unmap_sg_attrs()"); ioc 1547 arch/ia64/hp/common/sba_iommu.c spin_unlock_irqrestore(&ioc->res_lock, flags); ioc 1561 arch/ia64/hp/common/sba_iommu.c spin_lock_irqsave(&ioc->res_lock, flags); ioc 1562 arch/ia64/hp/common/sba_iommu.c sba_check_pdir(ioc,"Check after sba_unmap_sg_attrs()"); ioc 1563 arch/ia64/hp/common/sba_iommu.c spin_unlock_irqrestore(&ioc->res_lock, flags); ioc 1575 arch/ia64/hp/common/sba_iommu.c ioc_iova_init(struct ioc *ioc) ioc 1589 arch/ia64/hp/common/sba_iommu.c ioc->ibase = READ_REG(ioc->ioc_hpa + IOC_IBASE) & ~0x1UL; ioc 1590 arch/ia64/hp/common/sba_iommu.c ioc->imask = READ_REG(ioc->ioc_hpa + IOC_IMASK) | 0xFFFFFFFF00000000UL; ioc 1592 arch/ia64/hp/common/sba_iommu.c ioc->iov_size = ~ioc->imask + 1; ioc 1595 arch/ia64/hp/common/sba_iommu.c __func__, ioc->ioc_hpa, ioc->ibase, ioc->imask, ioc 1596 arch/ia64/hp/common/sba_iommu.c ioc->iov_size >> 20); ioc 1608 arch/ia64/hp/common/sba_iommu.c WRITE_REG(tcnfg, ioc->ioc_hpa + IOC_TCNFG); ioc 1610 arch/ia64/hp/common/sba_iommu.c ioc->pdir_size = (ioc->iov_size / iovp_size) * PDIR_ENTRY_SIZE; ioc 1611 arch/ia64/hp/common/sba_iommu.c ioc->pdir_base = (void *) __get_free_pages(GFP_KERNEL, ioc 1612 arch/ia64/hp/common/sba_iommu.c get_order(ioc->pdir_size)); ioc 1613 arch/ia64/hp/common/sba_iommu.c if (!ioc->pdir_base) ioc 1616 arch/ia64/hp/common/sba_iommu.c memset(ioc->pdir_base, 0, ioc->pdir_size); ioc 1619 arch/ia64/hp/common/sba_iommu.c iovp_size >> 10, ioc->pdir_base, ioc->pdir_size); ioc 1621 arch/ia64/hp/common/sba_iommu.c ASSERT(ALIGN((unsigned long) ioc->pdir_base, 4*1024) == (unsigned long) ioc->pdir_base); ioc 1622 arch/ia64/hp/common/sba_iommu.c WRITE_REG(virt_to_phys(ioc->pdir_base), ioc->ioc_hpa + IOC_PDIR_BASE); ioc 1637 arch/ia64/hp/common/sba_iommu.c ioc->iov_size/2 >> 20, ioc->ibase + ioc->iov_size/2); ioc 1638 arch/ia64/hp/common/sba_iommu.c ioc->pdir_size /= 2; ioc 1639 arch/ia64/hp/common/sba_iommu.c ((u64 *)ioc->pdir_base)[PDIR_INDEX(ioc->iov_size/2)] = ZX1_SBA_IOMMU_COOKIE; ioc 1666 arch/ia64/hp/common/sba_iommu.c for (index = 0 ; index < (ioc->pdir_size / PDIR_ENTRY_SIZE) ; index++) ioc 1667 arch/ia64/hp/common/sba_iommu.c ((u64 *)ioc->pdir_base)[index] = (0x80000000000000FF | prefetch_spill_page); ioc 1671 arch/ia64/hp/common/sba_iommu.c WRITE_REG(ioc->ibase | (get_iovp_order(ioc->iov_size) + iovp_shift), ioc->ioc_hpa + IOC_PCOM); ioc 1672 arch/ia64/hp/common/sba_iommu.c READ_REG(ioc->ioc_hpa + IOC_PCOM); ioc 1675 arch/ia64/hp/common/sba_iommu.c WRITE_REG(ioc->ibase | 1, ioc->ioc_hpa + IOC_IBASE); ioc 1676 arch/ia64/hp/common/sba_iommu.c READ_REG(ioc->ioc_hpa + IOC_IBASE); ioc 1680 arch/ia64/hp/common/sba_iommu.c ioc_resource_init(struct ioc *ioc) ioc 1682 arch/ia64/hp/common/sba_iommu.c spin_lock_init(&ioc->res_lock); ioc 1684 arch/ia64/hp/common/sba_iommu.c spin_lock_init(&ioc->saved_lock); ioc 1688 arch/ia64/hp/common/sba_iommu.c ioc->res_size = ioc->pdir_size / PDIR_ENTRY_SIZE; /* entries */ ioc 1689 arch/ia64/hp/common/sba_iommu.c ioc->res_size >>= 3; /* convert bit count to byte count */ ioc 1690 arch/ia64/hp/common/sba_iommu.c DBG_INIT("%s() res_size 0x%x\n", __func__, ioc->res_size); ioc 1692 arch/ia64/hp/common/sba_iommu.c ioc->res_map = (char *) __get_free_pages(GFP_KERNEL, ioc 1693 arch/ia64/hp/common/sba_iommu.c get_order(ioc->res_size)); ioc 1694 arch/ia64/hp/common/sba_iommu.c if (!ioc->res_map) ioc 1697 arch/ia64/hp/common/sba_iommu.c memset(ioc->res_map, 0, ioc->res_size); ioc 1699 arch/ia64/hp/common/sba_iommu.c ioc->res_hint = (unsigned long *) ioc->res_map; ioc 1703 arch/ia64/hp/common/sba_iommu.c ioc->res_map[0] = 0x1; ioc 1704 arch/ia64/hp/common/sba_iommu.c ioc->pdir_base[0] = 0x8000000000000000ULL | ZX1_SBA_IOMMU_COOKIE; ioc 1708 arch/ia64/hp/common/sba_iommu.c ioc->res_map[ioc->res_size - 1] |= 0x80UL; /* res_map is chars */ ioc 1709 arch/ia64/hp/common/sba_iommu.c ioc->pdir_base[(ioc->pdir_size / PDIR_ENTRY_SIZE) - 1] = (0x80000000000000FF ioc 1714 arch/ia64/hp/common/sba_iommu.c ioc->res_size, (void *) ioc->res_map); ioc 1718 arch/ia64/hp/common/sba_iommu.c ioc_sac_init(struct ioc *ioc) ioc 1736 arch/ia64/hp/common/sba_iommu.c controller->iommu = ioc; ioc 1740 arch/ia64/hp/common/sba_iommu.c ioc->sac_only_dev = sac; ioc 1744 arch/ia64/hp/common/sba_iommu.c ioc_zx1_init(struct ioc *ioc) ioc 1749 arch/ia64/hp/common/sba_iommu.c if (ioc->rev < 0x20) ioc 1753 arch/ia64/hp/common/sba_iommu.c ioc->dma_mask = (0x1UL << 39) - 1; ioc 1762 arch/ia64/hp/common/sba_iommu.c rope_config = READ_REG(ioc->ioc_hpa + IOC_ROPE0_CFG + i); ioc 1764 arch/ia64/hp/common/sba_iommu.c WRITE_REG(rope_config, ioc->ioc_hpa + IOC_ROPE0_CFG + i); ioc 1768 arch/ia64/hp/common/sba_iommu.c typedef void (initfunc)(struct ioc *); ioc 1783 arch/ia64/hp/common/sba_iommu.c static void __init ioc_init(unsigned long hpa, struct ioc *ioc) ioc 1787 arch/ia64/hp/common/sba_iommu.c ioc->next = ioc_list; ioc 1788 arch/ia64/hp/common/sba_iommu.c ioc_list = ioc; ioc 1790 arch/ia64/hp/common/sba_iommu.c ioc->ioc_hpa = ioremap(hpa, 0x1000); ioc 1792 arch/ia64/hp/common/sba_iommu.c ioc->func_id = READ_REG(ioc->ioc_hpa + IOC_FUNC_ID); ioc 1793 arch/ia64/hp/common/sba_iommu.c ioc->rev = READ_REG(ioc->ioc_hpa + IOC_FCLASS) & 0xFFUL; ioc 1794 arch/ia64/hp/common/sba_iommu.c ioc->dma_mask = 0xFFFFFFFFFFFFFFFFUL; /* conservative */ ioc 1797 arch/ia64/hp/common/sba_iommu.c if (ioc->func_id == info->func_id) { ioc 1798 arch/ia64/hp/common/sba_iommu.c ioc->name = info->name; ioc 1800 arch/ia64/hp/common/sba_iommu.c (info->init)(ioc); ioc 1810 arch/ia64/hp/common/sba_iommu.c if (!ioc->name) { ioc 1811 arch/ia64/hp/common/sba_iommu.c ioc->name = kmalloc(24, GFP_KERNEL); ioc 1812 arch/ia64/hp/common/sba_iommu.c if (ioc->name) ioc 1813 arch/ia64/hp/common/sba_iommu.c sprintf((char *) ioc->name, "Unknown (%04x:%04x)", ioc 1814 arch/ia64/hp/common/sba_iommu.c ioc->func_id & 0xFFFF, (ioc->func_id >> 16) & 0xFFFF); ioc 1816 arch/ia64/hp/common/sba_iommu.c ioc->name = "Unknown"; ioc 1819 arch/ia64/hp/common/sba_iommu.c ioc_iova_init(ioc); ioc 1820 arch/ia64/hp/common/sba_iommu.c ioc_resource_init(ioc); ioc 1821 arch/ia64/hp/common/sba_iommu.c ioc_sac_init(ioc); ioc 1825 arch/ia64/hp/common/sba_iommu.c ioc->name, (ioc->rev >> 4) & 0xF, ioc->rev & 0xF, ioc 1826 arch/ia64/hp/common/sba_iommu.c hpa, ioc->iov_size >> 20, ioc->ibase); ioc 1844 arch/ia64/hp/common/sba_iommu.c struct ioc *ioc; ioc 1847 arch/ia64/hp/common/sba_iommu.c for (ioc = ioc_list; ioc; ioc = ioc->next) ioc 1849 arch/ia64/hp/common/sba_iommu.c return ioc; ioc 1857 arch/ia64/hp/common/sba_iommu.c struct ioc *ioc = v; ioc 1860 arch/ia64/hp/common/sba_iommu.c return ioc->next; ioc 1871 arch/ia64/hp/common/sba_iommu.c struct ioc *ioc = v; ioc 1872 arch/ia64/hp/common/sba_iommu.c unsigned long *res_ptr = (unsigned long *)ioc->res_map; ioc 1876 arch/ia64/hp/common/sba_iommu.c ioc->name, ((ioc->rev >> 4) & 0xF), (ioc->rev & 0xF)); ioc 1878 arch/ia64/hp/common/sba_iommu.c if (ioc->node != NUMA_NO_NODE) ioc 1879 arch/ia64/hp/common/sba_iommu.c seq_printf(s, "NUMA node : %d\n", ioc->node); ioc 1881 arch/ia64/hp/common/sba_iommu.c seq_printf(s, "IOVA size : %ld MB\n", ((ioc->pdir_size >> 3) * iovp_size)/(1024*1024)); ioc 1884 arch/ia64/hp/common/sba_iommu.c for (i = 0; i < (ioc->res_size / sizeof(unsigned long)); ++i, ++res_ptr) ioc 1887 arch/ia64/hp/common/sba_iommu.c seq_printf(s, "PDIR size : %d entries\n", ioc->pdir_size >> 3); ioc 1893 arch/ia64/hp/common/sba_iommu.c min = max = ioc->avg_search[0]; ioc 1895 arch/ia64/hp/common/sba_iommu.c avg += ioc->avg_search[i]; ioc 1896 arch/ia64/hp/common/sba_iommu.c if (ioc->avg_search[i] > max) max = ioc->avg_search[i]; ioc 1897 arch/ia64/hp/common/sba_iommu.c if (ioc->avg_search[i] < min) min = ioc->avg_search[i]; ioc 1935 arch/ia64/hp/common/sba_iommu.c struct ioc *ioc; ioc 1953 arch/ia64/hp/common/sba_iommu.c for (ioc = ioc_list; ioc; ioc = ioc->next) ioc 1954 arch/ia64/hp/common/sba_iommu.c if (ioc->handle == handle) { ioc 1955 arch/ia64/hp/common/sba_iommu.c PCI_CONTROLLER(bus)->iommu = ioc; ioc 1967 arch/ia64/hp/common/sba_iommu.c sba_map_ioc_to_node(struct ioc *ioc, acpi_handle handle) ioc 1976 arch/ia64/hp/common/sba_iommu.c ioc->node = node; ioc 1980 arch/ia64/hp/common/sba_iommu.c static void __init acpi_sba_ioc_add(struct ioc *ioc) ioc 1982 arch/ia64/hp/common/sba_iommu.c acpi_handle handle = ioc->handle; ioc 1987 arch/ia64/hp/common/sba_iommu.c ioc_found = ioc->next; ioc 2015 arch/ia64/hp/common/sba_iommu.c ioc_init(hpa, ioc); ioc 2017 arch/ia64/hp/common/sba_iommu.c sba_map_ioc_to_node(ioc, handle); ioc 2021 arch/ia64/hp/common/sba_iommu.c kfree(ioc); ioc 2033 arch/ia64/hp/common/sba_iommu.c struct ioc *ioc; ioc 2035 arch/ia64/hp/common/sba_iommu.c ioc = kzalloc(sizeof(*ioc), GFP_KERNEL); ioc 2036 arch/ia64/hp/common/sba_iommu.c if (!ioc) ioc 2039 arch/ia64/hp/common/sba_iommu.c ioc->next = ioc_found; ioc 2040 arch/ia64/hp/common/sba_iommu.c ioc_found = ioc; ioc 2041 arch/ia64/hp/common/sba_iommu.c ioc->handle = device->handle; ioc 59 arch/parisc/include/asm/pci.h struct ioc *iommu; /* IOMMU this device is under */ ioc 86 arch/parisc/include/asm/ropes.h struct ioc ioc[MAX_IOC]; ioc 105 arch/x86/kernel/msr.c static long msr_ioctl(struct file *file, unsigned int ioc, unsigned long arg) ioc 112 arch/x86/kernel/msr.c switch (ioc) { ioc 400 block/bfq-iosched.c struct io_context *ioc, ioc 403 block/bfq-iosched.c if (ioc) { ioc 408 block/bfq-iosched.c icq = icq_to_bic(ioc_lookup_icq(ioc, q)); ioc 5022 block/bfq-iosched.c int ioprio = bic->icq.ioc->ioprio; ioc 5240 block/bfq-iosched.c if (atomic_read(&bic->icq.ioc->active_ref) == 0 || ioc 1284 block/blk-cgroup.c struct io_context *ioc; ioc 1290 block/blk-cgroup.c ioc = task->io_context; ioc 1291 block/blk-cgroup.c if (ioc && atomic_read(&ioc->nr_tasks) > 1) ioc 26 block/blk-ioc.c void get_io_context(struct io_context *ioc) ioc 28 block/blk-ioc.c BUG_ON(atomic_long_read(&ioc->refcount) <= 0); ioc 29 block/blk-ioc.c atomic_long_inc(&ioc->refcount); ioc 62 block/blk-ioc.c struct io_context *ioc = icq->ioc; ioc 66 block/blk-ioc.c lockdep_assert_held(&ioc->lock); ioc 68 block/blk-ioc.c radix_tree_delete(&ioc->icq_tree, icq->q->id); ioc 77 block/blk-ioc.c if (rcu_access_pointer(ioc->icq_hint) == icq) ioc 78 block/blk-ioc.c rcu_assign_pointer(ioc->icq_hint, NULL); ioc 97 block/blk-ioc.c struct io_context *ioc = container_of(work, struct io_context, ioc 107 block/blk-ioc.c spin_lock_irqsave_nested(&ioc->lock, flags, 1); ioc 109 block/blk-ioc.c while (!hlist_empty(&ioc->icq_list)) { ioc 110 block/blk-ioc.c struct io_cq *icq = hlist_entry(ioc->icq_list.first, ioc 118 block/blk-ioc.c spin_unlock_irqrestore(&ioc->lock, flags); ioc 120 block/blk-ioc.c spin_lock_irqsave_nested(&ioc->lock, flags, 1); ioc 124 block/blk-ioc.c spin_unlock_irqrestore(&ioc->lock, flags); ioc 126 block/blk-ioc.c kmem_cache_free(iocontext_cachep, ioc); ioc 136 block/blk-ioc.c void put_io_context(struct io_context *ioc) ioc 141 block/blk-ioc.c if (ioc == NULL) ioc 144 block/blk-ioc.c BUG_ON(atomic_long_read(&ioc->refcount) <= 0); ioc 150 block/blk-ioc.c if (atomic_long_dec_and_test(&ioc->refcount)) { ioc 151 block/blk-ioc.c spin_lock_irqsave(&ioc->lock, flags); ioc 152 block/blk-ioc.c if (!hlist_empty(&ioc->icq_list)) ioc 154 block/blk-ioc.c &ioc->release_work); ioc 157 block/blk-ioc.c spin_unlock_irqrestore(&ioc->lock, flags); ioc 161 block/blk-ioc.c kmem_cache_free(iocontext_cachep, ioc); ioc 171 block/blk-ioc.c void put_io_context_active(struct io_context *ioc) ioc 176 block/blk-ioc.c if (!atomic_dec_and_test(&ioc->active_ref)) { ioc 177 block/blk-ioc.c put_io_context(ioc); ioc 186 block/blk-ioc.c spin_lock_irqsave_nested(&ioc->lock, flags, 1); ioc 187 block/blk-ioc.c hlist_for_each_entry(icq, &ioc->icq_list, ioc_node) { ioc 193 block/blk-ioc.c spin_unlock_irqrestore(&ioc->lock, flags); ioc 195 block/blk-ioc.c put_io_context(ioc); ioc 201 block/blk-ioc.c struct io_context *ioc; ioc 204 block/blk-ioc.c ioc = task->io_context; ioc 208 block/blk-ioc.c atomic_dec(&ioc->nr_tasks); ioc 209 block/blk-ioc.c put_io_context_active(ioc); ioc 220 block/blk-ioc.c struct io_context *ioc = icq->ioc; ioc 222 block/blk-ioc.c spin_lock_irqsave(&ioc->lock, flags); ioc 224 block/blk-ioc.c spin_unlock_irqrestore(&ioc->lock, flags); ioc 228 block/blk-ioc.c spin_unlock_irqrestore(&ioc->lock, flags); ioc 252 block/blk-ioc.c struct io_context *ioc; ioc 255 block/blk-ioc.c ioc = kmem_cache_alloc_node(iocontext_cachep, gfp_flags | __GFP_ZERO, ioc 257 block/blk-ioc.c if (unlikely(!ioc)) ioc 261 block/blk-ioc.c atomic_long_set(&ioc->refcount, 1); ioc 262 block/blk-ioc.c atomic_set(&ioc->nr_tasks, 1); ioc 263 block/blk-ioc.c atomic_set(&ioc->active_ref, 1); ioc 264 block/blk-ioc.c spin_lock_init(&ioc->lock); ioc 265 block/blk-ioc.c INIT_RADIX_TREE(&ioc->icq_tree, GFP_ATOMIC); ioc 266 block/blk-ioc.c INIT_HLIST_HEAD(&ioc->icq_list); ioc 267 block/blk-ioc.c INIT_WORK(&ioc->release_work, ioc_release_fn); ioc 279 block/blk-ioc.c task->io_context = ioc; ioc 281 block/blk-ioc.c kmem_cache_free(iocontext_cachep, ioc); ioc 306 block/blk-ioc.c struct io_context *ioc; ioc 312 block/blk-ioc.c ioc = task->io_context; ioc 313 block/blk-ioc.c if (likely(ioc)) { ioc 314 block/blk-ioc.c get_io_context(ioc); ioc 316 block/blk-ioc.c return ioc; ioc 332 block/blk-ioc.c struct io_cq *ioc_lookup_icq(struct io_context *ioc, struct request_queue *q) ioc 345 block/blk-ioc.c icq = rcu_dereference(ioc->icq_hint); ioc 349 block/blk-ioc.c icq = radix_tree_lookup(&ioc->icq_tree, q->id); ioc 351 block/blk-ioc.c rcu_assign_pointer(ioc->icq_hint, icq); /* allowed to race */ ioc 372 block/blk-ioc.c struct io_cq *ioc_create_icq(struct io_context *ioc, struct request_queue *q, ioc 389 block/blk-ioc.c icq->ioc = ioc; ioc 396 block/blk-ioc.c spin_lock(&ioc->lock); ioc 398 block/blk-ioc.c if (likely(!radix_tree_insert(&ioc->icq_tree, q->id, icq))) { ioc 399 block/blk-ioc.c hlist_add_head(&icq->ioc_node, &ioc->icq_list); ioc 405 block/blk-ioc.c icq = ioc_lookup_icq(ioc, q); ioc 410 block/blk-ioc.c spin_unlock(&ioc->lock); ioc 432 block/blk-iocost.c struct ioc *ioc; ioc 611 block/blk-iocost.c static struct ioc *rqos_to_ioc(struct rq_qos *rqos) ioc 613 block/blk-iocost.c return container_of(rqos, struct ioc, rqos); ioc 616 block/blk-iocost.c static struct ioc *q_to_ioc(struct request_queue *q) ioc 629 block/blk-iocost.c static const char __maybe_unused *ioc_name(struct ioc *ioc) ioc 631 block/blk-iocost.c return q_name(ioc->rqos.q); ioc 682 block/blk-iocost.c static void ioc_refresh_period_us(struct ioc *ioc) ioc 686 block/blk-iocost.c lockdep_assert_held(&ioc->lock); ioc 689 block/blk-iocost.c if (ioc->params.qos[QOS_RLAT] >= ioc->params.qos[QOS_WLAT]) { ioc 690 block/blk-iocost.c ppm = ioc->params.qos[QOS_RPPM]; ioc 691 block/blk-iocost.c lat = ioc->params.qos[QOS_RLAT]; ioc 693 block/blk-iocost.c ppm = ioc->params.qos[QOS_WPPM]; ioc 694 block/blk-iocost.c lat = ioc->params.qos[QOS_WLAT]; ioc 713 block/blk-iocost.c ioc->period_us = period_us; ioc 714 block/blk-iocost.c ioc->margin_us = period_us * MARGIN_PCT / 100; ioc 715 block/blk-iocost.c ioc->inuse_margin_vtime = DIV64_U64_ROUND_UP( ioc 719 block/blk-iocost.c static int ioc_autop_idx(struct ioc *ioc) ioc 721 block/blk-iocost.c int idx = ioc->autop_idx; ioc 727 block/blk-iocost.c if (!blk_queue_nonrot(ioc->rqos.q)) ioc 731 block/blk-iocost.c if (blk_queue_depth(ioc->rqos.q) == 1) ioc 739 block/blk-iocost.c if (ioc->user_qos_params || ioc->user_cost_model) ioc 743 block/blk-iocost.c vrate_pct = div64_u64(atomic64_read(&ioc->vtime_rate) * 100, ioc 748 block/blk-iocost.c if (!ioc->autop_too_fast_at) ioc 749 block/blk-iocost.c ioc->autop_too_fast_at = now_ns; ioc 750 block/blk-iocost.c if (now_ns - ioc->autop_too_fast_at >= AUTOP_CYCLE_NSEC) ioc 753 block/blk-iocost.c ioc->autop_too_fast_at = 0; ioc 757 block/blk-iocost.c if (!ioc->autop_too_slow_at) ioc 758 block/blk-iocost.c ioc->autop_too_slow_at = now_ns; ioc 759 block/blk-iocost.c if (now_ns - ioc->autop_too_slow_at >= AUTOP_CYCLE_NSEC) ioc 762 block/blk-iocost.c ioc->autop_too_slow_at = 0; ioc 805 block/blk-iocost.c static void ioc_refresh_lcoefs(struct ioc *ioc) ioc 807 block/blk-iocost.c u64 *u = ioc->params.i_lcoefs; ioc 808 block/blk-iocost.c u64 *c = ioc->params.lcoefs; ioc 816 block/blk-iocost.c static bool ioc_refresh_params(struct ioc *ioc, bool force) ioc 821 block/blk-iocost.c lockdep_assert_held(&ioc->lock); ioc 823 block/blk-iocost.c idx = ioc_autop_idx(ioc); ioc 826 block/blk-iocost.c if (idx == ioc->autop_idx && !force) ioc 829 block/blk-iocost.c if (idx != ioc->autop_idx) ioc 830 block/blk-iocost.c atomic64_set(&ioc->vtime_rate, VTIME_PER_USEC); ioc 832 block/blk-iocost.c ioc->autop_idx = idx; ioc 833 block/blk-iocost.c ioc->autop_too_fast_at = 0; ioc 834 block/blk-iocost.c ioc->autop_too_slow_at = 0; ioc 836 block/blk-iocost.c if (!ioc->user_qos_params) ioc 837 block/blk-iocost.c memcpy(ioc->params.qos, p->qos, sizeof(p->qos)); ioc 838 block/blk-iocost.c if (!ioc->user_cost_model) ioc 839 block/blk-iocost.c memcpy(ioc->params.i_lcoefs, p->i_lcoefs, sizeof(p->i_lcoefs)); ioc 841 block/blk-iocost.c ioc_refresh_period_us(ioc); ioc 842 block/blk-iocost.c ioc_refresh_lcoefs(ioc); ioc 844 block/blk-iocost.c ioc->vrate_min = DIV64_U64_ROUND_UP((u64)ioc->params.qos[QOS_MIN] * ioc 846 block/blk-iocost.c ioc->vrate_max = div64_u64((u64)ioc->params.qos[QOS_MAX] * ioc 853 block/blk-iocost.c static void ioc_now(struct ioc *ioc, struct ioc_now *now) ioc 859 block/blk-iocost.c now->vrate = atomic64_read(&ioc->vtime_rate); ioc 870 block/blk-iocost.c seq = read_seqcount_begin(&ioc->period_seqcount); ioc 871 block/blk-iocost.c now->vnow = ioc->period_at_vtime + ioc 872 block/blk-iocost.c (now->now - ioc->period_at) * now->vrate; ioc 873 block/blk-iocost.c } while (read_seqcount_retry(&ioc->period_seqcount, seq)); ioc 876 block/blk-iocost.c static void ioc_start_period(struct ioc *ioc, struct ioc_now *now) ioc 878 block/blk-iocost.c lockdep_assert_held(&ioc->lock); ioc 879 block/blk-iocost.c WARN_ON_ONCE(ioc->running != IOC_RUNNING); ioc 881 block/blk-iocost.c write_seqcount_begin(&ioc->period_seqcount); ioc 882 block/blk-iocost.c ioc->period_at = now->now; ioc 883 block/blk-iocost.c ioc->period_at_vtime = now->vnow; ioc 884 block/blk-iocost.c write_seqcount_end(&ioc->period_seqcount); ioc 886 block/blk-iocost.c ioc->timer.expires = jiffies + usecs_to_jiffies(ioc->period_us); ioc 887 block/blk-iocost.c add_timer(&ioc->timer); ioc 896 block/blk-iocost.c struct ioc *ioc = iocg->ioc; ioc 899 block/blk-iocost.c lockdep_assert_held(&ioc->lock); ioc 936 block/blk-iocost.c ioc->weights_updated = true; ioc 939 block/blk-iocost.c static void commit_active_weights(struct ioc *ioc) ioc 941 block/blk-iocost.c lockdep_assert_held(&ioc->lock); ioc 943 block/blk-iocost.c if (ioc->weights_updated) { ioc 946 block/blk-iocost.c atomic_inc(&ioc->hweight_gen); ioc 947 block/blk-iocost.c ioc->weights_updated = false; ioc 954 block/blk-iocost.c commit_active_weights(iocg->ioc); ioc 959 block/blk-iocost.c struct ioc *ioc = iocg->ioc; ioc 965 block/blk-iocost.c ioc_gen = atomic_read(&ioc->hweight_gen); ioc 1013 block/blk-iocost.c struct ioc *ioc = iocg->ioc; ioc 1018 block/blk-iocost.c lockdep_assert_held(&ioc->lock); ioc 1029 block/blk-iocost.c struct ioc *ioc = iocg->ioc; ioc 1039 block/blk-iocost.c ioc_now(ioc, now); ioc 1040 block/blk-iocost.c cur_period = atomic64_read(&ioc->cur_period); ioc 1050 block/blk-iocost.c spin_lock_irq(&ioc->lock); ioc 1052 block/blk-iocost.c ioc_now(ioc, now); ioc 1055 block/blk-iocost.c cur_period = atomic64_read(&ioc->cur_period); ioc 1075 block/blk-iocost.c max_period_delta = DIV64_U64_ROUND_UP(VTIME_VALID_DUR, ioc->period_us); ioc 1077 block/blk-iocost.c vmargin = ioc->margin_us * now->vrate; ioc 1092 block/blk-iocost.c iocg->hweight_gen = atomic_read(&ioc->hweight_gen) - 1; ioc 1093 block/blk-iocost.c list_add(&iocg->active_list, &ioc->active_iocgs); ioc 1102 block/blk-iocost.c if (ioc->running == IOC_IDLE) { ioc 1103 block/blk-iocost.c ioc->running = IOC_RUNNING; ioc 1104 block/blk-iocost.c ioc_start_period(ioc, now); ioc 1108 block/blk-iocost.c spin_unlock_irq(&ioc->lock); ioc 1112 block/blk-iocost.c spin_unlock_irq(&ioc->lock); ioc 1144 block/blk-iocost.c struct ioc *ioc = iocg->ioc; ioc 1146 block/blk-iocost.c u64 margin_ns = (u64)(ioc->period_us * ioc 1203 block/blk-iocost.c ioc_now(iocg->ioc, &now); ioc 1214 block/blk-iocost.c struct ioc *ioc = iocg->ioc; ioc 1217 block/blk-iocost.c u64 vmargin = ioc->margin_us * now->vrate; ioc 1218 block/blk-iocost.c u64 margin_ns = ioc->margin_us * NSEC_PER_USEC; ioc 1270 block/blk-iocost.c ioc_now(iocg->ioc, &now); ioc 1277 block/blk-iocost.c static void ioc_lat_stat(struct ioc *ioc, u32 *missed_ppm_ar, u32 *rq_wait_pct_p) ioc 1285 block/blk-iocost.c struct ioc_pcpu_stat *stat = per_cpu_ptr(ioc->pcpu_stat, cpu); ioc 1313 block/blk-iocost.c ioc->period_us * NSEC_PER_USEC); ioc 1319 block/blk-iocost.c struct ioc *ioc = iocg->ioc; ioc 1323 block/blk-iocost.c atomic64_read(&ioc->cur_period)) ioc 1349 block/blk-iocost.c struct ioc *ioc = container_of(timer, struct ioc, timer); ioc 1353 block/blk-iocost.c u32 ppm_rthr = MILLION - ioc->params.qos[QOS_RPPM]; ioc 1354 block/blk-iocost.c u32 ppm_wthr = MILLION - ioc->params.qos[QOS_WPPM]; ioc 1360 block/blk-iocost.c ioc_lat_stat(ioc, missed_ppm, &rq_wait_pct); ioc 1363 block/blk-iocost.c spin_lock_irq(&ioc->lock); ioc 1365 block/blk-iocost.c ioc_now(ioc, &now); ioc 1367 block/blk-iocost.c period_vtime = now.vnow - ioc->period_at_vtime; ioc 1369 block/blk-iocost.c spin_unlock_irq(&ioc->lock); ioc 1379 block/blk-iocost.c list_for_each_entry_safe(iocg, tiocg, &ioc->active_iocgs, active_list) { ioc 1399 block/blk-iocost.c commit_active_weights(ioc); ioc 1402 block/blk-iocost.c list_for_each_entry(iocg, &ioc->active_iocgs, active_list) { ioc 1454 block/blk-iocost.c vmargin = ioc->margin_us * now.vrate; ioc 1505 block/blk-iocost.c list_for_each_entry(iocg, &ioc->active_iocgs, active_list) { ioc 1537 block/blk-iocost.c commit_active_weights(ioc); ioc 1545 block/blk-iocost.c prev_busy_level = ioc->busy_level; ioc 1549 block/blk-iocost.c ioc->busy_level = max(ioc->busy_level, 0); ioc 1550 block/blk-iocost.c ioc->busy_level++; ioc 1556 block/blk-iocost.c ioc->busy_level = min(ioc->busy_level, 0); ioc 1559 block/blk-iocost.c ioc->busy_level--; ioc 1562 block/blk-iocost.c ioc->busy_level = 0; ioc 1565 block/blk-iocost.c ioc->busy_level = clamp(ioc->busy_level, -1000, 1000); ioc 1567 block/blk-iocost.c if (ioc->busy_level > 0 || (ioc->busy_level < 0 && !nr_lagging)) { ioc 1568 block/blk-iocost.c u64 vrate = atomic64_read(&ioc->vtime_rate); ioc 1569 block/blk-iocost.c u64 vrate_min = ioc->vrate_min, vrate_max = ioc->vrate_max; ioc 1589 block/blk-iocost.c int idx = min_t(int, abs(ioc->busy_level), ioc 1593 block/blk-iocost.c if (ioc->busy_level > 0) ioc 1602 block/blk-iocost.c trace_iocost_ioc_vrate_adj(ioc, vrate, missed_ppm, rq_wait_pct, ioc 1606 block/blk-iocost.c atomic64_set(&ioc->vtime_rate, vrate); ioc 1607 block/blk-iocost.c ioc->inuse_margin_vtime = DIV64_U64_ROUND_UP( ioc 1608 block/blk-iocost.c ioc->period_us * vrate * INUSE_MARGIN_PCT, 100); ioc 1609 block/blk-iocost.c } else if (ioc->busy_level != prev_busy_level || nr_lagging) { ioc 1610 block/blk-iocost.c trace_iocost_ioc_vrate_adj(ioc, atomic64_read(&ioc->vtime_rate), ioc 1615 block/blk-iocost.c ioc_refresh_params(ioc, false); ioc 1621 block/blk-iocost.c atomic64_inc(&ioc->cur_period); ioc 1623 block/blk-iocost.c if (ioc->running != IOC_STOP) { ioc 1624 block/blk-iocost.c if (!list_empty(&ioc->active_iocgs)) { ioc 1625 block/blk-iocost.c ioc_start_period(ioc, &now); ioc 1627 block/blk-iocost.c ioc->busy_level = 0; ioc 1628 block/blk-iocost.c ioc->running = IOC_IDLE; ioc 1632 block/blk-iocost.c spin_unlock_irq(&ioc->lock); ioc 1638 block/blk-iocost.c struct ioc *ioc = iocg->ioc; ioc 1646 block/blk-iocost.c coef_seqio = ioc->params.lcoefs[LCOEF_RSEQIO]; ioc 1647 block/blk-iocost.c coef_randio = ioc->params.lcoefs[LCOEF_RRANDIO]; ioc 1648 block/blk-iocost.c coef_page = ioc->params.lcoefs[LCOEF_RPAGE]; ioc 1651 block/blk-iocost.c coef_seqio = ioc->params.lcoefs[LCOEF_WSEQIO]; ioc 1652 block/blk-iocost.c coef_randio = ioc->params.lcoefs[LCOEF_WRANDIO]; ioc 1653 block/blk-iocost.c coef_page = ioc->params.lcoefs[LCOEF_WPAGE]; ioc 1687 block/blk-iocost.c struct ioc *ioc = rqos_to_ioc(rqos); ioc 1695 block/blk-iocost.c if (!ioc->enabled || !iocg->level) ioc 1713 block/blk-iocost.c time_after_eq64(vtime + ioc->inuse_margin_vtime, now.vnow)) { ioc 1716 block/blk-iocost.c spin_lock_irq(&ioc->lock); ioc 1718 block/blk-iocost.c spin_unlock_irq(&ioc->lock); ioc 1814 block/blk-iocost.c struct ioc *ioc = iocg->ioc; ioc 1822 block/blk-iocost.c if (!ioc->enabled || !iocg->level) ioc 1829 block/blk-iocost.c ioc_now(ioc, &now); ioc 1873 block/blk-iocost.c struct ioc *ioc = rqos_to_ioc(rqos); ioc 1877 block/blk-iocost.c if (!ioc->enabled || !rq->alloc_time_ns || !rq->start_time_ns) ioc 1896 block/blk-iocost.c if (on_q_ns <= ioc->params.qos[pidx] * NSEC_PER_USEC) ioc 1897 block/blk-iocost.c this_cpu_inc(ioc->pcpu_stat->missed[rw].nr_met); ioc 1899 block/blk-iocost.c this_cpu_inc(ioc->pcpu_stat->missed[rw].nr_missed); ioc 1901 block/blk-iocost.c this_cpu_add(ioc->pcpu_stat->rq_wait_ns, rq_wait_ns); ioc 1906 block/blk-iocost.c struct ioc *ioc = rqos_to_ioc(rqos); ioc 1908 block/blk-iocost.c spin_lock_irq(&ioc->lock); ioc 1909 block/blk-iocost.c ioc_refresh_params(ioc, false); ioc 1910 block/blk-iocost.c spin_unlock_irq(&ioc->lock); ioc 1915 block/blk-iocost.c struct ioc *ioc = rqos_to_ioc(rqos); ioc 1919 block/blk-iocost.c spin_lock_irq(&ioc->lock); ioc 1920 block/blk-iocost.c ioc->running = IOC_STOP; ioc 1921 block/blk-iocost.c spin_unlock_irq(&ioc->lock); ioc 1923 block/blk-iocost.c del_timer_sync(&ioc->timer); ioc 1924 block/blk-iocost.c free_percpu(ioc->pcpu_stat); ioc 1925 block/blk-iocost.c kfree(ioc); ioc 1939 block/blk-iocost.c struct ioc *ioc; ioc 1943 block/blk-iocost.c ioc = kzalloc(sizeof(*ioc), GFP_KERNEL); ioc 1944 block/blk-iocost.c if (!ioc) ioc 1947 block/blk-iocost.c ioc->pcpu_stat = alloc_percpu(struct ioc_pcpu_stat); ioc 1948 block/blk-iocost.c if (!ioc->pcpu_stat) { ioc 1949 block/blk-iocost.c kfree(ioc); ioc 1953 block/blk-iocost.c rqos = &ioc->rqos; ioc 1958 block/blk-iocost.c spin_lock_init(&ioc->lock); ioc 1959 block/blk-iocost.c timer_setup(&ioc->timer, ioc_timer_fn, 0); ioc 1960 block/blk-iocost.c INIT_LIST_HEAD(&ioc->active_iocgs); ioc 1962 block/blk-iocost.c ioc->running = IOC_IDLE; ioc 1963 block/blk-iocost.c atomic64_set(&ioc->vtime_rate, VTIME_PER_USEC); ioc 1964 block/blk-iocost.c seqcount_init(&ioc->period_seqcount); ioc 1965 block/blk-iocost.c ioc->period_at = ktime_to_us(ktime_get()); ioc 1966 block/blk-iocost.c atomic64_set(&ioc->cur_period, 0); ioc 1967 block/blk-iocost.c atomic_set(&ioc->hweight_gen, 0); ioc 1969 block/blk-iocost.c spin_lock_irq(&ioc->lock); ioc 1970 block/blk-iocost.c ioc->autop_idx = AUTOP_INVALID; ioc 1971 block/blk-iocost.c ioc_refresh_params(ioc, true); ioc 1972 block/blk-iocost.c spin_unlock_irq(&ioc->lock); ioc 1978 block/blk-iocost.c free_percpu(ioc->pcpu_stat); ioc 1979 block/blk-iocost.c kfree(ioc); ioc 2020 block/blk-iocost.c struct ioc *ioc = q_to_ioc(blkg->q); ioc 2025 block/blk-iocost.c ioc_now(ioc, &now); ioc 2027 block/blk-iocost.c iocg->ioc = ioc; ioc 2030 block/blk-iocost.c atomic64_set(&iocg->active_period, atomic64_read(&ioc->cur_period)); ioc 2048 block/blk-iocost.c spin_lock_irqsave(&ioc->lock, flags); ioc 2050 block/blk-iocost.c spin_unlock_irqrestore(&ioc->lock, flags); ioc 2056 block/blk-iocost.c struct ioc *ioc = iocg->ioc; ioc 2058 block/blk-iocost.c if (ioc) { ioc 2059 block/blk-iocost.c spin_lock(&ioc->lock); ioc 2064 block/blk-iocost.c spin_unlock(&ioc->lock); ioc 2120 block/blk-iocost.c spin_lock_irq(&iocg->ioc->lock); ioc 2122 block/blk-iocost.c spin_unlock_irq(&iocg->ioc->lock); ioc 2145 block/blk-iocost.c spin_lock(&iocg->ioc->lock); ioc 2148 block/blk-iocost.c spin_unlock(&iocg->ioc->lock); ioc 2162 block/blk-iocost.c struct ioc *ioc = pd_to_iocg(pd)->ioc; ioc 2168 block/blk-iocost.c dname, ioc->enabled, ioc->user_qos_params ? "user" : "auto", ioc 2169 block/blk-iocost.c ioc->params.qos[QOS_RPPM] / 10000, ioc 2170 block/blk-iocost.c ioc->params.qos[QOS_RPPM] % 10000 / 100, ioc 2171 block/blk-iocost.c ioc->params.qos[QOS_RLAT], ioc 2172 block/blk-iocost.c ioc->params.qos[QOS_WPPM] / 10000, ioc 2173 block/blk-iocost.c ioc->params.qos[QOS_WPPM] % 10000 / 100, ioc 2174 block/blk-iocost.c ioc->params.qos[QOS_WLAT], ioc 2175 block/blk-iocost.c ioc->params.qos[QOS_MIN] / 10000, ioc 2176 block/blk-iocost.c ioc->params.qos[QOS_MIN] % 10000 / 100, ioc 2177 block/blk-iocost.c ioc->params.qos[QOS_MAX] / 10000, ioc 2178 block/blk-iocost.c ioc->params.qos[QOS_MAX] % 10000 / 100); ioc 2211 block/blk-iocost.c struct ioc *ioc; ioc 2221 block/blk-iocost.c ioc = q_to_ioc(disk->queue); ioc 2222 block/blk-iocost.c if (!ioc) { ioc 2226 block/blk-iocost.c ioc = q_to_ioc(disk->queue); ioc 2229 block/blk-iocost.c spin_lock_irq(&ioc->lock); ioc 2230 block/blk-iocost.c memcpy(qos, ioc->params.qos, sizeof(qos)); ioc 2231 block/blk-iocost.c enable = ioc->enabled; ioc 2232 block/blk-iocost.c user = ioc->user_qos_params; ioc 2233 block/blk-iocost.c spin_unlock_irq(&ioc->lock); ioc 2300 block/blk-iocost.c spin_lock_irq(&ioc->lock); ioc 2303 block/blk-iocost.c blk_queue_flag_set(QUEUE_FLAG_RQ_ALLOC_TIME, ioc->rqos.q); ioc 2304 block/blk-iocost.c ioc->enabled = true; ioc 2306 block/blk-iocost.c blk_queue_flag_clear(QUEUE_FLAG_RQ_ALLOC_TIME, ioc->rqos.q); ioc 2307 block/blk-iocost.c ioc->enabled = false; ioc 2311 block/blk-iocost.c memcpy(ioc->params.qos, qos, sizeof(qos)); ioc 2312 block/blk-iocost.c ioc->user_qos_params = true; ioc 2314 block/blk-iocost.c ioc->user_qos_params = false; ioc 2317 block/blk-iocost.c ioc_refresh_params(ioc, true); ioc 2318 block/blk-iocost.c spin_unlock_irq(&ioc->lock); ioc 2333 block/blk-iocost.c struct ioc *ioc = pd_to_iocg(pd)->ioc; ioc 2334 block/blk-iocost.c u64 *u = ioc->params.i_lcoefs; ioc 2342 block/blk-iocost.c dname, ioc->user_cost_model ? "user" : "auto", ioc 2377 block/blk-iocost.c struct ioc *ioc; ioc 2387 block/blk-iocost.c ioc = q_to_ioc(disk->queue); ioc 2388 block/blk-iocost.c if (!ioc) { ioc 2392 block/blk-iocost.c ioc = q_to_ioc(disk->queue); ioc 2395 block/blk-iocost.c spin_lock_irq(&ioc->lock); ioc 2396 block/blk-iocost.c memcpy(u, ioc->params.i_lcoefs, sizeof(u)); ioc 2397 block/blk-iocost.c user = ioc->user_cost_model; ioc 2398 block/blk-iocost.c spin_unlock_irq(&ioc->lock); ioc 2435 block/blk-iocost.c spin_lock_irq(&ioc->lock); ioc 2437 block/blk-iocost.c memcpy(ioc->params.i_lcoefs, u, sizeof(u)); ioc 2438 block/blk-iocost.c ioc->user_cost_model = true; ioc 2440 block/blk-iocost.c ioc->user_cost_model = false; ioc 2442 block/blk-iocost.c ioc_refresh_params(ioc, true); ioc 2443 block/blk-iocost.c spin_unlock_irq(&ioc->lock); ioc 38 block/blk-mq-sched.c struct io_context *ioc; ioc 44 block/blk-mq-sched.c ioc = current->io_context; ioc 45 block/blk-mq-sched.c if (!ioc) ioc 49 block/blk-mq-sched.c icq = ioc_lookup_icq(ioc, q); ioc 53 block/blk-mq-sched.c icq = ioc_create_icq(ioc, q, GFP_ATOMIC); ioc 57 block/blk-mq-sched.c get_io_context(icq->ioc); ioc 520 block/blk-mq.c put_io_context(rq->elv.icq->ioc); ioc 280 block/blk.h void get_io_context(struct io_context *ioc); ioc 281 block/blk.h struct io_cq *ioc_lookup_icq(struct io_context *ioc, struct request_queue *q); ioc 282 block/blk.h struct io_cq *ioc_create_icq(struct io_context *ioc, struct request_queue *q, ioc 39 block/ioprio.c struct io_context *ioc; ioc 55 block/ioprio.c ioc = get_task_io_context(task, GFP_ATOMIC, NUMA_NO_NODE); ioc 56 block/ioprio.c if (ioc) { ioc 57 block/ioprio.c ioc->ioprio = ioprio; ioc 58 block/ioprio.c put_io_context(ioc); ioc 504 drivers/block/sx8.c struct carm_msg_ioctl *ioc; ioc 518 drivers/block/sx8.c ioc = carm_ref_msg(host, rq->tag); ioc 529 drivers/block/sx8.c memset(ioc, 0, sizeof(*ioc)); ioc 530 drivers/block/sx8.c ioc->type = CARM_MSG_ARRAY; ioc 531 drivers/block/sx8.c ioc->subtype = CARM_ARRAY_INFO; ioc 532 drivers/block/sx8.c ioc->array_id = (u8) array_idx; ioc 533 drivers/block/sx8.c ioc->handle = cpu_to_le32(TAG_ENCODE(rq->tag)); ioc 534 drivers/block/sx8.c ioc->data_addr = cpu_to_le32(msg_data); ioc 559 drivers/block/sx8.c struct carm_msg_ioctl *ioc; ioc 573 drivers/block/sx8.c ioc = mem; ioc 574 drivers/block/sx8.c crq->msg_type = ioc->type; ioc 575 drivers/block/sx8.c crq->msg_subtype = ioc->subtype; ioc 630 drivers/block/sx8.c struct carm_msg_ioctl *ioc = mem; ioc 634 drivers/block/sx8.c memset(ioc, 0, sizeof(*ioc)); ioc 635 drivers/block/sx8.c ioc->type = CARM_MSG_IOCTL; ioc 636 drivers/block/sx8.c ioc->subtype = CARM_IOC_SCAN_CHAN; ioc 637 drivers/block/sx8.c ioc->handle = cpu_to_le32(TAG_ENCODE(idx)); ioc 638 drivers/block/sx8.c ioc->data_addr = cpu_to_le32(msg_data); ioc 650 drivers/block/sx8.c struct carm_msg_get_fw_ver *ioc = mem; ioc 651 drivers/block/sx8.c u32 msg_data = (u32) (carm_ref_msg_dma(host, idx) + sizeof(*ioc)); ioc 653 drivers/block/sx8.c memset(ioc, 0, sizeof(*ioc)); ioc 654 drivers/block/sx8.c ioc->type = CARM_MSG_MISC; ioc 655 drivers/block/sx8.c ioc->subtype = MISC_GET_FW_VER; ioc 656 drivers/block/sx8.c ioc->handle = cpu_to_le32(TAG_ENCODE(idx)); ioc 657 drivers/block/sx8.c ioc->data_addr = cpu_to_le32(msg_data); ioc 411 drivers/char/agp/parisc-agp.c parisc_agp_setup(sba_list->ioc[0].ioc_hpa, lbadev->hba.base_addr); ioc 97 drivers/crypto/ccp/ccp-dev-v3.c if (op->ioc || !cmd_q->free_slots) ioc 158 drivers/crypto/ccp/ccp-dev-v5.c #define CCP5_CMD_IOC(p) (CCP5_CMD_DW0(p).ioc) ioc 534 drivers/crypto/ccp/ccp-dev.h u32 ioc; ioc 580 drivers/crypto/ccp/ccp-dev.h unsigned int ioc:1; ioc 160 drivers/message/fusion/mptbase.c static int mptbase_reply(MPT_ADAPTER *ioc, MPT_FRAME_HDR *req, ioc 162 drivers/message/fusion/mptbase.c static int mpt_handshake_req_reply_wait(MPT_ADAPTER *ioc, int reqBytes, ioc 165 drivers/message/fusion/mptbase.c static int mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag); ioc 166 drivers/message/fusion/mptbase.c static void mpt_detect_bound_ports(MPT_ADAPTER *ioc, struct pci_dev *pdev); ioc 167 drivers/message/fusion/mptbase.c static void mpt_adapter_disable(MPT_ADAPTER *ioc); ioc 168 drivers/message/fusion/mptbase.c static void mpt_adapter_dispose(MPT_ADAPTER *ioc); ioc 170 drivers/message/fusion/mptbase.c static void MptDisplayIocCapabilities(MPT_ADAPTER *ioc); ioc 171 drivers/message/fusion/mptbase.c static int MakeIocReady(MPT_ADAPTER *ioc, int force, int sleepFlag); ioc 172 drivers/message/fusion/mptbase.c static int GetIocFacts(MPT_ADAPTER *ioc, int sleepFlag, int reason); ioc 173 drivers/message/fusion/mptbase.c static int GetPortFacts(MPT_ADAPTER *ioc, int portnum, int sleepFlag); ioc 174 drivers/message/fusion/mptbase.c static int SendIocInit(MPT_ADAPTER *ioc, int sleepFlag); ioc 175 drivers/message/fusion/mptbase.c static int SendPortEnable(MPT_ADAPTER *ioc, int portnum, int sleepFlag); ioc 176 drivers/message/fusion/mptbase.c static int mpt_do_upload(MPT_ADAPTER *ioc, int sleepFlag); ioc 177 drivers/message/fusion/mptbase.c static int mpt_downloadboot(MPT_ADAPTER *ioc, MpiFwHeader_t *pFwHeader, int sleepFlag); ioc 178 drivers/message/fusion/mptbase.c static int mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag); ioc 179 drivers/message/fusion/mptbase.c static int KickStart(MPT_ADAPTER *ioc, int ignore, int sleepFlag); ioc 180 drivers/message/fusion/mptbase.c static int SendIocReset(MPT_ADAPTER *ioc, u8 reset_type, int sleepFlag); ioc 181 drivers/message/fusion/mptbase.c static int PrimeIocFifos(MPT_ADAPTER *ioc); ioc 182 drivers/message/fusion/mptbase.c static int WaitForDoorbellAck(MPT_ADAPTER *ioc, int howlong, int sleepFlag); ioc 183 drivers/message/fusion/mptbase.c static int WaitForDoorbellInt(MPT_ADAPTER *ioc, int howlong, int sleepFlag); ioc 184 drivers/message/fusion/mptbase.c static int WaitForDoorbellReply(MPT_ADAPTER *ioc, int howlong, int sleepFlag); ioc 185 drivers/message/fusion/mptbase.c static int GetLanConfigPages(MPT_ADAPTER *ioc); ioc 186 drivers/message/fusion/mptbase.c static int GetIoUnitPage2(MPT_ADAPTER *ioc); ioc 187 drivers/message/fusion/mptbase.c int mptbase_sas_persist_operation(MPT_ADAPTER *ioc, u8 persist_opcode); ioc 188 drivers/message/fusion/mptbase.c static int mpt_GetScsiPortSettings(MPT_ADAPTER *ioc, int portnum); ioc 189 drivers/message/fusion/mptbase.c static int mpt_readScsiDevicePageHeaders(MPT_ADAPTER *ioc, int portnum); ioc 190 drivers/message/fusion/mptbase.c static void mpt_read_ioc_pg_1(MPT_ADAPTER *ioc); ioc 191 drivers/message/fusion/mptbase.c static void mpt_read_ioc_pg_4(MPT_ADAPTER *ioc); ioc 192 drivers/message/fusion/mptbase.c static void mpt_get_manufacturing_pg_0(MPT_ADAPTER *ioc); ioc 193 drivers/message/fusion/mptbase.c static int SendEventNotification(MPT_ADAPTER *ioc, u8 EvSwitch, ioc 195 drivers/message/fusion/mptbase.c static int SendEventAck(MPT_ADAPTER *ioc, EventNotificationReply_t *evnp); ioc 196 drivers/message/fusion/mptbase.c static int mpt_host_page_access_control(MPT_ADAPTER *ioc, u8 access_control_value, int sleepFlag); ioc 197 drivers/message/fusion/mptbase.c static int mpt_host_page_alloc(MPT_ADAPTER *ioc, pIOCInit_t ioc_init); ioc 204 drivers/message/fusion/mptbase.c static void mpt_get_fw_exp_ver(char *buf, MPT_ADAPTER *ioc); ioc 206 drivers/message/fusion/mptbase.c static int ProcessEventNotification(MPT_ADAPTER *ioc, ioc 208 drivers/message/fusion/mptbase.c static void mpt_iocstatus_info(MPT_ADAPTER *ioc, u32 ioc_status, MPT_FRAME_HDR *mf); ioc 209 drivers/message/fusion/mptbase.c static void mpt_fc_log_info(MPT_ADAPTER *ioc, u32 log_info); ioc 210 drivers/message/fusion/mptbase.c static void mpt_spi_log_info(MPT_ADAPTER *ioc, u32 log_info); ioc 211 drivers/message/fusion/mptbase.c static void mpt_sas_log_info(MPT_ADAPTER *ioc, u32 log_info , u8 cb_idx); ioc 212 drivers/message/fusion/mptbase.c static int mpt_read_ioc_pg_3(MPT_ADAPTER *ioc); ioc 213 drivers/message/fusion/mptbase.c static void mpt_inactive_raid_list_free(MPT_ADAPTER *ioc); ioc 248 drivers/message/fusion/mptbase.c MPT_ADAPTER *ioc; ioc 253 drivers/message/fusion/mptbase.c list_for_each_entry(ioc, &ioc_list, list) ioc 254 drivers/message/fusion/mptbase.c ioc->debug_level = mpt_debug_level; ioc 282 drivers/message/fusion/mptbase.c mpt_is_discovery_complete(MPT_ADAPTER *ioc) ioc 298 drivers/message/fusion/mptbase.c if ((mpt_config(ioc, &cfg))) ioc 303 drivers/message/fusion/mptbase.c buffer = pci_alloc_consistent(ioc->pcidev, hdr.ExtPageLength * 4, ioc 311 drivers/message/fusion/mptbase.c if ((mpt_config(ioc, &cfg))) ioc 319 drivers/message/fusion/mptbase.c pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4, ioc 335 drivers/message/fusion/mptbase.c MPT_ADAPTER *ioc = (MPT_ADAPTER *)arg; ioc 338 drivers/message/fusion/mptbase.c if (!ioc) ioc 341 drivers/message/fusion/mptbase.c pdev = ioc->pcidev; ioc 359 drivers/message/fusion/mptbase.c MPT_ADAPTER *ioc = ioc 367 drivers/message/fusion/mptbase.c if (ioc->ioc_reset_in_progress || !ioc->active) ioc 371 drivers/message/fusion/mptbase.c ioc_raw_state = mpt_GetIocState(ioc, 0); ioc 374 drivers/message/fusion/mptbase.c ioc->name, __func__); ioc 383 drivers/message/fusion/mptbase.c hd = shost_priv(ioc->sh); ioc 384 drivers/message/fusion/mptbase.c ioc->schedule_dead_ioc_flush_running_cmds(hd); ioc 387 drivers/message/fusion/mptbase.c p = kthread_run(mpt_remove_dead_ioc_func, ioc, ioc 388 drivers/message/fusion/mptbase.c "mpt_dead_ioc_%d", ioc->id); ioc 392 drivers/message/fusion/mptbase.c ioc->name, __func__); ioc 396 drivers/message/fusion/mptbase.c ioc->name, __func__); ioc 404 drivers/message/fusion/mptbase.c ioc->name, ioc_raw_state & MPI_DOORBELL_DATA_MASK); ioc 406 drivers/message/fusion/mptbase.c ioc->name, __func__); ioc 407 drivers/message/fusion/mptbase.c rc = mpt_HardResetHandler(ioc, CAN_SLEEP); ioc 408 drivers/message/fusion/mptbase.c printk(MYIOC_s_WARN_FMT "%s: HardReset: %s\n", ioc->name, ioc 410 drivers/message/fusion/mptbase.c ioc_raw_state = mpt_GetIocState(ioc, 0); ioc 413 drivers/message/fusion/mptbase.c "reset (%04xh)\n", ioc->name, ioc_raw_state & ioc 415 drivers/message/fusion/mptbase.c } else if (ioc->bus_type == SAS && ioc->sas_discovery_quiesce_io) { ioc 416 drivers/message/fusion/mptbase.c if ((mpt_is_discovery_complete(ioc))) { ioc 417 drivers/message/fusion/mptbase.c devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT "clearing " ioc 418 drivers/message/fusion/mptbase.c "discovery_quiesce_io flag\n", ioc->name)); ioc 419 drivers/message/fusion/mptbase.c ioc->sas_discovery_quiesce_io = 0; ioc 427 drivers/message/fusion/mptbase.c if (ioc->alt_ioc) ioc 428 drivers/message/fusion/mptbase.c ioc = ioc->alt_ioc; ioc 431 drivers/message/fusion/mptbase.c spin_lock_irqsave(&ioc->taskmgmt_lock, flags); ioc 432 drivers/message/fusion/mptbase.c if (ioc->reset_work_q) ioc 433 drivers/message/fusion/mptbase.c queue_delayed_work(ioc->reset_work_q, &ioc->fault_reset_work, ioc 435 drivers/message/fusion/mptbase.c spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags); ioc 443 drivers/message/fusion/mptbase.c mpt_turbo_reply(MPT_ADAPTER *ioc, u32 pa) ioc 450 drivers/message/fusion/mptbase.c dmfprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Got TURBO reply req_idx=%08x\n", ioc 451 drivers/message/fusion/mptbase.c ioc->name, pa)); ioc 457 drivers/message/fusion/mptbase.c mf = MPT_INDEX_2_MFPTR(ioc, req_idx); ioc 472 drivers/message/fusion/mptbase.c mf = MPT_INDEX_2_MFPTR(ioc, req_idx); ioc 473 drivers/message/fusion/mptbase.c mpt_free_msg_frame(ioc, mf); ioc 493 drivers/message/fusion/mptbase.c __func__, ioc->name, cb_idx); ioc 497 drivers/message/fusion/mptbase.c if (MptCallbacks[cb_idx](ioc, mf, mr)) ioc 498 drivers/message/fusion/mptbase.c mpt_free_msg_frame(ioc, mf); ioc 504 drivers/message/fusion/mptbase.c mpt_reply(MPT_ADAPTER *ioc, u32 pa) ioc 526 drivers/message/fusion/mptbase.c mr = (MPT_FRAME_HDR *)((u8 *)ioc->reply_frames + ioc 527 drivers/message/fusion/mptbase.c (reply_dma_low - ioc->reply_frames_low_dma)); ioc 531 drivers/message/fusion/mptbase.c mf = MPT_INDEX_2_MFPTR(ioc, req_idx); ioc 533 drivers/message/fusion/mptbase.c dmfprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Got non-TURBO reply=%p req_idx=%x cb_idx=%x Function=%x\n", ioc 534 drivers/message/fusion/mptbase.c ioc->name, mr, req_idx, cb_idx, mr->u.hdr.Function)); ioc 535 drivers/message/fusion/mptbase.c DBG_DUMP_REPLY_FRAME(ioc, (u32 *)mr); ioc 542 drivers/message/fusion/mptbase.c if (ioc->bus_type == FC) ioc 543 drivers/message/fusion/mptbase.c mpt_fc_log_info(ioc, log_info); ioc 544 drivers/message/fusion/mptbase.c else if (ioc->bus_type == SPI) ioc 545 drivers/message/fusion/mptbase.c mpt_spi_log_info(ioc, log_info); ioc 546 drivers/message/fusion/mptbase.c else if (ioc->bus_type == SAS) ioc 547 drivers/message/fusion/mptbase.c mpt_sas_log_info(ioc, log_info, cb_idx); ioc 551 drivers/message/fusion/mptbase.c mpt_iocstatus_info(ioc, (u32)ioc_stat, mf); ioc 557 drivers/message/fusion/mptbase.c __func__, ioc->name, cb_idx); ioc 562 drivers/message/fusion/mptbase.c freeme = MptCallbacks[cb_idx](ioc, mf, mr); ioc 566 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->ReplyFifo, pa); ioc 569 drivers/message/fusion/mptbase.c mpt_free_msg_frame(ioc, mf); ioc 593 drivers/message/fusion/mptbase.c MPT_ADAPTER *ioc = bus_id; ioc 594 drivers/message/fusion/mptbase.c u32 pa = CHIPREG_READ32_dmasync(&ioc->chip->ReplyFifo); ioc 604 drivers/message/fusion/mptbase.c mpt_reply(ioc, pa); ioc 606 drivers/message/fusion/mptbase.c mpt_turbo_reply(ioc, pa); ioc 607 drivers/message/fusion/mptbase.c pa = CHIPREG_READ32_dmasync(&ioc->chip->ReplyFifo); ioc 628 drivers/message/fusion/mptbase.c mptbase_reply(MPT_ADAPTER *ioc, MPT_FRAME_HDR *req, MPT_FRAME_HDR *reply) ioc 639 drivers/message/fusion/mptbase.c ProcessEventNotification(ioc, pEventReply, &evHandlers); ioc 648 drivers/message/fusion/mptbase.c ioc->mptbase_cmds.status |= MPT_MGMT_STATUS_COMMAND_GOOD; ioc 649 drivers/message/fusion/mptbase.c ioc->mptbase_cmds.status |= MPT_MGMT_STATUS_RF_VALID; ioc 650 drivers/message/fusion/mptbase.c memcpy(ioc->mptbase_cmds.reply, reply, ioc 653 drivers/message/fusion/mptbase.c if (ioc->mptbase_cmds.status & MPT_MGMT_STATUS_PENDING) { ioc 654 drivers/message/fusion/mptbase.c ioc->mptbase_cmds.status &= ~MPT_MGMT_STATUS_PENDING; ioc 655 drivers/message/fusion/mptbase.c complete(&ioc->mptbase_cmds.done); ioc 658 drivers/message/fusion/mptbase.c if (ioc->mptbase_cmds.status & MPT_MGMT_STATUS_FREE_MF) ioc 662 drivers/message/fusion/mptbase.c devtverboseprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 663 drivers/message/fusion/mptbase.c "EventAck reply received\n", ioc->name)); ioc 668 drivers/message/fusion/mptbase.c ioc->name, reply->u.hdr.Function); ioc 832 drivers/message/fusion/mptbase.c MPT_ADAPTER *ioc; ioc 841 drivers/message/fusion/mptbase.c list_for_each_entry(ioc, &ioc_list, list) { ioc 842 drivers/message/fusion/mptbase.c id = ioc->pcidev->driver ? ioc 843 drivers/message/fusion/mptbase.c ioc->pcidev->driver->id_table : NULL; ioc 845 drivers/message/fusion/mptbase.c dd_cbfunc->probe(ioc->pcidev, id); ioc 860 drivers/message/fusion/mptbase.c MPT_ADAPTER *ioc; ioc 867 drivers/message/fusion/mptbase.c list_for_each_entry(ioc, &ioc_list, list) { ioc 869 drivers/message/fusion/mptbase.c dd_cbfunc->remove(ioc->pcidev); ioc 889 drivers/message/fusion/mptbase.c mpt_get_msg_frame(u8 cb_idx, MPT_ADAPTER *ioc) ioc 898 drivers/message/fusion/mptbase.c if (!ioc->active) ioc 900 drivers/message/fusion/mptbase.c "returning NULL!\n", ioc->name); ioc 904 drivers/message/fusion/mptbase.c if (!ioc->active) ioc 907 drivers/message/fusion/mptbase.c spin_lock_irqsave(&ioc->FreeQlock, flags); ioc 908 drivers/message/fusion/mptbase.c if (!list_empty(&ioc->FreeQ)) { ioc 911 drivers/message/fusion/mptbase.c mf = list_entry(ioc->FreeQ.next, MPT_FRAME_HDR, ioc 916 drivers/message/fusion/mptbase.c req_offset = (u8 *)mf - (u8 *)ioc->req_frames; ioc 918 drivers/message/fusion/mptbase.c req_idx = req_offset / ioc->req_sz; ioc 922 drivers/message/fusion/mptbase.c ioc->RequestNB[req_idx] = ioc->NB_for_64_byte_frame; ioc 924 drivers/message/fusion/mptbase.c ioc->mfcnt++; ioc 929 drivers/message/fusion/mptbase.c spin_unlock_irqrestore(&ioc->FreeQlock, flags); ioc 934 drivers/message/fusion/mptbase.c "Count 0x%x Max 0x%x\n", ioc->name, ioc->mfcnt, ioc 935 drivers/message/fusion/mptbase.c ioc->req_depth); ioc 938 drivers/message/fusion/mptbase.c printk(MYIOC_s_INFO_FMT "MF Count 0x%x Max 0x%x \n", ioc->name, ioc 939 drivers/message/fusion/mptbase.c ioc->mfcnt, ioc->req_depth); ioc 942 drivers/message/fusion/mptbase.c dmfprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mpt_get_msg_frame(%d,%d), got mf=%p\n", ioc 943 drivers/message/fusion/mptbase.c ioc->name, cb_idx, ioc->id, mf)); ioc 958 drivers/message/fusion/mptbase.c mpt_put_msg_frame(u8 cb_idx, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf) ioc 966 drivers/message/fusion/mptbase.c req_offset = (u8 *)mf - (u8 *)ioc->req_frames; ioc 968 drivers/message/fusion/mptbase.c req_idx = req_offset / ioc->req_sz; ioc 972 drivers/message/fusion/mptbase.c DBG_DUMP_PUT_MSG_FRAME(ioc, (u32 *)mf); ioc 974 drivers/message/fusion/mptbase.c mf_dma_addr = (ioc->req_frames_low_dma + req_offset) | ioc->RequestNB[req_idx]; ioc 975 drivers/message/fusion/mptbase.c dsgprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mf_dma_addr=%x req_idx=%d " ioc 976 drivers/message/fusion/mptbase.c "RequestNB=%x\n", ioc->name, mf_dma_addr, req_idx, ioc 977 drivers/message/fusion/mptbase.c ioc->RequestNB[req_idx])); ioc 978 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->RequestFifo, mf_dma_addr); ioc 994 drivers/message/fusion/mptbase.c mpt_put_msg_frame_hi_pri(u8 cb_idx, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf) ioc 1002 drivers/message/fusion/mptbase.c req_offset = (u8 *)mf - (u8 *)ioc->req_frames; ioc 1003 drivers/message/fusion/mptbase.c req_idx = req_offset / ioc->req_sz; ioc 1007 drivers/message/fusion/mptbase.c DBG_DUMP_PUT_MSG_FRAME(ioc, (u32 *)mf); ioc 1009 drivers/message/fusion/mptbase.c mf_dma_addr = (ioc->req_frames_low_dma + req_offset); ioc 1010 drivers/message/fusion/mptbase.c dsgprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mf_dma_addr=%x req_idx=%d\n", ioc 1011 drivers/message/fusion/mptbase.c ioc->name, mf_dma_addr, req_idx)); ioc 1012 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->RequestHiPriFifo, mf_dma_addr); ioc 1025 drivers/message/fusion/mptbase.c mpt_free_msg_frame(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf) ioc 1030 drivers/message/fusion/mptbase.c spin_lock_irqsave(&ioc->FreeQlock, flags); ioc 1035 drivers/message/fusion/mptbase.c list_add(&mf->u.frame.linkage.list, &ioc->FreeQ); ioc 1037 drivers/message/fusion/mptbase.c ioc->mfcnt--; ioc 1040 drivers/message/fusion/mptbase.c spin_unlock_irqrestore(&ioc->FreeQlock, flags); ioc 1184 drivers/message/fusion/mptbase.c mpt_send_handshake_request(u8 cb_idx, MPT_ADAPTER *ioc, int reqBytes, u32 *req, int sleepFlag) ioc 1200 drivers/message/fusion/mptbase.c ii = MFPTR_2_MPT_INDEX(ioc,(MPT_FRAME_HDR*)req); ioc 1201 drivers/message/fusion/mptbase.c if (reqBytes >= 12 && ii >= 0 && ii < ioc->req_depth) { ioc 1208 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->IntStatus, 0); ioc 1210 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->Doorbell, ioc 1215 drivers/message/fusion/mptbase.c if ((ii = WaitForDoorbellInt(ioc, 5, sleepFlag)) < 0) { ioc 1220 drivers/message/fusion/mptbase.c if (!(CHIPREG_READ32(&ioc->chip->Doorbell) & MPI_DOORBELL_ACTIVE)) ioc 1223 drivers/message/fusion/mptbase.c dhsprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mpt_send_handshake_request start, WaitCnt=%d\n", ioc 1224 drivers/message/fusion/mptbase.c ioc->name, ii)); ioc 1226 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->IntStatus, 0); ioc 1228 drivers/message/fusion/mptbase.c if ((r = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0) { ioc 1241 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->Doorbell, word); ioc 1242 drivers/message/fusion/mptbase.c if ((r = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0) { ioc 1248 drivers/message/fusion/mptbase.c if (r >= 0 && WaitForDoorbellInt(ioc, 10, sleepFlag) >= 0) ioc 1254 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->IntStatus, 0); ioc 1279 drivers/message/fusion/mptbase.c mpt_host_page_access_control(MPT_ADAPTER *ioc, u8 access_control_value, int sleepFlag) ioc 1284 drivers/message/fusion/mptbase.c if (CHIPREG_READ32(&ioc->chip->Doorbell) ioc 1288 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->IntStatus, 0); ioc 1290 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->Doorbell, ioc 1296 drivers/message/fusion/mptbase.c if ((r = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0) { ioc 1312 drivers/message/fusion/mptbase.c mpt_host_page_alloc(MPT_ADAPTER *ioc, pIOCInit_t ioc_init) ioc 1318 drivers/message/fusion/mptbase.c if(!ioc->HostPageBuffer) { ioc 1321 drivers/message/fusion/mptbase.c le32_to_cpu(ioc->facts.HostPageBufferSGE.FlagsLength) & 0xFFFFFF; ioc 1329 drivers/message/fusion/mptbase.c if((ioc->HostPageBuffer = pci_alloc_consistent( ioc 1330 drivers/message/fusion/mptbase.c ioc->pcidev, ioc 1332 drivers/message/fusion/mptbase.c &ioc->HostPageBuffer_dma)) != NULL) { ioc 1334 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 1336 drivers/message/fusion/mptbase.c ioc->name, ioc->HostPageBuffer, ioc 1337 drivers/message/fusion/mptbase.c (u32)ioc->HostPageBuffer_dma, ioc 1339 drivers/message/fusion/mptbase.c ioc->alloc_total += host_page_buffer_sz; ioc 1340 drivers/message/fusion/mptbase.c ioc->HostPageBuffer_sz = host_page_buffer_sz; ioc 1348 drivers/message/fusion/mptbase.c if(!ioc->HostPageBuffer) { ioc 1351 drivers/message/fusion/mptbase.c ioc->name); ioc 1361 drivers/message/fusion/mptbase.c flags_length |= ioc->HostPageBuffer_sz; ioc 1362 drivers/message/fusion/mptbase.c ioc->add_sge(psge, flags_length, ioc->HostPageBuffer_dma); ioc 1363 drivers/message/fusion/mptbase.c ioc->facts.HostPageBufferSGE = ioc_init->HostPageBufferSGE; ioc 1383 drivers/message/fusion/mptbase.c MPT_ADAPTER *ioc; ioc 1385 drivers/message/fusion/mptbase.c list_for_each_entry(ioc,&ioc_list,list) { ioc 1386 drivers/message/fusion/mptbase.c if (ioc->id == iocid) { ioc 1387 drivers/message/fusion/mptbase.c *iocpp =ioc; ioc 1642 drivers/message/fusion/mptbase.c mpt_mapresources(MPT_ADAPTER *ioc) ioc 1653 drivers/message/fusion/mptbase.c pdev = ioc->pcidev; ioc 1654 drivers/message/fusion/mptbase.c ioc->bars = pci_select_bars(pdev, IORESOURCE_MEM); ioc 1657 drivers/message/fusion/mptbase.c "failed\n", ioc->name); ioc 1660 drivers/message/fusion/mptbase.c if (pci_request_selected_regions(pdev, ioc->bars, "mpt")) { ioc 1662 drivers/message/fusion/mptbase.c "MEM failed\n", ioc->name); ioc 1673 drivers/message/fusion/mptbase.c ioc->dma_mask = DMA_BIT_MASK(64); ioc 1674 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_INFO_FMT ioc 1676 drivers/message/fusion/mptbase.c ioc->name)); ioc 1680 drivers/message/fusion/mptbase.c ioc->dma_mask = DMA_BIT_MASK(32); ioc 1681 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_INFO_FMT ioc 1683 drivers/message/fusion/mptbase.c ioc->name)); ioc 1686 drivers/message/fusion/mptbase.c ioc->name, pci_name(pdev)); ioc 1693 drivers/message/fusion/mptbase.c ioc->dma_mask = DMA_BIT_MASK(32); ioc 1694 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_INFO_FMT ioc 1696 drivers/message/fusion/mptbase.c ioc->name)); ioc 1699 drivers/message/fusion/mptbase.c ioc->name, pci_name(pdev)); ioc 1721 drivers/message/fusion/mptbase.c ioc->mem_size = msize; ioc 1729 drivers/message/fusion/mptbase.c " memory!\n", ioc->name); ioc 1733 drivers/message/fusion/mptbase.c ioc->memmap = mem; ioc 1734 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_INFO_FMT "mem = %p, mem_phys = %llx\n", ioc 1735 drivers/message/fusion/mptbase.c ioc->name, mem, (unsigned long long)mem_phys)); ioc 1737 drivers/message/fusion/mptbase.c ioc->mem_phys = mem_phys; ioc 1738 drivers/message/fusion/mptbase.c ioc->chip = (SYSIF_REGS __iomem *)mem; ioc 1741 drivers/message/fusion/mptbase.c ioc->pio_mem_phys = port; ioc 1742 drivers/message/fusion/mptbase.c ioc->pio_chip = (SYSIF_REGS __iomem *)port; ioc 1747 drivers/message/fusion/mptbase.c pci_release_selected_regions(pdev, ioc->bars); ioc 1774 drivers/message/fusion/mptbase.c MPT_ADAPTER *ioc; ioc 1783 drivers/message/fusion/mptbase.c ioc = kzalloc(sizeof(MPT_ADAPTER), GFP_KERNEL); ioc 1784 drivers/message/fusion/mptbase.c if (ioc == NULL) { ioc 1789 drivers/message/fusion/mptbase.c ioc->id = mpt_ids++; ioc 1790 drivers/message/fusion/mptbase.c sprintf(ioc->name, "ioc%d", ioc->id); ioc 1791 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(KERN_WARNING MYNAM ": mpt_adapter_install\n")); ioc 1798 drivers/message/fusion/mptbase.c ioc->debug_level = mpt_debug_level; ioc 1802 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_INFO_FMT ": mpt_adapter_install\n", ioc->name)); ioc 1804 drivers/message/fusion/mptbase.c ioc->pcidev = pdev; ioc 1805 drivers/message/fusion/mptbase.c if (mpt_mapresources(ioc)) { ioc 1812 drivers/message/fusion/mptbase.c if (ioc->dma_mask == DMA_BIT_MASK(64)) { ioc 1814 drivers/message/fusion/mptbase.c ioc->add_sge = &mpt_add_sge_64bit_1078; ioc 1816 drivers/message/fusion/mptbase.c ioc->add_sge = &mpt_add_sge_64bit; ioc 1817 drivers/message/fusion/mptbase.c ioc->add_chain = &mpt_add_chain_64bit; ioc 1818 drivers/message/fusion/mptbase.c ioc->sg_addr_size = 8; ioc 1820 drivers/message/fusion/mptbase.c ioc->add_sge = &mpt_add_sge; ioc 1821 drivers/message/fusion/mptbase.c ioc->add_chain = &mpt_add_chain; ioc 1822 drivers/message/fusion/mptbase.c ioc->sg_addr_size = 4; ioc 1824 drivers/message/fusion/mptbase.c ioc->SGE_size = sizeof(u32) + ioc->sg_addr_size; ioc 1826 drivers/message/fusion/mptbase.c ioc->alloc_total = sizeof(MPT_ADAPTER); ioc 1827 drivers/message/fusion/mptbase.c ioc->req_sz = MPT_DEFAULT_FRAME_SIZE; /* avoid div by zero! */ ioc 1828 drivers/message/fusion/mptbase.c ioc->reply_sz = MPT_REPLY_FRAME_SIZE; ioc 1831 drivers/message/fusion/mptbase.c spin_lock_init(&ioc->taskmgmt_lock); ioc 1832 drivers/message/fusion/mptbase.c mutex_init(&ioc->internal_cmds.mutex); ioc 1833 drivers/message/fusion/mptbase.c init_completion(&ioc->internal_cmds.done); ioc 1834 drivers/message/fusion/mptbase.c mutex_init(&ioc->mptbase_cmds.mutex); ioc 1835 drivers/message/fusion/mptbase.c init_completion(&ioc->mptbase_cmds.done); ioc 1836 drivers/message/fusion/mptbase.c mutex_init(&ioc->taskmgmt_cmds.mutex); ioc 1837 drivers/message/fusion/mptbase.c init_completion(&ioc->taskmgmt_cmds.done); ioc 1841 drivers/message/fusion/mptbase.c ioc->eventTypes = 0; /* None */ ioc 1842 drivers/message/fusion/mptbase.c ioc->eventContext = 0; ioc 1843 drivers/message/fusion/mptbase.c ioc->eventLogSize = 0; ioc 1844 drivers/message/fusion/mptbase.c ioc->events = NULL; ioc 1847 drivers/message/fusion/mptbase.c ioc->mfcnt = 0; ioc 1850 drivers/message/fusion/mptbase.c ioc->sh = NULL; ioc 1851 drivers/message/fusion/mptbase.c ioc->cached_fw = NULL; ioc 1855 drivers/message/fusion/mptbase.c memset(&ioc->spi_data, 0, sizeof(SpiCfgData)); ioc 1859 drivers/message/fusion/mptbase.c INIT_LIST_HEAD(&ioc->fc_rports); ioc 1862 drivers/message/fusion/mptbase.c INIT_LIST_HEAD(&ioc->list); ioc 1866 drivers/message/fusion/mptbase.c INIT_DELAYED_WORK(&ioc->fault_reset_work, mpt_fault_reset_work); ioc 1868 drivers/message/fusion/mptbase.c snprintf(ioc->reset_work_q_name, MPT_KOBJ_NAME_LEN, ioc 1869 drivers/message/fusion/mptbase.c "mpt_poll_%d", ioc->id); ioc 1870 drivers/message/fusion/mptbase.c ioc->reset_work_q = alloc_workqueue(ioc->reset_work_q_name, ioc 1872 drivers/message/fusion/mptbase.c if (!ioc->reset_work_q) { ioc 1874 drivers/message/fusion/mptbase.c ioc->name); ioc 1879 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_INFO_FMT "facts @ %p, pfacts[0] @ %p\n", ioc 1880 drivers/message/fusion/mptbase.c ioc->name, &ioc->facts, &ioc->pfacts[0])); ioc 1882 drivers/message/fusion/mptbase.c ioc->prod_name = mpt_get_product_name(pdev->vendor, pdev->device, ioc 1889 drivers/message/fusion/mptbase.c ioc->errata_flag_1064 = 1; ioc 1895 drivers/message/fusion/mptbase.c ioc->bus_type = FC; ioc 1913 drivers/message/fusion/mptbase.c ioc->bus_type = FC; ioc 1923 drivers/message/fusion/mptbase.c ioc->bus_type = FC; ioc 1938 drivers/message/fusion/mptbase.c ioc->bus_type = SPI; ioc 1943 drivers/message/fusion/mptbase.c ioc->errata_flag_1064 = 1; ioc 1944 drivers/message/fusion/mptbase.c ioc->bus_type = SAS; ioc 1950 drivers/message/fusion/mptbase.c ioc->bus_type = SAS; ioc 1955 drivers/message/fusion/mptbase.c switch (ioc->bus_type) { ioc 1958 drivers/message/fusion/mptbase.c ioc->msi_enable = mpt_msi_enable_sas; ioc 1962 drivers/message/fusion/mptbase.c ioc->msi_enable = mpt_msi_enable_spi; ioc 1966 drivers/message/fusion/mptbase.c ioc->msi_enable = mpt_msi_enable_fc; ioc 1970 drivers/message/fusion/mptbase.c ioc->msi_enable = 0; ioc 1974 drivers/message/fusion/mptbase.c ioc->fw_events_off = 1; ioc 1976 drivers/message/fusion/mptbase.c if (ioc->errata_flag_1064) ioc 1979 drivers/message/fusion/mptbase.c spin_lock_init(&ioc->FreeQlock); ioc 1982 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->IntMask, 0xFFFFFFFF); ioc 1983 drivers/message/fusion/mptbase.c ioc->active = 0; ioc 1984 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->IntStatus, 0); ioc 1987 drivers/message/fusion/mptbase.c pci_set_drvdata(ioc->pcidev, ioc); ioc 1990 drivers/message/fusion/mptbase.c list_add_tail(&ioc->list, &ioc_list); ioc 1994 drivers/message/fusion/mptbase.c mpt_detect_bound_ports(ioc, pdev); ioc 1996 drivers/message/fusion/mptbase.c INIT_LIST_HEAD(&ioc->fw_event_list); ioc 1997 drivers/message/fusion/mptbase.c spin_lock_init(&ioc->fw_event_lock); ioc 1998 drivers/message/fusion/mptbase.c snprintf(ioc->fw_event_q_name, MPT_KOBJ_NAME_LEN, "mpt/%d", ioc->id); ioc 1999 drivers/message/fusion/mptbase.c ioc->fw_event_q = alloc_workqueue(ioc->fw_event_q_name, ioc 2001 drivers/message/fusion/mptbase.c if (!ioc->fw_event_q) { ioc 2003 drivers/message/fusion/mptbase.c ioc->name); ioc 2008 drivers/message/fusion/mptbase.c if ((r = mpt_do_ioc_recovery(ioc, MPT_HOSTEVENT_IOC_BRINGUP, ioc 2011 drivers/message/fusion/mptbase.c ioc->name, r); ioc 2013 drivers/message/fusion/mptbase.c destroy_workqueue(ioc->fw_event_q); ioc 2014 drivers/message/fusion/mptbase.c ioc->fw_event_q = NULL; ioc 2016 drivers/message/fusion/mptbase.c list_del(&ioc->list); ioc 2017 drivers/message/fusion/mptbase.c if (ioc->alt_ioc) ioc 2018 drivers/message/fusion/mptbase.c ioc->alt_ioc->alt_ioc = NULL; ioc 2019 drivers/message/fusion/mptbase.c iounmap(ioc->memmap); ioc 2023 drivers/message/fusion/mptbase.c pci_release_selected_regions(pdev, ioc->bars); ioc 2025 drivers/message/fusion/mptbase.c destroy_workqueue(ioc->reset_work_q); ioc 2026 drivers/message/fusion/mptbase.c ioc->reset_work_q = NULL; ioc 2028 drivers/message/fusion/mptbase.c kfree(ioc); ioc 2044 drivers/message/fusion/mptbase.c dent = proc_mkdir(ioc->name, mpt_proc_root_dir); ioc 2047 drivers/message/fusion/mptbase.c mpt_iocinfo_proc_show, ioc); ioc 2049 drivers/message/fusion/mptbase.c mpt_summary_proc_show, ioc); ioc 2053 drivers/message/fusion/mptbase.c if (!ioc->alt_ioc) ioc 2054 drivers/message/fusion/mptbase.c queue_delayed_work(ioc->reset_work_q, &ioc->fault_reset_work, ioc 2060 drivers/message/fusion/mptbase.c list_del(&ioc->list); ioc 2061 drivers/message/fusion/mptbase.c if (ioc->alt_ioc) ioc 2062 drivers/message/fusion/mptbase.c ioc->alt_ioc->alt_ioc = NULL; ioc 2064 drivers/message/fusion/mptbase.c destroy_workqueue(ioc->reset_work_q); ioc 2065 drivers/message/fusion/mptbase.c ioc->reset_work_q = NULL; ioc 2068 drivers/message/fusion/mptbase.c iounmap(ioc->memmap); ioc 2070 drivers/message/fusion/mptbase.c pci_release_selected_regions(pdev, ioc->bars); ioc 2073 drivers/message/fusion/mptbase.c kfree(ioc); ioc 2087 drivers/message/fusion/mptbase.c MPT_ADAPTER *ioc = pci_get_drvdata(pdev); ioc 2096 drivers/message/fusion/mptbase.c spin_lock_irqsave(&ioc->taskmgmt_lock, flags); ioc 2097 drivers/message/fusion/mptbase.c wq = ioc->reset_work_q; ioc 2098 drivers/message/fusion/mptbase.c ioc->reset_work_q = NULL; ioc 2099 drivers/message/fusion/mptbase.c spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags); ioc 2100 drivers/message/fusion/mptbase.c cancel_delayed_work(&ioc->fault_reset_work); ioc 2103 drivers/message/fusion/mptbase.c spin_lock_irqsave(&ioc->fw_event_lock, flags); ioc 2104 drivers/message/fusion/mptbase.c wq = ioc->fw_event_q; ioc 2105 drivers/message/fusion/mptbase.c ioc->fw_event_q = NULL; ioc 2106 drivers/message/fusion/mptbase.c spin_unlock_irqrestore(&ioc->fw_event_lock, flags); ioc 2109 drivers/message/fusion/mptbase.c snprintf(pname, sizeof(pname), MPT_PROCFS_MPTBASEDIR "/%s/summary", ioc->name); ioc 2111 drivers/message/fusion/mptbase.c snprintf(pname, sizeof(pname), MPT_PROCFS_MPTBASEDIR "/%s/info", ioc->name); ioc 2113 drivers/message/fusion/mptbase.c snprintf(pname, sizeof(pname), MPT_PROCFS_MPTBASEDIR "/%s", ioc->name); ioc 2125 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->IntMask, 0xFFFFFFFF); ioc 2127 drivers/message/fusion/mptbase.c ioc->active = 0; ioc 2131 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->IntStatus, 0); ioc 2133 drivers/message/fusion/mptbase.c CHIPREG_READ32(&ioc->chip->IntStatus); ioc 2135 drivers/message/fusion/mptbase.c mpt_adapter_dispose(ioc); ioc 2153 drivers/message/fusion/mptbase.c MPT_ADAPTER *ioc = pci_get_drvdata(pdev); ioc 2157 drivers/message/fusion/mptbase.c "operating state [D%d]\n", ioc->name, pdev, pci_name(pdev), ioc 2161 drivers/message/fusion/mptbase.c if (SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, CAN_SLEEP)) { ioc 2163 drivers/message/fusion/mptbase.c "pci-suspend: IOC msg unit reset failed!\n", ioc->name); ioc 2167 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->IntMask, 0xFFFFFFFF); ioc 2168 drivers/message/fusion/mptbase.c ioc->active = 0; ioc 2171 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->IntStatus, 0); ioc 2173 drivers/message/fusion/mptbase.c free_irq(ioc->pci_irq, ioc); ioc 2174 drivers/message/fusion/mptbase.c if (ioc->msi_enable) ioc 2175 drivers/message/fusion/mptbase.c pci_disable_msi(ioc->pcidev); ioc 2176 drivers/message/fusion/mptbase.c ioc->pci_irq = -1; ioc 2179 drivers/message/fusion/mptbase.c pci_release_selected_regions(pdev, ioc->bars); ioc 2192 drivers/message/fusion/mptbase.c MPT_ADAPTER *ioc = pci_get_drvdata(pdev); ioc 2198 drivers/message/fusion/mptbase.c "operating state [D%d]\n", ioc->name, pdev, pci_name(pdev), ioc 2204 drivers/message/fusion/mptbase.c ioc->pcidev = pdev; ioc 2205 drivers/message/fusion/mptbase.c err = mpt_mapresources(ioc); ioc 2209 drivers/message/fusion/mptbase.c if (ioc->dma_mask == DMA_BIT_MASK(64)) { ioc 2211 drivers/message/fusion/mptbase.c ioc->add_sge = &mpt_add_sge_64bit_1078; ioc 2213 drivers/message/fusion/mptbase.c ioc->add_sge = &mpt_add_sge_64bit; ioc 2214 drivers/message/fusion/mptbase.c ioc->add_chain = &mpt_add_chain_64bit; ioc 2215 drivers/message/fusion/mptbase.c ioc->sg_addr_size = 8; ioc 2218 drivers/message/fusion/mptbase.c ioc->add_sge = &mpt_add_sge; ioc 2219 drivers/message/fusion/mptbase.c ioc->add_chain = &mpt_add_chain; ioc 2220 drivers/message/fusion/mptbase.c ioc->sg_addr_size = 4; ioc 2222 drivers/message/fusion/mptbase.c ioc->SGE_size = sizeof(u32) + ioc->sg_addr_size; ioc 2225 drivers/message/fusion/mptbase.c ioc->name, (mpt_GetIocState(ioc, 1) >> MPI_IOC_STATE_SHIFT), ioc 2226 drivers/message/fusion/mptbase.c CHIPREG_READ32(&ioc->chip->Doorbell)); ioc 2235 drivers/message/fusion/mptbase.c if (ioc->bus_type == SAS && (pdev->device == ioc 2238 drivers/message/fusion/mptbase.c if (KickStart(ioc, 1, CAN_SLEEP) < 0) { ioc 2240 drivers/message/fusion/mptbase.c ioc->name); ioc 2246 drivers/message/fusion/mptbase.c printk(MYIOC_s_INFO_FMT "Sending mpt_do_ioc_recovery\n", ioc->name); ioc 2247 drivers/message/fusion/mptbase.c recovery_state = mpt_do_ioc_recovery(ioc, MPT_HOSTEVENT_IOC_BRINGUP, ioc 2251 drivers/message/fusion/mptbase.c "error:[%x]\n", ioc->name, recovery_state); ioc 2254 drivers/message/fusion/mptbase.c "pci-resume: success\n", ioc->name); ioc 2262 drivers/message/fusion/mptbase.c mpt_signal_reset(u8 index, MPT_ADAPTER *ioc, int reset_phase) ioc 2265 drivers/message/fusion/mptbase.c ioc->bus_type != SPI) || ioc 2267 drivers/message/fusion/mptbase.c ioc->bus_type != FC) || ioc 2269 drivers/message/fusion/mptbase.c ioc->bus_type != SAS)) ioc 2273 drivers/message/fusion/mptbase.c return (MptResetHandlers[index])(ioc, reset_phase); ioc 2299 drivers/message/fusion/mptbase.c mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag) ioc 2311 drivers/message/fusion/mptbase.c printk(MYIOC_s_INFO_FMT "Initiating %s\n", ioc->name, ioc 2315 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->IntMask, 0xFFFFFFFF); ioc 2316 drivers/message/fusion/mptbase.c ioc->active = 0; ioc 2318 drivers/message/fusion/mptbase.c if (ioc->alt_ioc) { ioc 2319 drivers/message/fusion/mptbase.c if (ioc->alt_ioc->active || ioc 2325 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->alt_ioc->chip->IntMask, ioc 2327 drivers/message/fusion/mptbase.c ioc->alt_ioc->active = 0; ioc 2335 drivers/message/fusion/mptbase.c if ((hard_reset_done = MakeIocReady(ioc, hard, sleepFlag)) < 0) { ioc 2338 drivers/message/fusion/mptbase.c ioc->name); ioc 2340 drivers/message/fusion/mptbase.c if (reset_alt_ioc_active && ioc->alt_ioc) { ioc 2342 drivers/message/fusion/mptbase.c dprintk(ioc, printk(MYIOC_s_INFO_FMT ioc 2343 drivers/message/fusion/mptbase.c "alt_ioc reply irq re-enabled\n", ioc->alt_ioc->name)); ioc 2344 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->alt_ioc->chip->IntMask, MPI_HIM_DIM); ioc 2345 drivers/message/fusion/mptbase.c ioc->alt_ioc->active = 1; ioc 2350 drivers/message/fusion/mptbase.c "NOT READY WARNING!\n", ioc->name); ioc 2359 drivers/message/fusion/mptbase.c if (hard_reset_done && reset_alt_ioc_active && ioc->alt_ioc) { ioc 2360 drivers/message/fusion/mptbase.c if ((rc = MakeIocReady(ioc->alt_ioc, 0, sleepFlag)) == 0) ioc 2365 drivers/message/fusion/mptbase.c ioc->alt_ioc->name); ioc 2370 drivers/message/fusion/mptbase.c if ((rc = GetIocFacts(ioc, sleepFlag, reason)) == 0) ioc 2376 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 2377 drivers/message/fusion/mptbase.c "Retry IocFacts failed rc=%x\n", ioc->name, rc)); ioc 2380 drivers/message/fusion/mptbase.c MptDisplayIocCapabilities(ioc); ioc 2384 drivers/message/fusion/mptbase.c if ((rc = GetIocFacts(ioc->alt_ioc, sleepFlag, reason)) != 0) { ioc 2385 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 2387 drivers/message/fusion/mptbase.c ioc->name, rc)); ioc 2390 drivers/message/fusion/mptbase.c rc = GetIocFacts(ioc->alt_ioc, sleepFlag, reason); ioc 2393 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 2394 drivers/message/fusion/mptbase.c "Retry Alt IocFacts failed rc=%x\n", ioc->name, rc)); ioc 2398 drivers/message/fusion/mptbase.c MptDisplayIocCapabilities(ioc->alt_ioc); ioc 2403 drivers/message/fusion/mptbase.c (ioc->facts.Flags & MPI_IOCFACTS_FLAGS_FW_DOWNLOAD_BOOT)) { ioc 2404 drivers/message/fusion/mptbase.c pci_release_selected_regions(ioc->pcidev, ioc->bars); ioc 2405 drivers/message/fusion/mptbase.c ioc->bars = pci_select_bars(ioc->pcidev, IORESOURCE_MEM | ioc 2407 drivers/message/fusion/mptbase.c if (pci_enable_device(ioc->pcidev)) ioc 2409 drivers/message/fusion/mptbase.c if (pci_request_selected_regions(ioc->pcidev, ioc->bars, ioc 2420 drivers/message/fusion/mptbase.c ioc->pci_irq = -1; ioc 2421 drivers/message/fusion/mptbase.c if (ioc->pcidev->irq) { ioc 2422 drivers/message/fusion/mptbase.c if (ioc->msi_enable && !pci_enable_msi(ioc->pcidev)) ioc 2424 drivers/message/fusion/mptbase.c ioc->name); ioc 2426 drivers/message/fusion/mptbase.c ioc->msi_enable = 0; ioc 2427 drivers/message/fusion/mptbase.c rc = request_irq(ioc->pcidev->irq, mpt_interrupt, ioc 2428 drivers/message/fusion/mptbase.c IRQF_SHARED, ioc->name, ioc); ioc 2432 drivers/message/fusion/mptbase.c ioc->name, ioc->pcidev->irq); ioc 2433 drivers/message/fusion/mptbase.c if (ioc->msi_enable) ioc 2434 drivers/message/fusion/mptbase.c pci_disable_msi(ioc->pcidev); ioc 2439 drivers/message/fusion/mptbase.c ioc->pci_irq = ioc->pcidev->irq; ioc 2440 drivers/message/fusion/mptbase.c pci_set_master(ioc->pcidev); /* ?? */ ioc 2441 drivers/message/fusion/mptbase.c pci_set_drvdata(ioc->pcidev, ioc); ioc 2442 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_INFO_FMT ioc 2443 drivers/message/fusion/mptbase.c "installed at interrupt %d\n", ioc->name, ioc 2444 drivers/message/fusion/mptbase.c ioc->pcidev->irq)); ioc 2453 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_INFO_FMT "PrimeIocFifos\n", ioc 2454 drivers/message/fusion/mptbase.c ioc->name)); ioc 2455 drivers/message/fusion/mptbase.c if ((ret == 0) && ((rc = PrimeIocFifos(ioc)) != 0)) ioc 2461 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_INFO_FMT "SendIocInit\n", ioc 2462 drivers/message/fusion/mptbase.c ioc->name)); ioc 2463 drivers/message/fusion/mptbase.c if ((ret == 0) && ((rc = SendIocInit(ioc, sleepFlag)) != 0)) ioc 2466 drivers/message/fusion/mptbase.c if (alt_ioc_ready && ((rc = PrimeIocFifos(ioc->alt_ioc)) != 0)) { ioc 2469 drivers/message/fusion/mptbase.c ioc->alt_ioc->name, rc); ioc 2475 drivers/message/fusion/mptbase.c if ((rc = SendIocInit(ioc->alt_ioc, sleepFlag)) != 0) { ioc 2480 drivers/message/fusion/mptbase.c ioc->alt_ioc->name, rc); ioc 2485 drivers/message/fusion/mptbase.c if (ioc->upload_fw) { ioc 2486 drivers/message/fusion/mptbase.c ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 2487 drivers/message/fusion/mptbase.c "firmware upload required!\n", ioc->name)); ioc 2492 drivers/message/fusion/mptbase.c rc = mpt_do_upload(ioc, sleepFlag); ioc 2494 drivers/message/fusion/mptbase.c if (ioc->alt_ioc && ioc->alt_ioc->cached_fw) { ioc 2502 drivers/message/fusion/mptbase.c ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 2504 drivers/message/fusion/mptbase.c ioc->name, ioc->alt_ioc->name, ioc->alt_ioc->cached_fw)); ioc 2505 drivers/message/fusion/mptbase.c ioc->cached_fw = NULL; ioc 2509 drivers/message/fusion/mptbase.c "firmware upload failure!\n", ioc->name); ioc 2519 drivers/message/fusion/mptbase.c if ((ret == 0) && (!ioc->facts.EventState)) { ioc 2520 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_INFO_FMT ioc 2522 drivers/message/fusion/mptbase.c ioc->name)); ioc 2523 drivers/message/fusion/mptbase.c ret = SendEventNotification(ioc, 1, sleepFlag); /* 1=Enable */ ioc 2526 drivers/message/fusion/mptbase.c if (ioc->alt_ioc && alt_ioc_ready && !ioc->alt_ioc->facts.EventState) ioc 2527 drivers/message/fusion/mptbase.c rc = SendEventNotification(ioc->alt_ioc, 1, sleepFlag); ioc 2531 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->IntMask, MPI_HIM_DIM); ioc 2532 drivers/message/fusion/mptbase.c ioc->active = 1; ioc 2535 drivers/message/fusion/mptbase.c if (reset_alt_ioc_active && ioc->alt_ioc) { ioc 2537 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "alt-ioc" ioc 2539 drivers/message/fusion/mptbase.c ioc->alt_ioc->name)); ioc 2540 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->alt_ioc->chip->IntMask, ioc 2542 drivers/message/fusion/mptbase.c ioc->alt_ioc->active = 1; ioc 2558 drivers/message/fusion/mptbase.c mutex_init(&ioc->raid_data.inactive_list_mutex); ioc 2559 drivers/message/fusion/mptbase.c INIT_LIST_HEAD(&ioc->raid_data.inactive_list); ioc 2561 drivers/message/fusion/mptbase.c switch (ioc->bus_type) { ioc 2565 drivers/message/fusion/mptbase.c if(ioc->facts.IOCExceptions & ioc 2567 drivers/message/fusion/mptbase.c ret = mptbase_sas_persist_operation(ioc, ioc 2575 drivers/message/fusion/mptbase.c mpt_findImVolumes(ioc); ioc 2579 drivers/message/fusion/mptbase.c mpt_read_ioc_pg_1(ioc); ioc 2584 drivers/message/fusion/mptbase.c if ((ioc->pfacts[0].ProtocolFlags & ioc 2586 drivers/message/fusion/mptbase.c (ioc->lan_cnfg_page0.Header.PageLength == 0)) { ioc 2591 drivers/message/fusion/mptbase.c (void) GetLanConfigPages(ioc); ioc 2592 drivers/message/fusion/mptbase.c a = (u8*)&ioc->lan_cnfg_page1.HardwareAddressLow; ioc 2593 drivers/message/fusion/mptbase.c dprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 2594 drivers/message/fusion/mptbase.c "LanAddr = %pMR\n", ioc->name, a)); ioc 2601 drivers/message/fusion/mptbase.c mpt_GetScsiPortSettings(ioc, 0); ioc 2605 drivers/message/fusion/mptbase.c mpt_readScsiDevicePageHeaders(ioc, 0); ioc 2609 drivers/message/fusion/mptbase.c if (ioc->facts.MsgVersion >= MPI_VERSION_01_02) ioc 2610 drivers/message/fusion/mptbase.c mpt_findImVolumes(ioc); ioc 2614 drivers/message/fusion/mptbase.c mpt_read_ioc_pg_1(ioc); ioc 2616 drivers/message/fusion/mptbase.c mpt_read_ioc_pg_4(ioc); ioc 2621 drivers/message/fusion/mptbase.c GetIoUnitPage2(ioc); ioc 2622 drivers/message/fusion/mptbase.c mpt_get_manufacturing_pg_0(ioc); ioc 2627 drivers/message/fusion/mptbase.c free_irq(ioc->pci_irq, ioc); ioc 2628 drivers/message/fusion/mptbase.c if (ioc->msi_enable) ioc 2629 drivers/message/fusion/mptbase.c pci_disable_msi(ioc->pcidev); ioc 2648 drivers/message/fusion/mptbase.c mpt_detect_bound_ports(MPT_ADAPTER *ioc, struct pci_dev *pdev) ioc 2655 drivers/message/fusion/mptbase.c dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "PCI device %s devfn=%x/%x," ioc 2657 drivers/message/fusion/mptbase.c ioc->name, pci_name(pdev), pdev->bus->number, ioc 2671 drivers/message/fusion/mptbase.c if (ioc->alt_ioc != NULL) { ioc 2674 drivers/message/fusion/mptbase.c ioc->name, ioc->name, ioc->alt_ioc->name); ioc 2683 drivers/message/fusion/mptbase.c dprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 2685 drivers/message/fusion/mptbase.c ioc->name, ioc->name, ioc_srch->name)); ioc 2686 drivers/message/fusion/mptbase.c ioc_srch->alt_ioc = ioc; ioc 2687 drivers/message/fusion/mptbase.c ioc->alt_ioc = ioc_srch; ioc 2699 drivers/message/fusion/mptbase.c mpt_adapter_disable(MPT_ADAPTER *ioc) ioc 2704 drivers/message/fusion/mptbase.c if (ioc->cached_fw != NULL) { ioc 2705 drivers/message/fusion/mptbase.c ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 2706 drivers/message/fusion/mptbase.c "%s: Pushing FW onto adapter\n", __func__, ioc->name)); ioc 2707 drivers/message/fusion/mptbase.c if ((ret = mpt_downloadboot(ioc, (MpiFwHeader_t *) ioc 2708 drivers/message/fusion/mptbase.c ioc->cached_fw, CAN_SLEEP)) < 0) { ioc 2711 drivers/message/fusion/mptbase.c ioc->name, ret); ioc 2718 drivers/message/fusion/mptbase.c if (mpt_GetIocState(ioc, 1) != MPI_IOC_STATE_READY) { ioc 2719 drivers/message/fusion/mptbase.c if (!SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, ioc 2721 drivers/message/fusion/mptbase.c if (mpt_GetIocState(ioc, 1) != MPI_IOC_STATE_READY) ioc 2724 drivers/message/fusion/mptbase.c ioc->name, __func__); ioc 2727 drivers/message/fusion/mptbase.c "failed!\n", ioc->name, __func__); ioc 2732 drivers/message/fusion/mptbase.c synchronize_irq(ioc->pcidev->irq); ioc 2733 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->IntMask, 0xFFFFFFFF); ioc 2734 drivers/message/fusion/mptbase.c ioc->active = 0; ioc 2737 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->IntStatus, 0); ioc 2738 drivers/message/fusion/mptbase.c CHIPREG_READ32(&ioc->chip->IntStatus); ioc 2740 drivers/message/fusion/mptbase.c if (ioc->alloc != NULL) { ioc 2741 drivers/message/fusion/mptbase.c sz = ioc->alloc_sz; ioc 2742 drivers/message/fusion/mptbase.c dexitprintk(ioc, printk(MYIOC_s_INFO_FMT "free @ %p, sz=%d bytes\n", ioc 2743 drivers/message/fusion/mptbase.c ioc->name, ioc->alloc, ioc->alloc_sz)); ioc 2744 drivers/message/fusion/mptbase.c pci_free_consistent(ioc->pcidev, sz, ioc 2745 drivers/message/fusion/mptbase.c ioc->alloc, ioc->alloc_dma); ioc 2746 drivers/message/fusion/mptbase.c ioc->reply_frames = NULL; ioc 2747 drivers/message/fusion/mptbase.c ioc->req_frames = NULL; ioc 2748 drivers/message/fusion/mptbase.c ioc->alloc = NULL; ioc 2749 drivers/message/fusion/mptbase.c ioc->alloc_total -= sz; ioc 2752 drivers/message/fusion/mptbase.c if (ioc->sense_buf_pool != NULL) { ioc 2753 drivers/message/fusion/mptbase.c sz = (ioc->req_depth * MPT_SENSE_BUFFER_ALLOC); ioc 2754 drivers/message/fusion/mptbase.c pci_free_consistent(ioc->pcidev, sz, ioc 2755 drivers/message/fusion/mptbase.c ioc->sense_buf_pool, ioc->sense_buf_pool_dma); ioc 2756 drivers/message/fusion/mptbase.c ioc->sense_buf_pool = NULL; ioc 2757 drivers/message/fusion/mptbase.c ioc->alloc_total -= sz; ioc 2760 drivers/message/fusion/mptbase.c if (ioc->events != NULL){ ioc 2762 drivers/message/fusion/mptbase.c kfree(ioc->events); ioc 2763 drivers/message/fusion/mptbase.c ioc->events = NULL; ioc 2764 drivers/message/fusion/mptbase.c ioc->alloc_total -= sz; ioc 2767 drivers/message/fusion/mptbase.c mpt_free_fw_memory(ioc); ioc 2769 drivers/message/fusion/mptbase.c kfree(ioc->spi_data.nvram); ioc 2770 drivers/message/fusion/mptbase.c mpt_inactive_raid_list_free(ioc); ioc 2771 drivers/message/fusion/mptbase.c kfree(ioc->raid_data.pIocPg2); ioc 2772 drivers/message/fusion/mptbase.c kfree(ioc->raid_data.pIocPg3); ioc 2773 drivers/message/fusion/mptbase.c ioc->spi_data.nvram = NULL; ioc 2774 drivers/message/fusion/mptbase.c ioc->raid_data.pIocPg3 = NULL; ioc 2776 drivers/message/fusion/mptbase.c if (ioc->spi_data.pIocPg4 != NULL) { ioc 2777 drivers/message/fusion/mptbase.c sz = ioc->spi_data.IocPg4Sz; ioc 2778 drivers/message/fusion/mptbase.c pci_free_consistent(ioc->pcidev, sz, ioc 2779 drivers/message/fusion/mptbase.c ioc->spi_data.pIocPg4, ioc 2780 drivers/message/fusion/mptbase.c ioc->spi_data.IocPg4_dma); ioc 2781 drivers/message/fusion/mptbase.c ioc->spi_data.pIocPg4 = NULL; ioc 2782 drivers/message/fusion/mptbase.c ioc->alloc_total -= sz; ioc 2785 drivers/message/fusion/mptbase.c if (ioc->ReqToChain != NULL) { ioc 2786 drivers/message/fusion/mptbase.c kfree(ioc->ReqToChain); ioc 2787 drivers/message/fusion/mptbase.c kfree(ioc->RequestNB); ioc 2788 drivers/message/fusion/mptbase.c ioc->ReqToChain = NULL; ioc 2791 drivers/message/fusion/mptbase.c kfree(ioc->ChainToChain); ioc 2792 drivers/message/fusion/mptbase.c ioc->ChainToChain = NULL; ioc 2794 drivers/message/fusion/mptbase.c if (ioc->HostPageBuffer != NULL) { ioc 2795 drivers/message/fusion/mptbase.c if((ret = mpt_host_page_access_control(ioc, ioc 2799 drivers/message/fusion/mptbase.c ioc->name, __func__, ret); ioc 2801 drivers/message/fusion/mptbase.c dexitprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 2803 drivers/message/fusion/mptbase.c ioc->name, ioc->HostPageBuffer, ioc 2804 drivers/message/fusion/mptbase.c ioc->HostPageBuffer_sz)); ioc 2805 drivers/message/fusion/mptbase.c pci_free_consistent(ioc->pcidev, ioc->HostPageBuffer_sz, ioc 2806 drivers/message/fusion/mptbase.c ioc->HostPageBuffer, ioc->HostPageBuffer_dma); ioc 2807 drivers/message/fusion/mptbase.c ioc->HostPageBuffer = NULL; ioc 2808 drivers/message/fusion/mptbase.c ioc->HostPageBuffer_sz = 0; ioc 2809 drivers/message/fusion/mptbase.c ioc->alloc_total -= ioc->HostPageBuffer_sz; ioc 2812 drivers/message/fusion/mptbase.c pci_set_drvdata(ioc->pcidev, NULL); ioc 2823 drivers/message/fusion/mptbase.c mpt_adapter_dispose(MPT_ADAPTER *ioc) ioc 2827 drivers/message/fusion/mptbase.c if (ioc == NULL) ioc 2830 drivers/message/fusion/mptbase.c sz_first = ioc->alloc_total; ioc 2832 drivers/message/fusion/mptbase.c mpt_adapter_disable(ioc); ioc 2834 drivers/message/fusion/mptbase.c if (ioc->pci_irq != -1) { ioc 2835 drivers/message/fusion/mptbase.c free_irq(ioc->pci_irq, ioc); ioc 2836 drivers/message/fusion/mptbase.c if (ioc->msi_enable) ioc 2837 drivers/message/fusion/mptbase.c pci_disable_msi(ioc->pcidev); ioc 2838 drivers/message/fusion/mptbase.c ioc->pci_irq = -1; ioc 2841 drivers/message/fusion/mptbase.c if (ioc->memmap != NULL) { ioc 2842 drivers/message/fusion/mptbase.c iounmap(ioc->memmap); ioc 2843 drivers/message/fusion/mptbase.c ioc->memmap = NULL; ioc 2846 drivers/message/fusion/mptbase.c pci_disable_device(ioc->pcidev); ioc 2847 drivers/message/fusion/mptbase.c pci_release_selected_regions(ioc->pcidev, ioc->bars); ioc 2850 drivers/message/fusion/mptbase.c list_del(&ioc->list); ioc 2852 drivers/message/fusion/mptbase.c sz_last = ioc->alloc_total; ioc 2853 drivers/message/fusion/mptbase.c dprintk(ioc, printk(MYIOC_s_INFO_FMT "free'd %d of %d bytes\n", ioc 2854 drivers/message/fusion/mptbase.c ioc->name, sz_first-sz_last+(int)sizeof(*ioc), sz_first)); ioc 2856 drivers/message/fusion/mptbase.c if (ioc->alt_ioc) ioc 2857 drivers/message/fusion/mptbase.c ioc->alt_ioc->alt_ioc = NULL; ioc 2859 drivers/message/fusion/mptbase.c kfree(ioc); ioc 2868 drivers/message/fusion/mptbase.c MptDisplayIocCapabilities(MPT_ADAPTER *ioc) ioc 2872 drivers/message/fusion/mptbase.c printk(KERN_INFO "%s: ", ioc->name); ioc 2873 drivers/message/fusion/mptbase.c if (ioc->prod_name) ioc 2874 drivers/message/fusion/mptbase.c pr_cont("%s: ", ioc->prod_name); ioc 2877 drivers/message/fusion/mptbase.c if (ioc->pfacts[0].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_INITIATOR) { ioc 2882 drivers/message/fusion/mptbase.c if (ioc->pfacts[0].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_TARGET) { ioc 2887 drivers/message/fusion/mptbase.c if (ioc->pfacts[0].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_LAN) { ioc 2896 drivers/message/fusion/mptbase.c if (ioc->pfacts[0].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_TARGET) { ioc 2921 drivers/message/fusion/mptbase.c MakeIocReady(MPT_ADAPTER *ioc, int force, int sleepFlag) ioc 2932 drivers/message/fusion/mptbase.c ioc_state = mpt_GetIocState(ioc, 0); ioc 2933 drivers/message/fusion/mptbase.c dhsprintk(ioc, printk(MYIOC_s_INFO_FMT "MakeIocReady [raw] state=%08x\n", ioc->name, ioc_state)); ioc 2942 drivers/message/fusion/mptbase.c ioc->name); ioc 2948 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_INFO_FMT ioc 2949 drivers/message/fusion/mptbase.c "IOC is in READY state\n", ioc->name)); ioc 2959 drivers/message/fusion/mptbase.c ioc->name); ioc 2961 drivers/message/fusion/mptbase.c ioc->name, ioc_state & MPI_DOORBELL_DATA_MASK); ioc 2968 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "IOC operational unexpected\n", ioc 2969 drivers/message/fusion/mptbase.c ioc->name)); ioc 2977 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_INFO_FMT ioc 2979 drivers/message/fusion/mptbase.c ioc->name, whoinit, statefault, force)); ioc 2984 drivers/message/fusion/mptbase.c if ((r = SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, sleepFlag)) == 0) ioc 2991 drivers/message/fusion/mptbase.c hard_reset_done = KickStart(ioc, statefault||force, sleepFlag); ioc 3001 drivers/message/fusion/mptbase.c while ((ioc_state = mpt_GetIocState(ioc, 1)) != MPI_IOC_STATE_READY) { ioc 3007 drivers/message/fusion/mptbase.c if ((r = SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, sleepFlag)) != 0) { ioc 3008 drivers/message/fusion/mptbase.c printk(MYIOC_s_ERR_FMT "IOC msg unit reset failed!\n", ioc->name); ioc 3016 drivers/message/fusion/mptbase.c if ((r = SendIocReset(ioc, MPI_FUNCTION_IO_UNIT_RESET, sleepFlag)) != 0) { ioc 3017 drivers/message/fusion/mptbase.c printk(MYIOC_s_ERR_FMT "IO unit reset failed!\n", ioc->name); ioc 3026 drivers/message/fusion/mptbase.c ioc->name, ioc_state, (int)((ii+5)/HZ)); ioc 3039 drivers/message/fusion/mptbase.c printk(MYIOC_s_INFO_FMT "Recovered from %s\n", ioc->name, ioc 3056 drivers/message/fusion/mptbase.c mpt_GetIocState(MPT_ADAPTER *ioc, int cooked) ioc 3061 drivers/message/fusion/mptbase.c s = CHIPREG_READ32(&ioc->chip->Doorbell); ioc 3065 drivers/message/fusion/mptbase.c ioc->last_state = sc; ioc 3080 drivers/message/fusion/mptbase.c GetIocFacts(MPT_ADAPTER *ioc, int sleepFlag, int reason) ioc 3092 drivers/message/fusion/mptbase.c if (ioc->last_state == MPI_IOC_STATE_RESET) { ioc 3095 drivers/message/fusion/mptbase.c ioc->name, ioc->last_state); ioc 3099 drivers/message/fusion/mptbase.c facts = &ioc->facts; ioc 3112 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 3114 drivers/message/fusion/mptbase.c ioc->name, req_sz, reply_sz)); ioc 3119 drivers/message/fusion/mptbase.c r = mpt_handshake_req_reply_wait(ioc, req_sz, (u32*)&get_facts, ioc 3137 drivers/message/fusion/mptbase.c if (ioc->FirstWhoInit == WHOINIT_UNKNOWN) ioc 3138 drivers/message/fusion/mptbase.c ioc->FirstWhoInit = facts->WhoInit; ioc 3170 drivers/message/fusion/mptbase.c if ((ioc->facts.ProductID & MPI_FW_HEADER_PID_PROD_MASK) ioc 3172 drivers/message/fusion/mptbase.c ioc->ir_firmware = 1; ioc 3198 drivers/message/fusion/mptbase.c ioc->name); ioc 3204 drivers/message/fusion/mptbase.c ioc->NB_for_64_byte_frame = vv; ioc 3210 drivers/message/fusion/mptbase.c ioc->NBShiftFactor = shiftFactor; ioc 3211 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 3213 drivers/message/fusion/mptbase.c ioc->name, vv, shiftFactor, r)); ioc 3220 drivers/message/fusion/mptbase.c ioc->req_sz = min(MPT_DEFAULT_FRAME_SIZE, facts->RequestFrameSize * 4); ioc 3221 drivers/message/fusion/mptbase.c ioc->req_depth = min_t(int, MPT_MAX_REQ_DEPTH, facts->GlobalCredits); ioc 3222 drivers/message/fusion/mptbase.c ioc->reply_sz = MPT_REPLY_FRAME_SIZE; ioc 3223 drivers/message/fusion/mptbase.c ioc->reply_depth = min_t(int, MPT_DEFAULT_REPLY_DEPTH, facts->ReplyQueueDepth); ioc 3225 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "reply_sz=%3d, reply_depth=%4d\n", ioc 3226 drivers/message/fusion/mptbase.c ioc->name, ioc->reply_sz, ioc->reply_depth)); ioc 3227 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "req_sz =%3d, req_depth =%4d\n", ioc 3228 drivers/message/fusion/mptbase.c ioc->name, ioc->req_sz, ioc->req_depth)); ioc 3231 drivers/message/fusion/mptbase.c if ( (r = GetPortFacts(ioc, 0, sleepFlag)) != 0 ) ioc 3237 drivers/message/fusion/mptbase.c ioc->name, facts->MsgLength, (offsetof(IOCFactsReply_t, ioc 3255 drivers/message/fusion/mptbase.c GetPortFacts(MPT_ADAPTER *ioc, int portnum, int sleepFlag) ioc 3265 drivers/message/fusion/mptbase.c if (ioc->last_state == MPI_IOC_STATE_RESET) { ioc 3267 drivers/message/fusion/mptbase.c ioc->name, ioc->last_state ); ioc 3271 drivers/message/fusion/mptbase.c pfacts = &ioc->pfacts[portnum]; ioc 3285 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Sending get PortFacts(%d) request\n", ioc 3286 drivers/message/fusion/mptbase.c ioc->name, portnum)); ioc 3291 drivers/message/fusion/mptbase.c ii = mpt_handshake_req_reply_wait(ioc, req_sz, (u32*)&get_pfacts, ioc 3309 drivers/message/fusion/mptbase.c max_id = (ioc->bus_type == SAS) ? pfacts->PortSCSIID : ioc 3311 drivers/message/fusion/mptbase.c ioc->devices_per_bus = (max_id > 255) ? 256 : max_id; ioc 3312 drivers/message/fusion/mptbase.c ioc->number_of_buses = (ioc->devices_per_bus < 256) ? 1 : max_id/256; ioc 3320 drivers/message/fusion/mptbase.c ioc->devices_per_bus = 1; ioc 3321 drivers/message/fusion/mptbase.c ioc->number_of_buses = (max_id > 255) ? 255 : max_id; ioc 3338 drivers/message/fusion/mptbase.c SendIocInit(MPT_ADAPTER *ioc, int sleepFlag) ioc 3357 drivers/message/fusion/mptbase.c if (ioc->facts.Flags & MPI_IOCFACTS_FLAGS_FW_DOWNLOAD_BOOT) ioc 3358 drivers/message/fusion/mptbase.c ioc->upload_fw = 1; ioc 3360 drivers/message/fusion/mptbase.c ioc->upload_fw = 0; ioc 3361 drivers/message/fusion/mptbase.c ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "upload_fw %d facts.Flags=%x\n", ioc 3362 drivers/message/fusion/mptbase.c ioc->name, ioc->upload_fw, ioc->facts.Flags)); ioc 3364 drivers/message/fusion/mptbase.c ioc_init.MaxDevices = (U8)ioc->devices_per_bus; ioc 3365 drivers/message/fusion/mptbase.c ioc_init.MaxBuses = (U8)ioc->number_of_buses; ioc 3367 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "facts.MsgVersion=%x\n", ioc 3368 drivers/message/fusion/mptbase.c ioc->name, ioc->facts.MsgVersion)); ioc 3369 drivers/message/fusion/mptbase.c if (ioc->facts.MsgVersion >= MPI_VERSION_01_05) { ioc 3374 drivers/message/fusion/mptbase.c if (ioc->facts.Flags & MPI_IOCFACTS_FLAGS_HOST_PAGE_BUFFER_PERSISTENT) { ioc 3375 drivers/message/fusion/mptbase.c ioc_init.HostPageBufferSGE = ioc->facts.HostPageBufferSGE; ioc 3376 drivers/message/fusion/mptbase.c } else if(mpt_host_page_alloc(ioc, &ioc_init)) ioc 3379 drivers/message/fusion/mptbase.c ioc_init.ReplyFrameSize = cpu_to_le16(ioc->reply_sz); /* in BYTES */ ioc 3381 drivers/message/fusion/mptbase.c if (ioc->sg_addr_size == sizeof(u64)) { ioc 3385 drivers/message/fusion/mptbase.c ioc_init.HostMfaHighAddr = cpu_to_le32((u32)((u64)ioc->alloc_dma >> 32)); ioc 3386 drivers/message/fusion/mptbase.c ioc_init.SenseBufferHighAddr = cpu_to_le32((u32)((u64)ioc->sense_buf_pool_dma >> 32)); ioc 3393 drivers/message/fusion/mptbase.c ioc->facts.CurrentHostMfaHighAddr = ioc_init.HostMfaHighAddr; ioc 3394 drivers/message/fusion/mptbase.c ioc->facts.CurrentSenseBufferHighAddr = ioc_init.SenseBufferHighAddr; ioc 3395 drivers/message/fusion/mptbase.c ioc->facts.MaxDevices = ioc_init.MaxDevices; ioc 3396 drivers/message/fusion/mptbase.c ioc->facts.MaxBuses = ioc_init.MaxBuses; ioc 3398 drivers/message/fusion/mptbase.c dhsprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Sending IOCInit (req @ %p)\n", ioc 3399 drivers/message/fusion/mptbase.c ioc->name, &ioc_init)); ioc 3401 drivers/message/fusion/mptbase.c r = mpt_handshake_req_reply_wait(ioc, sizeof(IOCInit_t), (u32*)&ioc_init, ioc 3404 drivers/message/fusion/mptbase.c printk(MYIOC_s_ERR_FMT "Sending IOCInit failed(%d)!\n",ioc->name, r); ioc 3412 drivers/message/fusion/mptbase.c dhsprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Sending PortEnable (req @ %p)\n", ioc 3413 drivers/message/fusion/mptbase.c ioc->name, &ioc_init)); ioc 3415 drivers/message/fusion/mptbase.c if ((r = SendPortEnable(ioc, 0, sleepFlag)) != 0) { ioc 3416 drivers/message/fusion/mptbase.c printk(MYIOC_s_ERR_FMT "Sending PortEnable failed(%d)!\n",ioc->name, r); ioc 3426 drivers/message/fusion/mptbase.c state = mpt_GetIocState(ioc, 1); ioc 3436 drivers/message/fusion/mptbase.c ioc->name, (int)((count+5)/HZ)); ioc 3440 drivers/message/fusion/mptbase.c state = mpt_GetIocState(ioc, 1); ioc 3443 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Wait IOC_OPERATIONAL state (cnt=%d)\n", ioc 3444 drivers/message/fusion/mptbase.c ioc->name, count)); ioc 3446 drivers/message/fusion/mptbase.c ioc->aen_event_read_flag=0; ioc 3462 drivers/message/fusion/mptbase.c SendPortEnable(MPT_ADAPTER *ioc, int portnum, int sleepFlag) ioc 3483 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Sending Port(%d)Enable (req @ %p)\n", ioc 3484 drivers/message/fusion/mptbase.c ioc->name, portnum, &port_enable)); ioc 3488 drivers/message/fusion/mptbase.c if (ioc->ir_firmware || ioc->bus_type == SAS) { ioc 3489 drivers/message/fusion/mptbase.c rc = mpt_handshake_req_reply_wait(ioc, req_sz, ioc 3493 drivers/message/fusion/mptbase.c rc = mpt_handshake_req_reply_wait(ioc, req_sz, ioc 3511 drivers/message/fusion/mptbase.c mpt_alloc_fw_memory(MPT_ADAPTER *ioc, int size) ioc 3515 drivers/message/fusion/mptbase.c if (ioc->cached_fw) { ioc 3519 drivers/message/fusion/mptbase.c else if (ioc->alt_ioc && ioc->alt_ioc->cached_fw) { ioc 3520 drivers/message/fusion/mptbase.c ioc->cached_fw = ioc->alt_ioc->cached_fw; /* use alt_ioc's memory */ ioc 3521 drivers/message/fusion/mptbase.c ioc->cached_fw_dma = ioc->alt_ioc->cached_fw_dma; ioc 3525 drivers/message/fusion/mptbase.c ioc->cached_fw = pci_alloc_consistent(ioc->pcidev, size, &ioc->cached_fw_dma); ioc 3526 drivers/message/fusion/mptbase.c if (!ioc->cached_fw) { ioc 3528 drivers/message/fusion/mptbase.c ioc->name); ioc 3531 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "FW Image @ %p[%p], sz=%d[%x] bytes\n", ioc 3532 drivers/message/fusion/mptbase.c ioc->name, ioc->cached_fw, (void *)(ulong)ioc->cached_fw_dma, size, size)); ioc 3533 drivers/message/fusion/mptbase.c ioc->alloc_total += size; ioc 3548 drivers/message/fusion/mptbase.c mpt_free_fw_memory(MPT_ADAPTER *ioc) ioc 3552 drivers/message/fusion/mptbase.c if (!ioc->cached_fw) ioc 3555 drivers/message/fusion/mptbase.c sz = ioc->facts.FWImageSize; ioc 3556 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "free_fw_memory: FW Image @ %p[%p], sz=%d[%x] bytes\n", ioc 3557 drivers/message/fusion/mptbase.c ioc->name, ioc->cached_fw, (void *)(ulong)ioc->cached_fw_dma, sz, sz)); ioc 3558 drivers/message/fusion/mptbase.c pci_free_consistent(ioc->pcidev, sz, ioc->cached_fw, ioc->cached_fw_dma); ioc 3559 drivers/message/fusion/mptbase.c ioc->alloc_total -= sz; ioc 3560 drivers/message/fusion/mptbase.c ioc->cached_fw = NULL; ioc 3578 drivers/message/fusion/mptbase.c mpt_do_upload(MPT_ADAPTER *ioc, int sleepFlag) ioc 3590 drivers/message/fusion/mptbase.c if ((sz = ioc->facts.FWImageSize) == 0) ioc 3593 drivers/message/fusion/mptbase.c if (mpt_alloc_fw_memory(ioc, ioc->facts.FWImageSize) != 0) ioc 3596 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_INFO_FMT ": FW Image @ %p[%p], sz=%d[%x] bytes\n", ioc 3597 drivers/message/fusion/mptbase.c ioc->name, ioc->cached_fw, (void *)(ulong)ioc->cached_fw_dma, sz, sz)); ioc 3599 drivers/message/fusion/mptbase.c prequest = (sleepFlag == NO_SLEEP) ? kzalloc(ioc->req_sz, GFP_ATOMIC) : ioc 3600 drivers/message/fusion/mptbase.c kzalloc(ioc->req_sz, GFP_KERNEL); ioc 3602 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "fw upload failed " ioc 3603 drivers/message/fusion/mptbase.c "while allocating memory \n", ioc->name)); ioc 3604 drivers/message/fusion/mptbase.c mpt_free_fw_memory(ioc); ioc 3623 drivers/message/fusion/mptbase.c ioc->add_sge((char *)ptcsge, flagsLength, ioc->cached_fw_dma); ioc 3625 drivers/message/fusion/mptbase.c ioc->SGE_size; ioc 3626 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Sending FW Upload " ioc 3627 drivers/message/fusion/mptbase.c " (req @ %p) fw_size=%d mf_request_size=%d\n", ioc->name, prequest, ioc 3628 drivers/message/fusion/mptbase.c ioc->facts.FWImageSize, request_size)); ioc 3629 drivers/message/fusion/mptbase.c DBG_DUMP_FW_REQUEST_FRAME(ioc, (u32 *)prequest); ioc 3631 drivers/message/fusion/mptbase.c ii = mpt_handshake_req_reply_wait(ioc, request_size, (u32 *)prequest, ioc 3634 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "FW Upload completed " ioc 3635 drivers/message/fusion/mptbase.c "rc=%x \n", ioc->name, ii)); ioc 3646 drivers/message/fusion/mptbase.c ioc->facts.FWImageSize == ioc 3650 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT ": do_upload cmdStatus=%d \n", ioc 3651 drivers/message/fusion/mptbase.c ioc->name, cmdStatus)); ioc 3655 drivers/message/fusion/mptbase.c ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "fw upload failed, " ioc 3656 drivers/message/fusion/mptbase.c "freeing image \n", ioc->name)); ioc 3657 drivers/message/fusion/mptbase.c mpt_free_fw_memory(ioc); ioc 3679 drivers/message/fusion/mptbase.c mpt_downloadboot(MPT_ADAPTER *ioc, MpiFwHeader_t *pFwHeader, int sleepFlag) ioc 3691 drivers/message/fusion/mptbase.c ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "downloadboot: fw size 0x%x (%d), FW Ptr %p\n", ioc 3692 drivers/message/fusion/mptbase.c ioc->name, pFwHeader->ImageSize, pFwHeader->ImageSize, pFwHeader)); ioc 3694 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->WriteSequence, 0xFF); ioc 3695 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_1ST_KEY_VALUE); ioc 3696 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_2ND_KEY_VALUE); ioc 3697 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_3RD_KEY_VALUE); ioc 3698 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_4TH_KEY_VALUE); ioc 3699 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_5TH_KEY_VALUE); ioc 3701 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->Diagnostic, (MPI_DIAG_PREVENT_IOC_BOOT | MPI_DIAG_DISABLE_ARM)); ioc 3710 drivers/message/fusion/mptbase.c diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); ioc 3711 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val | MPI_DIAG_RESET_ADAPTER); ioc 3714 drivers/message/fusion/mptbase.c diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); ioc 3716 drivers/message/fusion/mptbase.c ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "RESET_ADAPTER cleared, count=%d\n", ioc 3717 drivers/message/fusion/mptbase.c ioc->name, count)); ioc 3729 drivers/message/fusion/mptbase.c ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "downloadboot failed! " ioc 3731 drivers/message/fusion/mptbase.c ioc->name, diag0val)); ioc 3735 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->WriteSequence, 0xFF); ioc 3736 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_1ST_KEY_VALUE); ioc 3737 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_2ND_KEY_VALUE); ioc 3738 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_3RD_KEY_VALUE); ioc 3739 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_4TH_KEY_VALUE); ioc 3740 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_5TH_KEY_VALUE); ioc 3743 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->Diagnostic, (MPI_DIAG_RW_ENABLE | MPI_DIAG_DISABLE_ARM)); ioc 3751 drivers/message/fusion/mptbase.c if (ioc->errata_flag_1064) ioc 3752 drivers/message/fusion/mptbase.c pci_enable_io_access(ioc->pcidev); ioc 3754 drivers/message/fusion/mptbase.c CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwAddress, pFwHeader->LoadStartAddress); ioc 3755 drivers/message/fusion/mptbase.c ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "LoadStart addr written 0x%x \n", ioc 3756 drivers/message/fusion/mptbase.c ioc->name, pFwHeader->LoadStartAddress)); ioc 3758 drivers/message/fusion/mptbase.c ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Write FW Image: 0x%x bytes @ %p\n", ioc 3759 drivers/message/fusion/mptbase.c ioc->name, fwSize*4, ptrFw)); ioc 3761 drivers/message/fusion/mptbase.c CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwData, *ptrFw++); ioc 3773 drivers/message/fusion/mptbase.c ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Write Ext Image: 0x%x (%d) bytes @ %p load_addr=%x\n", ioc 3774 drivers/message/fusion/mptbase.c ioc->name, fwSize*4, fwSize*4, ptrFw, load_addr)); ioc 3775 drivers/message/fusion/mptbase.c CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwAddress, load_addr); ioc 3778 drivers/message/fusion/mptbase.c CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwData, *ptrFw++); ioc 3784 drivers/message/fusion/mptbase.c ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Write IopResetVector Addr=%x! \n", ioc->name, pFwHeader->IopResetRegAddr)); ioc 3785 drivers/message/fusion/mptbase.c CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwAddress, pFwHeader->IopResetRegAddr); ioc 3788 drivers/message/fusion/mptbase.c ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Write IopResetVector Value=%x! \n", ioc->name, pFwHeader->IopResetVectorValue)); ioc 3789 drivers/message/fusion/mptbase.c CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwData, pFwHeader->IopResetVectorValue); ioc 3794 drivers/message/fusion/mptbase.c if (ioc->bus_type == SPI) { ioc 3799 drivers/message/fusion/mptbase.c CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwAddress, 0x3F000000); ioc 3800 drivers/message/fusion/mptbase.c diagRwData = CHIPREG_PIO_READ32(&ioc->pio_chip->DiagRwData); ioc 3802 drivers/message/fusion/mptbase.c CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwAddress, 0x3F000000); ioc 3803 drivers/message/fusion/mptbase.c CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwData, diagRwData); ioc 3806 drivers/message/fusion/mptbase.c diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); ioc 3807 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val | ioc 3818 drivers/message/fusion/mptbase.c if (ioc->errata_flag_1064) ioc 3819 drivers/message/fusion/mptbase.c pci_disable_io_access(ioc->pcidev); ioc 3821 drivers/message/fusion/mptbase.c diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); ioc 3822 drivers/message/fusion/mptbase.c ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "downloadboot diag0val=%x, " ioc 3824 drivers/message/fusion/mptbase.c ioc->name, diag0val)); ioc 3826 drivers/message/fusion/mptbase.c ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "downloadboot now diag0val=%x\n", ioc 3827 drivers/message/fusion/mptbase.c ioc->name, diag0val)); ioc 3828 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val); ioc 3831 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->WriteSequence, 0xFF); ioc 3833 drivers/message/fusion/mptbase.c if (ioc->bus_type == SAS) { ioc 3834 drivers/message/fusion/mptbase.c ioc_state = mpt_GetIocState(ioc, 0); ioc 3835 drivers/message/fusion/mptbase.c if ( (GetIocFacts(ioc, sleepFlag, ioc 3837 drivers/message/fusion/mptbase.c ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "GetIocFacts failed: IocState=%x\n", ioc 3838 drivers/message/fusion/mptbase.c ioc->name, ioc_state)); ioc 3844 drivers/message/fusion/mptbase.c if ((ioc_state = mpt_GetIocState(ioc, 0)) & MPI_IOC_STATE_READY) { ioc 3845 drivers/message/fusion/mptbase.c ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 3847 drivers/message/fusion/mptbase.c ioc->name, count, ioc_state)); ioc 3848 drivers/message/fusion/mptbase.c if (ioc->bus_type == SAS) { ioc 3851 drivers/message/fusion/mptbase.c if ((SendIocInit(ioc, sleepFlag)) != 0) { ioc 3852 drivers/message/fusion/mptbase.c ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 3854 drivers/message/fusion/mptbase.c ioc->name)); ioc 3857 drivers/message/fusion/mptbase.c ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 3859 drivers/message/fusion/mptbase.c ioc->name)); ioc 3868 drivers/message/fusion/mptbase.c ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 3869 drivers/message/fusion/mptbase.c "downloadboot failed! IocState=%x\n",ioc->name, ioc_state)); ioc 3900 drivers/message/fusion/mptbase.c KickStart(MPT_ADAPTER *ioc, int force, int sleepFlag) ioc 3906 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "KickStarting!\n", ioc->name)); ioc 3907 drivers/message/fusion/mptbase.c if (ioc->bus_type == SPI) { ioc 3911 drivers/message/fusion/mptbase.c SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, sleepFlag); ioc 3920 drivers/message/fusion/mptbase.c hard_reset_done = mpt_diag_reset(ioc, force, sleepFlag); ioc 3924 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Diagnostic reset successful!\n", ioc 3925 drivers/message/fusion/mptbase.c ioc->name)); ioc 3929 drivers/message/fusion/mptbase.c ioc_state = mpt_GetIocState(ioc, 1); ioc 3931 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "KickStart successful! (cnt=%d)\n", ioc 3932 drivers/message/fusion/mptbase.c ioc->name, cnt)); ioc 3942 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_ERR_FMT "Failed to come READY after reset! IocState=%x\n", ioc 3943 drivers/message/fusion/mptbase.c ioc->name, mpt_GetIocState(ioc, 0))); ioc 3967 drivers/message/fusion/mptbase.c mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag) ioc 3978 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->IntStatus, 0); ioc 3980 drivers/message/fusion/mptbase.c if (ioc->pcidev->device == MPI_MANUFACTPAGE_DEVID_SAS1078) { ioc 3985 drivers/message/fusion/mptbase.c drsprintk(ioc, printk(MYIOC_s_WARN_FMT "%s: Doorbell=%p; 1078 reset " ioc 3986 drivers/message/fusion/mptbase.c "address=%p\n", ioc->name, __func__, ioc 3987 drivers/message/fusion/mptbase.c &ioc->chip->Doorbell, &ioc->chip->Reset_1078)); ioc 3988 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->Reset_1078, 0x07); ioc 4002 drivers/message/fusion/mptbase.c (*(MptResetHandlers[cb_idx]))(ioc, ioc 4007 drivers/message/fusion/mptbase.c doorbell = CHIPREG_READ32(&ioc->chip->Doorbell); ioc 4010 drivers/message/fusion/mptbase.c drsprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 4013 drivers/message/fusion/mptbase.c ioc->name, doorbell, count)); ioc 4029 drivers/message/fusion/mptbase.c diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); ioc 4031 drivers/message/fusion/mptbase.c if (ioc->debug_level & MPT_DEBUG) { ioc 4032 drivers/message/fusion/mptbase.c if (ioc->alt_ioc) ioc 4033 drivers/message/fusion/mptbase.c diag1val = CHIPREG_READ32(&ioc->alt_ioc->chip->Diagnostic); ioc 4034 drivers/message/fusion/mptbase.c dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "DbG1: diag0=%08x, diag1=%08x\n", ioc 4035 drivers/message/fusion/mptbase.c ioc->name, diag0val, diag1val)); ioc 4046 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->WriteSequence, 0xFF); ioc 4047 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_1ST_KEY_VALUE); ioc 4048 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_2ND_KEY_VALUE); ioc 4049 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_3RD_KEY_VALUE); ioc 4050 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_4TH_KEY_VALUE); ioc 4051 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_5TH_KEY_VALUE); ioc 4063 drivers/message/fusion/mptbase.c ioc->name, diag0val); ioc 4068 drivers/message/fusion/mptbase.c diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); ioc 4070 drivers/message/fusion/mptbase.c dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Wrote magic DiagWriteEn sequence (%x)\n", ioc 4071 drivers/message/fusion/mptbase.c ioc->name, diag0val)); ioc 4074 drivers/message/fusion/mptbase.c if (ioc->debug_level & MPT_DEBUG) { ioc 4075 drivers/message/fusion/mptbase.c if (ioc->alt_ioc) ioc 4076 drivers/message/fusion/mptbase.c diag1val = CHIPREG_READ32(&ioc->alt_ioc->chip->Diagnostic); ioc 4077 drivers/message/fusion/mptbase.c dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "DbG2: diag0=%08x, diag1=%08x\n", ioc 4078 drivers/message/fusion/mptbase.c ioc->name, diag0val, diag1val)); ioc 4084 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val | MPI_DIAG_DISABLE_ARM); ioc 4091 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val | MPI_DIAG_RESET_ADAPTER); ioc 4093 drivers/message/fusion/mptbase.c dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Diagnostic reset performed\n", ioc 4094 drivers/message/fusion/mptbase.c ioc->name)); ioc 4105 drivers/message/fusion/mptbase.c ioc, MPT_IOC_PRE_RESET); ioc 4106 drivers/message/fusion/mptbase.c if (ioc->alt_ioc) { ioc 4108 drivers/message/fusion/mptbase.c ioc->alt_ioc, MPT_IOC_PRE_RESET); ioc 4113 drivers/message/fusion/mptbase.c if (ioc->cached_fw) ioc 4114 drivers/message/fusion/mptbase.c cached_fw = (MpiFwHeader_t *)ioc->cached_fw; ioc 4115 drivers/message/fusion/mptbase.c else if (ioc->alt_ioc && ioc->alt_ioc->cached_fw) ioc 4116 drivers/message/fusion/mptbase.c cached_fw = (MpiFwHeader_t *)ioc->alt_ioc->cached_fw; ioc 4125 drivers/message/fusion/mptbase.c diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); ioc 4130 drivers/message/fusion/mptbase.c dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "cached_fw: diag0val=%x count=%d\n", ioc 4131 drivers/message/fusion/mptbase.c ioc->name, diag0val, count)); ioc 4139 drivers/message/fusion/mptbase.c if ((count = mpt_downloadboot(ioc, cached_fw, sleepFlag)) < 0) { ioc 4141 drivers/message/fusion/mptbase.c "firmware downloadboot failure (%d)!\n", ioc->name, count); ioc 4152 drivers/message/fusion/mptbase.c doorbell = CHIPREG_READ32(&ioc->chip->Doorbell); ioc 4155 drivers/message/fusion/mptbase.c drsprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 4157 drivers/message/fusion/mptbase.c " count=%d\n", ioc->name, doorbell, count)); ioc 4173 drivers/message/fusion/mptbase.c "after reset! IocState=%x", ioc->name, ioc 4178 drivers/message/fusion/mptbase.c diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); ioc 4179 drivers/message/fusion/mptbase.c if (ioc->debug_level & MPT_DEBUG) { ioc 4180 drivers/message/fusion/mptbase.c if (ioc->alt_ioc) ioc 4181 drivers/message/fusion/mptbase.c diag1val = CHIPREG_READ32(&ioc->alt_ioc->chip->Diagnostic); ioc 4182 drivers/message/fusion/mptbase.c dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "DbG3: diag0=%08x, diag1=%08x\n", ioc 4183 drivers/message/fusion/mptbase.c ioc->name, diag0val, diag1val)); ioc 4189 drivers/message/fusion/mptbase.c diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); ioc 4195 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->WriteSequence, 0xFF); ioc 4196 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_1ST_KEY_VALUE); ioc 4197 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_2ND_KEY_VALUE); ioc 4198 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_3RD_KEY_VALUE); ioc 4199 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_4TH_KEY_VALUE); ioc 4200 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_5TH_KEY_VALUE); ioc 4212 drivers/message/fusion/mptbase.c ioc->name, diag0val); ioc 4215 drivers/message/fusion/mptbase.c diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); ioc 4218 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val); ioc 4219 drivers/message/fusion/mptbase.c diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); ioc 4222 drivers/message/fusion/mptbase.c ioc->name); ioc 4227 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->WriteSequence, 0xFFFFFFFF); ioc 4231 drivers/message/fusion/mptbase.c diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); ioc 4234 drivers/message/fusion/mptbase.c ioc->name, diag0val); ioc 4238 drivers/message/fusion/mptbase.c if (ioc->debug_level & MPT_DEBUG) { ioc 4239 drivers/message/fusion/mptbase.c if (ioc->alt_ioc) ioc 4240 drivers/message/fusion/mptbase.c diag1val = CHIPREG_READ32(&ioc->alt_ioc->chip->Diagnostic); ioc 4241 drivers/message/fusion/mptbase.c dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "DbG4: diag0=%08x, diag1=%08x\n", ioc 4242 drivers/message/fusion/mptbase.c ioc->name, diag0val, diag1val)); ioc 4248 drivers/message/fusion/mptbase.c ioc->facts.EventState = 0; ioc 4250 drivers/message/fusion/mptbase.c if (ioc->alt_ioc) ioc 4251 drivers/message/fusion/mptbase.c ioc->alt_ioc->facts.EventState = 0; ioc 4269 drivers/message/fusion/mptbase.c SendIocReset(MPT_ADAPTER *ioc, u8 reset_type, int sleepFlag) ioc 4275 drivers/message/fusion/mptbase.c drsprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Sending IOC reset(0x%02x)!\n", ioc 4276 drivers/message/fusion/mptbase.c ioc->name, reset_type)); ioc 4277 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->Doorbell, reset_type<<MPI_DOORBELL_FUNCTION_SHIFT); ioc 4278 drivers/message/fusion/mptbase.c if ((r = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0) ioc 4286 drivers/message/fusion/mptbase.c while ((state = mpt_GetIocState(ioc, 1)) != MPI_IOC_STATE_READY) { ioc 4295 drivers/message/fusion/mptbase.c ioc->name, state, (int)((count+5)/HZ)); ioc 4310 drivers/message/fusion/mptbase.c if (ioc->facts.Function) ioc 4311 drivers/message/fusion/mptbase.c ioc->facts.EventState = 0; ioc 4325 drivers/message/fusion/mptbase.c initChainBuffers(MPT_ADAPTER *ioc) ioc 4334 drivers/message/fusion/mptbase.c if (ioc->ReqToChain == NULL) { ioc 4335 drivers/message/fusion/mptbase.c sz = ioc->req_depth * sizeof(int); ioc 4340 drivers/message/fusion/mptbase.c ioc->ReqToChain = (int *) mem; ioc 4341 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "ReqToChain alloc @ %p, sz=%d bytes\n", ioc 4342 drivers/message/fusion/mptbase.c ioc->name, mem, sz)); ioc 4347 drivers/message/fusion/mptbase.c ioc->RequestNB = (int *) mem; ioc 4348 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "RequestNB alloc @ %p, sz=%d bytes\n", ioc 4349 drivers/message/fusion/mptbase.c ioc->name, mem, sz)); ioc 4351 drivers/message/fusion/mptbase.c for (ii = 0; ii < ioc->req_depth; ii++) { ioc 4352 drivers/message/fusion/mptbase.c ioc->ReqToChain[ii] = MPT_HOST_NO_CHAIN; ioc 4365 drivers/message/fusion/mptbase.c scale = ioc->req_sz / ioc->SGE_size; ioc 4366 drivers/message/fusion/mptbase.c if (ioc->sg_addr_size == sizeof(u64)) ioc 4367 drivers/message/fusion/mptbase.c num_sge = scale + (ioc->req_sz - 60) / ioc->SGE_size; ioc 4369 drivers/message/fusion/mptbase.c num_sge = 1 + scale + (ioc->req_sz - 64) / ioc->SGE_size; ioc 4371 drivers/message/fusion/mptbase.c if (ioc->sg_addr_size == sizeof(u64)) { ioc 4372 drivers/message/fusion/mptbase.c numSGE = (scale - 1) * (ioc->facts.MaxChainDepth-1) + scale + ioc 4373 drivers/message/fusion/mptbase.c (ioc->req_sz - 60) / ioc->SGE_size; ioc 4375 drivers/message/fusion/mptbase.c numSGE = 1 + (scale - 1) * (ioc->facts.MaxChainDepth-1) + ioc 4376 drivers/message/fusion/mptbase.c scale + (ioc->req_sz - 64) / ioc->SGE_size; ioc 4378 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "num_sge=%d numSGE=%d\n", ioc 4379 drivers/message/fusion/mptbase.c ioc->name, num_sge, numSGE)); ioc 4381 drivers/message/fusion/mptbase.c if (ioc->bus_type == FC) { ioc 4396 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Now numSGE=%d num_sge=%d num_chain=%d\n", ioc 4397 drivers/message/fusion/mptbase.c ioc->name, numSGE, num_sge, num_chain)); ioc 4399 drivers/message/fusion/mptbase.c if (ioc->bus_type == SPI) ioc 4401 drivers/message/fusion/mptbase.c else if (ioc->bus_type == SAS) ioc 4406 drivers/message/fusion/mptbase.c ioc->num_chain = num_chain; ioc 4409 drivers/message/fusion/mptbase.c if (ioc->ChainToChain == NULL) { ioc 4414 drivers/message/fusion/mptbase.c ioc->ChainToChain = (int *) mem; ioc 4415 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "ChainToChain alloc @ %p, sz=%d bytes\n", ioc 4416 drivers/message/fusion/mptbase.c ioc->name, mem, sz)); ioc 4418 drivers/message/fusion/mptbase.c mem = (u8 *) ioc->ChainToChain; ioc 4436 drivers/message/fusion/mptbase.c PrimeIocFifos(MPT_ADAPTER *ioc) ioc 4449 drivers/message/fusion/mptbase.c if (ioc->reply_frames == NULL) { ioc 4450 drivers/message/fusion/mptbase.c if ( (num_chain = initChainBuffers(ioc)) < 0) ioc 4455 drivers/message/fusion/mptbase.c if (ioc->pcidev->device == MPI_MANUFACTPAGE_DEVID_SAS1078 && ioc 4456 drivers/message/fusion/mptbase.c ioc->dma_mask > DMA_BIT_MASK(35)) { ioc 4457 drivers/message/fusion/mptbase.c if (!pci_set_dma_mask(ioc->pcidev, DMA_BIT_MASK(32)) ioc 4458 drivers/message/fusion/mptbase.c && !pci_set_consistent_dma_mask(ioc->pcidev, ioc 4461 drivers/message/fusion/mptbase.c d36memprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 4464 drivers/message/fusion/mptbase.c ioc->name)); ioc 4467 drivers/message/fusion/mptbase.c pci_set_dma_mask(ioc->pcidev, ioc 4469 drivers/message/fusion/mptbase.c pci_set_consistent_dma_mask(ioc->pcidev, ioc 4475 drivers/message/fusion/mptbase.c ioc->name); ioc 4480 drivers/message/fusion/mptbase.c total_size = reply_sz = (ioc->reply_sz * ioc->reply_depth); ioc 4481 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "ReplyBuffer sz=%d bytes, ReplyDepth=%d\n", ioc 4482 drivers/message/fusion/mptbase.c ioc->name, ioc->reply_sz, ioc->reply_depth)); ioc 4483 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "ReplyBuffer sz=%d[%x] bytes\n", ioc 4484 drivers/message/fusion/mptbase.c ioc->name, reply_sz, reply_sz)); ioc 4486 drivers/message/fusion/mptbase.c sz = (ioc->req_sz * ioc->req_depth); ioc 4487 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "RequestBuffer sz=%d bytes, RequestDepth=%d\n", ioc 4488 drivers/message/fusion/mptbase.c ioc->name, ioc->req_sz, ioc->req_depth)); ioc 4489 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "RequestBuffer sz=%d[%x] bytes\n", ioc 4490 drivers/message/fusion/mptbase.c ioc->name, sz, sz)); ioc 4493 drivers/message/fusion/mptbase.c sz = num_chain * ioc->req_sz; /* chain buffer pool size */ ioc 4494 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "ChainBuffer sz=%d bytes, ChainDepth=%d\n", ioc 4495 drivers/message/fusion/mptbase.c ioc->name, ioc->req_sz, num_chain)); ioc 4496 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "ChainBuffer sz=%d[%x] bytes num_chain=%d\n", ioc 4497 drivers/message/fusion/mptbase.c ioc->name, sz, sz, num_chain)); ioc 4500 drivers/message/fusion/mptbase.c mem = pci_alloc_consistent(ioc->pcidev, total_size, &alloc_dma); ioc 4503 drivers/message/fusion/mptbase.c ioc->name); ioc 4507 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Total alloc @ %p[%p], sz=%d[%x] bytes\n", ioc 4508 drivers/message/fusion/mptbase.c ioc->name, mem, (void *)(ulong)alloc_dma, total_size, total_size)); ioc 4511 drivers/message/fusion/mptbase.c ioc->alloc_total += total_size; ioc 4512 drivers/message/fusion/mptbase.c ioc->alloc = mem; ioc 4513 drivers/message/fusion/mptbase.c ioc->alloc_dma = alloc_dma; ioc 4514 drivers/message/fusion/mptbase.c ioc->alloc_sz = total_size; ioc 4515 drivers/message/fusion/mptbase.c ioc->reply_frames = (MPT_FRAME_HDR *) mem; ioc 4516 drivers/message/fusion/mptbase.c ioc->reply_frames_low_dma = (u32) (alloc_dma & 0xFFFFFFFF); ioc 4518 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "ReplyBuffers @ %p[%p]\n", ioc 4519 drivers/message/fusion/mptbase.c ioc->name, ioc->reply_frames, (void *)(ulong)alloc_dma)); ioc 4526 drivers/message/fusion/mptbase.c ioc->req_frames = (MPT_FRAME_HDR *) mem; ioc 4527 drivers/message/fusion/mptbase.c ioc->req_frames_dma = alloc_dma; ioc 4529 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "RequestBuffers @ %p[%p]\n", ioc 4530 drivers/message/fusion/mptbase.c ioc->name, mem, (void *)(ulong)alloc_dma)); ioc 4532 drivers/message/fusion/mptbase.c ioc->req_frames_low_dma = (u32) (alloc_dma & 0xFFFFFFFF); ioc 4534 drivers/message/fusion/mptbase.c for (i = 0; i < ioc->req_depth; i++) { ioc 4535 drivers/message/fusion/mptbase.c alloc_dma += ioc->req_sz; ioc 4536 drivers/message/fusion/mptbase.c mem += ioc->req_sz; ioc 4539 drivers/message/fusion/mptbase.c ioc->ChainBuffer = mem; ioc 4540 drivers/message/fusion/mptbase.c ioc->ChainBufferDMA = alloc_dma; ioc 4542 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "ChainBuffers @ %p(%p)\n", ioc 4543 drivers/message/fusion/mptbase.c ioc->name, ioc->ChainBuffer, (void *)(ulong)ioc->ChainBufferDMA)); ioc 4548 drivers/message/fusion/mptbase.c INIT_LIST_HEAD(&ioc->FreeChainQ); ioc 4552 drivers/message/fusion/mptbase.c mem = (u8 *)ioc->ChainBuffer; ioc 4555 drivers/message/fusion/mptbase.c list_add_tail(&mf->u.frame.linkage.list, &ioc->FreeChainQ); ioc 4556 drivers/message/fusion/mptbase.c mem += ioc->req_sz; ioc 4561 drivers/message/fusion/mptbase.c alloc_dma = ioc->req_frames_dma; ioc 4562 drivers/message/fusion/mptbase.c mem = (u8 *) ioc->req_frames; ioc 4564 drivers/message/fusion/mptbase.c spin_lock_irqsave(&ioc->FreeQlock, flags); ioc 4565 drivers/message/fusion/mptbase.c INIT_LIST_HEAD(&ioc->FreeQ); ioc 4566 drivers/message/fusion/mptbase.c for (i = 0; i < ioc->req_depth; i++) { ioc 4570 drivers/message/fusion/mptbase.c list_add_tail(&mf->u.frame.linkage.list, &ioc->FreeQ); ioc 4572 drivers/message/fusion/mptbase.c mem += ioc->req_sz; ioc 4574 drivers/message/fusion/mptbase.c spin_unlock_irqrestore(&ioc->FreeQlock, flags); ioc 4576 drivers/message/fusion/mptbase.c sz = (ioc->req_depth * MPT_SENSE_BUFFER_ALLOC); ioc 4577 drivers/message/fusion/mptbase.c ioc->sense_buf_pool = ioc 4578 drivers/message/fusion/mptbase.c pci_alloc_consistent(ioc->pcidev, sz, &ioc->sense_buf_pool_dma); ioc 4579 drivers/message/fusion/mptbase.c if (ioc->sense_buf_pool == NULL) { ioc 4581 drivers/message/fusion/mptbase.c ioc->name); ioc 4585 drivers/message/fusion/mptbase.c ioc->sense_buf_low_dma = (u32) (ioc->sense_buf_pool_dma & 0xFFFFFFFF); ioc 4586 drivers/message/fusion/mptbase.c ioc->alloc_total += sz; ioc 4587 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "SenseBuffers @ %p[%p]\n", ioc 4588 drivers/message/fusion/mptbase.c ioc->name, ioc->sense_buf_pool, (void *)(ulong)ioc->sense_buf_pool_dma)); ioc 4594 drivers/message/fusion/mptbase.c alloc_dma = ioc->alloc_dma; ioc 4595 drivers/message/fusion/mptbase.c dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "ReplyBuffers @ %p[%p]\n", ioc 4596 drivers/message/fusion/mptbase.c ioc->name, ioc->reply_frames, (void *)(ulong)alloc_dma)); ioc 4598 drivers/message/fusion/mptbase.c for (i = 0; i < ioc->reply_depth; i++) { ioc 4600 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->ReplyFifo, alloc_dma); ioc 4601 drivers/message/fusion/mptbase.c alloc_dma += ioc->reply_sz; ioc 4604 drivers/message/fusion/mptbase.c if (dma_mask == DMA_BIT_MASK(35) && !pci_set_dma_mask(ioc->pcidev, ioc 4605 drivers/message/fusion/mptbase.c ioc->dma_mask) && !pci_set_consistent_dma_mask(ioc->pcidev, ioc 4606 drivers/message/fusion/mptbase.c ioc->dma_mask)) ioc 4607 drivers/message/fusion/mptbase.c d36memprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 4608 drivers/message/fusion/mptbase.c "restoring 64 bit addressing\n", ioc->name)); ioc 4614 drivers/message/fusion/mptbase.c if (ioc->alloc != NULL) { ioc 4615 drivers/message/fusion/mptbase.c sz = ioc->alloc_sz; ioc 4616 drivers/message/fusion/mptbase.c pci_free_consistent(ioc->pcidev, ioc 4618 drivers/message/fusion/mptbase.c ioc->alloc, ioc->alloc_dma); ioc 4619 drivers/message/fusion/mptbase.c ioc->reply_frames = NULL; ioc 4620 drivers/message/fusion/mptbase.c ioc->req_frames = NULL; ioc 4621 drivers/message/fusion/mptbase.c ioc->alloc_total -= sz; ioc 4623 drivers/message/fusion/mptbase.c if (ioc->sense_buf_pool != NULL) { ioc 4624 drivers/message/fusion/mptbase.c sz = (ioc->req_depth * MPT_SENSE_BUFFER_ALLOC); ioc 4625 drivers/message/fusion/mptbase.c pci_free_consistent(ioc->pcidev, ioc 4627 drivers/message/fusion/mptbase.c ioc->sense_buf_pool, ioc->sense_buf_pool_dma); ioc 4628 drivers/message/fusion/mptbase.c ioc->sense_buf_pool = NULL; ioc 4631 drivers/message/fusion/mptbase.c if (dma_mask == DMA_BIT_MASK(35) && !pci_set_dma_mask(ioc->pcidev, ioc 4632 drivers/message/fusion/mptbase.c DMA_BIT_MASK(64)) && !pci_set_consistent_dma_mask(ioc->pcidev, ioc 4634 drivers/message/fusion/mptbase.c d36memprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 4635 drivers/message/fusion/mptbase.c "restoring 64 bit addressing\n", ioc->name)); ioc 4660 drivers/message/fusion/mptbase.c mpt_handshake_req_reply_wait(MPT_ADAPTER *ioc, int reqBytes, u32 *req, ioc 4670 drivers/message/fusion/mptbase.c ioc->hs_reply_idx = 0; ioc 4671 drivers/message/fusion/mptbase.c mptReply = (MPIDefaultReply_t *) ioc->hs_reply; ioc 4679 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->IntStatus, 0); ioc 4680 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->Doorbell, ioc 4687 drivers/message/fusion/mptbase.c if ((t = WaitForDoorbellInt(ioc, 5, sleepFlag)) < 0) ioc 4690 drivers/message/fusion/mptbase.c dhsprintk(ioc, printk(MYIOC_s_DEBUG_FMT "HandShake request start reqBytes=%d, WaitCnt=%d%s\n", ioc 4691 drivers/message/fusion/mptbase.c ioc->name, reqBytes, t, failcnt ? " - MISSING DOORBELL HANDSHAKE!" : "")); ioc 4694 drivers/message/fusion/mptbase.c if (!(CHIPREG_READ32(&ioc->chip->Doorbell) & MPI_DOORBELL_ACTIVE)) ioc 4702 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->IntStatus, 0); ioc 4703 drivers/message/fusion/mptbase.c if (!failcnt && (t = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0) ioc 4720 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->Doorbell, word); ioc 4721 drivers/message/fusion/mptbase.c if ((t = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0) ioc 4725 drivers/message/fusion/mptbase.c dhsprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Handshake request frame (@%p) header\n", ioc->name, req)); ioc 4726 drivers/message/fusion/mptbase.c DBG_DUMP_REQUEST_FRAME_HDR(ioc, (u32 *)req); ioc 4728 drivers/message/fusion/mptbase.c dhsprintk(ioc, printk(MYIOC_s_DEBUG_FMT "HandShake request post done, WaitCnt=%d%s\n", ioc 4729 drivers/message/fusion/mptbase.c ioc->name, t, failcnt ? " - MISSING DOORBELL ACK!" : "")); ioc 4734 drivers/message/fusion/mptbase.c if (!failcnt && (t = WaitForDoorbellReply(ioc, maxwait, sleepFlag)) < 0) ioc 4737 drivers/message/fusion/mptbase.c dhsprintk(ioc, printk(MYIOC_s_DEBUG_FMT "HandShake reply count=%d%s\n", ioc 4738 drivers/message/fusion/mptbase.c ioc->name, t, failcnt ? " - MISSING DOORBELL REPLY!" : "")); ioc 4744 drivers/message/fusion/mptbase.c u16reply[ii] = ioc->hs_reply[ii]; ioc 4766 drivers/message/fusion/mptbase.c WaitForDoorbellAck(MPT_ADAPTER *ioc, int howlong, int sleepFlag) ioc 4777 drivers/message/fusion/mptbase.c intstat = CHIPREG_READ32(&ioc->chip->IntStatus); ioc 4785 drivers/message/fusion/mptbase.c intstat = CHIPREG_READ32(&ioc->chip->IntStatus); ioc 4793 drivers/message/fusion/mptbase.c dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "WaitForDoorbell ACK (count=%d)\n", ioc 4794 drivers/message/fusion/mptbase.c ioc->name, count)); ioc 4799 drivers/message/fusion/mptbase.c ioc->name, count, intstat); ioc 4816 drivers/message/fusion/mptbase.c WaitForDoorbellInt(MPT_ADAPTER *ioc, int howlong, int sleepFlag) ioc 4825 drivers/message/fusion/mptbase.c intstat = CHIPREG_READ32(&ioc->chip->IntStatus); ioc 4833 drivers/message/fusion/mptbase.c intstat = CHIPREG_READ32(&ioc->chip->IntStatus); ioc 4842 drivers/message/fusion/mptbase.c dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "WaitForDoorbell INT (cnt=%d) howlong=%d\n", ioc 4843 drivers/message/fusion/mptbase.c ioc->name, count, howlong)); ioc 4848 drivers/message/fusion/mptbase.c ioc->name, count, intstat); ioc 4866 drivers/message/fusion/mptbase.c WaitForDoorbellReply(MPT_ADAPTER *ioc, int howlong, int sleepFlag) ioc 4871 drivers/message/fusion/mptbase.c u16 *hs_reply = ioc->hs_reply; ioc 4872 drivers/message/fusion/mptbase.c volatile MPIDefaultReply_t *mptReply = (MPIDefaultReply_t *) ioc->hs_reply; ioc 4881 drivers/message/fusion/mptbase.c if ((t = WaitForDoorbellInt(ioc, howlong, sleepFlag)) < 0) { ioc 4884 drivers/message/fusion/mptbase.c hs_reply[u16cnt++] = le16_to_cpu(CHIPREG_READ32(&ioc->chip->Doorbell) & 0x0000FFFF); ioc 4885 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->IntStatus, 0); ioc 4886 drivers/message/fusion/mptbase.c if ((t = WaitForDoorbellInt(ioc, 5, sleepFlag)) < 0) ioc 4889 drivers/message/fusion/mptbase.c hs_reply[u16cnt++] = le16_to_cpu(CHIPREG_READ32(&ioc->chip->Doorbell) & 0x0000FFFF); ioc 4890 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->IntStatus, 0); ioc 4894 drivers/message/fusion/mptbase.c dhsprintk(ioc, printk(MYIOC_s_DEBUG_FMT "WaitCnt=%d First handshake reply word=%08x%s\n", ioc 4895 drivers/message/fusion/mptbase.c ioc->name, t, le32_to_cpu(*(u32 *)hs_reply), ioc 4903 drivers/message/fusion/mptbase.c if ((t = WaitForDoorbellInt(ioc, 5, sleepFlag)) < 0) ioc 4905 drivers/message/fusion/mptbase.c hword = le16_to_cpu(CHIPREG_READ32(&ioc->chip->Doorbell) & 0x0000FFFF); ioc 4907 drivers/message/fusion/mptbase.c if (u16cnt < ARRAY_SIZE(ioc->hs_reply)) ioc 4909 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->IntStatus, 0); ioc 4912 drivers/message/fusion/mptbase.c if (!failcnt && (t = WaitForDoorbellInt(ioc, 5, sleepFlag)) < 0) ioc 4914 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->IntStatus, 0); ioc 4918 drivers/message/fusion/mptbase.c ioc->name); ioc 4930 drivers/message/fusion/mptbase.c dhsprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Got Handshake reply:\n", ioc->name)); ioc 4931 drivers/message/fusion/mptbase.c DBG_DUMP_REPLY_FRAME(ioc, (u32 *)mptReply); ioc 4933 drivers/message/fusion/mptbase.c dhsprintk(ioc, printk(MYIOC_s_DEBUG_FMT "WaitForDoorbell REPLY WaitCnt=%d (sz=%d)\n", ioc 4934 drivers/message/fusion/mptbase.c ioc->name, t, u16cnt/2)); ioc 4950 drivers/message/fusion/mptbase.c GetLanConfigPages(MPT_ADAPTER *ioc) ioc 4974 drivers/message/fusion/mptbase.c if ((rc = mpt_config(ioc, &cfg)) != 0) ioc 4979 drivers/message/fusion/mptbase.c ppage0_alloc = (LANPage0_t *) pci_alloc_consistent(ioc->pcidev, data_sz, &page0_dma); ioc 4986 drivers/message/fusion/mptbase.c if ((rc = mpt_config(ioc, &cfg)) == 0) { ioc 4989 drivers/message/fusion/mptbase.c memcpy(&ioc->lan_cnfg_page0, ppage0_alloc, copy_sz); ioc 4993 drivers/message/fusion/mptbase.c pci_free_consistent(ioc->pcidev, data_sz, (u8 *) ppage0_alloc, page0_dma); ioc 5017 drivers/message/fusion/mptbase.c if ((rc = mpt_config(ioc, &cfg)) != 0) ioc 5025 drivers/message/fusion/mptbase.c ppage1_alloc = (LANPage1_t *) pci_alloc_consistent(ioc->pcidev, data_sz, &page1_dma); ioc 5031 drivers/message/fusion/mptbase.c if ((rc = mpt_config(ioc, &cfg)) == 0) { ioc 5034 drivers/message/fusion/mptbase.c memcpy(&ioc->lan_cnfg_page1, ppage1_alloc, copy_sz); ioc 5037 drivers/message/fusion/mptbase.c pci_free_consistent(ioc->pcidev, data_sz, (u8 *) ppage1_alloc, page1_dma); ioc 5066 drivers/message/fusion/mptbase.c mptbase_sas_persist_operation(MPT_ADAPTER *ioc, u8 persist_opcode) ioc 5075 drivers/message/fusion/mptbase.c mutex_lock(&ioc->mptbase_cmds.mutex); ioc 5078 drivers/message/fusion/mptbase.c memset(ioc->mptbase_cmds.reply, 0 , MPT_DEFAULT_FRAME_SIZE); ioc 5079 drivers/message/fusion/mptbase.c INITIALIZE_MGMT_STATUS(ioc->mptbase_cmds.status) ioc 5098 drivers/message/fusion/mptbase.c if ((mf = mpt_get_msg_frame(mpt_base_index, ioc)) == NULL) { ioc 5111 drivers/message/fusion/mptbase.c mpt_put_msg_frame(mpt_base_index, ioc, mf); ioc 5112 drivers/message/fusion/mptbase.c timeleft = wait_for_completion_timeout(&ioc->mptbase_cmds.done, 10*HZ); ioc 5113 drivers/message/fusion/mptbase.c if (!(ioc->mptbase_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) { ioc 5116 drivers/message/fusion/mptbase.c if (ioc->mptbase_cmds.status & MPT_MGMT_STATUS_DID_IOCRESET) ioc 5121 drivers/message/fusion/mptbase.c ioc->name, __func__, mpt_GetIocState(ioc, 0)); ioc 5122 drivers/message/fusion/mptbase.c mpt_Soft_Hard_ResetHandler(ioc, CAN_SLEEP); ioc 5123 drivers/message/fusion/mptbase.c mpt_free_msg_frame(ioc, mf); ioc 5128 drivers/message/fusion/mptbase.c if (!(ioc->mptbase_cmds.status & MPT_MGMT_STATUS_RF_VALID)) { ioc 5134 drivers/message/fusion/mptbase.c (SasIoUnitControlReply_t *)ioc->mptbase_cmds.reply; ioc 5145 drivers/message/fusion/mptbase.c CLEAR_MGMT_STATUS(ioc->mptbase_cmds.status) ioc 5146 drivers/message/fusion/mptbase.c mutex_unlock(&ioc->mptbase_cmds.mutex); ioc 5153 drivers/message/fusion/mptbase.c mptbase_raid_process_event_data(MPT_ADAPTER *ioc, ioc 5178 drivers/message/fusion/mptbase.c ioc->name, disk, volume); ioc 5181 drivers/message/fusion/mptbase.c ioc->name, volume); ioc 5187 drivers/message/fusion/mptbase.c ioc->name); ioc 5193 drivers/message/fusion/mptbase.c ioc->name); ioc 5198 drivers/message/fusion/mptbase.c ioc->name); ioc 5203 drivers/message/fusion/mptbase.c ioc->name, ioc 5221 drivers/message/fusion/mptbase.c ioc->name, disk); ioc 5226 drivers/message/fusion/mptbase.c ioc->name); ioc 5231 drivers/message/fusion/mptbase.c ioc->name); ioc 5236 drivers/message/fusion/mptbase.c ioc->name); ioc 5241 drivers/message/fusion/mptbase.c ioc->name, ioc 5267 drivers/message/fusion/mptbase.c ioc->name, disk); ioc 5272 drivers/message/fusion/mptbase.c ioc->name, pRaidEventData->ASC, pRaidEventData->ASCQ); ioc 5277 drivers/message/fusion/mptbase.c ioc->name, disk); ioc 5294 drivers/message/fusion/mptbase.c GetIoUnitPage2(MPT_ADAPTER *ioc) ioc 5315 drivers/message/fusion/mptbase.c if ((rc = mpt_config(ioc, &cfg)) != 0) ioc 5324 drivers/message/fusion/mptbase.c ppage_alloc = (IOUnitPage2_t *) pci_alloc_consistent(ioc->pcidev, data_sz, &page_dma); ioc 5331 drivers/message/fusion/mptbase.c if ((rc = mpt_config(ioc, &cfg)) == 0) ioc 5332 drivers/message/fusion/mptbase.c ioc->biosVersion = le32_to_cpu(ppage_alloc->BiosVersion); ioc 5334 drivers/message/fusion/mptbase.c pci_free_consistent(ioc->pcidev, data_sz, (u8 *) ppage_alloc, page_dma); ioc 5362 drivers/message/fusion/mptbase.c mpt_GetScsiPortSettings(MPT_ADAPTER *ioc, int portnum) ioc 5373 drivers/message/fusion/mptbase.c if (!ioc->spi_data.nvram) { ioc 5381 drivers/message/fusion/mptbase.c ioc->spi_data.nvram = (int *) mem; ioc 5383 drivers/message/fusion/mptbase.c dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "SCSI device NVRAM settings @ %p, sz=%d\n", ioc 5384 drivers/message/fusion/mptbase.c ioc->name, ioc->spi_data.nvram, sz)); ioc 5390 drivers/message/fusion/mptbase.c ioc->spi_data.nvram[ii] = MPT_HOST_NVRAM_INVALID; ioc 5405 drivers/message/fusion/mptbase.c if (mpt_config(ioc, &cfg) != 0) ioc 5409 drivers/message/fusion/mptbase.c pbuf = pci_alloc_consistent(ioc->pcidev, header.PageLength * 4, &buf_dma); ioc 5413 drivers/message/fusion/mptbase.c if (mpt_config(ioc, &cfg) != 0) { ioc 5414 drivers/message/fusion/mptbase.c ioc->spi_data.maxBusWidth = MPT_NARROW; ioc 5415 drivers/message/fusion/mptbase.c ioc->spi_data.maxSyncOffset = 0; ioc 5416 drivers/message/fusion/mptbase.c ioc->spi_data.minSyncFactor = MPT_ASYNC; ioc 5417 drivers/message/fusion/mptbase.c ioc->spi_data.busType = MPT_HOST_BUS_UNKNOWN; ioc 5419 drivers/message/fusion/mptbase.c ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 5421 drivers/message/fusion/mptbase.c ioc->name, ioc->spi_data.minSyncFactor)); ioc 5430 drivers/message/fusion/mptbase.c ioc->spi_data.noQas |= MPT_TARGET_NO_NEGO_QAS; ioc 5431 drivers/message/fusion/mptbase.c ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 5433 drivers/message/fusion/mptbase.c ioc->name, pPP0->Capabilities)); ioc 5435 drivers/message/fusion/mptbase.c ioc->spi_data.maxBusWidth = pPP0->Capabilities & MPI_SCSIPORTPAGE0_CAP_WIDE ? 1 : 0; ioc 5438 drivers/message/fusion/mptbase.c ioc->spi_data.maxSyncOffset = (u8) (data >> 16); ioc 5440 drivers/message/fusion/mptbase.c ioc->spi_data.minSyncFactor = (u8) (data >> 8); ioc 5441 drivers/message/fusion/mptbase.c ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 5443 drivers/message/fusion/mptbase.c ioc->name, ioc->spi_data.minSyncFactor)); ioc 5445 drivers/message/fusion/mptbase.c ioc->spi_data.maxSyncOffset = 0; ioc 5446 drivers/message/fusion/mptbase.c ioc->spi_data.minSyncFactor = MPT_ASYNC; ioc 5449 drivers/message/fusion/mptbase.c ioc->spi_data.busType = pPP0->PhysicalInterface & MPI_SCSIPORTPAGE0_PHY_SIGNAL_TYPE_MASK; ioc 5453 drivers/message/fusion/mptbase.c if ((ioc->spi_data.busType == MPI_SCSIPORTPAGE0_PHY_SIGNAL_HVD) || ioc 5454 drivers/message/fusion/mptbase.c (ioc->spi_data.busType == MPI_SCSIPORTPAGE0_PHY_SIGNAL_SE)) { ioc 5456 drivers/message/fusion/mptbase.c if (ioc->spi_data.minSyncFactor < MPT_ULTRA) { ioc 5457 drivers/message/fusion/mptbase.c ioc->spi_data.minSyncFactor = MPT_ULTRA; ioc 5458 drivers/message/fusion/mptbase.c ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 5460 drivers/message/fusion/mptbase.c ioc->name, ioc->spi_data.minSyncFactor)); ioc 5465 drivers/message/fusion/mptbase.c pci_free_consistent(ioc->pcidev, header.PageLength * 4, pbuf, buf_dma); ioc 5481 drivers/message/fusion/mptbase.c if (mpt_config(ioc, &cfg) != 0) ioc 5487 drivers/message/fusion/mptbase.c pbuf = pci_alloc_consistent(ioc->pcidev, header.PageLength * 4, &buf_dma); ioc 5491 drivers/message/fusion/mptbase.c if (mpt_config(ioc, &cfg) != 0) { ioc 5495 drivers/message/fusion/mptbase.c } else if (ioc->pcidev->vendor == PCI_VENDOR_ID_ATTO) { ioc 5525 drivers/message/fusion/mptbase.c ioc->spi_data.nvram[ii] = data; ioc 5534 drivers/message/fusion/mptbase.c ioc->spi_data.bus_reset = ioc 5543 drivers/message/fusion/mptbase.c ioc->spi_data.PortFlags = data; ioc 5548 drivers/message/fusion/mptbase.c ioc->spi_data.nvram[ii] = data; ioc 5552 drivers/message/fusion/mptbase.c pci_free_consistent(ioc->pcidev, header.PageLength * 4, pbuf, buf_dma); ioc 5574 drivers/message/fusion/mptbase.c mpt_readScsiDevicePageHeaders(MPT_ADAPTER *ioc, int portnum) ioc 5591 drivers/message/fusion/mptbase.c if (mpt_config(ioc, &cfg) != 0) ioc 5594 drivers/message/fusion/mptbase.c ioc->spi_data.sdp1version = cfg.cfghdr.hdr->PageVersion; ioc 5595 drivers/message/fusion/mptbase.c ioc->spi_data.sdp1length = cfg.cfghdr.hdr->PageLength; ioc 5601 drivers/message/fusion/mptbase.c if (mpt_config(ioc, &cfg) != 0) ioc 5604 drivers/message/fusion/mptbase.c ioc->spi_data.sdp0version = cfg.cfghdr.hdr->PageVersion; ioc 5605 drivers/message/fusion/mptbase.c ioc->spi_data.sdp0length = cfg.cfghdr.hdr->PageLength; ioc 5607 drivers/message/fusion/mptbase.c dcprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Headers: 0: version %d length %d\n", ioc 5608 drivers/message/fusion/mptbase.c ioc->name, ioc->spi_data.sdp0version, ioc->spi_data.sdp0length)); ioc 5610 drivers/message/fusion/mptbase.c dcprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Headers: 1: version %d length %d\n", ioc 5611 drivers/message/fusion/mptbase.c ioc->name, ioc->spi_data.sdp1version, ioc->spi_data.sdp1length)); ioc 5620 drivers/message/fusion/mptbase.c mpt_inactive_raid_list_free(MPT_ADAPTER *ioc) ioc 5624 drivers/message/fusion/mptbase.c if (list_empty(&ioc->raid_data.inactive_list)) ioc 5627 drivers/message/fusion/mptbase.c mutex_lock(&ioc->raid_data.inactive_list_mutex); ioc 5629 drivers/message/fusion/mptbase.c &ioc->raid_data.inactive_list, list) { ioc 5633 drivers/message/fusion/mptbase.c mutex_unlock(&ioc->raid_data.inactive_list_mutex); ioc 5644 drivers/message/fusion/mptbase.c mpt_inactive_raid_volumes(MPT_ADAPTER *ioc, u8 channel, u8 id) ioc 5662 drivers/message/fusion/mptbase.c if (mpt_config(ioc, &cfg) != 0) ioc 5668 drivers/message/fusion/mptbase.c buffer = pci_alloc_consistent(ioc->pcidev, hdr.PageLength * 4, ioc 5677 drivers/message/fusion/mptbase.c if (mpt_config(ioc, &cfg) != 0) ioc 5692 drivers/message/fusion/mptbase.c mutex_lock(&ioc->raid_data.inactive_list_mutex); ioc 5694 drivers/message/fusion/mptbase.c if(mpt_raid_phys_disk_pg0(ioc, ioc 5710 drivers/message/fusion/mptbase.c &ioc->raid_data.inactive_list); ioc 5712 drivers/message/fusion/mptbase.c mutex_unlock(&ioc->raid_data.inactive_list_mutex); ioc 5716 drivers/message/fusion/mptbase.c pci_free_consistent(ioc->pcidev, hdr.PageLength * 4, buffer, ioc 5732 drivers/message/fusion/mptbase.c mpt_raid_phys_disk_pg0(MPT_ADAPTER *ioc, u8 phys_disk_num, ioc 5751 drivers/message/fusion/mptbase.c if (mpt_config(ioc, &cfg) != 0) { ioc 5761 drivers/message/fusion/mptbase.c buffer = pci_alloc_consistent(ioc->pcidev, hdr.PageLength * 4, ioc 5773 drivers/message/fusion/mptbase.c if (mpt_config(ioc, &cfg) != 0) { ioc 5785 drivers/message/fusion/mptbase.c pci_free_consistent(ioc->pcidev, hdr.PageLength * 4, buffer, ioc 5800 drivers/message/fusion/mptbase.c mpt_raid_phys_disk_get_num_paths(MPT_ADAPTER *ioc, u8 phys_disk_num) ioc 5818 drivers/message/fusion/mptbase.c if (mpt_config(ioc, &cfg) != 0) { ioc 5828 drivers/message/fusion/mptbase.c buffer = pci_alloc_consistent(ioc->pcidev, hdr.PageLength * 4, ioc 5840 drivers/message/fusion/mptbase.c if (mpt_config(ioc, &cfg) != 0) { ioc 5849 drivers/message/fusion/mptbase.c pci_free_consistent(ioc->pcidev, hdr.PageLength * 4, buffer, ioc 5868 drivers/message/fusion/mptbase.c mpt_raid_phys_disk_pg1(MPT_ADAPTER *ioc, u8 phys_disk_num, ioc 5890 drivers/message/fusion/mptbase.c if (mpt_config(ioc, &cfg) != 0) { ioc 5900 drivers/message/fusion/mptbase.c buffer = pci_alloc_consistent(ioc->pcidev, hdr.PageLength * 4, ioc 5912 drivers/message/fusion/mptbase.c if (mpt_config(ioc, &cfg) != 0) { ioc 5938 drivers/message/fusion/mptbase.c pci_free_consistent(ioc->pcidev, hdr.PageLength * 4, buffer, ioc 5956 drivers/message/fusion/mptbase.c mpt_findImVolumes(MPT_ADAPTER *ioc) ioc 5967 drivers/message/fusion/mptbase.c if (!ioc->ir_firmware) ioc 5972 drivers/message/fusion/mptbase.c kfree(ioc->raid_data.pIocPg2); ioc 5973 drivers/message/fusion/mptbase.c ioc->raid_data.pIocPg2 = NULL; ioc 5974 drivers/message/fusion/mptbase.c mpt_inactive_raid_list_free(ioc); ioc 5988 drivers/message/fusion/mptbase.c if (mpt_config(ioc, &cfg) != 0) ioc 5995 drivers/message/fusion/mptbase.c pIoc2 = pci_alloc_consistent(ioc->pcidev, iocpage2sz, &ioc2_dma); ioc 6001 drivers/message/fusion/mptbase.c if (mpt_config(ioc, &cfg) != 0) ioc 6010 drivers/message/fusion/mptbase.c ioc->raid_data.pIocPg2 = (IOCPage2_t *) mem; ioc 6012 drivers/message/fusion/mptbase.c mpt_read_ioc_pg_3(ioc); ioc 6015 drivers/message/fusion/mptbase.c mpt_inactive_raid_volumes(ioc, ioc 6020 drivers/message/fusion/mptbase.c pci_free_consistent(ioc->pcidev, iocpage2sz, pIoc2, ioc2_dma); ioc 6026 drivers/message/fusion/mptbase.c mpt_read_ioc_pg_3(MPT_ADAPTER *ioc) ioc 6037 drivers/message/fusion/mptbase.c kfree(ioc->raid_data.pIocPg3); ioc 6038 drivers/message/fusion/mptbase.c ioc->raid_data.pIocPg3 = NULL; ioc 6053 drivers/message/fusion/mptbase.c if (mpt_config(ioc, &cfg) != 0) ioc 6062 drivers/message/fusion/mptbase.c pIoc3 = pci_alloc_consistent(ioc->pcidev, iocpage3sz, &ioc3_dma); ioc 6071 drivers/message/fusion/mptbase.c if (mpt_config(ioc, &cfg) == 0) { ioc 6075 drivers/message/fusion/mptbase.c ioc->raid_data.pIocPg3 = (IOCPage3_t *) mem; ioc 6079 drivers/message/fusion/mptbase.c pci_free_consistent(ioc->pcidev, iocpage3sz, pIoc3, ioc3_dma); ioc 6085 drivers/message/fusion/mptbase.c mpt_read_ioc_pg_4(MPT_ADAPTER *ioc) ioc 6105 drivers/message/fusion/mptbase.c if (mpt_config(ioc, &cfg) != 0) ioc 6111 drivers/message/fusion/mptbase.c if ( (pIoc4 = ioc->spi_data.pIocPg4) == NULL ) { ioc 6113 drivers/message/fusion/mptbase.c pIoc4 = pci_alloc_consistent(ioc->pcidev, iocpage4sz, &ioc4_dma); ioc 6116 drivers/message/fusion/mptbase.c ioc->alloc_total += iocpage4sz; ioc 6118 drivers/message/fusion/mptbase.c ioc4_dma = ioc->spi_data.IocPg4_dma; ioc 6119 drivers/message/fusion/mptbase.c iocpage4sz = ioc->spi_data.IocPg4Sz; ioc 6126 drivers/message/fusion/mptbase.c if (mpt_config(ioc, &cfg) == 0) { ioc 6127 drivers/message/fusion/mptbase.c ioc->spi_data.pIocPg4 = (IOCPage4_t *) pIoc4; ioc 6128 drivers/message/fusion/mptbase.c ioc->spi_data.IocPg4_dma = ioc4_dma; ioc 6129 drivers/message/fusion/mptbase.c ioc->spi_data.IocPg4Sz = iocpage4sz; ioc 6131 drivers/message/fusion/mptbase.c pci_free_consistent(ioc->pcidev, iocpage4sz, pIoc4, ioc4_dma); ioc 6132 drivers/message/fusion/mptbase.c ioc->spi_data.pIocPg4 = NULL; ioc 6133 drivers/message/fusion/mptbase.c ioc->alloc_total -= iocpage4sz; ioc 6138 drivers/message/fusion/mptbase.c mpt_read_ioc_pg_1(MPT_ADAPTER *ioc) ioc 6159 drivers/message/fusion/mptbase.c if (mpt_config(ioc, &cfg) != 0) ioc 6168 drivers/message/fusion/mptbase.c pIoc1 = pci_alloc_consistent(ioc->pcidev, iocpage1sz, &ioc1_dma); ioc 6176 drivers/message/fusion/mptbase.c if (mpt_config(ioc, &cfg) == 0) { ioc 6182 drivers/message/fusion/mptbase.c dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Coalescing Enabled Timeout = %d\n", ioc 6183 drivers/message/fusion/mptbase.c ioc->name, tmp)); ioc 6192 drivers/message/fusion/mptbase.c if (mpt_config(ioc, &cfg) == 0) { ioc 6193 drivers/message/fusion/mptbase.c dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Reset Current Coalescing Timeout to = %d\n", ioc 6194 drivers/message/fusion/mptbase.c ioc->name, MPT_COALESCING_TIMEOUT)); ioc 6197 drivers/message/fusion/mptbase.c if (mpt_config(ioc, &cfg) == 0) { ioc 6198 drivers/message/fusion/mptbase.c dprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 6200 drivers/message/fusion/mptbase.c ioc->name, MPT_COALESCING_TIMEOUT)); ioc 6202 drivers/message/fusion/mptbase.c dprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 6204 drivers/message/fusion/mptbase.c ioc->name)); ioc 6208 drivers/message/fusion/mptbase.c dprintk(ioc, printk(MYIOC_s_WARN_FMT ioc 6210 drivers/message/fusion/mptbase.c ioc->name)); ioc 6215 drivers/message/fusion/mptbase.c dprintk(ioc, printk(MYIOC_s_WARN_FMT "Coalescing Disabled\n", ioc->name)); ioc 6219 drivers/message/fusion/mptbase.c pci_free_consistent(ioc->pcidev, iocpage1sz, pIoc1, ioc1_dma); ioc 6225 drivers/message/fusion/mptbase.c mpt_get_manufacturing_pg_0(MPT_ADAPTER *ioc) ioc 6241 drivers/message/fusion/mptbase.c if (mpt_config(ioc, &cfg) != 0) ioc 6248 drivers/message/fusion/mptbase.c pbuf = pci_alloc_consistent(ioc->pcidev, hdr.PageLength * 4, &buf_dma); ioc 6254 drivers/message/fusion/mptbase.c if (mpt_config(ioc, &cfg) != 0) ioc 6257 drivers/message/fusion/mptbase.c memcpy(ioc->board_name, pbuf->BoardName, sizeof(ioc->board_name)); ioc 6258 drivers/message/fusion/mptbase.c memcpy(ioc->board_assembly, pbuf->BoardAssembly, sizeof(ioc->board_assembly)); ioc 6259 drivers/message/fusion/mptbase.c memcpy(ioc->board_tracer, pbuf->BoardTracerNumber, sizeof(ioc->board_tracer)); ioc 6264 drivers/message/fusion/mptbase.c pci_free_consistent(ioc->pcidev, hdr.PageLength * 4, pbuf, buf_dma); ioc 6275 drivers/message/fusion/mptbase.c SendEventNotification(MPT_ADAPTER *ioc, u8 EvSwitch, int sleepFlag) ioc 6287 drivers/message/fusion/mptbase.c devtverboseprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 6289 drivers/message/fusion/mptbase.c ioc->name, EvSwitch, &evn)); ioc 6291 drivers/message/fusion/mptbase.c return mpt_handshake_req_reply_wait(ioc, sizeof(EventNotification_t), ioc 6303 drivers/message/fusion/mptbase.c SendEventAck(MPT_ADAPTER *ioc, EventNotificationReply_t *evnp) ioc 6307 drivers/message/fusion/mptbase.c if ((pAck = (EventAck_t *) mpt_get_msg_frame(mpt_base_index, ioc)) == NULL) { ioc 6308 drivers/message/fusion/mptbase.c dfailprintk(ioc, printk(MYIOC_s_WARN_FMT "%s, no msg frames!!\n", ioc 6309 drivers/message/fusion/mptbase.c ioc->name, __func__)); ioc 6313 drivers/message/fusion/mptbase.c devtverboseprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Sending EventAck\n", ioc->name)); ioc 6323 drivers/message/fusion/mptbase.c mpt_put_msg_frame(mpt_base_index, ioc, (MPT_FRAME_HDR *)pAck); ioc 6343 drivers/message/fusion/mptbase.c mpt_config(MPT_ADAPTER *ioc, CONFIGPARMS *pCfg) ioc 6365 drivers/message/fusion/mptbase.c dcprintk(ioc, printk(MYIOC_s_WARN_FMT "Config request not allowed in ISR context!\n", ioc 6366 drivers/message/fusion/mptbase.c ioc->name)); ioc 6371 drivers/message/fusion/mptbase.c spin_lock_irqsave(&ioc->taskmgmt_lock, flags); ioc 6372 drivers/message/fusion/mptbase.c if (ioc->ioc_reset_in_progress) { ioc 6373 drivers/message/fusion/mptbase.c dfailprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 6374 drivers/message/fusion/mptbase.c "%s: busy with host reset\n", ioc->name, __func__)); ioc 6375 drivers/message/fusion/mptbase.c spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags); ioc 6378 drivers/message/fusion/mptbase.c spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags); ioc 6381 drivers/message/fusion/mptbase.c if (!ioc->active || ioc 6382 drivers/message/fusion/mptbase.c mpt_GetIocState(ioc, 1) != MPI_IOC_STATE_OPERATIONAL) { ioc 6383 drivers/message/fusion/mptbase.c dfailprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 6385 drivers/message/fusion/mptbase.c ioc->name, __func__, ioc->active, ioc 6386 drivers/message/fusion/mptbase.c mpt_GetIocState(ioc, 0))); ioc 6391 drivers/message/fusion/mptbase.c mutex_lock(&ioc->mptbase_cmds.mutex); ioc 6393 drivers/message/fusion/mptbase.c memset(ioc->mptbase_cmds.reply, 0 , MPT_DEFAULT_FRAME_SIZE); ioc 6394 drivers/message/fusion/mptbase.c INITIALIZE_MGMT_STATUS(ioc->mptbase_cmds.status) ioc 6398 drivers/message/fusion/mptbase.c if ((mf = mpt_get_msg_frame(mpt_base_index, ioc)) == NULL) { ioc 6399 drivers/message/fusion/mptbase.c dcprintk(ioc, printk(MYIOC_s_WARN_FMT ioc 6400 drivers/message/fusion/mptbase.c "mpt_config: no msg frames!\n", ioc->name)); ioc 6456 drivers/message/fusion/mptbase.c dcprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 6458 drivers/message/fusion/mptbase.c ioc->name, page_type, pReq->Header.PageNumber, pReq->Action)); ioc 6460 drivers/message/fusion/mptbase.c ioc->add_sge((char *)&pReq->PageBufferSGE, flagsLength, pCfg->physAddr); ioc 6462 drivers/message/fusion/mptbase.c mpt_put_msg_frame(mpt_base_index, ioc, mf); ioc 6463 drivers/message/fusion/mptbase.c timeleft = wait_for_completion_timeout(&ioc->mptbase_cmds.done, ioc 6465 drivers/message/fusion/mptbase.c if (!(ioc->mptbase_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) { ioc 6467 drivers/message/fusion/mptbase.c dfailprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 6470 drivers/message/fusion/mptbase.c ioc->name, page_type, pReq->Header.PageNumber, ioc 6471 drivers/message/fusion/mptbase.c pReq->Action, ioc->mptbase_cmds.status, timeleft)); ioc 6472 drivers/message/fusion/mptbase.c if (ioc->mptbase_cmds.status & MPT_MGMT_STATUS_DID_IOCRESET) ioc 6475 drivers/message/fusion/mptbase.c spin_lock_irqsave(&ioc->taskmgmt_lock, flags); ioc 6476 drivers/message/fusion/mptbase.c if (ioc->ioc_reset_in_progress) { ioc 6477 drivers/message/fusion/mptbase.c spin_unlock_irqrestore(&ioc->taskmgmt_lock, ioc 6481 drivers/message/fusion/mptbase.c __func__, ioc->name); ioc 6482 drivers/message/fusion/mptbase.c mutex_unlock(&ioc->mptbase_cmds.mutex); ioc 6485 drivers/message/fusion/mptbase.c spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags); ioc 6491 drivers/message/fusion/mptbase.c if (!(ioc->mptbase_cmds.status & MPT_MGMT_STATUS_RF_VALID)) { ioc 6495 drivers/message/fusion/mptbase.c pReply = (ConfigReply_t *)ioc->mptbase_cmds.reply; ioc 6514 drivers/message/fusion/mptbase.c ioc->name, ret, timeleft); ioc 6516 drivers/message/fusion/mptbase.c dcprintk(ioc, printk(KERN_DEBUG "IOCStatus=%04xh, IOCLogInfo=%08xh\n", ioc 6521 drivers/message/fusion/mptbase.c CLEAR_MGMT_STATUS(ioc->mptbase_cmds.status) ioc 6522 drivers/message/fusion/mptbase.c mutex_unlock(&ioc->mptbase_cmds.mutex); ioc 6527 drivers/message/fusion/mptbase.c ioc->name, __func__, mpt_GetIocState(ioc, 0)); ioc 6529 drivers/message/fusion/mptbase.c if (mpt_Soft_Hard_ResetHandler(ioc, CAN_SLEEP) != 0) ioc 6532 drivers/message/fusion/mptbase.c mpt_HardResetHandler(ioc, CAN_SLEEP); ioc 6534 drivers/message/fusion/mptbase.c mpt_free_msg_frame(ioc, mf); ioc 6540 drivers/message/fusion/mptbase.c " action %d\n", ioc->name, page_type, ioc 6559 drivers/message/fusion/mptbase.c mpt_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) ioc 6563 drivers/message/fusion/mptbase.c ioc->taskmgmt_quiesce_io = 1; ioc 6564 drivers/message/fusion/mptbase.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 6565 drivers/message/fusion/mptbase.c "%s: MPT_IOC_SETUP_RESET\n", ioc->name, __func__)); ioc 6568 drivers/message/fusion/mptbase.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 6569 drivers/message/fusion/mptbase.c "%s: MPT_IOC_PRE_RESET\n", ioc->name, __func__)); ioc 6572 drivers/message/fusion/mptbase.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 6573 drivers/message/fusion/mptbase.c "%s: MPT_IOC_POST_RESET\n", ioc->name, __func__)); ioc 6575 drivers/message/fusion/mptbase.c if (ioc->mptbase_cmds.status & MPT_MGMT_STATUS_PENDING) { ioc 6576 drivers/message/fusion/mptbase.c ioc->mptbase_cmds.status |= ioc 6578 drivers/message/fusion/mptbase.c complete(&ioc->mptbase_cmds.done); ioc 6581 drivers/message/fusion/mptbase.c if (ioc->taskmgmt_cmds.status & MPT_MGMT_STATUS_PENDING) { ioc 6582 drivers/message/fusion/mptbase.c ioc->taskmgmt_cmds.status |= ioc 6584 drivers/message/fusion/mptbase.c complete(&ioc->taskmgmt_cmds.done); ioc 6638 drivers/message/fusion/mptbase.c static void seq_mpt_print_ioc_summary(MPT_ADAPTER *ioc, struct seq_file *m, int showlan); ioc 6642 drivers/message/fusion/mptbase.c MPT_ADAPTER *ioc = m->private; ioc 6644 drivers/message/fusion/mptbase.c if (ioc) { ioc 6645 drivers/message/fusion/mptbase.c seq_mpt_print_ioc_summary(ioc, m, 1); ioc 6647 drivers/message/fusion/mptbase.c list_for_each_entry(ioc, &ioc_list, list) { ioc 6648 drivers/message/fusion/mptbase.c seq_mpt_print_ioc_summary(ioc, m, 1); ioc 6699 drivers/message/fusion/mptbase.c MPT_ADAPTER *ioc = m->private; ioc 6704 drivers/message/fusion/mptbase.c mpt_get_fw_exp_ver(expVer, ioc); ioc 6706 drivers/message/fusion/mptbase.c seq_printf(m, "%s:", ioc->name); ioc 6707 drivers/message/fusion/mptbase.c if (ioc->facts.Flags & MPI_IOCFACTS_FLAGS_FW_DOWNLOAD_BOOT) ioc 6713 drivers/message/fusion/mptbase.c ioc->facts.ProductID, ioc 6714 drivers/message/fusion/mptbase.c ioc->prod_name); ioc 6715 drivers/message/fusion/mptbase.c seq_printf(m, " FWVersion = 0x%08x%s", ioc->facts.FWVersion.Word, expVer); ioc 6716 drivers/message/fusion/mptbase.c if (ioc->facts.FWImageSize) ioc 6717 drivers/message/fusion/mptbase.c seq_printf(m, " (fw_size=%d)", ioc->facts.FWImageSize); ioc 6718 drivers/message/fusion/mptbase.c seq_printf(m, "\n MsgVersion = 0x%04x\n", ioc->facts.MsgVersion); ioc 6719 drivers/message/fusion/mptbase.c seq_printf(m, " FirstWhoInit = 0x%02x\n", ioc->FirstWhoInit); ioc 6720 drivers/message/fusion/mptbase.c seq_printf(m, " EventState = 0x%02x\n", ioc->facts.EventState); ioc 6723 drivers/message/fusion/mptbase.c ioc->facts.CurrentHostMfaHighAddr); ioc 6725 drivers/message/fusion/mptbase.c ioc->facts.CurrentSenseBufferHighAddr); ioc 6727 drivers/message/fusion/mptbase.c seq_printf(m, " MaxChainDepth = 0x%02x frames\n", ioc->facts.MaxChainDepth); ioc 6728 drivers/message/fusion/mptbase.c seq_printf(m, " MinBlockSize = 0x%02x bytes\n", 4*ioc->facts.BlockSize); ioc 6731 drivers/message/fusion/mptbase.c (void *)ioc->req_frames, (void *)(ulong)ioc->req_frames_dma); ioc 6735 drivers/message/fusion/mptbase.c sz = (ioc->req_sz * ioc->req_depth) + 128; ioc 6738 drivers/message/fusion/mptbase.c ioc->req_sz, ioc->req_depth, ioc->req_sz*ioc->req_depth, sz); ioc 6740 drivers/message/fusion/mptbase.c 4*ioc->facts.RequestFrameSize, ioc 6741 drivers/message/fusion/mptbase.c ioc->facts.GlobalCredits); ioc 6744 drivers/message/fusion/mptbase.c (void *)ioc->alloc, (void *)(ulong)ioc->alloc_dma); ioc 6745 drivers/message/fusion/mptbase.c sz = (ioc->reply_sz * ioc->reply_depth) + 128; ioc 6747 drivers/message/fusion/mptbase.c ioc->reply_sz, ioc->reply_depth, ioc->reply_sz*ioc->reply_depth, sz); ioc 6749 drivers/message/fusion/mptbase.c ioc->facts.CurReplyFrameSize, ioc 6750 drivers/message/fusion/mptbase.c ioc->facts.ReplyQueueDepth); ioc 6753 drivers/message/fusion/mptbase.c (ioc->facts.MaxDevices==0) ? 255 : ioc->facts.MaxDevices); ioc 6754 drivers/message/fusion/mptbase.c seq_printf(m, " MaxBuses = %d\n", ioc->facts.MaxBuses); ioc 6757 drivers/message/fusion/mptbase.c for (p=0; p < ioc->facts.NumberOfPorts; p++) { ioc 6760 drivers/message/fusion/mptbase.c ioc->facts.NumberOfPorts); ioc 6761 drivers/message/fusion/mptbase.c if (ioc->bus_type == FC) { ioc 6762 drivers/message/fusion/mptbase.c if (ioc->pfacts[p].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_LAN) { ioc 6763 drivers/message/fusion/mptbase.c u8 *a = (u8*)&ioc->lan_cnfg_page1.HardwareAddressLow; ioc 6767 drivers/message/fusion/mptbase.c ioc->fc_port_page0[p].WWNN.High, ioc 6768 drivers/message/fusion/mptbase.c ioc->fc_port_page0[p].WWNN.Low, ioc 6769 drivers/message/fusion/mptbase.c ioc->fc_port_page0[p].WWPN.High, ioc 6770 drivers/message/fusion/mptbase.c ioc->fc_port_page0[p].WWPN.Low); ioc 6780 drivers/message/fusion/mptbase.c mpt_get_fw_exp_ver(char *buf, MPT_ADAPTER *ioc) ioc 6783 drivers/message/fusion/mptbase.c if ((ioc->facts.FWVersion.Word >> 24) == 0x0E) { ioc 6785 drivers/message/fusion/mptbase.c (ioc->facts.FWVersion.Word >> 16) & 0x00FF, /* Month */ ioc 6786 drivers/message/fusion/mptbase.c (ioc->facts.FWVersion.Word >> 8) & 0x1F); /* Day */ ioc 6789 drivers/message/fusion/mptbase.c if ((ioc->facts.FWVersion.Word >> 8) & 0x80) ioc 6807 drivers/message/fusion/mptbase.c mpt_print_ioc_summary(MPT_ADAPTER *ioc, char *buffer, int *size, int len, int showlan) ioc 6812 drivers/message/fusion/mptbase.c mpt_get_fw_exp_ver(expVer, ioc); ioc 6818 drivers/message/fusion/mptbase.c ioc->name, ioc 6819 drivers/message/fusion/mptbase.c ioc->prod_name, ioc 6821 drivers/message/fusion/mptbase.c ioc->facts.FWVersion.Word, ioc 6823 drivers/message/fusion/mptbase.c ioc->facts.NumberOfPorts, ioc 6824 drivers/message/fusion/mptbase.c ioc->req_depth); ioc 6826 drivers/message/fusion/mptbase.c if (showlan && (ioc->pfacts[0].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_LAN)) { ioc 6827 drivers/message/fusion/mptbase.c u8 *a = (u8*)&ioc->lan_cnfg_page1.HardwareAddressLow; ioc 6831 drivers/message/fusion/mptbase.c y += sprintf(buffer+len+y, ", IRQ=%d", ioc->pci_irq); ioc 6833 drivers/message/fusion/mptbase.c if (!ioc->active) ioc 6842 drivers/message/fusion/mptbase.c static void seq_mpt_print_ioc_summary(MPT_ADAPTER *ioc, struct seq_file *m, int showlan) ioc 6846 drivers/message/fusion/mptbase.c mpt_get_fw_exp_ver(expVer, ioc); ioc 6852 drivers/message/fusion/mptbase.c ioc->name, ioc 6853 drivers/message/fusion/mptbase.c ioc->prod_name, ioc 6855 drivers/message/fusion/mptbase.c ioc->facts.FWVersion.Word, ioc 6857 drivers/message/fusion/mptbase.c ioc->facts.NumberOfPorts, ioc 6858 drivers/message/fusion/mptbase.c ioc->req_depth); ioc 6860 drivers/message/fusion/mptbase.c if (showlan && (ioc->pfacts[0].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_LAN)) { ioc 6861 drivers/message/fusion/mptbase.c u8 *a = (u8*)&ioc->lan_cnfg_page1.HardwareAddressLow; ioc 6865 drivers/message/fusion/mptbase.c seq_printf(m, ", IRQ=%d", ioc->pci_irq); ioc 6867 drivers/message/fusion/mptbase.c if (!ioc->active) ioc 6883 drivers/message/fusion/mptbase.c mpt_set_taskmgmt_in_progress_flag(MPT_ADAPTER *ioc) ioc 6888 drivers/message/fusion/mptbase.c spin_lock_irqsave(&ioc->taskmgmt_lock, flags); ioc 6889 drivers/message/fusion/mptbase.c if (ioc->ioc_reset_in_progress || ioc->taskmgmt_in_progress || ioc 6890 drivers/message/fusion/mptbase.c (ioc->alt_ioc && ioc->alt_ioc->taskmgmt_in_progress)) { ioc 6895 drivers/message/fusion/mptbase.c ioc->taskmgmt_in_progress = 1; ioc 6896 drivers/message/fusion/mptbase.c ioc->taskmgmt_quiesce_io = 1; ioc 6897 drivers/message/fusion/mptbase.c if (ioc->alt_ioc) { ioc 6898 drivers/message/fusion/mptbase.c ioc->alt_ioc->taskmgmt_in_progress = 1; ioc 6899 drivers/message/fusion/mptbase.c ioc->alt_ioc->taskmgmt_quiesce_io = 1; ioc 6902 drivers/message/fusion/mptbase.c spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags); ioc 6913 drivers/message/fusion/mptbase.c mpt_clear_taskmgmt_in_progress_flag(MPT_ADAPTER *ioc) ioc 6917 drivers/message/fusion/mptbase.c spin_lock_irqsave(&ioc->taskmgmt_lock, flags); ioc 6918 drivers/message/fusion/mptbase.c ioc->taskmgmt_in_progress = 0; ioc 6919 drivers/message/fusion/mptbase.c ioc->taskmgmt_quiesce_io = 0; ioc 6920 drivers/message/fusion/mptbase.c if (ioc->alt_ioc) { ioc 6921 drivers/message/fusion/mptbase.c ioc->alt_ioc->taskmgmt_in_progress = 0; ioc 6922 drivers/message/fusion/mptbase.c ioc->alt_ioc->taskmgmt_quiesce_io = 0; ioc 6924 drivers/message/fusion/mptbase.c spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags); ioc 6936 drivers/message/fusion/mptbase.c mpt_halt_firmware(MPT_ADAPTER *ioc) ioc 6940 drivers/message/fusion/mptbase.c ioc_raw_state = mpt_GetIocState(ioc, 0); ioc 6944 drivers/message/fusion/mptbase.c ioc->name, ioc_raw_state & MPI_DOORBELL_DATA_MASK); ioc 6945 drivers/message/fusion/mptbase.c panic("%s: IOC Fault (%04xh)!!!\n", ioc->name, ioc 6948 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->Doorbell, 0xC0FFEE00); ioc 6950 drivers/message/fusion/mptbase.c ioc->name); ioc 6969 drivers/message/fusion/mptbase.c mpt_SoftResetHandler(MPT_ADAPTER *ioc, int sleepFlag) ioc 6978 drivers/message/fusion/mptbase.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "SoftResetHandler Entered!\n", ioc 6979 drivers/message/fusion/mptbase.c ioc->name)); ioc 6981 drivers/message/fusion/mptbase.c ioc_state = mpt_GetIocState(ioc, 0) & MPI_IOC_STATE_MASK; ioc 6984 drivers/message/fusion/mptbase.c mpt_halt_firmware(ioc); ioc 6988 drivers/message/fusion/mptbase.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 6989 drivers/message/fusion/mptbase.c "skipping, either in FAULT or RESET state!\n", ioc->name)); ioc 6993 drivers/message/fusion/mptbase.c if (ioc->bus_type == FC) { ioc 6994 drivers/message/fusion/mptbase.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 6995 drivers/message/fusion/mptbase.c "skipping, because the bus type is FC!\n", ioc->name)); ioc 6999 drivers/message/fusion/mptbase.c spin_lock_irqsave(&ioc->taskmgmt_lock, flags); ioc 7000 drivers/message/fusion/mptbase.c if (ioc->ioc_reset_in_progress) { ioc 7001 drivers/message/fusion/mptbase.c spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags); ioc 7004 drivers/message/fusion/mptbase.c ioc->ioc_reset_in_progress = 1; ioc 7005 drivers/message/fusion/mptbase.c spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags); ioc 7011 drivers/message/fusion/mptbase.c mpt_signal_reset(cb_idx, ioc, MPT_IOC_SETUP_RESET); ioc 7014 drivers/message/fusion/mptbase.c spin_lock_irqsave(&ioc->taskmgmt_lock, flags); ioc 7015 drivers/message/fusion/mptbase.c if (ioc->taskmgmt_in_progress) { ioc 7016 drivers/message/fusion/mptbase.c ioc->ioc_reset_in_progress = 0; ioc 7017 drivers/message/fusion/mptbase.c spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags); ioc 7020 drivers/message/fusion/mptbase.c spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags); ioc 7022 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->IntMask, 0xFFFFFFFF); ioc 7023 drivers/message/fusion/mptbase.c ioc->active = 0; ioc 7026 drivers/message/fusion/mptbase.c rc = SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, sleepFlag); ioc 7030 drivers/message/fusion/mptbase.c mpt_signal_reset(cb_idx, ioc, MPT_IOC_PRE_RESET); ioc 7036 drivers/message/fusion/mptbase.c ioc_state = mpt_GetIocState(ioc, 0) & MPI_IOC_STATE_MASK; ioc 7042 drivers/message/fusion/mptbase.c rc = GetIocFacts(ioc, sleepFlag, ioc 7054 drivers/message/fusion/mptbase.c rc = PrimeIocFifos(ioc); ioc 7058 drivers/message/fusion/mptbase.c rc = SendIocInit(ioc, sleepFlag); ioc 7062 drivers/message/fusion/mptbase.c rc = SendEventNotification(ioc, 1, sleepFlag); ioc 7066 drivers/message/fusion/mptbase.c if (ioc->hard_resets < -1) ioc 7067 drivers/message/fusion/mptbase.c ioc->hard_resets++; ioc 7073 drivers/message/fusion/mptbase.c ioc->active = 1; ioc 7074 drivers/message/fusion/mptbase.c CHIPREG_WRITE32(&ioc->chip->IntMask, MPI_HIM_DIM); ioc 7077 drivers/message/fusion/mptbase.c spin_lock_irqsave(&ioc->taskmgmt_lock, flags); ioc 7078 drivers/message/fusion/mptbase.c ioc->ioc_reset_in_progress = 0; ioc 7079 drivers/message/fusion/mptbase.c ioc->taskmgmt_quiesce_io = 0; ioc 7080 drivers/message/fusion/mptbase.c ioc->taskmgmt_in_progress = 0; ioc 7081 drivers/message/fusion/mptbase.c spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags); ioc 7083 drivers/message/fusion/mptbase.c if (ioc->active) { /* otherwise, hard reset coming */ ioc 7086 drivers/message/fusion/mptbase.c mpt_signal_reset(cb_idx, ioc, ioc 7091 drivers/message/fusion/mptbase.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 7093 drivers/message/fusion/mptbase.c ioc->name, jiffies_to_msecs(jiffies - time_count)/1000, ioc 7109 drivers/message/fusion/mptbase.c mpt_Soft_Hard_ResetHandler(MPT_ADAPTER *ioc, int sleepFlag) { ioc 7112 drivers/message/fusion/mptbase.c ret = mpt_SoftResetHandler(ioc, sleepFlag); ioc 7115 drivers/message/fusion/mptbase.c ret = mpt_HardResetHandler(ioc, sleepFlag); ioc 7142 drivers/message/fusion/mptbase.c mpt_HardResetHandler(MPT_ADAPTER *ioc, int sleepFlag) ioc 7149 drivers/message/fusion/mptbase.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "HardResetHandler Entered!\n", ioc->name)); ioc 7151 drivers/message/fusion/mptbase.c printk(MYIOC_s_INFO_FMT "HardResetHandler Entered!\n", ioc->name); ioc 7152 drivers/message/fusion/mptbase.c printk("MF count 0x%x !\n", ioc->mfcnt); ioc 7155 drivers/message/fusion/mptbase.c mpt_halt_firmware(ioc); ioc 7160 drivers/message/fusion/mptbase.c spin_lock_irqsave(&ioc->taskmgmt_lock, flags); ioc 7161 drivers/message/fusion/mptbase.c if (ioc->ioc_reset_in_progress) { ioc 7162 drivers/message/fusion/mptbase.c spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags); ioc 7163 drivers/message/fusion/mptbase.c ioc->wait_on_reset_completion = 1; ioc 7166 drivers/message/fusion/mptbase.c } while (ioc->ioc_reset_in_progress == 1); ioc 7167 drivers/message/fusion/mptbase.c ioc->wait_on_reset_completion = 0; ioc 7168 drivers/message/fusion/mptbase.c return ioc->reset_status; ioc 7170 drivers/message/fusion/mptbase.c if (ioc->wait_on_reset_completion) { ioc 7171 drivers/message/fusion/mptbase.c spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags); ioc 7176 drivers/message/fusion/mptbase.c ioc->ioc_reset_in_progress = 1; ioc 7177 drivers/message/fusion/mptbase.c if (ioc->alt_ioc) ioc 7178 drivers/message/fusion/mptbase.c ioc->alt_ioc->ioc_reset_in_progress = 1; ioc 7179 drivers/message/fusion/mptbase.c spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags); ioc 7189 drivers/message/fusion/mptbase.c mpt_signal_reset(cb_idx, ioc, MPT_IOC_SETUP_RESET); ioc 7190 drivers/message/fusion/mptbase.c if (ioc->alt_ioc) ioc 7191 drivers/message/fusion/mptbase.c mpt_signal_reset(cb_idx, ioc->alt_ioc, ioc 7197 drivers/message/fusion/mptbase.c rc = mpt_do_ioc_recovery(ioc, MPT_HOSTEVENT_IOC_RECOVER, sleepFlag); ioc 7201 drivers/message/fusion/mptbase.c rc, ioc->name, mpt_GetIocState(ioc, 0)); ioc 7203 drivers/message/fusion/mptbase.c if (ioc->hard_resets < -1) ioc 7204 drivers/message/fusion/mptbase.c ioc->hard_resets++; ioc 7207 drivers/message/fusion/mptbase.c spin_lock_irqsave(&ioc->taskmgmt_lock, flags); ioc 7208 drivers/message/fusion/mptbase.c ioc->ioc_reset_in_progress = 0; ioc 7209 drivers/message/fusion/mptbase.c ioc->taskmgmt_quiesce_io = 0; ioc 7210 drivers/message/fusion/mptbase.c ioc->taskmgmt_in_progress = 0; ioc 7211 drivers/message/fusion/mptbase.c ioc->reset_status = rc; ioc 7212 drivers/message/fusion/mptbase.c if (ioc->alt_ioc) { ioc 7213 drivers/message/fusion/mptbase.c ioc->alt_ioc->ioc_reset_in_progress = 0; ioc 7214 drivers/message/fusion/mptbase.c ioc->alt_ioc->taskmgmt_quiesce_io = 0; ioc 7215 drivers/message/fusion/mptbase.c ioc->alt_ioc->taskmgmt_in_progress = 0; ioc 7217 drivers/message/fusion/mptbase.c spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags); ioc 7221 drivers/message/fusion/mptbase.c mpt_signal_reset(cb_idx, ioc, MPT_IOC_POST_RESET); ioc 7222 drivers/message/fusion/mptbase.c if (ioc->alt_ioc) ioc 7224 drivers/message/fusion/mptbase.c ioc->alt_ioc, MPT_IOC_POST_RESET); ioc 7228 drivers/message/fusion/mptbase.c dtmprintk(ioc, ioc 7230 drivers/message/fusion/mptbase.c "HardResetHandler: completed (%d seconds): %s\n", ioc->name, ioc 7239 drivers/message/fusion/mptbase.c mpt_display_event_info(MPT_ADAPTER *ioc, EventNotificationReply_t *pEventReply) ioc 7245 drivers/message/fusion/mptbase.c char *evStr = ioc->evStr; ioc 7671 drivers/message/fusion/mptbase.c devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 7673 drivers/message/fusion/mptbase.c ioc->name, event, evStr)); ioc 7675 drivers/message/fusion/mptbase.c devtverboseprintk(ioc, printk(KERN_DEBUG MYNAM ioc 7678 drivers/message/fusion/mptbase.c devtverboseprintk(ioc, printk(" %08x", ioc 7680 drivers/message/fusion/mptbase.c devtverboseprintk(ioc, printk(KERN_DEBUG "\n")); ioc 7695 drivers/message/fusion/mptbase.c ProcessEventNotification(MPT_ADAPTER *ioc, EventNotificationReply_t *pEventReply, int *evHandlers) ioc 7716 drivers/message/fusion/mptbase.c mpt_display_event_info(ioc, pEventReply); ioc 7730 drivers/message/fusion/mptbase.c if (ioc->facts.Function) { ioc 7731 drivers/message/fusion/mptbase.c ioc->facts.EventState = evState; ioc 7736 drivers/message/fusion/mptbase.c mptbase_raid_process_event_data(ioc, ioc 7747 drivers/message/fusion/mptbase.c if (ioc->events && (ioc->eventTypes & ( 1 << event))) { ioc 7750 drivers/message/fusion/mptbase.c idx = ioc->eventContext % MPTCTL_EVENT_LOG_SIZE; ioc 7752 drivers/message/fusion/mptbase.c ioc->events[idx].event = event; ioc 7753 drivers/message/fusion/mptbase.c ioc->events[idx].eventContext = ioc->eventContext; ioc 7757 drivers/message/fusion/mptbase.c ioc->events[idx].data[ii] = le32_to_cpu(pEventReply->Data[ii]); ioc 7759 drivers/message/fusion/mptbase.c ioc->events[idx].data[ii] = 0; ioc 7762 drivers/message/fusion/mptbase.c ioc->eventContext++; ioc 7771 drivers/message/fusion/mptbase.c devtverboseprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 7773 drivers/message/fusion/mptbase.c ioc->name, cb_idx)); ioc 7774 drivers/message/fusion/mptbase.c r += (*(MptEvHandlers[cb_idx]))(ioc, pEventReply); ioc 7784 drivers/message/fusion/mptbase.c devtverboseprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 7785 drivers/message/fusion/mptbase.c "EventAck required\n",ioc->name)); ioc 7786 drivers/message/fusion/mptbase.c if ((ii = SendEventAck(ioc, pEventReply)) != 0) { ioc 7787 drivers/message/fusion/mptbase.c devtverboseprintk(ioc, printk(MYIOC_s_DEBUG_FMT "SendEventAck returned %d\n", ioc 7788 drivers/message/fusion/mptbase.c ioc->name, ii)); ioc 7805 drivers/message/fusion/mptbase.c mpt_fc_log_info(MPT_ADAPTER *ioc, u32 log_info) ioc 7837 drivers/message/fusion/mptbase.c ioc->name, log_info, desc, (log_info & 0xFFFFFF)); ioc 7849 drivers/message/fusion/mptbase.c mpt_spi_log_info(MPT_ADAPTER *ioc, u32 log_info) ioc 7905 drivers/message/fusion/mptbase.c printk(MYIOC_s_INFO_FMT "LogInfo(0x%08x): F/W: %s\n", ioc->name, log_info, desc); ioc 8061 drivers/message/fusion/mptbase.c mpt_sas_log_info(MPT_ADAPTER *ioc, u32 log_info, u8 cb_idx) ioc 8116 drivers/message/fusion/mptbase.c ioc->name, log_info, originator_desc, code_desc, ioc 8122 drivers/message/fusion/mptbase.c ioc->name, log_info, originator_desc, code_desc, ioc 8128 drivers/message/fusion/mptbase.c ioc->name, log_info, originator_desc, ioc 8143 drivers/message/fusion/mptbase.c mpt_iocstatus_info_config(MPT_ADAPTER *ioc, u32 ioc_status, MPT_FRAME_HDR *mf) ioc 8208 drivers/message/fusion/mptbase.c dreplyprintk(ioc, printk(MYIOC_s_DEBUG_FMT "IOCStatus(0x%04X): %s: %s\n", ioc 8209 drivers/message/fusion/mptbase.c ioc->name, ioc_status, desc, extend_desc)); ioc 8221 drivers/message/fusion/mptbase.c mpt_iocstatus_info(MPT_ADAPTER *ioc, u32 ioc_status, MPT_FRAME_HDR *mf) ioc 8274 drivers/message/fusion/mptbase.c mpt_iocstatus_info_config(ioc, status, mf); ioc 8435 drivers/message/fusion/mptbase.c dreplyprintk(ioc, printk(MYIOC_s_DEBUG_FMT "IOCStatus(0x%04X): %s\n", ioc 8436 drivers/message/fusion/mptbase.c ioc->name, status, desc)); ioc 586 drivers/message/fusion/mptbase.h struct _MPT_ADAPTER *ioc; ioc 597 drivers/message/fusion/mptbase.h typedef void (*MPT_SCHEDULE_TARGET_RESET)(void *ioc); ioc 797 drivers/message/fusion/mptbase.h typedef int (*MPT_CALLBACK)(MPT_ADAPTER *ioc, MPT_FRAME_HDR *req, MPT_FRAME_HDR *reply); ioc 798 drivers/message/fusion/mptbase.h typedef int (*MPT_EVHANDLER)(MPT_ADAPTER *ioc, EventNotificationReply_t *evReply); ioc 799 drivers/message/fusion/mptbase.h typedef int (*MPT_RESETHANDLER)(MPT_ADAPTER *ioc, int reset_phase); ioc 827 drivers/message/fusion/mptbase.h #define mpt_msg_flags(ioc) \ ioc 828 drivers/message/fusion/mptbase.h (ioc->sg_addr_size == sizeof(u64)) ? \ ioc 841 drivers/message/fusion/mptbase.h #define MPT_INDEX_2_MFPTR(ioc,idx) \ ioc 842 drivers/message/fusion/mptbase.h (MPT_FRAME_HDR*)( (u8*)(ioc)->req_frames + (ioc)->req_sz * (idx) ) ioc 844 drivers/message/fusion/mptbase.h #define MFPTR_2_MPT_INDEX(ioc,mf) \ ioc 845 drivers/message/fusion/mptbase.h (int)( ((u8*)mf - (u8*)(ioc)->req_frames) / (ioc)->req_sz ) ioc 847 drivers/message/fusion/mptbase.h #define MPT_INDEX_2_RFPTR(ioc,idx) \ ioc 848 drivers/message/fusion/mptbase.h (MPT_FRAME_HDR*)( (u8*)(ioc)->reply_frames + (ioc)->req_sz * (idx) ) ioc 925 drivers/message/fusion/mptbase.h extern MPT_FRAME_HDR *mpt_get_msg_frame(u8 cb_idx, MPT_ADAPTER *ioc); ioc 926 drivers/message/fusion/mptbase.h extern void mpt_free_msg_frame(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf); ioc 927 drivers/message/fusion/mptbase.h extern void mpt_put_msg_frame(u8 cb_idx, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf); ioc 928 drivers/message/fusion/mptbase.h extern void mpt_put_msg_frame_hi_pri(u8 cb_idx, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf); ioc 930 drivers/message/fusion/mptbase.h extern int mpt_send_handshake_request(u8 cb_idx, MPT_ADAPTER *ioc, int reqBytes, u32 *req, int sleepFlag); ioc 932 drivers/message/fusion/mptbase.h extern u32 mpt_GetIocState(MPT_ADAPTER *ioc, int cooked); ioc 933 drivers/message/fusion/mptbase.h extern void mpt_print_ioc_summary(MPT_ADAPTER *ioc, char *buf, int *size, int len, int showlan); ioc 934 drivers/message/fusion/mptbase.h extern int mpt_HardResetHandler(MPT_ADAPTER *ioc, int sleepFlag); ioc 935 drivers/message/fusion/mptbase.h extern int mpt_Soft_Hard_ResetHandler(MPT_ADAPTER *ioc, int sleepFlag); ioc 936 drivers/message/fusion/mptbase.h extern int mpt_config(MPT_ADAPTER *ioc, CONFIGPARMS *cfg); ioc 937 drivers/message/fusion/mptbase.h extern int mpt_alloc_fw_memory(MPT_ADAPTER *ioc, int size); ioc 938 drivers/message/fusion/mptbase.h extern void mpt_free_fw_memory(MPT_ADAPTER *ioc); ioc 939 drivers/message/fusion/mptbase.h extern int mpt_findImVolumes(MPT_ADAPTER *ioc); ioc 940 drivers/message/fusion/mptbase.h extern int mptbase_sas_persist_operation(MPT_ADAPTER *ioc, u8 persist_opcode); ioc 941 drivers/message/fusion/mptbase.h extern int mpt_raid_phys_disk_pg0(MPT_ADAPTER *ioc, u8 phys_disk_num, pRaidPhysDiskPage0_t phys_disk); ioc 942 drivers/message/fusion/mptbase.h extern int mpt_raid_phys_disk_pg1(MPT_ADAPTER *ioc, u8 phys_disk_num, ioc 944 drivers/message/fusion/mptbase.h extern int mpt_raid_phys_disk_get_num_paths(MPT_ADAPTER *ioc, ioc 946 drivers/message/fusion/mptbase.h extern int mpt_set_taskmgmt_in_progress_flag(MPT_ADAPTER *ioc); ioc 947 drivers/message/fusion/mptbase.h extern void mpt_clear_taskmgmt_in_progress_flag(MPT_ADAPTER *ioc); ioc 948 drivers/message/fusion/mptbase.h extern void mpt_halt_firmware(MPT_ADAPTER *ioc); ioc 129 drivers/message/fusion/mptctl.c struct buflist **blp, dma_addr_t *sglbuf_dma, MPT_ADAPTER *ioc); ioc 131 drivers/message/fusion/mptctl.c struct buflist *buflist, MPT_ADAPTER *ioc); ioc 136 drivers/message/fusion/mptctl.c static int mptctl_ioc_reset(MPT_ADAPTER *ioc, int reset_phase); ioc 141 drivers/message/fusion/mptctl.c static int mptctl_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply); ioc 179 drivers/message/fusion/mptctl.c mptctl_syscall_down(MPT_ADAPTER *ioc, int nonblock) ioc 184 drivers/message/fusion/mptctl.c if (!mutex_trylock(&ioc->ioctl_cmds.mutex)) ioc 187 drivers/message/fusion/mptctl.c if (mutex_lock_interruptible(&ioc->ioctl_cmds.mutex)) ioc 201 drivers/message/fusion/mptctl.c mptctl_reply(MPT_ADAPTER *ioc, MPT_FRAME_HDR *req, MPT_FRAME_HDR *reply) ioc 210 drivers/message/fusion/mptctl.c dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "completing mpi function " ioc 211 drivers/message/fusion/mptctl.c "(0x%02X), req=%p, reply=%p\n", ioc->name, req->u.hdr.Function, ioc 218 drivers/message/fusion/mptctl.c if (ioc->ioctl_cmds.msg_context != req->u.hdr.MsgContext) ioc 221 drivers/message/fusion/mptctl.c ioc->ioctl_cmds.status |= MPT_MGMT_STATUS_COMMAND_GOOD; ioc 226 drivers/message/fusion/mptctl.c ioc->ioctl_cmds.status |= MPT_MGMT_STATUS_RF_VALID; ioc 227 drivers/message/fusion/mptctl.c sz = min(ioc->reply_sz, 4*reply->u.reply.MsgLength); ioc 228 drivers/message/fusion/mptctl.c memcpy(ioc->ioctl_cmds.reply, reply, sz); ioc 231 drivers/message/fusion/mptctl.c dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 232 drivers/message/fusion/mptctl.c "iocstatus (0x%04X), loginfo (0x%08X)\n", ioc->name, ioc 241 drivers/message/fusion/mptctl.c dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 243 drivers/message/fusion/mptctl.c "tag = (0x%04x), transfer_count (0x%08x)\n", ioc->name, ioc 254 drivers/message/fusion/mptctl.c sense_data = ((u8 *)ioc->sense_buf_pool + ioc 256 drivers/message/fusion/mptctl.c memcpy(ioc->ioctl_cmds.sense, sense_data, sz); ioc 257 drivers/message/fusion/mptctl.c ioc->ioctl_cmds.status |= MPT_MGMT_STATUS_SENSE_VALID; ioc 264 drivers/message/fusion/mptctl.c if (ioc->ioctl_cmds.status & MPT_MGMT_STATUS_PENDING) { ioc 266 drivers/message/fusion/mptctl.c mpt_clear_taskmgmt_in_progress_flag(ioc); ioc 267 drivers/message/fusion/mptctl.c ioc->ioctl_cmds.status &= ~MPT_MGMT_STATUS_PENDING; ioc 268 drivers/message/fusion/mptctl.c complete(&ioc->ioctl_cmds.done); ioc 269 drivers/message/fusion/mptctl.c if (ioc->bus_type == SAS) ioc 270 drivers/message/fusion/mptctl.c ioc->schedule_target_reset(ioc); ioc 272 drivers/message/fusion/mptctl.c ioc->ioctl_cmds.status &= ~MPT_MGMT_STATUS_PENDING; ioc 273 drivers/message/fusion/mptctl.c complete(&ioc->ioctl_cmds.done); ioc 286 drivers/message/fusion/mptctl.c mptctl_taskmgmt_reply(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) ioc 291 drivers/message/fusion/mptctl.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 293 drivers/message/fusion/mptctl.c ioc->name, mf, mr)); ioc 295 drivers/message/fusion/mptctl.c ioc->taskmgmt_cmds.status |= MPT_MGMT_STATUS_COMMAND_GOOD; ioc 300 drivers/message/fusion/mptctl.c ioc->taskmgmt_cmds.status |= MPT_MGMT_STATUS_RF_VALID; ioc 301 drivers/message/fusion/mptctl.c memcpy(ioc->taskmgmt_cmds.reply, mr, ioc 304 drivers/message/fusion/mptctl.c if (ioc->taskmgmt_cmds.status & MPT_MGMT_STATUS_PENDING) { ioc 305 drivers/message/fusion/mptctl.c mpt_clear_taskmgmt_in_progress_flag(ioc); ioc 306 drivers/message/fusion/mptctl.c ioc->taskmgmt_cmds.status &= ~MPT_MGMT_STATUS_PENDING; ioc 307 drivers/message/fusion/mptctl.c complete(&ioc->taskmgmt_cmds.done); ioc 308 drivers/message/fusion/mptctl.c if (ioc->bus_type == SAS) ioc 309 drivers/message/fusion/mptctl.c ioc->schedule_target_reset(ioc); ioc 316 drivers/message/fusion/mptctl.c mptctl_do_taskmgmt(MPT_ADAPTER *ioc, u8 tm_type, u8 bus_id, u8 target_id) ioc 328 drivers/message/fusion/mptctl.c mutex_lock(&ioc->taskmgmt_cmds.mutex); ioc 329 drivers/message/fusion/mptctl.c if (mpt_set_taskmgmt_in_progress_flag(ioc) != 0) { ioc 330 drivers/message/fusion/mptctl.c mutex_unlock(&ioc->taskmgmt_cmds.mutex); ioc 336 drivers/message/fusion/mptctl.c mf = mpt_get_msg_frame(mptctl_taskmgmt_id, ioc); ioc 338 drivers/message/fusion/mptctl.c dtmprintk(ioc, ioc 340 drivers/message/fusion/mptctl.c ioc->name)); ioc 341 drivers/message/fusion/mptctl.c mpt_clear_taskmgmt_in_progress_flag(ioc); ioc 346 drivers/message/fusion/mptctl.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TaskMgmt request (mf=%p)\n", ioc 347 drivers/message/fusion/mptctl.c ioc->name, mf)); ioc 354 drivers/message/fusion/mptctl.c (ioc->bus_type == FC)) ioc 368 drivers/message/fusion/mptctl.c switch (ioc->bus_type) { ioc 381 drivers/message/fusion/mptctl.c dtmprintk(ioc, ioc 383 drivers/message/fusion/mptctl.c ioc->name, tm_type, timeout)); ioc 385 drivers/message/fusion/mptctl.c INITIALIZE_MGMT_STATUS(ioc->taskmgmt_cmds.status) ioc 387 drivers/message/fusion/mptctl.c if ((ioc->facts.IOCCapabilities & MPI_IOCFACTS_CAPABILITY_HIGH_PRI_Q) && ioc 388 drivers/message/fusion/mptctl.c (ioc->facts.MsgVersion >= MPI_VERSION_01_05)) ioc 389 drivers/message/fusion/mptctl.c mpt_put_msg_frame_hi_pri(mptctl_taskmgmt_id, ioc, mf); ioc 391 drivers/message/fusion/mptctl.c retval = mpt_send_handshake_request(mptctl_taskmgmt_id, ioc, ioc 394 drivers/message/fusion/mptctl.c dfailprintk(ioc, ioc 397 drivers/message/fusion/mptctl.c " (ioc %p, mf %p, rc=%d) \n", ioc->name, ioc 398 drivers/message/fusion/mptctl.c ioc, mf, retval)); ioc 399 drivers/message/fusion/mptctl.c mpt_free_msg_frame(ioc, mf); ioc 400 drivers/message/fusion/mptctl.c mpt_clear_taskmgmt_in_progress_flag(ioc); ioc 406 drivers/message/fusion/mptctl.c ii = wait_for_completion_timeout(&ioc->taskmgmt_cmds.done, timeout*HZ); ioc 408 drivers/message/fusion/mptctl.c if (!(ioc->taskmgmt_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) { ioc 409 drivers/message/fusion/mptctl.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 410 drivers/message/fusion/mptctl.c "TaskMgmt failed\n", ioc->name)); ioc 411 drivers/message/fusion/mptctl.c mpt_free_msg_frame(ioc, mf); ioc 412 drivers/message/fusion/mptctl.c mpt_clear_taskmgmt_in_progress_flag(ioc); ioc 413 drivers/message/fusion/mptctl.c if (ioc->taskmgmt_cmds.status & MPT_MGMT_STATUS_DID_IOCRESET) ioc 420 drivers/message/fusion/mptctl.c if (!(ioc->taskmgmt_cmds.status & MPT_MGMT_STATUS_RF_VALID)) { ioc 421 drivers/message/fusion/mptctl.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 422 drivers/message/fusion/mptctl.c "TaskMgmt failed\n", ioc->name)); ioc 427 drivers/message/fusion/mptctl.c pScsiTmReply = (SCSITaskMgmtReply_t *) ioc->taskmgmt_cmds.reply; ioc 428 drivers/message/fusion/mptctl.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 431 drivers/message/fusion/mptctl.c "term_cmnds=%d\n", ioc->name, pScsiTmReply->Bus, ioc 445 drivers/message/fusion/mptctl.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 446 drivers/message/fusion/mptctl.c "TaskMgmt failed\n", ioc->name)); ioc 451 drivers/message/fusion/mptctl.c mutex_unlock(&ioc->taskmgmt_cmds.mutex); ioc 452 drivers/message/fusion/mptctl.c CLEAR_MGMT_STATUS(ioc->taskmgmt_cmds.status) ioc 463 drivers/message/fusion/mptctl.c mptctl_timeout_expired(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf) ioc 470 drivers/message/fusion/mptctl.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ": %s\n", ioc 471 drivers/message/fusion/mptctl.c ioc->name, __func__)); ioc 474 drivers/message/fusion/mptctl.c mpt_halt_firmware(ioc); ioc 476 drivers/message/fusion/mptctl.c spin_lock_irqsave(&ioc->taskmgmt_lock, flags); ioc 477 drivers/message/fusion/mptctl.c if (ioc->ioc_reset_in_progress) { ioc 478 drivers/message/fusion/mptctl.c spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags); ioc 479 drivers/message/fusion/mptctl.c CLEAR_MGMT_PENDING_STATUS(ioc->ioctl_cmds.status) ioc 480 drivers/message/fusion/mptctl.c mpt_free_msg_frame(ioc, mf); ioc 483 drivers/message/fusion/mptctl.c spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags); ioc 486 drivers/message/fusion/mptctl.c CLEAR_MGMT_PENDING_STATUS(ioc->ioctl_cmds.status) ioc 488 drivers/message/fusion/mptctl.c if (ioc->bus_type == SAS) { ioc 490 drivers/message/fusion/mptctl.c ret_val = mptctl_do_taskmgmt(ioc, ioc 494 drivers/message/fusion/mptctl.c ret_val = mptctl_do_taskmgmt(ioc, ioc 502 drivers/message/fusion/mptctl.c ret_val = mptctl_do_taskmgmt(ioc, ioc 509 drivers/message/fusion/mptctl.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Calling Reset! \n", ioc 510 drivers/message/fusion/mptctl.c ioc->name)); ioc 511 drivers/message/fusion/mptctl.c mpt_Soft_Hard_ResetHandler(ioc, CAN_SLEEP); ioc 512 drivers/message/fusion/mptctl.c mpt_free_msg_frame(ioc, mf); ioc 524 drivers/message/fusion/mptctl.c mptctl_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) ioc 528 drivers/message/fusion/mptctl.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 529 drivers/message/fusion/mptctl.c "%s: MPT_IOC_SETUP_RESET\n", ioc->name, __func__)); ioc 532 drivers/message/fusion/mptctl.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 533 drivers/message/fusion/mptctl.c "%s: MPT_IOC_PRE_RESET\n", ioc->name, __func__)); ioc 536 drivers/message/fusion/mptctl.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 537 drivers/message/fusion/mptctl.c "%s: MPT_IOC_POST_RESET\n", ioc->name, __func__)); ioc 538 drivers/message/fusion/mptctl.c if (ioc->ioctl_cmds.status & MPT_MGMT_STATUS_PENDING) { ioc 539 drivers/message/fusion/mptctl.c ioc->ioctl_cmds.status |= MPT_MGMT_STATUS_DID_IOCRESET; ioc 540 drivers/message/fusion/mptctl.c complete(&ioc->ioctl_cmds.done); ioc 553 drivers/message/fusion/mptctl.c mptctl_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply) ioc 559 drivers/message/fusion/mptctl.c dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s() called\n", ioc 560 drivers/message/fusion/mptctl.c ioc->name, __func__)); ioc 569 drivers/message/fusion/mptctl.c ioc->aen_event_read_flag=1; ioc 570 drivers/message/fusion/mptctl.c dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Raised SIGIO to application\n", ioc 571 drivers/message/fusion/mptctl.c ioc->name)); ioc 572 drivers/message/fusion/mptctl.c devtverboseprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 573 drivers/message/fusion/mptctl.c "Raised SIGIO to application\n", ioc->name)); ioc 582 drivers/message/fusion/mptctl.c if(ioc->aen_event_read_flag) ioc 588 drivers/message/fusion/mptctl.c if (ioc->events && (ioc->eventTypes & ( 1 << event))) { ioc 589 drivers/message/fusion/mptctl.c ioc->aen_event_read_flag=1; ioc 590 drivers/message/fusion/mptctl.c dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 591 drivers/message/fusion/mptctl.c "Raised SIGIO to application\n", ioc->name)); ioc 592 drivers/message/fusion/mptctl.c devtverboseprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 593 drivers/message/fusion/mptctl.c "Raised SIGIO to application\n", ioc->name)); ioc 602 drivers/message/fusion/mptctl.c MPT_ADAPTER *ioc; ioc 606 drivers/message/fusion/mptctl.c list_for_each_entry(ioc, &ioc_list, list) ioc 607 drivers/message/fusion/mptctl.c ioc->aen_event_read_flag=0; ioc 1009 drivers/message/fusion/mptctl.c struct buflist **blp, dma_addr_t *sglbuf_dma, MPT_ADAPTER *ioc) ioc 1046 drivers/message/fusion/mptctl.c sglbuf = pci_alloc_consistent(ioc->pcidev, MAX_SGL_BYTES, sglbuf_dma); ioc 1063 drivers/message/fusion/mptctl.c sg_spill = ((ioc->req_sz - sge_offset)/ioc->SGE_size) - 1; ioc 1067 drivers/message/fusion/mptctl.c buflist[buflist_ent].kptr = pci_alloc_consistent(ioc->pcidev, ioc 1074 drivers/message/fusion/mptctl.c "not enough memory! :-(\n", ioc->name); ioc 1076 drivers/message/fusion/mptctl.c ioc->name, numfrags); ioc 1085 drivers/message/fusion/mptctl.c dma_addr = pci_map_single(ioc->pcidev, ioc 1101 drivers/message/fusion/mptctl.c "-SG: No can do - " "Chain required! :-(\n", ioc->name); ioc 1102 drivers/message/fusion/mptctl.c printk(MYIOC_s_WARN_FMT "(freeing %d frags)\n", ioc->name, numfrags); ioc 1110 drivers/message/fusion/mptctl.c "too many SG frags! :-(\n", ioc->name); ioc 1112 drivers/message/fusion/mptctl.c ioc->name, numfrags); ioc 1123 drivers/message/fusion/mptctl.c dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "-SG: kbuf_alloc_2_sgl() - " ioc 1124 drivers/message/fusion/mptctl.c "%d SG frags generated!\n", ioc->name, numfrags)); ioc 1126 drivers/message/fusion/mptctl.c dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "-SG: kbuf_alloc_2_sgl() - " ioc 1127 drivers/message/fusion/mptctl.c "last (big) alloc_sz=%d\n", ioc->name, alloc_sz)); ioc 1145 drivers/message/fusion/mptctl.c pci_free_consistent(ioc->pcidev, len, kptr, dma_addr); ioc 1147 drivers/message/fusion/mptctl.c pci_free_consistent(ioc->pcidev, MAX_SGL_BYTES, sglbuf, *sglbuf_dma); ioc 1158 drivers/message/fusion/mptctl.c kfree_sgl(MptSge_t *sgl, dma_addr_t sgl_dma, struct buflist *buflist, MPT_ADAPTER *ioc) ioc 1184 drivers/message/fusion/mptctl.c pci_unmap_single(ioc->pcidev, dma_addr, len, dir); ioc 1185 drivers/message/fusion/mptctl.c pci_free_consistent(ioc->pcidev, len, kptr, dma_addr); ioc 1202 drivers/message/fusion/mptctl.c pci_unmap_single(ioc->pcidev, dma_addr, len, dir); ioc 1203 drivers/message/fusion/mptctl.c pci_free_consistent(ioc->pcidev, len, kptr, dma_addr); ioc 1207 drivers/message/fusion/mptctl.c pci_free_consistent(ioc->pcidev, MAX_SGL_BYTES, sgl, sgl_dma); ioc 1209 drivers/message/fusion/mptctl.c dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "-SG: Free'd 1 SGL buf + %d kbufs!\n", ioc 1210 drivers/message/fusion/mptctl.c ioc->name, n)); ioc 1224 drivers/message/fusion/mptctl.c mptctl_getiocinfo (MPT_ADAPTER *ioc, unsigned long arg, unsigned int data_size) ioc 1260 drivers/message/fusion/mptctl.c ioc->name, __FILE__, __LINE__); ioc 1265 drivers/message/fusion/mptctl.c dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mptctl_getiocinfo called.\n", ioc 1266 drivers/message/fusion/mptctl.c ioc->name)); ioc 1271 drivers/message/fusion/mptctl.c if (ioc->bus_type == SAS) ioc 1273 drivers/message/fusion/mptctl.c else if (ioc->bus_type == FC) ioc 1285 drivers/message/fusion/mptctl.c pdev = (struct pci_dev *) ioc->pcidev; ioc 1310 drivers/message/fusion/mptctl.c if (ioc->sh) { ioc 1311 drivers/message/fusion/mptctl.c shost_for_each_device(sdev, ioc->sh) { ioc 1324 drivers/message/fusion/mptctl.c karg->FWVersion = ioc->facts.FWVersion.Word; ioc 1325 drivers/message/fusion/mptctl.c karg->BIOSVersion = ioc->biosVersion; ioc 1333 drivers/message/fusion/mptctl.c karg->hostId = ioc->pfacts[port].PortSCSIID; ioc 1341 drivers/message/fusion/mptctl.c ioc->name, __FILE__, __LINE__, uarg); ioc 1361 drivers/message/fusion/mptctl.c mptctl_gettargetinfo (MPT_ADAPTER *ioc, unsigned long arg) ioc 1382 drivers/message/fusion/mptctl.c dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mptctl_gettargetinfo called.\n", ioc 1383 drivers/message/fusion/mptctl.c ioc->name)); ioc 1394 drivers/message/fusion/mptctl.c ioc->name, __FILE__, __LINE__); ioc 1415 drivers/message/fusion/mptctl.c ioc->name, __FILE__, __LINE__); ioc 1422 drivers/message/fusion/mptctl.c if (ioc->sh){ ioc 1423 drivers/message/fusion/mptctl.c shost_for_each_device(sdev, ioc->sh) { ioc 1448 drivers/message/fusion/mptctl.c ioc->name, __FILE__, __LINE__, uarg); ioc 1458 drivers/message/fusion/mptctl.c ioc->name, __FILE__, __LINE__, pdata); ioc 1477 drivers/message/fusion/mptctl.c mptctl_readtest (MPT_ADAPTER *ioc, unsigned long arg) ioc 1489 drivers/message/fusion/mptctl.c dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mptctl_readtest called.\n", ioc 1490 drivers/message/fusion/mptctl.c ioc->name)); ioc 1496 drivers/message/fusion/mptctl.c karg.chip_type = ioc->mfcnt; ioc 1498 drivers/message/fusion/mptctl.c karg.chip_type = ioc->pcidev->device; ioc 1500 drivers/message/fusion/mptctl.c strncpy (karg.name, ioc->name, MPT_MAX_NAME); ioc 1502 drivers/message/fusion/mptctl.c strncpy (karg.product, ioc->prod_name, MPT_PRODUCT_LENGTH); ioc 1510 drivers/message/fusion/mptctl.c ioc->name, __FILE__, __LINE__, uarg); ioc 1529 drivers/message/fusion/mptctl.c mptctl_eventquery (MPT_ADAPTER *ioc, unsigned long arg) ioc 1541 drivers/message/fusion/mptctl.c dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mptctl_eventquery called.\n", ioc 1542 drivers/message/fusion/mptctl.c ioc->name)); ioc 1544 drivers/message/fusion/mptctl.c karg.eventTypes = ioc->eventTypes; ioc 1551 drivers/message/fusion/mptctl.c ioc->name, __FILE__, __LINE__, uarg); ioc 1559 drivers/message/fusion/mptctl.c mptctl_eventenable (MPT_ADAPTER *ioc, unsigned long arg) ioc 1571 drivers/message/fusion/mptctl.c dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mptctl_eventenable called.\n", ioc 1572 drivers/message/fusion/mptctl.c ioc->name)); ioc 1573 drivers/message/fusion/mptctl.c if (ioc->events == NULL) { ioc 1577 drivers/message/fusion/mptctl.c ioc->events = kzalloc(sz, GFP_KERNEL); ioc 1578 drivers/message/fusion/mptctl.c if (!ioc->events) { ioc 1581 drivers/message/fusion/mptctl.c ioc->name); ioc 1584 drivers/message/fusion/mptctl.c ioc->alloc_total += sz; ioc 1586 drivers/message/fusion/mptctl.c ioc->eventContext = 0; ioc 1591 drivers/message/fusion/mptctl.c ioc->eventTypes = karg.eventTypes; ioc 1598 drivers/message/fusion/mptctl.c mptctl_eventreport (MPT_ADAPTER *ioc, unsigned long arg) ioc 1611 drivers/message/fusion/mptctl.c dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mptctl_eventreport called.\n", ioc 1612 drivers/message/fusion/mptctl.c ioc->name)); ioc 1623 drivers/message/fusion/mptctl.c if ((max < 1) || !ioc->events) ioc 1627 drivers/message/fusion/mptctl.c ioc->aen_event_read_flag=0; ioc 1632 drivers/message/fusion/mptctl.c if (copy_to_user(uarg->eventData, ioc->events, numBytes)) { ioc 1635 drivers/message/fusion/mptctl.c ioc->name, __FILE__, __LINE__, ioc->events); ioc 1644 drivers/message/fusion/mptctl.c mptctl_replace_fw (MPT_ADAPTER *ioc, unsigned long arg) ioc 1657 drivers/message/fusion/mptctl.c dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mptctl_replace_fw called.\n", ioc 1658 drivers/message/fusion/mptctl.c ioc->name)); ioc 1661 drivers/message/fusion/mptctl.c if (ioc->cached_fw == NULL) ioc 1664 drivers/message/fusion/mptctl.c mpt_free_fw_memory(ioc); ioc 1670 drivers/message/fusion/mptctl.c mpt_alloc_fw_memory(ioc, newFwSize); ioc 1671 drivers/message/fusion/mptctl.c if (ioc->cached_fw == NULL) ioc 1676 drivers/message/fusion/mptctl.c if (copy_from_user(ioc->cached_fw, uarg->newImage, newFwSize)) { ioc 1679 drivers/message/fusion/mptctl.c "@ %p\n", ioc->name, __FILE__, __LINE__, uarg); ioc 1680 drivers/message/fusion/mptctl.c mpt_free_fw_memory(ioc); ioc 1686 drivers/message/fusion/mptctl.c ioc->facts.FWImageSize = newFwSize; ioc 1703 drivers/message/fusion/mptctl.c mptctl_mpt_command (MPT_ADAPTER *ioc, unsigned long arg) ioc 1717 drivers/message/fusion/mptctl.c rc = mptctl_do_mpt_command (ioc, karg, &uarg->MF); ioc 1735 drivers/message/fusion/mptctl.c mptctl_do_mpt_command (MPT_ADAPTER *ioc, struct mpt_ioctl_command karg, void __user *mfPtr) ioc 1760 drivers/message/fusion/mptctl.c spin_lock_irqsave(&ioc->taskmgmt_lock, flags); ioc 1761 drivers/message/fusion/mptctl.c if (ioc->ioc_reset_in_progress) { ioc 1762 drivers/message/fusion/mptctl.c spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags); ioc 1767 drivers/message/fusion/mptctl.c spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags); ioc 1775 drivers/message/fusion/mptctl.c karg.dataSgeOffset > ioc->req_sz / 4) ioc 1782 drivers/message/fusion/mptctl.c sz += ioc->SGE_size; ioc 1784 drivers/message/fusion/mptctl.c sz += ioc->SGE_size; ioc 1786 drivers/message/fusion/mptctl.c if (sz > ioc->req_sz) { ioc 1789 drivers/message/fusion/mptctl.c ioc->name, __FILE__, __LINE__, sz, ioc->req_sz); ioc 1795 drivers/message/fusion/mptctl.c if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) ioc 1809 drivers/message/fusion/mptctl.c ioc->name, __FILE__, __LINE__, mfPtr); ioc 1820 drivers/message/fusion/mptctl.c dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "sending mpi function (0x%02X), req=%p\n", ioc 1821 drivers/message/fusion/mptctl.c ioc->name, hdr->Function, mf)); ioc 1833 drivers/message/fusion/mptctl.c dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "\ttype=0x%02x ext_type=0x%02x " ioc 1834 drivers/message/fusion/mptctl.c "number=0x%02x action=0x%02x\n", ioc->name, ioc 1853 drivers/message/fusion/mptctl.c if (ioc->sh) { ioc 1860 drivers/message/fusion/mptctl.c id = (ioc->devices_per_bus == 0) ? 256 : ioc->devices_per_bus; ioc 1864 drivers/message/fusion/mptctl.c ioc->name, __FILE__, __LINE__); ioc 1869 drivers/message/fusion/mptctl.c if (pScsiReq->Bus >= ioc->number_of_buses) { ioc 1872 drivers/message/fusion/mptctl.c ioc->name, __FILE__, __LINE__); ioc 1878 drivers/message/fusion/mptctl.c pScsiReq->MsgFlags |= mpt_msg_flags(ioc); ioc 1893 drivers/message/fusion/mptctl.c cpu_to_le32(ioc->sense_buf_low_dma ioc 1896 drivers/message/fusion/mptctl.c shost_for_each_device(sdev, ioc->sh) { ioc 1927 drivers/message/fusion/mptctl.c ioc->name, __FILE__, __LINE__); ioc 1943 drivers/message/fusion/mptctl.c if (!ioc->sh) { ioc 1946 drivers/message/fusion/mptctl.c ioc->name, __FILE__, __LINE__); ioc 1958 drivers/message/fusion/mptctl.c if (ioc->sh) { ioc 1965 drivers/message/fusion/mptctl.c pScsiReq->MsgFlags |= mpt_msg_flags(ioc); ioc 1980 drivers/message/fusion/mptctl.c cpu_to_le32(ioc->sense_buf_low_dma ioc 2003 drivers/message/fusion/mptctl.c ioc->name, __FILE__, __LINE__); ioc 2013 drivers/message/fusion/mptctl.c dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 2016 drivers/message/fusion/mptctl.c ioc->name, pScsiTm->TaskType, le32_to_cpu ioc 2031 drivers/message/fusion/mptctl.c high_addr = cpu_to_le32((u32)((u64)ioc->req_frames_dma >> 32)); ioc 2032 drivers/message/fusion/mptctl.c sense_high= cpu_to_le32((u32)((u64)ioc->sense_buf_pool_dma >> 32)); ioc 2038 drivers/message/fusion/mptctl.c if ((pInit->Flags != 0) || (pInit->MaxDevices != ioc->facts.MaxDevices) || ioc 2039 drivers/message/fusion/mptctl.c (pInit->MaxBuses != ioc->facts.MaxBuses) || ioc 2040 drivers/message/fusion/mptctl.c (pInit->ReplyFrameSize != cpu_to_le16(ioc->reply_sz)) || ioc 2045 drivers/message/fusion/mptctl.c ioc->name, __FILE__, __LINE__); ioc 2078 drivers/message/fusion/mptctl.c ioc->name, __FILE__, __LINE__, hdr->Function); ioc 2112 drivers/message/fusion/mptctl.c ioc->pcidev, bufOut.len, &dma_addr_out); ioc 2121 drivers/message/fusion/mptctl.c ioc->add_sge(psge, flagsLength, dma_addr_out); ioc 2122 drivers/message/fusion/mptctl.c psge += ioc->SGE_size; ioc 2133 drivers/message/fusion/mptctl.c ioc->name, __FILE__, __LINE__,karg.dataOutBufPtr); ioc 2145 drivers/message/fusion/mptctl.c bufIn.kptr = pci_alloc_consistent(ioc->pcidev, ioc 2155 drivers/message/fusion/mptctl.c ioc->add_sge(psge, flagsLength, dma_addr_in); ioc 2161 drivers/message/fusion/mptctl.c ioc->add_sge(psge, flagsLength, (dma_addr_t) -1); ioc 2164 drivers/message/fusion/mptctl.c SET_MGMT_MSG_CONTEXT(ioc->ioctl_cmds.msg_context, hdr->MsgContext); ioc 2165 drivers/message/fusion/mptctl.c INITIALIZE_MGMT_STATUS(ioc->ioctl_cmds.status) ioc 2168 drivers/message/fusion/mptctl.c mutex_lock(&ioc->taskmgmt_cmds.mutex); ioc 2169 drivers/message/fusion/mptctl.c if (mpt_set_taskmgmt_in_progress_flag(ioc) != 0) { ioc 2170 drivers/message/fusion/mptctl.c mutex_unlock(&ioc->taskmgmt_cmds.mutex); ioc 2174 drivers/message/fusion/mptctl.c DBG_DUMP_TM_REQUEST_FRAME(ioc, (u32 *)mf); ioc 2176 drivers/message/fusion/mptctl.c if ((ioc->facts.IOCCapabilities & MPI_IOCFACTS_CAPABILITY_HIGH_PRI_Q) && ioc 2177 drivers/message/fusion/mptctl.c (ioc->facts.MsgVersion >= MPI_VERSION_01_05)) ioc 2178 drivers/message/fusion/mptctl.c mpt_put_msg_frame_hi_pri(mptctl_id, ioc, mf); ioc 2180 drivers/message/fusion/mptctl.c rc =mpt_send_handshake_request(mptctl_id, ioc, ioc 2183 drivers/message/fusion/mptctl.c dfailprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 2185 drivers/message/fusion/mptctl.c ioc->name, ioc, mf)); ioc 2186 drivers/message/fusion/mptctl.c mpt_clear_taskmgmt_in_progress_flag(ioc); ioc 2188 drivers/message/fusion/mptctl.c mutex_unlock(&ioc->taskmgmt_cmds.mutex); ioc 2194 drivers/message/fusion/mptctl.c mpt_put_msg_frame(mptctl_id, ioc, mf); ioc 2199 drivers/message/fusion/mptctl.c timeleft = wait_for_completion_timeout(&ioc->ioctl_cmds.done, ioc 2201 drivers/message/fusion/mptctl.c if (!(ioc->ioctl_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) { ioc 2203 drivers/message/fusion/mptctl.c dfailprintk(ioc, printk(MYIOC_s_ERR_FMT "%s: TIMED OUT!\n", ioc 2204 drivers/message/fusion/mptctl.c ioc->name, __func__)); ioc 2205 drivers/message/fusion/mptctl.c if (ioc->ioctl_cmds.status & MPT_MGMT_STATUS_DID_IOCRESET) { ioc 2207 drivers/message/fusion/mptctl.c mutex_unlock(&ioc->taskmgmt_cmds.mutex); ioc 2214 drivers/message/fusion/mptctl.c ioc->name, mpt_GetIocState(ioc, 0), function); ioc 2216 drivers/message/fusion/mptctl.c mutex_unlock(&ioc->taskmgmt_cmds.mutex); ioc 2217 drivers/message/fusion/mptctl.c mptctl_timeout_expired(ioc, mf); ioc 2225 drivers/message/fusion/mptctl.c mutex_unlock(&ioc->taskmgmt_cmds.mutex); ioc 2233 drivers/message/fusion/mptctl.c if (ioc->ioctl_cmds.status & MPT_MGMT_STATUS_RF_VALID) { ioc 2234 drivers/message/fusion/mptctl.c if (karg.maxReplyBytes < ioc->reply_sz) { ioc 2236 drivers/message/fusion/mptctl.c 4*ioc->ioctl_cmds.reply[2]); ioc 2238 drivers/message/fusion/mptctl.c sz = min(ioc->reply_sz, 4*ioc->ioctl_cmds.reply[2]); ioc 2242 drivers/message/fusion/mptctl.c ioc->ioctl_cmds.reply, sz)){ ioc 2246 drivers/message/fusion/mptctl.c ioc->name, __FILE__, __LINE__, karg.replyFrameBufPtr); ioc 2255 drivers/message/fusion/mptctl.c if (ioc->ioctl_cmds.status & MPT_MGMT_STATUS_SENSE_VALID) { ioc 2259 drivers/message/fusion/mptctl.c ioc->ioctl_cmds.sense, sz)) { ioc 2262 drivers/message/fusion/mptctl.c ioc->name, __FILE__, __LINE__, ioc 2273 drivers/message/fusion/mptctl.c if ((ioc->ioctl_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD) && ioc 2280 drivers/message/fusion/mptctl.c ioc->name, __FILE__, __LINE__, ioc 2288 drivers/message/fusion/mptctl.c CLEAR_MGMT_STATUS(ioc->ioctl_cmds.status) ioc 2289 drivers/message/fusion/mptctl.c SET_MGMT_MSG_CONTEXT(ioc->ioctl_cmds.msg_context, 0); ioc 2294 drivers/message/fusion/mptctl.c pci_free_consistent(ioc->pcidev, ioc 2299 drivers/message/fusion/mptctl.c pci_free_consistent(ioc->pcidev, ioc 2307 drivers/message/fusion/mptctl.c mpt_free_msg_frame(ioc, mf); ioc 2324 drivers/message/fusion/mptctl.c mptctl_hp_hostinfo(MPT_ADAPTER *ioc, unsigned long arg, unsigned int data_size) ioc 2356 drivers/message/fusion/mptctl.c dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT ": mptctl_hp_hostinfo called.\n", ioc 2357 drivers/message/fusion/mptctl.c ioc->name)); ioc 2362 drivers/message/fusion/mptctl.c pdev = (struct pci_dev *) ioc->pcidev; ioc 2374 drivers/message/fusion/mptctl.c if (ioc->sh != NULL) ioc 2375 drivers/message/fusion/mptctl.c karg.host_no = ioc->sh->host_no; ioc 2382 drivers/message/fusion/mptctl.c ioc->facts.FWVersion.Struct.Major, ioc 2383 drivers/message/fusion/mptctl.c ioc->facts.FWVersion.Struct.Minor, ioc 2384 drivers/message/fusion/mptctl.c ioc->facts.FWVersion.Struct.Unit, ioc 2385 drivers/message/fusion/mptctl.c ioc->facts.FWVersion.Struct.Dev); ioc 2401 drivers/message/fusion/mptctl.c if (mpt_config(ioc, &cfg) == 0) { ioc 2406 drivers/message/fusion/mptctl.c pbuf = pci_alloc_consistent(ioc->pcidev, hdr.PageLength * 4, &buf_dma); ioc 2409 drivers/message/fusion/mptctl.c if (mpt_config(ioc, &cfg) == 0) { ioc 2416 drivers/message/fusion/mptctl.c pci_free_consistent(ioc->pcidev, hdr.PageLength * 4, pbuf, buf_dma); ioc 2421 drivers/message/fusion/mptctl.c rc = mpt_GetIocState(ioc, 1); ioc 2440 drivers/message/fusion/mptctl.c if ((ioc->bus_type == SAS) || (ioc->bus_type == FC)) ioc 2448 drivers/message/fusion/mptctl.c if (ioc->sh != NULL) { ioc 2449 drivers/message/fusion/mptctl.c MPT_SCSI_HOST *hd = shost_priv(ioc->sh); ioc 2452 drivers/message/fusion/mptctl.c karg.hard_resets = ioc->hard_resets; ioc 2453 drivers/message/fusion/mptctl.c karg.soft_resets = ioc->soft_resets; ioc 2454 drivers/message/fusion/mptctl.c karg.timeouts = ioc->timeouts; ioc 2461 drivers/message/fusion/mptctl.c if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) { ioc 2462 drivers/message/fusion/mptctl.c dfailprintk(ioc, printk(MYIOC_s_WARN_FMT ioc 2463 drivers/message/fusion/mptctl.c "%s, no msg frames!!\n", ioc->name, __func__)); ioc 2481 drivers/message/fusion/mptctl.c pbuf = pci_alloc_consistent(ioc->pcidev, 4, &buf_dma); ioc 2484 drivers/message/fusion/mptctl.c ioc->add_sge((char *)&IstwiRWRequest->SGL, ioc 2488 drivers/message/fusion/mptctl.c SET_MGMT_MSG_CONTEXT(ioc->ioctl_cmds.msg_context, ioc 2490 drivers/message/fusion/mptctl.c INITIALIZE_MGMT_STATUS(ioc->ioctl_cmds.status) ioc 2491 drivers/message/fusion/mptctl.c mpt_put_msg_frame(mptctl_id, ioc, mf); ioc 2494 drivers/message/fusion/mptctl.c timeleft = wait_for_completion_timeout(&ioc->ioctl_cmds.done, ioc 2496 drivers/message/fusion/mptctl.c if (!(ioc->ioctl_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) { ioc 2498 drivers/message/fusion/mptctl.c printk(MYIOC_s_WARN_FMT "%s: failed\n", ioc->name, __func__); ioc 2499 drivers/message/fusion/mptctl.c if (ioc->ioctl_cmds.status & MPT_MGMT_STATUS_DID_IOCRESET) { ioc 2500 drivers/message/fusion/mptctl.c mpt_free_msg_frame(ioc, mf); ioc 2506 drivers/message/fusion/mptctl.c ioc->name, mpt_GetIocState(ioc, 0)); ioc 2507 drivers/message/fusion/mptctl.c mptctl_timeout_expired(ioc, mf); ioc 2522 drivers/message/fusion/mptctl.c if (ioc->ioctl_cmds.status & MPT_MGMT_STATUS_RF_VALID) ioc 2526 drivers/message/fusion/mptctl.c CLEAR_MGMT_STATUS(ioc->ioctl_cmds.status) ioc 2527 drivers/message/fusion/mptctl.c SET_MGMT_MSG_CONTEXT(ioc->ioctl_cmds.msg_context, 0); ioc 2530 drivers/message/fusion/mptctl.c pci_free_consistent(ioc->pcidev, 4, pbuf, buf_dma); ioc 2537 drivers/message/fusion/mptctl.c ioc->name, __FILE__, __LINE__, uarg); ioc 2557 drivers/message/fusion/mptctl.c mptctl_hp_targetinfo(MPT_ADAPTER *ioc, unsigned long arg) ioc 2579 drivers/message/fusion/mptctl.c dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mptctl_hp_targetinfo called.\n", ioc 2580 drivers/message/fusion/mptctl.c ioc->name)); ioc 2584 drivers/message/fusion/mptctl.c if ((ioc->bus_type == SAS) || (ioc->bus_type == FC)) ioc 2587 drivers/message/fusion/mptctl.c if ((ioc->spi_data.sdp0length == 0) || (ioc->sh == NULL)) ioc 2590 drivers/message/fusion/mptctl.c if (ioc->sh->host_no != karg.hdr.host) ioc 2595 drivers/message/fusion/mptctl.c data_sz = ioc->spi_data.sdp0length * 4; ioc 2596 drivers/message/fusion/mptctl.c pg0_alloc = (SCSIDevicePage0_t *) pci_alloc_consistent(ioc->pcidev, data_sz, &page_dma); ioc 2598 drivers/message/fusion/mptctl.c hdr.PageVersion = ioc->spi_data.sdp0version; ioc 2611 drivers/message/fusion/mptctl.c if ((rc = mpt_config(ioc, &cfg)) == 0) { ioc 2634 drivers/message/fusion/mptctl.c pci_free_consistent(ioc->pcidev, data_sz, (u8 *) pg0_alloc, page_dma); ioc 2656 drivers/message/fusion/mptctl.c if ((mpt_config(ioc, &cfg) == 0) && (cfg.cfghdr.hdr->PageLength > 0)) { ioc 2661 drivers/message/fusion/mptctl.c ioc->pcidev, data_sz, &page_dma); ioc 2665 drivers/message/fusion/mptctl.c if ((rc = mpt_config(ioc, &cfg)) == 0) { ioc 2670 drivers/message/fusion/mptctl.c pci_free_consistent(ioc->pcidev, data_sz, (u8 *) pg3_alloc, page_dma); ioc 2673 drivers/message/fusion/mptctl.c hd = shost_priv(ioc->sh); ioc 2682 drivers/message/fusion/mptctl.c ioc->name, __FILE__, __LINE__, uarg); ioc 2852 drivers/message/fusion/mptctl.c MPT_ADAPTER *ioc = pci_get_drvdata(pdev); ioc 2854 drivers/message/fusion/mptctl.c mutex_init(&ioc->ioctl_cmds.mutex); ioc 2855 drivers/message/fusion/mptctl.c init_completion(&ioc->ioctl_cmds.done); ioc 149 drivers/message/fusion/mptdebug.h DBG_DUMP_FW_DOWNLOAD(MPT_ADAPTER *ioc, u32 *mfp, int numfrags) ioc 153 drivers/message/fusion/mptdebug.h if (!(ioc->debug_level & MPT_DEBUG)) ioc 162 drivers/message/fusion/mptdebug.h DBG_DUMP_PUT_MSG_FRAME(MPT_ADAPTER *ioc, u32 *mfp) ioc 166 drivers/message/fusion/mptdebug.h if (!(ioc->debug_level & MPT_DEBUG_MSG_FRAME)) ioc 169 drivers/message/fusion/mptdebug.h ioc->name, mfp); ioc 170 drivers/message/fusion/mptdebug.h n = ioc->req_sz/4 - 1; ioc 182 drivers/message/fusion/mptdebug.h DBG_DUMP_FW_REQUEST_FRAME(MPT_ADAPTER *ioc, u32 *mfp) ioc 186 drivers/message/fusion/mptdebug.h if (!(ioc->debug_level & MPT_DEBUG_MSG_FRAME)) ioc 196 drivers/message/fusion/mptdebug.h DBG_DUMP_REQUEST_FRAME(MPT_ADAPTER *ioc, u32 *mfp) ioc 200 drivers/message/fusion/mptdebug.h if (!(ioc->debug_level & MPT_DEBUG_MSG_FRAME)) ioc 212 drivers/message/fusion/mptdebug.h DBG_DUMP_REPLY_FRAME(MPT_ADAPTER *ioc, u32 *mfp) ioc 216 drivers/message/fusion/mptdebug.h if (!(ioc->debug_level & MPT_DEBUG_MSG_FRAME)) ioc 226 drivers/message/fusion/mptdebug.h DBG_DUMP_REQUEST_FRAME_HDR(MPT_ADAPTER *ioc, u32 *mfp) ioc 230 drivers/message/fusion/mptdebug.h if (!(ioc->debug_level & MPT_DEBUG_MSG_FRAME)) ioc 240 drivers/message/fusion/mptdebug.h DBG_DUMP_TM_REQUEST_FRAME(MPT_ADAPTER *ioc, u32 *mfp) ioc 244 drivers/message/fusion/mptdebug.h if (!(ioc->debug_level & MPT_DEBUG_TM)) ioc 257 drivers/message/fusion/mptdebug.h DBG_DUMP_TM_REPLY_FRAME(MPT_ADAPTER *ioc, u32 *mfp) ioc 261 drivers/message/fusion/mptdebug.h if (!(ioc->debug_level & MPT_DEBUG_TM)) ioc 196 drivers/message/fusion/mptfc.c MPT_ADAPTER *ioc; ioc 200 drivers/message/fusion/mptfc.c ioc = hd->ioc; ioc 203 drivers/message/fusion/mptfc.c || (loops > 0 && ioc->active == 0)) { ioc 205 drivers/message/fusion/mptfc.c dfcprintk (ioc, printk(MYIOC_s_DEBUG_FMT ioc 208 drivers/message/fusion/mptfc.c ioc->name, ioc->sh->host_no, ioc 210 drivers/message/fusion/mptfc.c ready, ioc->active, caller)); ioc 218 drivers/message/fusion/mptfc.c || ioc->active == 0) { ioc 219 drivers/message/fusion/mptfc.c dfcprintk (ioc, printk(MYIOC_s_DEBUG_FMT ioc 222 drivers/message/fusion/mptfc.c ioc->name, ioc->sh->host_no, ioc 224 drivers/message/fusion/mptfc.c ioc->active, SCpnt->device->hostdata)); ioc 227 drivers/message/fusion/mptfc.c dfcprintk (ioc, printk(MYIOC_s_DEBUG_FMT ioc 229 drivers/message/fusion/mptfc.c ioc->name, ioc->sh->host_no, ioc 283 drivers/message/fusion/mptfc.c mptfc_GetFcDevPage0(MPT_ADAPTER *ioc, int ioc_port, ioc 284 drivers/message/fusion/mptfc.c void(*func)(MPT_ADAPTER *ioc,int channel, FCDevicePage0_t *arg)) ioc 299 drivers/message/fusion/mptfc.c int max_bus = ioc->facts.MaxBuses; ioc 302 drivers/message/fusion/mptfc.c max_targ = (ioc->facts.MaxDevices == 0) ? 256 : ioc->facts.MaxDevices; ioc 327 drivers/message/fusion/mptfc.c if ((rc = mpt_config(ioc, &cfg)) != 0) ioc 334 drivers/message/fusion/mptfc.c ppage0_alloc = pci_alloc_consistent(ioc->pcidev, data_sz, ioc 343 drivers/message/fusion/mptfc.c if ((rc = mpt_config(ioc, &cfg)) == 0) { ioc 370 drivers/message/fusion/mptfc.c pci_free_consistent(ioc->pcidev, data_sz, ioc 385 drivers/message/fusion/mptfc.c func(ioc, ioc_port, fc); ioc 422 drivers/message/fusion/mptfc.c mptfc_register_dev(MPT_ADAPTER *ioc, int channel, FCDevicePage0_t *pg0) ioc 440 drivers/message/fusion/mptfc.c list_for_each_entry(ri, &ioc->fc_rports, list) { ioc 443 drivers/message/fusion/mptfc.c list_move_tail(&ri->list, &ioc->fc_rports); ioc 452 drivers/message/fusion/mptfc.c list_add_tail(&ri->list, &ioc->fc_rports); ioc 461 drivers/message/fusion/mptfc.c rport = fc_remote_port_add(ioc->sh, channel, &rport_ids); ioc 485 drivers/message/fusion/mptfc.c dfcprintk (ioc, printk(MYIOC_s_DEBUG_FMT ioc 488 drivers/message/fusion/mptfc.c ioc->name, ioc 489 drivers/message/fusion/mptfc.c ioc->sh->host_no, ioc 568 drivers/message/fusion/mptfc.c mptfc_dump_lun_info(MPT_ADAPTER *ioc, struct fc_rport *rport, struct scsi_device *sdev, ioc 577 drivers/message/fusion/mptfc.c dfcprintk (ioc, printk(MYIOC_s_DEBUG_FMT ioc 580 drivers/message/fusion/mptfc.c ioc->name, ioc 604 drivers/message/fusion/mptfc.c MPT_ADAPTER *ioc; ioc 613 drivers/message/fusion/mptfc.c ioc = hd->ioc; ioc 618 drivers/message/fusion/mptfc.c ioc->name, sizeof(VirtDevice)); ioc 627 drivers/message/fusion/mptfc.c vtarget->ioc_id = ioc->id; ioc 637 drivers/message/fusion/mptfc.c mptfc_dump_lun_info(ioc, rport, sdev, vtarget); ioc 682 drivers/message/fusion/mptfc.c mptfc_display_port_link_speed(MPT_ADAPTER *ioc, int portnum, FCPortPage0_t *pp0dest) ioc 690 drivers/message/fusion/mptfc.c old_speed = ioc->fc_link_speed[portnum]; ioc 708 drivers/message/fusion/mptfc.c ioc->name, new); ioc 712 drivers/message/fusion/mptfc.c ioc->name, old, new); ioc 714 drivers/message/fusion/mptfc.c ioc->fc_link_speed[portnum] = new_speed; ioc 731 drivers/message/fusion/mptfc.c mptfc_GetFcPortPage0(MPT_ADAPTER *ioc, int portnum) ioc 758 drivers/message/fusion/mptfc.c if ((rc = mpt_config(ioc, &cfg)) != 0) ioc 766 drivers/message/fusion/mptfc.c ppage0_alloc = (FCPortPage0_t *) pci_alloc_consistent(ioc->pcidev, data_sz, &page0_dma); ioc 774 drivers/message/fusion/mptfc.c if ((rc = mpt_config(ioc, &cfg)) == 0) { ioc 776 drivers/message/fusion/mptfc.c pp0dest = &ioc->fc_port_page0[portnum]; ioc 815 drivers/message/fusion/mptfc.c ioc->name); ioc 817 drivers/message/fusion/mptfc.c mptfc_display_port_link_speed(ioc, portnum, pp0dest); ioc 820 drivers/message/fusion/mptfc.c pci_free_consistent(ioc->pcidev, data_sz, (u8 *) ppage0_alloc, page0_dma); ioc 827 drivers/message/fusion/mptfc.c mptfc_WriteFcPortPage1(MPT_ADAPTER *ioc, int portnum) ioc 836 drivers/message/fusion/mptfc.c if (!(ioc->fc_data.fc_port_page1[portnum].data)) ioc 851 drivers/message/fusion/mptfc.c if ((rc = mpt_config(ioc, &cfg)) != 0) ioc 857 drivers/message/fusion/mptfc.c if (hdr.PageLength*4 != ioc->fc_data.fc_port_page1[portnum].pg_sz) ioc 860 drivers/message/fusion/mptfc.c cfg.physAddr = ioc->fc_data.fc_port_page1[portnum].dma; ioc 864 drivers/message/fusion/mptfc.c rc = mpt_config(ioc, &cfg); ioc 870 drivers/message/fusion/mptfc.c mptfc_GetFcPortPage1(MPT_ADAPTER *ioc, int portnum) ioc 894 drivers/message/fusion/mptfc.c if ((rc = mpt_config(ioc, &cfg)) != 0) ioc 902 drivers/message/fusion/mptfc.c if (ioc->fc_data.fc_port_page1[portnum].data == NULL) { ioc 907 drivers/message/fusion/mptfc.c page1_alloc = (FCPortPage1_t *) pci_alloc_consistent(ioc->pcidev, ioc 914 drivers/message/fusion/mptfc.c page1_alloc = ioc->fc_data.fc_port_page1[portnum].data; ioc 915 drivers/message/fusion/mptfc.c page1_dma = ioc->fc_data.fc_port_page1[portnum].dma; ioc 916 drivers/message/fusion/mptfc.c data_sz = ioc->fc_data.fc_port_page1[portnum].pg_sz; ioc 918 drivers/message/fusion/mptfc.c ioc->fc_data.fc_port_page1[portnum].data = NULL; ioc 919 drivers/message/fusion/mptfc.c pci_free_consistent(ioc->pcidev, data_sz, (u8 *) ioc 930 drivers/message/fusion/mptfc.c if ((rc = mpt_config(ioc, &cfg)) == 0) { ioc 931 drivers/message/fusion/mptfc.c ioc->fc_data.fc_port_page1[portnum].data = page1_alloc; ioc 932 drivers/message/fusion/mptfc.c ioc->fc_data.fc_port_page1[portnum].pg_sz = data_sz; ioc 933 drivers/message/fusion/mptfc.c ioc->fc_data.fc_port_page1[portnum].dma = page1_dma; ioc 936 drivers/message/fusion/mptfc.c ioc->fc_data.fc_port_page1[portnum].data = NULL; ioc 937 drivers/message/fusion/mptfc.c pci_free_consistent(ioc->pcidev, data_sz, (u8 *) ioc 945 drivers/message/fusion/mptfc.c mptfc_SetFcPortPage1_defaults(MPT_ADAPTER *ioc) ioc 955 drivers/message/fusion/mptfc.c for (ii=0; ii<ioc->facts.NumberOfPorts; ii++) { ioc 956 drivers/message/fusion/mptfc.c if (mptfc_GetFcPortPage1(ioc, ii) != 0) ioc 958 drivers/message/fusion/mptfc.c pp1 = ioc->fc_data.fc_port_page1[ii].data; ioc 968 drivers/message/fusion/mptfc.c mptfc_WriteFcPortPage1(ioc, ii); ioc 974 drivers/message/fusion/mptfc.c mptfc_init_host_attr(MPT_ADAPTER *ioc,int portnum) ioc 989 drivers/message/fusion/mptfc.c pp0 = &ioc->fc_port_page0[portnum]; ioc 990 drivers/message/fusion/mptfc.c sh = ioc->sh; ioc 994 drivers/message/fusion/mptfc.c ioc->prod_name, ioc 996 drivers/message/fusion/mptfc.c ioc->facts.FWVersion.Word); ioc 1070 drivers/message/fusion/mptfc.c MPT_ADAPTER *ioc = ioc 1074 drivers/message/fusion/mptfc.c for (ii=0; ii < ioc->facts.NumberOfPorts; ii++) ioc 1075 drivers/message/fusion/mptfc.c (void) mptfc_GetFcPortPage0(ioc, ii); ioc 1082 drivers/message/fusion/mptfc.c MPT_ADAPTER *ioc = ioc 1090 drivers/message/fusion/mptfc.c list_for_each_entry(ri, &ioc->fc_rports, list) { ioc 1104 drivers/message/fusion/mptfc.c dfcprintk (ioc, printk(MYIOC_s_DEBUG_FMT ioc 1106 drivers/message/fusion/mptfc.c ioc->name, ioc 1107 drivers/message/fusion/mptfc.c ioc->sh->host_no, ioc 1116 drivers/message/fusion/mptfc.c MPT_ADAPTER *ioc = ioc 1125 drivers/message/fusion/mptfc.c list_for_each_entry(ri, &ioc->fc_rports, list) { ioc 1135 drivers/message/fusion/mptfc.c for (ii=0; ii < ioc->facts.NumberOfPorts; ii++) { ioc 1136 drivers/message/fusion/mptfc.c (void) mptfc_GetFcPortPage0(ioc, ii); ioc 1137 drivers/message/fusion/mptfc.c mptfc_init_host_attr(ioc, ii); /* refresh */ ioc 1138 drivers/message/fusion/mptfc.c mptfc_GetFcDevPage0(ioc, ii, mptfc_register_dev); ioc 1142 drivers/message/fusion/mptfc.c list_for_each_entry(ri, &ioc->fc_rports, list) { ioc 1159 drivers/message/fusion/mptfc.c dfcprintk (ioc, printk(MYIOC_s_DEBUG_FMT ioc 1161 drivers/message/fusion/mptfc.c ioc->name, ioc 1162 drivers/message/fusion/mptfc.c ioc->sh->host_no, ioc 1173 drivers/message/fusion/mptfc.c MPT_ADAPTER *ioc; ioc 1185 drivers/message/fusion/mptfc.c ioc = pci_get_drvdata(pdev); ioc 1186 drivers/message/fusion/mptfc.c ioc->DoneCtx = mptfcDoneCtx; ioc 1187 drivers/message/fusion/mptfc.c ioc->TaskCtx = mptfcTaskCtx; ioc 1188 drivers/message/fusion/mptfc.c ioc->InternalCtx = mptfcInternalCtx; ioc 1192 drivers/message/fusion/mptfc.c if (ioc->last_state != MPI_IOC_STATE_OPERATIONAL) { ioc 1195 drivers/message/fusion/mptfc.c ioc->name); ioc 1200 drivers/message/fusion/mptfc.c if (!ioc->active) { ioc 1202 drivers/message/fusion/mptfc.c ioc->name); ioc 1210 drivers/message/fusion/mptfc.c for (ii=0; ii < ioc->facts.NumberOfPorts; ii++) { ioc 1211 drivers/message/fusion/mptfc.c if (ioc->pfacts[ii].ProtocolFlags & ioc 1219 drivers/message/fusion/mptfc.c ioc->name, ioc); ioc 1228 drivers/message/fusion/mptfc.c ioc->name); ioc 1233 drivers/message/fusion/mptfc.c spin_lock_init(&ioc->fc_rescan_work_lock); ioc 1234 drivers/message/fusion/mptfc.c INIT_WORK(&ioc->fc_rescan_work, mptfc_rescan_devices); ioc 1235 drivers/message/fusion/mptfc.c INIT_WORK(&ioc->fc_setup_reset_work, mptfc_setup_reset); ioc 1236 drivers/message/fusion/mptfc.c INIT_WORK(&ioc->fc_lsc_work, mptfc_link_status_change); ioc 1238 drivers/message/fusion/mptfc.c spin_lock_irqsave(&ioc->FreeQlock, flags); ioc 1242 drivers/message/fusion/mptfc.c ioc->sh = sh; ioc 1251 drivers/message/fusion/mptfc.c sh->max_id = ioc->pfacts->MaxDevices; ioc 1256 drivers/message/fusion/mptfc.c sh->unique_id = ioc->id; ioc 1267 drivers/message/fusion/mptfc.c scale = ioc->req_sz/ioc->SGE_size; ioc 1268 drivers/message/fusion/mptfc.c if (ioc->sg_addr_size == sizeof(u64)) { ioc 1270 drivers/message/fusion/mptfc.c (ioc->facts.MaxChainDepth-1) + scale + ioc 1271 drivers/message/fusion/mptfc.c (ioc->req_sz - 60) / ioc->SGE_size; ioc 1274 drivers/message/fusion/mptfc.c (ioc->facts.MaxChainDepth-1) + scale + ioc 1275 drivers/message/fusion/mptfc.c (ioc->req_sz - 64) / ioc->SGE_size; ioc 1280 drivers/message/fusion/mptfc.c dprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 1282 drivers/message/fusion/mptfc.c ioc->name, numSGE, sh->sg_tablesize)); ioc 1286 drivers/message/fusion/mptfc.c spin_unlock_irqrestore(&ioc->FreeQlock, flags); ioc 1289 drivers/message/fusion/mptfc.c hd->ioc = ioc; ioc 1294 drivers/message/fusion/mptfc.c ioc->ScsiLookup = kcalloc(ioc->req_depth, sizeof(void *), GFP_KERNEL); ioc 1295 drivers/message/fusion/mptfc.c if (!ioc->ScsiLookup) { ioc 1299 drivers/message/fusion/mptfc.c spin_lock_init(&ioc->scsi_lookup_lock); ioc 1301 drivers/message/fusion/mptfc.c dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "ScsiLookup @ %p\n", ioc 1302 drivers/message/fusion/mptfc.c ioc->name, ioc->ScsiLookup)); ioc 1307 drivers/message/fusion/mptfc.c error = scsi_add_host (sh, &ioc->pcidev->dev); ioc 1309 drivers/message/fusion/mptfc.c dprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 1310 drivers/message/fusion/mptfc.c "scsi_add_host failed\n", ioc->name)); ioc 1316 drivers/message/fusion/mptfc.c snprintf(ioc->fc_rescan_work_q_name, sizeof(ioc->fc_rescan_work_q_name), ioc 1318 drivers/message/fusion/mptfc.c ioc->fc_rescan_work_q = ioc 1319 drivers/message/fusion/mptfc.c alloc_ordered_workqueue(ioc->fc_rescan_work_q_name, ioc 1321 drivers/message/fusion/mptfc.c if (!ioc->fc_rescan_work_q) { ioc 1330 drivers/message/fusion/mptfc.c for (ii=0; ii < ioc->facts.NumberOfPorts; ii++) { ioc 1331 drivers/message/fusion/mptfc.c (void) mptfc_GetFcPortPage0(ioc, ii); ioc 1333 drivers/message/fusion/mptfc.c mptfc_SetFcPortPage1_defaults(ioc); ioc 1340 drivers/message/fusion/mptfc.c queue_work(ioc->fc_rescan_work_q, &ioc->fc_rescan_work); ioc 1341 drivers/message/fusion/mptfc.c flush_workqueue(ioc->fc_rescan_work_q); ioc 1367 drivers/message/fusion/mptfc.c mptfc_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply) ioc 1374 drivers/message/fusion/mptfc.c if (ioc->bus_type != FC) ioc 1377 drivers/message/fusion/mptfc.c devtverboseprintk(ioc, printk(MYIOC_s_DEBUG_FMT "MPT event (=%02Xh) routed to SCSI host driver!\n", ioc 1378 drivers/message/fusion/mptfc.c ioc->name, event)); ioc 1380 drivers/message/fusion/mptfc.c if (ioc->sh == NULL || ioc 1381 drivers/message/fusion/mptfc.c ((hd = shost_priv(ioc->sh)) == NULL)) ioc 1386 drivers/message/fusion/mptfc.c spin_lock_irqsave(&ioc->fc_rescan_work_lock, flags); ioc 1387 drivers/message/fusion/mptfc.c if (ioc->fc_rescan_work_q) { ioc 1388 drivers/message/fusion/mptfc.c queue_work(ioc->fc_rescan_work_q, ioc 1389 drivers/message/fusion/mptfc.c &ioc->fc_rescan_work); ioc 1391 drivers/message/fusion/mptfc.c spin_unlock_irqrestore(&ioc->fc_rescan_work_lock, flags); ioc 1394 drivers/message/fusion/mptfc.c spin_lock_irqsave(&ioc->fc_rescan_work_lock, flags); ioc 1395 drivers/message/fusion/mptfc.c if (ioc->fc_rescan_work_q) { ioc 1396 drivers/message/fusion/mptfc.c queue_work(ioc->fc_rescan_work_q, ioc 1397 drivers/message/fusion/mptfc.c &ioc->fc_lsc_work); ioc 1399 drivers/message/fusion/mptfc.c spin_unlock_irqrestore(&ioc->fc_rescan_work_lock, flags); ioc 1402 drivers/message/fusion/mptfc.c rc = mptscsih_event_process(ioc,pEvReply); ioc 1409 drivers/message/fusion/mptfc.c mptfc_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) ioc 1414 drivers/message/fusion/mptfc.c rc = mptscsih_ioc_reset(ioc,reset_phase); ioc 1415 drivers/message/fusion/mptfc.c if ((ioc->bus_type != FC) || (!rc)) ioc 1419 drivers/message/fusion/mptfc.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 1420 drivers/message/fusion/mptfc.c ": IOC %s_reset routed to FC host driver!\n",ioc->name, ioc 1425 drivers/message/fusion/mptfc.c spin_lock_irqsave(&ioc->fc_rescan_work_lock, flags); ioc 1426 drivers/message/fusion/mptfc.c if (ioc->fc_rescan_work_q) { ioc 1427 drivers/message/fusion/mptfc.c queue_work(ioc->fc_rescan_work_q, ioc 1428 drivers/message/fusion/mptfc.c &ioc->fc_setup_reset_work); ioc 1430 drivers/message/fusion/mptfc.c spin_unlock_irqrestore(&ioc->fc_rescan_work_lock, flags); ioc 1437 drivers/message/fusion/mptfc.c mptfc_SetFcPortPage1_defaults(ioc); ioc 1438 drivers/message/fusion/mptfc.c spin_lock_irqsave(&ioc->fc_rescan_work_lock, flags); ioc 1439 drivers/message/fusion/mptfc.c if (ioc->fc_rescan_work_q) { ioc 1440 drivers/message/fusion/mptfc.c queue_work(ioc->fc_rescan_work_q, ioc 1441 drivers/message/fusion/mptfc.c &ioc->fc_rescan_work); ioc 1443 drivers/message/fusion/mptfc.c spin_unlock_irqrestore(&ioc->fc_rescan_work_lock, flags); ioc 1496 drivers/message/fusion/mptfc.c MPT_ADAPTER *ioc = pci_get_drvdata(pdev); ioc 1503 drivers/message/fusion/mptfc.c if ((work_q=ioc->fc_rescan_work_q)) { ioc 1504 drivers/message/fusion/mptfc.c spin_lock_irqsave(&ioc->fc_rescan_work_lock, flags); ioc 1505 drivers/message/fusion/mptfc.c ioc->fc_rescan_work_q = NULL; ioc 1506 drivers/message/fusion/mptfc.c spin_unlock_irqrestore(&ioc->fc_rescan_work_lock, flags); ioc 1510 drivers/message/fusion/mptfc.c fc_remove_host(ioc->sh); ioc 1512 drivers/message/fusion/mptfc.c list_for_each_entry_safe(p, n, &ioc->fc_rports, list) { ioc 1517 drivers/message/fusion/mptfc.c for (ii=0; ii<ioc->facts.NumberOfPorts; ii++) { ioc 1518 drivers/message/fusion/mptfc.c if (ioc->fc_data.fc_port_page1[ii].data) { ioc 1519 drivers/message/fusion/mptfc.c pci_free_consistent(ioc->pcidev, ioc 1520 drivers/message/fusion/mptfc.c ioc->fc_data.fc_port_page1[ii].pg_sz, ioc 1521 drivers/message/fusion/mptfc.c (u8 *) ioc->fc_data.fc_port_page1[ii].data, ioc 1522 drivers/message/fusion/mptfc.c ioc->fc_data.fc_port_page1[ii].dma); ioc 1523 drivers/message/fusion/mptfc.c ioc->fc_data.fc_port_page1[ii].data = NULL; ioc 1527 drivers/message/fusion/mptfc.c scsi_remove_host(ioc->sh); ioc 129 drivers/message/fusion/mptlan.c static int lan_reply (MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, ioc 143 drivers/message/fusion/mptlan.c static int mpt_lan_ioc_reset(MPT_ADAPTER *ioc, int reset_phase); ioc 144 drivers/message/fusion/mptlan.c static int mpt_lan_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply); ioc 168 drivers/message/fusion/mptlan.c lan_reply (MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *reply) ioc 170 drivers/message/fusion/mptlan.c struct net_device *dev = ioc->netdev; ioc 300 drivers/message/fusion/mptlan.c mpt_lan_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) ioc 302 drivers/message/fusion/mptlan.c struct net_device *dev = ioc->netdev; ioc 345 drivers/message/fusion/mptlan.c mpt_lan_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply) ioc 1385 drivers/message/fusion/mptlan.c MPT_ADAPTER *ioc = pci_get_drvdata(pdev); ioc 1389 drivers/message/fusion/mptlan.c for (i = 0; i < ioc->facts.NumberOfPorts; i++) { ioc 1392 drivers/message/fusion/mptlan.c ioc->name, ioc->pfacts[i].PortNumber, ioc 1393 drivers/message/fusion/mptlan.c ioc->pfacts[i].ProtocolFlags, ioc 1395 drivers/message/fusion/mptlan.c ioc->pfacts[i].ProtocolFlags)); ioc 1397 drivers/message/fusion/mptlan.c if (!(ioc->pfacts[i].ProtocolFlags & ioc 1401 drivers/message/fusion/mptlan.c ioc->name); ioc 1405 drivers/message/fusion/mptlan.c dev = mpt_register_lan_device(ioc, i); ioc 1408 drivers/message/fusion/mptlan.c "port%d as a LAN device\n", ioc->name, ioc 1409 drivers/message/fusion/mptlan.c ioc->pfacts[i].PortNumber); ioc 1414 drivers/message/fusion/mptlan.c "registered as '%s'\n", ioc->name, dev->name); ioc 1420 drivers/message/fusion/mptlan.c ioc->netdev = dev; ioc 1431 drivers/message/fusion/mptlan.c MPT_ADAPTER *ioc = pci_get_drvdata(pdev); ioc 1432 drivers/message/fusion/mptlan.c struct net_device *dev = ioc->netdev; ioc 112 drivers/message/fusion/mptsas.c static inline void mptsas_set_rphy(MPT_ADAPTER *ioc, ioc 115 drivers/message/fusion/mptsas.c (MPT_ADAPTER *ioc, u64 sas_address); ioc 116 drivers/message/fusion/mptsas.c static int mptsas_sas_device_pg0(MPT_ADAPTER *ioc, ioc 118 drivers/message/fusion/mptsas.c static int mptsas_sas_enclosure_pg0(MPT_ADAPTER *ioc, ioc 120 drivers/message/fusion/mptsas.c static int mptsas_add_end_device(MPT_ADAPTER *ioc, ioc 122 drivers/message/fusion/mptsas.c static void mptsas_del_end_device(MPT_ADAPTER *ioc, ioc 126 drivers/message/fusion/mptsas.c (MPT_ADAPTER *ioc, u64 sas_address); ioc 127 drivers/message/fusion/mptsas.c static void mptsas_expander_delete(MPT_ADAPTER *ioc, ioc 130 drivers/message/fusion/mptsas.c static void mptsas_not_responding_devices(MPT_ADAPTER *ioc); ioc 131 drivers/message/fusion/mptsas.c static void mptsas_scan_sas_topology(MPT_ADAPTER *ioc); ioc 134 drivers/message/fusion/mptsas.c static void mptsas_volume_delete(MPT_ADAPTER *ioc, u8 id); ioc 135 drivers/message/fusion/mptsas.c void mptsas_schedule_target_reset(void *ioc); ioc 137 drivers/message/fusion/mptsas.c static void mptsas_print_phy_data(MPT_ADAPTER *ioc, ioc 140 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 141 drivers/message/fusion/mptsas.c "---- IO UNIT PAGE 0 ------------\n", ioc->name)); ioc 142 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Handle=0x%X\n", ioc 143 drivers/message/fusion/mptsas.c ioc->name, le16_to_cpu(phy_data->AttachedDeviceHandle))); ioc 144 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Controller Handle=0x%X\n", ioc 145 drivers/message/fusion/mptsas.c ioc->name, le16_to_cpu(phy_data->ControllerDevHandle))); ioc 146 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Port=0x%X\n", ioc 147 drivers/message/fusion/mptsas.c ioc->name, phy_data->Port)); ioc 148 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Port Flags=0x%X\n", ioc 149 drivers/message/fusion/mptsas.c ioc->name, phy_data->PortFlags)); ioc 150 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "PHY Flags=0x%X\n", ioc 151 drivers/message/fusion/mptsas.c ioc->name, phy_data->PhyFlags)); ioc 152 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Negotiated Link Rate=0x%X\n", ioc 153 drivers/message/fusion/mptsas.c ioc->name, phy_data->NegotiatedLinkRate)); ioc 154 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 155 drivers/message/fusion/mptsas.c "Controller PHY Device Info=0x%X\n", ioc->name, ioc 157 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "DiscoveryStatus=0x%X\n\n", ioc 158 drivers/message/fusion/mptsas.c ioc->name, le32_to_cpu(phy_data->DiscoveryStatus))); ioc 161 drivers/message/fusion/mptsas.c static void mptsas_print_phy_pg0(MPT_ADAPTER *ioc, SasPhyPage0_t *pg0) ioc 167 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 168 drivers/message/fusion/mptsas.c "---- SAS PHY PAGE 0 ------------\n", ioc->name)); ioc 169 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 170 drivers/message/fusion/mptsas.c "Attached Device Handle=0x%X\n", ioc->name, ioc 172 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "SAS Address=0x%llX\n", ioc 173 drivers/message/fusion/mptsas.c ioc->name, (unsigned long long)le64_to_cpu(sas_address))); ioc 174 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 175 drivers/message/fusion/mptsas.c "Attached PHY Identifier=0x%X\n", ioc->name, ioc 177 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Attached Device Info=0x%X\n", ioc 178 drivers/message/fusion/mptsas.c ioc->name, le32_to_cpu(pg0->AttachedDeviceInfo))); ioc 179 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Programmed Link Rate=0x%X\n", ioc 180 drivers/message/fusion/mptsas.c ioc->name, pg0->ProgrammedLinkRate)); ioc 181 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Change Count=0x%X\n", ioc 182 drivers/message/fusion/mptsas.c ioc->name, pg0->ChangeCount)); ioc 183 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "PHY Info=0x%X\n\n", ioc 184 drivers/message/fusion/mptsas.c ioc->name, le32_to_cpu(pg0->PhyInfo))); ioc 187 drivers/message/fusion/mptsas.c static void mptsas_print_phy_pg1(MPT_ADAPTER *ioc, SasPhyPage1_t *pg1) ioc 189 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 190 drivers/message/fusion/mptsas.c "---- SAS PHY PAGE 1 ------------\n", ioc->name)); ioc 191 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Invalid Dword Count=0x%x\n", ioc 192 drivers/message/fusion/mptsas.c ioc->name, pg1->InvalidDwordCount)); ioc 193 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 194 drivers/message/fusion/mptsas.c "Running Disparity Error Count=0x%x\n", ioc->name, ioc 196 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 197 drivers/message/fusion/mptsas.c "Loss Dword Synch Count=0x%x\n", ioc->name, ioc 199 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 200 drivers/message/fusion/mptsas.c "PHY Reset Problem Count=0x%x\n\n", ioc->name, ioc 204 drivers/message/fusion/mptsas.c static void mptsas_print_device_pg0(MPT_ADAPTER *ioc, SasDevicePage0_t *pg0) ioc 210 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 211 drivers/message/fusion/mptsas.c "---- SAS DEVICE PAGE 0 ---------\n", ioc->name)); ioc 212 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Handle=0x%X\n", ioc 213 drivers/message/fusion/mptsas.c ioc->name, le16_to_cpu(pg0->DevHandle))); ioc 214 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Parent Handle=0x%X\n", ioc 215 drivers/message/fusion/mptsas.c ioc->name, le16_to_cpu(pg0->ParentDevHandle))); ioc 216 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Enclosure Handle=0x%X\n", ioc 217 drivers/message/fusion/mptsas.c ioc->name, le16_to_cpu(pg0->EnclosureHandle))); ioc 218 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Slot=0x%X\n", ioc 219 drivers/message/fusion/mptsas.c ioc->name, le16_to_cpu(pg0->Slot))); ioc 220 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "SAS Address=0x%llX\n", ioc 221 drivers/message/fusion/mptsas.c ioc->name, (unsigned long long)le64_to_cpu(sas_address))); ioc 222 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Target ID=0x%X\n", ioc 223 drivers/message/fusion/mptsas.c ioc->name, pg0->TargetID)); ioc 224 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Bus=0x%X\n", ioc 225 drivers/message/fusion/mptsas.c ioc->name, pg0->Bus)); ioc 226 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Parent Phy Num=0x%X\n", ioc 227 drivers/message/fusion/mptsas.c ioc->name, pg0->PhyNum)); ioc 228 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Access Status=0x%X\n", ioc 229 drivers/message/fusion/mptsas.c ioc->name, le16_to_cpu(pg0->AccessStatus))); ioc 230 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Device Info=0x%X\n", ioc 231 drivers/message/fusion/mptsas.c ioc->name, le32_to_cpu(pg0->DeviceInfo))); ioc 232 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Flags=0x%X\n", ioc 233 drivers/message/fusion/mptsas.c ioc->name, le16_to_cpu(pg0->Flags))); ioc 234 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Physical Port=0x%X\n\n", ioc 235 drivers/message/fusion/mptsas.c ioc->name, pg0->PhysicalPort)); ioc 238 drivers/message/fusion/mptsas.c static void mptsas_print_expander_pg1(MPT_ADAPTER *ioc, SasExpanderPage1_t *pg1) ioc 240 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 241 drivers/message/fusion/mptsas.c "---- SAS EXPANDER PAGE 1 ------------\n", ioc->name)); ioc 242 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Physical Port=0x%X\n", ioc 243 drivers/message/fusion/mptsas.c ioc->name, pg1->PhysicalPort)); ioc 244 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "PHY Identifier=0x%X\n", ioc 245 drivers/message/fusion/mptsas.c ioc->name, pg1->PhyIdentifier)); ioc 246 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Negotiated Link Rate=0x%X\n", ioc 247 drivers/message/fusion/mptsas.c ioc->name, pg1->NegotiatedLinkRate)); ioc 248 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Programmed Link Rate=0x%X\n", ioc 249 drivers/message/fusion/mptsas.c ioc->name, pg1->ProgrammedLinkRate)); ioc 250 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Hardware Link Rate=0x%X\n", ioc 251 drivers/message/fusion/mptsas.c ioc->name, pg1->HwLinkRate)); ioc 252 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Owner Device Handle=0x%X\n", ioc 253 drivers/message/fusion/mptsas.c ioc->name, le16_to_cpu(pg1->OwnerDevHandle))); ioc 254 drivers/message/fusion/mptsas.c dsasprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 255 drivers/message/fusion/mptsas.c "Attached Device Handle=0x%X\n\n", ioc->name, ioc 261 drivers/message/fusion/mptsas.c mptsas_fw_event_off(MPT_ADAPTER *ioc) ioc 265 drivers/message/fusion/mptsas.c spin_lock_irqsave(&ioc->fw_event_lock, flags); ioc 266 drivers/message/fusion/mptsas.c ioc->fw_events_off = 1; ioc 267 drivers/message/fusion/mptsas.c ioc->sas_discovery_quiesce_io = 0; ioc 268 drivers/message/fusion/mptsas.c spin_unlock_irqrestore(&ioc->fw_event_lock, flags); ioc 274 drivers/message/fusion/mptsas.c mptsas_fw_event_on(MPT_ADAPTER *ioc) ioc 278 drivers/message/fusion/mptsas.c spin_lock_irqsave(&ioc->fw_event_lock, flags); ioc 279 drivers/message/fusion/mptsas.c ioc->fw_events_off = 0; ioc 280 drivers/message/fusion/mptsas.c spin_unlock_irqrestore(&ioc->fw_event_lock, flags); ioc 285 drivers/message/fusion/mptsas.c mptsas_add_fw_event(MPT_ADAPTER *ioc, struct fw_event_work *fw_event, ioc 290 drivers/message/fusion/mptsas.c spin_lock_irqsave(&ioc->fw_event_lock, flags); ioc 291 drivers/message/fusion/mptsas.c list_add_tail(&fw_event->list, &ioc->fw_event_list); ioc 293 drivers/message/fusion/mptsas.c devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: add (fw_event=0x%p)" ioc 294 drivers/message/fusion/mptsas.c "on cpuid %d\n", ioc->name, __func__, ioc 296 drivers/message/fusion/mptsas.c queue_delayed_work_on(smp_processor_id(), ioc->fw_event_q, ioc 298 drivers/message/fusion/mptsas.c spin_unlock_irqrestore(&ioc->fw_event_lock, flags); ioc 303 drivers/message/fusion/mptsas.c mptsas_requeue_fw_event(MPT_ADAPTER *ioc, struct fw_event_work *fw_event, ioc 307 drivers/message/fusion/mptsas.c spin_lock_irqsave(&ioc->fw_event_lock, flags); ioc 308 drivers/message/fusion/mptsas.c devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: reschedule task " ioc 309 drivers/message/fusion/mptsas.c "(fw_event=0x%p)on cpuid %d\n", ioc->name, __func__, ioc 312 drivers/message/fusion/mptsas.c queue_delayed_work_on(smp_processor_id(), ioc->fw_event_q, ioc 314 drivers/message/fusion/mptsas.c spin_unlock_irqrestore(&ioc->fw_event_lock, flags); ioc 319 drivers/message/fusion/mptsas.c mptsas_free_fw_event(MPT_ADAPTER *ioc, struct fw_event_work *fw_event) ioc 323 drivers/message/fusion/mptsas.c spin_lock_irqsave(&ioc->fw_event_lock, flags); ioc 324 drivers/message/fusion/mptsas.c devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: kfree (fw_event=0x%p)\n", ioc 325 drivers/message/fusion/mptsas.c ioc->name, __func__, fw_event)); ioc 328 drivers/message/fusion/mptsas.c spin_unlock_irqrestore(&ioc->fw_event_lock, flags); ioc 334 drivers/message/fusion/mptsas.c mptsas_cleanup_fw_event_q(MPT_ADAPTER *ioc) ioc 338 drivers/message/fusion/mptsas.c MPT_SCSI_HOST *hd = shost_priv(ioc->sh); ioc 344 drivers/message/fusion/mptsas.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 346 drivers/message/fusion/mptsas.c ioc->name, __func__, ioc 353 drivers/message/fusion/mptsas.c if (list_empty(&ioc->fw_event_list) || ioc 354 drivers/message/fusion/mptsas.c !ioc->fw_event_q || in_interrupt()) ioc 357 drivers/message/fusion/mptsas.c list_for_each_entry_safe(fw_event, next, &ioc->fw_event_list, list) { ioc 359 drivers/message/fusion/mptsas.c mptsas_free_fw_event(ioc, fw_event); ioc 367 drivers/message/fusion/mptsas.c return ((MPT_SCSI_HOST *)shost->hostdata)->ioc; ioc 373 drivers/message/fusion/mptsas.c return ((MPT_SCSI_HOST *)shost->hostdata)->ioc; ioc 382 drivers/message/fusion/mptsas.c mptsas_find_portinfo_by_handle(MPT_ADAPTER *ioc, u16 handle) ioc 387 drivers/message/fusion/mptsas.c list_for_each_entry(port_info, &ioc->sas_topology, list) ioc 406 drivers/message/fusion/mptsas.c mptsas_find_portinfo_by_sas_address(MPT_ADAPTER *ioc, u64 sas_address) ioc 411 drivers/message/fusion/mptsas.c if (sas_address >= ioc->hba_port_sas_addr && ioc 412 drivers/message/fusion/mptsas.c sas_address < (ioc->hba_port_sas_addr + ioc 413 drivers/message/fusion/mptsas.c ioc->hba_port_num_phy)) ioc 414 drivers/message/fusion/mptsas.c return ioc->hba_port_info; ioc 416 drivers/message/fusion/mptsas.c mutex_lock(&ioc->sas_topology_mutex); ioc 417 drivers/message/fusion/mptsas.c list_for_each_entry(port_info, &ioc->sas_topology, list) ioc 425 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->sas_topology_mutex); ioc 451 drivers/message/fusion/mptsas.c mptsas_port_delete(MPT_ADAPTER *ioc, struct mptsas_portinfo_details * port_details) ioc 463 drivers/message/fusion/mptsas.c dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: [%p]: num_phys=%02d " ioc 464 drivers/message/fusion/mptsas.c "bitmask=0x%016llX\n", ioc->name, __func__, port_details, ioc 472 drivers/message/fusion/mptsas.c mptsas_set_rphy(ioc, phy_info, NULL); ioc 488 drivers/message/fusion/mptsas.c mptsas_set_rphy(MPT_ADAPTER *ioc, struct mptsas_phyinfo *phy_info, struct sas_rphy *rphy) ioc 492 drivers/message/fusion/mptsas.c dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT "sas_rphy_add: rphy=%p\n", ioc 493 drivers/message/fusion/mptsas.c ioc->name, rphy)); ioc 497 drivers/message/fusion/mptsas.c dsaswideprintk(ioc, dev_printk(KERN_DEBUG, ioc 498 drivers/message/fusion/mptsas.c &rphy->dev, MYIOC_s_FMT "add:", ioc->name)); ioc 499 drivers/message/fusion/mptsas.c dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT "rphy=%p release=%p\n", ioc 500 drivers/message/fusion/mptsas.c ioc->name, rphy, rphy->dev.release)); ioc 514 drivers/message/fusion/mptsas.c mptsas_set_port(MPT_ADAPTER *ioc, struct mptsas_phyinfo *phy_info, struct sas_port *port) ioc 520 drivers/message/fusion/mptsas.c dsaswideprintk(ioc, dev_printk(KERN_DEBUG, ioc 521 drivers/message/fusion/mptsas.c &port->dev, MYIOC_s_FMT "add:", ioc->name)); ioc 522 drivers/message/fusion/mptsas.c dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT "port=%p release=%p\n", ioc 523 drivers/message/fusion/mptsas.c ioc->name, port, port->dev.release)); ioc 554 drivers/message/fusion/mptsas.c mptsas_add_device_component(MPT_ADAPTER *ioc, u8 channel, u8 id, ioc 565 drivers/message/fusion/mptsas.c mutex_lock(&ioc->sas_device_info_mutex); ioc 566 drivers/message/fusion/mptsas.c list_for_each_entry_safe(sas_info, next, &ioc->sas_device_info_list, ioc 592 drivers/message/fusion/mptsas.c list_add_tail(&sas_info->list, &ioc->sas_device_info_list); ioc 597 drivers/message/fusion/mptsas.c shost_for_each_device(sdev, ioc->sh) { ioc 607 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->sas_device_info_mutex); ioc 619 drivers/message/fusion/mptsas.c mptsas_add_device_component_by_fw(MPT_ADAPTER *ioc, u8 channel, u8 id) ioc 625 drivers/message/fusion/mptsas.c rc = mptsas_sas_device_pg0(ioc, &sas_device, ioc 633 drivers/message/fusion/mptsas.c mptsas_sas_enclosure_pg0(ioc, &enclosure_info, ioc 638 drivers/message/fusion/mptsas.c mptsas_add_device_component(ioc, sas_device.channel, ioc 651 drivers/message/fusion/mptsas.c mptsas_add_device_component_starget_ir(MPT_ADAPTER *ioc, ioc 671 drivers/message/fusion/mptsas.c if (mpt_config(ioc, &cfg) != 0) ioc 677 drivers/message/fusion/mptsas.c buffer = pci_alloc_consistent(ioc->pcidev, hdr.PageLength * 4, ioc 686 drivers/message/fusion/mptsas.c if (mpt_config(ioc, &cfg) != 0) ioc 697 drivers/message/fusion/mptsas.c if (mpt_raid_phys_disk_pg0(ioc, ioc 701 drivers/message/fusion/mptsas.c mptsas_add_device_component_by_fw(ioc, phys_disk.PhysDiskBus, ioc 704 drivers/message/fusion/mptsas.c mutex_lock(&ioc->sas_device_info_mutex); ioc 705 drivers/message/fusion/mptsas.c list_for_each_entry(sas_info, &ioc->sas_device_info_list, ioc 714 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->sas_device_info_mutex); ioc 721 drivers/message/fusion/mptsas.c mutex_lock(&ioc->sas_device_info_mutex); ioc 722 drivers/message/fusion/mptsas.c list_for_each_entry_safe(sas_info, next, &ioc->sas_device_info_list, ioc 738 drivers/message/fusion/mptsas.c list_add_tail(&sas_info->list, &ioc->sas_device_info_list); ioc 740 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->sas_device_info_mutex); ioc 744 drivers/message/fusion/mptsas.c pci_free_consistent(ioc->pcidev, hdr.PageLength * 4, buffer, ioc 755 drivers/message/fusion/mptsas.c mptsas_add_device_component_starget(MPT_ADAPTER *ioc, ioc 765 drivers/message/fusion/mptsas.c phy_info = mptsas_find_phyinfo_by_sas_address(ioc, ioc 771 drivers/message/fusion/mptsas.c mptsas_sas_enclosure_pg0(ioc, &enclosure_info, ioc 776 drivers/message/fusion/mptsas.c mptsas_add_device_component(ioc, phy_info->attached.channel, ioc 790 drivers/message/fusion/mptsas.c mptsas_del_device_component_by_os(MPT_ADAPTER *ioc, u8 channel, u8 id) ioc 797 drivers/message/fusion/mptsas.c list_for_each_entry_safe(sas_info, next, &ioc->sas_device_info_list, ioc 810 drivers/message/fusion/mptsas.c mptsas_del_device_components(MPT_ADAPTER *ioc) ioc 814 drivers/message/fusion/mptsas.c mutex_lock(&ioc->sas_device_info_mutex); ioc 815 drivers/message/fusion/mptsas.c list_for_each_entry_safe(sas_info, next, &ioc->sas_device_info_list, ioc 820 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->sas_device_info_mutex); ioc 831 drivers/message/fusion/mptsas.c mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info) ioc 838 drivers/message/fusion/mptsas.c mutex_lock(&ioc->sas_topology_mutex); ioc 853 drivers/message/fusion/mptsas.c dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 855 drivers/message/fusion/mptsas.c ioc->name, __func__, port_details, i)); ioc 860 drivers/message/fusion/mptsas.c devtprintk(ioc, dev_printk(KERN_DEBUG, ioc 862 drivers/message/fusion/mptsas.c "delete phy %d, phy-obj (0x%p)\n", ioc->name, ioc 875 drivers/message/fusion/mptsas.c dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT "phy_id=%d sas_address=0x%018llX\n", ioc 876 drivers/message/fusion/mptsas.c ioc->name, i, (unsigned long long)sas_address)); ioc 894 drivers/message/fusion/mptsas.c dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT "\t\tForming port\n\t\t" ioc 896 drivers/message/fusion/mptsas.c ioc->name, i, (unsigned long long)sas_address)); ioc 911 drivers/message/fusion/mptsas.c dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 913 drivers/message/fusion/mptsas.c ioc->name, j, (unsigned long long) ioc 945 drivers/message/fusion/mptsas.c dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 947 drivers/message/fusion/mptsas.c "bitmask=0x%016llX\n", ioc->name, __func__, ioc 950 drivers/message/fusion/mptsas.c dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT "\t\tport = %p rphy=%p\n", ioc 951 drivers/message/fusion/mptsas.c ioc->name, port_details->port, port_details->rphy)); ioc 953 drivers/message/fusion/mptsas.c dsaswideprintk(ioc, printk("\n")); ioc 954 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->sas_topology_mutex); ioc 966 drivers/message/fusion/mptsas.c mptsas_find_vtarget(MPT_ADAPTER *ioc, u8 channel, u8 id) ioc 972 drivers/message/fusion/mptsas.c shost_for_each_device(sdev, ioc->sh) { ioc 989 drivers/message/fusion/mptsas.c mptsas_queue_device_delete(MPT_ADAPTER *ioc, ioc 999 drivers/message/fusion/mptsas.c ioc->name, __func__, __LINE__); ioc 1005 drivers/message/fusion/mptsas.c fw_event->ioc = ioc; ioc 1006 drivers/message/fusion/mptsas.c mptsas_add_fw_event(ioc, fw_event, msecs_to_jiffies(1)); ioc 1010 drivers/message/fusion/mptsas.c mptsas_queue_rescan(MPT_ADAPTER *ioc) ioc 1017 drivers/message/fusion/mptsas.c ioc->name, __func__, __LINE__); ioc 1021 drivers/message/fusion/mptsas.c fw_event->ioc = ioc; ioc 1022 drivers/message/fusion/mptsas.c mptsas_add_fw_event(ioc, fw_event, msecs_to_jiffies(1)); ioc 1040 drivers/message/fusion/mptsas.c mptsas_target_reset(MPT_ADAPTER *ioc, u8 channel, u8 id) ioc 1044 drivers/message/fusion/mptsas.c if (mpt_set_taskmgmt_in_progress_flag(ioc) != 0) ioc 1048 drivers/message/fusion/mptsas.c mf = mpt_get_msg_frame(mptsasDeviceResetCtx, ioc); ioc 1050 drivers/message/fusion/mptsas.c dfailprintk(ioc, printk(MYIOC_s_WARN_FMT ioc 1051 drivers/message/fusion/mptsas.c "%s, no msg frames @%d!!\n", ioc->name, ioc 1056 drivers/message/fusion/mptsas.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TaskMgmt request (mf=%p)\n", ioc 1057 drivers/message/fusion/mptsas.c ioc->name, mf)); ioc 1069 drivers/message/fusion/mptsas.c DBG_DUMP_TM_REQUEST_FRAME(ioc, (u32 *)mf); ioc 1071 drivers/message/fusion/mptsas.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 1073 drivers/message/fusion/mptsas.c ioc->name, MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET, channel, id)); ioc 1075 drivers/message/fusion/mptsas.c mpt_put_msg_frame_hi_pri(mptsasDeviceResetCtx, ioc, mf); ioc 1081 drivers/message/fusion/mptsas.c mpt_clear_taskmgmt_in_progress_flag(ioc); ioc 1110 drivers/message/fusion/mptsas.c mptsas_target_reset_queue(MPT_ADAPTER *ioc, ioc 1113 drivers/message/fusion/mptsas.c MPT_SCSI_HOST *hd = shost_priv(ioc->sh); ioc 1121 drivers/message/fusion/mptsas.c vtarget = mptsas_find_vtarget(ioc, channel, id); ioc 1130 drivers/message/fusion/mptsas.c dfailprintk(ioc, printk(MYIOC_s_WARN_FMT ioc 1132 drivers/message/fusion/mptsas.c ioc->name, __func__, __LINE__)); ioc 1142 drivers/message/fusion/mptsas.c if (mptsas_target_reset(ioc, channel, id)) { ioc 1159 drivers/message/fusion/mptsas.c MPT_ADAPTER *ioc = (MPT_ADAPTER *)(iocp); ioc 1160 drivers/message/fusion/mptsas.c MPT_SCSI_HOST *hd = shost_priv(ioc->sh); ioc 1178 drivers/message/fusion/mptsas.c if (mptsas_target_reset(ioc, channel, id)) ioc 1193 drivers/message/fusion/mptsas.c mptsas_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) ioc 1195 drivers/message/fusion/mptsas.c MPT_SCSI_HOST *hd = shost_priv(ioc->sh); ioc 1201 drivers/message/fusion/mptsas.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TaskMgmt completed: " ioc 1202 drivers/message/fusion/mptsas.c "(mf = %p, mr = %p)\n", ioc->name, mf, mr)); ioc 1208 drivers/message/fusion/mptsas.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 1212 drivers/message/fusion/mptsas.c "term_cmnds = %d\n", ioc->name, ioc 1221 drivers/message/fusion/mptsas.c mptscsih_taskmgmt_response_code(ioc, ioc 1227 drivers/message/fusion/mptsas.c ioc->taskmgmt_cmds.status |= MPT_MGMT_STATUS_COMMAND_GOOD; ioc 1228 drivers/message/fusion/mptsas.c ioc->taskmgmt_cmds.status |= MPT_MGMT_STATUS_RF_VALID; ioc 1229 drivers/message/fusion/mptsas.c memcpy(ioc->taskmgmt_cmds.reply, mr, ioc 1231 drivers/message/fusion/mptsas.c if (ioc->taskmgmt_cmds.status & MPT_MGMT_STATUS_PENDING) { ioc 1232 drivers/message/fusion/mptsas.c ioc->taskmgmt_cmds.status &= ~MPT_MGMT_STATUS_PENDING; ioc 1233 drivers/message/fusion/mptsas.c complete(&ioc->taskmgmt_cmds.done); ioc 1239 drivers/message/fusion/mptsas.c mpt_clear_taskmgmt_in_progress_flag(ioc); ioc 1247 drivers/message/fusion/mptsas.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 1249 drivers/message/fusion/mptsas.c ioc->name, jiffies_to_msecs(jiffies - ioc 1260 drivers/message/fusion/mptsas.c if (mptsas_target_reset(ioc, channel, id)) ioc 1269 drivers/message/fusion/mptsas.c if (!ioc->fw_events_off) ioc 1270 drivers/message/fusion/mptsas.c mptsas_queue_device_delete(ioc, ioc 1274 drivers/message/fusion/mptsas.c ioc->schedule_target_reset(ioc); ioc 1287 drivers/message/fusion/mptsas.c mptsas_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) ioc 1292 drivers/message/fusion/mptsas.c rc = mptscsih_ioc_reset(ioc, reset_phase); ioc 1293 drivers/message/fusion/mptsas.c if ((ioc->bus_type != SAS) || (!rc)) ioc 1296 drivers/message/fusion/mptsas.c hd = shost_priv(ioc->sh); ioc 1297 drivers/message/fusion/mptsas.c if (!hd->ioc) ioc 1302 drivers/message/fusion/mptsas.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 1303 drivers/message/fusion/mptsas.c "%s: MPT_IOC_SETUP_RESET\n", ioc->name, __func__)); ioc 1304 drivers/message/fusion/mptsas.c mptsas_fw_event_off(ioc); ioc 1307 drivers/message/fusion/mptsas.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 1308 drivers/message/fusion/mptsas.c "%s: MPT_IOC_PRE_RESET\n", ioc->name, __func__)); ioc 1311 drivers/message/fusion/mptsas.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 1312 drivers/message/fusion/mptsas.c "%s: MPT_IOC_POST_RESET\n", ioc->name, __func__)); ioc 1313 drivers/message/fusion/mptsas.c if (ioc->sas_mgmt.status & MPT_MGMT_STATUS_PENDING) { ioc 1314 drivers/message/fusion/mptsas.c ioc->sas_mgmt.status |= MPT_MGMT_STATUS_DID_IOCRESET; ioc 1315 drivers/message/fusion/mptsas.c complete(&ioc->sas_mgmt.done); ioc 1317 drivers/message/fusion/mptsas.c mptsas_cleanup_fw_event_q(ioc); ioc 1318 drivers/message/fusion/mptsas.c mptsas_queue_rescan(ioc); ioc 1343 drivers/message/fusion/mptsas.c mptsas_sas_enclosure_pg0(MPT_ADAPTER *ioc, struct mptsas_enclosure *enclosure, ioc 1366 drivers/message/fusion/mptsas.c error = mpt_config(ioc, &cfg); ioc 1374 drivers/message/fusion/mptsas.c buffer = pci_alloc_consistent(ioc->pcidev, hdr.ExtPageLength * 4, ioc 1384 drivers/message/fusion/mptsas.c error = mpt_config(ioc, &cfg); ioc 1401 drivers/message/fusion/mptsas.c pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4, ioc 1416 drivers/message/fusion/mptsas.c mptsas_add_end_device(MPT_ADAPTER *ioc, struct mptsas_phyinfo *phy_info) ioc 1425 drivers/message/fusion/mptsas.c dfailprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 1426 drivers/message/fusion/mptsas.c "%s: exit at line=%d\n", ioc->name, ioc 1434 drivers/message/fusion/mptsas.c dfailprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 1435 drivers/message/fusion/mptsas.c "%s: fw_id=%d exit at line=%d\n", ioc->name, ioc 1442 drivers/message/fusion/mptsas.c dfailprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 1443 drivers/message/fusion/mptsas.c "%s: fw_id=%d exit at line=%d\n", ioc->name, ioc 1459 drivers/message/fusion/mptsas.c " phy %d, sas_addr 0x%llx\n", ioc->name, ds, ioc 1467 drivers/message/fusion/mptsas.c dfailprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 1468 drivers/message/fusion/mptsas.c "%s: fw_id=%d exit at line=%d\n", ioc->name, ioc 1475 drivers/message/fusion/mptsas.c dfailprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 1476 drivers/message/fusion/mptsas.c "%s: fw_id=%d exit at line=%d\n", ioc->name, ioc 1481 drivers/message/fusion/mptsas.c mptsas_set_rphy(ioc, phy_info, rphy); ioc 1492 drivers/message/fusion/mptsas.c mptsas_del_end_device(MPT_ADAPTER *ioc, struct mptsas_phyinfo *phy_info) ioc 1510 drivers/message/fusion/mptsas.c dfailprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 1511 drivers/message/fusion/mptsas.c "%s: fw_id=%d exit at line=%d\n", ioc->name, ioc 1517 drivers/message/fusion/mptsas.c dfailprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 1518 drivers/message/fusion/mptsas.c "%s: fw_id=%d exit at line=%d\n", ioc->name, ioc 1541 drivers/message/fusion/mptsas.c "sas_addr 0x%llx\n", ioc->name, ds, phy_info->attached.channel, ioc 1547 drivers/message/fusion/mptsas.c dfailprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 1548 drivers/message/fusion/mptsas.c "%s: fw_id=%d exit at line=%d\n", ioc->name, ioc 1562 drivers/message/fusion/mptsas.c ioc->name, phy_info_parent->phy_id, ioc 1568 drivers/message/fusion/mptsas.c "delete port %d, sas_addr (0x%llx)\n", ioc->name, ioc 1571 drivers/message/fusion/mptsas.c mptsas_set_port(ioc, phy_info, NULL); ioc 1572 drivers/message/fusion/mptsas.c mptsas_port_delete(ioc, phy_info->port_details); ioc 1576 drivers/message/fusion/mptsas.c mptsas_refreshing_device_handles(MPT_ADAPTER *ioc, ioc 1583 drivers/message/fusion/mptsas.c phy_info = mptsas_find_phyinfo_by_sas_address(ioc, ioc 1590 drivers/message/fusion/mptsas.c mutex_lock(&ioc->sas_topology_mutex); ioc 1605 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->sas_topology_mutex); ioc 1621 drivers/message/fusion/mptsas.c MPT_ADAPTER *ioc = fw_event->ioc; ioc 1625 drivers/message/fusion/mptsas.c if (ioc->in_rescan) { ioc 1626 drivers/message/fusion/mptsas.c devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 1628 drivers/message/fusion/mptsas.c ioc->name, __func__)); ioc 1631 drivers/message/fusion/mptsas.c devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: rescan after " ioc 1632 drivers/message/fusion/mptsas.c "reset\n", ioc->name, __func__)); ioc 1633 drivers/message/fusion/mptsas.c ioc->in_rescan = 1; ioc 1634 drivers/message/fusion/mptsas.c mptsas_not_responding_devices(ioc); ioc 1635 drivers/message/fusion/mptsas.c mptsas_scan_sas_topology(ioc); ioc 1636 drivers/message/fusion/mptsas.c ioc->in_rescan = 0; ioc 1637 drivers/message/fusion/mptsas.c mptsas_free_fw_event(ioc, fw_event); ioc 1638 drivers/message/fusion/mptsas.c mptsas_fw_event_on(ioc); ioc 1643 drivers/message/fusion/mptsas.c if (ioc->fw_events_off) { ioc 1644 drivers/message/fusion/mptsas.c mptsas_free_fw_event(ioc, fw_event); ioc 1648 drivers/message/fusion/mptsas.c devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: fw_event=(0x%p), " ioc 1649 drivers/message/fusion/mptsas.c "event = (0x%02x)\n", ioc->name, __func__, fw_event, ioc 1663 drivers/message/fusion/mptsas.c mptbase_sas_persist_operation(ioc, ioc 1665 drivers/message/fusion/mptsas.c mptsas_free_fw_event(ioc, fw_event); ioc 1689 drivers/message/fusion/mptsas.c MPT_ADAPTER *ioc = hd->ioc; ioc 1702 drivers/message/fusion/mptsas.c mptsas_add_device_component_starget_ir(ioc, scsi_target(sdev)); ioc 1708 drivers/message/fusion/mptsas.c mptsas_add_device_component_starget(ioc, scsi_target(sdev)); ioc 1724 drivers/message/fusion/mptsas.c MPT_ADAPTER *ioc = hd->ioc; ioc 1731 drivers/message/fusion/mptsas.c vtarget->ioc_id = ioc->id; ioc 1740 drivers/message/fusion/mptsas.c if (!ioc->raid_data.pIocPg2) { ioc 1744 drivers/message/fusion/mptsas.c for (i = 0; i < ioc->raid_data.pIocPg2->NumActiveVolumes; i++) { ioc 1745 drivers/message/fusion/mptsas.c if (id == ioc->raid_data.pIocPg2-> ioc 1747 drivers/message/fusion/mptsas.c channel = ioc->raid_data.pIocPg2-> ioc 1756 drivers/message/fusion/mptsas.c mutex_lock(&ioc->sas_topology_mutex); ioc 1757 drivers/message/fusion/mptsas.c list_for_each_entry(p, &ioc->sas_topology, list) { ioc 1769 drivers/message/fusion/mptsas.c if (mptscsih_is_phys_disk(ioc, channel, id)) { ioc 1770 drivers/message/fusion/mptsas.c id = mptscsih_raid_id_to_num(ioc, ioc 1776 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->sas_topology_mutex); ioc 1780 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->sas_topology_mutex); ioc 1800 drivers/message/fusion/mptsas.c MPT_ADAPTER *ioc = hd->ioc; ioc 1808 drivers/message/fusion/mptsas.c mptsas_del_device_component_by_os(ioc, starget->channel, ioc 1816 drivers/message/fusion/mptsas.c list_for_each_entry(p, &ioc->sas_topology, list) { ioc 1824 drivers/message/fusion/mptsas.c "sas_addr 0x%llx\n", ioc->name, ioc 1851 drivers/message/fusion/mptsas.c MPT_ADAPTER *ioc = hd->ioc; ioc 1856 drivers/message/fusion/mptsas.c ioc->name, sizeof(VirtDevice)); ioc 1866 drivers/message/fusion/mptsas.c mutex_lock(&ioc->sas_topology_mutex); ioc 1867 drivers/message/fusion/mptsas.c list_for_each_entry(p, &ioc->sas_topology, list) { ioc 1876 drivers/message/fusion/mptsas.c if (mptscsih_is_phys_disk(ioc, ioc 1880 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->sas_topology_mutex); ioc 1884 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->sas_topology_mutex); ioc 1899 drivers/message/fusion/mptsas.c MPT_ADAPTER *ioc; ioc 1909 drivers/message/fusion/mptsas.c ioc = hd->ioc; ioc 1911 drivers/message/fusion/mptsas.c if (ioc->sas_discovery_quiesce_io) ioc 1914 drivers/message/fusion/mptsas.c if (ioc->debug_level & MPT_DEBUG_SCSI) ioc 1930 drivers/message/fusion/mptsas.c MPT_ADAPTER *ioc; ioc 1941 drivers/message/fusion/mptsas.c ioc = hd->ioc; ioc 1942 drivers/message/fusion/mptsas.c if (ioc->bus_type != SAS) { ioc 1951 drivers/message/fusion/mptsas.c if (ioc->ioc_reset_in_progress) { ioc 1952 drivers/message/fusion/mptsas.c dtmprintk(ioc, printk(MYIOC_s_WARN_FMT ": %s: ioc is in reset," ioc 1954 drivers/message/fusion/mptsas.c ioc->name, __func__, sc)); ioc 1960 drivers/message/fusion/mptsas.c dtmprintk(ioc, printk(MYIOC_s_WARN_FMT ": %s: target removed " ioc 1962 drivers/message/fusion/mptsas.c ioc->name, __func__, sc)); ioc 2001 drivers/message/fusion/mptsas.c MPT_ADAPTER *ioc = phy_to_ioc(phy); ioc 2027 drivers/message/fusion/mptsas.c error = mpt_config(ioc, &cfg); ioc 2033 drivers/message/fusion/mptsas.c buffer = pci_alloc_consistent(ioc->pcidev, hdr.ExtPageLength * 4, ioc 2041 drivers/message/fusion/mptsas.c error = mpt_config(ioc, &cfg); ioc 2045 drivers/message/fusion/mptsas.c mptsas_print_phy_pg1(ioc, buffer); ioc 2056 drivers/message/fusion/mptsas.c pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4, ioc 2061 drivers/message/fusion/mptsas.c static int mptsas_mgmt_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *req, ioc 2064 drivers/message/fusion/mptsas.c ioc->sas_mgmt.status |= MPT_MGMT_STATUS_COMMAND_GOOD; ioc 2066 drivers/message/fusion/mptsas.c ioc->sas_mgmt.status |= MPT_MGMT_STATUS_RF_VALID; ioc 2067 drivers/message/fusion/mptsas.c memcpy(ioc->sas_mgmt.reply, reply, ioc 2068 drivers/message/fusion/mptsas.c min(ioc->reply_sz, 4 * reply->u.reply.MsgLength)); ioc 2071 drivers/message/fusion/mptsas.c if (ioc->sas_mgmt.status & MPT_MGMT_STATUS_PENDING) { ioc 2072 drivers/message/fusion/mptsas.c ioc->sas_mgmt.status &= ~MPT_MGMT_STATUS_PENDING; ioc 2073 drivers/message/fusion/mptsas.c complete(&ioc->sas_mgmt.done); ioc 2081 drivers/message/fusion/mptsas.c MPT_ADAPTER *ioc = phy_to_ioc(phy); ioc 2097 drivers/message/fusion/mptsas.c if (mutex_lock_interruptible(&ioc->sas_mgmt.mutex)) ioc 2100 drivers/message/fusion/mptsas.c mf = mpt_get_msg_frame(mptsasMgmtCtx, ioc); ioc 2115 drivers/message/fusion/mptsas.c INITIALIZE_MGMT_STATUS(ioc->sas_mgmt.status) ioc 2116 drivers/message/fusion/mptsas.c mpt_put_msg_frame(mptsasMgmtCtx, ioc, mf); ioc 2118 drivers/message/fusion/mptsas.c timeleft = wait_for_completion_timeout(&ioc->sas_mgmt.done, ioc 2120 drivers/message/fusion/mptsas.c if (!(ioc->sas_mgmt.status & MPT_MGMT_STATUS_COMMAND_GOOD)) { ioc 2122 drivers/message/fusion/mptsas.c mpt_free_msg_frame(ioc, mf); ioc 2123 drivers/message/fusion/mptsas.c if (ioc->sas_mgmt.status & MPT_MGMT_STATUS_DID_IOCRESET) ioc 2126 drivers/message/fusion/mptsas.c mpt_Soft_Hard_ResetHandler(ioc, CAN_SLEEP); ioc 2131 drivers/message/fusion/mptsas.c if ((ioc->sas_mgmt.status & ioc 2138 drivers/message/fusion/mptsas.c reply = (SasIoUnitControlReply_t *)ioc->sas_mgmt.reply; ioc 2141 drivers/message/fusion/mptsas.c ioc->name, __func__, reply->IOCStatus, reply->IOCLogInfo); ioc 2149 drivers/message/fusion/mptsas.c CLEAR_MGMT_STATUS(ioc->sas_mgmt.status) ioc 2150 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->sas_mgmt.mutex); ioc 2158 drivers/message/fusion/mptsas.c MPT_ADAPTER *ioc = rphy_to_ioc(rphy); ioc 2164 drivers/message/fusion/mptsas.c mutex_lock(&ioc->sas_topology_mutex); ioc 2165 drivers/message/fusion/mptsas.c list_for_each_entry(p, &ioc->sas_topology, list) { ioc 2175 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->sas_topology_mutex); ioc 2179 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->sas_topology_mutex); ioc 2181 drivers/message/fusion/mptsas.c error = mptsas_sas_enclosure_pg0(ioc, &enclosure_info, ioc 2192 drivers/message/fusion/mptsas.c MPT_ADAPTER *ioc = rphy_to_ioc(rphy); ioc 2196 drivers/message/fusion/mptsas.c mutex_lock(&ioc->sas_topology_mutex); ioc 2197 drivers/message/fusion/mptsas.c list_for_each_entry(p, &ioc->sas_topology, list) { ioc 2208 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->sas_topology_mutex); ioc 2215 drivers/message/fusion/mptsas.c MPT_ADAPTER *ioc = ((MPT_SCSI_HOST *) shost->hostdata)->ioc; ioc 2229 drivers/message/fusion/mptsas.c ioc->name, __func__, job->request_payload.payload_len, ioc 2234 drivers/message/fusion/mptsas.c ret = mutex_lock_interruptible(&ioc->sas_mgmt.mutex); ioc 2238 drivers/message/fusion/mptsas.c mf = mpt_get_msg_frame(mptsasMgmtCtx, ioc); ioc 2256 drivers/message/fusion/mptsas.c mutex_lock(&ioc->sas_topology_mutex); ioc 2257 drivers/message/fusion/mptsas.c port_info = ioc->hba_port_info; ioc 2261 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->sas_topology_mutex); ioc 2275 drivers/message/fusion/mptsas.c if (!dma_map_sg(&ioc->pcidev->dev, job->request_payload.sg_list, ioc 2280 drivers/message/fusion/mptsas.c ioc->add_sge(psge, flagsLength, ioc 2282 drivers/message/fusion/mptsas.c psge += ioc->SGE_size; ioc 2292 drivers/message/fusion/mptsas.c if (!dma_map_sg(&ioc->pcidev->dev, job->reply_payload.sg_list, ioc 2296 drivers/message/fusion/mptsas.c ioc->add_sge(psge, flagsLength, ioc 2299 drivers/message/fusion/mptsas.c INITIALIZE_MGMT_STATUS(ioc->sas_mgmt.status) ioc 2300 drivers/message/fusion/mptsas.c mpt_put_msg_frame(mptsasMgmtCtx, ioc, mf); ioc 2302 drivers/message/fusion/mptsas.c timeleft = wait_for_completion_timeout(&ioc->sas_mgmt.done, 10 * HZ); ioc 2303 drivers/message/fusion/mptsas.c if (!(ioc->sas_mgmt.status & MPT_MGMT_STATUS_COMMAND_GOOD)) { ioc 2305 drivers/message/fusion/mptsas.c mpt_free_msg_frame(ioc, mf); ioc 2307 drivers/message/fusion/mptsas.c if (ioc->sas_mgmt.status & MPT_MGMT_STATUS_DID_IOCRESET) ioc 2310 drivers/message/fusion/mptsas.c mpt_Soft_Hard_ResetHandler(ioc, CAN_SLEEP); ioc 2315 drivers/message/fusion/mptsas.c if (ioc->sas_mgmt.status & MPT_MGMT_STATUS_RF_VALID) { ioc 2318 drivers/message/fusion/mptsas.c smprep = (SmpPassthroughReply_t *)ioc->sas_mgmt.reply; ioc 2325 drivers/message/fusion/mptsas.c ioc->name, __func__); ioc 2330 drivers/message/fusion/mptsas.c dma_unmap_sg(&ioc->pcidev->dev, job->reply_payload.sg_list, 1, ioc 2333 drivers/message/fusion/mptsas.c dma_unmap_sg(&ioc->pcidev->dev, job->request_payload.sg_list, 1, ioc 2337 drivers/message/fusion/mptsas.c mpt_free_msg_frame(ioc, mf); ioc 2339 drivers/message/fusion/mptsas.c CLEAR_MGMT_STATUS(ioc->sas_mgmt.status) ioc 2340 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->sas_mgmt.mutex); ioc 2356 drivers/message/fusion/mptsas.c mptsas_sas_io_unit_pg0(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info) ioc 2379 drivers/message/fusion/mptsas.c error = mpt_config(ioc, &cfg); ioc 2387 drivers/message/fusion/mptsas.c buffer = pci_alloc_consistent(ioc->pcidev, hdr.ExtPageLength * 4, ioc 2397 drivers/message/fusion/mptsas.c error = mpt_config(ioc, &cfg); ioc 2409 drivers/message/fusion/mptsas.c ioc->nvdata_version_persistent = ioc 2411 drivers/message/fusion/mptsas.c ioc->nvdata_version_default = ioc 2415 drivers/message/fusion/mptsas.c mptsas_print_phy_data(ioc, &buffer->PhyData[i]); ioc 2427 drivers/message/fusion/mptsas.c pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4, ioc 2434 drivers/message/fusion/mptsas.c mptsas_sas_io_unit_pg1(MPT_ADAPTER *ioc) ioc 2454 drivers/message/fusion/mptsas.c error = mpt_config(ioc, &cfg); ioc 2462 drivers/message/fusion/mptsas.c buffer = pci_alloc_consistent(ioc->pcidev, hdr.ExtPageLength * 4, ioc 2472 drivers/message/fusion/mptsas.c error = mpt_config(ioc, &cfg); ioc 2476 drivers/message/fusion/mptsas.c ioc->io_missing_delay = ioc 2479 drivers/message/fusion/mptsas.c ioc->device_missing_delay = (device_missing_delay & MPI_SAS_IOUNIT1_REPORT_MISSING_UNIT_16) ? ioc 2484 drivers/message/fusion/mptsas.c pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4, ioc 2491 drivers/message/fusion/mptsas.c mptsas_sas_phy_pg0(MPT_ADAPTER *ioc, struct mptsas_phyinfo *phy_info, ioc 2517 drivers/message/fusion/mptsas.c error = mpt_config(ioc, &cfg); ioc 2526 drivers/message/fusion/mptsas.c buffer = pci_alloc_consistent(ioc->pcidev, hdr.ExtPageLength * 4, ioc 2536 drivers/message/fusion/mptsas.c error = mpt_config(ioc, &cfg); ioc 2540 drivers/message/fusion/mptsas.c mptsas_print_phy_pg0(ioc, buffer); ioc 2548 drivers/message/fusion/mptsas.c pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4, ioc 2555 drivers/message/fusion/mptsas.c mptsas_sas_device_pg0(MPT_ADAPTER *ioc, struct mptsas_devinfo *device_info, ioc 2581 drivers/message/fusion/mptsas.c error = mpt_config(ioc, &cfg); ioc 2589 drivers/message/fusion/mptsas.c buffer = pci_alloc_consistent(ioc->pcidev, hdr.ExtPageLength * 4, ioc 2599 drivers/message/fusion/mptsas.c error = mpt_config(ioc, &cfg); ioc 2609 drivers/message/fusion/mptsas.c mptsas_print_device_pg0(ioc, buffer); ioc 2629 drivers/message/fusion/mptsas.c pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4, ioc 2636 drivers/message/fusion/mptsas.c mptsas_sas_expander_pg0(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info, ioc 2663 drivers/message/fusion/mptsas.c error = mpt_config(ioc, &cfg); ioc 2672 drivers/message/fusion/mptsas.c buffer = pci_alloc_consistent(ioc->pcidev, hdr.ExtPageLength * 4, ioc 2682 drivers/message/fusion/mptsas.c error = mpt_config(ioc, &cfg); ioc 2712 drivers/message/fusion/mptsas.c pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4, ioc 2719 drivers/message/fusion/mptsas.c mptsas_sas_expander_pg1(MPT_ADAPTER *ioc, struct mptsas_phyinfo *phy_info, ioc 2743 drivers/message/fusion/mptsas.c error = mpt_config(ioc, &cfg); ioc 2752 drivers/message/fusion/mptsas.c buffer = pci_alloc_consistent(ioc->pcidev, hdr.ExtPageLength * 4, ioc 2762 drivers/message/fusion/mptsas.c error = mpt_config(ioc, &cfg); ioc 2773 drivers/message/fusion/mptsas.c mptsas_print_expander_pg1(ioc, buffer); ioc 2785 drivers/message/fusion/mptsas.c pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4, ioc 2829 drivers/message/fusion/mptsas.c mptsas_exp_repmanufacture_info(MPT_ADAPTER *ioc, ioc 2846 drivers/message/fusion/mptsas.c spin_lock_irqsave(&ioc->taskmgmt_lock, flags); ioc 2847 drivers/message/fusion/mptsas.c if (ioc->ioc_reset_in_progress) { ioc 2848 drivers/message/fusion/mptsas.c spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags); ioc 2850 drivers/message/fusion/mptsas.c __func__, ioc->name); ioc 2853 drivers/message/fusion/mptsas.c spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags); ioc 2855 drivers/message/fusion/mptsas.c ret = mutex_lock_interruptible(&ioc->sas_mgmt.mutex); ioc 2859 drivers/message/fusion/mptsas.c mf = mpt_get_msg_frame(mptsasMgmtCtx, ioc); ioc 2870 drivers/message/fusion/mptsas.c data_out = pci_alloc_consistent(ioc->pcidev, sz, &data_out_dma); ioc 2899 drivers/message/fusion/mptsas.c ioc->add_sge(psge, flagsLength, data_out_dma); ioc 2900 drivers/message/fusion/mptsas.c psge += ioc->SGE_size; ioc 2908 drivers/message/fusion/mptsas.c ioc->add_sge(psge, flagsLength, data_out_dma + ioc 2911 drivers/message/fusion/mptsas.c INITIALIZE_MGMT_STATUS(ioc->sas_mgmt.status) ioc 2912 drivers/message/fusion/mptsas.c mpt_put_msg_frame(mptsasMgmtCtx, ioc, mf); ioc 2914 drivers/message/fusion/mptsas.c timeleft = wait_for_completion_timeout(&ioc->sas_mgmt.done, 10 * HZ); ioc 2915 drivers/message/fusion/mptsas.c if (!(ioc->sas_mgmt.status & MPT_MGMT_STATUS_COMMAND_GOOD)) { ioc 2917 drivers/message/fusion/mptsas.c mpt_free_msg_frame(ioc, mf); ioc 2919 drivers/message/fusion/mptsas.c if (ioc->sas_mgmt.status & MPT_MGMT_STATUS_DID_IOCRESET) ioc 2922 drivers/message/fusion/mptsas.c mpt_Soft_Hard_ResetHandler(ioc, CAN_SLEEP); ioc 2928 drivers/message/fusion/mptsas.c if (ioc->sas_mgmt.status & MPT_MGMT_STATUS_RF_VALID) { ioc 2931 drivers/message/fusion/mptsas.c smprep = (SmpPassthroughReply_t *)ioc->sas_mgmt.reply; ioc 2956 drivers/message/fusion/mptsas.c ioc->name, __func__); ioc 2961 drivers/message/fusion/mptsas.c pci_free_consistent(ioc->pcidev, sz, data_out, data_out_dma); ioc 2964 drivers/message/fusion/mptsas.c mpt_free_msg_frame(ioc, mf); ioc 2966 drivers/message/fusion/mptsas.c CLEAR_MGMT_STATUS(ioc->sas_mgmt.status) ioc 2967 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->sas_mgmt.mutex); ioc 3034 drivers/message/fusion/mptsas.c MPT_ADAPTER *ioc; ioc 3155 drivers/message/fusion/mptsas.c ioc = phy_to_ioc(phy_info->phy); ioc 3167 drivers/message/fusion/mptsas.c dfailprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 3168 drivers/message/fusion/mptsas.c "%s: exit at line=%d\n", ioc->name, ioc 3172 drivers/message/fusion/mptsas.c mptsas_set_port(ioc, phy_info, port); ioc 3173 drivers/message/fusion/mptsas.c devtprintk(ioc, dev_printk(KERN_DEBUG, &port->dev, ioc 3175 drivers/message/fusion/mptsas.c ioc->name, port->port_identifier, ioc 3179 drivers/message/fusion/mptsas.c dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 3181 drivers/message/fusion/mptsas.c ioc->name, phy_info->phy_id)); ioc 3184 drivers/message/fusion/mptsas.c devtprintk(ioc, dev_printk(KERN_DEBUG, &phy_info->phy->dev, ioc 3185 drivers/message/fusion/mptsas.c MYIOC_s_FMT "add phy %d, phy-obj (0x%p)\n", ioc->name, ioc 3210 drivers/message/fusion/mptsas.c port_info = ioc->hba_port_info; ioc 3241 drivers/message/fusion/mptsas.c dfailprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 3242 drivers/message/fusion/mptsas.c "%s: exit at line=%d\n", ioc->name, ioc 3250 drivers/message/fusion/mptsas.c dfailprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 3251 drivers/message/fusion/mptsas.c "%s: exit at line=%d\n", ioc->name, ioc 3256 drivers/message/fusion/mptsas.c mptsas_set_rphy(ioc, phy_info, rphy); ioc 3259 drivers/message/fusion/mptsas.c mptsas_exp_repmanufacture_info(ioc, ioc 3266 drivers/message/fusion/mptsas.c vtarget = mptsas_find_vtarget(ioc, ioc 3279 drivers/message/fusion/mptsas.c mptsas_probe_hba_phys(MPT_ADAPTER *ioc) ioc 3288 drivers/message/fusion/mptsas.c error = mptsas_sas_io_unit_pg0(ioc, hba); ioc 3292 drivers/message/fusion/mptsas.c mptsas_sas_io_unit_pg1(ioc); ioc 3293 drivers/message/fusion/mptsas.c mutex_lock(&ioc->sas_topology_mutex); ioc 3294 drivers/message/fusion/mptsas.c port_info = ioc->hba_port_info; ioc 3296 drivers/message/fusion/mptsas.c ioc->hba_port_info = port_info = hba; ioc 3297 drivers/message/fusion/mptsas.c ioc->hba_port_num_phy = port_info->num_phys; ioc 3298 drivers/message/fusion/mptsas.c list_add_tail(&port_info->list, &ioc->sas_topology); ioc 3312 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->sas_topology_mutex); ioc 3314 drivers/message/fusion/mptsas.c ioc->num_ports = port_info->num_phys; ioc 3317 drivers/message/fusion/mptsas.c mptsas_sas_phy_pg0(ioc, &port_info->phy_info[i], ioc 3322 drivers/message/fusion/mptsas.c mptsas_sas_device_pg0(ioc, &port_info->phy_info[i].identify, ioc 3326 drivers/message/fusion/mptsas.c if (!ioc->hba_port_sas_addr) ioc 3327 drivers/message/fusion/mptsas.c ioc->hba_port_sas_addr = ioc 3332 drivers/message/fusion/mptsas.c mptsas_sas_device_pg0(ioc, ioc 3339 drivers/message/fusion/mptsas.c mptsas_setup_wide_ports(ioc, port_info); ioc 3341 drivers/message/fusion/mptsas.c for (i = 0; i < port_info->num_phys; i++, ioc->sas_index++) ioc 3342 drivers/message/fusion/mptsas.c mptsas_probe_one_phy(&ioc->sh->shost_gendev, ioc 3343 drivers/message/fusion/mptsas.c &port_info->phy_info[i], ioc->sas_index, 1); ioc 3354 drivers/message/fusion/mptsas.c mptsas_expander_refresh(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info) ioc 3366 drivers/message/fusion/mptsas.c mptsas_sas_expander_pg1(ioc, &port_info->phy_info[i], ioc 3370 drivers/message/fusion/mptsas.c mptsas_sas_device_pg0(ioc, ioc 3379 drivers/message/fusion/mptsas.c mptsas_sas_device_pg0(ioc, ioc 3389 drivers/message/fusion/mptsas.c mutex_lock(&ioc->sas_topology_mutex); ioc 3390 drivers/message/fusion/mptsas.c parent = mptsas_find_portinfo_by_handle(ioc, ioc 3393 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->sas_topology_mutex); ioc 3403 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->sas_topology_mutex); ioc 3405 drivers/message/fusion/mptsas.c mptsas_setup_wide_ports(ioc, port_info); ioc 3406 drivers/message/fusion/mptsas.c for (i = 0; i < port_info->num_phys; i++, ioc->sas_index++) ioc 3408 drivers/message/fusion/mptsas.c ioc->sas_index, 0); ioc 3412 drivers/message/fusion/mptsas.c mptsas_expander_event_add(MPT_ADAPTER *ioc, ioc 3439 drivers/message/fusion/mptsas.c mutex_lock(&ioc->sas_topology_mutex); ioc 3440 drivers/message/fusion/mptsas.c list_add_tail(&port_info->list, &ioc->sas_topology); ioc 3441 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->sas_topology_mutex); ioc 3444 drivers/message/fusion/mptsas.c "sas_addr (0x%llx)\n", ioc->name, port_info->num_phys, ioc 3447 drivers/message/fusion/mptsas.c mptsas_expander_refresh(ioc, port_info); ioc 3457 drivers/message/fusion/mptsas.c mptsas_delete_expander_siblings(MPT_ADAPTER *ioc, struct mptsas_portinfo ioc 3471 drivers/message/fusion/mptsas.c mptsas_del_end_device(ioc, phy_info); ioc 3483 drivers/message/fusion/mptsas.c port_info = mptsas_find_portinfo_by_sas_address(ioc, ioc 3493 drivers/message/fusion/mptsas.c mptsas_expander_delete(ioc, port_info, 1); ioc 3507 drivers/message/fusion/mptsas.c static void mptsas_expander_delete(MPT_ADAPTER *ioc, ioc 3523 drivers/message/fusion/mptsas.c mptsas_sas_expander_pg0(ioc, &buffer, ioc 3541 drivers/message/fusion/mptsas.c parent = mptsas_find_portinfo_by_handle(ioc, ioc 3543 drivers/message/fusion/mptsas.c mptsas_delete_expander_siblings(ioc, parent, port_info); ioc 3564 drivers/message/fusion/mptsas.c MYIOC_s_FMT "delete phy %d, phy-obj (0x%p)\n", ioc->name, ioc 3571 drivers/message/fusion/mptsas.c ioc->name, port->port_identifier, ioc 3574 drivers/message/fusion/mptsas.c mptsas_port_delete(ioc, port_details); ioc 3579 drivers/message/fusion/mptsas.c "sas_addr (0x%llx)\n", ioc->name, port_info->num_phys, ioc 3603 drivers/message/fusion/mptsas.c MPT_ADAPTER *ioc; ioc 3609 drivers/message/fusion/mptsas.c ioc = fw_event->ioc; ioc 3614 drivers/message/fusion/mptsas.c port_info = mptsas_find_portinfo_by_sas_address(ioc, sas_address); ioc 3627 drivers/message/fusion/mptsas.c mptsas_expander_refresh(ioc, port_info); ioc 3629 drivers/message/fusion/mptsas.c mptsas_expander_event_add(ioc, expander_data); ioc 3632 drivers/message/fusion/mptsas.c mptsas_expander_delete(ioc, port_info, 0); ioc 3634 drivers/message/fusion/mptsas.c mptsas_free_fw_event(ioc, fw_event); ioc 3645 drivers/message/fusion/mptsas.c mptsas_expander_add(MPT_ADAPTER *ioc, u16 handle) ioc 3650 drivers/message/fusion/mptsas.c if ((mptsas_sas_expander_pg0(ioc, &buffer, ioc 3657 drivers/message/fusion/mptsas.c dfailprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 3658 drivers/message/fusion/mptsas.c "%s: exit at line=%d\n", ioc->name, ioc 3666 drivers/message/fusion/mptsas.c mutex_lock(&ioc->sas_topology_mutex); ioc 3667 drivers/message/fusion/mptsas.c list_add_tail(&port_info->list, &ioc->sas_topology); ioc 3668 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->sas_topology_mutex); ioc 3670 drivers/message/fusion/mptsas.c "sas_addr (0x%llx)\n", ioc->name, port_info->num_phys, ioc 3672 drivers/message/fusion/mptsas.c mptsas_expander_refresh(ioc, port_info); ioc 3679 drivers/message/fusion/mptsas.c MPT_ADAPTER *ioc; ioc 3687 drivers/message/fusion/mptsas.c ioc = fw_event->ioc; ioc 3695 drivers/message/fusion/mptsas.c port_info = mptsas_find_portinfo_by_sas_address(ioc, sas_address); ioc 3707 drivers/message/fusion/mptsas.c if (ioc->old_sas_discovery_protocal) { ioc 3708 drivers/message/fusion/mptsas.c port_info = mptsas_expander_add(ioc, ioc 3716 drivers/message/fusion/mptsas.c if (port_info == ioc->hba_port_info) ioc 3717 drivers/message/fusion/mptsas.c mptsas_probe_hba_phys(ioc); ioc 3719 drivers/message/fusion/mptsas.c mptsas_expander_refresh(ioc, port_info); ioc 3731 drivers/message/fusion/mptsas.c if (ioc->device_missing_delay && ioc 3738 drivers/message/fusion/mptsas.c devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 3740 drivers/message/fusion/mptsas.c ioc->name, phy_info->attached.id, ioc 3743 drivers/message/fusion/mptsas.c shost_for_each_device(sdev, ioc->sh) { ioc 3755 drivers/message/fusion/mptsas.c devtprintk(ioc, ioc 3758 drivers/message/fusion/mptsas.c "%d\n", ioc->name, ioc 3766 drivers/message/fusion/mptsas.c mptsas_free_fw_event(ioc, fw_event); ioc 3770 drivers/message/fusion/mptsas.c mptsas_not_responding_devices(MPT_ADAPTER *ioc) ioc 3782 drivers/message/fusion/mptsas.c mpt_findImVolumes(ioc); ioc 3784 drivers/message/fusion/mptsas.c spin_lock_irqsave(&ioc->taskmgmt_lock, flags); ioc 3785 drivers/message/fusion/mptsas.c if (ioc->ioc_reset_in_progress) { ioc 3786 drivers/message/fusion/mptsas.c dfailprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 3787 drivers/message/fusion/mptsas.c "%s: exiting due to a parallel reset \n", ioc->name, ioc 3789 drivers/message/fusion/mptsas.c spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags); ioc 3792 drivers/message/fusion/mptsas.c spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags); ioc 3795 drivers/message/fusion/mptsas.c mutex_lock(&ioc->sas_device_info_mutex); ioc 3797 drivers/message/fusion/mptsas.c list_for_each_entry(sas_info, &ioc->sas_device_info_list, list) { ioc 3804 drivers/message/fusion/mptsas.c retval = mptsas_sas_device_pg0(ioc, &sas_device, ioc 3813 drivers/message/fusion/mptsas.c spin_lock_irqsave(&ioc->taskmgmt_lock, flags); ioc 3814 drivers/message/fusion/mptsas.c if (ioc->ioc_reset_in_progress) { ioc 3815 drivers/message/fusion/mptsas.c dfailprintk(ioc, ioc 3818 drivers/message/fusion/mptsas.c ioc->name, __func__)); ioc 3820 drivers/message/fusion/mptsas.c (&ioc->taskmgmt_lock, flags); ioc 3821 drivers/message/fusion/mptsas.c mutex_unlock(&ioc-> ioc 3825 drivers/message/fusion/mptsas.c spin_unlock_irqrestore(&ioc->taskmgmt_lock, ioc 3834 drivers/message/fusion/mptsas.c devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 3837 drivers/message/fusion/mptsas.c ioc->name, __func__, ioc 3843 drivers/message/fusion/mptsas.c vtarget = mptsas_find_vtarget(ioc, ioc 3849 drivers/message/fusion/mptsas.c phy_info = mptsas_find_phyinfo_by_sas_address(ioc, ioc 3852 drivers/message/fusion/mptsas.c mptsas_del_end_device(ioc, phy_info); ioc 3855 drivers/message/fusion/mptsas.c mptsas_volume_delete(ioc, sas_info->fw.id); ioc 3857 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->sas_device_info_mutex); ioc 3860 drivers/message/fusion/mptsas.c mutex_lock(&ioc->sas_topology_mutex); ioc 3862 drivers/message/fusion/mptsas.c list_for_each_entry(port_info, &ioc->sas_topology, list) { ioc 3869 drivers/message/fusion/mptsas.c while (!mptsas_sas_expander_pg0(ioc, &buffer, ioc 3883 drivers/message/fusion/mptsas.c mptsas_expander_delete(ioc, port_info, 0); ioc 3887 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->sas_topology_mutex); ioc 3896 drivers/message/fusion/mptsas.c mptsas_probe_expanders(MPT_ADAPTER *ioc) ioc 3903 drivers/message/fusion/mptsas.c while (!mptsas_sas_expander_pg0(ioc, &buffer, ioc 3908 drivers/message/fusion/mptsas.c port_info = mptsas_find_portinfo_by_sas_address(ioc, ioc 3918 drivers/message/fusion/mptsas.c mptsas_expander_refresh(ioc, port_info); ioc 3925 drivers/message/fusion/mptsas.c dfailprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 3926 drivers/message/fusion/mptsas.c "%s: exit at line=%d\n", ioc->name, ioc 3934 drivers/message/fusion/mptsas.c mutex_lock(&ioc->sas_topology_mutex); ioc 3935 drivers/message/fusion/mptsas.c list_add_tail(&port_info->list, &ioc->sas_topology); ioc 3936 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->sas_topology_mutex); ioc 3938 drivers/message/fusion/mptsas.c "sas_addr (0x%llx)\n", ioc->name, port_info->num_phys, ioc 3940 drivers/message/fusion/mptsas.c mptsas_expander_refresh(ioc, port_info); ioc 3945 drivers/message/fusion/mptsas.c mptsas_probe_devices(MPT_ADAPTER *ioc) ioc 3952 drivers/message/fusion/mptsas.c while (!(mptsas_sas_device_pg0(ioc, &sas_device, ioc 3970 drivers/message/fusion/mptsas.c phy_info = mptsas_refreshing_device_handles(ioc, &sas_device); ioc 3977 drivers/message/fusion/mptsas.c mptsas_add_end_device(ioc, phy_info); ioc 3988 drivers/message/fusion/mptsas.c mptsas_scan_sas_topology(MPT_ADAPTER *ioc) ioc 3993 drivers/message/fusion/mptsas.c mptsas_probe_hba_phys(ioc); ioc 3994 drivers/message/fusion/mptsas.c mptsas_probe_expanders(ioc); ioc 3995 drivers/message/fusion/mptsas.c mptsas_probe_devices(ioc); ioc 4000 drivers/message/fusion/mptsas.c if (!ioc->ir_firmware || !ioc->raid_data.pIocPg2 || ioc 4001 drivers/message/fusion/mptsas.c !ioc->raid_data.pIocPg2->NumActiveVolumes) ioc 4003 drivers/message/fusion/mptsas.c for (i = 0; i < ioc->raid_data.pIocPg2->NumActiveVolumes; i++) { ioc 4004 drivers/message/fusion/mptsas.c sdev = scsi_device_lookup(ioc->sh, MPTSAS_RAID_CHANNEL, ioc 4005 drivers/message/fusion/mptsas.c ioc->raid_data.pIocPg2->RaidVolume[i].VolumeID, 0); ioc 4011 drivers/message/fusion/mptsas.c "id %d\n", ioc->name, MPTSAS_RAID_CHANNEL, ioc 4012 drivers/message/fusion/mptsas.c ioc->raid_data.pIocPg2->RaidVolume[i].VolumeID); ioc 4013 drivers/message/fusion/mptsas.c scsi_add_device(ioc->sh, MPTSAS_RAID_CHANNEL, ioc 4014 drivers/message/fusion/mptsas.c ioc->raid_data.pIocPg2->RaidVolume[i].VolumeID, 0); ioc 4022 drivers/message/fusion/mptsas.c MPT_ADAPTER *ioc; ioc 4033 drivers/message/fusion/mptsas.c ioc = fw_event->ioc; ioc 4040 drivers/message/fusion/mptsas.c mutex_lock(&ioc->sas_device_info_mutex); ioc 4041 drivers/message/fusion/mptsas.c if (mptscsih_is_phys_disk(ioc, fw_channel, fw_id)) { ioc 4042 drivers/message/fusion/mptsas.c list_for_each_entry(sas_info, &ioc->sas_device_info_list, ioc 4056 drivers/message/fusion/mptsas.c list_for_each_entry(sas_info, &ioc->sas_device_info_list, ioc 4073 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->sas_device_info_mutex); ioc 4076 drivers/message/fusion/mptsas.c shost_for_each_device(sdev, ioc->sh) { ioc 4103 drivers/message/fusion/mptsas.c mptsas_free_fw_event(ioc, fw_event); ioc 4108 drivers/message/fusion/mptsas.c mptsas_find_phyinfo_by_sas_address(MPT_ADAPTER *ioc, u64 sas_address) ioc 4114 drivers/message/fusion/mptsas.c mutex_lock(&ioc->sas_topology_mutex); ioc 4115 drivers/message/fusion/mptsas.c list_for_each_entry(port_info, &ioc->sas_topology, list) { ioc 4127 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->sas_topology_mutex); ioc 4140 drivers/message/fusion/mptsas.c mptsas_find_phyinfo_by_phys_disk_num(MPT_ADAPTER *ioc, u8 phys_disk_num, ioc 4151 drivers/message/fusion/mptsas.c if (!ioc->raid_data.pIocPg3) ioc 4154 drivers/message/fusion/mptsas.c num_paths = mpt_raid_phys_disk_get_num_paths(ioc, phys_disk_num); ioc 4161 drivers/message/fusion/mptsas.c mpt_raid_phys_disk_pg1(ioc, phys_disk_num, phys_disk); ioc 4170 drivers/message/fusion/mptsas.c phy_info = mptsas_find_phyinfo_by_sas_address(ioc, ioc 4185 drivers/message/fusion/mptsas.c mutex_lock(&ioc->sas_topology_mutex); ioc 4186 drivers/message/fusion/mptsas.c list_for_each_entry(port_info, &ioc->sas_topology, list) { ioc 4201 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->sas_topology_mutex); ioc 4222 drivers/message/fusion/mptsas.c mptsas_adding_inactive_raid_components(MPT_ADAPTER *ioc, u8 channel, u8 id) ioc 4241 drivers/message/fusion/mptsas.c if (mpt_config(ioc, &cfg) != 0) ioc 4247 drivers/message/fusion/mptsas.c buffer = pci_alloc_consistent(ioc->pcidev, hdr.PageLength * 4, ioc 4256 drivers/message/fusion/mptsas.c if (mpt_config(ioc, &cfg) != 0) ioc 4268 drivers/message/fusion/mptsas.c if (mpt_raid_phys_disk_pg0(ioc, ioc 4272 drivers/message/fusion/mptsas.c if (mptsas_sas_device_pg0(ioc, &sas_device, ioc 4287 drivers/message/fusion/mptsas.c phy_info = mptsas_find_phyinfo_by_sas_address(ioc, ioc 4289 drivers/message/fusion/mptsas.c mptsas_add_end_device(ioc, phy_info); ioc 4294 drivers/message/fusion/mptsas.c pci_free_consistent(ioc->pcidev, hdr.PageLength * 4, buffer, ioc 4301 drivers/message/fusion/mptsas.c mptsas_hotplug_work(MPT_ADAPTER *ioc, struct fw_event_work *fw_event, ioc 4315 drivers/message/fusion/mptsas.c if (!ioc->raid_data.pIocPg2) ioc 4318 drivers/message/fusion/mptsas.c for (i = 0; i < ioc->raid_data.pIocPg2->NumActiveVolumes; i++) { ioc 4319 drivers/message/fusion/mptsas.c if (ioc->raid_data.pIocPg2->RaidVolume[i].VolumeID == ioc 4323 drivers/message/fusion/mptsas.c "volume_id\n", ioc->name); ioc 4324 drivers/message/fusion/mptsas.c mptsas_free_fw_event(ioc, fw_event); ioc 4328 drivers/message/fusion/mptsas.c mpt_findImVolumes(ioc); ioc 4333 drivers/message/fusion/mptsas.c mptsas_sas_device_pg0(ioc, &sas_device, ioc 4349 drivers/message/fusion/mptsas.c phy_info = mptsas_refreshing_device_handles(ioc, &sas_device); ioc 4352 drivers/message/fusion/mptsas.c devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 4354 drivers/message/fusion/mptsas.c "parent handle of device %x\n", ioc->name, ioc 4356 drivers/message/fusion/mptsas.c port_info = mptsas_find_portinfo_by_handle(ioc, ioc 4359 drivers/message/fusion/mptsas.c if (port_info == ioc->hba_port_info) ioc 4360 drivers/message/fusion/mptsas.c mptsas_probe_hba_phys(ioc); ioc 4362 drivers/message/fusion/mptsas.c mptsas_expander_refresh(ioc, port_info); ioc 4364 drivers/message/fusion/mptsas.c dfailprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 4366 drivers/message/fusion/mptsas.c ioc->name, __func__, __LINE__)); ioc 4370 drivers/message/fusion/mptsas.c (ioc, &sas_device); ioc 4374 drivers/message/fusion/mptsas.c dfailprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 4376 drivers/message/fusion/mptsas.c ioc->name, __func__, __LINE__)); ioc 4383 drivers/message/fusion/mptsas.c mptsas_add_end_device(ioc, phy_info); ioc 4387 drivers/message/fusion/mptsas.c phy_info = mptsas_find_phyinfo_by_sas_address(ioc, ioc 4389 drivers/message/fusion/mptsas.c mptsas_del_end_device(ioc, phy_info); ioc 4394 drivers/message/fusion/mptsas.c mpt_findImVolumes(ioc); ioc 4397 drivers/message/fusion/mptsas.c ioc, hot_plug_info->phys_disk_num, ioc 4400 drivers/message/fusion/mptsas.c mptsas_del_end_device(ioc, phy_info); ioc 4405 drivers/message/fusion/mptsas.c if (mptsas_sas_device_pg0(ioc, &sas_device, ioc 4409 drivers/message/fusion/mptsas.c dfailprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 4410 drivers/message/fusion/mptsas.c "%s: fw_id=%d exit at line=%d\n", ioc->name, ioc 4423 drivers/message/fusion/mptsas.c ioc, sas_device.sas_address); ioc 4426 drivers/message/fusion/mptsas.c dfailprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 4427 drivers/message/fusion/mptsas.c "%s: fw_id=%d exit at line=%d\n", ioc->name, ioc 4434 drivers/message/fusion/mptsas.c dfailprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 4435 drivers/message/fusion/mptsas.c "%s: fw_id=%d exit at line=%d\n", ioc->name, ioc 4442 drivers/message/fusion/mptsas.c dfailprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 4443 drivers/message/fusion/mptsas.c "%s: fw_id=%d exit at line=%d\n", ioc->name, ioc 4448 drivers/message/fusion/mptsas.c mpt_findImVolumes(ioc); ioc 4452 drivers/message/fusion/mptsas.c ioc->name, hot_plug_info->channel, hot_plug_info->id, ioc 4464 drivers/message/fusion/mptsas.c if (mptsas_sas_device_pg0(ioc, &sas_device, ioc 4468 drivers/message/fusion/mptsas.c dfailprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 4470 drivers/message/fusion/mptsas.c ioc->name, __func__, ioc 4482 drivers/message/fusion/mptsas.c phy_info = mptsas_find_phyinfo_by_sas_address(ioc, ioc 4485 drivers/message/fusion/mptsas.c dfailprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 4486 drivers/message/fusion/mptsas.c "%s: fw_id=%d exit at line=%d\n", ioc->name, ioc 4493 drivers/message/fusion/mptsas.c dfailprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 4494 drivers/message/fusion/mptsas.c "%s: fw_id=%d exit at line=%d\n", ioc->name, ioc 4501 drivers/message/fusion/mptsas.c dfailprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 4502 drivers/message/fusion/mptsas.c "%s: fw_id=%d exit at line=%d\n", ioc->name, ioc 4508 drivers/message/fusion/mptsas.c dfailprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 4509 drivers/message/fusion/mptsas.c "%s: fw_id=%d exit at line=%d\n", ioc->name, ioc 4514 drivers/message/fusion/mptsas.c mpt_findImVolumes(ioc); ioc 4518 drivers/message/fusion/mptsas.c ioc->name, hot_plug_info->channel, hot_plug_info->id, ioc 4526 drivers/message/fusion/mptsas.c mptsas_add_device_component_by_fw(ioc, ioc 4532 drivers/message/fusion/mptsas.c mpt_findImVolumes(ioc); ioc 4534 drivers/message/fusion/mptsas.c "id %d\n", ioc->name, MPTSAS_RAID_CHANNEL, ioc 4536 drivers/message/fusion/mptsas.c scsi_add_device(ioc->sh, MPTSAS_RAID_CHANNEL, ioc 4542 drivers/message/fusion/mptsas.c mpt_findImVolumes(ioc); ioc 4544 drivers/message/fusion/mptsas.c "id %d\n", ioc->name, MPTSAS_RAID_CHANNEL, ioc 4552 drivers/message/fusion/mptsas.c mpt_findImVolumes(ioc); ioc 4553 drivers/message/fusion/mptsas.c mptsas_adding_inactive_raid_components(ioc, ioc 4561 drivers/message/fusion/mptsas.c mptsas_free_fw_event(ioc, fw_event); ioc 4567 drivers/message/fusion/mptsas.c MPT_ADAPTER *ioc; ioc 4573 drivers/message/fusion/mptsas.c ioc = fw_event->ioc; ioc 4582 drivers/message/fusion/mptsas.c mptsas_free_fw_event(ioc, fw_event); ioc 4588 drivers/message/fusion/mptsas.c mptbase_sas_persist_operation(ioc, ioc 4590 drivers/message/fusion/mptsas.c mptsas_free_fw_event(ioc, fw_event); ioc 4611 drivers/message/fusion/mptsas.c mptsas_hotplug_work(ioc, fw_event, &hot_plug_info); ioc 4615 drivers/message/fusion/mptsas.c mptbase_sas_persist_operation(ioc, ioc 4617 drivers/message/fusion/mptsas.c mptsas_free_fw_event(ioc, fw_event); ioc 4625 drivers/message/fusion/mptsas.c mptsas_free_fw_event(ioc, fw_event); ioc 4633 drivers/message/fusion/mptsas.c MPT_ADAPTER *ioc; ioc 4642 drivers/message/fusion/mptsas.c ioc = fw_event->ioc; ioc 4656 drivers/message/fusion/mptsas.c sdev = scsi_device_lookup(ioc->sh, MPTSAS_RAID_CHANNEL, ioc 4663 drivers/message/fusion/mptsas.c devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Entering %s: " ioc 4664 drivers/message/fusion/mptsas.c "ReasonCode=%02x\n", ioc->name, __func__, ioc 4678 drivers/message/fusion/mptsas.c mpt_raid_phys_disk_pg0(ioc, ioc 4741 drivers/message/fusion/mptsas.c mptsas_hotplug_work(ioc, fw_event, &hot_plug_info); ioc 4743 drivers/message/fusion/mptsas.c mptsas_free_fw_event(ioc, fw_event); ioc 4760 drivers/message/fusion/mptsas.c mptsas_issue_tm(MPT_ADAPTER *ioc, u8 type, u8 channel, u8 id, u64 lun, ioc 4769 drivers/message/fusion/mptsas.c mf = mpt_get_msg_frame(mptsasDeviceResetCtx, ioc); ioc 4772 drivers/message/fusion/mptsas.c dtmprintk(ioc, printk(MYIOC_s_WARN_FMT "TaskMgmt request: no " ioc 4773 drivers/message/fusion/mptsas.c "msg frames!!\n", ioc->name)); ioc 4777 drivers/message/fusion/mptsas.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TaskMgmt request: mr = %p, " ioc 4779 drivers/message/fusion/mptsas.c "fw_id = %d, lun = %lld,\n\t task_context = 0x%x\n", ioc->name, mf, ioc 4796 drivers/message/fusion/mptsas.c INITIALIZE_MGMT_STATUS(ioc->taskmgmt_cmds.status) ioc 4797 drivers/message/fusion/mptsas.c CLEAR_MGMT_STATUS(ioc->internal_cmds.status) ioc 4799 drivers/message/fusion/mptsas.c mpt_put_msg_frame_hi_pri(mptsasDeviceResetCtx, ioc, mf); ioc 4802 drivers/message/fusion/mptsas.c timeleft = wait_for_completion_timeout(&ioc->taskmgmt_cmds.done, ioc 4804 drivers/message/fusion/mptsas.c if (!(ioc->taskmgmt_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) { ioc 4806 drivers/message/fusion/mptsas.c dtmprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 4807 drivers/message/fusion/mptsas.c "TaskMgmt request: TIMED OUT!(mr=%p)\n", ioc->name, mf)); ioc 4808 drivers/message/fusion/mptsas.c mpt_free_msg_frame(ioc, mf); ioc 4809 drivers/message/fusion/mptsas.c if (ioc->taskmgmt_cmds.status & MPT_MGMT_STATUS_DID_IOCRESET) ioc 4815 drivers/message/fusion/mptsas.c if (!(ioc->taskmgmt_cmds.status & MPT_MGMT_STATUS_RF_VALID)) { ioc 4817 drivers/message/fusion/mptsas.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 4818 drivers/message/fusion/mptsas.c "TaskMgmt request: failed with no reply\n", ioc->name)); ioc 4823 drivers/message/fusion/mptsas.c CLEAR_MGMT_STATUS(ioc->taskmgmt_cmds.status) ioc 4836 drivers/message/fusion/mptsas.c MPT_ADAPTER *ioc = fw_event->ioc; ioc 4849 drivers/message/fusion/mptsas.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 4850 drivers/message/fusion/mptsas.c "%s - enter\n", ioc->name, __func__)); ioc 4852 drivers/message/fusion/mptsas.c mutex_lock(&ioc->taskmgmt_cmds.mutex); ioc 4853 drivers/message/fusion/mptsas.c if (mpt_set_taskmgmt_in_progress_flag(ioc) != 0) { ioc 4854 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->taskmgmt_cmds.mutex); ioc 4855 drivers/message/fusion/mptsas.c mptsas_requeue_fw_event(ioc, fw_event, 1000); ioc 4862 drivers/message/fusion/mptsas.c mpt_findImVolumes(ioc); ioc 4863 drivers/message/fusion/mptsas.c pScsiTmReply = (SCSITaskMgmtReply_t *) ioc->taskmgmt_cmds.reply; ioc 4865 drivers/message/fusion/mptsas.c for (ii = 0; ii < ioc->req_depth; ii++) { ioc 4866 drivers/message/fusion/mptsas.c if (ioc->fw_events_off) ioc 4868 drivers/message/fusion/mptsas.c sc = mptscsih_get_scsi_lookup(ioc, ii); ioc 4871 drivers/message/fusion/mptsas.c mf = MPT_INDEX_2_MFPTR(ioc, ii); ioc 4885 drivers/message/fusion/mptsas.c if (mptsas_issue_tm(ioc, MPI_SCSITASKMGMT_TASKTYPE_QUERY_TASK, ioc 4897 drivers/message/fusion/mptsas.c if (mptsas_issue_tm(ioc, ioc 4906 drivers/message/fusion/mptsas.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 4908 drivers/message/fusion/mptsas.c ioc->name, __func__, query_count, termination_count)); ioc 4910 drivers/message/fusion/mptsas.c ioc->broadcast_aen_busy = 0; ioc 4911 drivers/message/fusion/mptsas.c mpt_clear_taskmgmt_in_progress_flag(ioc); ioc 4912 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->taskmgmt_cmds.mutex); ioc 4917 drivers/message/fusion/mptsas.c ioc->name, __func__, mpt_GetIocState(ioc, 0)); ioc 4918 drivers/message/fusion/mptsas.c mpt_Soft_Hard_ResetHandler(ioc, CAN_SLEEP); ioc 4920 drivers/message/fusion/mptsas.c mptsas_free_fw_event(ioc, fw_event); ioc 4934 drivers/message/fusion/mptsas.c MPT_ADAPTER *ioc; ioc 4940 drivers/message/fusion/mptsas.c ioc = fw_event->ioc; ioc 4944 drivers/message/fusion/mptsas.c devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Entering %s: " ioc 4945 drivers/message/fusion/mptsas.c "ReasonCode=%02x\n", ioc->name, __func__, reasonCode)); ioc 4960 drivers/message/fusion/mptsas.c mpt_raid_phys_disk_pg0(ioc, ioc 4966 drivers/message/fusion/mptsas.c mptsas_free_fw_event(ioc, fw_event); ioc 4969 drivers/message/fusion/mptsas.c mptsas_hotplug_work(ioc, fw_event, &hot_plug_info); ioc 4973 drivers/message/fusion/mptsas.c mptsas_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *reply) ioc 4980 drivers/message/fusion/mptsas.c if (ioc->bus_type != SAS) ioc 4984 drivers/message/fusion/mptsas.c if (ioc->fw_events_off) ioc 4996 drivers/message/fusion/mptsas.c if (ioc->broadcast_aen_busy) ioc 4998 drivers/message/fusion/mptsas.c ioc->broadcast_aen_busy = 1; ioc 5010 drivers/message/fusion/mptsas.c mptsas_target_reset_queue(ioc, sas_event_data); ioc 5015 drivers/message/fusion/mptsas.c ioc->device_missing_delay && ioc 5023 drivers/message/fusion/mptsas.c vtarget = mptsas_find_vtarget(ioc, channel, id); ioc 5025 drivers/message/fusion/mptsas.c devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 5028 drivers/message/fusion/mptsas.c "fw_id %d fw_channel %d\n", ioc->name, ioc 5032 drivers/message/fusion/mptsas.c devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 5034 drivers/message/fusion/mptsas.c ioc->name)); ioc 5036 drivers/message/fusion/mptsas.c devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 5038 drivers/message/fusion/mptsas.c ioc->name)); ioc 5053 drivers/message/fusion/mptsas.c if (ioc->old_sas_discovery_protocal) ioc 5058 drivers/message/fusion/mptsas.c ioc->device_missing_delay) ioc 5059 drivers/message/fusion/mptsas.c delay = HZ * ioc->device_missing_delay; ioc 5069 drivers/message/fusion/mptsas.c ioc->sas_discovery_quiesce_io = discovery_status ? 1 : 0; ioc 5070 drivers/message/fusion/mptsas.c if (ioc->old_sas_discovery_protocal && !discovery_status) ioc 5071 drivers/message/fusion/mptsas.c mptsas_queue_rescan(ioc); ioc 5088 drivers/message/fusion/mptsas.c printk(MYIOC_s_WARN_FMT "%s: failed at (line=%d)\n", ioc->name, ioc 5094 drivers/message/fusion/mptsas.c fw_event->ioc = ioc; ioc 5095 drivers/message/fusion/mptsas.c mptsas_add_fw_event(ioc, fw_event, delay); ioc 5101 drivers/message/fusion/mptsas.c static void mptsas_volume_delete(MPT_ADAPTER *ioc, u8 id) ioc 5106 drivers/message/fusion/mptsas.c sdev = scsi_device_lookup(ioc->sh, MPTSAS_RAID_CHANNEL, id, 0); ioc 5109 drivers/message/fusion/mptsas.c if (!ioc->raid_data.pIocPg2) ioc 5111 drivers/message/fusion/mptsas.c if (!ioc->raid_data.pIocPg2->NumActiveVolumes) ioc 5113 drivers/message/fusion/mptsas.c for (i = 0; i < ioc->raid_data.pIocPg2->NumActiveVolumes; i++) ioc 5114 drivers/message/fusion/mptsas.c if (ioc->raid_data.pIocPg2->RaidVolume[i].VolumeID == id) ioc 5118 drivers/message/fusion/mptsas.c "id %d\n", ioc->name, MPTSAS_RAID_CHANNEL, id); ioc 5129 drivers/message/fusion/mptsas.c MPT_ADAPTER *ioc; ioc 5142 drivers/message/fusion/mptsas.c ioc = pci_get_drvdata(pdev); ioc 5143 drivers/message/fusion/mptsas.c mptsas_fw_event_off(ioc); ioc 5144 drivers/message/fusion/mptsas.c ioc->DoneCtx = mptsasDoneCtx; ioc 5145 drivers/message/fusion/mptsas.c ioc->TaskCtx = mptsasTaskCtx; ioc 5146 drivers/message/fusion/mptsas.c ioc->InternalCtx = mptsasInternalCtx; ioc 5147 drivers/message/fusion/mptsas.c ioc->schedule_target_reset = &mptsas_schedule_target_reset; ioc 5148 drivers/message/fusion/mptsas.c ioc->schedule_dead_ioc_flush_running_cmds = ioc 5152 drivers/message/fusion/mptsas.c if (ioc->last_state != MPI_IOC_STATE_OPERATIONAL) { ioc 5155 drivers/message/fusion/mptsas.c ioc->name); ioc 5160 drivers/message/fusion/mptsas.c if (!ioc->active) { ioc 5162 drivers/message/fusion/mptsas.c ioc->name); ioc 5170 drivers/message/fusion/mptsas.c for (ii = 0; ii < ioc->facts.NumberOfPorts; ii++) { ioc 5171 drivers/message/fusion/mptsas.c if (ioc->pfacts[ii].ProtocolFlags & ioc 5179 drivers/message/fusion/mptsas.c "is NOT enabled!\n", ioc->name, ioc); ioc 5187 drivers/message/fusion/mptsas.c ioc->name); ioc 5192 drivers/message/fusion/mptsas.c spin_lock_irqsave(&ioc->FreeQlock, flags); ioc 5196 drivers/message/fusion/mptsas.c ioc->sh = sh; ioc 5204 drivers/message/fusion/mptsas.c sh->can_queue = min_t(int, ioc->req_depth - 10, sh->can_queue); ioc 5211 drivers/message/fusion/mptsas.c sh->unique_id = ioc->id; ioc 5213 drivers/message/fusion/mptsas.c INIT_LIST_HEAD(&ioc->sas_topology); ioc 5214 drivers/message/fusion/mptsas.c mutex_init(&ioc->sas_topology_mutex); ioc 5215 drivers/message/fusion/mptsas.c mutex_init(&ioc->sas_discovery_mutex); ioc 5216 drivers/message/fusion/mptsas.c mutex_init(&ioc->sas_mgmt.mutex); ioc 5217 drivers/message/fusion/mptsas.c init_completion(&ioc->sas_mgmt.done); ioc 5228 drivers/message/fusion/mptsas.c scale = ioc->req_sz/ioc->SGE_size; ioc 5229 drivers/message/fusion/mptsas.c if (ioc->sg_addr_size == sizeof(u64)) { ioc 5231 drivers/message/fusion/mptsas.c (ioc->facts.MaxChainDepth-1) + scale + ioc 5232 drivers/message/fusion/mptsas.c (ioc->req_sz - 60) / ioc->SGE_size; ioc 5235 drivers/message/fusion/mptsas.c (ioc->facts.MaxChainDepth-1) + scale + ioc 5236 drivers/message/fusion/mptsas.c (ioc->req_sz - 64) / ioc->SGE_size; ioc 5241 drivers/message/fusion/mptsas.c dprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 5243 drivers/message/fusion/mptsas.c ioc->name, numSGE, sh->sg_tablesize)); ioc 5252 drivers/message/fusion/mptsas.c "Range from 64 to 8192\n", ioc->name, ioc 5256 drivers/message/fusion/mptsas.c dprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 5258 drivers/message/fusion/mptsas.c ioc->name, mpt_loadtime_max_sectors, sh->max_sectors)); ioc 5263 drivers/message/fusion/mptsas.c hd->ioc = ioc; ioc 5268 drivers/message/fusion/mptsas.c ioc->ScsiLookup = kcalloc(ioc->req_depth, sizeof(void *), GFP_ATOMIC); ioc 5269 drivers/message/fusion/mptsas.c if (!ioc->ScsiLookup) { ioc 5271 drivers/message/fusion/mptsas.c spin_unlock_irqrestore(&ioc->FreeQlock, flags); ioc 5274 drivers/message/fusion/mptsas.c spin_lock_init(&ioc->scsi_lookup_lock); ioc 5276 drivers/message/fusion/mptsas.c dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "ScsiLookup @ %p\n", ioc 5277 drivers/message/fusion/mptsas.c ioc->name, ioc->ScsiLookup)); ioc 5279 drivers/message/fusion/mptsas.c ioc->sas_data.ptClear = mpt_pt_clear; ioc 5283 drivers/message/fusion/mptsas.c INIT_LIST_HEAD(&ioc->sas_device_info_list); ioc 5284 drivers/message/fusion/mptsas.c mutex_init(&ioc->sas_device_info_mutex); ioc 5286 drivers/message/fusion/mptsas.c spin_unlock_irqrestore(&ioc->FreeQlock, flags); ioc 5288 drivers/message/fusion/mptsas.c if (ioc->sas_data.ptClear==1) { ioc 5290 drivers/message/fusion/mptsas.c ioc, MPI_SAS_OP_CLEAR_ALL_PERSISTENT); ioc 5293 drivers/message/fusion/mptsas.c error = scsi_add_host(sh, &ioc->pcidev->dev); ioc 5295 drivers/message/fusion/mptsas.c dprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 5296 drivers/message/fusion/mptsas.c "scsi_add_host failed\n", ioc->name)); ioc 5301 drivers/message/fusion/mptsas.c if ((ioc->facts.HeaderVersion >> 8) < 0xE) ioc 5302 drivers/message/fusion/mptsas.c ioc->old_sas_discovery_protocal = 1; ioc 5303 drivers/message/fusion/mptsas.c mptsas_scan_sas_topology(ioc); ioc 5304 drivers/message/fusion/mptsas.c mptsas_fw_event_on(ioc); ioc 5316 drivers/message/fusion/mptsas.c MPT_ADAPTER *ioc = pci_get_drvdata(pdev); ioc 5318 drivers/message/fusion/mptsas.c mptsas_fw_event_off(ioc); ioc 5319 drivers/message/fusion/mptsas.c mptsas_cleanup_fw_event_q(ioc); ioc 5324 drivers/message/fusion/mptsas.c MPT_ADAPTER *ioc = pci_get_drvdata(pdev); ioc 5328 drivers/message/fusion/mptsas.c if (!ioc->sh) { ioc 5329 drivers/message/fusion/mptsas.c printk(MYIOC_s_INFO_FMT "IOC is in Target mode\n", ioc->name); ioc 5336 drivers/message/fusion/mptsas.c mptsas_del_device_components(ioc); ioc 5338 drivers/message/fusion/mptsas.c ioc->sas_discovery_ignore_events = 1; ioc 5339 drivers/message/fusion/mptsas.c sas_remove_host(ioc->sh); ioc 5341 drivers/message/fusion/mptsas.c mutex_lock(&ioc->sas_topology_mutex); ioc 5342 drivers/message/fusion/mptsas.c list_for_each_entry_safe(p, n, &ioc->sas_topology, list) { ioc 5345 drivers/message/fusion/mptsas.c mptsas_port_delete(ioc, p->phy_info[i].port_details); ioc 5350 drivers/message/fusion/mptsas.c mutex_unlock(&ioc->sas_topology_mutex); ioc 5351 drivers/message/fusion/mptsas.c ioc->hba_port_info = NULL; ioc 95 drivers/message/fusion/mptsas.h MPT_ADAPTER *ioc; ioc 110 drivers/message/fusion/mptsas.h MPT_ADAPTER *ioc; ioc 118 drivers/message/fusion/mptsas.h MPT_ADAPTER *ioc; ioc 84 drivers/message/fusion/mptscsih.c struct scsi_cmnd *mptscsih_get_scsi_lookup(MPT_ADAPTER *ioc, int i); ioc 85 drivers/message/fusion/mptscsih.c static struct scsi_cmnd * mptscsih_getclear_scsi_lookup(MPT_ADAPTER *ioc, int i); ioc 86 drivers/message/fusion/mptscsih.c static void mptscsih_set_scsi_lookup(MPT_ADAPTER *ioc, int i, struct scsi_cmnd *scmd); ioc 87 drivers/message/fusion/mptscsih.c static int SCPNT_TO_LOOKUP_IDX(MPT_ADAPTER *ioc, struct scsi_cmnd *scmd); ioc 88 drivers/message/fusion/mptscsih.c int mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r); ioc 90 drivers/message/fusion/mptscsih.c int mptscsih_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r); ioc 92 drivers/message/fusion/mptscsih.c static int mptscsih_AddSGE(MPT_ADAPTER *ioc, struct scsi_cmnd *SCpnt, ioc 94 drivers/message/fusion/mptscsih.c static void mptscsih_freeChainBuffers(MPT_ADAPTER *ioc, int req_idx); ioc 100 drivers/message/fusion/mptscsih.c int mptscsih_ioc_reset(MPT_ADAPTER *ioc, int post_reset); ioc 101 drivers/message/fusion/mptscsih.c int mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply); ioc 104 drivers/message/fusion/mptscsih.c mptscsih_taskmgmt_response_code(MPT_ADAPTER *ioc, u8 response_code); ioc 105 drivers/message/fusion/mptscsih.c static int mptscsih_get_completion_code(MPT_ADAPTER *ioc, ioc 107 drivers/message/fusion/mptscsih.c int mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r); ioc 112 drivers/message/fusion/mptscsih.c mptscsih_taskmgmt_reply(MPT_ADAPTER *ioc, u8 type, ioc 134 drivers/message/fusion/mptscsih.c mptscsih_getFreeChainBuffer(MPT_ADAPTER *ioc, int *retIndex) ioc 141 drivers/message/fusion/mptscsih.c dsgprintk(ioc, printk(MYIOC_s_DEBUG_FMT "getFreeChainBuffer called\n", ioc 142 drivers/message/fusion/mptscsih.c ioc->name)); ioc 143 drivers/message/fusion/mptscsih.c spin_lock_irqsave(&ioc->FreeQlock, flags); ioc 144 drivers/message/fusion/mptscsih.c if (!list_empty(&ioc->FreeChainQ)) { ioc 147 drivers/message/fusion/mptscsih.c chainBuf = list_entry(ioc->FreeChainQ.next, MPT_FRAME_HDR, ioc 150 drivers/message/fusion/mptscsih.c offset = (u8 *)chainBuf - (u8 *)ioc->ChainBuffer; ioc 151 drivers/message/fusion/mptscsih.c chain_idx = offset / ioc->req_sz; ioc 153 drivers/message/fusion/mptscsih.c dsgprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 155 drivers/message/fusion/mptscsih.c ioc->name, chainBuf, ioc->ChainBuffer, offset, chain_idx)); ioc 159 drivers/message/fusion/mptscsih.c dfailprintk(ioc, printk(MYIOC_s_ERR_FMT "getFreeChainBuffer failed\n", ioc 160 drivers/message/fusion/mptscsih.c ioc->name)); ioc 162 drivers/message/fusion/mptscsih.c spin_unlock_irqrestore(&ioc->FreeQlock, flags); ioc 179 drivers/message/fusion/mptscsih.c mptscsih_AddSGE(MPT_ADAPTER *ioc, struct scsi_cmnd *SCpnt, ioc 205 drivers/message/fusion/mptscsih.c frm_sz = ioc->req_sz; ioc 228 drivers/message/fusion/mptscsih.c numSgeSlots = ((frm_sz - sgeOffset) / ioc->SGE_size); ioc 247 drivers/message/fusion/mptscsih.c ioc->add_sge(psge, sgflags | thisxfer, v2); ioc 251 drivers/message/fusion/mptscsih.c psge += ioc->SGE_size; ioc 252 drivers/message/fusion/mptscsih.c sgeOffset += ioc->SGE_size; ioc 269 drivers/message/fusion/mptscsih.c ioc->add_sge(psge, sgflags | thisxfer, v2); ioc 270 drivers/message/fusion/mptscsih.c sgeOffset += ioc->SGE_size; ioc 279 drivers/message/fusion/mptscsih.c ioc->add_chain((char *)chainSge, 0, sgeOffset, ioc 280 drivers/message/fusion/mptscsih.c ioc->ChainBufferDMA + chain_dma_off); ioc 286 drivers/message/fusion/mptscsih.c RequestNB = (((sgeOffset - 1) >> ioc->NBShiftFactor) + 1) & 0x03; ioc 287 drivers/message/fusion/mptscsih.c dsgprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 288 drivers/message/fusion/mptscsih.c "Single Buffer RequestNB=%x, sgeOffset=%d\n", ioc->name, RequestNB, sgeOffset)); ioc 289 drivers/message/fusion/mptscsih.c ioc->RequestNB[req_idx] = RequestNB; ioc 303 drivers/message/fusion/mptscsih.c dsgprintk(ioc, printk(MYIOC_s_DEBUG_FMT "SG: Chain Required! sg done %d\n", ioc 304 drivers/message/fusion/mptscsih.c ioc->name, sg_done)); ioc 313 drivers/message/fusion/mptscsih.c u32 *ptmp = (u32 *) (psge - ioc->SGE_size); ioc 327 drivers/message/fusion/mptscsih.c sgeOffset += ioc->SGE_size; ioc 328 drivers/message/fusion/mptscsih.c ioc->add_chain((char *)chainSge, nextChain, sgeOffset, ioc 329 drivers/message/fusion/mptscsih.c ioc->ChainBufferDMA + chain_dma_off); ioc 336 drivers/message/fusion/mptscsih.c RequestNB = (((sgeOffset - 1) >> ioc->NBShiftFactor) + 1) & 0x03; ioc 337 drivers/message/fusion/mptscsih.c dsgprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Chain Buffer Needed, RequestNB=%x sgeOffset=%d\n", ioc->name, RequestNB, sgeOffset)); ioc 338 drivers/message/fusion/mptscsih.c ioc->RequestNB[req_idx] = RequestNB; ioc 347 drivers/message/fusion/mptscsih.c if ((mptscsih_getFreeChainBuffer(ioc, &newIndex)) == FAILED) { ioc 348 drivers/message/fusion/mptscsih.c dfailprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 350 drivers/message/fusion/mptscsih.c ioc->name, pReq->CDB[0], SCpnt)); ioc 358 drivers/message/fusion/mptscsih.c ioc->ChainToChain[chain_idx] = newIndex; ioc 360 drivers/message/fusion/mptscsih.c ioc->ReqToChain[req_idx] = newIndex; ioc 363 drivers/message/fusion/mptscsih.c chain_dma_off = ioc->req_sz * chain_idx; ioc 370 drivers/message/fusion/mptscsih.c dsgprintk(ioc, printk(MYIOC_s_DEBUG_FMT " Current buff @ %p (index 0x%x)", ioc 371 drivers/message/fusion/mptscsih.c ioc->name, psge, req_idx)); ioc 375 drivers/message/fusion/mptscsih.c psge = (char *) (ioc->ChainBuffer + chain_dma_off); ioc 379 drivers/message/fusion/mptscsih.c dsgprintk(ioc, printk(MYIOC_s_DEBUG_FMT " Chain buff @ %p (index 0x%x)\n", ioc 380 drivers/message/fusion/mptscsih.c ioc->name, psge, chain_idx)); ioc 392 drivers/message/fusion/mptscsih.c mptscsih_issue_sep_command(MPT_ADAPTER *ioc, VirtTarget *vtarget, ioc 398 drivers/message/fusion/mptscsih.c if (ioc->bus_type != SAS) ioc 406 drivers/message/fusion/mptscsih.c if ((mf = mpt_get_msg_frame(ioc->InternalCtx, ioc)) == NULL) { ioc 407 drivers/message/fusion/mptscsih.c dfailprintk(ioc, printk(MYIOC_s_WARN_FMT "%s: no msg frames!!\n", ioc 408 drivers/message/fusion/mptscsih.c ioc->name,__func__)); ioc 418 drivers/message/fusion/mptscsih.c devtverboseprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 420 drivers/message/fusion/mptscsih.c ioc->name, SlotStatus, SEPMsg->Bus, SEPMsg->TargetID)); ioc 421 drivers/message/fusion/mptscsih.c mpt_put_msg_frame(ioc->DoneCtx, ioc, mf); ioc 436 drivers/message/fusion/mptscsih.c mptscsih_info_scsiio(MPT_ADAPTER *ioc, struct scsi_cmnd *sc, SCSIIOReply_t * pScsiReply) ioc 540 drivers/message/fusion/mptscsih.c ioc->name, pScsiReply->Bus, pScsiReply->TargetID, sc->device->lun); ioc 542 drivers/message/fusion/mptscsih.c "resid = %d\n", ioc->name, scsi_bufflen(sc), sc->underflow, ioc 545 drivers/message/fusion/mptscsih.c "sc->result = %08X\n", ioc->name, le16_to_cpu(pScsiReply->TaskTag), ioc 550 drivers/message/fusion/mptscsih.c ioc->name, desc, ioc_status, desc1, pScsiReply->SCSIStatus, ioc 559 drivers/message/fusion/mptscsih.c "[0x%02x,0x%02x,0x%02x]\n", ioc->name, skey, asc, ascq); ioc 568 drivers/message/fusion/mptscsih.c ioc->name, le32_to_cpu(pScsiReply->ResponseInfo)); ioc 588 drivers/message/fusion/mptscsih.c mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) ioc 598 drivers/message/fusion/mptscsih.c hd = shost_priv(ioc->sh); ioc 611 drivers/message/fusion/mptscsih.c sc = mptscsih_getclear_scsi_lookup(ioc, req_idx); ioc 621 drivers/message/fusion/mptscsih.c ioc->name); ioc 623 drivers/message/fusion/mptscsih.c mptscsih_freeChainBuffers(ioc, req_idx); ioc 628 drivers/message/fusion/mptscsih.c mptscsih_freeChainBuffers(ioc, req_idx); ioc 632 drivers/message/fusion/mptscsih.c if (ioc->bus_type == SAS) { ioc 647 drivers/message/fusion/mptscsih.c if((ioc->facts.MsgVersion >= MPI_VERSION_01_05) && pScsiReply){ ioc 648 drivers/message/fusion/mptscsih.c dmfprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 650 drivers/message/fusion/mptscsih.c ioc->name, mf, mr, sc, req_idx, pScsiReply->TaskTag)); ioc 652 drivers/message/fusion/mptscsih.c dmfprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 654 drivers/message/fusion/mptscsih.c ioc->name, mf, mr, sc, req_idx)); ioc 696 drivers/message/fusion/mptscsih.c "FCP_ResponseInfo=%08xh\n", ioc->name, ioc 720 drivers/message/fusion/mptscsih.c if (ioc->bus_type != FC) ioc 734 drivers/message/fusion/mptscsih.c mptscsih_issue_sep_command(ioc, vtarget, ioc 741 drivers/message/fusion/mptscsih.c if ( ioc->bus_type == SAS ) { ioc 773 drivers/message/fusion/mptscsih.c } else if (ioc->bus_type == FC) { ioc 799 drivers/message/fusion/mptscsih.c if (ioc->bus_type == FC) ioc 811 drivers/message/fusion/mptscsih.c dreplyprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 813 drivers/message/fusion/mptscsih.c ioc->name, sc->result, sc->device->channel, sc->device->id)); ioc 831 drivers/message/fusion/mptscsih.c if (ioc->bus_type == SPI) { ioc 871 drivers/message/fusion/mptscsih.c dreplyprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 873 drivers/message/fusion/mptscsih.c ioc->name, sc->underflow)); ioc 874 drivers/message/fusion/mptscsih.c dreplyprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 875 drivers/message/fusion/mptscsih.c " ActBytesXferd=%02xh\n", ioc->name, xfer_cnt)); ioc 903 drivers/message/fusion/mptscsih.c if ((ioc->bus_type == SPI) && ioc 1005 drivers/message/fusion/mptscsih.c if (sc->result && (ioc->debug_level & MPT_DEBUG_REPLY)) ioc 1006 drivers/message/fusion/mptscsih.c mptscsih_info_scsiio(ioc, sc, pScsiReply); ioc 1017 drivers/message/fusion/mptscsih.c mptscsih_freeChainBuffers(ioc, req_idx); ioc 1034 drivers/message/fusion/mptscsih.c MPT_ADAPTER *ioc = hd->ioc; ioc 1040 drivers/message/fusion/mptscsih.c for (ii= 0; ii < ioc->req_depth; ii++) { ioc 1041 drivers/message/fusion/mptscsih.c sc = mptscsih_getclear_scsi_lookup(ioc, ii); ioc 1044 drivers/message/fusion/mptscsih.c mf = (SCSIIORequest_t *)MPT_INDEX_2_MFPTR(ioc, ii); ioc 1049 drivers/message/fusion/mptscsih.c mptscsih_freeChainBuffers(ioc, ii); ioc 1050 drivers/message/fusion/mptscsih.c mpt_free_msg_frame(ioc, (MPT_FRAME_HDR *)mf); ioc 1056 drivers/message/fusion/mptscsih.c dtmprintk(ioc, sdev_printk(KERN_INFO, sc->device, MYIOC_s_FMT ioc 1058 drivers/message/fusion/mptscsih.c "idx=%x\n", ioc->name, channel, id, sc, mf, ii)); ioc 1085 drivers/message/fusion/mptscsih.c MPT_ADAPTER *ioc = hd->ioc; ioc 1088 drivers/message/fusion/mptscsih.c spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); ioc 1089 drivers/message/fusion/mptscsih.c for (ii = 0; ii < ioc->req_depth; ii++) { ioc 1090 drivers/message/fusion/mptscsih.c if ((sc = ioc->ScsiLookup[ii]) != NULL) { ioc 1092 drivers/message/fusion/mptscsih.c mf = (SCSIIORequest_t *)MPT_INDEX_2_MFPTR(ioc, ii); ioc 1111 drivers/message/fusion/mptscsih.c ioc->ScsiLookup[ii] = NULL; ioc 1112 drivers/message/fusion/mptscsih.c spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags); ioc 1113 drivers/message/fusion/mptscsih.c mptscsih_freeChainBuffers(ioc, ii); ioc 1114 drivers/message/fusion/mptscsih.c mpt_free_msg_frame(ioc, (MPT_FRAME_HDR *)mf); ioc 1118 drivers/message/fusion/mptscsih.c dtmprintk(ioc, sdev_printk(KERN_INFO, sc->device, ioc 1120 drivers/message/fusion/mptscsih.c "fw_id %d, sc=%p, mf = %p, idx=%x\n", ioc->name, ioc 1124 drivers/message/fusion/mptscsih.c spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); ioc 1127 drivers/message/fusion/mptscsih.c spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags); ioc 1150 drivers/message/fusion/mptscsih.c MPT_ADAPTER *ioc; ioc 1158 drivers/message/fusion/mptscsih.c ioc = hd->ioc; ioc 1160 drivers/message/fusion/mptscsih.c dprintk(ioc, printk(MYIOC_s_WARN_FMT "Device (%d:%d:%llu) reported QUEUE_FULL!\n", ioc 1161 drivers/message/fusion/mptscsih.c ioc->name, 0, sc->device->id, sc->device->lun)); ioc 1176 drivers/message/fusion/mptscsih.c MPT_ADAPTER *ioc = pci_get_drvdata(pdev); ioc 1177 drivers/message/fusion/mptscsih.c struct Scsi_Host *host = ioc->sh; ioc 1188 drivers/message/fusion/mptscsih.c if (ioc->ScsiLookup != NULL) { ioc 1189 drivers/message/fusion/mptscsih.c sz1 = ioc->req_depth * sizeof(void *); ioc 1190 drivers/message/fusion/mptscsih.c kfree(ioc->ScsiLookup); ioc 1191 drivers/message/fusion/mptscsih.c ioc->ScsiLookup = NULL; ioc 1194 drivers/message/fusion/mptscsih.c dprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 1196 drivers/message/fusion/mptscsih.c ioc->name, sz1)); ioc 1202 drivers/message/fusion/mptscsih.c ioc->sh = NULL; ioc 1230 drivers/message/fusion/mptscsih.c MPT_ADAPTER *ioc = pci_get_drvdata(pdev); ioc 1232 drivers/message/fusion/mptscsih.c scsi_block_requests(ioc->sh); ioc 1247 drivers/message/fusion/mptscsih.c MPT_ADAPTER *ioc = pci_get_drvdata(pdev); ioc 1251 drivers/message/fusion/mptscsih.c scsi_unblock_requests(ioc->sh); ioc 1279 drivers/message/fusion/mptscsih.c mpt_print_ioc_summary(h->ioc, h->info_kbuf, &size, 0, 0); ioc 1288 drivers/message/fusion/mptscsih.c MPT_ADAPTER *ioc = hd->ioc; ioc 1290 drivers/message/fusion/mptscsih.c seq_printf(m, "%s: %s, ", ioc->name, ioc->prod_name); ioc 1291 drivers/message/fusion/mptscsih.c seq_printf(m, "%s%08xh, ", MPT_FW_REV_MAGIC_ID_STRING, ioc->facts.FWVersion.Word); ioc 1292 drivers/message/fusion/mptscsih.c seq_printf(m, "Ports=%d, ", ioc->facts.NumberOfPorts); ioc 1293 drivers/message/fusion/mptscsih.c seq_printf(m, "MaxQ=%d\n", ioc->req_depth); ioc 1325 drivers/message/fusion/mptscsih.c MPT_ADAPTER *ioc; ioc 1328 drivers/message/fusion/mptscsih.c ioc = hd->ioc; ioc 1330 drivers/message/fusion/mptscsih.c dmfprintk(ioc, printk(MYIOC_s_DEBUG_FMT "qcmd: SCpnt=%p\n", ioc 1331 drivers/message/fusion/mptscsih.c ioc->name, SCpnt)); ioc 1333 drivers/message/fusion/mptscsih.c if (ioc->taskmgmt_quiesce_io) ioc 1339 drivers/message/fusion/mptscsih.c if ((mf = mpt_get_msg_frame(ioc->DoneCtx, ioc)) == NULL) { ioc 1340 drivers/message/fusion/mptscsih.c dprintk(ioc, printk(MYIOC_s_WARN_FMT "QueueCmd, no msg frames!!\n", ioc 1341 drivers/message/fusion/mptscsih.c ioc->name)); ioc 1388 drivers/message/fusion/mptscsih.c pScsiReq->MsgFlags = mpt_msg_flags(ioc); ioc 1406 drivers/message/fusion/mptscsih.c pScsiReq->SenseBufferLowAddr = cpu_to_le32(ioc->sense_buf_low_dma ioc 1414 drivers/message/fusion/mptscsih.c ioc->add_sge((char *)&pScsiReq->SGL, ioc 1419 drivers/message/fusion/mptscsih.c if (mptscsih_AddSGE(ioc, SCpnt, pScsiReq, my_idx) != SUCCESS) ioc 1424 drivers/message/fusion/mptscsih.c mptscsih_set_scsi_lookup(ioc, my_idx, SCpnt); ioc 1426 drivers/message/fusion/mptscsih.c mpt_put_msg_frame(ioc->DoneCtx, ioc, mf); ioc 1427 drivers/message/fusion/mptscsih.c dmfprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Issued SCSI cmd (%p) mf=%p idx=%d\n", ioc 1428 drivers/message/fusion/mptscsih.c ioc->name, SCpnt, mf, my_idx)); ioc 1429 drivers/message/fusion/mptscsih.c DBG_DUMP_REQUEST_FRAME(ioc, (u32 *)mf); ioc 1433 drivers/message/fusion/mptscsih.c mptscsih_freeChainBuffers(ioc, my_idx); ioc 1434 drivers/message/fusion/mptscsih.c mpt_free_msg_frame(ioc, mf); ioc 1449 drivers/message/fusion/mptscsih.c mptscsih_freeChainBuffers(MPT_ADAPTER *ioc, int req_idx) ioc 1459 drivers/message/fusion/mptscsih.c chain_idx = ioc->ReqToChain[req_idx]; ioc 1460 drivers/message/fusion/mptscsih.c ioc->ReqToChain[req_idx] = MPT_HOST_NO_CHAIN; ioc 1465 drivers/message/fusion/mptscsih.c next = ioc->ChainToChain[chain_idx]; ioc 1470 drivers/message/fusion/mptscsih.c ioc->ChainToChain[chain_idx] = MPT_HOST_NO_CHAIN; ioc 1472 drivers/message/fusion/mptscsih.c chain = (MPT_FRAME_HDR *) (ioc->ChainBuffer ioc 1473 drivers/message/fusion/mptscsih.c + (chain_idx * ioc->req_sz)); ioc 1475 drivers/message/fusion/mptscsih.c spin_lock_irqsave(&ioc->FreeQlock, flags); ioc 1476 drivers/message/fusion/mptscsih.c list_add_tail(&chain->u.frame.linkage.list, &ioc->FreeChainQ); ioc 1477 drivers/message/fusion/mptscsih.c spin_unlock_irqrestore(&ioc->FreeQlock, flags); ioc 1479 drivers/message/fusion/mptscsih.c dmfprintk(ioc, printk(MYIOC_s_DEBUG_FMT "FreeChainBuffers (index %d)\n", ioc 1480 drivers/message/fusion/mptscsih.c ioc->name, chain_idx)); ioc 1520 drivers/message/fusion/mptscsih.c MPT_ADAPTER *ioc = hd->ioc; ioc 1527 drivers/message/fusion/mptscsih.c ioc_raw_state = mpt_GetIocState(ioc, 0); ioc 1532 drivers/message/fusion/mptscsih.c ioc->name, type, ioc_raw_state); ioc 1534 drivers/message/fusion/mptscsih.c ioc->name, __func__); ioc 1535 drivers/message/fusion/mptscsih.c if (mpt_HardResetHandler(ioc, CAN_SLEEP) < 0) ioc 1537 drivers/message/fusion/mptscsih.c "FAILED!!\n", ioc->name); ioc 1545 drivers/message/fusion/mptscsih.c if (!((ioc->facts.IOCCapabilities & MPI_IOCFACTS_CAPABILITY_HIGH_PRI_Q) ioc 1546 drivers/message/fusion/mptscsih.c && (ioc->facts.MsgVersion >= MPI_VERSION_01_05)) && ioc 1551 drivers/message/fusion/mptscsih.c ioc->name, type, ioc_raw_state); ioc 1555 drivers/message/fusion/mptscsih.c mutex_lock(&ioc->taskmgmt_cmds.mutex); ioc 1556 drivers/message/fusion/mptscsih.c if (mpt_set_taskmgmt_in_progress_flag(ioc) != 0) { ioc 1564 drivers/message/fusion/mptscsih.c if ((mf = mpt_get_msg_frame(ioc->TaskCtx, ioc)) == NULL) { ioc 1565 drivers/message/fusion/mptscsih.c dfailprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 1566 drivers/message/fusion/mptscsih.c "TaskMgmt no msg frames!!\n", ioc->name)); ioc 1568 drivers/message/fusion/mptscsih.c mpt_clear_taskmgmt_in_progress_flag(ioc); ioc 1571 drivers/message/fusion/mptscsih.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TaskMgmt request (mf=%p)\n", ioc 1572 drivers/message/fusion/mptscsih.c ioc->name, mf)); ioc 1595 drivers/message/fusion/mptscsih.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TaskMgmt: ctx2abort (0x%08x) " ioc 1596 drivers/message/fusion/mptscsih.c "task_type = 0x%02X, timeout = %ld\n", ioc->name, ctx2abort, ioc 1599 drivers/message/fusion/mptscsih.c DBG_DUMP_TM_REQUEST_FRAME(ioc, (u32 *)pScsiTm); ioc 1601 drivers/message/fusion/mptscsih.c INITIALIZE_MGMT_STATUS(ioc->taskmgmt_cmds.status) ioc 1603 drivers/message/fusion/mptscsih.c if ((ioc->facts.IOCCapabilities & MPI_IOCFACTS_CAPABILITY_HIGH_PRI_Q) && ioc 1604 drivers/message/fusion/mptscsih.c (ioc->facts.MsgVersion >= MPI_VERSION_01_05)) ioc 1605 drivers/message/fusion/mptscsih.c mpt_put_msg_frame_hi_pri(ioc->TaskCtx, ioc, mf); ioc 1607 drivers/message/fusion/mptscsih.c retval = mpt_send_handshake_request(ioc->TaskCtx, ioc, ioc 1610 drivers/message/fusion/mptscsih.c dfailprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 1612 drivers/message/fusion/mptscsih.c ioc->name, mf, retval)); ioc 1613 drivers/message/fusion/mptscsih.c mpt_free_msg_frame(ioc, mf); ioc 1614 drivers/message/fusion/mptscsih.c mpt_clear_taskmgmt_in_progress_flag(ioc); ioc 1619 drivers/message/fusion/mptscsih.c timeleft = wait_for_completion_timeout(&ioc->taskmgmt_cmds.done, ioc 1621 drivers/message/fusion/mptscsih.c if (!(ioc->taskmgmt_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) { ioc 1623 drivers/message/fusion/mptscsih.c dtmprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 1624 drivers/message/fusion/mptscsih.c "TaskMgmt TIMED OUT!(mf=%p)\n", ioc->name, mf)); ioc 1625 drivers/message/fusion/mptscsih.c mpt_clear_taskmgmt_in_progress_flag(ioc); ioc 1626 drivers/message/fusion/mptscsih.c if (ioc->taskmgmt_cmds.status & MPT_MGMT_STATUS_DID_IOCRESET) ioc 1632 drivers/message/fusion/mptscsih.c retval = mptscsih_taskmgmt_reply(ioc, type, ioc 1633 drivers/message/fusion/mptscsih.c (SCSITaskMgmtReply_t *) ioc->taskmgmt_cmds.reply); ioc 1635 drivers/message/fusion/mptscsih.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 1637 drivers/message/fusion/mptscsih.c ioc->name, jiffies_to_msecs(jiffies - time_count)/1000)); ioc 1641 drivers/message/fusion/mptscsih.c CLEAR_MGMT_STATUS(ioc->taskmgmt_cmds.status) ioc 1645 drivers/message/fusion/mptscsih.c ioc->name, __func__, mpt_GetIocState(ioc, 0)); ioc 1646 drivers/message/fusion/mptscsih.c retval = (ioc->bus_type == SAS) ? ioc 1647 drivers/message/fusion/mptscsih.c mpt_HardResetHandler(ioc, CAN_SLEEP) : ioc 1648 drivers/message/fusion/mptscsih.c mpt_Soft_Hard_ResetHandler(ioc, CAN_SLEEP); ioc 1649 drivers/message/fusion/mptscsih.c mpt_free_msg_frame(ioc, mf); ioc 1653 drivers/message/fusion/mptscsih.c mutex_unlock(&ioc->taskmgmt_cmds.mutex); ioc 1659 drivers/message/fusion/mptscsih.c mptscsih_get_tm_timeout(MPT_ADAPTER *ioc) ioc 1661 drivers/message/fusion/mptscsih.c switch (ioc->bus_type) { ioc 1690 drivers/message/fusion/mptscsih.c MPT_ADAPTER *ioc; ioc 1702 drivers/message/fusion/mptscsih.c ioc = hd->ioc; ioc 1704 drivers/message/fusion/mptscsih.c ioc->name, SCpnt); ioc 1709 drivers/message/fusion/mptscsih.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 1711 drivers/message/fusion/mptscsih.c ioc->name, SCpnt)); ioc 1721 drivers/message/fusion/mptscsih.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 1723 drivers/message/fusion/mptscsih.c ioc->name, SCpnt)); ioc 1732 drivers/message/fusion/mptscsih.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 1734 drivers/message/fusion/mptscsih.c ioc->name, SCpnt)); ioc 1742 drivers/message/fusion/mptscsih.c if ((scpnt_idx = SCPNT_TO_LOOKUP_IDX(ioc, SCpnt)) < 0) { ioc 1747 drivers/message/fusion/mptscsih.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "task abort: " ioc 1748 drivers/message/fusion/mptscsih.c "Command not in the active list! (sc=%p)\n", ioc->name, ioc 1754 drivers/message/fusion/mptscsih.c if (ioc->timeouts < -1) ioc 1755 drivers/message/fusion/mptscsih.c ioc->timeouts++; ioc 1758 drivers/message/fusion/mptscsih.c mpt_halt_firmware(ioc); ioc 1767 drivers/message/fusion/mptscsih.c mf = MPT_INDEX_2_MFPTR(ioc, scpnt_idx); ioc 1773 drivers/message/fusion/mptscsih.c ctx2abort, mptscsih_get_tm_timeout(ioc)); ioc 1775 drivers/message/fusion/mptscsih.c if (SCPNT_TO_LOOKUP_IDX(ioc, SCpnt) == scpnt_idx) { ioc 1776 drivers/message/fusion/mptscsih.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 1778 drivers/message/fusion/mptscsih.c ioc->name, SCpnt)); ioc 1781 drivers/message/fusion/mptscsih.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 1783 drivers/message/fusion/mptscsih.c ioc->name, SCpnt)); ioc 1789 drivers/message/fusion/mptscsih.c ioc->name, ((retval == SUCCESS) ? "SUCCESS" : "FAILED"), retval, ioc 1810 drivers/message/fusion/mptscsih.c MPT_ADAPTER *ioc; ioc 1820 drivers/message/fusion/mptscsih.c ioc = hd->ioc; ioc 1822 drivers/message/fusion/mptscsih.c ioc->name, SCpnt); ioc 1842 drivers/message/fusion/mptscsih.c mptscsih_get_tm_timeout(ioc)); ioc 1846 drivers/message/fusion/mptscsih.c ioc->name, ((retval == 0) ? "SUCCESS" : "FAILED" ), SCpnt); ioc 1870 drivers/message/fusion/mptscsih.c MPT_ADAPTER *ioc; ioc 1880 drivers/message/fusion/mptscsih.c ioc = hd->ioc; ioc 1882 drivers/message/fusion/mptscsih.c ioc->name, SCpnt); ioc 1885 drivers/message/fusion/mptscsih.c if (ioc->timeouts < -1) ioc 1886 drivers/message/fusion/mptscsih.c ioc->timeouts++; ioc 1894 drivers/message/fusion/mptscsih.c mptscsih_get_tm_timeout(ioc)); ioc 1897 drivers/message/fusion/mptscsih.c ioc->name, ((retval == 0) ? "SUCCESS" : "FAILED" ), SCpnt); ioc 1919 drivers/message/fusion/mptscsih.c MPT_ADAPTER *ioc; ioc 1932 drivers/message/fusion/mptscsih.c ioc = hd->ioc; ioc 1934 drivers/message/fusion/mptscsih.c ioc->name, SCpnt); ioc 1939 drivers/message/fusion/mptscsih.c retval = mpt_Soft_Hard_ResetHandler(ioc, CAN_SLEEP); ioc 1946 drivers/message/fusion/mptscsih.c ioc->name, ((retval == 0) ? "SUCCESS" : "FAILED" ), SCpnt); ioc 1952 drivers/message/fusion/mptscsih.c mptscsih_taskmgmt_reply(MPT_ADAPTER *ioc, u8 type, ioc 1959 drivers/message/fusion/mptscsih.c if (!(ioc->taskmgmt_cmds.status & MPT_MGMT_STATUS_RF_VALID)) { ioc 1964 drivers/message/fusion/mptscsih.c DBG_DUMP_TM_REPLY_FRAME(ioc, (u32 *)pScsiTmReply); ioc 1969 drivers/message/fusion/mptscsih.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 1972 drivers/message/fusion/mptscsih.c "\tterm_cmnds = %d\n", ioc->name, pScsiTmReply->Bus, ioc 1977 drivers/message/fusion/mptscsih.c if (ioc->facts.MsgVersion >= MPI_VERSION_01_05 && ioc 1979 drivers/message/fusion/mptscsih.c mptscsih_taskmgmt_response_code(ioc, ioc 2004 drivers/message/fusion/mptscsih.c mptscsih_taskmgmt_response_code(MPT_ADAPTER *ioc, u8 response_code) ioc 2035 drivers/message/fusion/mptscsih.c ioc->name, response_code, desc); ioc 2054 drivers/message/fusion/mptscsih.c mptscsih_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, ioc 2057 drivers/message/fusion/mptscsih.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 2058 drivers/message/fusion/mptscsih.c "TaskMgmt completed (mf=%p, mr=%p)\n", ioc->name, mf, mr)); ioc 2060 drivers/message/fusion/mptscsih.c ioc->taskmgmt_cmds.status |= MPT_MGMT_STATUS_COMMAND_GOOD; ioc 2065 drivers/message/fusion/mptscsih.c ioc->taskmgmt_cmds.status |= MPT_MGMT_STATUS_RF_VALID; ioc 2066 drivers/message/fusion/mptscsih.c memcpy(ioc->taskmgmt_cmds.reply, mr, ioc 2069 drivers/message/fusion/mptscsih.c if (ioc->taskmgmt_cmds.status & MPT_MGMT_STATUS_PENDING) { ioc 2070 drivers/message/fusion/mptscsih.c mpt_clear_taskmgmt_in_progress_flag(ioc); ioc 2071 drivers/message/fusion/mptscsih.c ioc->taskmgmt_cmds.status &= ~MPT_MGMT_STATUS_PENDING; ioc 2072 drivers/message/fusion/mptscsih.c complete(&ioc->taskmgmt_cmds.done); ioc 2073 drivers/message/fusion/mptscsih.c if (ioc->bus_type == SAS) ioc 2074 drivers/message/fusion/mptscsih.c ioc->schedule_target_reset(ioc); ioc 2124 drivers/message/fusion/mptscsih.c mptscsih_is_phys_disk(MPT_ADAPTER *ioc, u8 channel, u8 id) ioc 2132 drivers/message/fusion/mptscsih.c if (!ioc->raid_data.pIocPg3) ioc 2134 drivers/message/fusion/mptscsih.c for (i = 0; i < ioc->raid_data.pIocPg3->NumPhysDisks; i++) { ioc 2135 drivers/message/fusion/mptscsih.c if ((id == ioc->raid_data.pIocPg3->PhysDisk[i].PhysDiskID) && ioc 2136 drivers/message/fusion/mptscsih.c (channel == ioc->raid_data.pIocPg3->PhysDisk[i].PhysDiskBus)) { ioc 2142 drivers/message/fusion/mptscsih.c if (ioc->bus_type != SAS) ioc 2148 drivers/message/fusion/mptscsih.c for (i = 0; i < ioc->raid_data.pIocPg3->NumPhysDisks; i++) { ioc 2149 drivers/message/fusion/mptscsih.c num_paths = mpt_raid_phys_disk_get_num_paths(ioc, ioc 2150 drivers/message/fusion/mptscsih.c ioc->raid_data.pIocPg3->PhysDisk[i].PhysDiskNum); ioc 2157 drivers/message/fusion/mptscsih.c if ((mpt_raid_phys_disk_pg1(ioc, ioc 2158 drivers/message/fusion/mptscsih.c ioc->raid_data.pIocPg3->PhysDisk[i].PhysDiskNum, ioc 2184 drivers/message/fusion/mptscsih.c if (list_empty(&ioc->raid_data.inactive_list)) ioc 2187 drivers/message/fusion/mptscsih.c mutex_lock(&ioc->raid_data.inactive_list_mutex); ioc 2188 drivers/message/fusion/mptscsih.c list_for_each_entry(component_info, &ioc->raid_data.inactive_list, ioc 2194 drivers/message/fusion/mptscsih.c mutex_unlock(&ioc->raid_data.inactive_list_mutex); ioc 2202 drivers/message/fusion/mptscsih.c mptscsih_raid_id_to_num(MPT_ADAPTER *ioc, u8 channel, u8 id) ioc 2210 drivers/message/fusion/mptscsih.c if (!ioc->raid_data.pIocPg3) ioc 2212 drivers/message/fusion/mptscsih.c for (i = 0; i < ioc->raid_data.pIocPg3->NumPhysDisks; i++) { ioc 2213 drivers/message/fusion/mptscsih.c if ((id == ioc->raid_data.pIocPg3->PhysDisk[i].PhysDiskID) && ioc 2214 drivers/message/fusion/mptscsih.c (channel == ioc->raid_data.pIocPg3->PhysDisk[i].PhysDiskBus)) { ioc 2215 drivers/message/fusion/mptscsih.c rc = ioc->raid_data.pIocPg3->PhysDisk[i].PhysDiskNum; ioc 2220 drivers/message/fusion/mptscsih.c if (ioc->bus_type != SAS) ioc 2226 drivers/message/fusion/mptscsih.c for (i = 0; i < ioc->raid_data.pIocPg3->NumPhysDisks; i++) { ioc 2227 drivers/message/fusion/mptscsih.c num_paths = mpt_raid_phys_disk_get_num_paths(ioc, ioc 2228 drivers/message/fusion/mptscsih.c ioc->raid_data.pIocPg3->PhysDisk[i].PhysDiskNum); ioc 2235 drivers/message/fusion/mptscsih.c if ((mpt_raid_phys_disk_pg1(ioc, ioc 2236 drivers/message/fusion/mptscsih.c ioc->raid_data.pIocPg3->PhysDisk[i].PhysDiskNum, ioc 2261 drivers/message/fusion/mptscsih.c if (list_empty(&ioc->raid_data.inactive_list)) ioc 2264 drivers/message/fusion/mptscsih.c mutex_lock(&ioc->raid_data.inactive_list_mutex); ioc 2265 drivers/message/fusion/mptscsih.c list_for_each_entry(component_info, &ioc->raid_data.inactive_list, ioc 2271 drivers/message/fusion/mptscsih.c mutex_unlock(&ioc->raid_data.inactive_list_mutex); ioc 2319 drivers/message/fusion/mptscsih.c MPT_ADAPTER *ioc = hd->ioc; ioc 2324 drivers/message/fusion/mptscsih.c if (ioc->bus_type == SPI) { ioc 2333 drivers/message/fusion/mptscsih.c max_depth = ioc->sh->can_queue; ioc 2358 drivers/message/fusion/mptscsih.c MPT_ADAPTER *ioc = hd->ioc; ioc 2364 drivers/message/fusion/mptscsih.c dsprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 2366 drivers/message/fusion/mptscsih.c ioc->name, sdev, sdev->channel, sdev->id, sdev->lun)); ioc 2367 drivers/message/fusion/mptscsih.c if (ioc->bus_type == SPI) ioc 2368 drivers/message/fusion/mptscsih.c dsprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 2370 drivers/message/fusion/mptscsih.c ioc->name, sdev->sdtr, sdev->wdtr, ioc 2375 drivers/message/fusion/mptscsih.c dsprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 2377 drivers/message/fusion/mptscsih.c ioc->name, sdev->queue_depth, vtarget->tflags)); ioc 2379 drivers/message/fusion/mptscsih.c if (ioc->bus_type == SPI) ioc 2380 drivers/message/fusion/mptscsih.c dsprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 2382 drivers/message/fusion/mptscsih.c ioc->name, vtarget->negoFlags, vtarget->maxOffset, ioc 2386 drivers/message/fusion/mptscsih.c dsprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 2388 drivers/message/fusion/mptscsih.c ioc->name,sdev->tagged_supported, sdev->simple_tags)); ioc 2411 drivers/message/fusion/mptscsih.c MPT_ADAPTER *ioc = hd->ioc; ioc 2424 drivers/message/fusion/mptscsih.c sense_data = ((u8 *)ioc->sense_buf_pool + (req_index * MPT_SENSE_BUFFER_ALLOC)); ioc 2429 drivers/message/fusion/mptscsih.c if ((ioc->events) && (ioc->eventTypes & (1 << MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE))) { ioc 2433 drivers/message/fusion/mptscsih.c idx = ioc->eventContext % MPTCTL_EVENT_LOG_SIZE; ioc 2434 drivers/message/fusion/mptscsih.c ioc->events[idx].event = MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE; ioc 2435 drivers/message/fusion/mptscsih.c ioc->events[idx].eventContext = ioc->eventContext; ioc 2437 drivers/message/fusion/mptscsih.c ioc->events[idx].data[0] = (pReq->LUN[1] << 24) | ioc 2441 drivers/message/fusion/mptscsih.c ioc->events[idx].data[1] = (sense_data[13] << 8) | sense_data[12]; ioc 2443 drivers/message/fusion/mptscsih.c ioc->eventContext++; ioc 2444 drivers/message/fusion/mptscsih.c if (ioc->pcidev->vendor == ioc 2446 drivers/message/fusion/mptscsih.c mptscsih_issue_sep_command(ioc, ioc 2454 drivers/message/fusion/mptscsih.c dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Hmmm... SenseData len=0! (?)\n", ioc 2455 drivers/message/fusion/mptscsih.c ioc->name)); ioc 2467 drivers/message/fusion/mptscsih.c mptscsih_get_scsi_lookup(MPT_ADAPTER *ioc, int i) ioc 2472 drivers/message/fusion/mptscsih.c spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); ioc 2473 drivers/message/fusion/mptscsih.c scmd = ioc->ScsiLookup[i]; ioc 2474 drivers/message/fusion/mptscsih.c spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags); ioc 2489 drivers/message/fusion/mptscsih.c mptscsih_getclear_scsi_lookup(MPT_ADAPTER *ioc, int i) ioc 2494 drivers/message/fusion/mptscsih.c spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); ioc 2495 drivers/message/fusion/mptscsih.c scmd = ioc->ScsiLookup[i]; ioc 2496 drivers/message/fusion/mptscsih.c ioc->ScsiLookup[i] = NULL; ioc 2497 drivers/message/fusion/mptscsih.c spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags); ioc 2511 drivers/message/fusion/mptscsih.c mptscsih_set_scsi_lookup(MPT_ADAPTER *ioc, int i, struct scsi_cmnd *scmd) ioc 2515 drivers/message/fusion/mptscsih.c spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); ioc 2516 drivers/message/fusion/mptscsih.c ioc->ScsiLookup[i] = scmd; ioc 2517 drivers/message/fusion/mptscsih.c spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags); ioc 2526 drivers/message/fusion/mptscsih.c SCPNT_TO_LOOKUP_IDX(MPT_ADAPTER *ioc, struct scsi_cmnd *sc) ioc 2531 drivers/message/fusion/mptscsih.c spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); ioc 2532 drivers/message/fusion/mptscsih.c for (i = 0; i < ioc->req_depth; i++) { ioc 2533 drivers/message/fusion/mptscsih.c if (ioc->ScsiLookup[i] == sc) { ioc 2540 drivers/message/fusion/mptscsih.c spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags); ioc 2546 drivers/message/fusion/mptscsih.c mptscsih_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) ioc 2550 drivers/message/fusion/mptscsih.c if (ioc->sh == NULL || shost_priv(ioc->sh) == NULL) ioc 2553 drivers/message/fusion/mptscsih.c hd = shost_priv(ioc->sh); ioc 2556 drivers/message/fusion/mptscsih.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 2557 drivers/message/fusion/mptscsih.c "%s: MPT_IOC_SETUP_RESET\n", ioc->name, __func__)); ioc 2560 drivers/message/fusion/mptscsih.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 2561 drivers/message/fusion/mptscsih.c "%s: MPT_IOC_PRE_RESET\n", ioc->name, __func__)); ioc 2565 drivers/message/fusion/mptscsih.c dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 2566 drivers/message/fusion/mptscsih.c "%s: MPT_IOC_POST_RESET\n", ioc->name, __func__)); ioc 2567 drivers/message/fusion/mptscsih.c if (ioc->internal_cmds.status & MPT_MGMT_STATUS_PENDING) { ioc 2568 drivers/message/fusion/mptscsih.c ioc->internal_cmds.status |= ioc 2570 drivers/message/fusion/mptscsih.c complete(&ioc->internal_cmds.done); ioc 2581 drivers/message/fusion/mptscsih.c mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply) ioc 2585 drivers/message/fusion/mptscsih.c devtverboseprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 2587 drivers/message/fusion/mptscsih.c ioc->name, event)); ioc 2591 drivers/message/fusion/mptscsih.c (ioc->bus_type == SPI) && (ioc->soft_resets < -1)) ioc 2592 drivers/message/fusion/mptscsih.c ioc->soft_resets++; ioc 2623 drivers/message/fusion/mptscsih.c mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *req, ioc 2633 drivers/message/fusion/mptscsih.c ioc->internal_cmds.status |= MPT_MGMT_STATUS_COMMAND_GOOD; ioc 2634 drivers/message/fusion/mptscsih.c ioc->internal_cmds.completion_code = MPT_SCANDV_GOOD; ioc 2640 drivers/message/fusion/mptscsih.c ioc->internal_cmds.completion_code = ioc 2641 drivers/message/fusion/mptscsih.c mptscsih_get_completion_code(ioc, req, reply); ioc 2642 drivers/message/fusion/mptscsih.c ioc->internal_cmds.status |= MPT_MGMT_STATUS_RF_VALID; ioc 2643 drivers/message/fusion/mptscsih.c memcpy(ioc->internal_cmds.reply, reply, ioc 2650 drivers/message/fusion/mptscsih.c sense_data = ((u8 *)ioc->sense_buf_pool + ioc 2654 drivers/message/fusion/mptscsih.c memcpy(ioc->internal_cmds.sense, sense_data, sz); ioc 2657 drivers/message/fusion/mptscsih.c if (!(ioc->internal_cmds.status & MPT_MGMT_STATUS_PENDING)) ioc 2659 drivers/message/fusion/mptscsih.c ioc->internal_cmds.status &= ~MPT_MGMT_STATUS_PENDING; ioc 2660 drivers/message/fusion/mptscsih.c complete(&ioc->internal_cmds.done); ioc 2673 drivers/message/fusion/mptscsih.c mptscsih_get_completion_code(MPT_ADAPTER *ioc, MPT_FRAME_HDR *req, ioc 2686 drivers/message/fusion/mptscsih.c devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 2688 drivers/message/fusion/mptscsih.c "IOCLogInfo=%08xh\n", ioc->name, status, pReply->SCSIState, ioc 2750 drivers/message/fusion/mptscsih.c devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 2751 drivers/message/fusion/mptscsih.c " completionCode set to %08xh\n", ioc->name, completion_code)); ioc 2785 drivers/message/fusion/mptscsih.c MPT_ADAPTER *ioc = hd->ioc; ioc 2791 drivers/message/fusion/mptscsih.c spin_lock_irqsave(&ioc->taskmgmt_lock, flags); ioc 2792 drivers/message/fusion/mptscsih.c if (ioc->ioc_reset_in_progress) { ioc 2793 drivers/message/fusion/mptscsih.c spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags); ioc 2794 drivers/message/fusion/mptscsih.c dfailprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 2795 drivers/message/fusion/mptscsih.c "%s: busy with host reset\n", ioc->name, __func__)); ioc 2798 drivers/message/fusion/mptscsih.c spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags); ioc 2800 drivers/message/fusion/mptscsih.c mutex_lock(&ioc->internal_cmds.mutex); ioc 2900 drivers/message/fusion/mptscsih.c if ((mf = mpt_get_msg_frame(ioc->InternalCtx, ioc)) == NULL) { ioc 2901 drivers/message/fusion/mptscsih.c dfailprintk(ioc, printk(MYIOC_s_WARN_FMT "%s: No msg frames!\n", ioc 2902 drivers/message/fusion/mptscsih.c ioc->name, __func__)); ioc 2930 drivers/message/fusion/mptscsih.c pScsiReq->MsgFlags = mpt_msg_flags(ioc); ioc 2942 drivers/message/fusion/mptscsih.c devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 2943 drivers/message/fusion/mptscsih.c "%s: Untagged! 0x%02x\n", ioc->name, __func__, cmd)); ioc 2950 drivers/message/fusion/mptscsih.c pScsiReq->SenseBufferLowAddr = cpu_to_le32(ioc->sense_buf_low_dma ioc 2953 drivers/message/fusion/mptscsih.c devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 2955 drivers/message/fusion/mptscsih.c ioc->name, __func__, cmd, io->channel, io->id, io->lun)); ioc 2958 drivers/message/fusion/mptscsih.c ioc->add_sge((char *) &pScsiReq->SGL, ioc 2961 drivers/message/fusion/mptscsih.c ioc->add_sge((char *) &pScsiReq->SGL, ioc 2964 drivers/message/fusion/mptscsih.c INITIALIZE_MGMT_STATUS(ioc->internal_cmds.status) ioc 2965 drivers/message/fusion/mptscsih.c mpt_put_msg_frame(ioc->InternalCtx, ioc, mf); ioc 2966 drivers/message/fusion/mptscsih.c timeleft = wait_for_completion_timeout(&ioc->internal_cmds.done, ioc 2968 drivers/message/fusion/mptscsih.c if (!(ioc->internal_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) { ioc 2970 drivers/message/fusion/mptscsih.c dfailprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 2971 drivers/message/fusion/mptscsih.c "%s: TIMED OUT for cmd=0x%02x\n", ioc->name, __func__, ioc 2973 drivers/message/fusion/mptscsih.c if (ioc->internal_cmds.status & MPT_MGMT_STATUS_DID_IOCRESET) { ioc 2974 drivers/message/fusion/mptscsih.c mpt_free_msg_frame(ioc, mf); ioc 2981 drivers/message/fusion/mptscsih.c ioc->name, __func__, mpt_GetIocState(ioc, 0), ioc 2983 drivers/message/fusion/mptscsih.c mpt_Soft_Hard_ResetHandler(ioc, CAN_SLEEP); ioc 2984 drivers/message/fusion/mptscsih.c mpt_free_msg_frame(ioc, mf); ioc 2989 drivers/message/fusion/mptscsih.c ret = ioc->internal_cmds.completion_code; ioc 2990 drivers/message/fusion/mptscsih.c devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: success, rc=0x%02x\n", ioc 2991 drivers/message/fusion/mptscsih.c ioc->name, __func__, ret)); ioc 2994 drivers/message/fusion/mptscsih.c CLEAR_MGMT_STATUS(ioc->internal_cmds.status) ioc 2995 drivers/message/fusion/mptscsih.c mutex_unlock(&ioc->internal_cmds.mutex); ioc 3047 drivers/message/fusion/mptscsih.c MPT_ADAPTER *ioc = hd->ioc; ioc 3050 drivers/message/fusion/mptscsih.c (ioc->facts.FWVersion.Word & 0xFF000000) >> 24, ioc 3051 drivers/message/fusion/mptscsih.c (ioc->facts.FWVersion.Word & 0x00FF0000) >> 16, ioc 3052 drivers/message/fusion/mptscsih.c (ioc->facts.FWVersion.Word & 0x0000FF00) >> 8, ioc 3053 drivers/message/fusion/mptscsih.c ioc->facts.FWVersion.Word & 0x000000FF); ioc 3063 drivers/message/fusion/mptscsih.c MPT_ADAPTER *ioc = hd->ioc; ioc 3066 drivers/message/fusion/mptscsih.c (ioc->biosVersion & 0xFF000000) >> 24, ioc 3067 drivers/message/fusion/mptscsih.c (ioc->biosVersion & 0x00FF0000) >> 16, ioc 3068 drivers/message/fusion/mptscsih.c (ioc->biosVersion & 0x0000FF00) >> 8, ioc 3069 drivers/message/fusion/mptscsih.c ioc->biosVersion & 0x000000FF); ioc 3079 drivers/message/fusion/mptscsih.c MPT_ADAPTER *ioc = hd->ioc; ioc 3081 drivers/message/fusion/mptscsih.c return snprintf(buf, PAGE_SIZE, "%03x\n", ioc->facts.MsgVersion); ioc 3092 drivers/message/fusion/mptscsih.c MPT_ADAPTER *ioc = hd->ioc; ioc 3094 drivers/message/fusion/mptscsih.c return snprintf(buf, PAGE_SIZE, "%s\n", ioc->prod_name); ioc 3106 drivers/message/fusion/mptscsih.c MPT_ADAPTER *ioc = hd->ioc; ioc 3109 drivers/message/fusion/mptscsih.c ioc->nvdata_version_persistent); ioc 3120 drivers/message/fusion/mptscsih.c MPT_ADAPTER *ioc = hd->ioc; ioc 3122 drivers/message/fusion/mptscsih.c return snprintf(buf, PAGE_SIZE, "%02xh\n",ioc->nvdata_version_default); ioc 3133 drivers/message/fusion/mptscsih.c MPT_ADAPTER *ioc = hd->ioc; ioc 3135 drivers/message/fusion/mptscsih.c return snprintf(buf, PAGE_SIZE, "%s\n", ioc->board_name); ioc 3145 drivers/message/fusion/mptscsih.c MPT_ADAPTER *ioc = hd->ioc; ioc 3147 drivers/message/fusion/mptscsih.c return snprintf(buf, PAGE_SIZE, "%s\n", ioc->board_assembly); ioc 3158 drivers/message/fusion/mptscsih.c MPT_ADAPTER *ioc = hd->ioc; ioc 3160 drivers/message/fusion/mptscsih.c return snprintf(buf, PAGE_SIZE, "%s\n", ioc->board_tracer); ioc 3171 drivers/message/fusion/mptscsih.c MPT_ADAPTER *ioc = hd->ioc; ioc 3173 drivers/message/fusion/mptscsih.c return snprintf(buf, PAGE_SIZE, "%02d\n", ioc->io_missing_delay); ioc 3184 drivers/message/fusion/mptscsih.c MPT_ADAPTER *ioc = hd->ioc; ioc 3186 drivers/message/fusion/mptscsih.c return snprintf(buf, PAGE_SIZE, "%02d\n", ioc->device_missing_delay); ioc 3197 drivers/message/fusion/mptscsih.c MPT_ADAPTER *ioc = hd->ioc; ioc 3199 drivers/message/fusion/mptscsih.c return snprintf(buf, PAGE_SIZE, "%08xh\n", ioc->debug_level); ioc 3207 drivers/message/fusion/mptscsih.c MPT_ADAPTER *ioc = hd->ioc; ioc 3213 drivers/message/fusion/mptscsih.c ioc->debug_level = val; ioc 3215 drivers/message/fusion/mptscsih.c ioc->name, ioc->debug_level); ioc 126 drivers/message/fusion/mptscsih.h extern int mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r); ioc 127 drivers/message/fusion/mptscsih.h extern int mptscsih_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r); ioc 128 drivers/message/fusion/mptscsih.h extern int mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r); ioc 129 drivers/message/fusion/mptscsih.h extern int mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply); ioc 130 drivers/message/fusion/mptscsih.h extern int mptscsih_ioc_reset(MPT_ADAPTER *ioc, int post_reset); ioc 132 drivers/message/fusion/mptscsih.h extern u8 mptscsih_raid_id_to_num(MPT_ADAPTER *ioc, u8 channel, u8 id); ioc 133 drivers/message/fusion/mptscsih.h extern int mptscsih_is_phys_disk(MPT_ADAPTER *ioc, u8 channel, u8 id); ioc 135 drivers/message/fusion/mptscsih.h extern struct scsi_cmnd *mptscsih_get_scsi_lookup(MPT_ADAPTER *ioc, int i); ioc 136 drivers/message/fusion/mptscsih.h extern void mptscsih_taskmgmt_response_code(MPT_ADAPTER *ioc, u8 response_code); ioc 111 drivers/message/fusion/mptspi.c MPT_ADAPTER *ioc = hd->ioc; ioc 112 drivers/message/fusion/mptspi.c SpiCfgData *pspi_data = &ioc->spi_data; ioc 143 drivers/message/fusion/mptspi.c ddvprintk(ioc, ioc 145 drivers/message/fusion/mptspi.c "byte56=%02x on id=%d!\n", ioc->name, ioc 237 drivers/message/fusion/mptspi.c ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 238 drivers/message/fusion/mptspi.c "Disabling QAS due to noQas=%02x on id=%d!\n", ioc->name, noQas, id)); ioc 256 drivers/message/fusion/mptspi.c MPT_ADAPTER *ioc = hd->ioc; ioc 266 drivers/message/fusion/mptspi.c if ((mf = mpt_get_msg_frame(ioc->DoneCtx, ioc)) == NULL) { ioc 267 drivers/message/fusion/mptspi.c dfailprintk(ioc, printk(MYIOC_s_WARN_FMT ioc 268 drivers/message/fusion/mptspi.c "writeIOCPage4 : no msg frames!\n",ioc->name)); ioc 290 drivers/message/fusion/mptspi.c IOCPage4Ptr = ioc->spi_data.pIocPg4; ioc 291 drivers/message/fusion/mptspi.c dataDma = ioc->spi_data.IocPg4_dma; ioc 303 drivers/message/fusion/mptspi.c ioc->add_sge((char *)&pReq->PageBufferSGE, flagsLength, dataDma); ioc 305 drivers/message/fusion/mptspi.c ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 307 drivers/message/fusion/mptspi.c ioc->name, IOCPage4Ptr->MaxSEP, IOCPage4Ptr->ActiveSEP, id, channel)); ioc 309 drivers/message/fusion/mptspi.c mpt_put_msg_frame(ioc->DoneCtx, ioc, mf); ioc 343 drivers/message/fusion/mptspi.c if ((sdev->type == TYPE_PROCESSOR) && (hd->ioc->spi_data.Saf_Te)) { ioc 379 drivers/message/fusion/mptspi.c MPT_ADAPTER *ioc = hd->ioc; ioc 381 drivers/message/fusion/mptspi.c if (!ioc->raid_data.pIocPg2) ioc 384 drivers/message/fusion/mptspi.c if (!ioc->raid_data.pIocPg2->NumActiveVolumes) ioc 386 drivers/message/fusion/mptspi.c for (i=0; i < ioc->raid_data.pIocPg2->NumActiveVolumes; i++) { ioc 387 drivers/message/fusion/mptspi.c if (ioc->raid_data.pIocPg2->RaidVolume[i].VolumeID == id) { ioc 402 drivers/message/fusion/mptspi.c MPT_ADAPTER *ioc; ioc 407 drivers/message/fusion/mptspi.c ioc = hd->ioc; ioc 412 drivers/message/fusion/mptspi.c vtarget->ioc_id = ioc->id; ioc 420 drivers/message/fusion/mptspi.c if (mptscsih_is_phys_disk(ioc, 0, starget->id) == 0) ioc 426 drivers/message/fusion/mptspi.c vtarget->id = mptscsih_raid_id_to_num(ioc, 0, ioc 433 drivers/message/fusion/mptspi.c ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 434 drivers/message/fusion/mptspi.c "RAID Volume @ channel=%d id=%d\n", ioc->name, starget->channel, ioc 438 drivers/message/fusion/mptspi.c if (ioc->spi_data.nvram && ioc 439 drivers/message/fusion/mptspi.c ioc->spi_data.nvram[starget->id] != MPT_HOST_NVRAM_INVALID) { ioc 440 drivers/message/fusion/mptspi.c u32 nvram = ioc->spi_data.nvram[starget->id]; ioc 444 drivers/message/fusion/mptspi.c spi_min_period(starget) = ioc->spi_data.minSyncFactor; ioc 445 drivers/message/fusion/mptspi.c spi_max_width(starget) = ioc->spi_data.maxBusWidth; ioc 447 drivers/message/fusion/mptspi.c spi_max_offset(starget) = ioc->spi_data.maxSyncOffset; ioc 473 drivers/message/fusion/mptspi.c ddvprintk(hd->ioc, printk(MYIOC_s_DEBUG_FMT "id=%d Requested = 0x%08x" ioc 475 drivers/message/fusion/mptspi.c hd->ioc->name, starget->id, ii, ioc 498 drivers/message/fusion/mptspi.c ddvprintk(hd->ioc, printk(MYIOC_s_DEBUG_FMT "id=%d Read = 0x%08x" ioc 500 drivers/message/fusion/mptspi.c hd->ioc->name, starget->id, ii, ioc 518 drivers/message/fusion/mptspi.c struct _MPT_ADAPTER *ioc = hd->ioc; ioc 531 drivers/message/fusion/mptspi.c size = ioc->spi_data.sdp0length * 4; ioc 538 drivers/message/fusion/mptspi.c spi_dev_pg0 = dma_alloc_coherent(&ioc->pcidev->dev, size, &spi_dev_pg0_dma, GFP_KERNEL); ioc 541 drivers/message/fusion/mptspi.c "dma_alloc_coherent for parameters failed\n", ioc->name); ioc 547 drivers/message/fusion/mptspi.c hdr.PageVersion = ioc->spi_data.sdp0version; ioc 548 drivers/message/fusion/mptspi.c hdr.PageLength = ioc->spi_data.sdp0length; ioc 561 drivers/message/fusion/mptspi.c if (mpt_config(ioc, &cfg)) { ioc 562 drivers/message/fusion/mptspi.c starget_printk(KERN_ERR, starget, MYIOC_s_FMT "mpt_config failed\n", ioc->name); ioc 571 drivers/message/fusion/mptspi.c dma_free_coherent(&ioc->pcidev->dev, size, spi_dev_pg0, spi_dev_pg0_dma); ioc 620 drivers/message/fusion/mptspi.c MPT_ADAPTER *ioc = hd->ioc; ioc 626 drivers/message/fusion/mptspi.c mutex_lock(&ioc->internal_cmds.mutex); ioc 630 drivers/message/fusion/mptspi.c if ((mf = mpt_get_msg_frame(ioc->InternalCtx, ioc)) == NULL) { ioc 631 drivers/message/fusion/mptspi.c dfailprintk(hd->ioc, printk(MYIOC_s_WARN_FMT ioc 632 drivers/message/fusion/mptspi.c "%s: no msg frames!\n", ioc->name, __func__)); ioc 651 drivers/message/fusion/mptspi.c ioc->add_sge((char *)&pReq->ActionDataSGE, ioc 654 drivers/message/fusion/mptspi.c ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT "RAID Volume action=%x channel=%d id=%d\n", ioc 655 drivers/message/fusion/mptspi.c ioc->name, pReq->Action, channel, id)); ioc 657 drivers/message/fusion/mptspi.c INITIALIZE_MGMT_STATUS(ioc->internal_cmds.status) ioc 658 drivers/message/fusion/mptspi.c mpt_put_msg_frame(ioc->InternalCtx, ioc, mf); ioc 659 drivers/message/fusion/mptspi.c timeleft = wait_for_completion_timeout(&ioc->internal_cmds.done, 10*HZ); ioc 660 drivers/message/fusion/mptspi.c if (!(ioc->internal_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) { ioc 662 drivers/message/fusion/mptspi.c dfailprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: TIMED OUT!\n", ioc 663 drivers/message/fusion/mptspi.c ioc->name, __func__)); ioc 664 drivers/message/fusion/mptspi.c if (ioc->internal_cmds.status & MPT_MGMT_STATUS_DID_IOCRESET) ioc 668 drivers/message/fusion/mptspi.c ioc->name, __func__); ioc 669 drivers/message/fusion/mptspi.c mpt_HardResetHandler(ioc, CAN_SLEEP); ioc 670 drivers/message/fusion/mptspi.c mpt_free_msg_frame(ioc, mf); ioc 675 drivers/message/fusion/mptspi.c ret = ioc->internal_cmds.completion_code; ioc 678 drivers/message/fusion/mptspi.c CLEAR_MGMT_STATUS(ioc->internal_cmds.status) ioc 679 drivers/message/fusion/mptspi.c mutex_unlock(&ioc->internal_cmds.mutex); ioc 687 drivers/message/fusion/mptspi.c MPT_ADAPTER *ioc = hd->ioc; ioc 698 drivers/message/fusion/mptspi.c "Integrated RAID quiesce failed\n", ioc->name); ioc 709 drivers/message/fusion/mptspi.c "Integrated RAID resume failed\n", ioc->name); ioc 722 drivers/message/fusion/mptspi.c MPT_ADAPTER *ioc = hd->ioc; ioc 725 drivers/message/fusion/mptspi.c mptscsih_is_phys_disk(ioc, 0, sdev->id) == 0) ioc 731 drivers/message/fusion/mptspi.c ioc->name, sizeof(VirtDevice)); ioc 762 drivers/message/fusion/mptspi.c ddvprintk(hd->ioc, printk(MYIOC_s_DEBUG_FMT "id=%d min_period=0x%02x" ioc 763 drivers/message/fusion/mptspi.c " max_offset=0x%02x max_width=%d\n", hd->ioc->name, ioc 781 drivers/message/fusion/mptspi.c MPT_ADAPTER *ioc = hd->ioc; ioc 790 drivers/message/fusion/mptspi.c mptscsih_is_phys_disk(ioc, 0, SCpnt->device->id) == 0) { ioc 797 drivers/message/fusion/mptspi.c ddvprintk(ioc, scsi_print_command(SCpnt)); ioc 854 drivers/message/fusion/mptspi.c struct _MPT_ADAPTER *ioc = hd->ioc; ioc 871 drivers/message/fusion/mptspi.c size = ioc->spi_data.sdp1length * 4; ioc 873 drivers/message/fusion/mptspi.c pg1 = dma_alloc_coherent(&ioc->pcidev->dev, size, &pg1_dma, GFP_KERNEL); ioc 876 drivers/message/fusion/mptspi.c "dma_alloc_coherent for parameters failed\n", ioc->name); ioc 882 drivers/message/fusion/mptspi.c hdr.PageVersion = ioc->spi_data.sdp1version; ioc 883 drivers/message/fusion/mptspi.c hdr.PageLength = ioc->spi_data.sdp1length; ioc 911 drivers/message/fusion/mptspi.c "IDP:ON\n", ioc->name); ioc 922 drivers/message/fusion/mptspi.c if (mpt_config(ioc, &cfg)) { ioc 924 drivers/message/fusion/mptspi.c "mpt_config failed\n", ioc->name); ioc 930 drivers/message/fusion/mptspi.c dma_free_coherent(&ioc->pcidev->dev, size, pg1, pg1_dma); ioc 1068 drivers/message/fusion/mptspi.c hd->ioc->spi_data.noQas) ioc 1115 drivers/message/fusion/mptspi.c MPT_ADAPTER *ioc = hd->ioc; ioc 1116 drivers/message/fusion/mptspi.c struct Scsi_Host *shost = ioc->sh; ioc 1123 drivers/message/fusion/mptspi.c mpt_findImVolumes(ioc); ioc 1124 drivers/message/fusion/mptspi.c pg3 = ioc->raid_data.pIocPg3; ioc 1142 drivers/message/fusion/mptspi.c "Integrated RAID requests DV of new device\n", ioc->name); ioc 1146 drivers/message/fusion/mptspi.c "Integrated RAID detects new device %d\n", ioc->name, disk); ioc 1147 drivers/message/fusion/mptspi.c scsi_scan_target(&ioc->sh->shost_gendev, 1, disk, 0, SCSI_SCAN_RESCAN); ioc 1154 drivers/message/fusion/mptspi.c MPT_ADAPTER *ioc = hd->ioc; ioc 1157 drivers/message/fusion/mptspi.c shost_printk(KERN_ERR, ioc->sh, MYIOC_s_FMT ioc 1159 drivers/message/fusion/mptspi.c ioc->name, disk); ioc 1170 drivers/message/fusion/mptspi.c mptspi_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply) ioc 1173 drivers/message/fusion/mptspi.c struct _MPT_SCSI_HOST *hd = shost_priv(ioc->sh); ioc 1175 drivers/message/fusion/mptspi.c if (ioc->bus_type != SPI) ioc 1187 drivers/message/fusion/mptspi.c return mptscsih_event_process(ioc, pEvReply); ioc 1265 drivers/message/fusion/mptspi.c MPT_ADAPTER *ioc = hd->ioc; ioc 1270 drivers/message/fusion/mptspi.c shost_for_each_device(sdev, ioc->sh) { ioc 1281 drivers/message/fusion/mptspi.c shost_for_each_device(sdev, ioc->sh) ioc 1304 drivers/message/fusion/mptspi.c mptspi_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) ioc 1308 drivers/message/fusion/mptspi.c rc = mptscsih_ioc_reset(ioc, reset_phase); ioc 1309 drivers/message/fusion/mptspi.c if ((ioc->bus_type != SPI) || (!rc)) ioc 1315 drivers/message/fusion/mptspi.c ioc->sh) { ioc 1316 drivers/message/fusion/mptspi.c struct _MPT_SCSI_HOST *hd = shost_priv(ioc->sh); ioc 1331 drivers/message/fusion/mptspi.c MPT_ADAPTER *ioc = pci_get_drvdata(pdev); ioc 1332 drivers/message/fusion/mptspi.c struct _MPT_SCSI_HOST *hd = shost_priv(ioc->sh); ioc 1356 drivers/message/fusion/mptspi.c MPT_ADAPTER *ioc; ioc 1368 drivers/message/fusion/mptspi.c ioc = pci_get_drvdata(pdev); ioc 1369 drivers/message/fusion/mptspi.c ioc->DoneCtx = mptspiDoneCtx; ioc 1370 drivers/message/fusion/mptspi.c ioc->TaskCtx = mptspiTaskCtx; ioc 1371 drivers/message/fusion/mptspi.c ioc->InternalCtx = mptspiInternalCtx; ioc 1375 drivers/message/fusion/mptspi.c if (ioc->last_state != MPI_IOC_STATE_OPERATIONAL) { ioc 1378 drivers/message/fusion/mptspi.c ioc->name); ioc 1383 drivers/message/fusion/mptspi.c if (!ioc->active) { ioc 1385 drivers/message/fusion/mptspi.c ioc->name); ioc 1393 drivers/message/fusion/mptspi.c for (ii=0; ii < ioc->facts.NumberOfPorts; ii++) { ioc 1394 drivers/message/fusion/mptspi.c if (ioc->pfacts[ii].ProtocolFlags & ioc 1402 drivers/message/fusion/mptspi.c ioc->name, ioc); ioc 1411 drivers/message/fusion/mptspi.c ioc->name); ioc 1421 drivers/message/fusion/mptspi.c spin_lock_irqsave(&ioc->FreeQlock, flags); ioc 1425 drivers/message/fusion/mptspi.c ioc->sh = sh; ioc 1444 drivers/message/fusion/mptspi.c sh->max_id = ioc->devices_per_bus; ioc 1450 drivers/message/fusion/mptspi.c if (ioc->ir_firmware) ioc 1454 drivers/message/fusion/mptspi.c sh->this_id = ioc->pfacts[0].PortSCSIID; ioc 1458 drivers/message/fusion/mptspi.c sh->unique_id = ioc->id; ioc 1469 drivers/message/fusion/mptspi.c scale = ioc->req_sz/ioc->SGE_size; ioc 1470 drivers/message/fusion/mptspi.c if (ioc->sg_addr_size == sizeof(u64)) { ioc 1472 drivers/message/fusion/mptspi.c (ioc->facts.MaxChainDepth-1) + scale + ioc 1473 drivers/message/fusion/mptspi.c (ioc->req_sz - 60) / ioc->SGE_size; ioc 1476 drivers/message/fusion/mptspi.c (ioc->facts.MaxChainDepth-1) + scale + ioc 1477 drivers/message/fusion/mptspi.c (ioc->req_sz - 64) / ioc->SGE_size; ioc 1482 drivers/message/fusion/mptspi.c dprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 1484 drivers/message/fusion/mptspi.c ioc->name, numSGE, sh->sg_tablesize)); ioc 1488 drivers/message/fusion/mptspi.c spin_unlock_irqrestore(&ioc->FreeQlock, flags); ioc 1491 drivers/message/fusion/mptspi.c hd->ioc = ioc; ioc 1496 drivers/message/fusion/mptspi.c ioc->ScsiLookup = kcalloc(ioc->req_depth, sizeof(void *), GFP_ATOMIC); ioc 1497 drivers/message/fusion/mptspi.c if (!ioc->ScsiLookup) { ioc 1501 drivers/message/fusion/mptspi.c spin_lock_init(&ioc->scsi_lookup_lock); ioc 1503 drivers/message/fusion/mptspi.c dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "ScsiLookup @ %p\n", ioc 1504 drivers/message/fusion/mptspi.c ioc->name, ioc->ScsiLookup)); ioc 1506 drivers/message/fusion/mptspi.c ioc->spi_data.Saf_Te = mpt_saf_te; ioc 1507 drivers/message/fusion/mptspi.c ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT ioc 1509 drivers/message/fusion/mptspi.c ioc->name, ioc 1511 drivers/message/fusion/mptspi.c ioc->spi_data.noQas = 0; ioc 1518 drivers/message/fusion/mptspi.c if (ioc->spi_data.sdp0length != 0) ioc 1521 drivers/message/fusion/mptspi.c error = scsi_add_host (sh, &ioc->pcidev->dev); ioc 1523 drivers/message/fusion/mptspi.c dprintk(ioc, printk(MYIOC_s_ERR_FMT ioc 1524 drivers/message/fusion/mptspi.c "scsi_add_host failed\n", ioc->name)); ioc 1531 drivers/message/fusion/mptspi.c if (ioc->spi_data.bus_reset) ioc 1547 drivers/message/fusion/mptspi.c MPT_ADAPTER *ioc = pci_get_drvdata(pdev); ioc 1549 drivers/message/fusion/mptspi.c scsi_remove_host(ioc->sh); ioc 163 drivers/net/ethernet/brocade/bna/bfa_cee.c BUG_ON(!((cee != NULL) && (cee->ioc != NULL))); ioc 164 drivers/net/ethernet/brocade/bna/bfa_cee.c if (!bfa_nw_ioc_is_operational(cee->ioc)) ioc 176 drivers/net/ethernet/brocade/bna/bfa_cee.c bfa_ioc_portid(cee->ioc)); ioc 178 drivers/net/ethernet/brocade/bna/bfa_cee.c bfa_nw_ioc_mbox_queue(cee->ioc, &cee->get_cfg_mb, NULL, NULL); ioc 269 drivers/net/ethernet/brocade/bna/bfa_cee.c bfa_nw_cee_attach(struct bfa_cee *cee, struct bfa_ioc *ioc, ioc 274 drivers/net/ethernet/brocade/bna/bfa_cee.c cee->ioc = ioc; ioc 276 drivers/net/ethernet/brocade/bna/bfa_cee.c bfa_nw_ioc_mbox_regisr(cee->ioc, BFI_MC_CEE, bfa_cee_isr, cee); ioc 278 drivers/net/ethernet/brocade/bna/bfa_cee.c bfa_nw_ioc_notify_register(cee->ioc, &cee->ioc_notify); ioc 45 drivers/net/ethernet/brocade/bna/bfa_cee.h struct bfa_ioc *ioc; ioc 54 drivers/net/ethernet/brocade/bna/bfa_cee.h void bfa_nw_cee_attach(struct bfa_cee *cee, struct bfa_ioc *ioc, void *dev); ioc 50 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_ioc_hw_sem_init(struct bfa_ioc *ioc); ioc 51 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_ioc_hw_sem_get(struct bfa_ioc *ioc); ioc 52 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_ioc_hw_sem_get_cancel(struct bfa_ioc *ioc); ioc 53 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_ioc_hwinit(struct bfa_ioc *ioc, bool force); ioc 54 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_ioc_poll_fwinit(struct bfa_ioc *ioc); ioc 55 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_ioc_send_enable(struct bfa_ioc *ioc); ioc 56 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_ioc_send_disable(struct bfa_ioc *ioc); ioc 57 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_ioc_send_getattr(struct bfa_ioc *ioc); ioc 58 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_ioc_hb_monitor(struct bfa_ioc *ioc); ioc 59 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_ioc_hb_stop(struct bfa_ioc *ioc); ioc 60 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_ioc_reset(struct bfa_ioc *ioc, bool force); ioc 61 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_ioc_mbox_poll(struct bfa_ioc *ioc); ioc 62 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_ioc_mbox_flush(struct bfa_ioc *ioc); ioc 63 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_ioc_recover(struct bfa_ioc *ioc); ioc 65 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_ioc_disable_comp(struct bfa_ioc *ioc); ioc 66 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_ioc_lpu_stop(struct bfa_ioc *ioc); ioc 67 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_nw_ioc_debug_save_ftrc(struct bfa_ioc *ioc); ioc 68 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_ioc_fail_notify(struct bfa_ioc *ioc); ioc 69 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_ioc_pf_enabled(struct bfa_ioc *ioc); ioc 70 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_ioc_pf_disabled(struct bfa_ioc *ioc); ioc 71 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_ioc_pf_failed(struct bfa_ioc *ioc); ioc 72 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_ioc_pf_hwfailed(struct bfa_ioc *ioc); ioc 73 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_ioc_pf_fwmismatch(struct bfa_ioc *ioc); ioc 74 drivers/net/ethernet/brocade/bna/bfa_ioc.c static enum bfa_status bfa_ioc_boot(struct bfa_ioc *ioc, ioc 76 drivers/net/ethernet/brocade/bna/bfa_ioc.c static u32 bfa_ioc_smem_pgnum(struct bfa_ioc *ioc, u32 fmaddr); ioc 77 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_ioc_get_adapter_serial_num(struct bfa_ioc *ioc, ioc 79 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_ioc_get_adapter_fw_ver(struct bfa_ioc *ioc, ioc 81 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_ioc_get_pci_chip_rev(struct bfa_ioc *ioc, ioc 83 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_ioc_get_adapter_optrom_ver(struct bfa_ioc *ioc, ioc 85 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_ioc_get_adapter_manufacturer(struct bfa_ioc *ioc, ioc 87 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_ioc_get_adapter_model(struct bfa_ioc *ioc, char *model); ioc 88 drivers/net/ethernet/brocade/bna/bfa_ioc.c static u64 bfa_ioc_get_pwwn(struct bfa_ioc *ioc); ioc 133 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_iocpf_enable(struct bfa_ioc *ioc); ioc 134 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_iocpf_disable(struct bfa_ioc *ioc); ioc 135 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_iocpf_fail(struct bfa_ioc *ioc); ioc 136 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_iocpf_initfail(struct bfa_ioc *ioc); ioc 137 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_iocpf_getattrfail(struct bfa_ioc *ioc); ioc 138 drivers/net/ethernet/brocade/bna/bfa_ioc.c static void bfa_iocpf_stop(struct bfa_ioc *ioc); ioc 207 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_sm_uninit_entry(struct bfa_ioc *ioc) ioc 213 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_sm_uninit(struct bfa_ioc *ioc, enum ioc_event event) ioc 217 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_reset); ioc 227 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_sm_reset_entry(struct bfa_ioc *ioc) ioc 229 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_set_state(&ioc->iocpf, bfa_iocpf_sm_reset); ioc 234 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_sm_reset(struct bfa_ioc *ioc, enum ioc_event event) ioc 238 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_enabling); ioc 242 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_disable_comp(ioc); ioc 246 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_uninit); ioc 255 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_sm_enabling_entry(struct bfa_ioc *ioc) ioc 257 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_iocpf_enable(ioc); ioc 264 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_sm_enabling(struct bfa_ioc *ioc, enum ioc_event event) ioc 268 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_getattr); ioc 274 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE); ioc 275 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_fail); ioc 277 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_iocpf_initfail(ioc); ioc 281 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE); ioc 282 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_hwfail); ioc 286 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_disabling); ioc 290 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_uninit); ioc 291 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_iocpf_stop(ioc); ioc 304 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_sm_getattr_entry(struct bfa_ioc *ioc) ioc 306 drivers/net/ethernet/brocade/bna/bfa_ioc.c mod_timer(&ioc->ioc_timer, jiffies + ioc 308 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_send_getattr(ioc); ioc 313 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_sm_getattr(struct bfa_ioc *ioc, enum ioc_event event) ioc 317 drivers/net/ethernet/brocade/bna/bfa_ioc.c del_timer(&ioc->ioc_timer); ioc 318 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_op); ioc 323 drivers/net/ethernet/brocade/bna/bfa_ioc.c del_timer(&ioc->ioc_timer); ioc 326 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE); ioc 327 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_fail); ioc 329 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_iocpf_getattrfail(ioc); ioc 333 drivers/net/ethernet/brocade/bna/bfa_ioc.c del_timer(&ioc->ioc_timer); ioc 334 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_disabling); ioc 346 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_sm_op_entry(struct bfa_ioc *ioc) ioc 348 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_OK); ioc 349 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_event_notify(ioc, BFA_IOC_E_ENABLED); ioc 350 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_hb_monitor(ioc); ioc 354 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_sm_op(struct bfa_ioc *ioc, enum ioc_event event) ioc 361 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_hb_stop(ioc); ioc 362 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_disabling); ioc 367 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_hb_stop(ioc); ioc 370 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (ioc->iocpf.auto_recover) ioc 371 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_fail_retry); ioc 373 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_fail); ioc 375 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_fail_notify(ioc); ioc 378 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_iocpf_fail(ioc); ioc 387 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_sm_disabling_entry(struct bfa_ioc *ioc) ioc 389 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_iocpf_disable(ioc); ioc 394 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_sm_disabling(struct bfa_ioc *ioc, enum ioc_event event) ioc 398 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_disabled); ioc 407 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_iocpf_fail(ioc); ioc 411 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_hwfail); ioc 412 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_disable_comp(ioc); ioc 422 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_sm_disabled_entry(struct bfa_ioc *ioc) ioc 424 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_disable_comp(ioc); ioc 428 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_sm_disabled(struct bfa_ioc *ioc, enum ioc_event event) ioc 432 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_enabling); ioc 436 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->cbfn->disable_cbfn(ioc->bfa); ioc 440 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_uninit); ioc 441 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_iocpf_stop(ioc); ioc 450 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_sm_fail_retry_entry(struct bfa_ioc *ioc) ioc 456 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_sm_fail_retry(struct bfa_ioc *ioc, enum ioc_event event) ioc 460 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_getattr); ioc 468 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE); ioc 469 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_fail); ioc 471 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_iocpf_initfail(ioc); ioc 475 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE); ioc 476 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_hwfail); ioc 483 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_disabling); ioc 487 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_uninit); ioc 488 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_iocpf_stop(ioc); ioc 497 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_sm_fail_entry(struct bfa_ioc *ioc) ioc 503 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_sm_fail(struct bfa_ioc *ioc, enum ioc_event event) ioc 507 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE); ioc 511 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_disabling); ioc 515 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_uninit); ioc 516 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_iocpf_stop(ioc); ioc 529 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_sm_hwfail_entry(struct bfa_ioc *ioc) ioc 535 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_sm_hwfail(struct bfa_ioc *ioc, enum ioc_event event) ioc 540 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE); ioc 544 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->cbfn->disable_cbfn(ioc->bfa); ioc 548 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_uninit); ioc 587 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_hw_sem_init(iocpf->ioc); ioc 588 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_hw_sem_get(iocpf->ioc); ioc 595 drivers/net/ethernet/brocade/bna/bfa_ioc.c struct bfa_ioc *ioc = iocpf->ioc; ioc 599 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (bfa_ioc_firmware_lock(ioc)) { ioc 600 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (bfa_ioc_sync_start(ioc)) { ioc 601 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_sync_join(ioc); ioc 604 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_firmware_unlock(ioc); ioc 605 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_hw_sem_release(ioc); ioc 606 drivers/net/ethernet/brocade/bna/bfa_ioc.c mod_timer(&ioc->sem_timer, jiffies + ioc 610 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_hw_sem_release(ioc); ioc 617 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_pf_hwfailed(ioc); ioc 621 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_hw_sem_get_cancel(ioc); ioc 623 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_pf_disabled(ioc); ioc 627 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_hw_sem_get_cancel(ioc); ioc 642 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_pf_fwmismatch(iocpf->ioc); ioc 645 drivers/net/ethernet/brocade/bna/bfa_ioc.c mod_timer(&(iocpf->ioc)->iocpf_timer, jiffies + ioc 653 drivers/net/ethernet/brocade/bna/bfa_ioc.c struct bfa_ioc *ioc = iocpf->ioc; ioc 661 drivers/net/ethernet/brocade/bna/bfa_ioc.c del_timer(&ioc->iocpf_timer); ioc 663 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_pf_disabled(ioc); ioc 667 drivers/net/ethernet/brocade/bna/bfa_ioc.c del_timer(&ioc->iocpf_timer); ioc 680 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_hw_sem_get(iocpf->ioc); ioc 687 drivers/net/ethernet/brocade/bna/bfa_ioc.c struct bfa_ioc *ioc = iocpf->ioc; ioc 691 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (bfa_ioc_sync_complete(ioc)) { ioc 692 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_sync_join(ioc); ioc 695 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_hw_sem_release(ioc); ioc 696 drivers/net/ethernet/brocade/bna/bfa_ioc.c mod_timer(&ioc->sem_timer, jiffies + ioc 703 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_pf_hwfailed(ioc); ioc 707 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_hw_sem_get_cancel(ioc); ioc 720 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_reset(iocpf->ioc, false); ioc 729 drivers/net/ethernet/brocade/bna/bfa_ioc.c struct bfa_ioc *ioc = iocpf->ioc; ioc 737 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_hw_sem_release(ioc); ioc 738 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_pf_failed(ioc); ioc 743 drivers/net/ethernet/brocade/bna/bfa_ioc.c del_timer(&ioc->iocpf_timer); ioc 744 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_sync_leave(ioc); ioc 745 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_hw_sem_release(ioc); ioc 757 drivers/net/ethernet/brocade/bna/bfa_ioc.c mod_timer(&(iocpf->ioc)->iocpf_timer, jiffies + ioc 762 drivers/net/ethernet/brocade/bna/bfa_ioc.c iocpf->ioc->cbfn->reset_cbfn(iocpf->ioc->bfa); ioc 763 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_send_enable(iocpf->ioc); ioc 772 drivers/net/ethernet/brocade/bna/bfa_ioc.c struct bfa_ioc *ioc = iocpf->ioc; ioc 776 drivers/net/ethernet/brocade/bna/bfa_ioc.c del_timer(&ioc->iocpf_timer); ioc 777 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_hw_sem_release(ioc); ioc 782 drivers/net/ethernet/brocade/bna/bfa_ioc.c del_timer(&ioc->iocpf_timer); ioc 786 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_hw_sem_release(ioc); ioc 788 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_pf_failed(ioc); ioc 793 drivers/net/ethernet/brocade/bna/bfa_ioc.c del_timer(&ioc->iocpf_timer); ioc 794 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_hw_sem_release(ioc); ioc 806 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_pf_enabled(iocpf->ioc); ioc 833 drivers/net/ethernet/brocade/bna/bfa_ioc.c mod_timer(&(iocpf->ioc)->iocpf_timer, jiffies + ioc 835 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_send_disable(iocpf->ioc); ioc 842 drivers/net/ethernet/brocade/bna/bfa_ioc.c struct bfa_ioc *ioc = iocpf->ioc; ioc 846 drivers/net/ethernet/brocade/bna/bfa_ioc.c del_timer(&ioc->iocpf_timer); ioc 851 drivers/net/ethernet/brocade/bna/bfa_ioc.c del_timer(&ioc->iocpf_timer); ioc 855 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_set_cur_ioc_fwstate(ioc, BFI_IOC_FAIL); ioc 870 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_hw_sem_get(iocpf->ioc); ioc 877 drivers/net/ethernet/brocade/bna/bfa_ioc.c struct bfa_ioc *ioc = iocpf->ioc; ioc 881 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_sync_leave(ioc); ioc 882 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_hw_sem_release(ioc); ioc 888 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_pf_hwfailed(ioc); ioc 903 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_mbox_flush(iocpf->ioc); ioc 904 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_pf_disabled(iocpf->ioc); ioc 910 drivers/net/ethernet/brocade/bna/bfa_ioc.c struct bfa_ioc *ioc = iocpf->ioc; ioc 918 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_firmware_unlock(ioc); ioc 930 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_debug_save_ftrc(iocpf->ioc); ioc 931 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_hw_sem_get(iocpf->ioc); ioc 938 drivers/net/ethernet/brocade/bna/bfa_ioc.c struct bfa_ioc *ioc = iocpf->ioc; ioc 942 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_notify_fail(ioc); ioc 943 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_sync_leave(ioc); ioc 944 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_set_cur_ioc_fwstate(ioc, BFI_IOC_FAIL); ioc 945 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_hw_sem_release(ioc); ioc 951 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_pf_hwfailed(ioc); ioc 955 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_hw_sem_get_cancel(ioc); ioc 960 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_hw_sem_get_cancel(ioc); ioc 961 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_firmware_unlock(ioc); ioc 982 drivers/net/ethernet/brocade/bna/bfa_ioc.c struct bfa_ioc *ioc = iocpf->ioc; ioc 990 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_firmware_unlock(ioc); ioc 1005 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_lpu_stop(iocpf->ioc); ioc 1010 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_mbox_flush(iocpf->ioc); ioc 1011 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_hw_sem_get(iocpf->ioc); ioc 1018 drivers/net/ethernet/brocade/bna/bfa_ioc.c struct bfa_ioc *ioc = iocpf->ioc; ioc 1022 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_sync_ack(ioc); ioc 1023 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_notify_fail(ioc); ioc 1025 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_sync_leave(ioc); ioc 1026 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_set_cur_ioc_fwstate(ioc, BFI_IOC_FAIL); ioc 1027 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_hw_sem_release(ioc); ioc 1030 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (bfa_ioc_sync_complete(ioc)) ioc 1033 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_hw_sem_release(ioc); ioc 1041 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_pf_hwfailed(ioc); ioc 1045 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_hw_sem_get_cancel(ioc); ioc 1080 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_event_notify(struct bfa_ioc *ioc, enum bfa_ioc_event event) ioc 1084 drivers/net/ethernet/brocade/bna/bfa_ioc.c list_for_each_entry(notify, &ioc->notify_q, qe) ioc 1089 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_disable_comp(struct bfa_ioc *ioc) ioc 1091 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->cbfn->disable_cbfn(ioc->bfa); ioc 1092 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_event_notify(ioc, BFA_IOC_E_DISABLED); ioc 1125 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_fwver_clear(struct bfa_ioc *ioc) ioc 1130 drivers/net/ethernet/brocade/bna/bfa_ioc.c pgnum = PSS_SMEM_PGNUM(ioc->ioc_regs.smem_pg0, loff); ioc 1132 drivers/net/ethernet/brocade/bna/bfa_ioc.c writel(pgnum, ioc->ioc_regs.host_page_num_fn); ioc 1135 drivers/net/ethernet/brocade/bna/bfa_ioc.c writel(0, ioc->ioc_regs.smem_page_start + loff); ioc 1142 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_hw_sem_init(struct bfa_ioc *ioc) ioc 1148 drivers/net/ethernet/brocade/bna/bfa_ioc.c r32 = readl(ioc->ioc_regs.ioc_init_sem_reg); ioc 1151 drivers/net/ethernet/brocade/bna/bfa_ioc.c r32 = readl(ioc->ioc_regs.ioc_init_sem_reg); ioc 1154 drivers/net/ethernet/brocade/bna/bfa_ioc.c fwstate = bfa_ioc_get_cur_ioc_fwstate(ioc); ioc 1156 drivers/net/ethernet/brocade/bna/bfa_ioc.c writel(1, ioc->ioc_regs.ioc_init_sem_reg); ioc 1160 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_fwver_get(ioc, &fwhdr); ioc 1163 drivers/net/ethernet/brocade/bna/bfa_ioc.c writel(1, ioc->ioc_regs.ioc_init_sem_reg); ioc 1167 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_fwver_clear(ioc); ioc 1168 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_set_cur_ioc_fwstate(ioc, BFI_IOC_UNINIT); ioc 1169 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_set_alt_ioc_fwstate(ioc, BFI_IOC_UNINIT); ioc 1174 drivers/net/ethernet/brocade/bna/bfa_ioc.c readl(ioc->ioc_regs.ioc_sem_reg); ioc 1175 drivers/net/ethernet/brocade/bna/bfa_ioc.c writel(1, ioc->ioc_regs.ioc_sem_reg); ioc 1178 drivers/net/ethernet/brocade/bna/bfa_ioc.c writel(1, ioc->ioc_regs.ioc_init_sem_reg); ioc 1182 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_hw_sem_get(struct bfa_ioc *ioc) ioc 1190 drivers/net/ethernet/brocade/bna/bfa_ioc.c r32 = readl(ioc->ioc_regs.ioc_sem_reg); ioc 1192 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_SEM_ERROR); ioc 1196 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_SEMLOCKED); ioc 1200 drivers/net/ethernet/brocade/bna/bfa_ioc.c mod_timer(&ioc->sem_timer, jiffies + ioc 1205 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_hw_sem_release(struct bfa_ioc *ioc) ioc 1207 drivers/net/ethernet/brocade/bna/bfa_ioc.c writel(1, ioc->ioc_regs.ioc_sem_reg); ioc 1211 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_hw_sem_get_cancel(struct bfa_ioc *ioc) ioc 1213 drivers/net/ethernet/brocade/bna/bfa_ioc.c del_timer(&ioc->sem_timer); ioc 1218 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_lmem_init(struct bfa_ioc *ioc) ioc 1224 drivers/net/ethernet/brocade/bna/bfa_ioc.c pss_ctl = readl(ioc->ioc_regs.pss_ctl_reg); ioc 1232 drivers/net/ethernet/brocade/bna/bfa_ioc.c writel(pss_ctl, ioc->ioc_regs.pss_ctl_reg); ioc 1239 drivers/net/ethernet/brocade/bna/bfa_ioc.c pss_ctl = readl(ioc->ioc_regs.pss_ctl_reg); ioc 1250 drivers/net/ethernet/brocade/bna/bfa_ioc.c writel(pss_ctl, ioc->ioc_regs.pss_ctl_reg); ioc 1254 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_lpu_start(struct bfa_ioc *ioc) ioc 1261 drivers/net/ethernet/brocade/bna/bfa_ioc.c pss_ctl = readl(ioc->ioc_regs.pss_ctl_reg); ioc 1264 drivers/net/ethernet/brocade/bna/bfa_ioc.c writel(pss_ctl, ioc->ioc_regs.pss_ctl_reg); ioc 1268 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_lpu_stop(struct bfa_ioc *ioc) ioc 1275 drivers/net/ethernet/brocade/bna/bfa_ioc.c pss_ctl = readl(ioc->ioc_regs.pss_ctl_reg); ioc 1278 drivers/net/ethernet/brocade/bna/bfa_ioc.c writel(pss_ctl, ioc->ioc_regs.pss_ctl_reg); ioc 1283 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_fwver_get(struct bfa_ioc *ioc, struct bfi_ioc_image_hdr *fwhdr) ioc 1290 drivers/net/ethernet/brocade/bna/bfa_ioc.c pgnum = bfa_ioc_smem_pgnum(ioc, loff); ioc 1291 drivers/net/ethernet/brocade/bna/bfa_ioc.c writel(pgnum, ioc->ioc_regs.host_page_num_fn); ioc 1296 drivers/net/ethernet/brocade/bna/bfa_ioc.c swab32(readl(loff + ioc->ioc_regs.smem_page_start)); ioc 1741 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_flash_img_get_chnk(struct bfa_ioc *ioc, u32 off, ioc 1744 drivers/net/ethernet/brocade/bna/bfa_ioc.c return bfa_flash_raw_read(ioc->pcidev.pci_bar_kva, ioc 1750 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_flash_fwver_cmp(struct bfa_ioc *ioc, ioc 1757 drivers/net/ethernet/brocade/bna/bfa_ioc.c status = bfa_nw_ioc_flash_img_get_chnk(ioc, 0, fwimg); ioc 1772 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_fwver_cmp(struct bfa_ioc *ioc, struct bfi_ioc_image_hdr *fwhdr) ioc 1778 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_cb_image_get_chunk(bfa_ioc_asic_gen(ioc), 0); ioc 1791 drivers/net/ethernet/brocade/bna/bfa_ioc.c smem_flash_cmp = bfa_ioc_flash_fwver_cmp(ioc, fwhdr); ioc 1806 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_fwver_valid(struct bfa_ioc *ioc, u32 boot_env) ioc 1810 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_fwver_get(ioc, &fwhdr); ioc 1814 drivers/net/ethernet/brocade/bna/bfa_ioc.c return bfa_nw_ioc_fwver_cmp(ioc, &fwhdr); ioc 1819 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_msgflush(struct bfa_ioc *ioc) ioc 1823 drivers/net/ethernet/brocade/bna/bfa_ioc.c r32 = readl(ioc->ioc_regs.lpu_mbox_cmd); ioc 1825 drivers/net/ethernet/brocade/bna/bfa_ioc.c writel(1, ioc->ioc_regs.lpu_mbox_cmd); ioc 1829 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_hwinit(struct bfa_ioc *ioc, bool force) ioc 1835 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc_fwstate = bfa_ioc_get_cur_ioc_fwstate(ioc); ioc 1846 drivers/net/ethernet/brocade/bna/bfa_ioc.c false : bfa_ioc_fwver_valid(ioc, boot_env); ioc 1849 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (bfa_ioc_boot(ioc, BFI_FWBOOT_TYPE_NORMAL, boot_env) == ioc 1851 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_poll_fwinit(ioc); ioc 1861 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_poll_fwinit(ioc); ioc 1874 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_msgflush(ioc); ioc 1875 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_FWREADY); ioc 1882 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (bfa_ioc_boot(ioc, BFI_FWBOOT_TYPE_NORMAL, boot_env) == ioc 1884 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_poll_fwinit(ioc); ioc 1888 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_timeout(struct bfa_ioc *ioc) ioc 1890 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_send_event(ioc, IOC_E_TIMEOUT); ioc 1894 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_mbox_send(struct bfa_ioc *ioc, void *ioc_msg, int len) ioc 1906 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->ioc_regs.hfn_mbox + i * sizeof(u32)); ioc 1909 drivers/net/ethernet/brocade/bna/bfa_ioc.c writel(0, ioc->ioc_regs.hfn_mbox + i * sizeof(u32)); ioc 1914 drivers/net/ethernet/brocade/bna/bfa_ioc.c writel(1, ioc->ioc_regs.hfn_mbox_cmd); ioc 1915 drivers/net/ethernet/brocade/bna/bfa_ioc.c (void) readl(ioc->ioc_regs.hfn_mbox_cmd); ioc 1919 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_send_enable(struct bfa_ioc *ioc) ioc 1924 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_portid(ioc)); ioc 1925 drivers/net/ethernet/brocade/bna/bfa_ioc.c enable_req.clscode = htons(ioc->clscode); ioc 1929 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_mbox_send(ioc, &enable_req, sizeof(struct bfi_ioc_ctrl_req)); ioc 1933 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_send_disable(struct bfa_ioc *ioc) ioc 1938 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_portid(ioc)); ioc 1939 drivers/net/ethernet/brocade/bna/bfa_ioc.c disable_req.clscode = htons(ioc->clscode); ioc 1943 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_mbox_send(ioc, &disable_req, sizeof(struct bfi_ioc_ctrl_req)); ioc 1947 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_send_getattr(struct bfa_ioc *ioc) ioc 1952 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_portid(ioc)); ioc 1953 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_dma_be_addr_set(attr_req.attr_addr, ioc->attr_dma.pa); ioc 1954 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_mbox_send(ioc, &attr_req, sizeof(attr_req)); ioc 1958 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_hb_check(struct bfa_ioc *ioc) ioc 1962 drivers/net/ethernet/brocade/bna/bfa_ioc.c hb_count = readl(ioc->ioc_regs.heartbeat); ioc 1963 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (ioc->hb_count == hb_count) { ioc 1964 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_recover(ioc); ioc 1967 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->hb_count = hb_count; ioc 1970 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_mbox_poll(ioc); ioc 1971 drivers/net/ethernet/brocade/bna/bfa_ioc.c mod_timer(&ioc->hb_timer, jiffies + ioc 1976 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_hb_monitor(struct bfa_ioc *ioc) ioc 1978 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->hb_count = readl(ioc->ioc_regs.heartbeat); ioc 1979 drivers/net/ethernet/brocade/bna/bfa_ioc.c mod_timer(&ioc->hb_timer, jiffies + ioc 1984 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_hb_stop(struct bfa_ioc *ioc) ioc 1986 drivers/net/ethernet/brocade/bna/bfa_ioc.c del_timer(&ioc->hb_timer); ioc 1991 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_download_fw(struct bfa_ioc *ioc, u32 boot_type, ioc 2008 drivers/net/ethernet/brocade/bna/bfa_ioc.c status = bfa_nw_ioc_flash_img_get_chnk(ioc, ioc 2015 drivers/net/ethernet/brocade/bna/bfa_ioc.c fwimg_size = bfa_cb_image_get_size(bfa_ioc_asic_gen(ioc)); ioc 2016 drivers/net/ethernet/brocade/bna/bfa_ioc.c fwimg = bfa_cb_image_get_chunk(bfa_ioc_asic_gen(ioc), ioc 2020 drivers/net/ethernet/brocade/bna/bfa_ioc.c pgnum = bfa_ioc_smem_pgnum(ioc, loff); ioc 2022 drivers/net/ethernet/brocade/bna/bfa_ioc.c writel(pgnum, ioc->ioc_regs.host_page_num_fn); ioc 2029 drivers/net/ethernet/brocade/bna/bfa_ioc.c status = bfa_nw_ioc_flash_img_get_chnk(ioc, ioc 2038 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_asic_gen(ioc), ioc 2047 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->ioc_regs.smem_page_start + loff); ioc 2058 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->ioc_regs.host_page_num_fn); ioc 2062 drivers/net/ethernet/brocade/bna/bfa_ioc.c writel(bfa_ioc_smem_pgnum(ioc, 0), ioc 2063 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->ioc_regs.host_page_num_fn); ioc 2072 drivers/net/ethernet/brocade/bna/bfa_ioc.c asicmode = BFI_FWBOOT_DEVMODE(ioc->asic_gen, ioc->asic_mode, ioc 2073 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->port0_mode, ioc->port1_mode); ioc 2074 drivers/net/ethernet/brocade/bna/bfa_ioc.c writel(asicmode, ((ioc->ioc_regs.smem_page_start) ioc 2076 drivers/net/ethernet/brocade/bna/bfa_ioc.c writel(boot_type, ((ioc->ioc_regs.smem_page_start) ioc 2078 drivers/net/ethernet/brocade/bna/bfa_ioc.c writel(boot_env, ((ioc->ioc_regs.smem_page_start) ioc 2084 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_reset(struct bfa_ioc *ioc, bool force) ioc 2086 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_hwinit(ioc, force); ioc 2091 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_enable_reply(struct bfa_ioc *ioc, enum bfa_mode port_mode, ioc 2094 drivers/net/ethernet/brocade/bna/bfa_ioc.c struct bfa_iocpf *iocpf = &ioc->iocpf; ioc 2096 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->port_mode = ioc->port_mode_cfg = port_mode; ioc 2097 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->ad_cap_bm = cap_bm; ioc 2103 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_getattr_reply(struct bfa_ioc *ioc) ioc 2105 drivers/net/ethernet/brocade/bna/bfa_ioc.c struct bfi_ioc_attr *attr = ioc->attr; ioc 2111 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_send_event(ioc, IOC_E_FWRSP_GETATTR); ioc 2116 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_mbox_attach(struct bfa_ioc *ioc) ioc 2118 drivers/net/ethernet/brocade/bna/bfa_ioc.c struct bfa_ioc_mbox_mod *mod = &ioc->mbox_mod; ioc 2124 drivers/net/ethernet/brocade/bna/bfa_ioc.c mod->mbhdlr[mc].cbarg = ioc->bfa; ioc 2130 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_mbox_poll(struct bfa_ioc *ioc) ioc 2132 drivers/net/ethernet/brocade/bna/bfa_ioc.c struct bfa_ioc_mbox_mod *mod = &ioc->mbox_mod; ioc 2147 drivers/net/ethernet/brocade/bna/bfa_ioc.c stat = readl(ioc->ioc_regs.hfn_mbox_cmd); ioc 2156 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_mbox_send(ioc, cmd->msg, sizeof(cmd->msg)); ioc 2171 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_mbox_flush(struct bfa_ioc *ioc) ioc 2173 drivers/net/ethernet/brocade/bna/bfa_ioc.c struct bfa_ioc_mbox_mod *mod = &ioc->mbox_mod; ioc 2191 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_smem_read(struct bfa_ioc *ioc, void *tbuf, u32 soff, u32 sz) ioc 2197 drivers/net/ethernet/brocade/bna/bfa_ioc.c pgnum = PSS_SMEM_PGNUM(ioc->ioc_regs.smem_pg0, soff); ioc 2203 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (!bfa_nw_ioc_sem_get(ioc->ioc_regs.ioc_init_sem_reg)) ioc 2206 drivers/net/ethernet/brocade/bna/bfa_ioc.c writel(pgnum, ioc->ioc_regs.host_page_num_fn); ioc 2210 drivers/net/ethernet/brocade/bna/bfa_ioc.c r32 = swab32(readl(loff + ioc->ioc_regs.smem_page_start)); ioc 2220 drivers/net/ethernet/brocade/bna/bfa_ioc.c writel(pgnum, ioc->ioc_regs.host_page_num_fn); ioc 2224 drivers/net/ethernet/brocade/bna/bfa_ioc.c writel(PSS_SMEM_PGNUM(ioc->ioc_regs.smem_pg0, 0), ioc 2225 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->ioc_regs.host_page_num_fn); ioc 2230 drivers/net/ethernet/brocade/bna/bfa_ioc.c readl(ioc->ioc_regs.ioc_init_sem_reg); ioc 2231 drivers/net/ethernet/brocade/bna/bfa_ioc.c writel(1, ioc->ioc_regs.ioc_init_sem_reg); ioc 2237 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_debug_fwtrc(struct bfa_ioc *ioc, void *trcdata, int *trclen) ioc 2239 drivers/net/ethernet/brocade/bna/bfa_ioc.c u32 loff = BFI_IOC_TRC_OFF + BNA_DBG_FWTRC_LEN * ioc->port_id; ioc 2246 drivers/net/ethernet/brocade/bna/bfa_ioc.c status = bfa_nw_ioc_smem_read(ioc, trcdata, loff, tlen); ioc 2253 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_debug_save_ftrc(struct bfa_ioc *ioc) ioc 2257 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (ioc->dbg_fwsave_once) { ioc 2258 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->dbg_fwsave_once = false; ioc 2259 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (ioc->dbg_fwsave_len) { ioc 2260 drivers/net/ethernet/brocade/bna/bfa_ioc.c tlen = ioc->dbg_fwsave_len; ioc 2261 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_debug_fwtrc(ioc, ioc->dbg_fwsave, &tlen); ioc 2268 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_debug_fwsave(struct bfa_ioc *ioc, void *trcdata, int *trclen) ioc 2272 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (ioc->dbg_fwsave_len == 0) ioc 2276 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (tlen > ioc->dbg_fwsave_len) ioc 2277 drivers/net/ethernet/brocade/bna/bfa_ioc.c tlen = ioc->dbg_fwsave_len; ioc 2279 drivers/net/ethernet/brocade/bna/bfa_ioc.c memcpy(trcdata, ioc->dbg_fwsave, tlen); ioc 2285 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_fail_notify(struct bfa_ioc *ioc) ioc 2290 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->cbfn->hbfail_cbfn(ioc->bfa); ioc 2291 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_event_notify(ioc, BFA_IOC_E_FAILED); ioc 2292 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_debug_save_ftrc(ioc); ioc 2297 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_pf_enabled(struct bfa_ioc *ioc) ioc 2299 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_send_event(ioc, IOC_E_ENABLED); ioc 2303 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_pf_disabled(struct bfa_ioc *ioc) ioc 2305 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_send_event(ioc, IOC_E_DISABLED); ioc 2309 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_pf_failed(struct bfa_ioc *ioc) ioc 2311 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_send_event(ioc, IOC_E_PFFAILED); ioc 2315 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_pf_hwfailed(struct bfa_ioc *ioc) ioc 2317 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_send_event(ioc, IOC_E_HWFAILED); ioc 2321 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_pf_fwmismatch(struct bfa_ioc *ioc) ioc 2326 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE); ioc 2331 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_pll_init(struct bfa_ioc *ioc) ioc 2336 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_sem_get(ioc->ioc_regs.ioc_init_sem_reg); ioc 2338 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_pll_init_asic(ioc); ioc 2340 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->pllinit = true; ioc 2343 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_lmem_init(ioc); ioc 2348 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_sem_release(ioc->ioc_regs.ioc_init_sem_reg); ioc 2357 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_boot(struct bfa_ioc *ioc, enum bfi_fwboot_type boot_type, ioc 2362 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_stats(ioc, ioc_boots); ioc 2364 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (bfa_ioc_pll_init(ioc) != BFA_STATUS_OK) ioc 2369 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_cb_image_get_chunk(bfa_ioc_asic_gen(ioc), 0); ioc 2373 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (bfa_ioc_flash_fwver_cmp(ioc, drv_fwhdr) == ioc 2382 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_set_cur_ioc_fwstate(ioc, BFI_IOC_MEMTEST); ioc 2383 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_set_alt_ioc_fwstate(ioc, BFI_IOC_MEMTEST); ioc 2385 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_set_cur_ioc_fwstate(ioc, BFI_IOC_INITING); ioc 2386 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_set_alt_ioc_fwstate(ioc, BFI_IOC_INITING); ioc 2389 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_msgflush(ioc); ioc 2390 drivers/net/ethernet/brocade/bna/bfa_ioc.c status = bfa_ioc_download_fw(ioc, boot_type, boot_env); ioc 2392 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_lpu_start(ioc); ioc 2394 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_TIMEOUT); ioc 2407 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_msgget(struct bfa_ioc *ioc, void *mbmsg) ioc 2413 drivers/net/ethernet/brocade/bna/bfa_ioc.c r32 = readl(ioc->ioc_regs.lpu_mbox_cmd); ioc 2422 drivers/net/ethernet/brocade/bna/bfa_ioc.c r32 = readl(ioc->ioc_regs.lpu_mbox + ioc 2430 drivers/net/ethernet/brocade/bna/bfa_ioc.c writel(1, ioc->ioc_regs.lpu_mbox_cmd); ioc 2431 drivers/net/ethernet/brocade/bna/bfa_ioc.c readl(ioc->ioc_regs.lpu_mbox_cmd); ioc 2437 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_isr(struct bfa_ioc *ioc, struct bfi_mbmsg *m) ioc 2440 drivers/net/ethernet/brocade/bna/bfa_ioc.c struct bfa_iocpf *iocpf = &ioc->iocpf; ioc 2444 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_stats(ioc, ioc_isrs); ioc 2451 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_enable_reply(ioc, ioc 2461 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_getattr_reply(ioc); ioc 2476 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_attach(struct bfa_ioc *ioc, void *bfa, struct bfa_ioc_cbfn *cbfn) ioc 2478 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->bfa = bfa; ioc 2479 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->cbfn = cbfn; ioc 2480 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->fcmode = false; ioc 2481 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->pllinit = false; ioc 2482 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->dbg_fwsave_once = true; ioc 2483 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->iocpf.ioc = ioc; ioc 2485 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_mbox_attach(ioc); ioc 2486 drivers/net/ethernet/brocade/bna/bfa_ioc.c INIT_LIST_HEAD(&ioc->notify_q); ioc 2488 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_uninit); ioc 2489 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_send_event(ioc, IOC_E_RESET); ioc 2494 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_detach(struct bfa_ioc *ioc) ioc 2496 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_send_event(ioc, IOC_E_DETACH); ioc 2499 drivers/net/ethernet/brocade/bna/bfa_ioc.c INIT_LIST_HEAD(&ioc->notify_q); ioc 2508 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_pci_init(struct bfa_ioc *ioc, struct bfa_pcidev *pcidev, ioc 2511 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->clscode = clscode; ioc 2512 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->pcidev = *pcidev; ioc 2517 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->port0_mode = ioc->port1_mode = BFI_PORT_MODE_FC; ioc 2518 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->asic_mode = BFI_ASIC_MODE_FC; ioc 2522 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->asic_gen = BFI_ASIC_GEN_CT; ioc 2523 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->port0_mode = ioc->port1_mode = BFI_PORT_MODE_ETH; ioc 2524 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->asic_mode = BFI_ASIC_MODE_ETH; ioc 2525 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->port_mode = ioc->port_mode_cfg = BFA_MODE_CNA; ioc 2526 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->ad_cap_bm = BFA_CM_CNA; ioc 2530 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->asic_gen = BFI_ASIC_GEN_CT2; ioc 2533 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->asic_mode = BFI_ASIC_MODE_FC16; ioc 2534 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->fcmode = true; ioc 2535 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->port_mode = ioc->port_mode_cfg = BFA_MODE_HBA; ioc 2536 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->ad_cap_bm = BFA_CM_HBA; ioc 2538 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->port0_mode = ioc->port1_mode = BFI_PORT_MODE_ETH; ioc 2539 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->asic_mode = BFI_ASIC_MODE_ETH; ioc 2541 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->port_mode = ioc 2542 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->port_mode_cfg = BFA_MODE_CNA; ioc 2543 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->ad_cap_bm = BFA_CM_CNA; ioc 2545 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->port_mode = ioc 2546 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->port_mode_cfg = BFA_MODE_NIC; ioc 2547 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->ad_cap_bm = BFA_CM_NIC; ioc 2559 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (ioc->asic_gen == BFI_ASIC_GEN_CT) ioc 2560 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_set_ct_hwif(ioc); ioc 2562 drivers/net/ethernet/brocade/bna/bfa_ioc.c WARN_ON(ioc->asic_gen != BFI_ASIC_GEN_CT2); ioc 2563 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_set_ct2_hwif(ioc); ioc 2564 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_ct2_poweron(ioc); ioc 2567 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_map_port(ioc); ioc 2568 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_reg_init(ioc); ioc 2578 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_mem_claim(struct bfa_ioc *ioc, u8 *dm_kva, u64 dm_pa) ioc 2583 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->attr_dma.kva = dm_kva; ioc 2584 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->attr_dma.pa = dm_pa; ioc 2585 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->attr = (struct bfi_ioc_attr *) dm_kva; ioc 2596 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_enable(struct bfa_ioc *ioc) ioc 2598 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_stats(ioc, ioc_enables); ioc 2599 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->dbg_fwsave_once = true; ioc 2601 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_send_event(ioc, IOC_E_ENABLE); ioc 2605 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_disable(struct bfa_ioc *ioc) ioc 2607 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_stats(ioc, ioc_disables); ioc 2608 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_send_event(ioc, IOC_E_DISABLE); ioc 2613 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_debug_memclaim(struct bfa_ioc *ioc, void *dbg_fwsave) ioc 2615 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->dbg_fwsave = dbg_fwsave; ioc 2616 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->dbg_fwsave_len = ioc->iocpf.auto_recover ? BNA_DBG_FWTRC_LEN : 0; ioc 2620 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_smem_pgnum(struct bfa_ioc *ioc, u32 fmaddr) ioc 2622 drivers/net/ethernet/brocade/bna/bfa_ioc.c return PSS_SMEM_PGNUM(ioc->ioc_regs.smem_pg0, fmaddr); ioc 2627 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_mbox_regisr(struct bfa_ioc *ioc, enum bfi_mclass mc, ioc 2630 drivers/net/ethernet/brocade/bna/bfa_ioc.c struct bfa_ioc_mbox_mod *mod = &ioc->mbox_mod; ioc 2645 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_mbox_queue(struct bfa_ioc *ioc, struct bfa_mbox_cmd *cmd, ioc 2648 drivers/net/ethernet/brocade/bna/bfa_ioc.c struct bfa_ioc_mbox_mod *mod = &ioc->mbox_mod; ioc 2665 drivers/net/ethernet/brocade/bna/bfa_ioc.c stat = readl(ioc->ioc_regs.hfn_mbox_cmd); ioc 2674 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_mbox_send(ioc, cmd->msg, sizeof(cmd->msg)); ioc 2681 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_mbox_isr(struct bfa_ioc *ioc) ioc 2683 drivers/net/ethernet/brocade/bna/bfa_ioc.c struct bfa_ioc_mbox_mod *mod = &ioc->mbox_mod; ioc 2687 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (bfa_ioc_msgget(ioc, &m)) { ioc 2693 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_isr(ioc, &m); ioc 2703 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_lpu_read_stat(ioc); ioc 2708 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_mbox_poll(ioc); ioc 2712 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_error_isr(struct bfa_ioc *ioc) ioc 2714 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_stats(ioc, ioc_hbfails); ioc 2715 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_stats_hb_count(ioc, ioc->hb_count); ioc 2716 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_send_event(ioc, IOC_E_HWERROR); ioc 2721 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_is_disabled(struct bfa_ioc *ioc) ioc 2723 drivers/net/ethernet/brocade/bna/bfa_ioc.c return bfa_fsm_cmp_state(ioc, bfa_ioc_sm_disabling) || ioc 2724 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_cmp_state(ioc, bfa_ioc_sm_disabled); ioc 2729 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_is_operational(struct bfa_ioc *ioc) ioc 2731 drivers/net/ethernet/brocade/bna/bfa_ioc.c return bfa_fsm_cmp_state(ioc, bfa_ioc_sm_op); ioc 2738 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_notify_register(struct bfa_ioc *ioc, ioc 2741 drivers/net/ethernet/brocade/bna/bfa_ioc.c list_add_tail(¬ify->qe, &ioc->notify_q); ioc 2746 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_get_adapter_attr(struct bfa_ioc *ioc, ioc 2751 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc_attr = ioc->attr; ioc 2753 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_get_adapter_serial_num(ioc, ad_attr->serial_num); ioc 2754 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_get_adapter_fw_ver(ioc, ad_attr->fw_ver); ioc 2755 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_get_adapter_optrom_ver(ioc, ad_attr->optrom_ver); ioc 2756 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_get_adapter_manufacturer(ioc, ad_attr->manufacturer); ioc 2760 drivers/net/ethernet/brocade/bna/bfa_ioc.c ad_attr->nports = bfa_ioc_get_nports(ioc); ioc 2761 drivers/net/ethernet/brocade/bna/bfa_ioc.c ad_attr->max_speed = bfa_ioc_speed_sup(ioc); ioc 2763 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_get_adapter_model(ioc, ad_attr->model); ioc 2765 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_get_adapter_model(ioc, ad_attr->model_descr); ioc 2775 drivers/net/ethernet/brocade/bna/bfa_ioc.c ad_attr->pwwn = bfa_ioc_get_pwwn(ioc); ioc 2776 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_get_mac(ioc, ad_attr->mac); ioc 2783 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_get_pci_chip_rev(ioc, ad_attr->hw_ver); ioc 2787 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_get_type(struct bfa_ioc *ioc) ioc 2789 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (ioc->clscode == BFI_PCIFN_CLASS_ETH) ioc 2792 drivers/net/ethernet/brocade/bna/bfa_ioc.c BUG_ON(!(ioc->clscode == BFI_PCIFN_CLASS_FC)); ioc 2794 drivers/net/ethernet/brocade/bna/bfa_ioc.c return (ioc->attr->port_mode == BFI_PORT_MODE_FC) ioc 2799 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_get_adapter_serial_num(struct bfa_ioc *ioc, char *serial_num) ioc 2802 drivers/net/ethernet/brocade/bna/bfa_ioc.c (void *)ioc->attr->brcd_serialnum, ioc 2807 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_get_adapter_fw_ver(struct bfa_ioc *ioc, char *fw_ver) ioc 2809 drivers/net/ethernet/brocade/bna/bfa_ioc.c memcpy(fw_ver, ioc->attr->fw_version, BFA_VERSION_LEN); ioc 2813 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_get_pci_chip_rev(struct bfa_ioc *ioc, char *chip_rev) ioc 2823 drivers/net/ethernet/brocade/bna/bfa_ioc.c chip_rev[4] = ioc->attr->asic_rev; ioc 2828 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_get_adapter_optrom_ver(struct bfa_ioc *ioc, char *optrom_ver) ioc 2830 drivers/net/ethernet/brocade/bna/bfa_ioc.c memcpy(optrom_ver, ioc->attr->optrom_version, ioc 2835 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_get_adapter_manufacturer(struct bfa_ioc *ioc, char *manufacturer) ioc 2841 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_get_adapter_model(struct bfa_ioc *ioc, char *model) ioc 2848 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc_attr = ioc->attr; ioc 2855 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_get_state(struct bfa_ioc *ioc) ioc 2858 drivers/net/ethernet/brocade/bna/bfa_ioc.c enum bfa_ioc_state ioc_st = bfa_sm_to_state(ioc_sm_table, ioc->fsm); ioc 2863 drivers/net/ethernet/brocade/bna/bfa_ioc.c iocpf_st = bfa_sm_to_state(iocpf_sm_table, ioc->iocpf.fsm); ioc 2894 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_get_attr(struct bfa_ioc *ioc, struct bfa_ioc_attr *ioc_attr) ioc 2898 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc_attr->state = bfa_ioc_get_state(ioc); ioc 2899 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc_attr->port_id = bfa_ioc_portid(ioc); ioc 2900 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc_attr->port_mode = ioc->port_mode; ioc 2902 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc_attr->port_mode_cfg = ioc->port_mode_cfg; ioc 2903 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc_attr->cap_bm = ioc->ad_cap_bm; ioc 2905 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc_attr->ioc_type = bfa_ioc_get_type(ioc); ioc 2907 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_get_adapter_attr(ioc, &ioc_attr->adapter_attr); ioc 2909 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc_attr->pci_attr.device_id = bfa_ioc_devid(ioc); ioc 2910 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc_attr->pci_attr.pcifn = bfa_ioc_pcifn(ioc); ioc 2911 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc_attr->def_fn = bfa_ioc_is_default(ioc); ioc 2912 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_get_pci_chip_rev(ioc, ioc_attr->pci_attr.chip_rev); ioc 2917 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_get_pwwn(struct bfa_ioc *ioc) ioc 2919 drivers/net/ethernet/brocade/bna/bfa_ioc.c return ioc->attr->pwwn; ioc 2923 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_get_mac(struct bfa_ioc *ioc, u8 *mac) ioc 2925 drivers/net/ethernet/brocade/bna/bfa_ioc.c ether_addr_copy(mac, ioc->attr->mac); ioc 2930 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_recover(struct bfa_ioc *ioc) ioc 2933 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_stats(ioc, ioc_hbfails); ioc 2934 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_stats_hb_count(ioc, ioc->hb_count); ioc 2935 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_send_event(ioc, IOC_E_HBFAIL); ioc 2941 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_iocpf_enable(struct bfa_ioc *ioc) ioc 2943 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_ENABLE); ioc 2947 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_iocpf_disable(struct bfa_ioc *ioc) ioc 2949 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_DISABLE); ioc 2953 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_iocpf_fail(struct bfa_ioc *ioc) ioc 2955 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_FAIL); ioc 2959 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_iocpf_initfail(struct bfa_ioc *ioc) ioc 2961 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_INITFAIL); ioc 2965 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_iocpf_getattrfail(struct bfa_ioc *ioc) ioc 2967 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_GETATTRFAIL); ioc 2971 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_iocpf_stop(struct bfa_ioc *ioc) ioc 2973 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_STOP); ioc 2977 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_iocpf_timeout(struct bfa_ioc *ioc) ioc 2981 drivers/net/ethernet/brocade/bna/bfa_ioc.c iocpf_st = bfa_sm_to_state(iocpf_sm_table, ioc->iocpf.fsm); ioc 2984 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_poll_fwinit(ioc); ioc 2986 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_TIMEOUT); ioc 2990 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_iocpf_sem_timeout(struct bfa_ioc *ioc) ioc 2992 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_hw_sem_get(ioc); ioc 2996 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_poll_fwinit(struct bfa_ioc *ioc) ioc 2998 drivers/net/ethernet/brocade/bna/bfa_ioc.c u32 fwstate = bfa_ioc_get_cur_ioc_fwstate(ioc); ioc 3001 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_FWREADY); ioc 3005 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (ioc->iocpf.poll_time >= BFA_IOC_TOV) { ioc 3006 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_TIMEOUT); ioc 3008 drivers/net/ethernet/brocade/bna/bfa_ioc.c ioc->iocpf.poll_time += BFA_IOC_POLL_TOV; ioc 3009 drivers/net/ethernet/brocade/bna/bfa_ioc.c mod_timer(&ioc->iocpf_timer, jiffies + ioc 3075 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_portid(flash->ioc)); ioc 3078 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_mbox_queue(flash->ioc, &flash->mb, NULL, NULL); ioc 3104 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_portid(flash->ioc)); ioc 3106 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_mbox_queue(flash->ioc, &flash->mb, NULL, NULL); ioc 3214 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_flash_attach(struct bfa_flash *flash, struct bfa_ioc *ioc, void *dev) ioc 3216 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->ioc = ioc; ioc 3221 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_mbox_regisr(flash->ioc, BFI_MC_FLASH, bfa_flash_intr, flash); ioc 3223 drivers/net/ethernet/brocade/bna/bfa_ioc.c list_add_tail(&flash->ioc_notify.qe, &flash->ioc->notify_q); ioc 3260 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (!bfa_nw_ioc_is_operational(flash->ioc)) ioc 3272 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_portid(flash->ioc)); ioc 3274 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_mbox_queue(flash->ioc, &flash->mb, NULL, NULL); ioc 3298 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (!bfa_nw_ioc_is_operational(flash->ioc)) ioc 3347 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (!bfa_nw_ioc_is_operational(flash->ioc)) ioc 152 drivers/net/ethernet/brocade/bna/bfa_ioc.h struct bfa_ioc *ioc; ioc 197 drivers/net/ethernet/brocade/bna/bfa_ioc.h bool (*ioc_firmware_lock) (struct bfa_ioc *ioc); ioc 198 drivers/net/ethernet/brocade/bna/bfa_ioc.h void (*ioc_firmware_unlock) (struct bfa_ioc *ioc); ioc 199 drivers/net/ethernet/brocade/bna/bfa_ioc.h void (*ioc_reg_init) (struct bfa_ioc *ioc); ioc 200 drivers/net/ethernet/brocade/bna/bfa_ioc.h void (*ioc_map_port) (struct bfa_ioc *ioc); ioc 201 drivers/net/ethernet/brocade/bna/bfa_ioc.h void (*ioc_isr_mode_set) (struct bfa_ioc *ioc, ioc 203 drivers/net/ethernet/brocade/bna/bfa_ioc.h void (*ioc_notify_fail) (struct bfa_ioc *ioc); ioc 204 drivers/net/ethernet/brocade/bna/bfa_ioc.h void (*ioc_ownership_reset) (struct bfa_ioc *ioc); ioc 205 drivers/net/ethernet/brocade/bna/bfa_ioc.h bool (*ioc_sync_start) (struct bfa_ioc *ioc); ioc 206 drivers/net/ethernet/brocade/bna/bfa_ioc.h void (*ioc_sync_join) (struct bfa_ioc *ioc); ioc 207 drivers/net/ethernet/brocade/bna/bfa_ioc.h void (*ioc_sync_leave) (struct bfa_ioc *ioc); ioc 208 drivers/net/ethernet/brocade/bna/bfa_ioc.h void (*ioc_sync_ack) (struct bfa_ioc *ioc); ioc 209 drivers/net/ethernet/brocade/bna/bfa_ioc.h bool (*ioc_sync_complete) (struct bfa_ioc *ioc); ioc 210 drivers/net/ethernet/brocade/bna/bfa_ioc.h bool (*ioc_lpu_read_stat) (struct bfa_ioc *ioc); ioc 211 drivers/net/ethernet/brocade/bna/bfa_ioc.h void (*ioc_set_fwstate) (struct bfa_ioc *ioc, ioc 213 drivers/net/ethernet/brocade/bna/bfa_ioc.h enum bfi_ioc_state (*ioc_get_fwstate) (struct bfa_ioc *ioc); ioc 214 drivers/net/ethernet/brocade/bna/bfa_ioc.h void (*ioc_set_alt_fwstate) (struct bfa_ioc *ioc, ioc 216 drivers/net/ethernet/brocade/bna/bfa_ioc.h enum bfi_ioc_state (*ioc_get_alt_fwstate) (struct bfa_ioc *ioc); ioc 244 drivers/net/ethernet/brocade/bna/bfa_ioc.h bool bfa_nw_ioc_mbox_queue(struct bfa_ioc *ioc, ioc 247 drivers/net/ethernet/brocade/bna/bfa_ioc.h void bfa_nw_ioc_mbox_isr(struct bfa_ioc *ioc); ioc 248 drivers/net/ethernet/brocade/bna/bfa_ioc.h void bfa_nw_ioc_mbox_regisr(struct bfa_ioc *ioc, enum bfi_mclass mc, ioc 262 drivers/net/ethernet/brocade/bna/bfa_ioc.h void bfa_nw_ioc_set_ct_hwif(struct bfa_ioc *ioc); ioc 263 drivers/net/ethernet/brocade/bna/bfa_ioc.h void bfa_nw_ioc_set_ct2_hwif(struct bfa_ioc *ioc); ioc 264 drivers/net/ethernet/brocade/bna/bfa_ioc.h void bfa_nw_ioc_ct2_poweron(struct bfa_ioc *ioc); ioc 266 drivers/net/ethernet/brocade/bna/bfa_ioc.h void bfa_nw_ioc_attach(struct bfa_ioc *ioc, void *bfa, ioc 269 drivers/net/ethernet/brocade/bna/bfa_ioc.h void bfa_nw_ioc_detach(struct bfa_ioc *ioc); ioc 270 drivers/net/ethernet/brocade/bna/bfa_ioc.h void bfa_nw_ioc_pci_init(struct bfa_ioc *ioc, struct bfa_pcidev *pcidev, ioc 273 drivers/net/ethernet/brocade/bna/bfa_ioc.h void bfa_nw_ioc_mem_claim(struct bfa_ioc *ioc, u8 *dm_kva, u64 dm_pa); ioc 274 drivers/net/ethernet/brocade/bna/bfa_ioc.h void bfa_nw_ioc_enable(struct bfa_ioc *ioc); ioc 275 drivers/net/ethernet/brocade/bna/bfa_ioc.h void bfa_nw_ioc_disable(struct bfa_ioc *ioc); ioc 277 drivers/net/ethernet/brocade/bna/bfa_ioc.h void bfa_nw_ioc_error_isr(struct bfa_ioc *ioc); ioc 278 drivers/net/ethernet/brocade/bna/bfa_ioc.h bool bfa_nw_ioc_is_disabled(struct bfa_ioc *ioc); ioc 279 drivers/net/ethernet/brocade/bna/bfa_ioc.h bool bfa_nw_ioc_is_operational(struct bfa_ioc *ioc); ioc 280 drivers/net/ethernet/brocade/bna/bfa_ioc.h void bfa_nw_ioc_get_attr(struct bfa_ioc *ioc, struct bfa_ioc_attr *ioc_attr); ioc 281 drivers/net/ethernet/brocade/bna/bfa_ioc.h enum bfa_status bfa_nw_ioc_fwsig_invalidate(struct bfa_ioc *ioc); ioc 282 drivers/net/ethernet/brocade/bna/bfa_ioc.h void bfa_nw_ioc_notify_register(struct bfa_ioc *ioc, ioc 286 drivers/net/ethernet/brocade/bna/bfa_ioc.h void bfa_nw_ioc_hw_sem_release(struct bfa_ioc *ioc); ioc 287 drivers/net/ethernet/brocade/bna/bfa_ioc.h void bfa_nw_ioc_fwver_get(struct bfa_ioc *ioc, ioc 289 drivers/net/ethernet/brocade/bna/bfa_ioc.h bool bfa_nw_ioc_fwver_cmp(struct bfa_ioc *ioc, ioc 291 drivers/net/ethernet/brocade/bna/bfa_ioc.h void bfa_nw_ioc_get_mac(struct bfa_ioc *ioc, u8 *mac); ioc 292 drivers/net/ethernet/brocade/bna/bfa_ioc.h void bfa_nw_ioc_debug_memclaim(struct bfa_ioc *ioc, void *dbg_fwsave); ioc 293 drivers/net/ethernet/brocade/bna/bfa_ioc.h int bfa_nw_ioc_debug_fwtrc(struct bfa_ioc *ioc, void *trcdata, int *trclen); ioc 294 drivers/net/ethernet/brocade/bna/bfa_ioc.h int bfa_nw_ioc_debug_fwsave(struct bfa_ioc *ioc, void *trcdata, int *trclen); ioc 299 drivers/net/ethernet/brocade/bna/bfa_ioc.h void bfa_nw_ioc_timeout(struct bfa_ioc *ioc); ioc 300 drivers/net/ethernet/brocade/bna/bfa_ioc.h void bfa_nw_ioc_hb_check(struct bfa_ioc *ioc); ioc 301 drivers/net/ethernet/brocade/bna/bfa_ioc.h void bfa_nw_iocpf_timeout(struct bfa_ioc *ioc); ioc 302 drivers/net/ethernet/brocade/bna/bfa_ioc.h void bfa_nw_iocpf_sem_timeout(struct bfa_ioc *ioc); ioc 316 drivers/net/ethernet/brocade/bna/bfa_ioc.h struct bfa_ioc *ioc; /* back pointer to ioc */ ioc 345 drivers/net/ethernet/brocade/bna/bfa_ioc.h struct bfa_ioc *ioc, void *dev); ioc 29 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c static bool bfa_ioc_ct_firmware_lock(struct bfa_ioc *ioc); ioc 30 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c static void bfa_ioc_ct_firmware_unlock(struct bfa_ioc *ioc); ioc 31 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c static void bfa_ioc_ct_reg_init(struct bfa_ioc *ioc); ioc 32 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c static void bfa_ioc_ct2_reg_init(struct bfa_ioc *ioc); ioc 33 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c static void bfa_ioc_ct_map_port(struct bfa_ioc *ioc); ioc 34 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c static void bfa_ioc_ct2_map_port(struct bfa_ioc *ioc); ioc 35 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c static void bfa_ioc_ct_isr_mode_set(struct bfa_ioc *ioc, bool msix); ioc 36 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c static void bfa_ioc_ct_notify_fail(struct bfa_ioc *ioc); ioc 37 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c static void bfa_ioc_ct_ownership_reset(struct bfa_ioc *ioc); ioc 38 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c static bool bfa_ioc_ct_sync_start(struct bfa_ioc *ioc); ioc 39 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c static void bfa_ioc_ct_sync_join(struct bfa_ioc *ioc); ioc 40 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c static void bfa_ioc_ct_sync_leave(struct bfa_ioc *ioc); ioc 41 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c static void bfa_ioc_ct_sync_ack(struct bfa_ioc *ioc); ioc 42 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c static bool bfa_ioc_ct_sync_complete(struct bfa_ioc *ioc); ioc 44 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c struct bfa_ioc *ioc, enum bfi_ioc_state fwstate); ioc 45 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c static enum bfi_ioc_state bfa_ioc_ct_get_cur_ioc_fwstate(struct bfa_ioc *ioc); ioc 47 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c struct bfa_ioc *ioc, enum bfi_ioc_state fwstate); ioc 48 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c static enum bfi_ioc_state bfa_ioc_ct_get_alt_ioc_fwstate(struct bfa_ioc *ioc); ioc 53 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c static bool bfa_ioc_ct2_lpu_read_stat(struct bfa_ioc *ioc); ioc 98 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_nw_ioc_set_ct_hwif(struct bfa_ioc *ioc) ioc 100 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_hwif = &nw_hwif_ct; ioc 104 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_nw_ioc_set_ct2_hwif(struct bfa_ioc *ioc) ioc 106 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_hwif = &nw_hwif_ct2; ioc 111 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_ioc_ct_firmware_lock(struct bfa_ioc *ioc) ioc 120 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c if (bfa_cb_image_get_size(bfa_ioc_asic_gen(ioc)) < ioc 124 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_nw_ioc_sem_get(ioc->ioc_regs.ioc_usage_sem_reg); ioc 125 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c usecnt = readl(ioc->ioc_regs.ioc_usage_reg); ioc 131 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c writel(1, ioc->ioc_regs.ioc_usage_reg); ioc 132 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_nw_ioc_sem_release(ioc->ioc_regs.ioc_usage_sem_reg); ioc 133 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c writel(0, ioc->ioc_regs.ioc_fail_sync); ioc 137 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc_fwstate = readl(ioc->ioc_regs.ioc_fwstate); ioc 147 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_nw_ioc_fwver_get(ioc, &fwhdr); ioc 148 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c if (!bfa_nw_ioc_fwver_cmp(ioc, &fwhdr)) { ioc 149 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_nw_ioc_sem_release(ioc->ioc_regs.ioc_usage_sem_reg); ioc 157 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c writel(usecnt, ioc->ioc_regs.ioc_usage_reg); ioc 158 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_nw_ioc_sem_release(ioc->ioc_regs.ioc_usage_sem_reg); ioc 163 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_ioc_ct_firmware_unlock(struct bfa_ioc *ioc) ioc 170 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c if (bfa_cb_image_get_size(bfa_ioc_asic_gen(ioc)) < ioc 177 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_nw_ioc_sem_get(ioc->ioc_regs.ioc_usage_sem_reg); ioc 178 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c usecnt = readl(ioc->ioc_regs.ioc_usage_reg); ioc 182 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c writel(usecnt, ioc->ioc_regs.ioc_usage_reg); ioc 184 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_nw_ioc_sem_release(ioc->ioc_regs.ioc_usage_sem_reg); ioc 189 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_ioc_ct_notify_fail(struct bfa_ioc *ioc) ioc 191 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c writel(__FW_INIT_HALT_P, ioc->ioc_regs.ll_halt); ioc 192 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c writel(__FW_INIT_HALT_P, ioc->ioc_regs.alt_ll_halt); ioc 194 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c readl(ioc->ioc_regs.ll_halt); ioc 195 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c readl(ioc->ioc_regs.alt_ll_halt); ioc 249 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_ioc_ct_reg_init(struct bfa_ioc *ioc) ioc 252 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c int pcifn = bfa_ioc_pcifn(ioc); ioc 254 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c rb = bfa_ioc_bar0(ioc); ioc 256 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.hfn_mbox = rb + ct_fnreg[pcifn].hfn_mbox; ioc 257 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.lpu_mbox = rb + ct_fnreg[pcifn].lpu_mbox; ioc 258 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.host_page_num_fn = rb + ct_fnreg[pcifn].hfn_pgn; ioc 260 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c if (ioc->port_id == 0) { ioc 261 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.heartbeat = rb + BFA_IOC0_HBEAT_REG; ioc 262 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.ioc_fwstate = rb + BFA_IOC0_STATE_REG; ioc 263 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.alt_ioc_fwstate = rb + BFA_IOC1_STATE_REG; ioc 264 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.hfn_mbox_cmd = rb + ct_p0reg[pcifn].hfn; ioc 265 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.lpu_mbox_cmd = rb + ct_p0reg[pcifn].lpu; ioc 266 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.ll_halt = rb + FW_INIT_HALT_P0; ioc 267 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.alt_ll_halt = rb + FW_INIT_HALT_P1; ioc 269 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.heartbeat = rb + BFA_IOC1_HBEAT_REG; ioc 270 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.ioc_fwstate = rb + BFA_IOC1_STATE_REG; ioc 271 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.alt_ioc_fwstate = rb + BFA_IOC0_STATE_REG; ioc 272 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.hfn_mbox_cmd = rb + ct_p1reg[pcifn].hfn; ioc 273 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.lpu_mbox_cmd = rb + ct_p1reg[pcifn].lpu; ioc 274 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.ll_halt = rb + FW_INIT_HALT_P1; ioc 275 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.alt_ll_halt = rb + FW_INIT_HALT_P0; ioc 281 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.pss_ctl_reg = rb + PSS_CTL_REG; ioc 282 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.pss_err_status_reg = rb + PSS_ERR_STATUS_REG; ioc 283 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.app_pll_fast_ctl_reg = rb + APP_PLL_LCLK_CTL_REG; ioc 284 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.app_pll_slow_ctl_reg = rb + APP_PLL_SCLK_CTL_REG; ioc 289 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.ioc_sem_reg = rb + HOST_SEM0_REG; ioc 290 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.ioc_usage_sem_reg = rb + HOST_SEM1_REG; ioc 291 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.ioc_init_sem_reg = rb + HOST_SEM2_REG; ioc 292 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.ioc_usage_reg = rb + BFA_FW_USE_COUNT; ioc 293 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.ioc_fail_sync = rb + BFA_IOC_FAIL_SYNC; ioc 298 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.smem_page_start = rb + PSS_SMEM_PAGE_START; ioc 299 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.smem_pg0 = BFI_IOC_SMEM_PG0_CT; ioc 304 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.err_set = (rb + ERR_SET_REG); ioc 308 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_ioc_ct2_reg_init(struct bfa_ioc *ioc) ioc 311 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c int port = bfa_ioc_portid(ioc); ioc 313 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c rb = bfa_ioc_bar0(ioc); ioc 315 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.hfn_mbox = rb + ct2_reg[port].hfn_mbox; ioc 316 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.lpu_mbox = rb + ct2_reg[port].lpu_mbox; ioc 317 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.host_page_num_fn = rb + ct2_reg[port].hfn_pgn; ioc 318 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.hfn_mbox_cmd = rb + ct2_reg[port].hfn; ioc 319 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.lpu_mbox_cmd = rb + ct2_reg[port].lpu; ioc 320 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.lpu_read_stat = rb + ct2_reg[port].lpu_read; ioc 323 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.heartbeat = rb + CT2_BFA_IOC0_HBEAT_REG; ioc 324 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.ioc_fwstate = rb + CT2_BFA_IOC0_STATE_REG; ioc 325 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.alt_ioc_fwstate = rb + CT2_BFA_IOC1_STATE_REG; ioc 326 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.ll_halt = rb + FW_INIT_HALT_P0; ioc 327 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.alt_ll_halt = rb + FW_INIT_HALT_P1; ioc 329 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.heartbeat = rb + CT2_BFA_IOC1_HBEAT_REG; ioc 330 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.ioc_fwstate = rb + CT2_BFA_IOC1_STATE_REG; ioc 331 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.alt_ioc_fwstate = rb + CT2_BFA_IOC0_STATE_REG; ioc 332 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.ll_halt = rb + FW_INIT_HALT_P1; ioc 333 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.alt_ll_halt = rb + FW_INIT_HALT_P0; ioc 339 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.pss_ctl_reg = rb + PSS_CTL_REG; ioc 340 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.pss_err_status_reg = rb + PSS_ERR_STATUS_REG; ioc 341 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.app_pll_fast_ctl_reg = rb + CT2_APP_PLL_LCLK_CTL_REG; ioc 342 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.app_pll_slow_ctl_reg = rb + CT2_APP_PLL_SCLK_CTL_REG; ioc 347 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.ioc_sem_reg = rb + CT2_HOST_SEM0_REG; ioc 348 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.ioc_usage_sem_reg = rb + CT2_HOST_SEM1_REG; ioc 349 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.ioc_init_sem_reg = rb + CT2_HOST_SEM2_REG; ioc 350 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.ioc_usage_reg = rb + CT2_BFA_FW_USE_COUNT; ioc 351 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.ioc_fail_sync = rb + CT2_BFA_IOC_FAIL_SYNC; ioc 356 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.smem_page_start = rb + PSS_SMEM_PAGE_START; ioc 357 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.smem_pg0 = BFI_IOC_SMEM_PG0_CT; ioc 362 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.err_set = rb + ERR_SET_REG; ioc 369 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_ioc_ct_map_port(struct bfa_ioc *ioc) ioc 371 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c void __iomem *rb = ioc->pcidev.pci_bar_kva; ioc 378 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c r32 >>= FNC_PERS_FN_SHIFT(bfa_ioc_pcifn(ioc)); ioc 379 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->port_id = (r32 & __F0_PORT_MAP_MK) >> __F0_PORT_MAP_SH; ioc 384 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_ioc_ct2_map_port(struct bfa_ioc *ioc) ioc 386 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c void __iomem *rb = ioc->pcidev.pci_bar_kva; ioc 390 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->port_id = ((r32 & __FC_LL_PORT_MAP__MK) >> __FC_LL_PORT_MAP__SH); ioc 395 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_ioc_ct_isr_mode_set(struct bfa_ioc *ioc, bool msix) ioc 397 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c void __iomem *rb = ioc->pcidev.pci_bar_kva; ioc 402 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c mode = (r32 >> FNC_PERS_FN_SHIFT(bfa_ioc_pcifn(ioc))) & ioc 416 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c r32 &= ~(__F0_INTX_STATUS << FNC_PERS_FN_SHIFT(bfa_ioc_pcifn(ioc))); ioc 417 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c r32 |= (mode << FNC_PERS_FN_SHIFT(bfa_ioc_pcifn(ioc))); ioc 423 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_ioc_ct2_lpu_read_stat(struct bfa_ioc *ioc) ioc 427 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c r32 = readl(ioc->ioc_regs.lpu_read_stat); ioc 429 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c writel(1, ioc->ioc_regs.lpu_read_stat); ioc 445 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_nw_ioc_ct2_poweron(struct bfa_ioc *ioc) ioc 447 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c void __iomem *rb = ioc->pcidev.pci_bar_kva; ioc 458 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c HOSTFN_MSIX_DEFAULT * bfa_ioc_pcifn(ioc), ioc 460 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c writel(HOSTFN_MSIX_DEFAULT * bfa_ioc_pcifn(ioc), ioc 466 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_ioc_ct_ownership_reset(struct bfa_ioc *ioc) ioc 468 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_nw_ioc_sem_get(ioc->ioc_regs.ioc_usage_sem_reg); ioc 469 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c writel(0, ioc->ioc_regs.ioc_usage_reg); ioc 470 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_nw_ioc_sem_release(ioc->ioc_regs.ioc_usage_sem_reg); ioc 477 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c readl(ioc->ioc_regs.ioc_sem_reg); ioc 478 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_nw_ioc_hw_sem_release(ioc); ioc 483 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_ioc_ct_sync_start(struct bfa_ioc *ioc) ioc 485 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c u32 r32 = readl(ioc->ioc_regs.ioc_fail_sync); ioc 495 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c if (sync_reqd & bfa_ioc_ct_sync_pos(ioc)) { ioc 496 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c writel(0, ioc->ioc_regs.ioc_fail_sync); ioc 497 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c writel(1, ioc->ioc_regs.ioc_usage_reg); ioc 498 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c writel(BFI_IOC_UNINIT, ioc->ioc_regs.ioc_fwstate); ioc 499 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c writel(BFI_IOC_UNINIT, ioc->ioc_regs.alt_ioc_fwstate); ioc 503 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c return bfa_ioc_ct_sync_complete(ioc); ioc 507 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_ioc_ct_sync_join(struct bfa_ioc *ioc) ioc 509 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c u32 r32 = readl(ioc->ioc_regs.ioc_fail_sync); ioc 510 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c u32 sync_pos = bfa_ioc_ct_sync_reqd_pos(ioc); ioc 512 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c writel((r32 | sync_pos), ioc->ioc_regs.ioc_fail_sync); ioc 516 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_ioc_ct_sync_leave(struct bfa_ioc *ioc) ioc 518 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c u32 r32 = readl(ioc->ioc_regs.ioc_fail_sync); ioc 519 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c u32 sync_msk = bfa_ioc_ct_sync_reqd_pos(ioc) | ioc 520 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_ioc_ct_sync_pos(ioc); ioc 522 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c writel((r32 & ~sync_msk), ioc->ioc_regs.ioc_fail_sync); ioc 526 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_ioc_ct_sync_ack(struct bfa_ioc *ioc) ioc 528 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c u32 r32 = readl(ioc->ioc_regs.ioc_fail_sync); ioc 530 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c writel(r32 | bfa_ioc_ct_sync_pos(ioc), ioc->ioc_regs.ioc_fail_sync); ioc 534 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_ioc_ct_sync_complete(struct bfa_ioc *ioc) ioc 536 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c u32 r32 = readl(ioc->ioc_regs.ioc_fail_sync); ioc 551 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c if ((sync_reqd & bfa_ioc_ct_sync_pos(ioc)) && ioc 552 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c !(sync_ackd & bfa_ioc_ct_sync_pos(ioc))) ioc 553 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c sync_ackd |= bfa_ioc_ct_sync_pos(ioc); ioc 557 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c ioc->ioc_regs.ioc_fail_sync); ioc 558 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c writel(BFI_IOC_FAIL, ioc->ioc_regs.ioc_fwstate); ioc 559 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c writel(BFI_IOC_FAIL, ioc->ioc_regs.alt_ioc_fwstate); ioc 569 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c writel((r32 | sync_ackd), ioc->ioc_regs.ioc_fail_sync); ioc 575 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_ioc_ct_set_cur_ioc_fwstate(struct bfa_ioc *ioc, ioc 578 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c writel(fwstate, ioc->ioc_regs.ioc_fwstate); ioc 582 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_ioc_ct_get_cur_ioc_fwstate(struct bfa_ioc *ioc) ioc 584 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c return (enum bfi_ioc_state)readl(ioc->ioc_regs.ioc_fwstate); ioc 588 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_ioc_ct_set_alt_ioc_fwstate(struct bfa_ioc *ioc, ioc 591 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c writel(fwstate, ioc->ioc_regs.alt_ioc_fwstate); ioc 595 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c bfa_ioc_ct_get_alt_ioc_fwstate(struct bfa_ioc *ioc) ioc 597 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c return (enum bfi_ioc_state)readl(ioc->ioc_regs.alt_ioc_fwstate); ioc 195 drivers/net/ethernet/brocade/bna/bfa_msgq.c if (!bfa_nw_ioc_mbox_queue(cmdq->msgq->ioc, &cmdq->dbell_mb, ioc 296 drivers/net/ethernet/brocade/bna/bfa_msgq.c if (!bfa_nw_ioc_mbox_queue(cmdq->msgq->ioc, &cmdq->copy_mb, ioc 405 drivers/net/ethernet/brocade/bna/bfa_msgq.c if (!bfa_nw_ioc_is_disabled(rspq->msgq->ioc)) ioc 453 drivers/net/ethernet/brocade/bna/bfa_msgq.c if (!bfa_nw_ioc_mbox_queue(rspq->msgq->ioc, &rspq->dbell_mb, ioc 522 drivers/net/ethernet/brocade/bna/bfa_msgq.c bfa_nw_ioc_mbox_queue(msgq->ioc, &msgq->init_mb, NULL, NULL); ioc 603 drivers/net/ethernet/brocade/bna/bfa_msgq.c bfa_msgq_attach(struct bfa_msgq *msgq, struct bfa_ioc *ioc) ioc 605 drivers/net/ethernet/brocade/bna/bfa_msgq.c msgq->ioc = ioc; ioc 610 drivers/net/ethernet/brocade/bna/bfa_msgq.c bfa_nw_ioc_mbox_regisr(msgq->ioc, BFI_MC_MSGQ, bfa_msgq_isr, msgq); ioc 612 drivers/net/ethernet/brocade/bna/bfa_msgq.c bfa_nw_ioc_notify_register(msgq->ioc, &msgq->ioc_notify); ioc 111 drivers/net/ethernet/brocade/bna/bfa_msgq.h struct bfa_ioc *ioc; ioc 116 drivers/net/ethernet/brocade/bna/bfa_msgq.h void bfa_msgq_attach(struct bfa_msgq *msgq, struct bfa_ioc *ioc); ioc 258 drivers/net/ethernet/brocade/bna/bna_enet.c bfa_nw_ioc_error_isr(&bna->ioceth.ioc); ioc 269 drivers/net/ethernet/brocade/bna/bna_enet.c bfa_nw_ioc_mbox_isr(&bna->ioceth.ioc); ioc 1309 drivers/net/ethernet/brocade/bna/bna_enet.c bfa_nw_ioc_get_mac(&enet->bna->ioceth.ioc, mac); ioc 1394 drivers/net/ethernet/brocade/bna/bna_enet.c bfa_nw_ioc_enable(&ioceth->ioc); ioc 1431 drivers/net/ethernet/brocade/bna/bna_enet.c bfa_nw_ioc_disable(&ioceth->ioc); ioc 1522 drivers/net/ethernet/brocade/bna/bna_enet.c bfa_nw_ioc_disable(&ioceth->ioc); ioc 1527 drivers/net/ethernet/brocade/bna/bna_enet.c bfa_nw_ioc_disable(&ioceth->ioc); ioc 1552 drivers/net/ethernet/brocade/bna/bna_enet.c bfa_nw_ioc_disable(&ioceth->ioc); ioc 1557 drivers/net/ethernet/brocade/bna/bna_enet.c bfa_nw_ioc_disable(&ioceth->ioc); ioc 1603 drivers/net/ethernet/brocade/bna/bna_enet.c bfa_nw_ioc_disable(&ioceth->ioc); ioc 1701 drivers/net/ethernet/brocade/bna/bna_enet.c bfa_nw_ioc_attach(&ioceth->ioc, ioceth, &bna_ioceth_cbfn); ioc 1702 drivers/net/ethernet/brocade/bna/bna_enet.c bfa_nw_ioc_pci_init(&ioceth->ioc, &bna->pcidev, BFI_PCIFN_CLASS_ETH); ioc 1707 drivers/net/ethernet/brocade/bna/bna_enet.c bfa_nw_ioc_mem_claim(&ioceth->ioc, kva, dma); ioc 1710 drivers/net/ethernet/brocade/bna/bna_enet.c bfa_nw_ioc_debug_memclaim(&ioceth->ioc, kva); ioc 1719 drivers/net/ethernet/brocade/bna/bna_enet.c bfa_nw_cee_attach(&bna->cee, &ioceth->ioc, bna); ioc 1724 drivers/net/ethernet/brocade/bna/bna_enet.c bfa_nw_flash_attach(&bna->flash, &ioceth->ioc, bna); ioc 1729 drivers/net/ethernet/brocade/bna/bna_enet.c bfa_msgq_attach(&bna->msgq, &ioceth->ioc); ioc 1746 drivers/net/ethernet/brocade/bna/bna_enet.c bfa_nw_ioc_detach(&ioceth->ioc); ioc 132 drivers/net/ethernet/brocade/bna/bna_hw_defs.h #define bna_port_id_get(_bna) ((_bna)->ioceth.ioc.port_id) ioc 157 drivers/net/ethernet/brocade/bna/bna_hw_defs.h init_halt = readl((_bna)->ioceth.ioc.ioc_regs.ll_halt); \ ioc 159 drivers/net/ethernet/brocade/bna/bna_hw_defs.h writel(init_halt, (_bna)->ioceth.ioc.ioc_regs.ll_halt); \ ioc 160 drivers/net/ethernet/brocade/bna/bna_hw_defs.h init_halt = readl((_bna)->ioceth.ioc.ioc_regs.ll_halt); \ ioc 317 drivers/net/ethernet/brocade/bna/bna_types.h struct bfa_ioc ioc; ioc 1690 drivers/net/ethernet/brocade/bna/bnad.c struct bnad *bnad = from_timer(bnad, t, bna.ioceth.ioc.ioc_timer); ioc 1694 drivers/net/ethernet/brocade/bna/bnad.c bfa_nw_ioc_timeout(&bnad->bna.ioceth.ioc); ioc 1701 drivers/net/ethernet/brocade/bna/bnad.c struct bnad *bnad = from_timer(bnad, t, bna.ioceth.ioc.hb_timer); ioc 1705 drivers/net/ethernet/brocade/bna/bnad.c bfa_nw_ioc_hb_check(&bnad->bna.ioceth.ioc); ioc 1712 drivers/net/ethernet/brocade/bna/bnad.c struct bnad *bnad = from_timer(bnad, t, bna.ioceth.ioc.iocpf_timer); ioc 1716 drivers/net/ethernet/brocade/bna/bnad.c bfa_nw_iocpf_timeout(&bnad->bna.ioceth.ioc); ioc 1723 drivers/net/ethernet/brocade/bna/bnad.c struct bnad *bnad = from_timer(bnad, t, bna.ioceth.ioc.sem_timer); ioc 1727 drivers/net/ethernet/brocade/bna/bnad.c bfa_nw_iocpf_sem_timeout(&bnad->bna.ioceth.ioc); ioc 3685 drivers/net/ethernet/brocade/bna/bnad.c timer_setup(&bnad->bna.ioceth.ioc.ioc_timer, bnad_ioc_timeout, 0); ioc 3686 drivers/net/ethernet/brocade/bna/bnad.c timer_setup(&bnad->bna.ioceth.ioc.hb_timer, bnad_ioc_hb_check, 0); ioc 3687 drivers/net/ethernet/brocade/bna/bnad.c timer_setup(&bnad->bna.ioceth.ioc.iocpf_timer, bnad_iocpf_timeout, 0); ioc 3688 drivers/net/ethernet/brocade/bna/bnad.c timer_setup(&bnad->bna.ioceth.ioc.sem_timer, bnad_iocpf_sem_timeout, ioc 3756 drivers/net/ethernet/brocade/bna/bnad.c del_timer_sync(&bnad->bna.ioceth.ioc.ioc_timer); ioc 3757 drivers/net/ethernet/brocade/bna/bnad.c del_timer_sync(&bnad->bna.ioceth.ioc.sem_timer); ioc 3758 drivers/net/ethernet/brocade/bna/bnad.c del_timer_sync(&bnad->bna.ioceth.ioc.hb_timer); ioc 3799 drivers/net/ethernet/brocade/bna/bnad.c del_timer_sync(&bnad->bna.ioceth.ioc.ioc_timer); ioc 3800 drivers/net/ethernet/brocade/bna/bnad.c del_timer_sync(&bnad->bna.ioceth.ioc.sem_timer); ioc 3801 drivers/net/ethernet/brocade/bna/bnad.c del_timer_sync(&bnad->bna.ioceth.ioc.hb_timer); ioc 62 drivers/net/ethernet/brocade/bna/bnad_debugfs.c rc = bfa_nw_ioc_debug_fwtrc(&bnad->bna.ioceth.ioc, ioc 102 drivers/net/ethernet/brocade/bna/bnad_debugfs.c rc = bfa_nw_ioc_debug_fwsave(&bnad->bna.ioceth.ioc, ioc 146 drivers/net/ethernet/brocade/bna/bnad_debugfs.c bfa_nw_ioc_get_attr(&bnad->bna.ioceth.ioc, &drvinfo->ioc_attr); ioc 255 drivers/net/ethernet/brocade/bna/bnad_debugfs.c bna_reg_offset_check(struct bfa_ioc *ioc, u32 offset, u32 len) ioc 271 drivers/net/ethernet/brocade/bna/bnad_debugfs.c if (offset + (len << 2) > BFA_REG_ADDRMSK(ioc)) ioc 306 drivers/net/ethernet/brocade/bna/bnad_debugfs.c struct bfa_ioc *ioc = &bnad->bna.ioceth.ioc; ioc 335 drivers/net/ethernet/brocade/bna/bnad_debugfs.c rb = bfa_ioc_bar0(ioc); ioc 336 drivers/net/ethernet/brocade/bna/bnad_debugfs.c addr &= BFA_REG_ADDRMSK(ioc); ioc 339 drivers/net/ethernet/brocade/bna/bnad_debugfs.c rc = bna_reg_offset_check(ioc, addr, len); ioc 367 drivers/net/ethernet/brocade/bna/bnad_debugfs.c struct bfa_ioc *ioc = &bnad->bna.ioceth.ioc; ioc 387 drivers/net/ethernet/brocade/bna/bnad_debugfs.c addr &= BFA_REG_ADDRMSK(ioc); /* offset only 17 bit and word align */ ioc 390 drivers/net/ethernet/brocade/bna/bnad_debugfs.c rc = bna_reg_offset_check(ioc, addr, 1); ioc 396 drivers/net/ethernet/brocade/bna/bnad_debugfs.c reg_addr = (bfa_ioc_bar0(ioc)) + addr; ioc 292 drivers/net/ethernet/brocade/bna/bnad_ethtool.c bfa_nw_ioc_get_attr(&bnad->bna.ioceth.ioc, ioc_attr); ioc 5365 drivers/net/ethernet/dec/tulip/de4x5.c struct de4x5_ioctl *ioc = (struct de4x5_ioctl *) &rq->ifr_ifru; ioc 5376 drivers/net/ethernet/dec/tulip/de4x5.c switch(ioc->cmd) { ioc 5378 drivers/net/ethernet/dec/tulip/de4x5.c ioc->len = ETH_ALEN; ioc 5382 drivers/net/ethernet/dec/tulip/de4x5.c if (copy_to_user(ioc->data, tmp.addr, ioc->len)) return -EFAULT; ioc 5387 drivers/net/ethernet/dec/tulip/de4x5.c if (copy_from_user(tmp.addr, ioc->data, ETH_ALEN)) return -EFAULT; ioc 5418 drivers/net/ethernet/dec/tulip/de4x5.c ioc->len = sizeof(statbuf); ioc 5420 drivers/net/ethernet/dec/tulip/de4x5.c memcpy(&statbuf, &lp->pktStats, ioc->len); ioc 5422 drivers/net/ethernet/dec/tulip/de4x5.c if (copy_to_user(ioc->data, &statbuf, ioc->len)) ioc 5435 drivers/net/ethernet/dec/tulip/de4x5.c if (copy_to_user(ioc->data, tmp.addr, 1)) return -EFAULT; ioc 5440 drivers/net/ethernet/dec/tulip/de4x5.c if (copy_from_user(tmp.addr, ioc->data, 1)) return -EFAULT; ioc 5454 drivers/net/ethernet/dec/tulip/de4x5.c ioc->len = j; ioc 5455 drivers/net/ethernet/dec/tulip/de4x5.c if (copy_to_user(ioc->data, tmp.lval, ioc->len)) ioc 961 drivers/net/fddi/skfp/skfddi.c struct s_skfp_ioctl ioc; ioc 964 drivers/net/fddi/skfp/skfddi.c if (copy_from_user(&ioc, rq->ifr_data, sizeof(struct s_skfp_ioctl))) ioc 967 drivers/net/fddi/skfp/skfddi.c switch (ioc.cmd) { ioc 969 drivers/net/fddi/skfp/skfddi.c ioc.len = sizeof(lp->MacStat); ioc 970 drivers/net/fddi/skfp/skfddi.c status = copy_to_user(ioc.data, skfp_ctl_get_stats(dev), ioc.len) ioc 981 drivers/net/fddi/skfp/skfddi.c printk("ioctl for %s: unknown cmd: %04x\n", dev->name, ioc.cmd); ioc 252 drivers/parisc/ccio-dma.c struct ioc *next; /* Linked list of discovered iocs */ ioc 259 drivers/parisc/ccio-dma.c static struct ioc *ioc_list; ioc 294 drivers/parisc/ccio-dma.c #define CCIO_SEARCH_LOOP(ioc, res_idx, mask, size) \ ioc 298 drivers/parisc/ccio-dma.c idx = (unsigned int)((unsigned long)res_ptr - (unsigned long)ioc->res_map); \ ioc 303 drivers/parisc/ccio-dma.c ioc->res_hint = res_idx + (size >> 3); \ ioc 309 drivers/parisc/ccio-dma.c u##size *res_ptr = (u##size *)&((ioc)->res_map[ioa->res_hint & ~((size >> 3) - 1)]); \ ioc 310 drivers/parisc/ccio-dma.c u##size *res_end = (u##size *)&(ioc)->res_map[ioa->res_size]; \ ioc 311 drivers/parisc/ccio-dma.c CCIO_SEARCH_LOOP(ioc, res_idx, mask, size); \ ioc 312 drivers/parisc/ccio-dma.c res_ptr = (u##size *)&(ioc)->res_map[0]; \ ioc 339 drivers/parisc/ccio-dma.c ccio_alloc_range(struct ioc *ioc, struct device *dev, size_t size) ioc 374 drivers/parisc/ccio-dma.c CCIO_FIND_FREE_MAPPING(ioc, res_idx, mask, 8); ioc 376 drivers/parisc/ccio-dma.c CCIO_FIND_FREE_MAPPING(ioc, res_idx, 0xff, 8); ioc 379 drivers/parisc/ccio-dma.c CCIO_FIND_FREE_MAPPING(ioc, res_idx, 0xffff, 16); ioc 381 drivers/parisc/ccio-dma.c CCIO_FIND_FREE_MAPPING(ioc, res_idx, ~(unsigned int)0, 32); ioc 384 drivers/parisc/ccio-dma.c CCIO_FIND_FREE_MAPPING(ioc, res_idx, ~0UL, 64); ioc 397 drivers/parisc/ccio-dma.c __func__, res_idx, ioc->res_hint); ioc 406 drivers/parisc/ccio-dma.c ioc->avg_search[ioc->avg_idx++] = cr_start; ioc 407 drivers/parisc/ccio-dma.c ioc->avg_idx &= CCIO_SEARCH_SAMPLE - 1; ioc 408 drivers/parisc/ccio-dma.c ioc->used_pages += pages_needed; ioc 416 drivers/parisc/ccio-dma.c #define CCIO_FREE_MAPPINGS(ioc, res_idx, mask, size) \ ioc 417 drivers/parisc/ccio-dma.c u##size *res_ptr = (u##size *)&((ioc)->res_map[res_idx]); \ ioc 431 drivers/parisc/ccio-dma.c ccio_free_range(struct ioc *ioc, dma_addr_t iova, unsigned long pages_mapped) ioc 444 drivers/parisc/ccio-dma.c ioc->used_pages -= pages_mapped; ioc 451 drivers/parisc/ccio-dma.c CCIO_FREE_MAPPINGS(ioc, res_idx, mask, 8); ioc 453 drivers/parisc/ccio-dma.c CCIO_FREE_MAPPINGS(ioc, res_idx, 0xffUL, 8); ioc 456 drivers/parisc/ccio-dma.c CCIO_FREE_MAPPINGS(ioc, res_idx, 0xffffUL, 16); ioc 458 drivers/parisc/ccio-dma.c CCIO_FREE_MAPPINGS(ioc, res_idx, ~(unsigned int)0, 32); ioc 461 drivers/parisc/ccio-dma.c CCIO_FREE_MAPPINGS(ioc, res_idx, ~0UL, 64); ioc 627 drivers/parisc/ccio-dma.c ccio_clear_io_tlb(struct ioc *ioc, dma_addr_t iovp, size_t byte_cnt) ioc 629 drivers/parisc/ccio-dma.c u32 chain_size = 1 << ioc->chainid_shift; ioc 635 drivers/parisc/ccio-dma.c WRITE_U32(CMD_TLB_PURGE | iovp, &ioc->ioc_regs->io_command); ioc 660 drivers/parisc/ccio-dma.c ccio_mark_invalid(struct ioc *ioc, dma_addr_t iova, size_t byte_cnt) ioc 671 drivers/parisc/ccio-dma.c char *pdir_ptr = (char *) &(ioc->pdir_base[idx]); ioc 673 drivers/parisc/ccio-dma.c BUG_ON(idx >= (ioc->pdir_size / sizeof(u64))); ioc 687 drivers/parisc/ccio-dma.c ccio_clear_io_tlb(ioc, CCIO_IOVP(iova), saved_byte_cnt); ioc 728 drivers/parisc/ccio-dma.c struct ioc *ioc; ioc 736 drivers/parisc/ccio-dma.c ioc = GET_IOC(dev); ioc 737 drivers/parisc/ccio-dma.c if (!ioc) ioc 747 drivers/parisc/ccio-dma.c spin_lock_irqsave(&ioc->res_lock, flags); ioc 750 drivers/parisc/ccio-dma.c ioc->msingle_calls++; ioc 751 drivers/parisc/ccio-dma.c ioc->msingle_pages += size >> IOVP_SHIFT; ioc 754 drivers/parisc/ccio-dma.c idx = ccio_alloc_range(ioc, dev, size); ioc 757 drivers/parisc/ccio-dma.c pdir_start = &(ioc->pdir_base[idx]); ioc 778 drivers/parisc/ccio-dma.c spin_unlock_irqrestore(&ioc->res_lock, flags); ioc 806 drivers/parisc/ccio-dma.c struct ioc *ioc; ioc 811 drivers/parisc/ccio-dma.c ioc = GET_IOC(dev); ioc 812 drivers/parisc/ccio-dma.c if (!ioc) { ioc 813 drivers/parisc/ccio-dma.c WARN_ON(!ioc); ioc 824 drivers/parisc/ccio-dma.c spin_lock_irqsave(&ioc->res_lock, flags); ioc 827 drivers/parisc/ccio-dma.c ioc->usingle_calls++; ioc 828 drivers/parisc/ccio-dma.c ioc->usingle_pages += size >> IOVP_SHIFT; ioc 831 drivers/parisc/ccio-dma.c ccio_mark_invalid(ioc, iova, size); ioc 832 drivers/parisc/ccio-dma.c ccio_free_range(ioc, iova, (size >> IOVP_SHIFT)); ioc 833 drivers/parisc/ccio-dma.c spin_unlock_irqrestore(&ioc->res_lock, flags); ioc 911 drivers/parisc/ccio-dma.c struct ioc *ioc; ioc 919 drivers/parisc/ccio-dma.c ioc = GET_IOC(dev); ioc 920 drivers/parisc/ccio-dma.c if (!ioc) ioc 937 drivers/parisc/ccio-dma.c spin_lock_irqsave(&ioc->res_lock, flags); ioc 940 drivers/parisc/ccio-dma.c ioc->msg_calls++; ioc 951 drivers/parisc/ccio-dma.c coalesced = iommu_coalesce_chunks(ioc, dev, sglist, nents, ccio_alloc_range); ioc 961 drivers/parisc/ccio-dma.c filled = iommu_fill_pdir(ioc, sglist, nents, hint, ccio_io_pdir_entry); ioc 963 drivers/parisc/ccio-dma.c spin_unlock_irqrestore(&ioc->res_lock, flags); ioc 990 drivers/parisc/ccio-dma.c struct ioc *ioc; ioc 993 drivers/parisc/ccio-dma.c ioc = GET_IOC(dev); ioc 994 drivers/parisc/ccio-dma.c if (!ioc) { ioc 995 drivers/parisc/ccio-dma.c WARN_ON(!ioc); ioc 1003 drivers/parisc/ccio-dma.c ioc->usg_calls++; ioc 1009 drivers/parisc/ccio-dma.c ioc->usg_pages += sg_dma_len(sglist) >> PAGE_SHIFT; ioc 1033 drivers/parisc/ccio-dma.c struct ioc *ioc = ioc_list; ioc 1035 drivers/parisc/ccio-dma.c while (ioc != NULL) { ioc 1036 drivers/parisc/ccio-dma.c unsigned int total_pages = ioc->res_size << 3; ioc 1042 drivers/parisc/ccio-dma.c seq_printf(m, "%s\n", ioc->name); ioc 1045 drivers/parisc/ccio-dma.c (ioc->cujo20_bug ? "yes" : "no")); ioc 1052 drivers/parisc/ccio-dma.c total_pages - ioc->used_pages, ioc->used_pages, ioc 1053 drivers/parisc/ccio-dma.c (int)(ioc->used_pages * 100 / total_pages)); ioc 1057 drivers/parisc/ccio-dma.c ioc->res_size, total_pages); ioc 1060 drivers/parisc/ccio-dma.c min = max = ioc->avg_search[0]; ioc 1062 drivers/parisc/ccio-dma.c avg += ioc->avg_search[j]; ioc 1063 drivers/parisc/ccio-dma.c if(ioc->avg_search[j] > max) ioc 1064 drivers/parisc/ccio-dma.c max = ioc->avg_search[j]; ioc 1065 drivers/parisc/ccio-dma.c if(ioc->avg_search[j] < min) ioc 1066 drivers/parisc/ccio-dma.c min = ioc->avg_search[j]; ioc 1073 drivers/parisc/ccio-dma.c ioc->msingle_calls, ioc->msingle_pages, ioc 1074 drivers/parisc/ccio-dma.c (int)((ioc->msingle_pages * 1000)/ioc->msingle_calls)); ioc 1077 drivers/parisc/ccio-dma.c min = ioc->usingle_calls - ioc->usg_calls; ioc 1078 drivers/parisc/ccio-dma.c max = ioc->usingle_pages - ioc->usg_pages; ioc 1083 drivers/parisc/ccio-dma.c ioc->msg_calls, ioc->msg_pages, ioc 1084 drivers/parisc/ccio-dma.c (int)((ioc->msg_pages * 1000)/ioc->msg_calls)); ioc 1087 drivers/parisc/ccio-dma.c ioc->usg_calls, ioc->usg_pages, ioc 1088 drivers/parisc/ccio-dma.c (int)((ioc->usg_pages * 1000)/ioc->usg_calls)); ioc 1091 drivers/parisc/ccio-dma.c ioc = ioc->next; ioc 1099 drivers/parisc/ccio-dma.c struct ioc *ioc = ioc_list; ioc 1101 drivers/parisc/ccio-dma.c while (ioc != NULL) { ioc 1102 drivers/parisc/ccio-dma.c seq_hex_dump(m, " ", DUMP_PREFIX_NONE, 32, 4, ioc->res_map, ioc 1103 drivers/parisc/ccio-dma.c ioc->res_size, false); ioc 1105 drivers/parisc/ccio-dma.c ioc = ioc->next; ioc 1120 drivers/parisc/ccio-dma.c static struct ioc * ccio_find_ioc(int hw_path) ioc 1123 drivers/parisc/ccio-dma.c struct ioc *ioc; ioc 1125 drivers/parisc/ccio-dma.c ioc = ioc_list; ioc 1127 drivers/parisc/ccio-dma.c if (ioc->hw_path == hw_path) ioc 1128 drivers/parisc/ccio-dma.c return ioc; ioc 1130 drivers/parisc/ccio-dma.c ioc = ioc->next; ioc 1162 drivers/parisc/ccio-dma.c struct ioc *ioc = ccio_get_iommu(dev); ioc 1165 drivers/parisc/ccio-dma.c ioc->cujo20_bug = 1; ioc 1166 drivers/parisc/ccio-dma.c res_ptr = ioc->res_map; ioc 1169 drivers/parisc/ccio-dma.c while (idx < ioc->res_size) { ioc 1227 drivers/parisc/ccio-dma.c ccio_ioc_init(struct ioc *ioc) ioc 1274 drivers/parisc/ccio-dma.c ioc->pdir_size = (iova_space_size / IOVP_SIZE) * sizeof(u64); ioc 1276 drivers/parisc/ccio-dma.c BUG_ON(ioc->pdir_size > 8 * 1024 * 1024); /* max pdir size <= 8MB */ ioc 1279 drivers/parisc/ccio-dma.c BUG_ON((1 << get_order(ioc->pdir_size)) != (ioc->pdir_size >> PAGE_SHIFT)); ioc 1282 drivers/parisc/ccio-dma.c __func__, ioc->ioc_regs, ioc 1287 drivers/parisc/ccio-dma.c ioc->pdir_base = (u64 *)__get_free_pages(GFP_KERNEL, ioc 1288 drivers/parisc/ccio-dma.c get_order(ioc->pdir_size)); ioc 1289 drivers/parisc/ccio-dma.c if(NULL == ioc->pdir_base) { ioc 1292 drivers/parisc/ccio-dma.c memset(ioc->pdir_base, 0, ioc->pdir_size); ioc 1294 drivers/parisc/ccio-dma.c BUG_ON((((unsigned long)ioc->pdir_base) & PAGE_MASK) != (unsigned long)ioc->pdir_base); ioc 1295 drivers/parisc/ccio-dma.c DBG_INIT(" base %p\n", ioc->pdir_base); ioc 1298 drivers/parisc/ccio-dma.c ioc->res_size = (ioc->pdir_size / sizeof(u64)) >> 3; ioc 1299 drivers/parisc/ccio-dma.c DBG_INIT("%s() res_size 0x%x\n", __func__, ioc->res_size); ioc 1301 drivers/parisc/ccio-dma.c ioc->res_map = (u8 *)__get_free_pages(GFP_KERNEL, ioc 1302 drivers/parisc/ccio-dma.c get_order(ioc->res_size)); ioc 1303 drivers/parisc/ccio-dma.c if(NULL == ioc->res_map) { ioc 1306 drivers/parisc/ccio-dma.c memset(ioc->res_map, 0, ioc->res_size); ioc 1309 drivers/parisc/ccio-dma.c ioc->res_hint = 16; ioc 1312 drivers/parisc/ccio-dma.c spin_lock_init(&ioc->res_lock); ioc 1318 drivers/parisc/ccio-dma.c ioc->chainid_shift = get_order(iova_space_size) + PAGE_SHIFT - CCIO_CHAINID_SHIFT; ioc 1319 drivers/parisc/ccio-dma.c DBG_INIT(" chainid_shift 0x%x\n", ioc->chainid_shift); ioc 1324 drivers/parisc/ccio-dma.c WRITE_U32(CCIO_CHAINID_MASK << ioc->chainid_shift, ioc 1325 drivers/parisc/ccio-dma.c &ioc->ioc_regs->io_chain_id_mask); ioc 1327 drivers/parisc/ccio-dma.c WRITE_U32(virt_to_phys(ioc->pdir_base), ioc 1328 drivers/parisc/ccio-dma.c &ioc->ioc_regs->io_pdir_base); ioc 1333 drivers/parisc/ccio-dma.c WRITE_U32(IOA_NORMAL_MODE, &ioc->ioc_regs->io_control); ioc 1338 drivers/parisc/ccio-dma.c WRITE_U32(0, &ioc->ioc_regs->io_tlb_entry_m); ioc 1339 drivers/parisc/ccio-dma.c WRITE_U32(0, &ioc->ioc_regs->io_tlb_entry_l); ioc 1342 drivers/parisc/ccio-dma.c WRITE_U32((CMD_TLB_DIRECT_WRITE | (i << ioc->chainid_shift)), ioc 1343 drivers/parisc/ccio-dma.c &ioc->ioc_regs->io_command); ioc 1380 drivers/parisc/ccio-dma.c static void __init ccio_init_resources(struct ioc *ioc) ioc 1382 drivers/parisc/ccio-dma.c struct resource *res = ioc->mmio_region; ioc 1385 drivers/parisc/ccio-dma.c snprintf(name, 14, "GSC Bus [%d/]", ioc->hw_path); ioc 1387 drivers/parisc/ccio-dma.c ccio_init_resource(res, name, &ioc->ioc_regs->io_io_low); ioc 1388 drivers/parisc/ccio-dma.c ccio_init_resource(res + 1, name, &ioc->ioc_regs->io_io_low_hv); ioc 1447 drivers/parisc/ccio-dma.c struct ioc *ioc = ccio_get_iommu(dev); ioc 1448 drivers/parisc/ccio-dma.c if (!ioc) ioc 1451 drivers/parisc/ccio-dma.c parent = ioc->mmio_region; ioc 1463 drivers/parisc/ccio-dma.c &ioc->ioc_regs->io_io_low); ioc 1465 drivers/parisc/ccio-dma.c &ioc->ioc_regs->io_io_high); ioc 1469 drivers/parisc/ccio-dma.c &ioc->ioc_regs->io_io_low_hv); ioc 1471 drivers/parisc/ccio-dma.c &ioc->ioc_regs->io_io_high_hv); ioc 1484 drivers/parisc/ccio-dma.c struct ioc *ioc = ccio_get_iommu(dev); ioc 1486 drivers/parisc/ccio-dma.c if (!ioc) { ioc 1488 drivers/parisc/ccio-dma.c } else if ((ioc->mmio_region->start <= res->start) && ioc 1489 drivers/parisc/ccio-dma.c (res->end <= ioc->mmio_region->end)) { ioc 1490 drivers/parisc/ccio-dma.c parent = ioc->mmio_region; ioc 1491 drivers/parisc/ccio-dma.c } else if (((ioc->mmio_region + 1)->start <= res->start) && ioc 1492 drivers/parisc/ccio-dma.c (res->end <= (ioc->mmio_region + 1)->end)) { ioc 1493 drivers/parisc/ccio-dma.c parent = ioc->mmio_region + 1; ioc 1517 drivers/parisc/ccio-dma.c struct ioc *ioc, **ioc_p = &ioc_list; ioc 1520 drivers/parisc/ccio-dma.c ioc = kzalloc(sizeof(struct ioc), GFP_KERNEL); ioc 1521 drivers/parisc/ccio-dma.c if (ioc == NULL) { ioc 1526 drivers/parisc/ccio-dma.c ioc->name = dev->id.hversion == U2_IOA_RUNWAY ? "U2" : "UTurn"; ioc 1528 drivers/parisc/ccio-dma.c printk(KERN_INFO "Found %s at 0x%lx\n", ioc->name, ioc 1534 drivers/parisc/ccio-dma.c *ioc_p = ioc; ioc 1536 drivers/parisc/ccio-dma.c ioc->hw_path = dev->hw_path; ioc 1537 drivers/parisc/ccio-dma.c ioc->ioc_regs = ioremap_nocache(dev->hpa.start, 4096); ioc 1538 drivers/parisc/ccio-dma.c if (!ioc->ioc_regs) { ioc 1539 drivers/parisc/ccio-dma.c kfree(ioc); ioc 1542 drivers/parisc/ccio-dma.c ccio_ioc_init(ioc); ioc 1543 drivers/parisc/ccio-dma.c ccio_init_resources(ioc); ioc 1550 drivers/parisc/ccio-dma.c hba->iommu = ioc; ioc 15 drivers/parisc/iommu-helpers.h iommu_fill_pdir(struct ioc *ioc, struct scatterlist *startsg, int nents, ioc 57 drivers/parisc/iommu-helpers.h sg_dma_address(dma_sg) = pide | ioc->ibase; ioc 64 drivers/parisc/iommu-helpers.h pdirp = &(ioc->pdir_base[pide >> IOVP_SHIFT]); ioc 75 drivers/parisc/iommu-helpers.h ioc->msg_pages += startsg->length >> IOVP_SHIFT; ioc 101 drivers/parisc/iommu-helpers.h iommu_coalesce_chunks(struct ioc *ioc, struct device *dev, ioc 103 drivers/parisc/iommu-helpers.h int (*iommu_alloc_range)(struct ioc *, struct device *, size_t)) ioc 175 drivers/parisc/iommu-helpers.h | (iommu_alloc_range(ioc, dev, dma_len) << IOVP_SHIFT) ioc 7 drivers/parisc/iommu.h struct ioc; ioc 29 drivers/parisc/iommu.h static inline struct ioc *GET_IOC(struct device *dev) ioc 197 drivers/parisc/sba_iommu.c sba_dump_pdir_entry(struct ioc *ioc, char *msg, uint pide) ioc 200 drivers/parisc/sba_iommu.c u64 *ptr = &(ioc->pdir_base[pide & (~0U * BITS_PER_LONG)]); ioc 201 drivers/parisc/sba_iommu.c unsigned long *rptr = (unsigned long *) &(ioc->res_map[(pide >>3) & ~(sizeof(unsigned long) - 1)]); ioc 229 drivers/parisc/sba_iommu.c sba_check_pdir(struct ioc *ioc, char *msg) ioc 231 drivers/parisc/sba_iommu.c u32 *rptr_end = (u32 *) &(ioc->res_map[ioc->res_size]); ioc 232 drivers/parisc/sba_iommu.c u32 *rptr = (u32 *) ioc->res_map; /* resource map ptr */ ioc 233 drivers/parisc/sba_iommu.c u64 *pptr = ioc->pdir_base; /* pdir ptr */ ioc 249 drivers/parisc/sba_iommu.c sba_dump_pdir_entry(ioc, msg, pide); ioc 273 drivers/parisc/sba_iommu.c sba_dump_sg( struct ioc *ioc, struct scatterlist *startsg, int nents) ioc 305 drivers/parisc/sba_iommu.c #define SBA_IOVA(ioc,iovp,offset,hint_reg) ((ioc->ibase) | (iovp) | (offset)) ioc 306 drivers/parisc/sba_iommu.c #define SBA_IOVP(ioc,iova) ((iova) & (ioc)->iovp_mask) ioc 309 drivers/parisc/sba_iommu.c #define SBA_IOVA(ioc,iovp,offset,hint_reg) ((iovp) | (offset)) ioc 310 drivers/parisc/sba_iommu.c #define SBA_IOVP(ioc,iova) (iova) ioc 318 drivers/parisc/sba_iommu.c static unsigned long ptr_to_pide(struct ioc *ioc, unsigned long *res_ptr, ioc 321 drivers/parisc/sba_iommu.c return (((unsigned long)res_ptr - (unsigned long)ioc->res_map) << 3) ioc 335 drivers/parisc/sba_iommu.c sba_search_bitmap(struct ioc *ioc, struct device *dev, ioc 338 drivers/parisc/sba_iommu.c unsigned long *res_ptr = ioc->res_hint; ioc 339 drivers/parisc/sba_iommu.c unsigned long *res_end = (unsigned long *) &(ioc->res_map[ioc->res_size]); ioc 349 drivers/parisc/sba_iommu.c BUG_ON(ioc->ibase & ~IOVP_MASK); ioc 350 drivers/parisc/sba_iommu.c shift = ioc->ibase >> IOVP_SHIFT; ioc 358 drivers/parisc/sba_iommu.c tpide = ptr_to_pide(ioc, res_ptr, 0); ioc 370 drivers/parisc/sba_iommu.c ioc->res_bitshift = 0; ioc 379 drivers/parisc/sba_iommu.c uint bitshiftcnt = ALIGN(ioc->res_bitshift, o); ioc 393 drivers/parisc/sba_iommu.c tpide = ptr_to_pide(ioc, res_ptr, bitshiftcnt); ioc 411 drivers/parisc/sba_iommu.c ioc->res_bitshift = bitshiftcnt + bits_wanted; ioc 416 drivers/parisc/sba_iommu.c ioc->res_hint = (unsigned long *) ioc->res_map; ioc 417 drivers/parisc/sba_iommu.c ioc->res_bitshift = 0; ioc 419 drivers/parisc/sba_iommu.c ioc->res_hint = res_ptr; ioc 434 drivers/parisc/sba_iommu.c sba_alloc_range(struct ioc *ioc, struct device *dev, size_t size) ioc 442 drivers/parisc/sba_iommu.c pide = sba_search_bitmap(ioc, dev, pages_needed); ioc 443 drivers/parisc/sba_iommu.c if (pide >= (ioc->res_size << 3)) { ioc 444 drivers/parisc/sba_iommu.c pide = sba_search_bitmap(ioc, dev, pages_needed); ioc 445 drivers/parisc/sba_iommu.c if (pide >= (ioc->res_size << 3)) ioc 447 drivers/parisc/sba_iommu.c __FILE__, ioc->ioc_hpa); ioc 452 drivers/parisc/sba_iommu.c if(0x00 != ((u8 *) ioc->pdir_base)[pide*sizeof(u64) + 7]) { ioc 453 drivers/parisc/sba_iommu.c sba_dump_pdir_entry(ioc, "sba_search_bitmap() botched it?", pide); ioc 459 drivers/parisc/sba_iommu.c (uint) ((unsigned long) ioc->res_hint - (unsigned long) ioc->res_map), ioc 460 drivers/parisc/sba_iommu.c ioc->res_bitshift ); ioc 469 drivers/parisc/sba_iommu.c ioc->avg_search[ioc->avg_idx++] = cr_start; ioc 470 drivers/parisc/sba_iommu.c ioc->avg_idx &= SBA_SEARCH_SAMPLE - 1; ioc 472 drivers/parisc/sba_iommu.c ioc->used_pages += pages_needed; ioc 488 drivers/parisc/sba_iommu.c sba_free_range(struct ioc *ioc, dma_addr_t iova, size_t size) ioc 490 drivers/parisc/sba_iommu.c unsigned long iovp = SBA_IOVP(ioc, iova); ioc 493 drivers/parisc/sba_iommu.c unsigned long *res_ptr = (unsigned long *) &((ioc)->res_map[ridx & ~RESMAP_IDX_MASK]); ioc 505 drivers/parisc/sba_iommu.c ioc->used_pages -= bits_not_wanted; ioc 519 drivers/parisc/sba_iommu.c #define SBA_DMA_HINT(ioc, val) ((val) << (ioc)->hint_shift_pdir) ioc 607 drivers/parisc/sba_iommu.c sba_mark_invalid(struct ioc *ioc, dma_addr_t iova, size_t byte_cnt) ioc 609 drivers/parisc/sba_iommu.c u32 iovp = (u32) SBA_IOVP(ioc,iova); ioc 610 drivers/parisc/sba_iommu.c u64 *pdir_ptr = &ioc->pdir_base[PDIR_INDEX(iovp)]; ioc 620 drivers/parisc/sba_iommu.c sba_dump_pdir_entry(ioc,"sba_mark_invalid()", PDIR_INDEX(iovp)); ioc 661 drivers/parisc/sba_iommu.c WRITE_REG( SBA_IOVA(ioc, iovp, 0, 0), ioc->ioc_hpa+IOC_PCOM); ioc 673 drivers/parisc/sba_iommu.c struct ioc *ioc; ioc 681 drivers/parisc/sba_iommu.c ioc = GET_IOC(dev); ioc 682 drivers/parisc/sba_iommu.c if (!ioc) ioc 689 drivers/parisc/sba_iommu.c return((int)(mask >= (ioc->ibase - 1 + ioc 690 drivers/parisc/sba_iommu.c (ioc->pdir_size / sizeof(u64) * IOVP_SIZE) ))); ioc 707 drivers/parisc/sba_iommu.c struct ioc *ioc; ioc 714 drivers/parisc/sba_iommu.c ioc = GET_IOC(dev); ioc 715 drivers/parisc/sba_iommu.c if (!ioc) ioc 724 drivers/parisc/sba_iommu.c spin_lock_irqsave(&ioc->res_lock, flags); ioc 726 drivers/parisc/sba_iommu.c sba_check_pdir(ioc,"Check before sba_map_single()"); ioc 730 drivers/parisc/sba_iommu.c ioc->msingle_calls++; ioc 731 drivers/parisc/sba_iommu.c ioc->msingle_pages += size >> IOVP_SHIFT; ioc 733 drivers/parisc/sba_iommu.c pide = sba_alloc_range(ioc, dev, size); ioc 739 drivers/parisc/sba_iommu.c pdir_start = &(ioc->pdir_base[pide]); ioc 765 drivers/parisc/sba_iommu.c sba_check_pdir(ioc,"Check after sba_map_single()"); ioc 767 drivers/parisc/sba_iommu.c spin_unlock_irqrestore(&ioc->res_lock, flags); ioc 770 drivers/parisc/sba_iommu.c return SBA_IOVA(ioc, iovp, offset, DEFAULT_DMA_HINT_REG); ioc 797 drivers/parisc/sba_iommu.c struct ioc *ioc; ioc 806 drivers/parisc/sba_iommu.c ioc = GET_IOC(dev); ioc 807 drivers/parisc/sba_iommu.c if (!ioc) { ioc 808 drivers/parisc/sba_iommu.c WARN_ON(!ioc); ioc 816 drivers/parisc/sba_iommu.c spin_lock_irqsave(&ioc->res_lock, flags); ioc 819 drivers/parisc/sba_iommu.c ioc->usingle_calls++; ioc 820 drivers/parisc/sba_iommu.c ioc->usingle_pages += size >> IOVP_SHIFT; ioc 823 drivers/parisc/sba_iommu.c sba_mark_invalid(ioc, iova, size); ioc 829 drivers/parisc/sba_iommu.c d = &(ioc->saved[ioc->saved_cnt]); ioc 832 drivers/parisc/sba_iommu.c if (++(ioc->saved_cnt) >= DELAYED_RESOURCE_CNT) { ioc 833 drivers/parisc/sba_iommu.c int cnt = ioc->saved_cnt; ioc 835 drivers/parisc/sba_iommu.c sba_free_range(ioc, d->iova, d->size); ioc 838 drivers/parisc/sba_iommu.c ioc->saved_cnt = 0; ioc 840 drivers/parisc/sba_iommu.c READ_REG(ioc->ioc_hpa+IOC_PCOM); /* flush purges */ ioc 843 drivers/parisc/sba_iommu.c sba_free_range(ioc, iova, size); ioc 848 drivers/parisc/sba_iommu.c READ_REG(ioc->ioc_hpa+IOC_PCOM); /* flush purges */ ioc 851 drivers/parisc/sba_iommu.c spin_unlock_irqrestore(&ioc->res_lock, flags); ioc 942 drivers/parisc/sba_iommu.c struct ioc *ioc; ioc 948 drivers/parisc/sba_iommu.c ioc = GET_IOC(dev); ioc 949 drivers/parisc/sba_iommu.c if (!ioc) ioc 960 drivers/parisc/sba_iommu.c spin_lock_irqsave(&ioc->res_lock, flags); ioc 963 drivers/parisc/sba_iommu.c if (sba_check_pdir(ioc,"Check before sba_map_sg()")) ioc 965 drivers/parisc/sba_iommu.c sba_dump_sg(ioc, sglist, nents); ioc 971 drivers/parisc/sba_iommu.c ioc->msg_calls++; ioc 982 drivers/parisc/sba_iommu.c coalesced = iommu_coalesce_chunks(ioc, dev, sglist, nents, sba_alloc_range); ioc 992 drivers/parisc/sba_iommu.c filled = iommu_fill_pdir(ioc, sglist, nents, 0, sba_io_pdir_entry); ioc 998 drivers/parisc/sba_iommu.c if (sba_check_pdir(ioc,"Check after sba_map_sg()")) ioc 1000 drivers/parisc/sba_iommu.c sba_dump_sg(ioc, sglist, nents); ioc 1005 drivers/parisc/sba_iommu.c spin_unlock_irqrestore(&ioc->res_lock, flags); ioc 1026 drivers/parisc/sba_iommu.c struct ioc *ioc; ioc 1034 drivers/parisc/sba_iommu.c ioc = GET_IOC(dev); ioc 1035 drivers/parisc/sba_iommu.c if (!ioc) { ioc 1036 drivers/parisc/sba_iommu.c WARN_ON(!ioc); ioc 1041 drivers/parisc/sba_iommu.c ioc->usg_calls++; ioc 1045 drivers/parisc/sba_iommu.c spin_lock_irqsave(&ioc->res_lock, flags); ioc 1046 drivers/parisc/sba_iommu.c sba_check_pdir(ioc,"Check before sba_unmap_sg()"); ioc 1047 drivers/parisc/sba_iommu.c spin_unlock_irqrestore(&ioc->res_lock, flags); ioc 1055 drivers/parisc/sba_iommu.c ioc->usg_pages += ((sg_dma_address(sglist) & ~IOVP_MASK) + sg_dma_len(sglist) + IOVP_SIZE - 1) >> PAGE_SHIFT; ioc 1056 drivers/parisc/sba_iommu.c ioc->usingle_calls--; /* kluge since call is unmap_sg() */ ioc 1064 drivers/parisc/sba_iommu.c spin_lock_irqsave(&ioc->res_lock, flags); ioc 1065 drivers/parisc/sba_iommu.c sba_check_pdir(ioc,"Check after sba_unmap_sg()"); ioc 1066 drivers/parisc/sba_iommu.c spin_unlock_irqrestore(&ioc->res_lock, flags); ioc 1106 drivers/parisc/sba_iommu.c PAT_MOD(mod)->mod_info.ioc = PAT_GET_IOC(temp); ioc 1217 drivers/parisc/sba_iommu.c struct ioc *ioc; ioc 1229 drivers/parisc/sba_iommu.c lba_set_iregs(lba, ibd->ioc->ibase, ibd->ioc->imask); ioc 1235 drivers/parisc/sba_iommu.c setup_ibase_imask(struct parisc_device *sba, struct ioc *ioc, int ioc_num) ioc 1238 drivers/parisc/sba_iommu.c .ioc = ioc, ioc 1260 drivers/parisc/sba_iommu.c sba_ioc_init_pluto(struct parisc_device *sba, struct ioc *ioc, int ioc_num) ioc 1273 drivers/parisc/sba_iommu.c ioc->ibase = READ_REG(ioc->ioc_hpa + IOC_IBASE); ioc 1274 drivers/parisc/sba_iommu.c iova_space_size = ~(READ_REG(ioc->ioc_hpa + IOC_IMASK) & 0xFFFFFFFFUL) + 1; ioc 1276 drivers/parisc/sba_iommu.c if ((ioc->ibase < 0xfed00000UL) && ((ioc->ibase + iova_space_size) > 0xfee00000UL)) { ioc 1286 drivers/parisc/sba_iommu.c ioc->pdir_size = (iova_space_size / IOVP_SIZE) * sizeof(u64); ioc 1289 drivers/parisc/sba_iommu.c __func__, ioc->ioc_hpa, iova_space_size >> 20, ioc 1292 drivers/parisc/sba_iommu.c ioc->pdir_base = (void *) __get_free_pages(GFP_KERNEL, ioc 1293 drivers/parisc/sba_iommu.c get_order(ioc->pdir_size)); ioc 1294 drivers/parisc/sba_iommu.c if (!ioc->pdir_base) ioc 1297 drivers/parisc/sba_iommu.c memset(ioc->pdir_base, 0, ioc->pdir_size); ioc 1300 drivers/parisc/sba_iommu.c __func__, ioc->pdir_base, ioc->pdir_size); ioc 1303 drivers/parisc/sba_iommu.c ioc->hint_shift_pdir = iov_order + PAGE_SHIFT; ioc 1304 drivers/parisc/sba_iommu.c ioc->hint_mask_pdir = ~(0x3 << (iov_order + PAGE_SHIFT)); ioc 1307 drivers/parisc/sba_iommu.c ioc->hint_shift_pdir, ioc->hint_mask_pdir); ioc 1310 drivers/parisc/sba_iommu.c WARN_ON((((unsigned long) ioc->pdir_base) & PAGE_MASK) != (unsigned long) ioc->pdir_base); ioc 1311 drivers/parisc/sba_iommu.c WRITE_REG(virt_to_phys(ioc->pdir_base), ioc->ioc_hpa + IOC_PDIR_BASE); ioc 1316 drivers/parisc/sba_iommu.c ioc->imask = iova_space_mask; ioc 1318 drivers/parisc/sba_iommu.c ioc->iovp_mask = ~(iova_space_mask + PAGE_SIZE - 1); ioc 1320 drivers/parisc/sba_iommu.c sba_dump_tlb(ioc->ioc_hpa); ioc 1322 drivers/parisc/sba_iommu.c setup_ibase_imask(sba, ioc, ioc_num); ioc 1324 drivers/parisc/sba_iommu.c WRITE_REG(ioc->imask, ioc->ioc_hpa + IOC_IMASK); ioc 1331 drivers/parisc/sba_iommu.c ioc->imask |= 0xFFFFFFFF00000000UL; ioc 1345 drivers/parisc/sba_iommu.c WRITE_REG(tcnfg, ioc->ioc_hpa + IOC_TCNFG); ioc 1351 drivers/parisc/sba_iommu.c WRITE_REG(ioc->ibase | 1, ioc->ioc_hpa + IOC_IBASE); ioc 1357 drivers/parisc/sba_iommu.c WRITE_REG(ioc->ibase | 31, ioc->ioc_hpa + IOC_PCOM); ioc 1374 drivers/parisc/sba_iommu.c ioc->pdir_size /= 2; ioc 1375 drivers/parisc/sba_iommu.c ioc->pdir_base[PDIR_INDEX(iova_space_size/2)] = SBA_AGPGART_COOKIE; ioc 1381 drivers/parisc/sba_iommu.c sba_ioc_init(struct parisc_device *sba, struct ioc *ioc, int ioc_num) ioc 1420 drivers/parisc/sba_iommu.c ioc->pdir_size = pdir_size = (iova_space_size/IOVP_SIZE) * sizeof(u64); ioc 1424 drivers/parisc/sba_iommu.c ioc->ioc_hpa, ioc 1429 drivers/parisc/sba_iommu.c ioc->pdir_base = sba_alloc_pdir(pdir_size); ioc 1432 drivers/parisc/sba_iommu.c __func__, ioc->pdir_base, pdir_size); ioc 1436 drivers/parisc/sba_iommu.c ioc->hint_shift_pdir = iov_order + PAGE_SHIFT; ioc 1437 drivers/parisc/sba_iommu.c ioc->hint_mask_pdir = ~(0x3 << (iov_order + PAGE_SHIFT)); ioc 1440 drivers/parisc/sba_iommu.c ioc->hint_shift_pdir, ioc->hint_mask_pdir); ioc 1443 drivers/parisc/sba_iommu.c WRITE_REG64(virt_to_phys(ioc->pdir_base), ioc->ioc_hpa + IOC_PDIR_BASE); ioc 1453 drivers/parisc/sba_iommu.c ioc->ibase = 0; ioc 1454 drivers/parisc/sba_iommu.c ioc->imask = iova_space_mask; /* save it */ ioc 1456 drivers/parisc/sba_iommu.c ioc->iovp_mask = ~(iova_space_mask + PAGE_SIZE - 1); ioc 1460 drivers/parisc/sba_iommu.c __func__, ioc->ibase, ioc->imask); ioc 1468 drivers/parisc/sba_iommu.c setup_ibase_imask(sba, ioc, ioc_num); ioc 1473 drivers/parisc/sba_iommu.c WRITE_REG(ioc->ibase | 1, ioc->ioc_hpa+IOC_IBASE); ioc 1474 drivers/parisc/sba_iommu.c WRITE_REG(ioc->imask, ioc->ioc_hpa+IOC_IMASK); ioc 1488 drivers/parisc/sba_iommu.c WRITE_REG(tcnfg, ioc->ioc_hpa+IOC_TCNFG); ioc 1494 drivers/parisc/sba_iommu.c WRITE_REG(0 | 31, ioc->ioc_hpa+IOC_PCOM); ioc 1496 drivers/parisc/sba_iommu.c ioc->ibase = 0; /* used by SBA_IOVA and related macros */ ioc 1588 drivers/parisc/sba_iommu.c sba_dev->ioc[0].ioc_hpa = ioc_remap(sba_dev, ASTRO_IOC_OFFSET); ioc 1600 drivers/parisc/sba_iommu.c sba_dev->ioc[0].ioc_hpa = ioc_remap(sba_dev, PLUTO_IOC_OFFSET); ioc 1616 drivers/parisc/sba_iommu.c sba_dev->ioc[0].ioc_hpa = ioc_remap(sba_dev, IKE_IOC_OFFSET(0)); ioc 1617 drivers/parisc/sba_iommu.c sba_dev->ioc[1].ioc_hpa = ioc_remap(sba_dev, IKE_IOC_OFFSET(1)); ioc 1626 drivers/parisc/sba_iommu.c void __iomem *ioc_hpa = sba_dev->ioc[i].ioc_hpa; ioc 1654 drivers/parisc/sba_iommu.c READ_REG(sba_dev->ioc[i].ioc_hpa + ROPE7_CTL); ioc 1658 drivers/parisc/sba_iommu.c READ_REG(sba_dev->ioc[i].ioc_hpa + 0x40), ioc 1659 drivers/parisc/sba_iommu.c READ_REG(sba_dev->ioc[i].ioc_hpa + 0x50) ioc 1662 drivers/parisc/sba_iommu.c READ_REG(sba_dev->ioc[i].ioc_hpa + 0x108), ioc 1663 drivers/parisc/sba_iommu.c READ_REG(sba_dev->ioc[i].ioc_hpa + 0x400) ioc 1667 drivers/parisc/sba_iommu.c sba_ioc_init_pluto(sba_dev->dev, &(sba_dev->ioc[i]), i); ioc 1669 drivers/parisc/sba_iommu.c sba_ioc_init(sba_dev->dev, &(sba_dev->ioc[i]), i); ioc 1694 drivers/parisc/sba_iommu.c res_size = sba_dev->ioc[i].pdir_size/sizeof(u64); /* entries */ ioc 1705 drivers/parisc/sba_iommu.c sba_dev->ioc[i].res_size = res_size; ioc 1706 drivers/parisc/sba_iommu.c sba_dev->ioc[i].res_map = (char *) __get_free_pages(GFP_KERNEL, get_order(res_size)); ioc 1709 drivers/parisc/sba_iommu.c iterate_pages( sba_dev->ioc[i].res_map, res_size, ioc 1713 drivers/parisc/sba_iommu.c if (NULL == sba_dev->ioc[i].res_map) ioc 1719 drivers/parisc/sba_iommu.c memset(sba_dev->ioc[i].res_map, 0, res_size); ioc 1721 drivers/parisc/sba_iommu.c sba_dev->ioc[i].res_hint = (unsigned long *) ioc 1722 drivers/parisc/sba_iommu.c &(sba_dev->ioc[i].res_map[L1_CACHE_BYTES]); ioc 1726 drivers/parisc/sba_iommu.c sba_dev->ioc[i].res_map[0] = 0x80; ioc 1727 drivers/parisc/sba_iommu.c sba_dev->ioc[i].pdir_base[0] = 0xeeffc0addbba0080ULL; ioc 1736 drivers/parisc/sba_iommu.c long *p_start = (long *) &(sba_dev->ioc[i].res_map[idx_start]); ioc 1737 drivers/parisc/sba_iommu.c long *p_end = (long *) &(sba_dev->ioc[i].res_map[idx_end]); ioc 1746 drivers/parisc/sba_iommu.c iterate_pages( sba_dev->ioc[i].res_map, res_size, ioc 1748 drivers/parisc/sba_iommu.c iterate_pages( sba_dev->ioc[i].pdir_base, sba_dev->ioc[i].pdir_size, ioc 1753 drivers/parisc/sba_iommu.c __func__, i, res_size, sba_dev->ioc[i].res_map); ioc 1777 drivers/parisc/sba_iommu.c struct ioc *ioc = &sba_dev->ioc[0]; /* FIXME: Multi-IOC support! */ ioc 1778 drivers/parisc/sba_iommu.c int total_pages = (int) (ioc->res_size << 3); /* 8 bits per byte */ ioc 1789 drivers/parisc/sba_iommu.c (int)((ioc->res_size << 3) * sizeof(u64)), /* 8 bits/byte */ ioc 1793 drivers/parisc/sba_iommu.c ioc->res_size, ioc->res_size << 3); /* 8 bits per byte */ ioc 1809 drivers/parisc/sba_iommu.c total_pages - ioc->used_pages, ioc->used_pages, ioc 1810 drivers/parisc/sba_iommu.c (int)(ioc->used_pages * 100 / total_pages)); ioc 1812 drivers/parisc/sba_iommu.c min = max = ioc->avg_search[0]; ioc 1814 drivers/parisc/sba_iommu.c avg += ioc->avg_search[i]; ioc 1815 drivers/parisc/sba_iommu.c if (ioc->avg_search[i] > max) max = ioc->avg_search[i]; ioc 1816 drivers/parisc/sba_iommu.c if (ioc->avg_search[i] < min) min = ioc->avg_search[i]; ioc 1823 drivers/parisc/sba_iommu.c ioc->msingle_calls, ioc->msingle_pages, ioc 1824 drivers/parisc/sba_iommu.c (int)((ioc->msingle_pages * 1000)/ioc->msingle_calls)); ioc 1827 drivers/parisc/sba_iommu.c min = ioc->usingle_calls; ioc 1828 drivers/parisc/sba_iommu.c max = ioc->usingle_pages - ioc->usg_pages; ioc 1833 drivers/parisc/sba_iommu.c ioc->msg_calls, ioc->msg_pages, ioc 1834 drivers/parisc/sba_iommu.c (int)((ioc->msg_pages * 1000)/ioc->msg_calls)); ioc 1837 drivers/parisc/sba_iommu.c ioc->usg_calls, ioc->usg_pages, ioc 1838 drivers/parisc/sba_iommu.c (int)((ioc->usg_pages * 1000)/ioc->usg_calls)); ioc 1848 drivers/parisc/sba_iommu.c struct ioc *ioc = &sba_dev->ioc[0]; /* FIXME: Multi-IOC support! */ ioc 1850 drivers/parisc/sba_iommu.c seq_hex_dump(m, " ", DUMP_PREFIX_NONE, 32, 4, ioc->res_map, ioc 1851 drivers/parisc/sba_iommu.c ioc->res_size, false); ioc 1942 drivers/parisc/sba_iommu.c spin_lock_init(&(sba_dev->ioc[i].res_lock)); ioc 2000 drivers/parisc/sba_iommu.c return &(sba->ioc[iocnum]); ioc 788 drivers/phy/broadcom/phy-brcm-usb-init.c if (params->ioc) ioc 809 drivers/phy/broadcom/phy-brcm-usb-init.c if (params->ioc) ioc 19 drivers/phy/broadcom/phy-brcm-usb-init.h int ioc; ioc 324 drivers/phy/broadcom/phy-brcm-usb.c of_property_read_u32(dn, "brcm,ioc", &priv->ini.ioc); ioc 533 drivers/platform/x86/intel_pmc_ipc.c ret = devm_request_irq(&pdev->dev, pdev->irq, ioc, 0, "intel_pmc_ipc", ioc 954 drivers/platform/x86/intel_pmc_ipc.c if (devm_request_irq(&pdev->dev, ipcdev.irq, ioc, IRQF_NO_SUSPEND, ioc 654 drivers/platform/x86/intel_scu_ipc.c err = devm_request_irq(&pdev->dev, pdev->irq, ioc, 0, "intel_scu_ipc", ioc 263 drivers/scsi/bfa/bfa.h bfi_fn_lpu(bfa_ioc_pcifn(&(__bfa)->ioc), bfa_ioc_portid(&(__bfa)->ioc)) ioc 349 drivers/scsi/bfa/bfa.h bfa_ioc_fetch_stats(&(__bfa)->ioc, __ioc_stats) ioc 351 drivers/scsi/bfa/bfa.h bfa_ioc_clr_stats(&(__bfa)->ioc) ioc 353 drivers/scsi/bfa/bfa.h bfa_ioc_get_nports(&(__bfa)->ioc) ioc 355 drivers/scsi/bfa/bfa.h bfa_ioc_get_adapter_manufacturer(&(__bfa)->ioc, __manufacturer) ioc 357 drivers/scsi/bfa/bfa.h bfa_ioc_get_adapter_model(&(__bfa)->ioc, __model) ioc 359 drivers/scsi/bfa/bfa.h bfa_ioc_get_adapter_serial_num(&(__bfa)->ioc, __serial_num) ioc 361 drivers/scsi/bfa/bfa.h bfa_ioc_get_adapter_fw_ver(&(__bfa)->ioc, __fw_ver) ioc 363 drivers/scsi/bfa/bfa.h bfa_ioc_get_adapter_optrom_ver(&(__bfa)->ioc, __optrom_ver) ioc 365 drivers/scsi/bfa/bfa.h bfa_ioc_get_pci_chip_rev(&(__bfa)->ioc, __chip_rev) ioc 367 drivers/scsi/bfa/bfa.h bfa_ioc_get_state(&(__bfa)->ioc) ioc 369 drivers/scsi/bfa/bfa.h bfa_ioc_get_type(&(__bfa)->ioc) ioc 371 drivers/scsi/bfa/bfa.h bfa_ioc_get_mac(&(__bfa)->ioc) ioc 373 drivers/scsi/bfa/bfa.h bfa_ioc_get_mfg_mac(&(__bfa)->ioc) ioc 95 drivers/scsi/bfa/bfa_core.c bfa_port_attach(port, &bfa->ioc, bfa, bfa->trcmod); ioc 108 drivers/scsi/bfa/bfa_core.c bfa_ablk_attach(ablk, &bfa->ioc); ioc 119 drivers/scsi/bfa/bfa_core.c bfa_cee_attach(cee, &bfa->ioc, bfa); ioc 129 drivers/scsi/bfa/bfa_core.c bfa_sfp_attach(sfp, &bfa->ioc, bfa, bfa->trcmod); ioc 139 drivers/scsi/bfa/bfa_core.c bfa_flash_attach(flash, &bfa->ioc, bfa, bfa->trcmod, mincfg); ioc 150 drivers/scsi/bfa/bfa_core.c bfa_diag_attach(diag, &bfa->ioc, bfa, bfa_fcport_beacon, bfa->trcmod); ioc 160 drivers/scsi/bfa/bfa_core.c bfa_phy_attach(phy, &bfa->ioc, bfa, bfa->trcmod, mincfg); ioc 170 drivers/scsi/bfa/bfa_core.c bfa_fru_attach(fru, &bfa->ioc, bfa, bfa->trcmod, mincfg); ioc 271 drivers/scsi/bfa/bfa_core.c bfa_ioc_enable(&iocfc->bfa->ioc); ioc 452 drivers/scsi/bfa/bfa_core.c bfa_ioc_disable(&iocfc->bfa->ioc); ioc 484 drivers/scsi/bfa/bfa_core.c bfa_ioc_enable(&iocfc->bfa->ioc); ioc 570 drivers/scsi/bfa/bfa_core.c bfa_ioc_disable(&iocfc->bfa->ioc); ioc 669 drivers/scsi/bfa/bfa_core.c bfa_ioc_disable(&iocfc->bfa->ioc); ioc 847 drivers/scsi/bfa/bfa_core.c int port_id = bfa_ioc_portid(&bfa->ioc); ioc 849 drivers/scsi/bfa/bfa_core.c bfa_trc(bfa, bfa_ioc_pcifn(&bfa->ioc)); ioc 854 drivers/scsi/bfa/bfa_core.c if (bfa_asic_id_ct2(bfa->ioc.pcidev.device_id)) { ioc 913 drivers/scsi/bfa/bfa_core.c if (bfa_asic_id_ct2(bfa->ioc.pcidev.device_id)) { ioc 920 drivers/scsi/bfa/bfa_core.c halt_isr = bfa_asic_id_ct(bfa->ioc.pcidev.device_id) ? ioc 928 drivers/scsi/bfa/bfa_core.c bfa_ioc_mbox_isr(&bfa->ioc); ioc 937 drivers/scsi/bfa/bfa_core.c curr_value = readl(bfa->ioc.ioc_regs.ll_halt); ioc 939 drivers/scsi/bfa/bfa_core.c writel(curr_value, bfa->ioc.ioc_regs.ll_halt); ioc 949 drivers/scsi/bfa/bfa_core.c bfa->ioc.ioc_regs.pss_err_status_reg); ioc 951 drivers/scsi/bfa/bfa_core.c bfa->ioc.ioc_regs.pss_err_status_reg); ioc 955 drivers/scsi/bfa/bfa_core.c bfa_ioc_error_isr(&bfa->ioc); ioc 1031 drivers/scsi/bfa/bfa_core.c bfa_ioc_mbox_send(&bfa->ioc, &cfg_req, ioc 1048 drivers/scsi/bfa/bfa_core.c if (bfa_asic_id_ctc(bfa_ioc_devid(&bfa->ioc))) { ioc 1073 drivers/scsi/bfa/bfa_core.c bfa_ioc_pcifn(&bfa->ioc) * BFI_IOC_MAX_CQS; ioc 1075 drivers/scsi/bfa/bfa_core.c bfa_ioc_pcifn(&bfa->ioc) * BFI_IOC_MAX_CQS; ioc 1078 drivers/scsi/bfa/bfa_core.c if (bfa_asic_id_ct2(bfa_ioc_devid(&bfa->ioc))) { ioc 1100 drivers/scsi/bfa/bfa_core.c bfa_ioc_mem_claim(&bfa->ioc, bfa_mem_dma_virt(ioc_dma), ioc 1154 drivers/scsi/bfa/bfa_core.c bfa_ioc_debug_memclaim(&bfa->ioc, bfa_mem_kva_curp(iocfc)); ioc 1248 drivers/scsi/bfa/bfa_core.c void __iomem *kva = bfa_ioc_bar0(&bfa->ioc); ioc 1309 drivers/scsi/bfa/bfa_core.c bfa->ioc.attr->pwwn = bfa->iocfc.cfgrsp->pbc_cfg.pbc_pwwn; ioc 1310 drivers/scsi/bfa/bfa_core.c bfa->ioc.attr->nwwn = bfa->iocfc.cfgrsp->pbc_cfg.pbc_nwwn; ioc 1340 drivers/scsi/bfa/bfa_core.c bfa->ioc.attr->pwwn = msg->pwwn; ioc 1341 drivers/scsi/bfa/bfa_core.c bfa->ioc.attr->nwwn = msg->nwwn; ioc 1354 drivers/scsi/bfa/bfa_core.c u32 card_type = bfa->ioc.attr->card_type; ioc 1356 drivers/scsi/bfa/bfa_core.c if (bfa_ioc_is_operational(&bfa->ioc)) { ioc 1390 drivers/scsi/bfa/bfa_core.c bfa_ioc_mbox_send(&bfa->ioc, &faa_attr_req, ioc 1521 drivers/scsi/bfa/bfa_core.c struct bfa_ioc_s *ioc = &bfa->ioc; ioc 1528 drivers/scsi/bfa/bfa_core.c ioc->trcmod = bfa->trcmod; ioc 1529 drivers/scsi/bfa/bfa_core.c bfa_ioc_attach(&bfa->ioc, bfa, &bfa_iocfc_cbfn, &bfa->timer_mod); ioc 1531 drivers/scsi/bfa/bfa_core.c bfa_ioc_pci_init(&bfa->ioc, pcidev, BFI_PCIFN_CLASS_FC); ioc 1532 drivers/scsi/bfa/bfa_core.c bfa_ioc_mbox_register(&bfa->ioc, bfa_mbox_isrs); ioc 1687 drivers/scsi/bfa/bfa_core.c return bfa_ioc_is_operational(&bfa->ioc) && ioc 1894 drivers/scsi/bfa/bfa_core.c bfa_ioc_detach(&bfa->ioc); ioc 1440 drivers/scsi/bfa/bfa_defs_svc.h struct bfa_ioc_aen_data_s ioc; ioc 58 drivers/scsi/bfa/bfa_fcs.c struct bfa_ioc_s *ioc = &fabric->fcs->bfa->ioc; ioc 60 drivers/scsi/bfa/bfa_fcs.c port_cfg->nwwn = ioc->attr->nwwn; ioc 61 drivers/scsi/bfa/bfa_fcs.c port_cfg->pwwn = ioc->attr->pwwn; ioc 747 drivers/scsi/bfa/bfa_fcs.c port_cfg->nwwn = fabric->fcs->bfa->ioc.attr->nwwn; ioc 748 drivers/scsi/bfa/bfa_fcs.c port_cfg->pwwn = fabric->fcs->bfa->ioc.attr->pwwn; ioc 761 drivers/scsi/bfa/bfa_fcs.c bfa_ioc_get_adapter_model(&fabric->fcs->bfa->ioc, model); ioc 822 drivers/scsi/bfa/bfa_fcs.c bfa_ioc_get_adapter_model(&fabric->fcs->bfa->ioc, model); ioc 2622 drivers/scsi/bfa/bfa_fcs_lport.c bfa_ioc_get_adapter_manufacturer(&port->fcs->bfa->ioc, ioc 2624 drivers/scsi/bfa/bfa_fcs_lport.c bfa_ioc_get_adapter_serial_num(&port->fcs->bfa->ioc, ioc 2626 drivers/scsi/bfa/bfa_fcs_lport.c bfa_ioc_get_adapter_model(&port->fcs->bfa->ioc, ioc 2628 drivers/scsi/bfa/bfa_fcs_lport.c bfa_ioc_get_adapter_model(&port->fcs->bfa->ioc, ioc 2630 drivers/scsi/bfa/bfa_fcs_lport.c bfa_ioc_get_pci_chip_rev(&port->fcs->bfa->ioc, ioc 2632 drivers/scsi/bfa/bfa_fcs_lport.c bfa_ioc_get_adapter_optrom_ver(&port->fcs->bfa->ioc, ioc 2634 drivers/scsi/bfa/bfa_fcs_lport.c bfa_ioc_get_adapter_fw_ver(&port->fcs->bfa->ioc, ioc 2662 drivers/scsi/bfa/bfa_fcs_lport.c cpu_to_be32(bfa_ioc_get_nports(&port->fcs->bfa->ioc)); ioc 5391 drivers/scsi/bfa/bfa_fcs_lport.c if ((!port->vport) && bfa_ioc_get_fcmode(&port->fcs->bfa->ioc)) { ioc 19 drivers/scsi/bfa/bfa_hw_cb.c void __iomem *kva = bfa_ioc_bar0(&bfa->ioc); ioc 20 drivers/scsi/bfa/bfa_hw_cb.c int fn = bfa_ioc_pcifn(&bfa->ioc); ioc 34 drivers/scsi/bfa/bfa_hw_cb.c writel(__HFN_INT_CPE_Q0 << CPE_Q_NUM(bfa_ioc_pcifn(&bfa->ioc), reqq), ioc 48 drivers/scsi/bfa/bfa_hw_cb.c writel(__HFN_INT_RME_Q0 << RME_Q_NUM(bfa_ioc_pcifn(&bfa->ioc), rspq), ioc 73 drivers/scsi/bfa/bfa_hw_cb.c if (bfa_ioc_pcifn(&bfa->ioc) == 0) { ioc 29 drivers/scsi/bfa/bfa_hw_ct.c void __iomem *kva = bfa_ioc_bar0(&bfa->ioc); ioc 30 drivers/scsi/bfa/bfa_hw_ct.c int fn = bfa_ioc_pcifn(&bfa->ioc); ioc 45 drivers/scsi/bfa/bfa_hw_ct.c void __iomem *kva = bfa_ioc_bar0(&bfa->ioc); ioc 161 drivers/scsi/bfa/bfa_hw_ct.c bfa_ioc_isr_mode_set(&bfa->ioc, msix); ioc 90 drivers/scsi/bfa/bfa_ioc.c static void bfa_ioc_hw_sem_get(struct bfa_ioc_s *ioc); ioc 91 drivers/scsi/bfa/bfa_ioc.c static void bfa_ioc_hwinit(struct bfa_ioc_s *ioc, bfa_boolean_t force); ioc 92 drivers/scsi/bfa/bfa_ioc.c static void bfa_ioc_timeout(void *ioc); ioc 93 drivers/scsi/bfa/bfa_ioc.c static void bfa_ioc_poll_fwinit(struct bfa_ioc_s *ioc); ioc 94 drivers/scsi/bfa/bfa_ioc.c static void bfa_ioc_send_enable(struct bfa_ioc_s *ioc); ioc 95 drivers/scsi/bfa/bfa_ioc.c static void bfa_ioc_send_disable(struct bfa_ioc_s *ioc); ioc 96 drivers/scsi/bfa/bfa_ioc.c static void bfa_ioc_send_getattr(struct bfa_ioc_s *ioc); ioc 97 drivers/scsi/bfa/bfa_ioc.c static void bfa_ioc_hb_monitor(struct bfa_ioc_s *ioc); ioc 98 drivers/scsi/bfa/bfa_ioc.c static void bfa_ioc_mbox_poll(struct bfa_ioc_s *ioc); ioc 99 drivers/scsi/bfa/bfa_ioc.c static void bfa_ioc_mbox_flush(struct bfa_ioc_s *ioc); ioc 100 drivers/scsi/bfa/bfa_ioc.c static void bfa_ioc_recover(struct bfa_ioc_s *ioc); ioc 101 drivers/scsi/bfa/bfa_ioc.c static void bfa_ioc_event_notify(struct bfa_ioc_s *ioc , ioc 103 drivers/scsi/bfa/bfa_ioc.c static void bfa_ioc_disable_comp(struct bfa_ioc_s *ioc); ioc 104 drivers/scsi/bfa/bfa_ioc.c static void bfa_ioc_lpu_stop(struct bfa_ioc_s *ioc); ioc 105 drivers/scsi/bfa/bfa_ioc.c static void bfa_ioc_fail_notify(struct bfa_ioc_s *ioc); ioc 106 drivers/scsi/bfa/bfa_ioc.c static void bfa_ioc_pf_fwmismatch(struct bfa_ioc_s *ioc); ioc 111 drivers/scsi/bfa/bfa_ioc.c struct bfa_ioc_s *ioc, ioc 257 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_sm_uninit_entry(struct bfa_ioc_s *ioc) ioc 265 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_sm_uninit(struct bfa_ioc_s *ioc, enum ioc_event event) ioc 267 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, event); ioc 271 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_reset); ioc 275 drivers/scsi/bfa/bfa_ioc.c bfa_sm_fault(ioc, event); ioc 282 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_sm_reset_entry(struct bfa_ioc_s *ioc) ioc 284 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_set_state(&ioc->iocpf, bfa_iocpf_sm_reset); ioc 291 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_sm_reset(struct bfa_ioc_s *ioc, enum ioc_event event) ioc 293 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, event); ioc 297 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_enabling); ioc 301 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_disable_comp(ioc); ioc 305 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_uninit); ioc 309 drivers/scsi/bfa/bfa_ioc.c bfa_sm_fault(ioc, event); ioc 315 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_sm_enabling_entry(struct bfa_ioc_s *ioc) ioc 317 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_ENABLE); ioc 325 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_sm_enabling(struct bfa_ioc_s *ioc, enum ioc_event event) ioc 327 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, event); ioc 331 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_getattr); ioc 337 drivers/scsi/bfa/bfa_ioc.c ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE); ioc 338 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_fail); ioc 340 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_INITFAIL); ioc 344 drivers/scsi/bfa/bfa_ioc.c ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE); ioc 345 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_hwfail); ioc 349 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_disabling); ioc 353 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_uninit); ioc 354 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_STOP); ioc 361 drivers/scsi/bfa/bfa_ioc.c bfa_sm_fault(ioc, event); ioc 367 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_sm_getattr_entry(struct bfa_ioc_s *ioc) ioc 369 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_timer_start(ioc); ioc 370 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_send_getattr(ioc); ioc 377 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_sm_getattr(struct bfa_ioc_s *ioc, enum ioc_event event) ioc 379 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, event); ioc 383 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_timer_stop(ioc); ioc 384 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_op); ioc 389 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_timer_stop(ioc); ioc 392 drivers/scsi/bfa/bfa_ioc.c ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE); ioc 393 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_fail); ioc 395 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_GETATTRFAIL); ioc 399 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_timer_stop(ioc); ioc 400 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_disabling); ioc 407 drivers/scsi/bfa/bfa_ioc.c bfa_sm_fault(ioc, event); ioc 412 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_sm_op_entry(struct bfa_ioc_s *ioc) ioc 414 drivers/scsi/bfa/bfa_ioc.c struct bfad_s *bfad = (struct bfad_s *)ioc->bfa->bfad; ioc 416 drivers/scsi/bfa/bfa_ioc.c ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_OK); ioc 417 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_event_notify(ioc, BFA_IOC_E_ENABLED); ioc 418 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_hb_monitor(ioc); ioc 420 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_aen_post(ioc, BFA_IOC_AEN_ENABLE); ioc 424 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_sm_op(struct bfa_ioc_s *ioc, enum ioc_event event) ioc 426 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, event); ioc 433 drivers/scsi/bfa/bfa_ioc.c bfa_hb_timer_stop(ioc); ioc 434 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_disabling); ioc 439 drivers/scsi/bfa/bfa_ioc.c bfa_hb_timer_stop(ioc); ioc 442 drivers/scsi/bfa/bfa_ioc.c if (ioc->iocpf.auto_recover) ioc 443 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_fail_retry); ioc 445 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_fail); ioc 447 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_fail_notify(ioc); ioc 450 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_FAIL); ioc 454 drivers/scsi/bfa/bfa_ioc.c bfa_sm_fault(ioc, event); ioc 460 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_sm_disabling_entry(struct bfa_ioc_s *ioc) ioc 462 drivers/scsi/bfa/bfa_ioc.c struct bfad_s *bfad = (struct bfad_s *)ioc->bfa->bfad; ioc 463 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_DISABLE); ioc 465 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_aen_post(ioc, BFA_IOC_AEN_DISABLE); ioc 472 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_sm_disabling(struct bfa_ioc_s *ioc, enum ioc_event event) ioc 474 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, event); ioc 478 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_disabled); ioc 487 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_FAIL); ioc 491 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_hwfail); ioc 492 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_disable_comp(ioc); ioc 496 drivers/scsi/bfa/bfa_ioc.c bfa_sm_fault(ioc, event); ioc 504 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_sm_disabled_entry(struct bfa_ioc_s *ioc) ioc 506 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_disable_comp(ioc); ioc 510 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_sm_disabled(struct bfa_ioc_s *ioc, enum ioc_event event) ioc 512 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, event); ioc 516 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_enabling); ioc 520 drivers/scsi/bfa/bfa_ioc.c ioc->cbfn->disable_cbfn(ioc->bfa); ioc 524 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_uninit); ioc 525 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_STOP); ioc 529 drivers/scsi/bfa/bfa_ioc.c bfa_sm_fault(ioc, event); ioc 535 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_sm_fail_retry_entry(struct bfa_ioc_s *ioc) ioc 537 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, 0); ioc 544 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_sm_fail_retry(struct bfa_ioc_s *ioc, enum ioc_event event) ioc 546 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, event); ioc 550 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_getattr); ioc 558 drivers/scsi/bfa/bfa_ioc.c ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE); ioc 559 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_fail); ioc 561 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_INITFAIL); ioc 565 drivers/scsi/bfa/bfa_ioc.c ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE); ioc 566 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_hwfail); ioc 573 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_disabling); ioc 577 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_uninit); ioc 578 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_STOP); ioc 582 drivers/scsi/bfa/bfa_ioc.c bfa_sm_fault(ioc, event); ioc 588 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_sm_fail_entry(struct bfa_ioc_s *ioc) ioc 590 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, 0); ioc 597 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_sm_fail(struct bfa_ioc_s *ioc, enum ioc_event event) ioc 599 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, event); ioc 604 drivers/scsi/bfa/bfa_ioc.c ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE); ioc 608 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_disabling); ioc 612 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_uninit); ioc 613 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_STOP); ioc 623 drivers/scsi/bfa/bfa_ioc.c bfa_sm_fault(ioc, event); ioc 628 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_sm_hwfail_entry(struct bfa_ioc_s *ioc) ioc 630 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, 0); ioc 634 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_sm_hwfail(struct bfa_ioc_s *ioc, enum ioc_event event) ioc 636 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, event); ioc 640 drivers/scsi/bfa/bfa_ioc.c ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE); ioc 644 drivers/scsi/bfa/bfa_ioc.c ioc->cbfn->disable_cbfn(ioc->bfa); ioc 648 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_uninit); ioc 656 drivers/scsi/bfa/bfa_ioc.c bfa_sm_fault(ioc, event); ioc 680 drivers/scsi/bfa/bfa_ioc.c struct bfa_ioc_s *ioc = iocpf->ioc; ioc 682 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, event); ioc 693 drivers/scsi/bfa/bfa_ioc.c bfa_sm_fault(ioc, event); ioc 710 drivers/scsi/bfa/bfa_ioc.c r32 = readl(iocpf->ioc->ioc_regs.ioc_init_sem_reg); ioc 713 drivers/scsi/bfa/bfa_ioc.c r32 = readl(iocpf->ioc->ioc_regs.ioc_init_sem_reg); ioc 717 drivers/scsi/bfa/bfa_ioc.c fwstate = bfa_ioc_get_cur_ioc_fwstate(iocpf->ioc); ioc 719 drivers/scsi/bfa/bfa_ioc.c writel(1, iocpf->ioc->ioc_regs.ioc_init_sem_reg); ioc 723 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_fwver_get(iocpf->ioc, &fwhdr); ioc 726 drivers/scsi/bfa/bfa_ioc.c writel(1, iocpf->ioc->ioc_regs.ioc_init_sem_reg); ioc 733 drivers/scsi/bfa/bfa_ioc.c pgnum = PSS_SMEM_PGNUM(iocpf->ioc->ioc_regs.smem_pg0, loff); ioc 735 drivers/scsi/bfa/bfa_ioc.c writel(pgnum, iocpf->ioc->ioc_regs.host_page_num_fn); ioc 738 drivers/scsi/bfa/bfa_ioc.c bfa_mem_write(iocpf->ioc->ioc_regs.smem_page_start, loff, 0); ioc 742 drivers/scsi/bfa/bfa_ioc.c bfa_trc(iocpf->ioc, fwstate); ioc 743 drivers/scsi/bfa/bfa_ioc.c bfa_trc(iocpf->ioc, swab32(fwhdr.exec)); ioc 744 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_set_cur_ioc_fwstate(iocpf->ioc, BFI_IOC_UNINIT); ioc 745 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_set_alt_ioc_fwstate(iocpf->ioc, BFI_IOC_UNINIT); ioc 750 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_ownership_reset(iocpf->ioc); ioc 755 drivers/scsi/bfa/bfa_ioc.c writel(1, iocpf->ioc->ioc_regs.ioc_init_sem_reg); ioc 758 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_hw_sem_get(iocpf->ioc); ioc 767 drivers/scsi/bfa/bfa_ioc.c struct bfa_ioc_s *ioc = iocpf->ioc; ioc 769 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, event); ioc 773 drivers/scsi/bfa/bfa_ioc.c if (bfa_ioc_firmware_lock(ioc)) { ioc 774 drivers/scsi/bfa/bfa_ioc.c if (bfa_ioc_sync_start(ioc)) { ioc 775 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_sync_join(ioc); ioc 778 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_firmware_unlock(ioc); ioc 779 drivers/scsi/bfa/bfa_ioc.c writel(1, ioc->ioc_regs.ioc_sem_reg); ioc 780 drivers/scsi/bfa/bfa_ioc.c bfa_sem_timer_start(ioc); ioc 783 drivers/scsi/bfa/bfa_ioc.c writel(1, ioc->ioc_regs.ioc_sem_reg); ioc 790 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(ioc, IOC_E_HWFAILED); ioc 794 drivers/scsi/bfa/bfa_ioc.c bfa_sem_timer_stop(ioc); ioc 796 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(ioc, IOC_E_DISABLED); ioc 800 drivers/scsi/bfa/bfa_ioc.c bfa_sem_timer_stop(ioc); ioc 805 drivers/scsi/bfa/bfa_ioc.c bfa_sm_fault(ioc, event); ioc 819 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_pf_fwmismatch(iocpf->ioc); ioc 822 drivers/scsi/bfa/bfa_ioc.c bfa_iocpf_timer_start(iocpf->ioc); ioc 831 drivers/scsi/bfa/bfa_ioc.c struct bfa_ioc_s *ioc = iocpf->ioc; ioc 833 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, event); ioc 841 drivers/scsi/bfa/bfa_ioc.c bfa_iocpf_timer_stop(ioc); ioc 843 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(ioc, IOC_E_DISABLED); ioc 847 drivers/scsi/bfa/bfa_ioc.c bfa_iocpf_timer_stop(ioc); ioc 852 drivers/scsi/bfa/bfa_ioc.c bfa_sm_fault(ioc, event); ioc 862 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_hw_sem_get(iocpf->ioc); ioc 871 drivers/scsi/bfa/bfa_ioc.c struct bfa_ioc_s *ioc = iocpf->ioc; ioc 873 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, event); ioc 877 drivers/scsi/bfa/bfa_ioc.c if (bfa_ioc_sync_complete(ioc)) { ioc 878 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_sync_join(ioc); ioc 881 drivers/scsi/bfa/bfa_ioc.c writel(1, ioc->ioc_regs.ioc_sem_reg); ioc 882 drivers/scsi/bfa/bfa_ioc.c bfa_sem_timer_start(ioc); ioc 888 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(ioc, IOC_E_HWFAILED); ioc 892 drivers/scsi/bfa/bfa_ioc.c bfa_sem_timer_stop(ioc); ioc 897 drivers/scsi/bfa/bfa_ioc.c bfa_sm_fault(ioc, event); ioc 905 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_hwinit(iocpf->ioc, BFA_FALSE); ioc 915 drivers/scsi/bfa/bfa_ioc.c struct bfa_ioc_s *ioc = iocpf->ioc; ioc 917 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, event); ioc 925 drivers/scsi/bfa/bfa_ioc.c writel(1, ioc->ioc_regs.ioc_sem_reg); ioc 926 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(ioc, IOC_E_PFFAILED); ioc 931 drivers/scsi/bfa/bfa_ioc.c bfa_iocpf_timer_stop(ioc); ioc 932 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_sync_leave(ioc); ioc 933 drivers/scsi/bfa/bfa_ioc.c writel(1, ioc->ioc_regs.ioc_sem_reg); ioc 938 drivers/scsi/bfa/bfa_ioc.c bfa_sm_fault(ioc, event); ioc 945 drivers/scsi/bfa/bfa_ioc.c bfa_iocpf_timer_start(iocpf->ioc); ioc 949 drivers/scsi/bfa/bfa_ioc.c iocpf->ioc->cbfn->reset_cbfn(iocpf->ioc->bfa); ioc 950 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_send_enable(iocpf->ioc); ioc 960 drivers/scsi/bfa/bfa_ioc.c struct bfa_ioc_s *ioc = iocpf->ioc; ioc 962 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, event); ioc 966 drivers/scsi/bfa/bfa_ioc.c bfa_iocpf_timer_stop(ioc); ioc 967 drivers/scsi/bfa/bfa_ioc.c writel(1, ioc->ioc_regs.ioc_sem_reg); ioc 972 drivers/scsi/bfa/bfa_ioc.c bfa_iocpf_timer_stop(ioc); ioc 976 drivers/scsi/bfa/bfa_ioc.c writel(1, ioc->ioc_regs.ioc_sem_reg); ioc 978 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(ioc, IOC_E_PFFAILED); ioc 983 drivers/scsi/bfa/bfa_ioc.c bfa_iocpf_timer_stop(ioc); ioc 984 drivers/scsi/bfa/bfa_ioc.c writel(1, ioc->ioc_regs.ioc_sem_reg); ioc 989 drivers/scsi/bfa/bfa_ioc.c bfa_sm_fault(ioc, event); ioc 996 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(iocpf->ioc, IOC_E_ENABLED); ioc 1002 drivers/scsi/bfa/bfa_ioc.c struct bfa_ioc_s *ioc = iocpf->ioc; ioc 1004 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, event); ioc 1020 drivers/scsi/bfa/bfa_ioc.c bfa_sm_fault(ioc, event); ioc 1027 drivers/scsi/bfa/bfa_ioc.c bfa_iocpf_timer_start(iocpf->ioc); ioc 1028 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_send_disable(iocpf->ioc); ioc 1037 drivers/scsi/bfa/bfa_ioc.c struct bfa_ioc_s *ioc = iocpf->ioc; ioc 1039 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, event); ioc 1043 drivers/scsi/bfa/bfa_ioc.c bfa_iocpf_timer_stop(ioc); ioc 1048 drivers/scsi/bfa/bfa_ioc.c bfa_iocpf_timer_stop(ioc); ioc 1052 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_set_cur_ioc_fwstate(ioc, BFI_IOC_FAIL); ioc 1060 drivers/scsi/bfa/bfa_ioc.c bfa_sm_fault(ioc, event); ioc 1067 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_hw_sem_get(iocpf->ioc); ioc 1076 drivers/scsi/bfa/bfa_ioc.c struct bfa_ioc_s *ioc = iocpf->ioc; ioc 1078 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, event); ioc 1082 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_sync_leave(ioc); ioc 1083 drivers/scsi/bfa/bfa_ioc.c writel(1, ioc->ioc_regs.ioc_sem_reg); ioc 1089 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(ioc, IOC_E_HWFAILED); ioc 1096 drivers/scsi/bfa/bfa_ioc.c bfa_sm_fault(ioc, event); ioc 1106 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_flush(iocpf->ioc); ioc 1107 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(iocpf->ioc, IOC_E_DISABLED); ioc 1113 drivers/scsi/bfa/bfa_ioc.c struct bfa_ioc_s *ioc = iocpf->ioc; ioc 1115 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, event); ioc 1123 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_firmware_unlock(ioc); ioc 1128 drivers/scsi/bfa/bfa_ioc.c bfa_sm_fault(ioc, event); ioc 1135 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_debug_save_ftrc(iocpf->ioc); ioc 1136 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_hw_sem_get(iocpf->ioc); ioc 1145 drivers/scsi/bfa/bfa_ioc.c struct bfa_ioc_s *ioc = iocpf->ioc; ioc 1147 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, event); ioc 1151 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_notify_fail(ioc); ioc 1152 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_sync_leave(ioc); ioc 1153 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_set_cur_ioc_fwstate(ioc, BFI_IOC_FAIL); ioc 1154 drivers/scsi/bfa/bfa_ioc.c writel(1, ioc->ioc_regs.ioc_sem_reg); ioc 1160 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(ioc, IOC_E_HWFAILED); ioc 1164 drivers/scsi/bfa/bfa_ioc.c bfa_sem_timer_stop(ioc); ioc 1169 drivers/scsi/bfa/bfa_ioc.c bfa_sem_timer_stop(ioc); ioc 1170 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_firmware_unlock(ioc); ioc 1178 drivers/scsi/bfa/bfa_ioc.c bfa_sm_fault(ioc, event); ioc 1185 drivers/scsi/bfa/bfa_ioc.c bfa_trc(iocpf->ioc, 0); ioc 1194 drivers/scsi/bfa/bfa_ioc.c struct bfa_ioc_s *ioc = iocpf->ioc; ioc 1196 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, event); ioc 1204 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_firmware_unlock(ioc); ioc 1209 drivers/scsi/bfa/bfa_ioc.c bfa_sm_fault(ioc, event); ioc 1219 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_lpu_stop(iocpf->ioc); ioc 1224 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_flush(iocpf->ioc); ioc 1226 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_hw_sem_get(iocpf->ioc); ioc 1232 drivers/scsi/bfa/bfa_ioc.c struct bfa_ioc_s *ioc = iocpf->ioc; ioc 1234 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, event); ioc 1238 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_sync_ack(ioc); ioc 1239 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_notify_fail(ioc); ioc 1241 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_sync_leave(ioc); ioc 1242 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_set_cur_ioc_fwstate(ioc, BFI_IOC_FAIL); ioc 1243 drivers/scsi/bfa/bfa_ioc.c writel(1, ioc->ioc_regs.ioc_sem_reg); ioc 1246 drivers/scsi/bfa/bfa_ioc.c if (bfa_ioc_sync_complete(ioc)) ioc 1249 drivers/scsi/bfa/bfa_ioc.c writel(1, ioc->ioc_regs.ioc_sem_reg); ioc 1257 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(ioc, IOC_E_HWFAILED); ioc 1261 drivers/scsi/bfa/bfa_ioc.c bfa_sem_timer_stop(ioc); ioc 1269 drivers/scsi/bfa/bfa_ioc.c bfa_sm_fault(ioc, event); ioc 1276 drivers/scsi/bfa/bfa_ioc.c bfa_trc(iocpf->ioc, 0); ioc 1285 drivers/scsi/bfa/bfa_ioc.c struct bfa_ioc_s *ioc = iocpf->ioc; ioc 1287 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, event); ioc 1295 drivers/scsi/bfa/bfa_ioc.c bfa_sm_fault(ioc, event); ioc 1307 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_event_notify(struct bfa_ioc_s *ioc, enum bfa_ioc_event_e event) ioc 1312 drivers/scsi/bfa/bfa_ioc.c list_for_each(qe, &ioc->notify_q) { ioc 1319 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_disable_comp(struct bfa_ioc_s *ioc) ioc 1321 drivers/scsi/bfa/bfa_ioc.c ioc->cbfn->disable_cbfn(ioc->bfa); ioc 1322 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_event_notify(ioc, BFA_IOC_E_DISABLED); ioc 1347 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_hw_sem_get(struct bfa_ioc_s *ioc) ioc 1355 drivers/scsi/bfa/bfa_ioc.c r32 = readl(ioc->ioc_regs.ioc_sem_reg); ioc 1358 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_SEM_ERROR); ioc 1362 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_SEMLOCKED); ioc 1366 drivers/scsi/bfa/bfa_ioc.c bfa_sem_timer_start(ioc); ioc 1373 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_lmem_init(struct bfa_ioc_s *ioc) ioc 1379 drivers/scsi/bfa/bfa_ioc.c pss_ctl = readl(ioc->ioc_regs.pss_ctl_reg); ioc 1387 drivers/scsi/bfa/bfa_ioc.c writel(pss_ctl, ioc->ioc_regs.pss_ctl_reg); ioc 1394 drivers/scsi/bfa/bfa_ioc.c pss_ctl = readl(ioc->ioc_regs.pss_ctl_reg); ioc 1403 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, pss_ctl); ioc 1406 drivers/scsi/bfa/bfa_ioc.c writel(pss_ctl, ioc->ioc_regs.pss_ctl_reg); ioc 1410 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_lpu_start(struct bfa_ioc_s *ioc) ioc 1417 drivers/scsi/bfa/bfa_ioc.c pss_ctl = readl(ioc->ioc_regs.pss_ctl_reg); ioc 1420 drivers/scsi/bfa/bfa_ioc.c writel(pss_ctl, ioc->ioc_regs.pss_ctl_reg); ioc 1424 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_lpu_stop(struct bfa_ioc_s *ioc) ioc 1431 drivers/scsi/bfa/bfa_ioc.c pss_ctl = readl(ioc->ioc_regs.pss_ctl_reg); ioc 1434 drivers/scsi/bfa/bfa_ioc.c writel(pss_ctl, ioc->ioc_regs.pss_ctl_reg); ioc 1441 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_fwver_get(struct bfa_ioc_s *ioc, struct bfi_ioc_image_hdr_s *fwhdr) ioc 1448 drivers/scsi/bfa/bfa_ioc.c pgnum = PSS_SMEM_PGNUM(ioc->ioc_regs.smem_pg0, loff); ioc 1450 drivers/scsi/bfa/bfa_ioc.c writel(pgnum, ioc->ioc_regs.host_page_num_fn); ioc 1455 drivers/scsi/bfa/bfa_ioc.c bfa_mem_read(ioc->ioc_regs.smem_page_start, loff); ioc 1464 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_fwver_cmp(struct bfa_ioc_s *ioc, ioc 1471 drivers/scsi/bfa/bfa_ioc.c bfa_cb_image_get_chunk(bfa_ioc_asic_gen(ioc), 0); ioc 1487 drivers/scsi/bfa/bfa_ioc.c smem_flash_cmp = bfa_ioc_flash_fwver_cmp(ioc, smem_fwhdr); ioc 1504 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_fwver_valid(struct bfa_ioc_s *ioc, u32 boot_env) ioc 1508 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_fwver_get(ioc, &fwhdr); ioc 1511 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, fwhdr.bootenv); ioc 1512 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, boot_env); ioc 1516 drivers/scsi/bfa/bfa_ioc.c return bfa_ioc_fwver_cmp(ioc, &fwhdr); ioc 1630 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_flash_img_get_chnk(struct bfa_ioc_s *ioc, u32 off, ioc 1633 drivers/scsi/bfa/bfa_ioc.c return bfa_flash_raw_read(ioc->pcidev.pci_bar_kva, ioc 1639 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_flash_fwver_cmp(struct bfa_ioc_s *ioc, ioc 1646 drivers/scsi/bfa/bfa_ioc.c status = bfa_ioc_flash_img_get_chnk(ioc, 0, fwimg); ioc 1662 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_fwsig_invalidate(struct bfa_ioc_s *ioc) ioc 1669 drivers/scsi/bfa/bfa_ioc.c ioc_fwstate = bfa_ioc_get_cur_ioc_fwstate(ioc); ioc 1673 drivers/scsi/bfa/bfa_ioc.c pgnum = PSS_SMEM_PGNUM(ioc->ioc_regs.smem_pg0, loff); ioc 1675 drivers/scsi/bfa/bfa_ioc.c writel(pgnum, ioc->ioc_regs.host_page_num_fn); ioc 1676 drivers/scsi/bfa/bfa_ioc.c bfa_mem_write(ioc->ioc_regs.smem_page_start, loff, BFA_IOC_FW_INV_SIGN); ioc 1685 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_msgflush(struct bfa_ioc_s *ioc) ioc 1689 drivers/scsi/bfa/bfa_ioc.c r32 = readl(ioc->ioc_regs.lpu_mbox_cmd); ioc 1691 drivers/scsi/bfa/bfa_ioc.c writel(1, ioc->ioc_regs.lpu_mbox_cmd); ioc 1695 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_hwinit(struct bfa_ioc_s *ioc, bfa_boolean_t force) ioc 1702 drivers/scsi/bfa/bfa_ioc.c ioc_fwstate = bfa_ioc_get_cur_ioc_fwstate(ioc); ioc 1707 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, ioc_fwstate); ioc 1716 drivers/scsi/bfa/bfa_ioc.c BFA_FALSE : bfa_ioc_fwver_valid(ioc, boot_env); ioc 1719 drivers/scsi/bfa/bfa_ioc.c if (bfa_ioc_boot(ioc, boot_type, boot_env) == BFA_STATUS_OK) ioc 1720 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_poll_fwinit(ioc); ioc 1729 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_poll_fwinit(ioc); ioc 1747 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_msgflush(ioc); ioc 1748 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_FWREADY); ioc 1755 drivers/scsi/bfa/bfa_ioc.c if (bfa_ioc_boot(ioc, boot_type, boot_env) == BFA_STATUS_OK) ioc 1756 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_poll_fwinit(ioc); ioc 1762 drivers/scsi/bfa/bfa_ioc.c struct bfa_ioc_s *ioc = (struct bfa_ioc_s *) ioc_arg; ioc 1764 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, 0); ioc 1765 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(ioc, IOC_E_TIMEOUT); ioc 1769 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_send(struct bfa_ioc_s *ioc, void *ioc_msg, int len) ioc 1774 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, msgp[0]); ioc 1775 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, len); ioc 1784 drivers/scsi/bfa/bfa_ioc.c ioc->ioc_regs.hfn_mbox + i * sizeof(u32)); ioc 1787 drivers/scsi/bfa/bfa_ioc.c writel(0, ioc->ioc_regs.hfn_mbox + i * sizeof(u32)); ioc 1792 drivers/scsi/bfa/bfa_ioc.c writel(1, ioc->ioc_regs.hfn_mbox_cmd); ioc 1793 drivers/scsi/bfa/bfa_ioc.c (void) readl(ioc->ioc_regs.hfn_mbox_cmd); ioc 1797 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_send_enable(struct bfa_ioc_s *ioc) ioc 1802 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_portid(ioc)); ioc 1803 drivers/scsi/bfa/bfa_ioc.c enable_req.clscode = cpu_to_be16(ioc->clscode); ioc 1806 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_send(ioc, &enable_req, sizeof(struct bfi_ioc_ctrl_req_s)); ioc 1810 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_send_disable(struct bfa_ioc_s *ioc) ioc 1815 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_portid(ioc)); ioc 1816 drivers/scsi/bfa/bfa_ioc.c disable_req.clscode = cpu_to_be16(ioc->clscode); ioc 1819 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_send(ioc, &disable_req, sizeof(struct bfi_ioc_ctrl_req_s)); ioc 1823 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_send_getattr(struct bfa_ioc_s *ioc) ioc 1828 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_portid(ioc)); ioc 1829 drivers/scsi/bfa/bfa_ioc.c bfa_dma_be_addr_set(attr_req.attr_addr, ioc->attr_dma.pa); ioc 1830 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_send(ioc, &attr_req, sizeof(attr_req)); ioc 1836 drivers/scsi/bfa/bfa_ioc.c struct bfa_ioc_s *ioc = cbarg; ioc 1839 drivers/scsi/bfa/bfa_ioc.c hb_count = readl(ioc->ioc_regs.heartbeat); ioc 1840 drivers/scsi/bfa/bfa_ioc.c if (ioc->hb_count == hb_count) { ioc 1841 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_recover(ioc); ioc 1844 drivers/scsi/bfa/bfa_ioc.c ioc->hb_count = hb_count; ioc 1847 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_poll(ioc); ioc 1848 drivers/scsi/bfa/bfa_ioc.c bfa_hb_timer_start(ioc); ioc 1852 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_hb_monitor(struct bfa_ioc_s *ioc) ioc 1854 drivers/scsi/bfa/bfa_ioc.c ioc->hb_count = readl(ioc->ioc_regs.heartbeat); ioc 1855 drivers/scsi/bfa/bfa_ioc.c bfa_hb_timer_start(ioc); ioc 1862 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_download_fw(struct bfa_ioc_s *ioc, u32 boot_type, ioc 1879 drivers/scsi/bfa/bfa_ioc.c status = bfa_ioc_flash_img_get_chnk(ioc, ioc 1886 drivers/scsi/bfa/bfa_ioc.c fwimg_size = bfa_cb_image_get_size(bfa_ioc_asic_gen(ioc)); ioc 1887 drivers/scsi/bfa/bfa_ioc.c fwimg = bfa_cb_image_get_chunk(bfa_ioc_asic_gen(ioc), ioc 1891 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, fwimg_size); ioc 1894 drivers/scsi/bfa/bfa_ioc.c pgnum = PSS_SMEM_PGNUM(ioc->ioc_regs.smem_pg0, loff); ioc 1897 drivers/scsi/bfa/bfa_ioc.c writel(pgnum, ioc->ioc_regs.host_page_num_fn); ioc 1906 drivers/scsi/bfa/bfa_ioc.c status = bfa_ioc_flash_img_get_chnk(ioc, ioc 1915 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_asic_gen(ioc), ioc 1923 drivers/scsi/bfa/bfa_ioc.c bfa_mem_write(ioc->ioc_regs.smem_page_start, loff, ioc 1934 drivers/scsi/bfa/bfa_ioc.c writel(pgnum, ioc->ioc_regs.host_page_num_fn); ioc 1938 drivers/scsi/bfa/bfa_ioc.c writel(PSS_SMEM_PGNUM(ioc->ioc_regs.smem_pg0, 0), ioc 1939 drivers/scsi/bfa/bfa_ioc.c ioc->ioc_regs.host_page_num_fn); ioc 1948 drivers/scsi/bfa/bfa_ioc.c asicmode = BFI_FWBOOT_DEVMODE(ioc->asic_gen, ioc->asic_mode, ioc 1949 drivers/scsi/bfa/bfa_ioc.c ioc->port0_mode, ioc->port1_mode); ioc 1950 drivers/scsi/bfa/bfa_ioc.c bfa_mem_write(ioc->ioc_regs.smem_page_start, BFI_FWBOOT_DEVMODE_OFF, ioc 1952 drivers/scsi/bfa/bfa_ioc.c bfa_mem_write(ioc->ioc_regs.smem_page_start, BFI_FWBOOT_TYPE_OFF, ioc 1954 drivers/scsi/bfa/bfa_ioc.c bfa_mem_write(ioc->ioc_regs.smem_page_start, BFI_FWBOOT_ENV_OFF, ioc 1964 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_getattr_reply(struct bfa_ioc_s *ioc) ioc 1966 drivers/scsi/bfa/bfa_ioc.c struct bfi_ioc_attr_s *attr = ioc->attr; ioc 1971 drivers/scsi/bfa/bfa_ioc.c ioc->fcmode = (attr->port_mode == BFI_PORT_MODE_FC); ioc 1974 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(ioc, IOC_E_FWRSP_GETATTR); ioc 1981 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_attach(struct bfa_ioc_s *ioc) ioc 1983 drivers/scsi/bfa/bfa_ioc.c struct bfa_ioc_mbox_mod_s *mod = &ioc->mbox_mod; ioc 1989 drivers/scsi/bfa/bfa_ioc.c mod->mbhdlr[mc].cbarg = ioc->bfa; ioc 1997 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_poll(struct bfa_ioc_s *ioc) ioc 1999 drivers/scsi/bfa/bfa_ioc.c struct bfa_ioc_mbox_mod_s *mod = &ioc->mbox_mod; ioc 2012 drivers/scsi/bfa/bfa_ioc.c stat = readl(ioc->ioc_regs.hfn_mbox_cmd); ioc 2020 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_send(ioc, cmd->msg, sizeof(cmd->msg)); ioc 2027 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_flush(struct bfa_ioc_s *ioc) ioc 2029 drivers/scsi/bfa/bfa_ioc.c struct bfa_ioc_mbox_mod_s *mod = &ioc->mbox_mod; ioc 2045 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_smem_read(struct bfa_ioc_s *ioc, void *tbuf, u32 soff, u32 sz) ioc 2052 drivers/scsi/bfa/bfa_ioc.c pgnum = PSS_SMEM_PGNUM(ioc->ioc_regs.smem_pg0, soff); ioc 2054 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, pgnum); ioc 2055 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, loff); ioc 2056 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, sz); ioc 2061 drivers/scsi/bfa/bfa_ioc.c if (BFA_FALSE == bfa_ioc_sem_get(ioc->ioc_regs.ioc_init_sem_reg)) { ioc 2062 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, 0); ioc 2066 drivers/scsi/bfa/bfa_ioc.c writel(pgnum, ioc->ioc_regs.host_page_num_fn); ioc 2069 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, len); ioc 2071 drivers/scsi/bfa/bfa_ioc.c r32 = bfa_mem_read(ioc->ioc_regs.smem_page_start, loff); ioc 2081 drivers/scsi/bfa/bfa_ioc.c writel(pgnum, ioc->ioc_regs.host_page_num_fn); ioc 2084 drivers/scsi/bfa/bfa_ioc.c writel(PSS_SMEM_PGNUM(ioc->ioc_regs.smem_pg0, 0), ioc 2085 drivers/scsi/bfa/bfa_ioc.c ioc->ioc_regs.host_page_num_fn); ioc 2089 drivers/scsi/bfa/bfa_ioc.c readl(ioc->ioc_regs.ioc_init_sem_reg); ioc 2090 drivers/scsi/bfa/bfa_ioc.c writel(1, ioc->ioc_regs.ioc_init_sem_reg); ioc 2092 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, pgnum); ioc 2104 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_smem_clr(struct bfa_ioc_s *ioc, u32 soff, u32 sz) ioc 2109 drivers/scsi/bfa/bfa_ioc.c pgnum = PSS_SMEM_PGNUM(ioc->ioc_regs.smem_pg0, soff); ioc 2111 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, pgnum); ioc 2112 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, loff); ioc 2113 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, sz); ioc 2118 drivers/scsi/bfa/bfa_ioc.c if (BFA_FALSE == bfa_ioc_sem_get(ioc->ioc_regs.ioc_init_sem_reg)) { ioc 2119 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, 0); ioc 2123 drivers/scsi/bfa/bfa_ioc.c writel(pgnum, ioc->ioc_regs.host_page_num_fn); ioc 2126 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, len); ioc 2128 drivers/scsi/bfa/bfa_ioc.c bfa_mem_write(ioc->ioc_regs.smem_page_start, loff, 0); ioc 2137 drivers/scsi/bfa/bfa_ioc.c writel(pgnum, ioc->ioc_regs.host_page_num_fn); ioc 2140 drivers/scsi/bfa/bfa_ioc.c writel(PSS_SMEM_PGNUM(ioc->ioc_regs.smem_pg0, 0), ioc 2141 drivers/scsi/bfa/bfa_ioc.c ioc->ioc_regs.host_page_num_fn); ioc 2146 drivers/scsi/bfa/bfa_ioc.c readl(ioc->ioc_regs.ioc_init_sem_reg); ioc 2147 drivers/scsi/bfa/bfa_ioc.c writel(1, ioc->ioc_regs.ioc_init_sem_reg); ioc 2148 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, pgnum); ioc 2153 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_fail_notify(struct bfa_ioc_s *ioc) ioc 2155 drivers/scsi/bfa/bfa_ioc.c struct bfad_s *bfad = (struct bfad_s *)ioc->bfa->bfad; ioc 2160 drivers/scsi/bfa/bfa_ioc.c ioc->cbfn->hbfail_cbfn(ioc->bfa); ioc 2161 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_event_notify(ioc, BFA_IOC_E_FAILED); ioc 2163 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_debug_save_ftrc(ioc); ioc 2167 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_aen_post(ioc, BFA_IOC_AEN_HBFAIL); ioc 2172 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_pf_fwmismatch(struct bfa_ioc_s *ioc) ioc 2174 drivers/scsi/bfa/bfa_ioc.c struct bfad_s *bfad = (struct bfad_s *)ioc->bfa->bfad; ioc 2178 drivers/scsi/bfa/bfa_ioc.c ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE); ioc 2182 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_aen_post(ioc, BFA_IOC_AEN_FWMISMATCH); ioc 2186 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_pll_init(struct bfa_ioc_s *ioc) ioc 2192 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_sem_get(ioc->ioc_regs.ioc_init_sem_reg); ioc 2194 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_pll_init_asic(ioc); ioc 2196 drivers/scsi/bfa/bfa_ioc.c ioc->pllinit = BFA_TRUE; ioc 2201 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_lmem_init(ioc); ioc 2206 drivers/scsi/bfa/bfa_ioc.c readl(ioc->ioc_regs.ioc_init_sem_reg); ioc 2207 drivers/scsi/bfa/bfa_ioc.c writel(1, ioc->ioc_regs.ioc_init_sem_reg); ioc 2217 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_boot(struct bfa_ioc_s *ioc, u32 boot_type, u32 boot_env) ioc 2221 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_stats(ioc, ioc_boots); ioc 2223 drivers/scsi/bfa/bfa_ioc.c if (bfa_ioc_pll_init(ioc) != BFA_STATUS_OK) ioc 2230 drivers/scsi/bfa/bfa_ioc.c bfa_cb_image_get_chunk(bfa_ioc_asic_gen(ioc), 0); ioc 2236 drivers/scsi/bfa/bfa_ioc.c if (bfa_ioc_flash_fwver_cmp(ioc, drv_fwhdr) == ioc 2245 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_set_cur_ioc_fwstate(ioc, BFI_IOC_MEMTEST); ioc 2246 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_set_alt_ioc_fwstate(ioc, BFI_IOC_MEMTEST); ioc 2248 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_set_cur_ioc_fwstate(ioc, BFI_IOC_INITING); ioc 2249 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_set_alt_ioc_fwstate(ioc, BFI_IOC_INITING); ioc 2252 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_msgflush(ioc); ioc 2253 drivers/scsi/bfa/bfa_ioc.c status = bfa_ioc_download_fw(ioc, boot_type, boot_env); ioc 2255 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_lpu_start(ioc); ioc 2258 drivers/scsi/bfa/bfa_ioc.c bfa_iocpf_timeout(ioc); ioc 2275 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_is_operational(struct bfa_ioc_s *ioc) ioc 2277 drivers/scsi/bfa/bfa_ioc.c return bfa_fsm_cmp_state(ioc, bfa_ioc_sm_op); ioc 2281 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_is_initialized(struct bfa_ioc_s *ioc) ioc 2283 drivers/scsi/bfa/bfa_ioc.c u32 r32 = bfa_ioc_get_cur_ioc_fwstate(ioc); ioc 2291 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_msgget(struct bfa_ioc_s *ioc, void *mbmsg) ioc 2297 drivers/scsi/bfa/bfa_ioc.c r32 = readl(ioc->ioc_regs.lpu_mbox_cmd); ioc 2306 drivers/scsi/bfa/bfa_ioc.c r32 = readl(ioc->ioc_regs.lpu_mbox + ioc 2314 drivers/scsi/bfa/bfa_ioc.c writel(1, ioc->ioc_regs.lpu_mbox_cmd); ioc 2315 drivers/scsi/bfa/bfa_ioc.c readl(ioc->ioc_regs.lpu_mbox_cmd); ioc 2321 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_isr(struct bfa_ioc_s *ioc, struct bfi_mbmsg_s *m) ioc 2324 drivers/scsi/bfa/bfa_ioc.c struct bfa_iocpf_s *iocpf = &ioc->iocpf; ioc 2328 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_stats(ioc, ioc_isrs); ioc 2335 drivers/scsi/bfa/bfa_ioc.c ioc->port_mode = ioc->port_mode_cfg = ioc 2337 drivers/scsi/bfa/bfa_ioc.c ioc->ad_cap_bm = msg->fw_event.cap_bm; ioc 2346 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_getattr_reply(ioc); ioc 2350 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, msg->mh.msg_id); ioc 2362 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_attach(struct bfa_ioc_s *ioc, void *bfa, struct bfa_ioc_cbfn_s *cbfn, ioc 2365 drivers/scsi/bfa/bfa_ioc.c ioc->bfa = bfa; ioc 2366 drivers/scsi/bfa/bfa_ioc.c ioc->cbfn = cbfn; ioc 2367 drivers/scsi/bfa/bfa_ioc.c ioc->timer_mod = timer_mod; ioc 2368 drivers/scsi/bfa/bfa_ioc.c ioc->fcmode = BFA_FALSE; ioc 2369 drivers/scsi/bfa/bfa_ioc.c ioc->pllinit = BFA_FALSE; ioc 2370 drivers/scsi/bfa/bfa_ioc.c ioc->dbg_fwsave_once = BFA_TRUE; ioc 2371 drivers/scsi/bfa/bfa_ioc.c ioc->iocpf.ioc = ioc; ioc 2373 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_attach(ioc); ioc 2374 drivers/scsi/bfa/bfa_ioc.c INIT_LIST_HEAD(&ioc->notify_q); ioc 2376 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_set_state(ioc, bfa_ioc_sm_uninit); ioc 2377 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(ioc, IOC_E_RESET); ioc 2384 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_detach(struct bfa_ioc_s *ioc) ioc 2386 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(ioc, IOC_E_DETACH); ioc 2387 drivers/scsi/bfa/bfa_ioc.c INIT_LIST_HEAD(&ioc->notify_q); ioc 2396 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_pci_init(struct bfa_ioc_s *ioc, struct bfa_pcidev_s *pcidev, ioc 2399 drivers/scsi/bfa/bfa_ioc.c ioc->clscode = clscode; ioc 2400 drivers/scsi/bfa/bfa_ioc.c ioc->pcidev = *pcidev; ioc 2405 drivers/scsi/bfa/bfa_ioc.c ioc->port0_mode = ioc->port1_mode = BFI_PORT_MODE_FC; ioc 2406 drivers/scsi/bfa/bfa_ioc.c ioc->asic_mode = BFI_ASIC_MODE_FC; ioc 2411 drivers/scsi/bfa/bfa_ioc.c ioc->asic_gen = BFI_ASIC_GEN_CB; ioc 2412 drivers/scsi/bfa/bfa_ioc.c ioc->fcmode = BFA_TRUE; ioc 2413 drivers/scsi/bfa/bfa_ioc.c ioc->port_mode = ioc->port_mode_cfg = BFA_MODE_HBA; ioc 2414 drivers/scsi/bfa/bfa_ioc.c ioc->ad_cap_bm = BFA_CM_HBA; ioc 2418 drivers/scsi/bfa/bfa_ioc.c ioc->asic_gen = BFI_ASIC_GEN_CT; ioc 2419 drivers/scsi/bfa/bfa_ioc.c ioc->port0_mode = ioc->port1_mode = BFI_PORT_MODE_ETH; ioc 2420 drivers/scsi/bfa/bfa_ioc.c ioc->asic_mode = BFI_ASIC_MODE_ETH; ioc 2421 drivers/scsi/bfa/bfa_ioc.c ioc->port_mode = ioc->port_mode_cfg = BFA_MODE_CNA; ioc 2422 drivers/scsi/bfa/bfa_ioc.c ioc->ad_cap_bm = BFA_CM_CNA; ioc 2426 drivers/scsi/bfa/bfa_ioc.c ioc->asic_gen = BFI_ASIC_GEN_CT; ioc 2427 drivers/scsi/bfa/bfa_ioc.c ioc->fcmode = BFA_TRUE; ioc 2428 drivers/scsi/bfa/bfa_ioc.c ioc->port_mode = ioc->port_mode_cfg = BFA_MODE_HBA; ioc 2429 drivers/scsi/bfa/bfa_ioc.c ioc->ad_cap_bm = BFA_CM_HBA; ioc 2434 drivers/scsi/bfa/bfa_ioc.c ioc->asic_gen = BFI_ASIC_GEN_CT2; ioc 2437 drivers/scsi/bfa/bfa_ioc.c ioc->asic_mode = BFI_ASIC_MODE_FC16; ioc 2438 drivers/scsi/bfa/bfa_ioc.c ioc->fcmode = BFA_TRUE; ioc 2439 drivers/scsi/bfa/bfa_ioc.c ioc->port_mode = ioc->port_mode_cfg = BFA_MODE_HBA; ioc 2440 drivers/scsi/bfa/bfa_ioc.c ioc->ad_cap_bm = BFA_CM_HBA; ioc 2442 drivers/scsi/bfa/bfa_ioc.c ioc->port0_mode = ioc->port1_mode = BFI_PORT_MODE_ETH; ioc 2443 drivers/scsi/bfa/bfa_ioc.c ioc->asic_mode = BFI_ASIC_MODE_ETH; ioc 2445 drivers/scsi/bfa/bfa_ioc.c ioc->port_mode = ioc 2446 drivers/scsi/bfa/bfa_ioc.c ioc->port_mode_cfg = BFA_MODE_CNA; ioc 2447 drivers/scsi/bfa/bfa_ioc.c ioc->ad_cap_bm = BFA_CM_CNA; ioc 2449 drivers/scsi/bfa/bfa_ioc.c ioc->port_mode = ioc 2450 drivers/scsi/bfa/bfa_ioc.c ioc->port_mode_cfg = BFA_MODE_NIC; ioc 2451 drivers/scsi/bfa/bfa_ioc.c ioc->ad_cap_bm = BFA_CM_NIC; ioc 2463 drivers/scsi/bfa/bfa_ioc.c if (ioc->asic_gen == BFI_ASIC_GEN_CB) ioc 2464 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_set_cb_hwif(ioc); ioc 2465 drivers/scsi/bfa/bfa_ioc.c else if (ioc->asic_gen == BFI_ASIC_GEN_CT) ioc 2466 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_set_ct_hwif(ioc); ioc 2468 drivers/scsi/bfa/bfa_ioc.c WARN_ON(ioc->asic_gen != BFI_ASIC_GEN_CT2); ioc 2469 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_set_ct2_hwif(ioc); ioc 2470 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_ct2_poweron(ioc); ioc 2473 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_map_port(ioc); ioc 2474 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_reg_init(ioc); ioc 2484 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mem_claim(struct bfa_ioc_s *ioc, u8 *dm_kva, u64 dm_pa) ioc 2489 drivers/scsi/bfa/bfa_ioc.c ioc->attr_dma.kva = dm_kva; ioc 2490 drivers/scsi/bfa/bfa_ioc.c ioc->attr_dma.pa = dm_pa; ioc 2491 drivers/scsi/bfa/bfa_ioc.c ioc->attr = (struct bfi_ioc_attr_s *) dm_kva; ioc 2495 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_enable(struct bfa_ioc_s *ioc) ioc 2497 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_stats(ioc, ioc_enables); ioc 2498 drivers/scsi/bfa/bfa_ioc.c ioc->dbg_fwsave_once = BFA_TRUE; ioc 2500 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(ioc, IOC_E_ENABLE); ioc 2504 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_disable(struct bfa_ioc_s *ioc) ioc 2506 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_stats(ioc, ioc_disables); ioc 2507 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(ioc, IOC_E_DISABLE); ioc 2511 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_suspend(struct bfa_ioc_s *ioc) ioc 2513 drivers/scsi/bfa/bfa_ioc.c ioc->dbg_fwsave_once = BFA_TRUE; ioc 2514 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(ioc, IOC_E_HWERROR); ioc 2522 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_debug_memclaim(struct bfa_ioc_s *ioc, void *dbg_fwsave) ioc 2524 drivers/scsi/bfa/bfa_ioc.c ioc->dbg_fwsave = dbg_fwsave; ioc 2525 drivers/scsi/bfa/bfa_ioc.c ioc->dbg_fwsave_len = BFA_DBG_FWTRC_LEN; ioc 2535 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_register(struct bfa_ioc_s *ioc, bfa_ioc_mbox_mcfunc_t *mcfuncs) ioc 2537 drivers/scsi/bfa/bfa_ioc.c struct bfa_ioc_mbox_mod_s *mod = &ioc->mbox_mod; ioc 2548 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_regisr(struct bfa_ioc_s *ioc, enum bfi_mclass mc, ioc 2551 drivers/scsi/bfa/bfa_ioc.c struct bfa_ioc_mbox_mod_s *mod = &ioc->mbox_mod; ioc 2565 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_queue(struct bfa_ioc_s *ioc, struct bfa_mbox_cmd_s *cmd) ioc 2567 drivers/scsi/bfa/bfa_ioc.c struct bfa_ioc_mbox_mod_s *mod = &ioc->mbox_mod; ioc 2581 drivers/scsi/bfa/bfa_ioc.c stat = readl(ioc->ioc_regs.hfn_mbox_cmd); ioc 2590 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_send(ioc, cmd->msg, sizeof(cmd->msg)); ioc 2597 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_isr(struct bfa_ioc_s *ioc) ioc 2599 drivers/scsi/bfa/bfa_ioc.c struct bfa_ioc_mbox_mod_s *mod = &ioc->mbox_mod; ioc 2603 drivers/scsi/bfa/bfa_ioc.c if (bfa_ioc_msgget(ioc, &m)) { ioc 2609 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_isr(ioc, &m); ioc 2619 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_lpu_read_stat(ioc); ioc 2624 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_poll(ioc); ioc 2628 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_error_isr(struct bfa_ioc_s *ioc) ioc 2630 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_stats(ioc, ioc_hbfails); ioc 2631 drivers/scsi/bfa/bfa_ioc.c ioc->stats.hb_count = ioc->hb_count; ioc 2632 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(ioc, IOC_E_HWERROR); ioc 2639 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_is_disabled(struct bfa_ioc_s *ioc) ioc 2641 drivers/scsi/bfa/bfa_ioc.c return bfa_fsm_cmp_state(ioc, bfa_ioc_sm_disabling) || ioc 2642 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_cmp_state(ioc, bfa_ioc_sm_disabled); ioc 2649 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_fw_mismatch(struct bfa_ioc_s *ioc) ioc 2651 drivers/scsi/bfa/bfa_ioc.c return bfa_fsm_cmp_state(ioc, bfa_ioc_sm_reset) || ioc 2652 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_cmp_state(&ioc->iocpf, bfa_iocpf_sm_fwcheck) || ioc 2653 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_cmp_state(&ioc->iocpf, bfa_iocpf_sm_mismatch); ioc 2661 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_adapter_is_disabled(struct bfa_ioc_s *ioc) ioc 2665 drivers/scsi/bfa/bfa_ioc.c if (!bfa_fsm_cmp_state(ioc, bfa_ioc_sm_disabled)) ioc 2668 drivers/scsi/bfa/bfa_ioc.c ioc_state = bfa_ioc_get_cur_ioc_fwstate(ioc); ioc 2672 drivers/scsi/bfa/bfa_ioc.c if (ioc->pcidev.device_id != BFA_PCI_DEVICE_ID_FC_8G1P) { ioc 2673 drivers/scsi/bfa/bfa_ioc.c ioc_state = bfa_ioc_get_cur_ioc_fwstate(ioc); ioc 2685 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_reset_fwstate(struct bfa_ioc_s *ioc) ioc 2687 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_set_cur_ioc_fwstate(ioc, BFI_IOC_UNINIT); ioc 2688 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_set_alt_ioc_fwstate(ioc, BFI_IOC_UNINIT); ioc 2693 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_get_adapter_attr(struct bfa_ioc_s *ioc, ioc 2698 drivers/scsi/bfa/bfa_ioc.c ioc_attr = ioc->attr; ioc 2700 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_get_adapter_serial_num(ioc, ad_attr->serial_num); ioc 2701 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_get_adapter_fw_ver(ioc, ad_attr->fw_ver); ioc 2702 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_get_adapter_optrom_ver(ioc, ad_attr->optrom_ver); ioc 2703 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_get_adapter_manufacturer(ioc, ad_attr->manufacturer); ioc 2707 drivers/scsi/bfa/bfa_ioc.c ad_attr->nports = bfa_ioc_get_nports(ioc); ioc 2708 drivers/scsi/bfa/bfa_ioc.c ad_attr->max_speed = bfa_ioc_speed_sup(ioc); ioc 2710 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_get_adapter_model(ioc, ad_attr->model); ioc 2712 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_get_adapter_model(ioc, ad_attr->model_descr); ioc 2722 drivers/scsi/bfa/bfa_ioc.c ad_attr->pwwn = ioc->attr->pwwn; ioc 2723 drivers/scsi/bfa/bfa_ioc.c ad_attr->mac = bfa_ioc_get_mac(ioc); ioc 2730 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_get_pci_chip_rev(ioc, ad_attr->hw_ver); ioc 2732 drivers/scsi/bfa/bfa_ioc.c ad_attr->cna_capable = bfa_ioc_is_cna(ioc); ioc 2734 drivers/scsi/bfa/bfa_ioc.c !bfa_ioc_is_cna(ioc) && !ad_attr->is_mezz; ioc 2742 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_get_type(struct bfa_ioc_s *ioc) ioc 2744 drivers/scsi/bfa/bfa_ioc.c if (ioc->clscode == BFI_PCIFN_CLASS_ETH) ioc 2747 drivers/scsi/bfa/bfa_ioc.c WARN_ON(ioc->clscode != BFI_PCIFN_CLASS_FC); ioc 2749 drivers/scsi/bfa/bfa_ioc.c return (ioc->attr->port_mode == BFI_PORT_MODE_FC) ioc 2754 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_get_adapter_serial_num(struct bfa_ioc_s *ioc, char *serial_num) ioc 2758 drivers/scsi/bfa/bfa_ioc.c (void *)ioc->attr->brcd_serialnum, ioc 2763 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_get_adapter_fw_ver(struct bfa_ioc_s *ioc, char *fw_ver) ioc 2766 drivers/scsi/bfa/bfa_ioc.c memcpy(fw_ver, ioc->attr->fw_version, BFA_VERSION_LEN); ioc 2770 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_get_pci_chip_rev(struct bfa_ioc_s *ioc, char *chip_rev) ioc 2780 drivers/scsi/bfa/bfa_ioc.c chip_rev[4] = ioc->attr->asic_rev; ioc 2785 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_get_adapter_optrom_ver(struct bfa_ioc_s *ioc, char *optrom_ver) ioc 2788 drivers/scsi/bfa/bfa_ioc.c memcpy(optrom_ver, ioc->attr->optrom_version, ioc 2793 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_get_adapter_manufacturer(struct bfa_ioc_s *ioc, char *manufacturer) ioc 2800 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_get_adapter_model(struct bfa_ioc_s *ioc, char *model) ioc 2803 drivers/scsi/bfa/bfa_ioc.c u8 nports = bfa_ioc_get_nports(ioc); ioc 2808 drivers/scsi/bfa/bfa_ioc.c ioc_attr = ioc->attr; ioc 2810 drivers/scsi/bfa/bfa_ioc.c if (bfa_asic_id_ct2(ioc->pcidev.device_id) && ioc 2820 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_get_state(struct bfa_ioc_s *ioc) ioc 2823 drivers/scsi/bfa/bfa_ioc.c enum bfa_ioc_state ioc_st = bfa_sm_to_state(ioc_sm_table, ioc->fsm); ioc 2828 drivers/scsi/bfa/bfa_ioc.c iocpf_st = bfa_sm_to_state(iocpf_sm_table, ioc->iocpf.fsm); ioc 2860 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_get_attr(struct bfa_ioc_s *ioc, struct bfa_ioc_attr_s *ioc_attr) ioc 2864 drivers/scsi/bfa/bfa_ioc.c ioc_attr->state = bfa_ioc_get_state(ioc); ioc 2865 drivers/scsi/bfa/bfa_ioc.c ioc_attr->port_id = bfa_ioc_portid(ioc); ioc 2866 drivers/scsi/bfa/bfa_ioc.c ioc_attr->port_mode = ioc->port_mode; ioc 2867 drivers/scsi/bfa/bfa_ioc.c ioc_attr->port_mode_cfg = ioc->port_mode_cfg; ioc 2868 drivers/scsi/bfa/bfa_ioc.c ioc_attr->cap_bm = ioc->ad_cap_bm; ioc 2870 drivers/scsi/bfa/bfa_ioc.c ioc_attr->ioc_type = bfa_ioc_get_type(ioc); ioc 2872 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_get_adapter_attr(ioc, &ioc_attr->adapter_attr); ioc 2874 drivers/scsi/bfa/bfa_ioc.c ioc_attr->pci_attr.device_id = bfa_ioc_devid(ioc); ioc 2875 drivers/scsi/bfa/bfa_ioc.c ioc_attr->pci_attr.pcifn = bfa_ioc_pcifn(ioc); ioc 2876 drivers/scsi/bfa/bfa_ioc.c ioc_attr->def_fn = (bfa_ioc_pcifn(ioc) == bfa_ioc_portid(ioc)); ioc 2877 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_get_pci_chip_rev(ioc, ioc_attr->pci_attr.chip_rev); ioc 2881 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_get_mac(struct bfa_ioc_s *ioc) ioc 2886 drivers/scsi/bfa/bfa_ioc.c if (bfa_ioc_get_type(ioc) == BFA_IOC_TYPE_FCoE) ioc 2887 drivers/scsi/bfa/bfa_ioc.c return ioc->attr->fcoe_mac; ioc 2889 drivers/scsi/bfa/bfa_ioc.c return ioc->attr->mac; ioc 2893 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_get_mfg_mac(struct bfa_ioc_s *ioc) ioc 2897 drivers/scsi/bfa/bfa_ioc.c m = ioc->attr->mfg_mac; ioc 2898 drivers/scsi/bfa/bfa_ioc.c if (bfa_mfg_is_old_wwn_mac_model(ioc->attr->card_type)) ioc 2899 drivers/scsi/bfa/bfa_ioc.c m.mac[MAC_ADDRLEN - 1] += bfa_ioc_pcifn(ioc); ioc 2902 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_pcifn(ioc)); ioc 2911 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_aen_post(struct bfa_ioc_s *ioc, enum bfa_ioc_aen_event event) ioc 2913 drivers/scsi/bfa/bfa_ioc.c struct bfad_s *bfad = (struct bfad_s *)ioc->bfa->bfad; ioc 2921 drivers/scsi/bfa/bfa_ioc.c ioc_type = bfa_ioc_get_type(ioc); ioc 2924 drivers/scsi/bfa/bfa_ioc.c aen_entry->aen_data.ioc.pwwn = ioc->attr->pwwn; ioc 2927 drivers/scsi/bfa/bfa_ioc.c aen_entry->aen_data.ioc.pwwn = ioc->attr->pwwn; ioc 2928 drivers/scsi/bfa/bfa_ioc.c aen_entry->aen_data.ioc.mac = bfa_ioc_get_mac(ioc); ioc 2931 drivers/scsi/bfa/bfa_ioc.c aen_entry->aen_data.ioc.mac = bfa_ioc_get_mac(ioc); ioc 2939 drivers/scsi/bfa/bfa_ioc.c aen_entry->aen_data.ioc.ioc_type = ioc_type; ioc 2940 drivers/scsi/bfa/bfa_ioc.c bfad_im_post_vendor_event(aen_entry, bfad, ++ioc->ioc_aen_seq, ioc 2948 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_debug_fwsave(struct bfa_ioc_s *ioc, void *trcdata, int *trclen) ioc 2952 drivers/scsi/bfa/bfa_ioc.c if (ioc->dbg_fwsave_len == 0) ioc 2956 drivers/scsi/bfa/bfa_ioc.c if (tlen > ioc->dbg_fwsave_len) ioc 2957 drivers/scsi/bfa/bfa_ioc.c tlen = ioc->dbg_fwsave_len; ioc 2959 drivers/scsi/bfa/bfa_ioc.c memcpy(trcdata, ioc->dbg_fwsave, tlen); ioc 2969 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_debug_fwtrc(struct bfa_ioc_s *ioc, void *trcdata, int *trclen) ioc 2971 drivers/scsi/bfa/bfa_ioc.c u32 loff = BFA_DBG_FWTRC_OFF(bfa_ioc_portid(ioc)); ioc 2975 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, *trclen); ioc 2981 drivers/scsi/bfa/bfa_ioc.c status = bfa_ioc_smem_read(ioc, trcdata, loff, tlen); ioc 2987 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_send_fwsync(struct bfa_ioc_s *ioc) ioc 2993 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_portid(ioc)); ioc 2994 drivers/scsi/bfa/bfa_ioc.c req->clscode = cpu_to_be16(ioc->clscode); ioc 2995 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_queue(ioc, &cmd); ioc 2999 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_fwsync(struct bfa_ioc_s *ioc) ioc 3003 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_send_fwsync(ioc); ioc 3016 drivers/scsi/bfa/bfa_ioc.c while (bfa_ioc_mbox_cmd_pending(ioc) && fwsync_iter > 0) ioc 3024 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_debug_fwcore(struct bfa_ioc_s *ioc, void *buf, ioc 3030 drivers/scsi/bfa/bfa_ioc.c u32 smem_len = BFA_IOC_FW_SMEM_SIZE(ioc); ioc 3045 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_fwsync(ioc); ioc 3050 drivers/scsi/bfa/bfa_ioc.c status = bfa_ioc_smem_read(ioc, buf, loff, dlen); ioc 3071 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_fw_stats_get(struct bfa_ioc_s *ioc, void *stats) ioc 3074 drivers/scsi/bfa/bfa_ioc.c BFI_IOC_FWSTATS_SZ * (bfa_ioc_portid(ioc)); ioc 3078 drivers/scsi/bfa/bfa_ioc.c if (ioc->stats_busy) { ioc 3079 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, ioc->stats_busy); ioc 3082 drivers/scsi/bfa/bfa_ioc.c ioc->stats_busy = BFA_TRUE; ioc 3085 drivers/scsi/bfa/bfa_ioc.c status = bfa_ioc_smem_read(ioc, stats, loff, tlen); ioc 3087 drivers/scsi/bfa/bfa_ioc.c ioc->stats_busy = BFA_FALSE; ioc 3092 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_fw_stats_clear(struct bfa_ioc_s *ioc) ioc 3095 drivers/scsi/bfa/bfa_ioc.c BFI_IOC_FWSTATS_SZ * (bfa_ioc_portid(ioc)); ioc 3099 drivers/scsi/bfa/bfa_ioc.c if (ioc->stats_busy) { ioc 3100 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, ioc->stats_busy); ioc 3103 drivers/scsi/bfa/bfa_ioc.c ioc->stats_busy = BFA_TRUE; ioc 3106 drivers/scsi/bfa/bfa_ioc.c status = bfa_ioc_smem_clr(ioc, loff, tlen); ioc 3108 drivers/scsi/bfa/bfa_ioc.c ioc->stats_busy = BFA_FALSE; ioc 3116 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_debug_save_ftrc(struct bfa_ioc_s *ioc) ioc 3120 drivers/scsi/bfa/bfa_ioc.c if (ioc->dbg_fwsave_once) { ioc 3121 drivers/scsi/bfa/bfa_ioc.c ioc->dbg_fwsave_once = BFA_FALSE; ioc 3122 drivers/scsi/bfa/bfa_ioc.c if (ioc->dbg_fwsave_len) { ioc 3123 drivers/scsi/bfa/bfa_ioc.c tlen = ioc->dbg_fwsave_len; ioc 3124 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_debug_fwtrc(ioc, ioc->dbg_fwsave, &tlen); ioc 3133 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_recover(struct bfa_ioc_s *ioc) ioc 3135 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_stats(ioc, ioc_hbfails); ioc 3136 drivers/scsi/bfa/bfa_ioc.c ioc->stats.hb_count = ioc->hb_count; ioc 3137 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(ioc, IOC_E_HBFAIL); ioc 3146 drivers/scsi/bfa/bfa_ioc.c struct bfa_ioc_s *ioc = (struct bfa_ioc_s *) ioc_arg; ioc 3148 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, 0); ioc 3149 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_TIMEOUT); ioc 3155 drivers/scsi/bfa/bfa_ioc.c struct bfa_ioc_s *ioc = (struct bfa_ioc_s *) ioc_arg; ioc 3157 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_hw_sem_get(ioc); ioc 3161 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_poll_fwinit(struct bfa_ioc_s *ioc) ioc 3163 drivers/scsi/bfa/bfa_ioc.c u32 fwstate = bfa_ioc_get_cur_ioc_fwstate(ioc); ioc 3165 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ioc, fwstate); ioc 3168 drivers/scsi/bfa/bfa_ioc.c bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_FWREADY); ioc 3172 drivers/scsi/bfa/bfa_ioc.c if (ioc->iocpf.poll_time >= (3 * BFA_IOC_TOV)) ioc 3173 drivers/scsi/bfa/bfa_ioc.c bfa_iocpf_timeout(ioc); ioc 3175 drivers/scsi/bfa/bfa_ioc.c ioc->iocpf.poll_time += BFA_IOC_POLL_TOV; ioc 3176 drivers/scsi/bfa/bfa_ioc.c bfa_iocpf_poll_timer_start(ioc); ioc 3183 drivers/scsi/bfa/bfa_ioc.c struct bfa_ioc_s *ioc = (struct bfa_ioc_s *) ioc_arg; ioc 3185 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_poll_fwinit(ioc); ioc 3291 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ablk->ioc, msg->mh.msg_id); ioc 3306 drivers/scsi/bfa/bfa_ioc.c ablk->ioc->port_mode_cfg = rsp->port_mode; ioc 3337 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ablk->ioc, event); ioc 3376 drivers/scsi/bfa/bfa_ioc.c bfa_ablk_attach(struct bfa_ablk_s *ablk, struct bfa_ioc_s *ioc) ioc 3378 drivers/scsi/bfa/bfa_ioc.c ablk->ioc = ioc; ioc 3380 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_regisr(ablk->ioc, BFI_MC_ABLK, bfa_ablk_isr, ablk); ioc 3383 drivers/scsi/bfa/bfa_ioc.c list_add_tail(&ablk->ioc_notify.qe, &ablk->ioc->notify_q); ioc 3394 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(ablk->ioc)) { ioc 3395 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ablk->ioc, BFA_STATUS_IOC_FAILURE); ioc 3400 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ablk->ioc, BFA_STATUS_DEVBUSY); ioc 3411 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_portid(ablk->ioc)); ioc 3413 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_queue(ablk->ioc, &ablk->mb); ioc 3426 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(ablk->ioc)) { ioc 3427 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ablk->ioc, BFA_STATUS_IOC_FAILURE); ioc 3432 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ablk->ioc, BFA_STATUS_DEVBUSY); ioc 3443 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_portid(ablk->ioc)); ioc 3448 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_queue(ablk->ioc, &ablk->mb); ioc 3459 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(ablk->ioc)) { ioc 3460 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ablk->ioc, BFA_STATUS_IOC_FAILURE); ioc 3465 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ablk->ioc, BFA_STATUS_DEVBUSY); ioc 3475 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_portid(ablk->ioc)); ioc 3477 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_queue(ablk->ioc, &ablk->mb); ioc 3488 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(ablk->ioc)) { ioc 3489 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ablk->ioc, BFA_STATUS_IOC_FAILURE); ioc 3494 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ablk->ioc, BFA_STATUS_DEVBUSY); ioc 3504 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_portid(ablk->ioc)); ioc 3508 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_queue(ablk->ioc, &ablk->mb); ioc 3519 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(ablk->ioc)) { ioc 3520 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ablk->ioc, BFA_STATUS_IOC_FAILURE); ioc 3525 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ablk->ioc, BFA_STATUS_DEVBUSY); ioc 3535 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_portid(ablk->ioc)); ioc 3540 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_queue(ablk->ioc, &ablk->mb); ioc 3551 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(ablk->ioc)) { ioc 3552 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ablk->ioc, BFA_STATUS_IOC_FAILURE); ioc 3557 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ablk->ioc, BFA_STATUS_DEVBUSY); ioc 3567 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_portid(ablk->ioc)); ioc 3571 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_queue(ablk->ioc, &ablk->mb); ioc 3581 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(ablk->ioc)) { ioc 3582 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ablk->ioc, BFA_STATUS_IOC_FAILURE); ioc 3587 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ablk->ioc, BFA_STATUS_DEVBUSY); ioc 3597 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_portid(ablk->ioc)); ioc 3598 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_queue(ablk->ioc, &ablk->mb); ioc 3608 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(ablk->ioc)) { ioc 3609 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ablk->ioc, BFA_STATUS_IOC_FAILURE); ioc 3614 drivers/scsi/bfa/bfa_ioc.c bfa_trc(ablk->ioc, BFA_STATUS_DEVBUSY); ioc 3624 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_portid(ablk->ioc)); ioc 3625 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_queue(ablk->ioc, &ablk->mb); ioc 3711 drivers/scsi/bfa/bfa_ioc.c struct bfad_s *bfad = (struct bfad_s *)sfp->ioc->bfa->bfad; ioc 3722 drivers/scsi/bfa/bfa_ioc.c aen_entry->aen_data.port.ioc_type = bfa_ioc_get_type(sfp->ioc); ioc 3723 drivers/scsi/bfa/bfa_ioc.c aen_entry->aen_data.port.pwwn = sfp->ioc->attr->pwwn; ioc 3724 drivers/scsi/bfa/bfa_ioc.c aen_entry->aen_data.port.mac = bfa_ioc_get_mac(sfp->ioc); ioc 3749 drivers/scsi/bfa/bfa_ioc.c bfad_im_post_vendor_event(aen_entry, bfad, ++sfp->ioc->ioc_aen_seq, ioc 3765 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_portid(sfp->ioc)); ioc 3768 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_queue(sfp->ioc, &sfp->mbcmd); ioc 4022 drivers/scsi/bfa/bfa_ioc.c bfa_sfp_attach(struct bfa_sfp_s *sfp, struct bfa_ioc_s *ioc, void *dev, ioc 4026 drivers/scsi/bfa/bfa_ioc.c sfp->ioc = ioc; ioc 4042 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_regisr(sfp->ioc, BFI_MC_SFP, bfa_sfp_intr, sfp); ioc 4045 drivers/scsi/bfa/bfa_ioc.c list_add_tail(&sfp->ioc_notify.qe, &sfp->ioc->notify_q); ioc 4075 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(sfp->ioc)) { ioc 4105 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(sfp->ioc)) { ioc 4140 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(sfp->ioc)) ioc 4144 drivers/scsi/bfa/bfa_ioc.c if (bfa_mfg_is_mezz(sfp->ioc->attr->card_type)) ioc 4193 drivers/scsi/bfa/bfa_ioc.c bfa_flash_aen_audit_post(struct bfa_ioc_s *ioc, enum bfa_audit_aen_event event, ioc 4196 drivers/scsi/bfa/bfa_ioc.c struct bfad_s *bfad = (struct bfad_s *)ioc->bfa->bfad; ioc 4203 drivers/scsi/bfa/bfa_ioc.c aen_entry->aen_data.audit.pwwn = ioc->attr->pwwn; ioc 4208 drivers/scsi/bfa/bfa_ioc.c bfad_im_post_vendor_event(aen_entry, bfad, ++ioc->ioc_aen_seq, ioc 4254 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_portid(flash->ioc)); ioc 4257 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_queue(flash->ioc, &flash->mb); ioc 4283 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_portid(flash->ioc)); ioc 4286 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_queue(flash->ioc, &flash->mb); ioc 4312 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_portid(flash->ioc)); ioc 4314 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_queue(flash->ioc, &flash->mb); ioc 4332 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_portid(flash->ioc)); ioc 4333 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_queue(flash->ioc, &flash->mb); ioc 4442 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_aen_post(flash->ioc, BFA_IOC_AEN_FWCFG_ERROR); ioc 4447 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_aen_post(flash->ioc, ioc 4481 drivers/scsi/bfa/bfa_ioc.c bfa_flash_attach(struct bfa_flash_s *flash, struct bfa_ioc_s *ioc, void *dev, ioc 4484 drivers/scsi/bfa/bfa_ioc.c flash->ioc = ioc; ioc 4490 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_regisr(flash->ioc, BFI_MC_FLASH, bfa_flash_intr, flash); ioc 4493 drivers/scsi/bfa/bfa_ioc.c list_add_tail(&flash->ioc_notify.qe, &flash->ioc->notify_q); ioc 4540 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(flash->ioc)) ioc 4576 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(flash->ioc)) ioc 4591 drivers/scsi/bfa/bfa_ioc.c bfa_flash_aen_audit_post(flash->ioc, BFA_AUDIT_AEN_FLASH_ERASE, ioc 4621 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(flash->ioc)) ioc 4678 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(flash->ioc)) ioc 4763 drivers/scsi/bfa/bfa_ioc.c struct bfa_ioc_s *ioc = diag->ioc; ioc 4768 drivers/scsi/bfa/bfa_ioc.c pgnum = PSS_SMEM_PGNUM(ioc->ioc_regs.smem_pg0, loff); ioc 4771 drivers/scsi/bfa/bfa_ioc.c writel(pgnum, ioc->ioc_regs.host_page_num_fn); ioc 4777 drivers/scsi/bfa/bfa_ioc.c bfa_mem_read(ioc->ioc_regs.smem_page_start, loff); ioc 4782 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_reset_fwstate(ioc); ioc 4841 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_portid(diag->ioc)); ioc 4844 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_queue(diag->ioc, &diag->fwping.mbcmd); ioc 4912 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_portid(diag->ioc)); ioc 4914 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_queue(diag->ioc, &diag->tsensor.mbcmd); ioc 4967 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_portid(diag->ioc)); ioc 4983 drivers/scsi/bfa/bfa_ioc.c msg->portid = bfa_ioc_portid(diag->ioc); ioc 4988 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_queue(diag->ioc, &diag->ledtest.mbcmd); ioc 5010 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_portid(diag->ioc)); ioc 5014 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_queue(diag->ioc, &diag->beacon.mbcmd); ioc 5074 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_adapter_is_disabled(diag->ioc)) ioc 5089 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_boot(diag->ioc, BFI_FWBOOT_TYPE_MEMTEST, BFI_FWBOOT_ENV_OS); ioc 5091 drivers/scsi/bfa/bfa_ioc.c memtest_tov = (bfa_ioc_asic_gen(diag->ioc) == BFI_ASIC_GEN_CT2) ? ioc 5093 drivers/scsi/bfa/bfa_ioc.c bfa_timer_begin(diag->ioc->timer_mod, &diag->timer, ioc 5119 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(diag->ioc)) ioc 5122 drivers/scsi/bfa/bfa_ioc.c if (bfa_asic_id_ct2(bfa_ioc_devid((diag->ioc))) && ioc 5123 drivers/scsi/bfa/bfa_ioc.c ((diag->ioc)->clscode == BFI_PCIFN_CLASS_ETH)) ioc 5172 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(diag->ioc)) ioc 5201 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(diag->ioc)) ioc 5235 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(diag->ioc)) ioc 5268 drivers/scsi/bfa/bfa_ioc.c bfa_diag_attach(struct bfa_diag_s *diag, struct bfa_ioc_s *ioc, void *dev, ioc 5272 drivers/scsi/bfa/bfa_ioc.c diag->ioc = ioc; ioc 5281 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_regisr(diag->ioc, BFI_MC_DIAG, bfa_diag_intr, diag); ioc 5284 drivers/scsi/bfa/bfa_ioc.c list_add_tail(&diag->ioc_notify.qe, &diag->ioc->notify_q); ioc 5313 drivers/scsi/bfa/bfa_ioc.c return (phy->ioc->attr->card_type == BFA_MFG_TYPE_LIGHTNING); ioc 5352 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_portid(phy->ioc)); ioc 5354 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_queue(phy->ioc, &phy->mb); ioc 5382 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_portid(phy->ioc)); ioc 5391 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_queue(phy->ioc, &phy->mb); ioc 5416 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_portid(phy->ioc)); ioc 5418 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_queue(phy->ioc, &phy->mb); ioc 5435 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_portid(phy->ioc)); ioc 5437 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_queue(phy->ioc, &phy->mb); ioc 5465 drivers/scsi/bfa/bfa_ioc.c bfa_phy_attach(struct bfa_phy_s *phy, struct bfa_ioc_s *ioc, void *dev, ioc 5468 drivers/scsi/bfa/bfa_ioc.c phy->ioc = ioc; ioc 5474 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_regisr(phy->ioc, BFI_MC_PHY, bfa_phy_intr, phy); ioc 5477 drivers/scsi/bfa/bfa_ioc.c list_add_tail(&phy->ioc_notify.qe, &phy->ioc->notify_q); ioc 5509 drivers/scsi/bfa/bfa_ioc.c bfa_phy_busy(struct bfa_ioc_s *ioc) ioc 5513 drivers/scsi/bfa/bfa_ioc.c rb = bfa_ioc_bar0(ioc); ioc 5537 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(phy->ioc)) ioc 5540 drivers/scsi/bfa/bfa_ioc.c if (phy->op_busy || bfa_phy_busy(phy->ioc)) { ioc 5577 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(phy->ioc)) ioc 5580 drivers/scsi/bfa/bfa_ioc.c if (phy->op_busy || bfa_phy_busy(phy->ioc)) { ioc 5621 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(phy->ioc)) ioc 5628 drivers/scsi/bfa/bfa_ioc.c if (phy->op_busy || bfa_phy_busy(phy->ioc)) { ioc 5672 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(phy->ioc)) ioc 5679 drivers/scsi/bfa/bfa_ioc.c if (phy->op_busy || bfa_phy_busy(phy->ioc)) { ioc 5906 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_suspend(&dconf->bfa->ioc); ioc 6082 drivers/scsi/bfa/bfa_ioc.c dconf->instance = bfa->ioc.port_id; ioc 6238 drivers/scsi/bfa/bfa_ioc.c bfi_h2i_set(msg->mh, BFI_MC_FRU, msg_type, bfa_ioc_portid(fru->ioc)); ioc 6242 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_queue(fru->ioc, &fru->mb); ioc 6265 drivers/scsi/bfa/bfa_ioc.c bfi_h2i_set(msg->mh, BFI_MC_FRU, msg_type, bfa_ioc_portid(fru->ioc)); ioc 6267 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_queue(fru->ioc, &fru->mb); ioc 6295 drivers/scsi/bfa/bfa_ioc.c bfa_fru_attach(struct bfa_fru_s *fru, struct bfa_ioc_s *ioc, void *dev, ioc 6298 drivers/scsi/bfa/bfa_ioc.c fru->ioc = ioc; ioc 6304 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_regisr(fru->ioc, BFI_MC_FRU, bfa_fru_intr, fru); ioc 6307 drivers/scsi/bfa/bfa_ioc.c list_add_tail(&fru->ioc_notify.qe, &fru->ioc->notify_q); ioc 6358 drivers/scsi/bfa/bfa_ioc.c if (fru->ioc->asic_gen != BFI_ASIC_GEN_CT2 && ioc 6359 drivers/scsi/bfa/bfa_ioc.c fru->ioc->attr->card_type != BFA_MFG_TYPE_CHINOOK2) ioc 6362 drivers/scsi/bfa/bfa_ioc.c if (fru->ioc->attr->card_type != BFA_MFG_TYPE_CHINOOK) ioc 6365 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(fru->ioc)) ioc 6408 drivers/scsi/bfa/bfa_ioc.c if (fru->ioc->asic_gen != BFI_ASIC_GEN_CT2) ioc 6411 drivers/scsi/bfa/bfa_ioc.c if (fru->ioc->attr->card_type != BFA_MFG_TYPE_CHINOOK && ioc 6412 drivers/scsi/bfa/bfa_ioc.c fru->ioc->attr->card_type != BFA_MFG_TYPE_CHINOOK2) ioc 6415 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(fru->ioc)) ioc 6447 drivers/scsi/bfa/bfa_ioc.c if (fru->ioc->asic_gen != BFI_ASIC_GEN_CT2) ioc 6450 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(fru->ioc)) ioc 6453 drivers/scsi/bfa/bfa_ioc.c if (fru->ioc->attr->card_type == BFA_MFG_TYPE_CHINOOK || ioc 6454 drivers/scsi/bfa/bfa_ioc.c fru->ioc->attr->card_type == BFA_MFG_TYPE_CHINOOK2) ioc 6481 drivers/scsi/bfa/bfa_ioc.c if (fru->ioc->asic_gen != BFI_ASIC_GEN_CT2) ioc 6484 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(fru->ioc)) ioc 6526 drivers/scsi/bfa/bfa_ioc.c if (fru->ioc->asic_gen != BFI_ASIC_GEN_CT2) ioc 6529 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(fru->ioc)) ioc 287 drivers/scsi/bfa/bfa_ioc.h struct bfa_ioc_s *ioc; ioc 332 drivers/scsi/bfa/bfa_ioc.h bfa_boolean_t (*ioc_firmware_lock) (struct bfa_ioc_s *ioc); ioc 333 drivers/scsi/bfa/bfa_ioc.h void (*ioc_firmware_unlock) (struct bfa_ioc_s *ioc); ioc 334 drivers/scsi/bfa/bfa_ioc.h void (*ioc_reg_init) (struct bfa_ioc_s *ioc); ioc 335 drivers/scsi/bfa/bfa_ioc.h void (*ioc_map_port) (struct bfa_ioc_s *ioc); ioc 336 drivers/scsi/bfa/bfa_ioc.h void (*ioc_isr_mode_set) (struct bfa_ioc_s *ioc, ioc 338 drivers/scsi/bfa/bfa_ioc.h void (*ioc_notify_fail) (struct bfa_ioc_s *ioc); ioc 339 drivers/scsi/bfa/bfa_ioc.h void (*ioc_ownership_reset) (struct bfa_ioc_s *ioc); ioc 340 drivers/scsi/bfa/bfa_ioc.h bfa_boolean_t (*ioc_sync_start) (struct bfa_ioc_s *ioc); ioc 341 drivers/scsi/bfa/bfa_ioc.h void (*ioc_sync_join) (struct bfa_ioc_s *ioc); ioc 342 drivers/scsi/bfa/bfa_ioc.h void (*ioc_sync_leave) (struct bfa_ioc_s *ioc); ioc 343 drivers/scsi/bfa/bfa_ioc.h void (*ioc_sync_ack) (struct bfa_ioc_s *ioc); ioc 344 drivers/scsi/bfa/bfa_ioc.h bfa_boolean_t (*ioc_sync_complete) (struct bfa_ioc_s *ioc); ioc 345 drivers/scsi/bfa/bfa_ioc.h bfa_boolean_t (*ioc_lpu_read_stat) (struct bfa_ioc_s *ioc); ioc 346 drivers/scsi/bfa/bfa_ioc.h void (*ioc_set_fwstate) (struct bfa_ioc_s *ioc, ioc 348 drivers/scsi/bfa/bfa_ioc.h enum bfi_ioc_state (*ioc_get_fwstate) (struct bfa_ioc_s *ioc); ioc 349 drivers/scsi/bfa/bfa_ioc.h void (*ioc_set_alt_fwstate) (struct bfa_ioc_s *ioc, ioc 351 drivers/scsi/bfa/bfa_ioc.h enum bfi_ioc_state (*ioc_get_alt_fwstate) (struct bfa_ioc_s *ioc); ioc 401 drivers/scsi/bfa/bfa_ioc.h struct bfa_ioc_s *ioc; ioc 421 drivers/scsi/bfa/bfa_ioc.h struct bfa_ioc_s *ioc; ioc 449 drivers/scsi/bfa/bfa_ioc.h void bfa_sfp_attach(struct bfa_sfp_s *sfp, struct bfa_ioc_s *ioc, ioc 472 drivers/scsi/bfa/bfa_ioc.h struct bfa_ioc_s *ioc; /* back pointer to ioc */ ioc 511 drivers/scsi/bfa/bfa_ioc.h void bfa_flash_attach(struct bfa_flash_s *flash, struct bfa_ioc_s *ioc, ioc 608 drivers/scsi/bfa/bfa_ioc.h struct bfa_ioc_s *ioc; ioc 633 drivers/scsi/bfa/bfa_ioc.h void bfa_diag_attach(struct bfa_diag_s *diag, struct bfa_ioc_s *ioc, void *dev, ioc 665 drivers/scsi/bfa/bfa_ioc.h struct bfa_ioc_s *ioc; /* back pointer to ioc */ ioc 688 drivers/scsi/bfa/bfa_ioc.h bfa_boolean_t bfa_phy_busy(struct bfa_ioc_s *ioc); ioc 703 drivers/scsi/bfa/bfa_ioc.h void bfa_phy_attach(struct bfa_phy_s *phy, struct bfa_ioc_s *ioc, ioc 715 drivers/scsi/bfa/bfa_ioc.h struct bfa_ioc_s *ioc; /* back pointer to ioc */ ioc 753 drivers/scsi/bfa/bfa_ioc.h void bfa_fru_attach(struct bfa_fru_s *fru, struct bfa_ioc_s *ioc, ioc 839 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_mbox_queue(struct bfa_ioc_s *ioc, struct bfa_mbox_cmd_s *cmd); ioc 840 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_mbox_register(struct bfa_ioc_s *ioc, ioc 842 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_mbox_isr(struct bfa_ioc_s *ioc); ioc 843 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_mbox_send(struct bfa_ioc_s *ioc, void *ioc_msg, int len); ioc 844 drivers/scsi/bfa/bfa_ioc.h bfa_boolean_t bfa_ioc_msgget(struct bfa_ioc_s *ioc, void *mbmsg); ioc 845 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_mbox_regisr(struct bfa_ioc_s *ioc, enum bfi_mclass mc, ioc 856 drivers/scsi/bfa/bfa_ioc.h bfa_status_t bfa_ioc_pll_init(struct bfa_ioc_s *ioc); ioc 873 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_set_cb_hwif(struct bfa_ioc_s *ioc); ioc 874 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_set_ct_hwif(struct bfa_ioc_s *ioc); ioc 875 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_set_ct2_hwif(struct bfa_ioc_s *ioc); ioc 876 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_ct2_poweron(struct bfa_ioc_s *ioc); ioc 878 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_attach(struct bfa_ioc_s *ioc, void *bfa, ioc 881 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_detach(struct bfa_ioc_s *ioc); ioc 882 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_suspend(struct bfa_ioc_s *ioc); ioc 883 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_pci_init(struct bfa_ioc_s *ioc, struct bfa_pcidev_s *pcidev, ioc 885 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_mem_claim(struct bfa_ioc_s *ioc, u8 *dm_kva, u64 dm_pa); ioc 886 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_enable(struct bfa_ioc_s *ioc); ioc 887 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_disable(struct bfa_ioc_s *ioc); ioc 888 drivers/scsi/bfa/bfa_ioc.h bfa_boolean_t bfa_ioc_intx_claim(struct bfa_ioc_s *ioc); ioc 890 drivers/scsi/bfa/bfa_ioc.h bfa_status_t bfa_ioc_boot(struct bfa_ioc_s *ioc, u32 boot_type, ioc 892 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_isr(struct bfa_ioc_s *ioc, struct bfi_mbmsg_s *msg); ioc 893 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_error_isr(struct bfa_ioc_s *ioc); ioc 894 drivers/scsi/bfa/bfa_ioc.h bfa_boolean_t bfa_ioc_is_operational(struct bfa_ioc_s *ioc); ioc 895 drivers/scsi/bfa/bfa_ioc.h bfa_boolean_t bfa_ioc_is_initialized(struct bfa_ioc_s *ioc); ioc 896 drivers/scsi/bfa/bfa_ioc.h bfa_boolean_t bfa_ioc_is_disabled(struct bfa_ioc_s *ioc); ioc 897 drivers/scsi/bfa/bfa_ioc.h bfa_boolean_t bfa_ioc_is_acq_addr(struct bfa_ioc_s *ioc); ioc 898 drivers/scsi/bfa/bfa_ioc.h bfa_boolean_t bfa_ioc_fw_mismatch(struct bfa_ioc_s *ioc); ioc 899 drivers/scsi/bfa/bfa_ioc.h bfa_boolean_t bfa_ioc_adapter_is_disabled(struct bfa_ioc_s *ioc); ioc 900 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_reset_fwstate(struct bfa_ioc_s *ioc); ioc 901 drivers/scsi/bfa/bfa_ioc.h enum bfa_ioc_type_e bfa_ioc_get_type(struct bfa_ioc_s *ioc); ioc 902 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_get_adapter_serial_num(struct bfa_ioc_s *ioc, char *serial_num); ioc 903 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_get_adapter_fw_ver(struct bfa_ioc_s *ioc, char *fw_ver); ioc 904 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_get_adapter_optrom_ver(struct bfa_ioc_s *ioc, char *optrom_ver); ioc 905 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_get_adapter_model(struct bfa_ioc_s *ioc, char *model); ioc 906 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_get_adapter_manufacturer(struct bfa_ioc_s *ioc, ioc 908 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_get_pci_chip_rev(struct bfa_ioc_s *ioc, char *chip_rev); ioc 909 drivers/scsi/bfa/bfa_ioc.h enum bfa_ioc_state bfa_ioc_get_state(struct bfa_ioc_s *ioc); ioc 911 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_get_attr(struct bfa_ioc_s *ioc, struct bfa_ioc_attr_s *ioc_attr); ioc 912 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_get_adapter_attr(struct bfa_ioc_s *ioc, ioc 914 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_debug_memclaim(struct bfa_ioc_s *ioc, void *dbg_fwsave); ioc 915 drivers/scsi/bfa/bfa_ioc.h bfa_status_t bfa_ioc_debug_fwsave(struct bfa_ioc_s *ioc, void *trcdata, ioc 917 drivers/scsi/bfa/bfa_ioc.h bfa_status_t bfa_ioc_debug_fwtrc(struct bfa_ioc_s *ioc, void *trcdata, ioc 919 drivers/scsi/bfa/bfa_ioc.h bfa_status_t bfa_ioc_debug_fwcore(struct bfa_ioc_s *ioc, void *buf, ioc 921 drivers/scsi/bfa/bfa_ioc.h bfa_status_t bfa_ioc_fwsig_invalidate(struct bfa_ioc_s *ioc); ioc 923 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_fwver_get(struct bfa_ioc_s *ioc, ioc 925 drivers/scsi/bfa/bfa_ioc.h bfa_boolean_t bfa_ioc_fwver_cmp(struct bfa_ioc_s *ioc, ioc 927 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_aen_post(struct bfa_ioc_s *ioc, enum bfa_ioc_aen_event event); ioc 928 drivers/scsi/bfa/bfa_ioc.h bfa_status_t bfa_ioc_fw_stats_get(struct bfa_ioc_s *ioc, void *stats); ioc 929 drivers/scsi/bfa/bfa_ioc.h bfa_status_t bfa_ioc_fw_stats_clear(struct bfa_ioc_s *ioc); ioc 930 drivers/scsi/bfa/bfa_ioc.h void bfa_ioc_debug_save_ftrc(struct bfa_ioc_s *ioc); ioc 937 drivers/scsi/bfa/bfa_ioc.h void bfa_ablk_attach(struct bfa_ablk_s *ablk, struct bfa_ioc_s *ioc); ioc 959 drivers/scsi/bfa/bfa_ioc.h bfa_status_t bfa_ioc_flash_img_get_chnk(struct bfa_ioc_s *ioc, u32 off, ioc 964 drivers/scsi/bfa/bfa_ioc.h mac_t bfa_ioc_get_mac(struct bfa_ioc_s *ioc); ioc 965 drivers/scsi/bfa/bfa_ioc.h mac_t bfa_ioc_get_mfg_mac(struct bfa_ioc_s *ioc); ioc 23 drivers/scsi/bfa/bfa_ioc_cb.c static bfa_boolean_t bfa_ioc_cb_firmware_lock(struct bfa_ioc_s *ioc); ioc 24 drivers/scsi/bfa/bfa_ioc_cb.c static void bfa_ioc_cb_firmware_unlock(struct bfa_ioc_s *ioc); ioc 25 drivers/scsi/bfa/bfa_ioc_cb.c static void bfa_ioc_cb_reg_init(struct bfa_ioc_s *ioc); ioc 26 drivers/scsi/bfa/bfa_ioc_cb.c static void bfa_ioc_cb_map_port(struct bfa_ioc_s *ioc); ioc 27 drivers/scsi/bfa/bfa_ioc_cb.c static void bfa_ioc_cb_isr_mode_set(struct bfa_ioc_s *ioc, bfa_boolean_t msix); ioc 28 drivers/scsi/bfa/bfa_ioc_cb.c static void bfa_ioc_cb_notify_fail(struct bfa_ioc_s *ioc); ioc 29 drivers/scsi/bfa/bfa_ioc_cb.c static void bfa_ioc_cb_ownership_reset(struct bfa_ioc_s *ioc); ioc 30 drivers/scsi/bfa/bfa_ioc_cb.c static bfa_boolean_t bfa_ioc_cb_sync_start(struct bfa_ioc_s *ioc); ioc 31 drivers/scsi/bfa/bfa_ioc_cb.c static void bfa_ioc_cb_sync_join(struct bfa_ioc_s *ioc); ioc 32 drivers/scsi/bfa/bfa_ioc_cb.c static void bfa_ioc_cb_sync_leave(struct bfa_ioc_s *ioc); ioc 33 drivers/scsi/bfa/bfa_ioc_cb.c static void bfa_ioc_cb_sync_ack(struct bfa_ioc_s *ioc); ioc 34 drivers/scsi/bfa/bfa_ioc_cb.c static bfa_boolean_t bfa_ioc_cb_sync_complete(struct bfa_ioc_s *ioc); ioc 36 drivers/scsi/bfa/bfa_ioc_cb.c struct bfa_ioc_s *ioc, enum bfi_ioc_state fwstate); ioc 37 drivers/scsi/bfa/bfa_ioc_cb.c static enum bfi_ioc_state bfa_ioc_cb_get_cur_ioc_fwstate(struct bfa_ioc_s *ioc); ioc 39 drivers/scsi/bfa/bfa_ioc_cb.c struct bfa_ioc_s *ioc, enum bfi_ioc_state fwstate); ioc 40 drivers/scsi/bfa/bfa_ioc_cb.c static enum bfi_ioc_state bfa_ioc_cb_get_alt_ioc_fwstate(struct bfa_ioc_s *ioc); ioc 48 drivers/scsi/bfa/bfa_ioc_cb.c bfa_ioc_set_cb_hwif(struct bfa_ioc_s *ioc) ioc 68 drivers/scsi/bfa/bfa_ioc_cb.c ioc->ioc_hwif = &hwif_cb; ioc 75 drivers/scsi/bfa/bfa_ioc_cb.c bfa_ioc_cb_firmware_lock(struct bfa_ioc_s *ioc) ioc 80 drivers/scsi/bfa/bfa_ioc_cb.c cur_fwstate = bfa_ioc_cb_get_cur_ioc_fwstate(ioc); ioc 81 drivers/scsi/bfa/bfa_ioc_cb.c bfa_trc(ioc, cur_fwstate); ioc 82 drivers/scsi/bfa/bfa_ioc_cb.c alt_fwstate = bfa_ioc_cb_get_alt_ioc_fwstate(ioc); ioc 83 drivers/scsi/bfa/bfa_ioc_cb.c bfa_trc(ioc, alt_fwstate); ioc 93 drivers/scsi/bfa/bfa_ioc_cb.c bfa_ioc_fwver_get(ioc, &fwhdr); ioc 94 drivers/scsi/bfa/bfa_ioc_cb.c if (!bfa_ioc_fwver_cmp(ioc, &fwhdr) && ioc 96 drivers/scsi/bfa/bfa_ioc_cb.c bfa_trc(ioc, alt_fwstate); ioc 104 drivers/scsi/bfa/bfa_ioc_cb.c bfa_ioc_cb_firmware_unlock(struct bfa_ioc_s *ioc) ioc 112 drivers/scsi/bfa/bfa_ioc_cb.c bfa_ioc_cb_notify_fail(struct bfa_ioc_s *ioc) ioc 114 drivers/scsi/bfa/bfa_ioc_cb.c writel(~0U, ioc->ioc_regs.err_set); ioc 115 drivers/scsi/bfa/bfa_ioc_cb.c readl(ioc->ioc_regs.err_set); ioc 136 drivers/scsi/bfa/bfa_ioc_cb.c bfa_ioc_cb_reg_init(struct bfa_ioc_s *ioc) ioc 139 drivers/scsi/bfa/bfa_ioc_cb.c int pcifn = bfa_ioc_pcifn(ioc); ioc 141 drivers/scsi/bfa/bfa_ioc_cb.c rb = bfa_ioc_bar0(ioc); ioc 143 drivers/scsi/bfa/bfa_ioc_cb.c ioc->ioc_regs.hfn_mbox = rb + iocreg_fnreg[pcifn].hfn_mbox; ioc 144 drivers/scsi/bfa/bfa_ioc_cb.c ioc->ioc_regs.lpu_mbox = rb + iocreg_fnreg[pcifn].lpu_mbox; ioc 145 drivers/scsi/bfa/bfa_ioc_cb.c ioc->ioc_regs.host_page_num_fn = rb + iocreg_fnreg[pcifn].hfn_pgn; ioc 147 drivers/scsi/bfa/bfa_ioc_cb.c if (ioc->port_id == 0) { ioc 148 drivers/scsi/bfa/bfa_ioc_cb.c ioc->ioc_regs.heartbeat = rb + BFA_IOC0_HBEAT_REG; ioc 149 drivers/scsi/bfa/bfa_ioc_cb.c ioc->ioc_regs.ioc_fwstate = rb + BFA_IOC0_STATE_REG; ioc 150 drivers/scsi/bfa/bfa_ioc_cb.c ioc->ioc_regs.alt_ioc_fwstate = rb + BFA_IOC1_STATE_REG; ioc 152 drivers/scsi/bfa/bfa_ioc_cb.c ioc->ioc_regs.heartbeat = (rb + BFA_IOC1_HBEAT_REG); ioc 153 drivers/scsi/bfa/bfa_ioc_cb.c ioc->ioc_regs.ioc_fwstate = (rb + BFA_IOC1_STATE_REG); ioc 154 drivers/scsi/bfa/bfa_ioc_cb.c ioc->ioc_regs.alt_ioc_fwstate = (rb + BFA_IOC0_STATE_REG); ioc 160 drivers/scsi/bfa/bfa_ioc_cb.c ioc->ioc_regs.hfn_mbox_cmd = rb + iocreg_mbcmd[pcifn].hfn; ioc 161 drivers/scsi/bfa/bfa_ioc_cb.c ioc->ioc_regs.lpu_mbox_cmd = rb + iocreg_mbcmd[pcifn].lpu; ioc 166 drivers/scsi/bfa/bfa_ioc_cb.c ioc->ioc_regs.pss_ctl_reg = (rb + PSS_CTL_REG); ioc 167 drivers/scsi/bfa/bfa_ioc_cb.c ioc->ioc_regs.pss_err_status_reg = (rb + PSS_ERR_STATUS_REG); ioc 168 drivers/scsi/bfa/bfa_ioc_cb.c ioc->ioc_regs.app_pll_fast_ctl_reg = (rb + APP_PLL_LCLK_CTL_REG); ioc 169 drivers/scsi/bfa/bfa_ioc_cb.c ioc->ioc_regs.app_pll_slow_ctl_reg = (rb + APP_PLL_SCLK_CTL_REG); ioc 174 drivers/scsi/bfa/bfa_ioc_cb.c ioc->ioc_regs.ioc_sem_reg = (rb + HOST_SEM0_REG); ioc 175 drivers/scsi/bfa/bfa_ioc_cb.c ioc->ioc_regs.ioc_init_sem_reg = (rb + HOST_SEM2_REG); ioc 180 drivers/scsi/bfa/bfa_ioc_cb.c ioc->ioc_regs.smem_page_start = (rb + PSS_SMEM_PAGE_START); ioc 181 drivers/scsi/bfa/bfa_ioc_cb.c ioc->ioc_regs.smem_pg0 = BFI_IOC_SMEM_PG0_CB; ioc 186 drivers/scsi/bfa/bfa_ioc_cb.c ioc->ioc_regs.err_set = (rb + ERR_SET_REG); ioc 194 drivers/scsi/bfa/bfa_ioc_cb.c bfa_ioc_cb_map_port(struct bfa_ioc_s *ioc) ioc 199 drivers/scsi/bfa/bfa_ioc_cb.c ioc->port_id = bfa_ioc_pcifn(ioc); ioc 201 drivers/scsi/bfa/bfa_ioc_cb.c bfa_trc(ioc, ioc->port_id); ioc 208 drivers/scsi/bfa/bfa_ioc_cb.c bfa_ioc_cb_isr_mode_set(struct bfa_ioc_s *ioc, bfa_boolean_t msix) ioc 216 drivers/scsi/bfa/bfa_ioc_cb.c bfa_ioc_cb_sync_start(struct bfa_ioc_s *ioc) ioc 218 drivers/scsi/bfa/bfa_ioc_cb.c u32 ioc_fwstate = readl(ioc->ioc_regs.ioc_fwstate); ioc 227 drivers/scsi/bfa/bfa_ioc_cb.c writel(BFI_IOC_UNINIT, ioc->ioc_regs.ioc_fwstate); ioc 228 drivers/scsi/bfa/bfa_ioc_cb.c writel(BFI_IOC_UNINIT, ioc->ioc_regs.alt_ioc_fwstate); ioc 232 drivers/scsi/bfa/bfa_ioc_cb.c return bfa_ioc_cb_sync_complete(ioc); ioc 239 drivers/scsi/bfa/bfa_ioc_cb.c bfa_ioc_cb_ownership_reset(struct bfa_ioc_s *ioc) ioc 247 drivers/scsi/bfa/bfa_ioc_cb.c readl(ioc->ioc_regs.ioc_sem_reg); ioc 248 drivers/scsi/bfa/bfa_ioc_cb.c writel(1, ioc->ioc_regs.ioc_sem_reg); ioc 255 drivers/scsi/bfa/bfa_ioc_cb.c bfa_ioc_cb_sync_join(struct bfa_ioc_s *ioc) ioc 257 drivers/scsi/bfa/bfa_ioc_cb.c u32 r32 = readl(ioc->ioc_regs.ioc_fwstate); ioc 258 drivers/scsi/bfa/bfa_ioc_cb.c u32 join_pos = bfa_ioc_cb_join_pos(ioc); ioc 260 drivers/scsi/bfa/bfa_ioc_cb.c writel((r32 | join_pos), ioc->ioc_regs.ioc_fwstate); ioc 264 drivers/scsi/bfa/bfa_ioc_cb.c bfa_ioc_cb_sync_leave(struct bfa_ioc_s *ioc) ioc 266 drivers/scsi/bfa/bfa_ioc_cb.c u32 r32 = readl(ioc->ioc_regs.ioc_fwstate); ioc 267 drivers/scsi/bfa/bfa_ioc_cb.c u32 join_pos = bfa_ioc_cb_join_pos(ioc); ioc 269 drivers/scsi/bfa/bfa_ioc_cb.c writel((r32 & ~join_pos), ioc->ioc_regs.ioc_fwstate); ioc 273 drivers/scsi/bfa/bfa_ioc_cb.c bfa_ioc_cb_set_cur_ioc_fwstate(struct bfa_ioc_s *ioc, ioc 276 drivers/scsi/bfa/bfa_ioc_cb.c u32 r32 = readl(ioc->ioc_regs.ioc_fwstate); ioc 279 drivers/scsi/bfa/bfa_ioc_cb.c ioc->ioc_regs.ioc_fwstate); ioc 283 drivers/scsi/bfa/bfa_ioc_cb.c bfa_ioc_cb_get_cur_ioc_fwstate(struct bfa_ioc_s *ioc) ioc 285 drivers/scsi/bfa/bfa_ioc_cb.c return (enum bfi_ioc_state)(readl(ioc->ioc_regs.ioc_fwstate) & ioc 290 drivers/scsi/bfa/bfa_ioc_cb.c bfa_ioc_cb_set_alt_ioc_fwstate(struct bfa_ioc_s *ioc, ioc 293 drivers/scsi/bfa/bfa_ioc_cb.c u32 r32 = readl(ioc->ioc_regs.alt_ioc_fwstate); ioc 296 drivers/scsi/bfa/bfa_ioc_cb.c ioc->ioc_regs.alt_ioc_fwstate); ioc 300 drivers/scsi/bfa/bfa_ioc_cb.c bfa_ioc_cb_get_alt_ioc_fwstate(struct bfa_ioc_s *ioc) ioc 302 drivers/scsi/bfa/bfa_ioc_cb.c return (enum bfi_ioc_state)(readl(ioc->ioc_regs.alt_ioc_fwstate) & ioc 307 drivers/scsi/bfa/bfa_ioc_cb.c bfa_ioc_cb_sync_ack(struct bfa_ioc_s *ioc) ioc 309 drivers/scsi/bfa/bfa_ioc_cb.c bfa_ioc_cb_set_cur_ioc_fwstate(ioc, BFI_IOC_FAIL); ioc 313 drivers/scsi/bfa/bfa_ioc_cb.c bfa_ioc_cb_sync_complete(struct bfa_ioc_s *ioc) ioc 316 drivers/scsi/bfa/bfa_ioc_cb.c fwstate = bfa_ioc_cb_get_cur_ioc_fwstate(ioc); ioc 344 drivers/scsi/bfa/bfa_ioc_cb.c alt_fwstate = bfa_ioc_cb_get_alt_ioc_fwstate(ioc); ioc 30 drivers/scsi/bfa/bfa_ioc_ct.c static bfa_boolean_t bfa_ioc_ct_firmware_lock(struct bfa_ioc_s *ioc); ioc 31 drivers/scsi/bfa/bfa_ioc_ct.c static void bfa_ioc_ct_firmware_unlock(struct bfa_ioc_s *ioc); ioc 32 drivers/scsi/bfa/bfa_ioc_ct.c static void bfa_ioc_ct_notify_fail(struct bfa_ioc_s *ioc); ioc 33 drivers/scsi/bfa/bfa_ioc_ct.c static void bfa_ioc_ct_ownership_reset(struct bfa_ioc_s *ioc); ioc 34 drivers/scsi/bfa/bfa_ioc_ct.c static bfa_boolean_t bfa_ioc_ct_sync_start(struct bfa_ioc_s *ioc); ioc 35 drivers/scsi/bfa/bfa_ioc_ct.c static void bfa_ioc_ct_sync_join(struct bfa_ioc_s *ioc); ioc 36 drivers/scsi/bfa/bfa_ioc_ct.c static void bfa_ioc_ct_sync_leave(struct bfa_ioc_s *ioc); ioc 37 drivers/scsi/bfa/bfa_ioc_ct.c static void bfa_ioc_ct_sync_ack(struct bfa_ioc_s *ioc); ioc 38 drivers/scsi/bfa/bfa_ioc_ct.c static bfa_boolean_t bfa_ioc_ct_sync_complete(struct bfa_ioc_s *ioc); ioc 40 drivers/scsi/bfa/bfa_ioc_ct.c struct bfa_ioc_s *ioc, enum bfi_ioc_state fwstate); ioc 41 drivers/scsi/bfa/bfa_ioc_ct.c static enum bfi_ioc_state bfa_ioc_ct_get_cur_ioc_fwstate(struct bfa_ioc_s *ioc); ioc 43 drivers/scsi/bfa/bfa_ioc_ct.c struct bfa_ioc_s *ioc, enum bfi_ioc_state fwstate); ioc 44 drivers/scsi/bfa/bfa_ioc_ct.c static enum bfi_ioc_state bfa_ioc_ct_get_alt_ioc_fwstate(struct bfa_ioc_s *ioc); ioc 53 drivers/scsi/bfa/bfa_ioc_ct.c bfa_ioc_ct_firmware_lock(struct bfa_ioc_s *ioc) ioc 59 drivers/scsi/bfa/bfa_ioc_ct.c bfa_ioc_sem_get(ioc->ioc_regs.ioc_usage_sem_reg); ioc 60 drivers/scsi/bfa/bfa_ioc_ct.c usecnt = readl(ioc->ioc_regs.ioc_usage_reg); ioc 66 drivers/scsi/bfa/bfa_ioc_ct.c writel(1, ioc->ioc_regs.ioc_usage_reg); ioc 67 drivers/scsi/bfa/bfa_ioc_ct.c readl(ioc->ioc_regs.ioc_usage_sem_reg); ioc 68 drivers/scsi/bfa/bfa_ioc_ct.c writel(1, ioc->ioc_regs.ioc_usage_sem_reg); ioc 69 drivers/scsi/bfa/bfa_ioc_ct.c writel(0, ioc->ioc_regs.ioc_fail_sync); ioc 70 drivers/scsi/bfa/bfa_ioc_ct.c bfa_trc(ioc, usecnt); ioc 74 drivers/scsi/bfa/bfa_ioc_ct.c ioc_fwstate = readl(ioc->ioc_regs.ioc_fwstate); ioc 75 drivers/scsi/bfa/bfa_ioc_ct.c bfa_trc(ioc, ioc_fwstate); ioc 85 drivers/scsi/bfa/bfa_ioc_ct.c bfa_ioc_fwver_get(ioc, &fwhdr); ioc 86 drivers/scsi/bfa/bfa_ioc_ct.c if (!bfa_ioc_fwver_cmp(ioc, &fwhdr)) { ioc 87 drivers/scsi/bfa/bfa_ioc_ct.c readl(ioc->ioc_regs.ioc_usage_sem_reg); ioc 88 drivers/scsi/bfa/bfa_ioc_ct.c writel(1, ioc->ioc_regs.ioc_usage_sem_reg); ioc 89 drivers/scsi/bfa/bfa_ioc_ct.c bfa_trc(ioc, usecnt); ioc 97 drivers/scsi/bfa/bfa_ioc_ct.c writel(usecnt, ioc->ioc_regs.ioc_usage_reg); ioc 98 drivers/scsi/bfa/bfa_ioc_ct.c readl(ioc->ioc_regs.ioc_usage_sem_reg); ioc 99 drivers/scsi/bfa/bfa_ioc_ct.c writel(1, ioc->ioc_regs.ioc_usage_sem_reg); ioc 100 drivers/scsi/bfa/bfa_ioc_ct.c bfa_trc(ioc, usecnt); ioc 105 drivers/scsi/bfa/bfa_ioc_ct.c bfa_ioc_ct_firmware_unlock(struct bfa_ioc_s *ioc) ioc 112 drivers/scsi/bfa/bfa_ioc_ct.c bfa_ioc_sem_get(ioc->ioc_regs.ioc_usage_sem_reg); ioc 113 drivers/scsi/bfa/bfa_ioc_ct.c usecnt = readl(ioc->ioc_regs.ioc_usage_reg); ioc 117 drivers/scsi/bfa/bfa_ioc_ct.c writel(usecnt, ioc->ioc_regs.ioc_usage_reg); ioc 118 drivers/scsi/bfa/bfa_ioc_ct.c bfa_trc(ioc, usecnt); ioc 120 drivers/scsi/bfa/bfa_ioc_ct.c readl(ioc->ioc_regs.ioc_usage_sem_reg); ioc 121 drivers/scsi/bfa/bfa_ioc_ct.c writel(1, ioc->ioc_regs.ioc_usage_sem_reg); ioc 128 drivers/scsi/bfa/bfa_ioc_ct.c bfa_ioc_ct_notify_fail(struct bfa_ioc_s *ioc) ioc 130 drivers/scsi/bfa/bfa_ioc_ct.c if (bfa_ioc_is_cna(ioc)) { ioc 131 drivers/scsi/bfa/bfa_ioc_ct.c writel(__FW_INIT_HALT_P, ioc->ioc_regs.ll_halt); ioc 132 drivers/scsi/bfa/bfa_ioc_ct.c writel(__FW_INIT_HALT_P, ioc->ioc_regs.alt_ll_halt); ioc 134 drivers/scsi/bfa/bfa_ioc_ct.c readl(ioc->ioc_regs.ll_halt); ioc 135 drivers/scsi/bfa/bfa_ioc_ct.c readl(ioc->ioc_regs.alt_ll_halt); ioc 137 drivers/scsi/bfa/bfa_ioc_ct.c writel(~0U, ioc->ioc_regs.err_set); ioc 138 drivers/scsi/bfa/bfa_ioc_ct.c readl(ioc->ioc_regs.err_set); ioc 183 drivers/scsi/bfa/bfa_ioc_ct.c bfa_ioc_ct_reg_init(struct bfa_ioc_s *ioc) ioc 186 drivers/scsi/bfa/bfa_ioc_ct.c int pcifn = bfa_ioc_pcifn(ioc); ioc 188 drivers/scsi/bfa/bfa_ioc_ct.c rb = bfa_ioc_bar0(ioc); ioc 190 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.hfn_mbox = rb + ct_fnreg[pcifn].hfn_mbox; ioc 191 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.lpu_mbox = rb + ct_fnreg[pcifn].lpu_mbox; ioc 192 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.host_page_num_fn = rb + ct_fnreg[pcifn].hfn_pgn; ioc 194 drivers/scsi/bfa/bfa_ioc_ct.c if (ioc->port_id == 0) { ioc 195 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.heartbeat = rb + BFA_IOC0_HBEAT_REG; ioc 196 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.ioc_fwstate = rb + BFA_IOC0_STATE_REG; ioc 197 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.alt_ioc_fwstate = rb + BFA_IOC1_STATE_REG; ioc 198 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.hfn_mbox_cmd = rb + ct_p0reg[pcifn].hfn; ioc 199 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.lpu_mbox_cmd = rb + ct_p0reg[pcifn].lpu; ioc 200 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.ll_halt = rb + FW_INIT_HALT_P0; ioc 201 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.alt_ll_halt = rb + FW_INIT_HALT_P1; ioc 203 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.heartbeat = (rb + BFA_IOC1_HBEAT_REG); ioc 204 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.ioc_fwstate = (rb + BFA_IOC1_STATE_REG); ioc 205 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.alt_ioc_fwstate = rb + BFA_IOC0_STATE_REG; ioc 206 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.hfn_mbox_cmd = rb + ct_p1reg[pcifn].hfn; ioc 207 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.lpu_mbox_cmd = rb + ct_p1reg[pcifn].lpu; ioc 208 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.ll_halt = rb + FW_INIT_HALT_P1; ioc 209 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.alt_ll_halt = rb + FW_INIT_HALT_P0; ioc 215 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.pss_ctl_reg = (rb + PSS_CTL_REG); ioc 216 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.pss_err_status_reg = (rb + PSS_ERR_STATUS_REG); ioc 217 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.app_pll_fast_ctl_reg = (rb + APP_PLL_LCLK_CTL_REG); ioc 218 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.app_pll_slow_ctl_reg = (rb + APP_PLL_SCLK_CTL_REG); ioc 223 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.ioc_sem_reg = (rb + HOST_SEM0_REG); ioc 224 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.ioc_usage_sem_reg = (rb + HOST_SEM1_REG); ioc 225 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.ioc_init_sem_reg = (rb + HOST_SEM2_REG); ioc 226 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.ioc_usage_reg = (rb + BFA_FW_USE_COUNT); ioc 227 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.ioc_fail_sync = (rb + BFA_IOC_FAIL_SYNC); ioc 232 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.smem_page_start = (rb + PSS_SMEM_PAGE_START); ioc 233 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.smem_pg0 = BFI_IOC_SMEM_PG0_CT; ioc 238 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.err_set = (rb + ERR_SET_REG); ioc 242 drivers/scsi/bfa/bfa_ioc_ct.c bfa_ioc_ct2_reg_init(struct bfa_ioc_s *ioc) ioc 245 drivers/scsi/bfa/bfa_ioc_ct.c int port = bfa_ioc_portid(ioc); ioc 247 drivers/scsi/bfa/bfa_ioc_ct.c rb = bfa_ioc_bar0(ioc); ioc 249 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.hfn_mbox = rb + ct2_reg[port].hfn_mbox; ioc 250 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.lpu_mbox = rb + ct2_reg[port].lpu_mbox; ioc 251 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.host_page_num_fn = rb + ct2_reg[port].hfn_pgn; ioc 252 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.hfn_mbox_cmd = rb + ct2_reg[port].hfn; ioc 253 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.lpu_mbox_cmd = rb + ct2_reg[port].lpu; ioc 254 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.lpu_read_stat = rb + ct2_reg[port].lpu_read; ioc 257 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.heartbeat = rb + CT2_BFA_IOC0_HBEAT_REG; ioc 258 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.ioc_fwstate = rb + CT2_BFA_IOC0_STATE_REG; ioc 259 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.alt_ioc_fwstate = rb + CT2_BFA_IOC1_STATE_REG; ioc 260 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.ll_halt = rb + FW_INIT_HALT_P0; ioc 261 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.alt_ll_halt = rb + FW_INIT_HALT_P1; ioc 263 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.heartbeat = (rb + CT2_BFA_IOC1_HBEAT_REG); ioc 264 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.ioc_fwstate = (rb + CT2_BFA_IOC1_STATE_REG); ioc 265 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.alt_ioc_fwstate = rb + CT2_BFA_IOC0_STATE_REG; ioc 266 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.ll_halt = rb + FW_INIT_HALT_P1; ioc 267 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.alt_ll_halt = rb + FW_INIT_HALT_P0; ioc 273 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.pss_ctl_reg = (rb + PSS_CTL_REG); ioc 274 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.pss_err_status_reg = (rb + PSS_ERR_STATUS_REG); ioc 275 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.app_pll_fast_ctl_reg = (rb + CT2_APP_PLL_LCLK_CTL_REG); ioc 276 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.app_pll_slow_ctl_reg = (rb + CT2_APP_PLL_SCLK_CTL_REG); ioc 281 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.ioc_sem_reg = (rb + CT2_HOST_SEM0_REG); ioc 282 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.ioc_usage_sem_reg = (rb + CT2_HOST_SEM1_REG); ioc 283 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.ioc_init_sem_reg = (rb + CT2_HOST_SEM2_REG); ioc 284 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.ioc_usage_reg = (rb + CT2_BFA_FW_USE_COUNT); ioc 285 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.ioc_fail_sync = (rb + CT2_BFA_IOC_FAIL_SYNC); ioc 290 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.smem_page_start = (rb + PSS_SMEM_PAGE_START); ioc 291 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.smem_pg0 = BFI_IOC_SMEM_PG0_CT; ioc 296 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.err_set = (rb + ERR_SET_REG); ioc 305 drivers/scsi/bfa/bfa_ioc_ct.c bfa_ioc_ct_map_port(struct bfa_ioc_s *ioc) ioc 307 drivers/scsi/bfa/bfa_ioc_ct.c void __iomem *rb = ioc->pcidev.pci_bar_kva; ioc 314 drivers/scsi/bfa/bfa_ioc_ct.c r32 >>= FNC_PERS_FN_SHIFT(bfa_ioc_pcifn(ioc)); ioc 315 drivers/scsi/bfa/bfa_ioc_ct.c ioc->port_id = (r32 & __F0_PORT_MAP_MK) >> __F0_PORT_MAP_SH; ioc 317 drivers/scsi/bfa/bfa_ioc_ct.c bfa_trc(ioc, bfa_ioc_pcifn(ioc)); ioc 318 drivers/scsi/bfa/bfa_ioc_ct.c bfa_trc(ioc, ioc->port_id); ioc 322 drivers/scsi/bfa/bfa_ioc_ct.c bfa_ioc_ct2_map_port(struct bfa_ioc_s *ioc) ioc 324 drivers/scsi/bfa/bfa_ioc_ct.c void __iomem *rb = ioc->pcidev.pci_bar_kva; ioc 328 drivers/scsi/bfa/bfa_ioc_ct.c ioc->port_id = ((r32 & __FC_LL_PORT_MAP__MK) >> __FC_LL_PORT_MAP__SH); ioc 330 drivers/scsi/bfa/bfa_ioc_ct.c bfa_trc(ioc, bfa_ioc_pcifn(ioc)); ioc 331 drivers/scsi/bfa/bfa_ioc_ct.c bfa_trc(ioc, ioc->port_id); ioc 338 drivers/scsi/bfa/bfa_ioc_ct.c bfa_ioc_ct_isr_mode_set(struct bfa_ioc_s *ioc, bfa_boolean_t msix) ioc 340 drivers/scsi/bfa/bfa_ioc_ct.c void __iomem *rb = ioc->pcidev.pci_bar_kva; ioc 344 drivers/scsi/bfa/bfa_ioc_ct.c bfa_trc(ioc, r32); ioc 346 drivers/scsi/bfa/bfa_ioc_ct.c mode = (r32 >> FNC_PERS_FN_SHIFT(bfa_ioc_pcifn(ioc))) & ioc 360 drivers/scsi/bfa/bfa_ioc_ct.c r32 &= ~(__F0_INTX_STATUS << FNC_PERS_FN_SHIFT(bfa_ioc_pcifn(ioc))); ioc 361 drivers/scsi/bfa/bfa_ioc_ct.c r32 |= (mode << FNC_PERS_FN_SHIFT(bfa_ioc_pcifn(ioc))); ioc 362 drivers/scsi/bfa/bfa_ioc_ct.c bfa_trc(ioc, r32); ioc 368 drivers/scsi/bfa/bfa_ioc_ct.c bfa_ioc_ct2_lpu_read_stat(struct bfa_ioc_s *ioc) ioc 372 drivers/scsi/bfa/bfa_ioc_ct.c r32 = readl(ioc->ioc_regs.lpu_read_stat); ioc 374 drivers/scsi/bfa/bfa_ioc_ct.c writel(1, ioc->ioc_regs.lpu_read_stat); ioc 385 drivers/scsi/bfa/bfa_ioc_ct.c bfa_ioc_ct_ownership_reset(struct bfa_ioc_s *ioc) ioc 388 drivers/scsi/bfa/bfa_ioc_ct.c bfa_ioc_sem_get(ioc->ioc_regs.ioc_usage_sem_reg); ioc 389 drivers/scsi/bfa/bfa_ioc_ct.c writel(0, ioc->ioc_regs.ioc_usage_reg); ioc 390 drivers/scsi/bfa/bfa_ioc_ct.c readl(ioc->ioc_regs.ioc_usage_sem_reg); ioc 391 drivers/scsi/bfa/bfa_ioc_ct.c writel(1, ioc->ioc_regs.ioc_usage_sem_reg); ioc 393 drivers/scsi/bfa/bfa_ioc_ct.c writel(0, ioc->ioc_regs.ioc_fail_sync); ioc 399 drivers/scsi/bfa/bfa_ioc_ct.c readl(ioc->ioc_regs.ioc_sem_reg); ioc 400 drivers/scsi/bfa/bfa_ioc_ct.c writel(1, ioc->ioc_regs.ioc_sem_reg); ioc 404 drivers/scsi/bfa/bfa_ioc_ct.c bfa_ioc_ct_sync_start(struct bfa_ioc_s *ioc) ioc 406 drivers/scsi/bfa/bfa_ioc_ct.c uint32_t r32 = readl(ioc->ioc_regs.ioc_fail_sync); ioc 416 drivers/scsi/bfa/bfa_ioc_ct.c if (sync_reqd & bfa_ioc_ct_sync_pos(ioc)) { ioc 417 drivers/scsi/bfa/bfa_ioc_ct.c writel(0, ioc->ioc_regs.ioc_fail_sync); ioc 418 drivers/scsi/bfa/bfa_ioc_ct.c writel(1, ioc->ioc_regs.ioc_usage_reg); ioc 419 drivers/scsi/bfa/bfa_ioc_ct.c writel(BFI_IOC_UNINIT, ioc->ioc_regs.ioc_fwstate); ioc 420 drivers/scsi/bfa/bfa_ioc_ct.c writel(BFI_IOC_UNINIT, ioc->ioc_regs.alt_ioc_fwstate); ioc 424 drivers/scsi/bfa/bfa_ioc_ct.c return bfa_ioc_ct_sync_complete(ioc); ioc 431 drivers/scsi/bfa/bfa_ioc_ct.c bfa_ioc_ct_sync_join(struct bfa_ioc_s *ioc) ioc 433 drivers/scsi/bfa/bfa_ioc_ct.c uint32_t r32 = readl(ioc->ioc_regs.ioc_fail_sync); ioc 434 drivers/scsi/bfa/bfa_ioc_ct.c uint32_t sync_pos = bfa_ioc_ct_sync_reqd_pos(ioc); ioc 436 drivers/scsi/bfa/bfa_ioc_ct.c writel((r32 | sync_pos), ioc->ioc_regs.ioc_fail_sync); ioc 440 drivers/scsi/bfa/bfa_ioc_ct.c bfa_ioc_ct_sync_leave(struct bfa_ioc_s *ioc) ioc 442 drivers/scsi/bfa/bfa_ioc_ct.c uint32_t r32 = readl(ioc->ioc_regs.ioc_fail_sync); ioc 443 drivers/scsi/bfa/bfa_ioc_ct.c uint32_t sync_msk = bfa_ioc_ct_sync_reqd_pos(ioc) | ioc 444 drivers/scsi/bfa/bfa_ioc_ct.c bfa_ioc_ct_sync_pos(ioc); ioc 446 drivers/scsi/bfa/bfa_ioc_ct.c writel((r32 & ~sync_msk), ioc->ioc_regs.ioc_fail_sync); ioc 450 drivers/scsi/bfa/bfa_ioc_ct.c bfa_ioc_ct_sync_ack(struct bfa_ioc_s *ioc) ioc 452 drivers/scsi/bfa/bfa_ioc_ct.c uint32_t r32 = readl(ioc->ioc_regs.ioc_fail_sync); ioc 454 drivers/scsi/bfa/bfa_ioc_ct.c writel((r32 | bfa_ioc_ct_sync_pos(ioc)), ioc 455 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.ioc_fail_sync); ioc 459 drivers/scsi/bfa/bfa_ioc_ct.c bfa_ioc_ct_sync_complete(struct bfa_ioc_s *ioc) ioc 461 drivers/scsi/bfa/bfa_ioc_ct.c uint32_t r32 = readl(ioc->ioc_regs.ioc_fail_sync); ioc 476 drivers/scsi/bfa/bfa_ioc_ct.c if ((sync_reqd & bfa_ioc_ct_sync_pos(ioc)) && ioc 477 drivers/scsi/bfa/bfa_ioc_ct.c !(sync_ackd & bfa_ioc_ct_sync_pos(ioc))) ioc 478 drivers/scsi/bfa/bfa_ioc_ct.c sync_ackd |= bfa_ioc_ct_sync_pos(ioc); ioc 482 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_regs.ioc_fail_sync); ioc 483 drivers/scsi/bfa/bfa_ioc_ct.c writel(BFI_IOC_FAIL, ioc->ioc_regs.ioc_fwstate); ioc 484 drivers/scsi/bfa/bfa_ioc_ct.c writel(BFI_IOC_FAIL, ioc->ioc_regs.alt_ioc_fwstate); ioc 494 drivers/scsi/bfa/bfa_ioc_ct.c writel((r32 | sync_ackd), ioc->ioc_regs.ioc_fail_sync); ioc 503 drivers/scsi/bfa/bfa_ioc_ct.c bfa_ioc_set_ctx_hwif(struct bfa_ioc_s *ioc, struct bfa_ioc_hwif_s *hwif) ioc 524 drivers/scsi/bfa/bfa_ioc_ct.c bfa_ioc_set_ct_hwif(struct bfa_ioc_s *ioc) ioc 526 drivers/scsi/bfa/bfa_ioc_ct.c bfa_ioc_set_ctx_hwif(ioc, &hwif_ct); ioc 532 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_hwif = &hwif_ct; ioc 539 drivers/scsi/bfa/bfa_ioc_ct.c bfa_ioc_set_ct2_hwif(struct bfa_ioc_s *ioc) ioc 541 drivers/scsi/bfa/bfa_ioc_ct.c bfa_ioc_set_ctx_hwif(ioc, &hwif_ct2); ioc 548 drivers/scsi/bfa/bfa_ioc_ct.c ioc->ioc_hwif = &hwif_ct2; ioc 562 drivers/scsi/bfa/bfa_ioc_ct.c bfa_ioc_ct2_poweron(struct bfa_ioc_s *ioc) ioc 564 drivers/scsi/bfa/bfa_ioc_ct.c void __iomem *rb = ioc->pcidev.pci_bar_kva; ioc 575 drivers/scsi/bfa/bfa_ioc_ct.c HOSTFN_MSIX_DEFAULT * bfa_ioc_pcifn(ioc), ioc 577 drivers/scsi/bfa/bfa_ioc_ct.c writel(HOSTFN_MSIX_DEFAULT * bfa_ioc_pcifn(ioc), ioc 967 drivers/scsi/bfa/bfa_ioc_ct.c bfa_ioc_ct_set_cur_ioc_fwstate(struct bfa_ioc_s *ioc, ioc 970 drivers/scsi/bfa/bfa_ioc_ct.c writel(fwstate, ioc->ioc_regs.ioc_fwstate); ioc 974 drivers/scsi/bfa/bfa_ioc_ct.c bfa_ioc_ct_get_cur_ioc_fwstate(struct bfa_ioc_s *ioc) ioc 976 drivers/scsi/bfa/bfa_ioc_ct.c return (enum bfi_ioc_state)readl(ioc->ioc_regs.ioc_fwstate); ioc 980 drivers/scsi/bfa/bfa_ioc_ct.c bfa_ioc_ct_set_alt_ioc_fwstate(struct bfa_ioc_s *ioc, ioc 983 drivers/scsi/bfa/bfa_ioc_ct.c writel(fwstate, ioc->ioc_regs.alt_ioc_fwstate); ioc 987 drivers/scsi/bfa/bfa_ioc_ct.c bfa_ioc_ct_get_alt_ioc_fwstate(struct bfa_ioc_s *ioc) ioc 989 drivers/scsi/bfa/bfa_ioc_ct.c return (enum bfi_ioc_state) readl(ioc->ioc_regs.alt_ioc_fwstate); ioc 62 drivers/scsi/bfa/bfa_modules.h struct bfa_ioc_s ioc; /* IOC module */ ioc 230 drivers/scsi/bfa/bfa_port.c if (bfa_ioc_is_disabled(port->ioc)) { ioc 235 drivers/scsi/bfa/bfa_port.c if (!bfa_ioc_is_operational(port->ioc)) { ioc 259 drivers/scsi/bfa/bfa_port.c bfa_ioc_portid(port->ioc)); ioc 260 drivers/scsi/bfa/bfa_port.c bfa_ioc_mbox_queue(port->ioc, &port->endis_mb); ioc 286 drivers/scsi/bfa/bfa_port.c if (bfa_ioc_is_disabled(port->ioc)) { ioc 291 drivers/scsi/bfa/bfa_port.c if (!bfa_ioc_is_operational(port->ioc)) { ioc 315 drivers/scsi/bfa/bfa_port.c bfa_ioc_portid(port->ioc)); ioc 316 drivers/scsi/bfa/bfa_port.c bfa_ioc_mbox_queue(port->ioc, &port->endis_mb); ioc 336 drivers/scsi/bfa/bfa_port.c if (!bfa_ioc_is_operational(port->ioc)) { ioc 355 drivers/scsi/bfa/bfa_port.c bfa_ioc_portid(port->ioc)); ioc 356 drivers/scsi/bfa/bfa_port.c bfa_ioc_mbox_queue(port->ioc, &port->stats_mb); ioc 375 drivers/scsi/bfa/bfa_port.c if (!bfa_ioc_is_operational(port->ioc)) { ioc 392 drivers/scsi/bfa/bfa_port.c bfa_ioc_portid(port->ioc)); ioc 393 drivers/scsi/bfa/bfa_port.c bfa_ioc_mbox_queue(port->ioc, &port->stats_mb); ioc 457 drivers/scsi/bfa/bfa_port.c bfa_port_attach(struct bfa_port_s *port, struct bfa_ioc_s *ioc, ioc 463 drivers/scsi/bfa/bfa_port.c port->ioc = ioc; ioc 473 drivers/scsi/bfa/bfa_port.c bfa_ioc_mbox_regisr(port->ioc, BFI_MC_PORT, bfa_port_isr, port); ioc 476 drivers/scsi/bfa/bfa_port.c list_add_tail(&port->ioc_notify.qe, &port->ioc->notify_q); ioc 650 drivers/scsi/bfa/bfa_port.c WARN_ON((cee == NULL) || (cee->ioc == NULL)); ioc 652 drivers/scsi/bfa/bfa_port.c if (!bfa_ioc_is_operational(cee->ioc)) { ioc 666 drivers/scsi/bfa/bfa_port.c bfa_ioc_portid(cee->ioc)); ioc 668 drivers/scsi/bfa/bfa_port.c bfa_ioc_mbox_queue(cee->ioc, &cee->get_cfg_mb); ioc 690 drivers/scsi/bfa/bfa_port.c WARN_ON((cee == NULL) || (cee->ioc == NULL)); ioc 692 drivers/scsi/bfa/bfa_port.c if (!bfa_ioc_is_operational(cee->ioc)) { ioc 706 drivers/scsi/bfa/bfa_port.c bfa_ioc_portid(cee->ioc)); ioc 708 drivers/scsi/bfa/bfa_port.c bfa_ioc_mbox_queue(cee->ioc, &cee->get_stats_mb); ioc 729 drivers/scsi/bfa/bfa_port.c WARN_ON((cee == NULL) || (cee->ioc == NULL)); ioc 730 drivers/scsi/bfa/bfa_port.c if (!bfa_ioc_is_operational(cee->ioc)) { ioc 743 drivers/scsi/bfa/bfa_port.c bfa_ioc_portid(cee->ioc)); ioc 744 drivers/scsi/bfa/bfa_port.c bfa_ioc_mbox_queue(cee->ioc, &cee->reset_stats_mb); ioc 853 drivers/scsi/bfa/bfa_port.c bfa_cee_attach(struct bfa_cee_s *cee, struct bfa_ioc_s *ioc, ioc 858 drivers/scsi/bfa/bfa_port.c cee->ioc = ioc; ioc 860 drivers/scsi/bfa/bfa_port.c bfa_ioc_mbox_regisr(cee->ioc, BFI_MC_CEE, bfa_cee_isr, cee); ioc 863 drivers/scsi/bfa/bfa_port.c list_add_tail(&cee->ioc_notify.qe, &cee->ioc->notify_q); ioc 23 drivers/scsi/bfa/bfa_port.h struct bfa_ioc_s *ioc; ioc 47 drivers/scsi/bfa/bfa_port.h void bfa_port_attach(struct bfa_port_s *port, struct bfa_ioc_s *ioc, ioc 97 drivers/scsi/bfa/bfa_port.h struct bfa_ioc_s *ioc; ioc 109 drivers/scsi/bfa/bfa_port.h struct bfa_ioc_s *ioc, void *dev); ioc 41 drivers/scsi/bfa/bfa_svc.c (bfa_ioc_is_disabled(&bfa->ioc) == BFA_TRUE)) ioc 1840 drivers/scsi/bfa/bfa_svc.c if (bfa_ioc_devid(&bfa->ioc) == BFA_PCI_DEVICE_ID_CT) ioc 2214 drivers/scsi/bfa/bfa_svc.c if (!bfa_ioc_get_fcmode(&fcport->bfa->ioc)) { ioc 3227 drivers/scsi/bfa/bfa_svc.c fcport->pwwn = fcport->bfa->ioc.attr->pwwn; ioc 3228 drivers/scsi/bfa/bfa_svc.c fcport->nwwn = fcport->bfa->ioc.attr->nwwn; ioc 3284 drivers/scsi/bfa/bfa_svc.c if (bfa_ioc_get_fcmode(&fcport->bfa->ioc)) ioc 3529 drivers/scsi/bfa/bfa_svc.c fcport->cfg.maxfrsize = bfa_ioc_maxfrsize(&bfa->ioc); ioc 3530 drivers/scsi/bfa/bfa_svc.c fcport->cfg.rx_bbcredit = bfa_ioc_rx_bbcredit(&bfa->ioc); ioc 3531 drivers/scsi/bfa/bfa_svc.c fcport->speed_sup = bfa_ioc_speed_sup(&bfa->ioc); ioc 3691 drivers/scsi/bfa/bfa_svc.c if (bfa_ioc_is_disabled(&bfa->ioc)) ioc 3707 drivers/scsi/bfa/bfa_svc.c if (bfa_ioc_is_disabled(&bfa->ioc)) ioc 3750 drivers/scsi/bfa/bfa_svc.c if (bfa_ioc_get_type(&fcport->bfa->ioc) == BFA_IOC_TYPE_FC) { ioc 3753 drivers/scsi/bfa/bfa_svc.c (bfa_asic_id_ct2(bfa->ioc.pcidev.device_id))) ioc 3812 drivers/scsi/bfa/bfa_svc.c if (bfa_mfg_is_mezz(bfa->ioc.attr->card_type)) ioc 3967 drivers/scsi/bfa/bfa_svc.c attr->factorypwwn = bfa->ioc.attr->mfg_pwwn; ioc 3968 drivers/scsi/bfa/bfa_svc.c attr->factorynwwn = bfa->ioc.attr->mfg_nwwn; ioc 3997 drivers/scsi/bfa/bfa_svc.c if (bfa_ioc_is_disabled(&fcport->bfa->ioc)) ioc 3999 drivers/scsi/bfa/bfa_svc.c else if (bfa_ioc_fw_mismatch(&fcport->bfa->ioc)) ioc 4203 drivers/scsi/bfa/bfa_svc.c if (bfa_ioc_get_type(&fcport->bfa->ioc) != BFA_IOC_TYPE_FC) ioc 4206 drivers/scsi/bfa/bfa_svc.c if (bfa_mfg_is_mezz(bfa->ioc.attr->card_type) && ioc 4207 drivers/scsi/bfa/bfa_svc.c (bfa->ioc.attr->card_type != BFA_MFG_TYPE_CHINOOK)) ioc 4221 drivers/scsi/bfa/bfa_svc.c (fcport->cfg.speed < bfa_ioc_speed_sup(&bfa->ioc))) ioc 4224 drivers/scsi/bfa/bfa_svc.c if (bfa_ioc_speed_sup(&bfa->ioc) < BFA_PORT_SPEED_8GBPS) ioc 4256 drivers/scsi/bfa/bfa_svc.c if (bfa_ioc_get_type(&fcport->bfa->ioc) != BFA_IOC_TYPE_FC) ioc 5971 drivers/scsi/bfa/bfa_svc.c if (bfa_ioc_get_type(&bfa->ioc) == BFA_IOC_TYPE_FC) { ioc 5996 drivers/scsi/bfa/bfa_svc.c (bfa_asic_id_ct2(bfa->ioc.pcidev.device_id))) { ioc 6002 drivers/scsi/bfa/bfa_svc.c if (bfa_mfg_is_mezz(bfa->ioc.attr->card_type)) { ioc 6003 drivers/scsi/bfa/bfa_svc.c if (bfa_ioc_get_type(&bfa->ioc) == BFA_IOC_TYPE_FC) { ioc 6649 drivers/scsi/bfa/bfa_svc.c if (bfa_mfg_is_mezz(dport->bfa->ioc.attr->card_type)) { ioc 6657 drivers/scsi/bfa/bfa_svc.c if (!(bfa_asic_id_ct2(dport->bfa->ioc.pcidev.device_id))) { ioc 6658 drivers/scsi/bfa/bfa_svc.c bfa_trc(dport->bfa, dport->bfa->ioc.pcidev.device_id); ioc 6677 drivers/scsi/bfa/bfa_svc.c if (bfa_ioc_get_type(&bfa->ioc) != BFA_IOC_TYPE_FC) { ioc 6678 drivers/scsi/bfa/bfa_svc.c bfa_trc(dport->bfa, bfa_ioc_get_type(&bfa->ioc)); ioc 6758 drivers/scsi/bfa/bfa_svc.c if (bfa_ioc_is_disabled(&bfa->ioc)) ioc 110 drivers/scsi/bfa/bfa_svc.h typedef void (*fcxp_send_cb_t) (struct bfa_s *ioc, struct bfa_fcxp_s *fcxp, ioc 1449 drivers/scsi/bfa/bfad.c bfa_ioc_suspend(&bfad->bfa.ioc); ioc 1459 drivers/scsi/bfa/bfad.c bfa_ioc_suspend(&bfad->bfa.ioc); ioc 1591 drivers/scsi/bfa/bfad.c bfa_ioc_debug_save_ftrc(&bfad->bfa.ioc); ioc 785 drivers/scsi/bfa/bfad_attr.c if (nports == 1 && bfa_ioc_is_cna(&bfad->bfa.ioc)) ioc 788 drivers/scsi/bfa/bfad_attr.c else if (nports == 1 && !bfa_ioc_is_cna(&bfad->bfa.ioc)) ioc 791 drivers/scsi/bfa/bfad_attr.c else if (nports == 2 && bfa_ioc_is_cna(&bfad->bfa.ioc)) ioc 794 drivers/scsi/bfa/bfad_attr.c else if (nports == 2 && !bfa_ioc_is_cna(&bfad->bfa.ioc)) ioc 798 drivers/scsi/bfa/bfad_attr.c if (nports == 1 && !bfa_ioc_is_cna(&bfad->bfa.ioc)) ioc 801 drivers/scsi/bfa/bfad_attr.c else if (nports == 2 && !bfa_ioc_is_cna(&bfad->bfa.ioc)) ioc 26 drivers/scsi/bfa/bfad_bsg.c if (!bfa_ioc_is_disabled(&bfad->bfa.ioc)) { ioc 48 drivers/scsi/bfa/bfad_bsg.c if (bfa_ioc_is_disabled(&bfad->bfa.ioc)) { ioc 117 drivers/scsi/bfa/bfad_bsg.c bfa_ioc_get_attr(&bfad->bfa.ioc, &iocmd->ioc_attr); ioc 167 drivers/scsi/bfa/bfad_bsg.c iocmd->status = bfa_ioc_fw_stats_get(&bfad->bfa.ioc, iocmd_bufptr); ioc 190 drivers/scsi/bfa/bfad_bsg.c iocmd->status = bfa_ioc_fw_stats_clear(&bfad->bfa.ioc); ioc 229 drivers/scsi/bfa/bfad_bsg.c iocmd->status = bfa_ioc_fwsig_invalidate(&bfad->bfa.ioc); ioc 1955 drivers/scsi/bfa/bfad_bsg.c attr->pwwn = bfad->bfa.ioc.attr->pwwn; ioc 1956 drivers/scsi/bfa/bfad_bsg.c attr->nwwn = bfad->bfa.ioc.attr->nwwn; ioc 2041 drivers/scsi/bfa/bfad_bsg.c iocmd->status = bfa_ioc_debug_fwcore(&bfad->bfa.ioc, iocmd_bufptr, ioc 2057 drivers/scsi/bfa/bfad_bsg.c bfad->bfa.ioc.dbg_fwsave_once = BFA_TRUE; ioc 2187 drivers/scsi/bfa/bfad_bsg.c BFA_FLASH_PART_BOOT, bfad->bfa.ioc.port_id, ioc 2209 drivers/scsi/bfa/bfad_bsg.c BFA_FLASH_PART_BOOT, bfad->bfa.ioc.port_id, ioc 2251 drivers/scsi/bfa/bfad_bsg.c bfad->bfa.ioc.port_id, &iocmd->cfg, ioc 2274 drivers/scsi/bfa/bfad_bsg.c bfad->bfa.ioc.port_id, &iocmd->cfg, ioc 2357 drivers/scsi/bfa/bfad_bsg.c if (bfa_ioc_get_type(&bfad->bfa.ioc) == BFA_IOC_TYPE_FC) { ioc 2450 drivers/scsi/bfa/bfad_bsg.c WARN_ON(!bfa_ioc_get_fcmode(&bfad->bfa.ioc)); ioc 2481 drivers/scsi/bfa/bfad_bsg.c WARN_ON(!bfa_ioc_get_fcmode(&bfad->bfa.ioc)); ioc 85 drivers/scsi/bfa/bfad_debugfs.c rc = bfa_ioc_debug_fwtrc(&bfad->bfa.ioc, ioc 127 drivers/scsi/bfa/bfad_debugfs.c rc = bfa_ioc_debug_fwsave(&bfad->bfa.ioc, ioc 207 drivers/scsi/bfa/bfad_debugfs.c if ((offset + (len<<2)) > BFA_REG_ADDRMSK(&bfa->ioc)) ioc 245 drivers/scsi/bfa/bfad_debugfs.c struct bfa_ioc_s *ioc = &bfa->ioc; ioc 279 drivers/scsi/bfa/bfad_debugfs.c rb = bfa_ioc_bar0(ioc); ioc 280 drivers/scsi/bfa/bfad_debugfs.c addr &= BFA_REG_ADDRMSK(ioc); ioc 314 drivers/scsi/bfa/bfad_debugfs.c struct bfa_ioc_s *ioc = &bfa->ioc; ioc 334 drivers/scsi/bfa/bfad_debugfs.c addr &= BFA_REG_ADDRMSK(ioc); /* offset only 17 bit and word align */ ioc 345 drivers/scsi/bfa/bfad_debugfs.c reg_addr = (bfa_ioc_bar0(ioc)) + addr; ioc 1000 drivers/scsi/bfa/bfad_im.c bfa_ioc_get_attr(&bfa->ioc, ioc_attr); ioc 1168 drivers/scsi/gdth.c gdth_iochan_str *ioc; ioc 1290 drivers/scsi/gdth.c ioc = (gdth_iochan_str *)ha->pscratch; ioc 1291 drivers/scsi/gdth.c ioc->hdr.version = 0xffffffff; ioc 1292 drivers/scsi/gdth.c ioc->hdr.list_entries = MAXBUS; ioc 1293 drivers/scsi/gdth.c ioc->hdr.first_chan = 0; ioc 1294 drivers/scsi/gdth.c ioc->hdr.last_chan = MAXBUS-1; ioc 1295 drivers/scsi/gdth.c ioc->hdr.list_offset = GDTOFFSOF(gdth_iochan_str, list[0]); ioc 1299 drivers/scsi/gdth.c ha->raw[bus_no].address = ioc->list[bus_no].address; ioc 1300 drivers/scsi/gdth.c ha->raw[bus_no].local_no = ioc->list[bus_no].local_no; ioc 6441 drivers/scsi/hpsa.c BIG_IOCTL_Command_struct *ioc; ioc 6456 drivers/scsi/hpsa.c ioc = vmemdup_user(argp, sizeof(*ioc)); ioc 6457 drivers/scsi/hpsa.c if (IS_ERR(ioc)) { ioc 6458 drivers/scsi/hpsa.c status = PTR_ERR(ioc); ioc 6461 drivers/scsi/hpsa.c if ((ioc->buf_size < 1) && ioc 6462 drivers/scsi/hpsa.c (ioc->Request.Type.Direction != XFER_NONE)) { ioc 6467 drivers/scsi/hpsa.c if (ioc->malloc_size > MAX_KMALLOC_SIZE) { ioc 6471 drivers/scsi/hpsa.c if (ioc->buf_size > ioc->malloc_size * SG_ENTRIES_IN_CMD) { ioc 6485 drivers/scsi/hpsa.c left = ioc->buf_size; ioc 6486 drivers/scsi/hpsa.c data_ptr = ioc->buf; ioc 6488 drivers/scsi/hpsa.c sz = (left > ioc->malloc_size) ? ioc->malloc_size : left; ioc 6495 drivers/scsi/hpsa.c if (ioc->Request.Type.Direction & XFER_WRITE) { ioc 6513 drivers/scsi/hpsa.c memcpy(&c->Header.LUN, &ioc->LUN_info, sizeof(c->Header.LUN)); ioc 6514 drivers/scsi/hpsa.c memcpy(&c->Request, &ioc->Request, sizeof(c->Request)); ioc 6515 drivers/scsi/hpsa.c if (ioc->buf_size > 0) { ioc 6546 drivers/scsi/hpsa.c memcpy(&ioc->error_info, c->err_info, sizeof(ioc->error_info)); ioc 6547 drivers/scsi/hpsa.c if (copy_to_user(argp, ioc, sizeof(*ioc))) { ioc 6551 drivers/scsi/hpsa.c if ((ioc->Request.Type.Direction & XFER_READ) && ioc->buf_size > 0) { ioc 6555 drivers/scsi/hpsa.c BYTE __user *ptr = ioc->buf; ioc 6576 drivers/scsi/hpsa.c kvfree(ioc); ioc 8024 drivers/scsi/megaraid/megaraid_sas_base.c struct megasas_iocpacket *ioc) ioc 8039 drivers/scsi/megaraid/megaraid_sas_base.c if (ioc->sge_count > MAX_IOCTL_SGE) { ioc 8041 drivers/scsi/megaraid/megaraid_sas_base.c ioc->sge_count, MAX_IOCTL_SGE); ioc 8045 drivers/scsi/megaraid/megaraid_sas_base.c if ((ioc->frame.hdr.cmd >= MFI_CMD_OP_COUNT) || ioc 8046 drivers/scsi/megaraid/megaraid_sas_base.c ((ioc->frame.hdr.cmd == MFI_CMD_NVME) && ioc 8048 drivers/scsi/megaraid/megaraid_sas_base.c ((ioc->frame.hdr.cmd == MFI_CMD_TOOLBOX) && ioc 8052 drivers/scsi/megaraid/megaraid_sas_base.c ioc->frame.hdr.cmd); ioc 8068 drivers/scsi/megaraid/megaraid_sas_base.c memcpy(cmd->frame, ioc->frame.raw, 2 * MEGAMFI_FRAME_SIZE); ioc 8110 drivers/scsi/megaraid/megaraid_sas_base.c ((unsigned long)cmd->frame + ioc->sgl_off); ioc 8113 drivers/scsi/megaraid/megaraid_sas_base.c ((unsigned long)cmd->frame + ioc->sgl_off); ioc 8118 drivers/scsi/megaraid/megaraid_sas_base.c for (i = 0; i < ioc->sge_count; i++) { ioc 8119 drivers/scsi/megaraid/megaraid_sas_base.c if (!ioc->sgl[i].iov_len) ioc 8123 drivers/scsi/megaraid/megaraid_sas_base.c ioc->sgl[i].iov_len, ioc 8138 drivers/scsi/megaraid/megaraid_sas_base.c kern_sge64[i].length = cpu_to_le32(ioc->sgl[i].iov_len); ioc 8141 drivers/scsi/megaraid/megaraid_sas_base.c kern_sge32[i].length = cpu_to_le32(ioc->sgl[i].iov_len); ioc 8148 drivers/scsi/megaraid/megaraid_sas_base.c if (copy_from_user(kbuff_arr[i], ioc->sgl[i].iov_base, ioc 8149 drivers/scsi/megaraid/megaraid_sas_base.c (u32) (ioc->sgl[i].iov_len))) { ioc 8155 drivers/scsi/megaraid/megaraid_sas_base.c if (ioc->sense_len) { ioc 8156 drivers/scsi/megaraid/megaraid_sas_base.c sense = dma_alloc_coherent(&instance->pdev->dev, ioc->sense_len, ioc 8164 drivers/scsi/megaraid/megaraid_sas_base.c (unsigned long *) ((unsigned long)cmd->frame + ioc->sense_off); ioc 8195 drivers/scsi/megaraid/megaraid_sas_base.c for (i = 0; i < ioc->sge_count; i++) { ioc 8196 drivers/scsi/megaraid/megaraid_sas_base.c if (copy_to_user(ioc->sgl[i].iov_base, kbuff_arr[i], ioc 8197 drivers/scsi/megaraid/megaraid_sas_base.c ioc->sgl[i].iov_len)) { ioc 8206 drivers/scsi/megaraid/megaraid_sas_base.c if (ioc->sense_len) { ioc 8211 drivers/scsi/megaraid/megaraid_sas_base.c sense_ptr = (unsigned long *) ((unsigned long)ioc->frame.raw + ioc 8212 drivers/scsi/megaraid/megaraid_sas_base.c ioc->sense_off); ioc 8216 drivers/scsi/megaraid/megaraid_sas_base.c sense, ioc->sense_len)) { ioc 8235 drivers/scsi/megaraid/megaraid_sas_base.c dma_free_coherent(&instance->pdev->dev, ioc->sense_len, ioc 8239 drivers/scsi/megaraid/megaraid_sas_base.c for (i = 0; i < ioc->sge_count; i++) { ioc 8263 drivers/scsi/megaraid/megaraid_sas_base.c struct megasas_iocpacket *ioc; ioc 8267 drivers/scsi/megaraid/megaraid_sas_base.c ioc = memdup_user(user_ioc, sizeof(*ioc)); ioc 8268 drivers/scsi/megaraid/megaraid_sas_base.c if (IS_ERR(ioc)) ioc 8269 drivers/scsi/megaraid/megaraid_sas_base.c return PTR_ERR(ioc); ioc 8271 drivers/scsi/megaraid/megaraid_sas_base.c instance = megasas_lookup_instance(ioc->host_no); ioc 8304 drivers/scsi/megaraid/megaraid_sas_base.c error = megasas_mgmt_fw_ioctl(instance, user_ioc, ioc); ioc 8309 drivers/scsi/megaraid/megaraid_sas_base.c kfree(ioc); ioc 8373 drivers/scsi/megaraid/megaraid_sas_base.c struct megasas_iocpacket __user *ioc = ioc 8382 drivers/scsi/megaraid/megaraid_sas_base.c if (clear_user(ioc, sizeof(*ioc))) ioc 8385 drivers/scsi/megaraid/megaraid_sas_base.c if (copy_in_user(&ioc->host_no, &cioc->host_no, sizeof(u16)) || ioc 8386 drivers/scsi/megaraid/megaraid_sas_base.c copy_in_user(&ioc->sgl_off, &cioc->sgl_off, sizeof(u32)) || ioc 8387 drivers/scsi/megaraid/megaraid_sas_base.c copy_in_user(&ioc->sense_off, &cioc->sense_off, sizeof(u32)) || ioc 8388 drivers/scsi/megaraid/megaraid_sas_base.c copy_in_user(&ioc->sense_len, &cioc->sense_len, sizeof(u32)) || ioc 8389 drivers/scsi/megaraid/megaraid_sas_base.c copy_in_user(ioc->frame.raw, cioc->frame.raw, 128) || ioc 8390 drivers/scsi/megaraid/megaraid_sas_base.c copy_in_user(&ioc->sge_count, &cioc->sge_count, sizeof(u32))) ioc 8398 drivers/scsi/megaraid/megaraid_sas_base.c if (get_user(local_sense_off, &ioc->sense_off) || ioc 8399 drivers/scsi/megaraid/megaraid_sas_base.c get_user(local_sense_len, &ioc->sense_len) || ioc 8408 drivers/scsi/megaraid/megaraid_sas_base.c (void __user **)((u8 *)((unsigned long)&ioc->frame.raw) + local_sense_off); ioc 8418 drivers/scsi/megaraid/megaraid_sas_base.c put_user(compat_ptr(ptr), &ioc->sgl[i].iov_base) || ioc 8419 drivers/scsi/megaraid/megaraid_sas_base.c copy_in_user(&ioc->sgl[i].iov_len, ioc 8424 drivers/scsi/megaraid/megaraid_sas_base.c error = megasas_mgmt_ioctl_fw(file, (unsigned long)ioc); ioc 8427 drivers/scsi/megaraid/megaraid_sas_base.c &ioc->frame.hdr.cmd_status, sizeof(u8))) { ioc 127 drivers/scsi/mpt3sas/mpt3sas_base.c _base_get_ioc_facts(struct MPT3SAS_ADAPTER *ioc); ioc 142 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_check_cmd_timeout(struct MPT3SAS_ADAPTER *ioc, ioc 150 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "Command %s\n", ioc 168 drivers/scsi/mpt3sas/mpt3sas_base.c struct MPT3SAS_ADAPTER *ioc; ioc 176 drivers/scsi/mpt3sas/mpt3sas_base.c list_for_each_entry(ioc, &mpt3sas_ioc_list, list) ioc 177 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->fwfault_debug = mpt3sas_fwfault_debug; ioc 219 drivers/scsi/mpt3sas/mpt3sas_base.c _base_clone_reply_to_sys_mem(struct MPT3SAS_ADAPTER *ioc, u32 reply, ioc 227 drivers/scsi/mpt3sas/mpt3sas_base.c u16 cmd_credit = ioc->facts.RequestCredit + 1; ioc 228 drivers/scsi/mpt3sas/mpt3sas_base.c void __iomem *reply_free_iomem = (void __iomem *)ioc->chip + ioc 230 drivers/scsi/mpt3sas/mpt3sas_base.c (cmd_credit * ioc->request_sz) + (index * sizeof(u32)); ioc 283 drivers/scsi/mpt3sas/mpt3sas_base.c _base_get_chain(struct MPT3SAS_ADAPTER *ioc, u16 smid, ioc 287 drivers/scsi/mpt3sas/mpt3sas_base.c u16 cmd_credit = ioc->facts.RequestCredit + 1; ioc 289 drivers/scsi/mpt3sas/mpt3sas_base.c base_chain = (void __iomem *)ioc->chip + MPI_FRAME_START_OFFSET + ioc 290 drivers/scsi/mpt3sas/mpt3sas_base.c (cmd_credit * ioc->request_sz) + ioc 292 drivers/scsi/mpt3sas/mpt3sas_base.c chain_virt = base_chain + (smid * ioc->facts.MaxChainDepth * ioc 293 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->request_sz) + (sge_chain_count * ioc->request_sz); ioc 309 drivers/scsi/mpt3sas/mpt3sas_base.c _base_get_chain_phys(struct MPT3SAS_ADAPTER *ioc, u16 smid, ioc 313 drivers/scsi/mpt3sas/mpt3sas_base.c u16 cmd_credit = ioc->facts.RequestCredit + 1; ioc 315 drivers/scsi/mpt3sas/mpt3sas_base.c base_chain_phys = ioc->chip_phys + MPI_FRAME_START_OFFSET + ioc 316 drivers/scsi/mpt3sas/mpt3sas_base.c (cmd_credit * ioc->request_sz) + ioc 318 drivers/scsi/mpt3sas/mpt3sas_base.c chain_phys = base_chain_phys + (smid * ioc->facts.MaxChainDepth * ioc 319 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->request_sz) + (sge_chain_count * ioc->request_sz); ioc 335 drivers/scsi/mpt3sas/mpt3sas_base.c _base_get_buffer_bar0(struct MPT3SAS_ADAPTER *ioc, u16 smid) ioc 337 drivers/scsi/mpt3sas/mpt3sas_base.c u16 cmd_credit = ioc->facts.RequestCredit + 1; ioc 339 drivers/scsi/mpt3sas/mpt3sas_base.c void __iomem *chain_end = _base_get_chain(ioc, ioc 341 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->facts.MaxChainDepth); ioc 356 drivers/scsi/mpt3sas/mpt3sas_base.c _base_get_buffer_phys_bar0(struct MPT3SAS_ADAPTER *ioc, u16 smid) ioc 358 drivers/scsi/mpt3sas/mpt3sas_base.c u16 cmd_credit = ioc->facts.RequestCredit + 1; ioc 359 drivers/scsi/mpt3sas/mpt3sas_base.c phys_addr_t chain_end_phys = _base_get_chain_phys(ioc, ioc 361 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->facts.MaxChainDepth); ioc 377 drivers/scsi/mpt3sas/mpt3sas_base.c _base_get_chain_buffer_dma_to_chain_buffer(struct MPT3SAS_ADAPTER *ioc, ioc 383 drivers/scsi/mpt3sas/mpt3sas_base.c for (index = 0; index < ioc->scsiio_depth; index++) { ioc 384 drivers/scsi/mpt3sas/mpt3sas_base.c for (j = 0; j < ioc->chains_needed_per_io; j++) { ioc 385 drivers/scsi/mpt3sas/mpt3sas_base.c ct = &ioc->chain_lookup[index].chains_per_smid[j]; ioc 390 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "Provided chain_buffer_dma address is not in the lookup list\n"); ioc 404 drivers/scsi/mpt3sas/mpt3sas_base.c static void _clone_sg_entries(struct MPT3SAS_ADAPTER *ioc, ioc 444 drivers/scsi/mpt3sas/mpt3sas_base.c scmd = mpt3sas_scsih_scsi_lookup_get(ioc, smid); ioc 446 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "scmd is NULL\n"); ioc 469 drivers/scsi/mpt3sas/mpt3sas_base.c buffer_iomem = _base_get_buffer_bar0(ioc, smid); ioc 470 drivers/scsi/mpt3sas/mpt3sas_base.c buffer_iomem_phys = _base_get_buffer_phys_bar0(ioc, smid); ioc 480 drivers/scsi/mpt3sas/mpt3sas_base.c for (i = 0; i < MPT_MIN_PHYS_SEGMENTS + ioc->facts.MaxChainDepth; i++) { ioc 493 drivers/scsi/mpt3sas/mpt3sas_base.c _base_get_chain_buffer_dma_to_chain_buffer(ioc, ioc 502 drivers/scsi/mpt3sas/mpt3sas_base.c _base_get_chain(ioc, ioc 506 drivers/scsi/mpt3sas/mpt3sas_base.c dst_addr_phys = _base_get_chain_phys(ioc, ioc 529 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->config_vaddr, ioc 567 drivers/scsi/mpt3sas/mpt3sas_base.c src_chain_addr[i], ioc->request_sz); ioc 581 drivers/scsi/mpt3sas/mpt3sas_base.c struct MPT3SAS_ADAPTER *ioc = (struct MPT3SAS_ADAPTER *)arg; ioc 584 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc) ioc 587 drivers/scsi/mpt3sas/mpt3sas_base.c pdev = ioc->pdev; ioc 603 drivers/scsi/mpt3sas/mpt3sas_base.c struct MPT3SAS_ADAPTER *ioc = ioc 611 drivers/scsi/mpt3sas/mpt3sas_base.c spin_lock_irqsave(&ioc->ioc_reset_in_progress_lock, flags); ioc 612 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->shost_recovery || ioc->pci_error_recovery) ioc 614 drivers/scsi/mpt3sas/mpt3sas_base.c spin_unlock_irqrestore(&ioc->ioc_reset_in_progress_lock, flags); ioc 616 drivers/scsi/mpt3sas/mpt3sas_base.c doorbell = mpt3sas_base_get_iocstate(ioc, 0); ioc 618 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "SAS host is non-operational !!!!\n"); ioc 628 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->non_operational_loop++ < 5) { ioc 629 drivers/scsi/mpt3sas/mpt3sas_base.c spin_lock_irqsave(&ioc->ioc_reset_in_progress_lock, ioc 641 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->schedule_dead_ioc_flush_running_cmds(ioc); ioc 646 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->remove_host = 1; ioc 648 drivers/scsi/mpt3sas/mpt3sas_base.c p = kthread_run(mpt3sas_remove_dead_ioc_func, ioc, ioc 649 drivers/scsi/mpt3sas/mpt3sas_base.c "%s_dead_ioc_%d", ioc->driver_name, ioc->id); ioc 651 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: Running mpt3sas_dead_ioc thread failed !!!!\n", ioc 654 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: Running mpt3sas_dead_ioc thread success !!!!\n", ioc 659 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->non_operational_loop = 0; ioc 662 drivers/scsi/mpt3sas/mpt3sas_base.c rc = mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER); ioc 663 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_warn(ioc, "%s: hard reset: %s\n", ioc 665 drivers/scsi/mpt3sas/mpt3sas_base.c doorbell = mpt3sas_base_get_iocstate(ioc, 0); ioc 667 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_fault_info(ioc, doorbell & ioc 674 drivers/scsi/mpt3sas/mpt3sas_base.c spin_lock_irqsave(&ioc->ioc_reset_in_progress_lock, flags); ioc 676 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->fault_reset_work_q) ioc 677 drivers/scsi/mpt3sas/mpt3sas_base.c queue_delayed_work(ioc->fault_reset_work_q, ioc 678 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->fault_reset_work, ioc 680 drivers/scsi/mpt3sas/mpt3sas_base.c spin_unlock_irqrestore(&ioc->ioc_reset_in_progress_lock, flags); ioc 690 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_start_watchdog(struct MPT3SAS_ADAPTER *ioc) ioc 694 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->fault_reset_work_q) ioc 699 drivers/scsi/mpt3sas/mpt3sas_base.c INIT_DELAYED_WORK(&ioc->fault_reset_work, _base_fault_reset_work); ioc 700 drivers/scsi/mpt3sas/mpt3sas_base.c snprintf(ioc->fault_reset_work_q_name, ioc 701 drivers/scsi/mpt3sas/mpt3sas_base.c sizeof(ioc->fault_reset_work_q_name), "poll_%s%d_status", ioc 702 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->driver_name, ioc->id); ioc 703 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->fault_reset_work_q = ioc 704 drivers/scsi/mpt3sas/mpt3sas_base.c create_singlethread_workqueue(ioc->fault_reset_work_q_name); ioc 705 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->fault_reset_work_q) { ioc 706 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: failed (line=%d)\n", __func__, __LINE__); ioc 709 drivers/scsi/mpt3sas/mpt3sas_base.c spin_lock_irqsave(&ioc->ioc_reset_in_progress_lock, flags); ioc 710 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->fault_reset_work_q) ioc 711 drivers/scsi/mpt3sas/mpt3sas_base.c queue_delayed_work(ioc->fault_reset_work_q, ioc 712 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->fault_reset_work, ioc 714 drivers/scsi/mpt3sas/mpt3sas_base.c spin_unlock_irqrestore(&ioc->ioc_reset_in_progress_lock, flags); ioc 724 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_stop_watchdog(struct MPT3SAS_ADAPTER *ioc) ioc 729 drivers/scsi/mpt3sas/mpt3sas_base.c spin_lock_irqsave(&ioc->ioc_reset_in_progress_lock, flags); ioc 730 drivers/scsi/mpt3sas/mpt3sas_base.c wq = ioc->fault_reset_work_q; ioc 731 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->fault_reset_work_q = NULL; ioc 732 drivers/scsi/mpt3sas/mpt3sas_base.c spin_unlock_irqrestore(&ioc->ioc_reset_in_progress_lock, flags); ioc 734 drivers/scsi/mpt3sas/mpt3sas_base.c if (!cancel_delayed_work_sync(&ioc->fault_reset_work)) ioc 746 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_fault_info(struct MPT3SAS_ADAPTER *ioc , u16 fault_code) ioc 748 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "fault_state(0x%04x)!\n", fault_code); ioc 761 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_halt_firmware(struct MPT3SAS_ADAPTER *ioc) ioc 765 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->fwfault_debug) ioc 770 drivers/scsi/mpt3sas/mpt3sas_base.c doorbell = ioc->base_readl(&ioc->chip->Doorbell); ioc 772 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_fault_info(ioc , doorbell); ioc 774 drivers/scsi/mpt3sas/mpt3sas_base.c writel(0xC0FFEE00, &ioc->chip->Doorbell); ioc 775 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "Firmware is halted due to command timeout\n"); ioc 778 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->fwfault_debug == 2) ioc 792 drivers/scsi/mpt3sas/mpt3sas_base.c _base_sas_ioc_info(struct MPT3SAS_ADAPTER *ioc, MPI2DefaultReply_t *mpi_reply, ioc 964 drivers/scsi/mpt3sas/mpt3sas_base.c frame_sz = sizeof(Mpi2ConfigRequest_t) + ioc->sge_size; ioc 988 drivers/scsi/mpt3sas/mpt3sas_base.c frame_sz = sizeof(Mpi2SmpPassthroughRequest_t) + ioc->sge_size; ioc 993 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->sge_size; ioc 1002 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_warn(ioc, "ioc_status: %s(0x%04x), request(0x%p),(%s)\n", ioc 1014 drivers/scsi/mpt3sas/mpt3sas_base.c _base_display_event_data(struct MPT3SAS_ADAPTER *ioc, ioc 1020 drivers/scsi/mpt3sas/mpt3sas_base.c if (!(ioc->logging_level & MPT_DEBUG_EVENTS)) ioc 1042 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->hide_ir_msg) ioc 1049 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "Discovery: (%s)", ioc 1074 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->hide_ir_msg) ioc 1078 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->hide_ir_msg) ioc 1082 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->hide_ir_msg) ioc 1086 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->hide_ir_msg) ioc 1105 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "PCIE Enumeration: (%s)", ioc 1122 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", desc); ioc 1131 drivers/scsi/mpt3sas/mpt3sas_base.c _base_sas_log_info(struct MPT3SAS_ADAPTER *ioc , u32 log_info) ioc 1154 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->ignore_loginfos && (log_info == 0x30050000 || log_info == ioc 1166 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->hide_ir_msg) ioc 1173 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_warn(ioc, "log_info(0x%08x): originator(%s), code(0x%02x), sub_code(0x%04x)\n", ioc 1186 drivers/scsi/mpt3sas/mpt3sas_base.c _base_display_reply_info(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index, ioc 1193 drivers/scsi/mpt3sas/mpt3sas_base.c mpi_reply = mpt3sas_base_get_reply_virt_addr(ioc, reply); ioc 1195 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "mpi_reply not valid at %s:%d/%s()!\n", ioc 1202 drivers/scsi/mpt3sas/mpt3sas_base.c (ioc->logging_level & MPT_DEBUG_REPLY)) { ioc 1203 drivers/scsi/mpt3sas/mpt3sas_base.c _base_sas_ioc_info(ioc , mpi_reply, ioc 1204 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_get_msg_frame(ioc, smid)); ioc 1209 drivers/scsi/mpt3sas/mpt3sas_base.c _base_sas_log_info(ioc, loginfo); ioc 1214 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_trigger_mpi(ioc, ioc_status, loginfo); ioc 1230 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_done(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index, ioc 1235 drivers/scsi/mpt3sas/mpt3sas_base.c mpi_reply = mpt3sas_base_get_reply_virt_addr(ioc, reply); ioc 1237 drivers/scsi/mpt3sas/mpt3sas_base.c return mpt3sas_check_for_pending_internal_cmds(ioc, smid); ioc 1239 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->base_cmds.status == MPT3_CMD_NOT_USED) ioc 1242 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_cmds.status |= MPT3_CMD_COMPLETE; ioc 1244 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_cmds.status |= MPT3_CMD_REPLY_VALID; ioc 1245 drivers/scsi/mpt3sas/mpt3sas_base.c memcpy(ioc->base_cmds.reply, mpi_reply, mpi_reply->MsgLength*4); ioc 1247 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_cmds.status &= ~MPT3_CMD_PENDING; ioc 1249 drivers/scsi/mpt3sas/mpt3sas_base.c complete(&ioc->base_cmds.done); ioc 1264 drivers/scsi/mpt3sas/mpt3sas_base.c _base_async_event(struct MPT3SAS_ADAPTER *ioc, u8 msix_index, u32 reply) ioc 1271 drivers/scsi/mpt3sas/mpt3sas_base.c mpi_reply = mpt3sas_base_get_reply_virt_addr(ioc, reply); ioc 1277 drivers/scsi/mpt3sas/mpt3sas_base.c _base_display_event_data(ioc, mpi_reply); ioc 1281 drivers/scsi/mpt3sas/mpt3sas_base.c smid = mpt3sas_base_get_smid(ioc, ioc->base_cb_idx); ioc 1291 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->delayed_event_ack_list); ioc 1292 drivers/scsi/mpt3sas/mpt3sas_base.c dewtprintk(ioc, ioc 1293 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "DELAYED: EVENT ACK: event (0x%04x)\n", ioc 1298 drivers/scsi/mpt3sas/mpt3sas_base.c ack_request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 1305 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->put_smid_default(ioc, smid); ioc 1310 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_scsih_event_callback(ioc, msix_index, reply); ioc 1313 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_ctl_event_callback(ioc, msix_index, reply); ioc 1319 drivers/scsi/mpt3sas/mpt3sas_base.c _get_st_from_smid(struct MPT3SAS_ADAPTER *ioc, u16 smid) ioc 1324 drivers/scsi/mpt3sas/mpt3sas_base.c WARN_ON(smid >= ioc->hi_priority_smid)) ioc 1327 drivers/scsi/mpt3sas/mpt3sas_base.c cmd = mpt3sas_scsih_scsi_lookup_get(ioc, smid); ioc 1342 drivers/scsi/mpt3sas/mpt3sas_base.c _base_get_cb_idx(struct MPT3SAS_ADAPTER *ioc, u16 smid) ioc 1345 drivers/scsi/mpt3sas/mpt3sas_base.c u16 ctl_smid = ioc->scsiio_depth - INTERNAL_SCSIIO_CMDS_COUNT + 1; ioc 1348 drivers/scsi/mpt3sas/mpt3sas_base.c if (smid < ioc->hi_priority_smid) { ioc 1352 drivers/scsi/mpt3sas/mpt3sas_base.c st = _get_st_from_smid(ioc, smid); ioc 1356 drivers/scsi/mpt3sas/mpt3sas_base.c cb_idx = ioc->ctl_cb_idx; ioc 1357 drivers/scsi/mpt3sas/mpt3sas_base.c } else if (smid < ioc->internal_smid) { ioc 1358 drivers/scsi/mpt3sas/mpt3sas_base.c i = smid - ioc->hi_priority_smid; ioc 1359 drivers/scsi/mpt3sas/mpt3sas_base.c cb_idx = ioc->hpr_lookup[i].cb_idx; ioc 1360 drivers/scsi/mpt3sas/mpt3sas_base.c } else if (smid <= ioc->hba_queue_depth) { ioc 1361 drivers/scsi/mpt3sas/mpt3sas_base.c i = smid - ioc->internal_smid; ioc 1362 drivers/scsi/mpt3sas/mpt3sas_base.c cb_idx = ioc->internal_lookup[i].cb_idx; ioc 1374 drivers/scsi/mpt3sas/mpt3sas_base.c _base_mask_interrupts(struct MPT3SAS_ADAPTER *ioc) ioc 1378 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->mask_interrupts = 1; ioc 1379 drivers/scsi/mpt3sas/mpt3sas_base.c him_register = ioc->base_readl(&ioc->chip->HostInterruptMask); ioc 1381 drivers/scsi/mpt3sas/mpt3sas_base.c writel(him_register, &ioc->chip->HostInterruptMask); ioc 1382 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_readl(&ioc->chip->HostInterruptMask); ioc 1392 drivers/scsi/mpt3sas/mpt3sas_base.c _base_unmask_interrupts(struct MPT3SAS_ADAPTER *ioc) ioc 1396 drivers/scsi/mpt3sas/mpt3sas_base.c him_register = ioc->base_readl(&ioc->chip->HostInterruptMask); ioc 1398 drivers/scsi/mpt3sas/mpt3sas_base.c writel(him_register, &ioc->chip->HostInterruptMask); ioc 1399 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->mask_interrupts = 0; ioc 1438 drivers/scsi/mpt3sas/mpt3sas_base.c struct MPT3SAS_ADAPTER *ioc = reply_q->ioc; ioc 1467 drivers/scsi/mpt3sas/mpt3sas_base.c cb_idx = _base_get_cb_idx(ioc, smid); ioc 1470 drivers/scsi/mpt3sas/mpt3sas_base.c rc = mpt_callbacks[cb_idx](ioc, smid, ioc 1473 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_free_smid(ioc, smid); ioc 1479 drivers/scsi/mpt3sas/mpt3sas_base.c if (reply > ioc->reply_dma_max_address || ioc 1480 drivers/scsi/mpt3sas/mpt3sas_base.c reply < ioc->reply_dma_min_address) ioc 1483 drivers/scsi/mpt3sas/mpt3sas_base.c cb_idx = _base_get_cb_idx(ioc, smid); ioc 1486 drivers/scsi/mpt3sas/mpt3sas_base.c rc = mpt_callbacks[cb_idx](ioc, smid, ioc 1489 drivers/scsi/mpt3sas/mpt3sas_base.c _base_display_reply_info(ioc, ioc 1492 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_free_smid(ioc, ioc 1496 drivers/scsi/mpt3sas/mpt3sas_base.c _base_async_event(ioc, msix_index, reply); ioc 1501 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_free_host_index = ioc 1502 drivers/scsi/mpt3sas/mpt3sas_base.c (ioc->reply_free_host_index == ioc 1503 drivers/scsi/mpt3sas/mpt3sas_base.c (ioc->reply_free_queue_depth - 1)) ? ioc 1504 drivers/scsi/mpt3sas/mpt3sas_base.c 0 : ioc->reply_free_host_index + 1; ioc 1505 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_free[ioc->reply_free_host_index] = ioc 1507 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->is_mcpu_endpoint) ioc 1508 drivers/scsi/mpt3sas/mpt3sas_base.c _base_clone_reply_to_sys_mem(ioc, ioc 1510 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_free_host_index); ioc 1511 drivers/scsi/mpt3sas/mpt3sas_base.c writel(ioc->reply_free_host_index, ioc 1512 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->chip->ReplyFreeHostIndex); ioc 1519 drivers/scsi/mpt3sas/mpt3sas_base.c (ioc->reply_post_queue_depth - 1)) ? 0 : ioc 1530 drivers/scsi/mpt3sas/mpt3sas_base.c if (!base_mod64(completed_cmds, ioc->thresh_hold)) { ioc 1531 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->combined_reply_queue) { ioc 1535 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->replyPostRegisterIndex[msix_index/8]); ioc 1540 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->chip->ReplyPostHostIndex); ioc 1564 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->is_warpdrive) { ioc 1566 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_post_host_index[msix_index]); ioc 1586 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->combined_reply_queue) ioc 1589 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->replyPostRegisterIndex[msix_index/8]); ioc 1593 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->chip->ReplyPostHostIndex); ioc 1609 drivers/scsi/mpt3sas/mpt3sas_base.c struct MPT3SAS_ADAPTER *ioc = reply_q->ioc; ioc 1611 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->mask_interrupts) ioc 1656 drivers/scsi/mpt3sas/mpt3sas_base.c _base_init_irqpolls(struct MPT3SAS_ADAPTER *ioc) ioc 1660 drivers/scsi/mpt3sas/mpt3sas_base.c if (list_empty(&ioc->reply_queue_list)) ioc 1663 drivers/scsi/mpt3sas/mpt3sas_base.c list_for_each_entry_safe(reply_q, next, &ioc->reply_queue_list, list) { ioc 1665 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->hba_queue_depth/4, _base_irqpoll); ioc 1668 drivers/scsi/mpt3sas/mpt3sas_base.c reply_q->os_irq = pci_irq_vector(ioc->pdev, ioc 1680 drivers/scsi/mpt3sas/mpt3sas_base.c _base_is_controller_msix_enabled(struct MPT3SAS_ADAPTER *ioc) ioc 1682 drivers/scsi/mpt3sas/mpt3sas_base.c return (ioc->facts.IOCCapabilities & ioc 1683 drivers/scsi/mpt3sas/mpt3sas_base.c MPI2_IOCFACTS_CAPABILITY_MSI_X_INDEX) && ioc->msix_enable; ioc 1694 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_sync_reply_irqs(struct MPT3SAS_ADAPTER *ioc) ioc 1701 drivers/scsi/mpt3sas/mpt3sas_base.c if (!_base_is_controller_msix_enabled(ioc)) ioc 1704 drivers/scsi/mpt3sas/mpt3sas_base.c list_for_each_entry(reply_q, &ioc->reply_queue_list, list) { ioc 1705 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->shost_recovery || ioc->remove_host || ioc 1706 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pci_error_recovery) ioc 1722 drivers/scsi/mpt3sas/mpt3sas_base.c synchronize_irq(pci_irq_vector(ioc->pdev, reply_q->msix_index)); ioc 1778 drivers/scsi/mpt3sas/mpt3sas_base.c _base_build_zero_len_sge(struct MPT3SAS_ADAPTER *ioc, void *paddr) ioc 1784 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_add_sg_single(paddr, flags_length, -1); ioc 1831 drivers/scsi/mpt3sas/mpt3sas_base.c _base_get_chain_buffer_tracker(struct MPT3SAS_ADAPTER *ioc, ioc 1838 drivers/scsi/mpt3sas/mpt3sas_base.c atomic_read(&ioc->chain_lookup[smid - 1].chain_offset); ioc 1840 drivers/scsi/mpt3sas/mpt3sas_base.c if (chain_offset == ioc->chains_needed_per_io) ioc 1843 drivers/scsi/mpt3sas/mpt3sas_base.c chain_req = &ioc->chain_lookup[smid - 1].chains_per_smid[chain_offset]; ioc 1844 drivers/scsi/mpt3sas/mpt3sas_base.c atomic_inc(&ioc->chain_lookup[smid - 1].chain_offset); ioc 1859 drivers/scsi/mpt3sas/mpt3sas_base.c _base_build_sg(struct MPT3SAS_ADAPTER *ioc, void *psge, ioc 1866 drivers/scsi/mpt3sas/mpt3sas_base.c _base_build_zero_len_sge(ioc, psge); ioc 1875 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_add_sg_single(psge, sgl_flags | ioc 1879 drivers/scsi/mpt3sas/mpt3sas_base.c psge += ioc->sge_size; ioc 1886 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_add_sg_single(psge, sgl_flags | ioc 1893 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_add_sg_single(psge, sgl_flags | ioc 1900 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_add_sg_single(psge, sgl_flags | ioc 1962 drivers/scsi/mpt3sas/mpt3sas_base.c _base_build_nvme_prp(struct MPT3SAS_ADAPTER *ioc, u16 smid, ioc 1990 drivers/scsi/mpt3sas/mpt3sas_base.c prp_page = (__le64 *)mpt3sas_base_get_pcie_sgl(ioc, smid); ioc 1991 drivers/scsi/mpt3sas/mpt3sas_base.c prp_page_dma = mpt3sas_base_get_pcie_sgl_dma(ioc, smid); ioc 1997 drivers/scsi/mpt3sas/mpt3sas_base.c page_mask = ioc->page_size - 1; ioc 2047 drivers/scsi/mpt3sas/mpt3sas_base.c entry_len = ioc->page_size - offset; ioc 2067 drivers/scsi/mpt3sas/mpt3sas_base.c if (length > ioc->page_size) { ioc 2129 drivers/scsi/mpt3sas/mpt3sas_base.c base_make_prp_nvme(struct MPT3SAS_ADAPTER *ioc, ioc 2144 drivers/scsi/mpt3sas/mpt3sas_base.c nvme_pg_size = max_t(u32, ioc->page_size, NVME_PRP_PAGE_SIZE); ioc 2183 drivers/scsi/mpt3sas/mpt3sas_base.c curr_buff = mpt3sas_base_get_pcie_sgl(ioc, smid); ioc 2184 drivers/scsi/mpt3sas/mpt3sas_base.c msg_dma = mpt3sas_base_get_pcie_sgl_dma(ioc, smid); ioc 2256 drivers/scsi/mpt3sas/mpt3sas_base.c base_is_prp_possible(struct MPT3SAS_ADAPTER *ioc, ioc 2294 drivers/scsi/mpt3sas/mpt3sas_base.c _base_check_pcie_native_sgl(struct MPT3SAS_ADAPTER *ioc, ioc 2310 drivers/scsi/mpt3sas/mpt3sas_base.c if (base_is_prp_possible(ioc, pcie_device, ioc 2319 drivers/scsi/mpt3sas/mpt3sas_base.c base_make_prp_nvme(ioc, scmd, mpi_request, ioc 2358 drivers/scsi/mpt3sas/mpt3sas_base.c _base_build_zero_len_sge_ieee(struct MPT3SAS_ADAPTER *ioc, void *paddr) ioc 2382 drivers/scsi/mpt3sas/mpt3sas_base.c _base_build_sg_scmd(struct MPT3SAS_ADAPTER *ioc, ioc 2399 drivers/scsi/mpt3sas/mpt3sas_base.c mpi_request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 2422 drivers/scsi/mpt3sas/mpt3sas_base.c sges_in_segment = ioc->max_sges_in_main_message; ioc 2427 drivers/scsi/mpt3sas/mpt3sas_base.c (sges_in_segment * ioc->sge_size))/4; ioc 2432 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_add_sg_single(sg_local, ioc 2436 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_add_sg_single(sg_local, sgl_flags | ioc 2439 drivers/scsi/mpt3sas/mpt3sas_base.c sg_local += ioc->sge_size; ioc 2446 drivers/scsi/mpt3sas/mpt3sas_base.c chain_req = _base_get_chain_buffer_tracker(ioc, scmd); ioc 2453 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->max_sges_in_chain_message) ? sges_left : ioc 2454 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->max_sges_in_chain_message; ioc 2456 drivers/scsi/mpt3sas/mpt3sas_base.c 0 : (sges_in_segment * ioc->sge_size)/4; ioc 2457 drivers/scsi/mpt3sas/mpt3sas_base.c chain_length = sges_in_segment * ioc->sge_size; ioc 2461 drivers/scsi/mpt3sas/mpt3sas_base.c chain_length += ioc->sge_size; ioc 2463 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_add_sg_single(sg_local, chain_flags | chain_offset | ioc 2472 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_add_sg_single(sg_local, ioc 2477 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_add_sg_single(sg_local, sgl_flags | ioc 2481 drivers/scsi/mpt3sas/mpt3sas_base.c sg_local += ioc->sge_size; ioc 2486 drivers/scsi/mpt3sas/mpt3sas_base.c chain_req = _base_get_chain_buffer_tracker(ioc, scmd); ioc 2499 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_add_sg_single(sg_local, sgl_flags_end_buffer | ioc 2502 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_add_sg_single(sg_local, sgl_flags | ioc 2505 drivers/scsi/mpt3sas/mpt3sas_base.c sg_local += ioc->sge_size; ioc 2527 drivers/scsi/mpt3sas/mpt3sas_base.c _base_build_sg_scmd_ieee(struct MPT3SAS_ADAPTER *ioc, ioc 2543 drivers/scsi/mpt3sas/mpt3sas_base.c mpi_request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 2554 drivers/scsi/mpt3sas/mpt3sas_base.c if ((pcie_device) && (_base_check_pcie_native_sgl(ioc, mpi_request, ioc 2570 drivers/scsi/mpt3sas/mpt3sas_base.c sges_in_segment = (ioc->request_sz - ioc 2571 drivers/scsi/mpt3sas/mpt3sas_base.c offsetof(Mpi25SCSIIORequest_t, SGL))/ioc->sge_size_ieee; ioc 2576 drivers/scsi/mpt3sas/mpt3sas_base.c (offsetof(Mpi25SCSIIORequest_t, SGL)/ioc->sge_size_ieee); ioc 2583 drivers/scsi/mpt3sas/mpt3sas_base.c sg_local += ioc->sge_size_ieee; ioc 2589 drivers/scsi/mpt3sas/mpt3sas_base.c chain_req = _base_get_chain_buffer_tracker(ioc, scmd); ioc 2596 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->max_sges_in_chain_message) ? sges_left : ioc 2597 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->max_sges_in_chain_message; ioc 2600 drivers/scsi/mpt3sas/mpt3sas_base.c chain_length = sges_in_segment * ioc->sge_size_ieee; ioc 2602 drivers/scsi/mpt3sas/mpt3sas_base.c chain_length += ioc->sge_size_ieee; ioc 2615 drivers/scsi/mpt3sas/mpt3sas_base.c sg_local += ioc->sge_size_ieee; ioc 2620 drivers/scsi/mpt3sas/mpt3sas_base.c chain_req = _base_get_chain_buffer_tracker(ioc, scmd); ioc 2640 drivers/scsi/mpt3sas/mpt3sas_base.c sg_local += ioc->sge_size_ieee; ioc 2657 drivers/scsi/mpt3sas/mpt3sas_base.c _base_build_sg_ieee(struct MPT3SAS_ADAPTER *ioc, void *psge, ioc 2664 drivers/scsi/mpt3sas/mpt3sas_base.c _base_build_zero_len_sge_ieee(ioc, psge); ioc 2676 drivers/scsi/mpt3sas/mpt3sas_base.c psge += ioc->sge_size_ieee; ioc 2707 drivers/scsi/mpt3sas/mpt3sas_base.c _base_config_dma_addressing(struct MPT3SAS_ADAPTER *ioc, struct pci_dev *pdev) ioc 2712 drivers/scsi/mpt3sas/mpt3sas_base.c int dma_mask = (ioc->hba_mpi_version_belonged > MPI2_VERSION) ? 63 : 64; ioc 2714 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->is_mcpu_endpoint) ioc 2721 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->dma_mask) ioc 2730 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_add_sg_single = &_base_add_sg_single_64; ioc 2731 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->sge_size = sizeof(Mpi2SGESimple64_t); ioc 2732 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->dma_mask = dma_mask; ioc 2739 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_add_sg_single = &_base_add_sg_single_32; ioc 2740 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->sge_size = sizeof(Mpi2SGESimple32_t); ioc 2741 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->dma_mask = 32; ioc 2744 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%d BIT PCI BUS DMA ADDRESSING SUPPORTED, total mem (%ld kB)\n", ioc 2745 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->dma_mask, convert_to_kb(s.totalram)); ioc 2751 drivers/scsi/mpt3sas/mpt3sas_base.c _base_change_consistent_dma_mask(struct MPT3SAS_ADAPTER *ioc, ioc 2754 drivers/scsi/mpt3sas/mpt3sas_base.c if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(ioc->dma_mask))) { ioc 2769 drivers/scsi/mpt3sas/mpt3sas_base.c _base_check_enable_msix(struct MPT3SAS_ADAPTER *ioc) ioc 2777 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->pdev->device == MPI2_MFGPAGE_DEVID_SAS2008 && ioc 2778 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pdev->revision == SAS2_PCI_DEVICE_B0_REVISION) { ioc 2782 drivers/scsi/mpt3sas/mpt3sas_base.c base = pci_find_capability(ioc->pdev, PCI_CAP_ID_MSIX); ioc 2784 drivers/scsi/mpt3sas/mpt3sas_base.c dfailprintk(ioc, ioc_info(ioc, "msix not supported\n")); ioc 2790 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->pdev->device == MPI2_MFGPAGE_DEVID_SAS2004 || ioc 2791 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pdev->device == MPI2_MFGPAGE_DEVID_SAS2008 || ioc 2792 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pdev->device == MPI2_MFGPAGE_DEVID_SAS2108_1 || ioc 2793 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pdev->device == MPI2_MFGPAGE_DEVID_SAS2108_2 || ioc 2794 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pdev->device == MPI2_MFGPAGE_DEVID_SAS2108_3 || ioc 2795 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pdev->device == MPI2_MFGPAGE_DEVID_SAS2116_1 || ioc 2796 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pdev->device == MPI2_MFGPAGE_DEVID_SAS2116_2) ioc 2797 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->msix_vector_count = 1; ioc 2799 drivers/scsi/mpt3sas/mpt3sas_base.c pci_read_config_word(ioc->pdev, base + 2, &message_control); ioc 2800 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->msix_vector_count = (message_control & 0x3FF) + 1; ioc 2802 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc_info(ioc, "msix is supported, vector_count(%d)\n", ioc 2803 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->msix_vector_count)); ioc 2814 drivers/scsi/mpt3sas/mpt3sas_base.c _base_free_irq(struct MPT3SAS_ADAPTER *ioc) ioc 2818 drivers/scsi/mpt3sas/mpt3sas_base.c if (list_empty(&ioc->reply_queue_list)) ioc 2821 drivers/scsi/mpt3sas/mpt3sas_base.c list_for_each_entry_safe(reply_q, next, &ioc->reply_queue_list, list) { ioc 2823 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->smp_affinity_enable) ioc 2824 drivers/scsi/mpt3sas/mpt3sas_base.c irq_set_affinity_hint(pci_irq_vector(ioc->pdev, ioc 2826 drivers/scsi/mpt3sas/mpt3sas_base.c free_irq(pci_irq_vector(ioc->pdev, reply_q->msix_index), ioc 2840 drivers/scsi/mpt3sas/mpt3sas_base.c _base_request_irq(struct MPT3SAS_ADAPTER *ioc, u8 index) ioc 2842 drivers/scsi/mpt3sas/mpt3sas_base.c struct pci_dev *pdev = ioc->pdev; ioc 2848 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "unable to allocate memory %zu!\n", ioc 2852 drivers/scsi/mpt3sas/mpt3sas_base.c reply_q->ioc = ioc; ioc 2856 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->msix_enable) ioc 2858 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->driver_name, ioc->id, index); ioc 2861 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->driver_name, ioc->id); ioc 2872 drivers/scsi/mpt3sas/mpt3sas_base.c list_add_tail(&reply_q->list, &ioc->reply_queue_list); ioc 2886 drivers/scsi/mpt3sas/mpt3sas_base.c _base_assign_reply_queues(struct MPT3SAS_ADAPTER *ioc) ioc 2892 drivers/scsi/mpt3sas/mpt3sas_base.c if (!_base_is_controller_msix_enabled(ioc)) ioc 2895 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->msix_load_balance) ioc 2898 drivers/scsi/mpt3sas/mpt3sas_base.c memset(ioc->cpu_msix_table, 0, ioc->cpu_msix_table_sz); ioc 2901 drivers/scsi/mpt3sas/mpt3sas_base.c nr_msix = ioc->reply_queue_count = min(ioc->reply_queue_count, ioc 2902 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->facts.MaxMSIxVectors); ioc 2906 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->smp_affinity_enable) { ioc 2912 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->high_iops_queues) { ioc 2913 drivers/scsi/mpt3sas/mpt3sas_base.c local_numa_node = dev_to_node(&ioc->pdev->dev); ioc 2914 drivers/scsi/mpt3sas/mpt3sas_base.c for (index = 0; index < ioc->high_iops_queues; ioc 2916 drivers/scsi/mpt3sas/mpt3sas_base.c irq_set_affinity_hint(pci_irq_vector(ioc->pdev, ioc 2921 drivers/scsi/mpt3sas/mpt3sas_base.c list_for_each_entry(reply_q, &ioc->reply_queue_list, list) { ioc 2924 drivers/scsi/mpt3sas/mpt3sas_base.c if (reply_q->msix_index < ioc->high_iops_queues) ioc 2927 drivers/scsi/mpt3sas/mpt3sas_base.c mask = pci_irq_get_affinity(ioc->pdev, ioc 2930 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_warn(ioc, "no affinity for msi %x\n", ioc 2936 drivers/scsi/mpt3sas/mpt3sas_base.c if (cpu >= ioc->cpu_msix_table_sz) ioc 2938 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->cpu_msix_table[cpu] = reply_q->msix_index; ioc 2946 drivers/scsi/mpt3sas/mpt3sas_base.c nr_msix -= ioc->high_iops_queues; ioc 2949 drivers/scsi/mpt3sas/mpt3sas_base.c list_for_each_entry(reply_q, &ioc->reply_queue_list, list) { ioc 2952 drivers/scsi/mpt3sas/mpt3sas_base.c if (reply_q->msix_index < ioc->high_iops_queues) ioc 2962 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->cpu_msix_table[cpu] = reply_q->msix_index; ioc 2984 drivers/scsi/mpt3sas/mpt3sas_base.c _base_check_and_enable_high_iops_queues(struct MPT3SAS_ADAPTER *ioc, ioc 2991 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->high_iops_queues = 0; ioc 2997 drivers/scsi/mpt3sas/mpt3sas_base.c pcie_capability_read_word(ioc->pdev, PCI_EXP_LNKSTA, &lnksta); ioc 3001 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->high_iops_queues = 0; ioc 3006 drivers/scsi/mpt3sas/mpt3sas_base.c if (!reset_devices && ioc->is_aero_ioc && ioc 3010 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->high_iops_queues = MPT3SAS_HIGH_IOPS_REPLY_QUEUES; ioc 3012 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->high_iops_queues = 0; ioc 3021 drivers/scsi/mpt3sas/mpt3sas_base.c _base_disable_msix(struct MPT3SAS_ADAPTER *ioc) ioc 3023 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->msix_enable) ioc 3025 drivers/scsi/mpt3sas/mpt3sas_base.c pci_free_irq_vectors(ioc->pdev); ioc 3026 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->msix_enable = 0; ioc 3035 drivers/scsi/mpt3sas/mpt3sas_base.c _base_alloc_irq_vectors(struct MPT3SAS_ADAPTER *ioc) ioc 3038 drivers/scsi/mpt3sas/mpt3sas_base.c struct irq_affinity desc = { .pre_vectors = ioc->high_iops_queues }; ioc 3041 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->smp_affinity_enable) ioc 3046 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, " %d %d\n", ioc->high_iops_queues, ioc 3047 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->msix_vector_count); ioc 3049 drivers/scsi/mpt3sas/mpt3sas_base.c i = pci_alloc_irq_vectors_affinity(ioc->pdev, ioc 3050 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->high_iops_queues, ioc 3051 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->msix_vector_count, irq_flags, descp); ioc 3062 drivers/scsi/mpt3sas/mpt3sas_base.c _base_enable_msix(struct MPT3SAS_ADAPTER *ioc) ioc 3068 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->msix_load_balance = false; ioc 3076 drivers/scsi/mpt3sas/mpt3sas_base.c if (_base_check_enable_msix(ioc) != 0) ioc 3079 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "MSI-X vectors supported: %d\n", ioc->msix_vector_count); ioc 3081 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->cpu_count, max_msix_vectors); ioc 3082 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->is_aero_ioc) ioc 3083 drivers/scsi/mpt3sas/mpt3sas_base.c _base_check_and_enable_high_iops_queues(ioc, ioc 3084 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->msix_vector_count); ioc 3085 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_queue_count = ioc 3086 drivers/scsi/mpt3sas/mpt3sas_base.c min_t(int, ioc->cpu_count + ioc->high_iops_queues, ioc 3087 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->msix_vector_count); ioc 3089 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->rdpq_array_enable && max_msix_vectors == -1) ioc 3095 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_queue_count = min_t(int, local_max_msix_vectors, ioc 3096 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_queue_count); ioc 3104 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->combined_reply_queue && ioc 3105 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->hba_mpi_version_belonged != MPI2_VERSION) { ioc 3106 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->msix_load_balance = true; ioc 3113 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->msix_load_balance) ioc 3114 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->smp_affinity_enable = 0; ioc 3116 drivers/scsi/mpt3sas/mpt3sas_base.c r = _base_alloc_irq_vectors(ioc); ioc 3118 drivers/scsi/mpt3sas/mpt3sas_base.c dfailprintk(ioc, ioc 3119 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "pci_alloc_irq_vectors failed (r=%d) !!!\n", ioc 3124 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->msix_enable = 1; ioc 3125 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_queue_count = r; ioc 3126 drivers/scsi/mpt3sas/mpt3sas_base.c for (i = 0; i < ioc->reply_queue_count; i++) { ioc 3127 drivers/scsi/mpt3sas/mpt3sas_base.c r = _base_request_irq(ioc, i); ioc 3129 drivers/scsi/mpt3sas/mpt3sas_base.c _base_free_irq(ioc); ioc 3130 drivers/scsi/mpt3sas/mpt3sas_base.c _base_disable_msix(ioc); ioc 3135 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "High IOPs queues : %s\n", ioc 3136 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->high_iops_queues ? "enabled" : "disabled"); ioc 3142 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->high_iops_queues = 0; ioc 3143 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "High IOPs queues : disabled\n"); ioc 3144 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_queue_count = 1; ioc 3145 drivers/scsi/mpt3sas/mpt3sas_base.c r = pci_alloc_irq_vectors(ioc->pdev, 1, 1, PCI_IRQ_LEGACY); ioc 3147 drivers/scsi/mpt3sas/mpt3sas_base.c dfailprintk(ioc, ioc 3148 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "pci_alloc_irq_vector(legacy) failed (r=%d) !!!\n", ioc 3151 drivers/scsi/mpt3sas/mpt3sas_base.c r = _base_request_irq(ioc, 0); ioc 3161 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_unmap_resources(struct MPT3SAS_ADAPTER *ioc) ioc 3163 drivers/scsi/mpt3sas/mpt3sas_base.c struct pci_dev *pdev = ioc->pdev; ioc 3165 drivers/scsi/mpt3sas/mpt3sas_base.c dexitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); ioc 3167 drivers/scsi/mpt3sas/mpt3sas_base.c _base_free_irq(ioc); ioc 3168 drivers/scsi/mpt3sas/mpt3sas_base.c _base_disable_msix(ioc); ioc 3170 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->replyPostRegisterIndex); ioc 3171 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->replyPostRegisterIndex = NULL; ioc 3174 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->chip_phys) { ioc 3175 drivers/scsi/mpt3sas/mpt3sas_base.c iounmap(ioc->chip); ioc 3176 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->chip_phys = 0; ioc 3180 drivers/scsi/mpt3sas/mpt3sas_base.c pci_release_selected_regions(ioc->pdev, ioc->bars); ioc 3187 drivers/scsi/mpt3sas/mpt3sas_base.c _base_diag_reset(struct MPT3SAS_ADAPTER *ioc); ioc 3197 drivers/scsi/mpt3sas/mpt3sas_base.c _base_check_for_fault_and_issue_reset(struct MPT3SAS_ADAPTER *ioc) ioc 3202 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, pr_info("%s\n", __func__)); ioc 3203 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->pci_error_recovery) ioc 3205 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_state = mpt3sas_base_get_iocstate(ioc, 0); ioc 3206 drivers/scsi/mpt3sas/mpt3sas_base.c dhsprintk(ioc, pr_info("%s: ioc_state(0x%08x)\n", __func__, ioc_state)); ioc 3209 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_fault_info(ioc, ioc_state & ioc 3211 drivers/scsi/mpt3sas/mpt3sas_base.c rc = _base_diag_reset(ioc); ioc 3224 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_map_resources(struct MPT3SAS_ADAPTER *ioc) ioc 3226 drivers/scsi/mpt3sas/mpt3sas_base.c struct pci_dev *pdev = ioc->pdev; ioc 3234 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); ioc 3236 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->bars = pci_select_bars(pdev, IORESOURCE_MEM); ioc 3238 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_warn(ioc, "pci_enable_device_mem: failed\n"); ioc 3239 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->bars = 0; ioc 3244 drivers/scsi/mpt3sas/mpt3sas_base.c if (pci_request_selected_regions(pdev, ioc->bars, ioc 3245 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->driver_name)) { ioc 3246 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_warn(ioc, "pci_request_selected_regions: failed\n"); ioc 3247 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->bars = 0; ioc 3258 drivers/scsi/mpt3sas/mpt3sas_base.c if (_base_config_dma_addressing(ioc, pdev) != 0) { ioc 3259 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_warn(ioc, "no suitable DMA mask for %s\n", pci_name(pdev)); ioc 3274 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->chip_phys = pci_resource_start(pdev, i); ioc 3275 drivers/scsi/mpt3sas/mpt3sas_base.c chip_phys = ioc->chip_phys; ioc 3277 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->chip = ioremap(ioc->chip_phys, memap_sz); ioc 3281 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->chip == NULL) { ioc 3282 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "unable to map adapter memory! or resource not found\n"); ioc 3287 drivers/scsi/mpt3sas/mpt3sas_base.c _base_mask_interrupts(ioc); ioc 3289 drivers/scsi/mpt3sas/mpt3sas_base.c r = _base_get_ioc_facts(ioc); ioc 3291 drivers/scsi/mpt3sas/mpt3sas_base.c rc = _base_check_for_fault_and_issue_reset(ioc); ioc 3292 drivers/scsi/mpt3sas/mpt3sas_base.c if (rc || (_base_get_ioc_facts(ioc))) ioc 3296 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->rdpq_array_enable_assigned) { ioc 3297 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->rdpq_array_enable = ioc->rdpq_array_capable; ioc 3298 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->rdpq_array_enable_assigned = 1; ioc 3301 drivers/scsi/mpt3sas/mpt3sas_base.c r = _base_enable_msix(ioc); ioc 3305 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->is_driver_loading) ioc 3306 drivers/scsi/mpt3sas/mpt3sas_base.c _base_init_irqpolls(ioc); ioc 3310 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->combined_reply_queue) { ioc 3317 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->replyPostRegisterIndex = kcalloc( ioc 3318 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->combined_reply_index_count, ioc 3320 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->replyPostRegisterIndex) { ioc 3321 drivers/scsi/mpt3sas/mpt3sas_base.c dfailprintk(ioc, ioc 3322 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_warn(ioc, "allocation for reply Post Register Index failed!!!\n")); ioc 3327 drivers/scsi/mpt3sas/mpt3sas_base.c for (i = 0; i < ioc->combined_reply_index_count; i++) { ioc 3328 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->replyPostRegisterIndex[i] = (resource_size_t *) ioc 3329 drivers/scsi/mpt3sas/mpt3sas_base.c ((u8 __force *)&ioc->chip->Doorbell + ioc 3335 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->is_warpdrive) { ioc 3336 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_post_host_index[0] = (resource_size_t __iomem *) ioc 3337 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->chip->ReplyPostHostIndex; ioc 3339 drivers/scsi/mpt3sas/mpt3sas_base.c for (i = 1; i < ioc->cpu_msix_table_sz; i++) ioc 3340 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_post_host_index[i] = ioc 3342 drivers/scsi/mpt3sas/mpt3sas_base.c ((u8 __iomem *)&ioc->chip->Doorbell + (0x4000 + ((i - 1) ioc 3346 drivers/scsi/mpt3sas/mpt3sas_base.c list_for_each_entry(reply_q, &ioc->reply_queue_list, list) ioc 3349 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->msix_enable ? "PCI-MSI-X" : "IO-APIC", ioc 3350 drivers/scsi/mpt3sas/mpt3sas_base.c pci_irq_vector(ioc->pdev, reply_q->msix_index)); ioc 3352 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "iomem(%pap), mapped(0x%p), size(%d)\n", ioc 3353 drivers/scsi/mpt3sas/mpt3sas_base.c &chip_phys, ioc->chip, memap_sz); ioc 3354 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "ioport(0x%016llx), size(%d)\n", ioc 3362 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_unmap_resources(ioc); ioc 3374 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_get_msg_frame(struct MPT3SAS_ADAPTER *ioc, u16 smid) ioc 3376 drivers/scsi/mpt3sas/mpt3sas_base.c return (void *)(ioc->request + (smid * ioc->request_sz)); ioc 3387 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_get_sense_buffer(struct MPT3SAS_ADAPTER *ioc, u16 smid) ioc 3389 drivers/scsi/mpt3sas/mpt3sas_base.c return (void *)(ioc->sense + ((smid - 1) * SCSI_SENSE_BUFFERSIZE)); ioc 3400 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_get_sense_buffer_dma(struct MPT3SAS_ADAPTER *ioc, u16 smid) ioc 3402 drivers/scsi/mpt3sas/mpt3sas_base.c return cpu_to_le32(ioc->sense_dma + ((smid - 1) * ioc 3414 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_get_pcie_sgl(struct MPT3SAS_ADAPTER *ioc, u16 smid) ioc 3416 drivers/scsi/mpt3sas/mpt3sas_base.c return (void *)(ioc->pcie_sg_lookup[smid - 1].pcie_sgl); ioc 3427 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_get_pcie_sgl_dma(struct MPT3SAS_ADAPTER *ioc, u16 smid) ioc 3429 drivers/scsi/mpt3sas/mpt3sas_base.c return ioc->pcie_sg_lookup[smid - 1].pcie_sgl_dma; ioc 3440 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_get_reply_virt_addr(struct MPT3SAS_ADAPTER *ioc, u32 phys_addr) ioc 3444 drivers/scsi/mpt3sas/mpt3sas_base.c return ioc->reply + (phys_addr - (u32)ioc->reply_dma); ioc 3457 drivers/scsi/mpt3sas/mpt3sas_base.c _base_get_msix_index(struct MPT3SAS_ADAPTER *ioc, ioc 3461 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->msix_load_balance) ioc 3462 drivers/scsi/mpt3sas/mpt3sas_base.c return ioc->reply_queue_count ? ioc 3464 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->total_io_cnt), ioc->reply_queue_count) : 0; ioc 3466 drivers/scsi/mpt3sas/mpt3sas_base.c return ioc->cpu_msix_table[raw_smp_processor_id()]; ioc 3480 drivers/scsi/mpt3sas/mpt3sas_base.c _base_get_high_iops_msix_index(struct MPT3SAS_ADAPTER *ioc, ioc 3491 drivers/scsi/mpt3sas/mpt3sas_base.c atomic64_add_return(1, &ioc->high_iops_outstanding) / ioc 3495 drivers/scsi/mpt3sas/mpt3sas_base.c return _base_get_msix_index(ioc, scmd); ioc 3506 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_get_smid(struct MPT3SAS_ADAPTER *ioc, u8 cb_idx) ioc 3512 drivers/scsi/mpt3sas/mpt3sas_base.c spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); ioc 3513 drivers/scsi/mpt3sas/mpt3sas_base.c if (list_empty(&ioc->internal_free_list)) { ioc 3514 drivers/scsi/mpt3sas/mpt3sas_base.c spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags); ioc 3515 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: smid not available\n", __func__); ioc 3519 drivers/scsi/mpt3sas/mpt3sas_base.c request = list_entry(ioc->internal_free_list.next, ioc 3524 drivers/scsi/mpt3sas/mpt3sas_base.c spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags); ioc 3537 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_get_smid_scsiio(struct MPT3SAS_ADAPTER *ioc, u8 cb_idx, ioc 3560 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_get_smid_hpr(struct MPT3SAS_ADAPTER *ioc, u8 cb_idx) ioc 3566 drivers/scsi/mpt3sas/mpt3sas_base.c spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); ioc 3567 drivers/scsi/mpt3sas/mpt3sas_base.c if (list_empty(&ioc->hpr_free_list)) { ioc 3568 drivers/scsi/mpt3sas/mpt3sas_base.c spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags); ioc 3572 drivers/scsi/mpt3sas/mpt3sas_base.c request = list_entry(ioc->hpr_free_list.next, ioc 3577 drivers/scsi/mpt3sas/mpt3sas_base.c spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags); ioc 3582 drivers/scsi/mpt3sas/mpt3sas_base.c _base_recovery_check(struct MPT3SAS_ADAPTER *ioc) ioc 3587 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->shost_recovery && ioc->pending_io_count) { ioc 3588 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pending_io_count = scsi_host_busy(ioc->shost); ioc 3589 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->pending_io_count == 0) ioc 3590 drivers/scsi/mpt3sas/mpt3sas_base.c wake_up(&ioc->reset_wq); ioc 3594 drivers/scsi/mpt3sas/mpt3sas_base.c void mpt3sas_base_clear_st(struct MPT3SAS_ADAPTER *ioc, ioc 3602 drivers/scsi/mpt3sas/mpt3sas_base.c atomic_set(&ioc->chain_lookup[st->smid - 1].chain_offset, 0); ioc 3612 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_free_smid(struct MPT3SAS_ADAPTER *ioc, u16 smid) ioc 3617 drivers/scsi/mpt3sas/mpt3sas_base.c if (smid < ioc->hi_priority_smid) { ioc 3621 drivers/scsi/mpt3sas/mpt3sas_base.c st = _get_st_from_smid(ioc, smid); ioc 3623 drivers/scsi/mpt3sas/mpt3sas_base.c _base_recovery_check(ioc); ioc 3628 drivers/scsi/mpt3sas/mpt3sas_base.c request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 3629 drivers/scsi/mpt3sas/mpt3sas_base.c memset(request, 0, ioc->request_sz); ioc 3631 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_clear_st(ioc, st); ioc 3632 drivers/scsi/mpt3sas/mpt3sas_base.c _base_recovery_check(ioc); ioc 3636 drivers/scsi/mpt3sas/mpt3sas_base.c spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); ioc 3637 drivers/scsi/mpt3sas/mpt3sas_base.c if (smid < ioc->internal_smid) { ioc 3639 drivers/scsi/mpt3sas/mpt3sas_base.c i = smid - ioc->hi_priority_smid; ioc 3640 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->hpr_lookup[i].cb_idx = 0xFF; ioc 3641 drivers/scsi/mpt3sas/mpt3sas_base.c list_add(&ioc->hpr_lookup[i].tracker_list, &ioc->hpr_free_list); ioc 3642 drivers/scsi/mpt3sas/mpt3sas_base.c } else if (smid <= ioc->hba_queue_depth) { ioc 3644 drivers/scsi/mpt3sas/mpt3sas_base.c i = smid - ioc->internal_smid; ioc 3645 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->internal_lookup[i].cb_idx = 0xFF; ioc 3646 drivers/scsi/mpt3sas/mpt3sas_base.c list_add(&ioc->internal_lookup[i].tracker_list, ioc 3647 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->internal_free_list); ioc 3649 drivers/scsi/mpt3sas/mpt3sas_base.c spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags); ioc 3709 drivers/scsi/mpt3sas/mpt3sas_base.c _base_set_and_get_msix_index(struct MPT3SAS_ADAPTER *ioc, u16 smid) ioc 3713 drivers/scsi/mpt3sas/mpt3sas_base.c if (smid < ioc->hi_priority_smid) ioc 3714 drivers/scsi/mpt3sas/mpt3sas_base.c st = _get_st_from_smid(ioc, smid); ioc 3717 drivers/scsi/mpt3sas/mpt3sas_base.c return _base_get_msix_index(ioc, NULL); ioc 3719 drivers/scsi/mpt3sas/mpt3sas_base.c st->msix_io = ioc->get_msix_index_for_smlio(ioc, st->scmd); ioc 3730 drivers/scsi/mpt3sas/mpt3sas_base.c _base_put_smid_mpi_ep_scsi_io(struct MPT3SAS_ADAPTER *ioc, ioc 3736 drivers/scsi/mpt3sas/mpt3sas_base.c __le32 *mfp = (__le32 *)mpt3sas_base_get_msg_frame(ioc, smid); ioc 3738 drivers/scsi/mpt3sas/mpt3sas_base.c _clone_sg_entries(ioc, (void *) mfp, smid); ioc 3739 drivers/scsi/mpt3sas/mpt3sas_base.c mpi_req_iomem = (void __force *)ioc->chip + ioc 3740 drivers/scsi/mpt3sas/mpt3sas_base.c MPI_FRAME_START_OFFSET + (smid * ioc->request_sz); ioc 3742 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->request_sz); ioc 3744 drivers/scsi/mpt3sas/mpt3sas_base.c descriptor.SCSIIO.MSIxIndex = _base_set_and_get_msix_index(ioc, smid); ioc 3748 drivers/scsi/mpt3sas/mpt3sas_base.c _base_mpi_ep_writeq(*request, &ioc->chip->RequestDescriptorPostLow, ioc 3749 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->scsi_lookup_lock); ioc 3759 drivers/scsi/mpt3sas/mpt3sas_base.c _base_put_smid_scsi_io(struct MPT3SAS_ADAPTER *ioc, u16 smid, u16 handle) ioc 3766 drivers/scsi/mpt3sas/mpt3sas_base.c descriptor.SCSIIO.MSIxIndex = _base_set_and_get_msix_index(ioc, smid); ioc 3770 drivers/scsi/mpt3sas/mpt3sas_base.c _base_writeq(*request, &ioc->chip->RequestDescriptorPostLow, ioc 3771 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->scsi_lookup_lock); ioc 3781 drivers/scsi/mpt3sas/mpt3sas_base.c _base_put_smid_fast_path(struct MPT3SAS_ADAPTER *ioc, u16 smid, ioc 3789 drivers/scsi/mpt3sas/mpt3sas_base.c descriptor.SCSIIO.MSIxIndex = _base_set_and_get_msix_index(ioc, smid); ioc 3793 drivers/scsi/mpt3sas/mpt3sas_base.c _base_writeq(*request, &ioc->chip->RequestDescriptorPostLow, ioc 3794 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->scsi_lookup_lock); ioc 3804 drivers/scsi/mpt3sas/mpt3sas_base.c _base_put_smid_hi_priority(struct MPT3SAS_ADAPTER *ioc, u16 smid, ioc 3811 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->is_mcpu_endpoint) { ioc 3812 drivers/scsi/mpt3sas/mpt3sas_base.c __le32 *mfp = (__le32 *)mpt3sas_base_get_msg_frame(ioc, smid); ioc 3815 drivers/scsi/mpt3sas/mpt3sas_base.c mpi_req_iomem = (void __force *)ioc->chip ioc 3817 drivers/scsi/mpt3sas/mpt3sas_base.c + (smid * ioc->request_sz); ioc 3819 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->request_sz); ioc 3830 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->is_mcpu_endpoint) ioc 3832 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->chip->RequestDescriptorPostLow, ioc 3833 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->scsi_lookup_lock); ioc 3835 drivers/scsi/mpt3sas/mpt3sas_base.c _base_writeq(*request, &ioc->chip->RequestDescriptorPostLow, ioc 3836 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->scsi_lookup_lock); ioc 3846 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_put_smid_nvme_encap(struct MPT3SAS_ADAPTER *ioc, u16 smid) ioc 3853 drivers/scsi/mpt3sas/mpt3sas_base.c descriptor.Default.MSIxIndex = _base_set_and_get_msix_index(ioc, smid); ioc 3857 drivers/scsi/mpt3sas/mpt3sas_base.c _base_writeq(*request, &ioc->chip->RequestDescriptorPostLow, ioc 3858 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->scsi_lookup_lock); ioc 3867 drivers/scsi/mpt3sas/mpt3sas_base.c _base_put_smid_default(struct MPT3SAS_ADAPTER *ioc, u16 smid) ioc 3873 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->is_mcpu_endpoint) { ioc 3874 drivers/scsi/mpt3sas/mpt3sas_base.c __le32 *mfp = (__le32 *)mpt3sas_base_get_msg_frame(ioc, smid); ioc 3876 drivers/scsi/mpt3sas/mpt3sas_base.c _clone_sg_entries(ioc, (void *) mfp, smid); ioc 3878 drivers/scsi/mpt3sas/mpt3sas_base.c mpi_req_iomem = (void __force *)ioc->chip + ioc 3879 drivers/scsi/mpt3sas/mpt3sas_base.c MPI_FRAME_START_OFFSET + (smid * ioc->request_sz); ioc 3881 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->request_sz); ioc 3885 drivers/scsi/mpt3sas/mpt3sas_base.c descriptor.Default.MSIxIndex = _base_set_and_get_msix_index(ioc, smid); ioc 3889 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->is_mcpu_endpoint) ioc 3891 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->chip->RequestDescriptorPostLow, ioc 3892 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->scsi_lookup_lock); ioc 3894 drivers/scsi/mpt3sas/mpt3sas_base.c _base_writeq(*request, &ioc->chip->RequestDescriptorPostLow, ioc 3895 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->scsi_lookup_lock); ioc 3908 drivers/scsi/mpt3sas/mpt3sas_base.c _base_put_smid_scsi_io_atomic(struct MPT3SAS_ADAPTER *ioc, u16 smid, ioc 3915 drivers/scsi/mpt3sas/mpt3sas_base.c descriptor.MSIxIndex = _base_set_and_get_msix_index(ioc, smid); ioc 3918 drivers/scsi/mpt3sas/mpt3sas_base.c writel(cpu_to_le32(*request), &ioc->chip->AtomicRequestDescriptorPost); ioc 3930 drivers/scsi/mpt3sas/mpt3sas_base.c _base_put_smid_fast_path_atomic(struct MPT3SAS_ADAPTER *ioc, u16 smid, ioc 3937 drivers/scsi/mpt3sas/mpt3sas_base.c descriptor.MSIxIndex = _base_set_and_get_msix_index(ioc, smid); ioc 3940 drivers/scsi/mpt3sas/mpt3sas_base.c writel(cpu_to_le32(*request), &ioc->chip->AtomicRequestDescriptorPost); ioc 3953 drivers/scsi/mpt3sas/mpt3sas_base.c _base_put_smid_hi_priority_atomic(struct MPT3SAS_ADAPTER *ioc, u16 smid, ioc 3963 drivers/scsi/mpt3sas/mpt3sas_base.c writel(cpu_to_le32(*request), &ioc->chip->AtomicRequestDescriptorPost); ioc 3975 drivers/scsi/mpt3sas/mpt3sas_base.c _base_put_smid_default_atomic(struct MPT3SAS_ADAPTER *ioc, u16 smid) ioc 3981 drivers/scsi/mpt3sas/mpt3sas_base.c descriptor.MSIxIndex = _base_set_and_get_msix_index(ioc, smid); ioc 3984 drivers/scsi/mpt3sas/mpt3sas_base.c writel(cpu_to_le32(*request), &ioc->chip->AtomicRequestDescriptorPost); ioc 3992 drivers/scsi/mpt3sas/mpt3sas_base.c _base_display_OEMs_branding(struct MPT3SAS_ADAPTER *ioc) ioc 3994 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->pdev->subsystem_vendor != PCI_VENDOR_ID_INTEL) ioc 3997 drivers/scsi/mpt3sas/mpt3sas_base.c switch (ioc->pdev->subsystem_vendor) { ioc 3999 drivers/scsi/mpt3sas/mpt3sas_base.c switch (ioc->pdev->device) { ioc 4001 drivers/scsi/mpt3sas/mpt3sas_base.c switch (ioc->pdev->subsystem_device) { ioc 4003 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4007 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4011 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4015 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "Intel(R) Controller: Subsystem ID: 0x%X\n", ioc 4016 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pdev->subsystem_device); ioc 4021 drivers/scsi/mpt3sas/mpt3sas_base.c switch (ioc->pdev->subsystem_device) { ioc 4023 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4027 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4031 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4035 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4039 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4043 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4047 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4051 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "Intel(R) Controller: Subsystem ID: 0x%X\n", ioc 4052 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pdev->subsystem_device); ioc 4057 drivers/scsi/mpt3sas/mpt3sas_base.c switch (ioc->pdev->subsystem_device) { ioc 4059 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4064 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4068 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4072 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4076 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "Intel(R) Controller: Subsystem ID: 0x%X\n", ioc 4077 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pdev->subsystem_device); ioc 4082 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "Intel(R) Controller: Subsystem ID: 0x%X\n", ioc 4083 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pdev->subsystem_device); ioc 4088 drivers/scsi/mpt3sas/mpt3sas_base.c switch (ioc->pdev->device) { ioc 4090 drivers/scsi/mpt3sas/mpt3sas_base.c switch (ioc->pdev->subsystem_device) { ioc 4092 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4096 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4100 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4104 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4108 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4112 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4116 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4120 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "Dell 6Gbps HBA: Subsystem ID: 0x%X\n", ioc 4121 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pdev->subsystem_device); ioc 4126 drivers/scsi/mpt3sas/mpt3sas_base.c switch (ioc->pdev->subsystem_device) { ioc 4128 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4132 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "Dell 12Gbps HBA: Subsystem ID: 0x%X\n", ioc 4133 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pdev->subsystem_device); ioc 4138 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "Dell HBA: Subsystem ID: 0x%X\n", ioc 4139 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pdev->subsystem_device); ioc 4144 drivers/scsi/mpt3sas/mpt3sas_base.c switch (ioc->pdev->device) { ioc 4146 drivers/scsi/mpt3sas/mpt3sas_base.c switch (ioc->pdev->subsystem_device) { ioc 4148 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4152 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4156 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4160 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "Cisco 12Gbps SAS HBA: Subsystem ID: 0x%X\n", ioc 4161 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pdev->subsystem_device); ioc 4166 drivers/scsi/mpt3sas/mpt3sas_base.c switch (ioc->pdev->subsystem_device) { ioc 4168 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4172 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4176 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "Cisco 12Gbps SAS HBA: Subsystem ID: 0x%X\n", ioc 4177 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pdev->subsystem_device); ioc 4182 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "Cisco SAS HBA: Subsystem ID: 0x%X\n", ioc 4183 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pdev->subsystem_device); ioc 4188 drivers/scsi/mpt3sas/mpt3sas_base.c switch (ioc->pdev->device) { ioc 4190 drivers/scsi/mpt3sas/mpt3sas_base.c switch (ioc->pdev->subsystem_device) { ioc 4192 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4196 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "HP 6Gbps SAS HBA: Subsystem ID: 0x%X\n", ioc 4197 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pdev->subsystem_device); ioc 4202 drivers/scsi/mpt3sas/mpt3sas_base.c switch (ioc->pdev->subsystem_device) { ioc 4204 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4208 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4212 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4216 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s\n", ioc 4220 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "HP 6Gbps SAS HBA: Subsystem ID: 0x%X\n", ioc 4221 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pdev->subsystem_device); ioc 4226 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "HP SAS HBA: Subsystem ID: 0x%X\n", ioc 4227 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pdev->subsystem_device); ioc 4243 drivers/scsi/mpt3sas/mpt3sas_base.c _base_display_fwpkg_version(struct MPT3SAS_ADAPTER *ioc) ioc 4254 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); ioc 4256 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->base_cmds.status & MPT3_CMD_PENDING) { ioc 4257 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: internal command already in use\n", __func__); ioc 4262 drivers/scsi/mpt3sas/mpt3sas_base.c fwpkg_data = dma_alloc_coherent(&ioc->pdev->dev, data_length, ioc 4265 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 4270 drivers/scsi/mpt3sas/mpt3sas_base.c smid = mpt3sas_base_get_smid(ioc, ioc->base_cb_idx); ioc 4272 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); ioc 4277 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_cmds.status = MPT3_CMD_PENDING; ioc 4278 drivers/scsi/mpt3sas/mpt3sas_base.c mpi_request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 4279 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_cmds.smid = smid; ioc 4284 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->build_sg(ioc, &mpi_request->SGL, 0, 0, fwpkg_data_dma, ioc 4286 drivers/scsi/mpt3sas/mpt3sas_base.c init_completion(&ioc->base_cmds.done); ioc 4287 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->put_smid_default(ioc, smid); ioc 4289 drivers/scsi/mpt3sas/mpt3sas_base.c wait_for_completion_timeout(&ioc->base_cmds.done, ioc 4291 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s: complete\n", __func__); ioc 4292 drivers/scsi/mpt3sas/mpt3sas_base.c if (!(ioc->base_cmds.status & MPT3_CMD_COMPLETE)) { ioc 4293 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: timeout\n", __func__); ioc 4299 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->base_cmds.status & MPT3_CMD_REPLY_VALID) { ioc 4300 drivers/scsi/mpt3sas/mpt3sas_base.c memcpy(&mpi_reply, ioc->base_cmds.reply, ioc 4307 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "FW Package Version (%02d.%02d.%02d.%02d)\n", ioc 4319 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_cmds.status = MPT3_CMD_NOT_USED; ioc 4322 drivers/scsi/mpt3sas/mpt3sas_base.c dma_free_coherent(&ioc->pdev->dev, data_length, fwpkg_data, ioc 4332 drivers/scsi/mpt3sas/mpt3sas_base.c _base_display_ioc_capabilities(struct MPT3SAS_ADAPTER *ioc) ioc 4339 drivers/scsi/mpt3sas/mpt3sas_base.c bios_version = le32_to_cpu(ioc->bios_pg3.BiosVersion); ioc 4340 drivers/scsi/mpt3sas/mpt3sas_base.c strncpy(desc, ioc->manu_pg0.ChipName, 16); ioc 4341 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s: FWVersion(%02d.%02d.%02d.%02d), ChipRevision(0x%02x), BiosVersion(%02d.%02d.%02d.%02d)\n", ioc 4343 drivers/scsi/mpt3sas/mpt3sas_base.c (ioc->facts.FWVersion.Word & 0xFF000000) >> 24, ioc 4344 drivers/scsi/mpt3sas/mpt3sas_base.c (ioc->facts.FWVersion.Word & 0x00FF0000) >> 16, ioc 4345 drivers/scsi/mpt3sas/mpt3sas_base.c (ioc->facts.FWVersion.Word & 0x0000FF00) >> 8, ioc 4346 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->facts.FWVersion.Word & 0x000000FF, ioc 4347 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pdev->revision, ioc 4353 drivers/scsi/mpt3sas/mpt3sas_base.c _base_display_OEMs_branding(ioc); ioc 4355 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->facts.ProtocolFlags & MPI2_IOCFACTS_PROTOCOL_NVME_DEVICES) { ioc 4360 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "Protocol=("); ioc 4362 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->facts.ProtocolFlags & MPI2_IOCFACTS_PROTOCOL_SCSI_INITIATOR) { ioc 4367 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->facts.ProtocolFlags & MPI2_IOCFACTS_PROTOCOL_SCSI_TARGET) { ioc 4375 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->hide_ir_msg) { ioc 4376 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->facts.IOCCapabilities & ioc 4383 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->facts.IOCCapabilities & MPI2_IOCFACTS_CAPABILITY_TLR) { ioc 4388 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->facts.IOCCapabilities & MPI2_IOCFACTS_CAPABILITY_MULTICAST) { ioc 4393 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->facts.IOCCapabilities & ioc 4399 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->facts.IOCCapabilities & MPI2_IOCFACTS_CAPABILITY_EEDP) { ioc 4404 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->facts.IOCCapabilities & ioc 4410 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->facts.IOCCapabilities & ioc 4416 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->facts.IOCCapabilities & ioc 4422 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->facts.IOCCapabilities & ioc 4428 drivers/scsi/mpt3sas/mpt3sas_base.c iounit_pg1_flags = le32_to_cpu(ioc->iounit_pg1.Flags); ioc 4448 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_update_missing_delay(struct MPT3SAS_ADAPTER *ioc, ioc 4459 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_config_get_number_hba_phys(ioc, &num_phys); ioc 4467 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 4471 drivers/scsi/mpt3sas/mpt3sas_base.c if ((mpt3sas_config_get_sas_iounit_pg1(ioc, &mpi_reply, ioc 4473 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 4480 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 4505 drivers/scsi/mpt3sas/mpt3sas_base.c if (!mpt3sas_config_set_sas_iounit_pg1(ioc, &mpi_reply, sas_iounit_pg1, ioc 4513 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "device_missing_delay: old(%d), new(%d)\n", ioc 4515 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "ioc_missing_delay: old(%d), new(%d)\n", ioc 4518 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->device_missing_delay = dmd_new; ioc 4519 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->io_missing_delay = io_missing_delay; ioc 4534 drivers/scsi/mpt3sas/mpt3sas_base.c _base_update_ioc_page1_inlinewith_perf_mode(struct MPT3SAS_ADAPTER *ioc) ioc 4539 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_config_get_ioc_pg1(ioc, &mpi_reply, &ioc->ioc_pg1_copy); ioc 4540 drivers/scsi/mpt3sas/mpt3sas_base.c memcpy(&ioc_pg1, &ioc->ioc_pg1_copy, sizeof(Mpi2IOCPage1_t)); ioc 4545 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->high_iops_queues) { ioc 4546 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, ioc 4561 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_config_set_ioc_pg1(ioc, &mpi_reply, &ioc_pg1); ioc 4562 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "performance mode: balanced\n"); ioc 4574 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_config_set_ioc_pg1(ioc, &mpi_reply, &ioc_pg1); ioc 4575 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "performance mode: latency\n"); ioc 4581 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, ioc 4586 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_config_set_ioc_pg1(ioc, &mpi_reply, &ioc_pg1); ioc 4596 drivers/scsi/mpt3sas/mpt3sas_base.c _base_static_config_pages(struct MPT3SAS_ADAPTER *ioc) ioc 4601 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->nvme_abort_timeout = 30; ioc 4602 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_config_get_manufacturing_pg0(ioc, &mpi_reply, &ioc->manu_pg0); ioc 4603 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->ir_firmware) ioc 4604 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_config_get_manufacturing_pg10(ioc, &mpi_reply, ioc 4605 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->manu_pg10); ioc 4611 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_config_get_manufacturing_pg11(ioc, &mpi_reply, &ioc->manu_pg11); ioc 4612 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->is_gen35_ioc && ioc->manu_pg11.EEDPTagMode == 0) { ioc 4614 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->name); ioc 4615 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->manu_pg11.EEDPTagMode &= ~0x3; ioc 4616 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->manu_pg11.EEDPTagMode |= 0x1; ioc 4617 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_config_set_manufacturing_pg11(ioc, &mpi_reply, ioc 4618 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->manu_pg11); ioc 4620 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->manu_pg11.AddlFlags2 & NVME_TASK_MNGT_CUSTOM_MASK) ioc 4621 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->tm_custom_handling = 1; ioc 4623 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->tm_custom_handling = 0; ioc 4624 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->manu_pg11.NVMeAbortTO < NVME_TASK_ABORT_MIN_TIMEOUT) ioc 4625 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->nvme_abort_timeout = NVME_TASK_ABORT_MIN_TIMEOUT; ioc 4626 drivers/scsi/mpt3sas/mpt3sas_base.c else if (ioc->manu_pg11.NVMeAbortTO > ioc 4628 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->nvme_abort_timeout = NVME_TASK_ABORT_MAX_TIMEOUT; ioc 4630 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->nvme_abort_timeout = ioc->manu_pg11.NVMeAbortTO; ioc 4633 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_config_get_bios_pg2(ioc, &mpi_reply, &ioc->bios_pg2); ioc 4634 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_config_get_bios_pg3(ioc, &mpi_reply, &ioc->bios_pg3); ioc 4635 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_config_get_ioc_pg8(ioc, &mpi_reply, &ioc->ioc_pg8); ioc 4636 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_config_get_iounit_pg0(ioc, &mpi_reply, &ioc->iounit_pg0); ioc 4637 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_config_get_iounit_pg1(ioc, &mpi_reply, &ioc->iounit_pg1); ioc 4638 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_config_get_iounit_pg8(ioc, &mpi_reply, &ioc->iounit_pg8); ioc 4639 drivers/scsi/mpt3sas/mpt3sas_base.c _base_display_ioc_capabilities(ioc); ioc 4645 drivers/scsi/mpt3sas/mpt3sas_base.c iounit_pg1_flags = le32_to_cpu(ioc->iounit_pg1.Flags); ioc 4646 drivers/scsi/mpt3sas/mpt3sas_base.c if ((ioc->facts.IOCCapabilities & ioc 4653 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->iounit_pg1.Flags = cpu_to_le32(iounit_pg1_flags); ioc 4654 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_config_set_iounit_pg1(ioc, &mpi_reply, &ioc->iounit_pg1); ioc 4656 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->iounit_pg8.NumSensors) ioc 4657 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->temp_sensors_count = ioc->iounit_pg8.NumSensors; ioc 4658 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->is_aero_ioc) ioc 4659 drivers/scsi/mpt3sas/mpt3sas_base.c _base_update_ioc_page1_inlinewith_perf_mode(ioc); ioc 4669 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_free_enclosure_list(struct MPT3SAS_ADAPTER *ioc) ioc 4675 drivers/scsi/mpt3sas/mpt3sas_base.c enclosure_dev_next, &ioc->enclosure_list, list) { ioc 4688 drivers/scsi/mpt3sas/mpt3sas_base.c _base_release_memory_pools(struct MPT3SAS_ADAPTER *ioc) ioc 4695 drivers/scsi/mpt3sas/mpt3sas_base.c dexitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); ioc 4697 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->request) { ioc 4698 drivers/scsi/mpt3sas/mpt3sas_base.c dma_free_coherent(&ioc->pdev->dev, ioc->request_dma_sz, ioc 4699 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->request, ioc->request_dma); ioc 4700 drivers/scsi/mpt3sas/mpt3sas_base.c dexitprintk(ioc, ioc 4701 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "request_pool(0x%p): free\n", ioc 4702 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->request)); ioc 4703 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->request = NULL; ioc 4706 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->sense) { ioc 4707 drivers/scsi/mpt3sas/mpt3sas_base.c dma_pool_free(ioc->sense_dma_pool, ioc->sense, ioc->sense_dma); ioc 4708 drivers/scsi/mpt3sas/mpt3sas_base.c dma_pool_destroy(ioc->sense_dma_pool); ioc 4709 drivers/scsi/mpt3sas/mpt3sas_base.c dexitprintk(ioc, ioc 4710 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "sense_pool(0x%p): free\n", ioc 4711 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->sense)); ioc 4712 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->sense = NULL; ioc 4715 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->reply) { ioc 4716 drivers/scsi/mpt3sas/mpt3sas_base.c dma_pool_free(ioc->reply_dma_pool, ioc->reply, ioc->reply_dma); ioc 4717 drivers/scsi/mpt3sas/mpt3sas_base.c dma_pool_destroy(ioc->reply_dma_pool); ioc 4718 drivers/scsi/mpt3sas/mpt3sas_base.c dexitprintk(ioc, ioc 4719 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "reply_pool(0x%p): free\n", ioc 4720 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply)); ioc 4721 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply = NULL; ioc 4724 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->reply_free) { ioc 4725 drivers/scsi/mpt3sas/mpt3sas_base.c dma_pool_free(ioc->reply_free_dma_pool, ioc->reply_free, ioc 4726 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_free_dma); ioc 4727 drivers/scsi/mpt3sas/mpt3sas_base.c dma_pool_destroy(ioc->reply_free_dma_pool); ioc 4728 drivers/scsi/mpt3sas/mpt3sas_base.c dexitprintk(ioc, ioc 4729 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "reply_free_pool(0x%p): free\n", ioc 4730 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_free)); ioc 4731 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_free = NULL; ioc 4734 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->reply_post) { ioc 4736 drivers/scsi/mpt3sas/mpt3sas_base.c rps = &ioc->reply_post[i]; ioc 4739 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_post_free_dma_pool, ioc 4742 drivers/scsi/mpt3sas/mpt3sas_base.c dexitprintk(ioc, ioc 4743 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "reply_post_free_pool(0x%p): free\n", ioc 4747 drivers/scsi/mpt3sas/mpt3sas_base.c } while (ioc->rdpq_array_enable && ioc 4748 drivers/scsi/mpt3sas/mpt3sas_base.c (++i < ioc->reply_queue_count)); ioc 4749 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->reply_post_free_array && ioc 4750 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->rdpq_array_enable) { ioc 4751 drivers/scsi/mpt3sas/mpt3sas_base.c dma_pool_free(ioc->reply_post_free_array_dma_pool, ioc 4752 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_post_free_array, ioc 4753 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_post_free_array_dma); ioc 4754 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_post_free_array = NULL; ioc 4756 drivers/scsi/mpt3sas/mpt3sas_base.c dma_pool_destroy(ioc->reply_post_free_array_dma_pool); ioc 4757 drivers/scsi/mpt3sas/mpt3sas_base.c dma_pool_destroy(ioc->reply_post_free_dma_pool); ioc 4758 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->reply_post); ioc 4761 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->pcie_sgl_dma_pool) { ioc 4762 drivers/scsi/mpt3sas/mpt3sas_base.c for (i = 0; i < ioc->scsiio_depth; i++) { ioc 4763 drivers/scsi/mpt3sas/mpt3sas_base.c dma_pool_free(ioc->pcie_sgl_dma_pool, ioc 4764 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pcie_sg_lookup[i].pcie_sgl, ioc 4765 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pcie_sg_lookup[i].pcie_sgl_dma); ioc 4767 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->pcie_sgl_dma_pool) ioc 4768 drivers/scsi/mpt3sas/mpt3sas_base.c dma_pool_destroy(ioc->pcie_sgl_dma_pool); ioc 4771 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->config_page) { ioc 4772 drivers/scsi/mpt3sas/mpt3sas_base.c dexitprintk(ioc, ioc 4773 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "config_page(0x%p): free\n", ioc 4774 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->config_page)); ioc 4775 drivers/scsi/mpt3sas/mpt3sas_base.c dma_free_coherent(&ioc->pdev->dev, ioc->config_page_sz, ioc 4776 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->config_page, ioc->config_page_dma); ioc 4779 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->hpr_lookup); ioc 4780 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->internal_lookup); ioc 4781 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->chain_lookup) { ioc 4782 drivers/scsi/mpt3sas/mpt3sas_base.c for (i = 0; i < ioc->scsiio_depth; i++) { ioc 4783 drivers/scsi/mpt3sas/mpt3sas_base.c for (j = ioc->chains_per_prp_buffer; ioc 4784 drivers/scsi/mpt3sas/mpt3sas_base.c j < ioc->chains_needed_per_io; j++) { ioc 4785 drivers/scsi/mpt3sas/mpt3sas_base.c ct = &ioc->chain_lookup[i].chains_per_smid[j]; ioc 4787 drivers/scsi/mpt3sas/mpt3sas_base.c dma_pool_free(ioc->chain_dma_pool, ioc 4791 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->chain_lookup[i].chains_per_smid); ioc 4793 drivers/scsi/mpt3sas/mpt3sas_base.c dma_pool_destroy(ioc->chain_dma_pool); ioc 4794 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->chain_lookup); ioc 4795 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->chain_lookup = NULL; ioc 4830 drivers/scsi/mpt3sas/mpt3sas_base.c _base_allocate_memory_pools(struct MPT3SAS_ADAPTER *ioc) ioc 4843 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); ioc 4847 drivers/scsi/mpt3sas/mpt3sas_base.c facts = &ioc->facts; ioc 4853 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->hba_mpi_version_belonged == MPI2_VERSION) ioc 4864 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->is_mcpu_endpoint) ioc 4865 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->shost->sg_tablesize = MPT_MIN_PHYS_SEGMENTS; ioc 4872 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_warn(ioc, "sg_tablesize(%u) is bigger than kernel defined SG_CHUNK_SIZE(%u)\n", ioc 4875 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->shost->sg_tablesize = sg_tablesize; ioc 4878 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->internal_depth = min_t(int, (facts->HighPriorityCredit + (5)), ioc 4880 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->internal_depth < INTERNAL_CMDS_COUNT) { ioc 4883 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "IOC doesn't have enough Request Credits, it has just %d number of credits\n", ioc 4887 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->internal_depth = 10; ioc 4890 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->hi_priority_depth = ioc->internal_depth - (5); ioc 4894 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->internal_depth, facts->RequestCredit); ioc 4899 drivers/scsi/mpt3sas/mpt3sas_base.c (MPT3SAS_KDUMP_SCSI_IO_DEPTH + ioc->internal_depth)); ioc 4908 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->hba_queue_depth = max_request_credit + ioc->hi_priority_depth; ioc 4911 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->request_sz = facts->IOCRequestFrameSize * 4; ioc 4914 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_sz = facts->ReplyFrameSize * 4; ioc 4917 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->hba_mpi_version_belonged != MPI2_VERSION) { ioc 4919 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->chain_segment_sz = ioc 4924 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->chain_segment_sz = DEFAULT_NUM_FWCHAIN_ELEMTS * ioc 4927 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->chain_segment_sz = ioc->request_sz; ioc 4930 drivers/scsi/mpt3sas/mpt3sas_base.c sge_size = max_t(u16, ioc->sge_size, ioc->sge_size_ieee); ioc 4935 drivers/scsi/mpt3sas/mpt3sas_base.c max_sge_elements = ioc->request_sz - ((sizeof(Mpi2SCSIIORequest_t) - ioc 4937 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->max_sges_in_main_message = max_sge_elements/sge_size; ioc 4940 drivers/scsi/mpt3sas/mpt3sas_base.c max_sge_elements = ioc->chain_segment_sz - sge_size; ioc 4941 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->max_sges_in_chain_message = max_sge_elements/sge_size; ioc 4946 drivers/scsi/mpt3sas/mpt3sas_base.c chains_needed_per_io = ((ioc->shost->sg_tablesize - ioc 4947 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->max_sges_in_main_message)/ioc->max_sges_in_chain_message) ioc 4951 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->shost->sg_tablesize = min_t(u16, ioc 4952 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->max_sges_in_main_message + (ioc->max_sges_in_chain_message ioc 4953 drivers/scsi/mpt3sas/mpt3sas_base.c * chains_needed_per_io), ioc->shost->sg_tablesize); ioc 4955 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->chains_needed_per_io = chains_needed_per_io; ioc 4958 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_free_queue_depth = ioc->hba_queue_depth + 64; ioc 4961 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->is_mcpu_endpoint) ioc 4962 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_post_queue_depth = ioc->reply_free_queue_depth; ioc 4965 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_post_queue_depth = ioc->hba_queue_depth + ioc 4966 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_free_queue_depth + 1; ioc 4968 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->reply_post_queue_depth % 16) ioc 4969 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_post_queue_depth += 16 - ioc 4970 drivers/scsi/mpt3sas/mpt3sas_base.c (ioc->reply_post_queue_depth % 16); ioc 4973 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->reply_post_queue_depth > ioc 4975 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_post_queue_depth = ioc 4978 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->hba_queue_depth = ioc 4979 drivers/scsi/mpt3sas/mpt3sas_base.c ((ioc->reply_post_queue_depth - 64) / 2) - 1; ioc 4980 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_free_queue_depth = ioc->hba_queue_depth + 64; ioc 4983 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc 4984 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "scatter gather: sge_in_main_msg(%d), sge_per_chain(%d), sge_per_io(%d), chains_per_io(%d)\n", ioc 4985 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->max_sges_in_main_message, ioc 4986 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->max_sges_in_chain_message, ioc 4987 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->shost->sg_tablesize, ioc 4988 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->chains_needed_per_io)); ioc 4991 drivers/scsi/mpt3sas/mpt3sas_base.c reply_post_free_sz = ioc->reply_post_queue_depth * ioc 4995 drivers/scsi/mpt3sas/mpt3sas_base.c if (_base_is_controller_msix_enabled(ioc) && !ioc->rdpq_array_enable) ioc 4996 drivers/scsi/mpt3sas/mpt3sas_base.c sz *= ioc->reply_queue_count; ioc 4998 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_post = kcalloc((ioc->rdpq_array_enable) ? ioc 4999 drivers/scsi/mpt3sas/mpt3sas_base.c (ioc->reply_queue_count):1, ioc 5002 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->reply_post) { ioc 5003 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "reply_post_free pool: kcalloc failed\n"); ioc 5006 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_post_free_dma_pool = dma_pool_create("reply_post_free pool", ioc 5007 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->pdev->dev, sz, 16, 0); ioc 5008 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->reply_post_free_dma_pool) { ioc 5009 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "reply_post_free pool: dma_pool_create failed\n"); ioc 5014 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_post[i].reply_post_free = ioc 5015 drivers/scsi/mpt3sas/mpt3sas_base.c dma_pool_zalloc(ioc->reply_post_free_dma_pool, ioc 5017 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->reply_post[i].reply_post_free_dma); ioc 5018 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->reply_post[i].reply_post_free) { ioc 5019 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "reply_post_free pool: dma_pool_alloc failed\n"); ioc 5022 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc 5023 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "reply post free pool (0x%p): depth(%d), element_size(%d), pool_size(%d kB)\n", ioc 5024 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_post[i].reply_post_free, ioc 5025 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_post_queue_depth, ioc 5027 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc 5028 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "reply_post_free_dma = (0x%llx)\n", ioc 5029 drivers/scsi/mpt3sas/mpt3sas_base.c (u64)ioc->reply_post[i].reply_post_free_dma)); ioc 5031 drivers/scsi/mpt3sas/mpt3sas_base.c } while (ioc->rdpq_array_enable && (++i < ioc->reply_queue_count)); ioc 5033 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->dma_mask > 32) { ioc 5034 drivers/scsi/mpt3sas/mpt3sas_base.c if (_base_change_consistent_dma_mask(ioc, ioc->pdev) != 0) { ioc 5035 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_warn(ioc, "no suitable consistent DMA mask for %s\n", ioc 5036 drivers/scsi/mpt3sas/mpt3sas_base.c pci_name(ioc->pdev)); ioc 5041 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->scsiio_depth = ioc->hba_queue_depth - ioc 5042 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->hi_priority_depth - ioc->internal_depth; ioc 5047 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->shost->can_queue = ioc->scsiio_depth - INTERNAL_SCSIIO_CMDS_COUNT; ioc 5048 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc 5049 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "scsi host: can_queue depth (%d)\n", ioc 5050 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->shost->can_queue)); ioc 5056 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->chain_depth = ioc->chains_needed_per_io * ioc->scsiio_depth; ioc 5057 drivers/scsi/mpt3sas/mpt3sas_base.c sz = ((ioc->scsiio_depth + 1) * ioc->request_sz); ioc 5060 drivers/scsi/mpt3sas/mpt3sas_base.c sz += (ioc->hi_priority_depth * ioc->request_sz); ioc 5063 drivers/scsi/mpt3sas/mpt3sas_base.c sz += (ioc->internal_depth * ioc->request_sz); ioc 5065 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->request_dma_sz = sz; ioc 5066 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->request = dma_alloc_coherent(&ioc->pdev->dev, sz, ioc 5067 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->request_dma, GFP_KERNEL); ioc 5068 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->request) { ioc 5069 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "request pool: dma_alloc_coherent failed: hba_depth(%d), chains_per_io(%d), frame_sz(%d), total(%d kB)\n", ioc 5070 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->hba_queue_depth, ioc->chains_needed_per_io, ioc 5071 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->request_sz, sz / 1024); ioc 5072 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->scsiio_depth < MPT3SAS_SAS_QUEUE_DEPTH) ioc 5075 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->hba_queue_depth -= retry_sz; ioc 5076 drivers/scsi/mpt3sas/mpt3sas_base.c _base_release_memory_pools(ioc); ioc 5079 drivers/scsi/mpt3sas/mpt3sas_base.c memset(ioc->request, 0, sz); ioc 5082 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "request pool: dma_alloc_coherent succeed: hba_depth(%d), chains_per_io(%d), frame_sz(%d), total(%d kb)\n", ioc 5083 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->hba_queue_depth, ioc->chains_needed_per_io, ioc 5084 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->request_sz, sz / 1024); ioc 5087 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->hi_priority = ioc->request + ((ioc->scsiio_depth + 1) * ioc 5088 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->request_sz); ioc 5089 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->hi_priority_dma = ioc->request_dma + ((ioc->scsiio_depth + 1) * ioc 5090 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->request_sz); ioc 5093 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->internal = ioc->hi_priority + (ioc->hi_priority_depth * ioc 5094 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->request_sz); ioc 5095 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->internal_dma = ioc->hi_priority_dma + (ioc->hi_priority_depth * ioc 5096 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->request_sz); ioc 5098 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc 5099 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "request pool(0x%p): depth(%d), frame_size(%d), pool_size(%d kB)\n", ioc 5100 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->request, ioc->hba_queue_depth, ioc 5101 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->request_sz, ioc 5102 drivers/scsi/mpt3sas/mpt3sas_base.c (ioc->hba_queue_depth * ioc->request_sz) / 1024)); ioc 5104 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc 5105 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "request pool: dma(0x%llx)\n", ioc 5106 drivers/scsi/mpt3sas/mpt3sas_base.c (unsigned long long)ioc->request_dma)); ioc 5109 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc 5110 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "scsiio(0x%p): depth(%d)\n", ioc 5111 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->request, ioc->scsiio_depth)); ioc 5113 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->chain_depth = min_t(u32, ioc->chain_depth, MAX_CHAIN_DEPTH); ioc 5114 drivers/scsi/mpt3sas/mpt3sas_base.c sz = ioc->scsiio_depth * sizeof(struct chain_lookup); ioc 5115 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->chain_lookup = kzalloc(sz, GFP_KERNEL); ioc 5116 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->chain_lookup) { ioc 5117 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "chain_lookup: __get_free_pages failed\n"); ioc 5121 drivers/scsi/mpt3sas/mpt3sas_base.c sz = ioc->chains_needed_per_io * sizeof(struct chain_tracker); ioc 5122 drivers/scsi/mpt3sas/mpt3sas_base.c for (i = 0; i < ioc->scsiio_depth; i++) { ioc 5123 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->chain_lookup[i].chains_per_smid = kzalloc(sz, GFP_KERNEL); ioc 5124 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->chain_lookup[i].chains_per_smid) { ioc 5125 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "chain_lookup: kzalloc failed\n"); ioc 5131 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->hpr_lookup = kcalloc(ioc->hi_priority_depth, ioc 5133 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->hpr_lookup) { ioc 5134 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "hpr_lookup: kcalloc failed\n"); ioc 5137 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->hi_priority_smid = ioc->scsiio_depth + 1; ioc 5138 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc 5139 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "hi_priority(0x%p): depth(%d), start smid(%d)\n", ioc 5140 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->hi_priority, ioc 5141 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->hi_priority_depth, ioc->hi_priority_smid)); ioc 5144 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->internal_lookup = kcalloc(ioc->internal_depth, ioc 5146 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->internal_lookup) { ioc 5147 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "internal_lookup: kcalloc failed\n"); ioc 5150 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->internal_smid = ioc->hi_priority_smid + ioc->hi_priority_depth; ioc 5151 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc 5152 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "internal(0x%p): depth(%d), start smid(%d)\n", ioc 5153 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->internal, ioc 5154 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->internal_depth, ioc->internal_smid)); ioc 5168 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->chains_per_prp_buffer = 0; ioc 5169 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->facts.ProtocolFlags & MPI2_IOCFACTS_PROTOCOL_NVME_DEVICES) { ioc 5171 drivers/scsi/mpt3sas/mpt3sas_base.c (ioc->shost->sg_tablesize * NVME_PRP_SIZE) - 1; ioc 5172 drivers/scsi/mpt3sas/mpt3sas_base.c nvme_blocks_needed /= (ioc->page_size - NVME_PRP_SIZE); ioc 5175 drivers/scsi/mpt3sas/mpt3sas_base.c sz = sizeof(struct pcie_sg_list) * ioc->scsiio_depth; ioc 5176 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pcie_sg_lookup = kzalloc(sz, GFP_KERNEL); ioc 5177 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->pcie_sg_lookup) { ioc 5178 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "PCIe SGL lookup: kzalloc failed\n"); ioc 5181 drivers/scsi/mpt3sas/mpt3sas_base.c sz = nvme_blocks_needed * ioc->page_size; ioc 5182 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pcie_sgl_dma_pool = ioc 5183 drivers/scsi/mpt3sas/mpt3sas_base.c dma_pool_create("PCIe SGL pool", &ioc->pdev->dev, sz, 16, 0); ioc 5184 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->pcie_sgl_dma_pool) { ioc 5185 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "PCIe SGL pool: dma_pool_create failed\n"); ioc 5189 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->chains_per_prp_buffer = sz/ioc->chain_segment_sz; ioc 5190 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->chains_per_prp_buffer = min(ioc->chains_per_prp_buffer, ioc 5191 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->chains_needed_per_io); ioc 5193 drivers/scsi/mpt3sas/mpt3sas_base.c for (i = 0; i < ioc->scsiio_depth; i++) { ioc 5194 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pcie_sg_lookup[i].pcie_sgl = dma_pool_alloc( ioc 5195 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pcie_sgl_dma_pool, GFP_KERNEL, ioc 5196 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->pcie_sg_lookup[i].pcie_sgl_dma); ioc 5197 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->pcie_sg_lookup[i].pcie_sgl) { ioc 5198 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "PCIe SGL pool: dma_pool_alloc failed\n"); ioc 5201 drivers/scsi/mpt3sas/mpt3sas_base.c for (j = 0; j < ioc->chains_per_prp_buffer; j++) { ioc 5202 drivers/scsi/mpt3sas/mpt3sas_base.c ct = &ioc->chain_lookup[i].chains_per_smid[j]; ioc 5204 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pcie_sg_lookup[i].pcie_sgl + ioc 5205 drivers/scsi/mpt3sas/mpt3sas_base.c (j * ioc->chain_segment_sz); ioc 5207 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pcie_sg_lookup[i].pcie_sgl_dma + ioc 5208 drivers/scsi/mpt3sas/mpt3sas_base.c (j * ioc->chain_segment_sz); ioc 5212 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc 5213 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "PCIe sgl pool depth(%d), element_size(%d), pool_size(%d kB)\n", ioc 5214 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->scsiio_depth, sz, ioc 5215 drivers/scsi/mpt3sas/mpt3sas_base.c (sz * ioc->scsiio_depth) / 1024)); ioc 5216 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc 5217 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "Number of chains can fit in a PRP page(%d)\n", ioc 5218 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->chains_per_prp_buffer)); ioc 5219 drivers/scsi/mpt3sas/mpt3sas_base.c total_sz += sz * ioc->scsiio_depth; ioc 5222 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->chain_dma_pool = dma_pool_create("chain pool", &ioc->pdev->dev, ioc 5223 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->chain_segment_sz, 16, 0); ioc 5224 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->chain_dma_pool) { ioc 5225 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "chain_dma_pool: dma_pool_create failed\n"); ioc 5228 drivers/scsi/mpt3sas/mpt3sas_base.c for (i = 0; i < ioc->scsiio_depth; i++) { ioc 5229 drivers/scsi/mpt3sas/mpt3sas_base.c for (j = ioc->chains_per_prp_buffer; ioc 5230 drivers/scsi/mpt3sas/mpt3sas_base.c j < ioc->chains_needed_per_io; j++) { ioc 5231 drivers/scsi/mpt3sas/mpt3sas_base.c ct = &ioc->chain_lookup[i].chains_per_smid[j]; ioc 5233 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->chain_dma_pool, GFP_KERNEL, ioc 5236 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "chain_lookup: pci_pool_alloc failed\n"); ioc 5240 drivers/scsi/mpt3sas/mpt3sas_base.c total_sz += ioc->chain_segment_sz; ioc 5243 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc 5244 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "chain pool depth(%d), frame_size(%d), pool_size(%d kB)\n", ioc 5245 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->chain_depth, ioc->chain_segment_sz, ioc 5246 drivers/scsi/mpt3sas/mpt3sas_base.c (ioc->chain_depth * ioc->chain_segment_sz) / 1024)); ioc 5249 drivers/scsi/mpt3sas/mpt3sas_base.c sz = ioc->scsiio_depth * SCSI_SENSE_BUFFERSIZE; ioc 5250 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->sense_dma_pool = dma_pool_create("sense pool", &ioc->pdev->dev, sz, ioc 5252 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->sense_dma_pool) { ioc 5253 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "sense pool: dma_pool_create failed\n"); ioc 5256 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->sense = dma_pool_alloc(ioc->sense_dma_pool, GFP_KERNEL, ioc 5257 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->sense_dma); ioc 5258 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->sense) { ioc 5259 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "sense pool: dma_pool_alloc failed\n"); ioc 5271 drivers/scsi/mpt3sas/mpt3sas_base.c if (!is_MSB_are_same((long)ioc->sense, sz)) { ioc 5273 drivers/scsi/mpt3sas/mpt3sas_base.c dma_pool_free(ioc->sense_dma_pool, ioc->sense, ioc->sense_dma); ioc 5274 drivers/scsi/mpt3sas/mpt3sas_base.c dma_pool_destroy(ioc->sense_dma_pool); ioc 5275 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->sense = NULL; ioc 5277 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->sense_dma_pool = ioc 5278 drivers/scsi/mpt3sas/mpt3sas_base.c dma_pool_create("sense pool", &ioc->pdev->dev, sz, ioc 5280 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->sense_dma_pool) { ioc 5281 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "sense pool: pci_pool_create failed\n"); ioc 5284 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->sense = dma_pool_alloc(ioc->sense_dma_pool, GFP_KERNEL, ioc 5285 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->sense_dma); ioc 5286 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->sense) { ioc 5287 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "sense pool: pci_pool_alloc failed\n"); ioc 5291 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc 5292 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "sense pool(0x%p): depth(%d), element_size(%d), pool_size(%d kB)\n", ioc 5293 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->sense, ioc->scsiio_depth, ioc 5295 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc 5296 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "sense_dma(0x%llx)\n", ioc 5297 drivers/scsi/mpt3sas/mpt3sas_base.c (unsigned long long)ioc->sense_dma)); ioc 5301 drivers/scsi/mpt3sas/mpt3sas_base.c sz = ioc->reply_free_queue_depth * ioc->reply_sz; ioc 5302 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_dma_pool = dma_pool_create("reply pool", &ioc->pdev->dev, sz, ioc 5304 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->reply_dma_pool) { ioc 5305 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "reply pool: dma_pool_create failed\n"); ioc 5308 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply = dma_pool_alloc(ioc->reply_dma_pool, GFP_KERNEL, ioc 5309 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->reply_dma); ioc 5310 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->reply) { ioc 5311 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "reply pool: dma_pool_alloc failed\n"); ioc 5314 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_dma_min_address = (u32)(ioc->reply_dma); ioc 5315 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_dma_max_address = (u32)(ioc->reply_dma) + sz; ioc 5316 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc 5317 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "reply pool(0x%p): depth(%d), frame_size(%d), pool_size(%d kB)\n", ioc 5318 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply, ioc->reply_free_queue_depth, ioc 5319 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_sz, sz / 1024)); ioc 5320 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc 5321 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "reply_dma(0x%llx)\n", ioc 5322 drivers/scsi/mpt3sas/mpt3sas_base.c (unsigned long long)ioc->reply_dma)); ioc 5326 drivers/scsi/mpt3sas/mpt3sas_base.c sz = ioc->reply_free_queue_depth * 4; ioc 5327 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_free_dma_pool = dma_pool_create("reply_free pool", ioc 5328 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->pdev->dev, sz, 16, 0); ioc 5329 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->reply_free_dma_pool) { ioc 5330 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "reply_free pool: dma_pool_create failed\n"); ioc 5333 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_free = dma_pool_zalloc(ioc->reply_free_dma_pool, GFP_KERNEL, ioc 5334 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->reply_free_dma); ioc 5335 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->reply_free) { ioc 5336 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "reply_free pool: dma_pool_alloc failed\n"); ioc 5339 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc 5340 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "reply_free pool(0x%p): depth(%d), element_size(%d), pool_size(%d kB)\n", ioc 5341 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_free, ioc->reply_free_queue_depth, ioc 5343 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc 5344 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "reply_free_dma (0x%llx)\n", ioc 5345 drivers/scsi/mpt3sas/mpt3sas_base.c (unsigned long long)ioc->reply_free_dma)); ioc 5348 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->rdpq_array_enable) { ioc 5349 drivers/scsi/mpt3sas/mpt3sas_base.c reply_post_free_array_sz = ioc->reply_queue_count * ioc 5351 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_post_free_array_dma_pool = ioc 5353 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->pdev->dev, reply_post_free_array_sz, 16, 0); ioc 5354 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->reply_post_free_array_dma_pool) { ioc 5355 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc 5356 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "reply_post_free_array pool: dma_pool_create failed\n")); ioc 5359 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_post_free_array = ioc 5360 drivers/scsi/mpt3sas/mpt3sas_base.c dma_pool_alloc(ioc->reply_post_free_array_dma_pool, ioc 5361 drivers/scsi/mpt3sas/mpt3sas_base.c GFP_KERNEL, &ioc->reply_post_free_array_dma); ioc 5362 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->reply_post_free_array) { ioc 5363 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc 5364 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "reply_post_free_array pool: dma_pool_alloc failed\n")); ioc 5368 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->config_page_sz = 512; ioc 5369 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->config_page = dma_alloc_coherent(&ioc->pdev->dev, ioc 5370 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->config_page_sz, &ioc->config_page_dma, GFP_KERNEL); ioc 5371 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->config_page) { ioc 5372 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "config page: dma_pool_alloc failed\n"); ioc 5375 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc 5376 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "config page(0x%p): size(%d)\n", ioc 5377 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->config_page, ioc->config_page_sz)); ioc 5378 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc 5379 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "config_page_dma(0x%llx)\n", ioc 5380 drivers/scsi/mpt3sas/mpt3sas_base.c (unsigned long long)ioc->config_page_dma)); ioc 5381 drivers/scsi/mpt3sas/mpt3sas_base.c total_sz += ioc->config_page_sz; ioc 5383 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "Allocated physical memory: size(%d kB)\n", ioc 5385 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "Current Controller Queue Depth(%d),Max Controller Queue Depth(%d)\n", ioc 5386 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->shost->can_queue, facts->RequestCredit); ioc 5387 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "Scatter Gather Elements per IO(%d)\n", ioc 5388 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->shost->sg_tablesize); ioc 5404 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_get_iocstate(struct MPT3SAS_ADAPTER *ioc, int cooked) ioc 5408 drivers/scsi/mpt3sas/mpt3sas_base.c s = ioc->base_readl(&ioc->chip->Doorbell); ioc 5422 drivers/scsi/mpt3sas/mpt3sas_base.c _base_wait_on_iocstate(struct MPT3SAS_ADAPTER *ioc, u32 ioc_state, int timeout) ioc 5430 drivers/scsi/mpt3sas/mpt3sas_base.c current_state = mpt3sas_base_get_iocstate(ioc, 1); ioc 5454 drivers/scsi/mpt3sas/mpt3sas_base.c _base_wait_for_doorbell_int(struct MPT3SAS_ADAPTER *ioc, int timeout) ioc 5462 drivers/scsi/mpt3sas/mpt3sas_base.c int_status = ioc->base_readl(&ioc->chip->HostInterruptStatus); ioc 5464 drivers/scsi/mpt3sas/mpt3sas_base.c dhsprintk(ioc, ioc 5465 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s: successful count(%d), timeout(%d)\n", ioc 5474 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: failed due to timeout count(%d), int_status(%x)!\n", ioc 5480 drivers/scsi/mpt3sas/mpt3sas_base.c _base_spin_on_doorbell_int(struct MPT3SAS_ADAPTER *ioc, int timeout) ioc 5488 drivers/scsi/mpt3sas/mpt3sas_base.c int_status = ioc->base_readl(&ioc->chip->HostInterruptStatus); ioc 5490 drivers/scsi/mpt3sas/mpt3sas_base.c dhsprintk(ioc, ioc 5491 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s: successful count(%d), timeout(%d)\n", ioc 5500 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: failed due to timeout count(%d), int_status(%x)!\n", ioc 5517 drivers/scsi/mpt3sas/mpt3sas_base.c _base_wait_for_doorbell_ack(struct MPT3SAS_ADAPTER *ioc, int timeout) ioc 5526 drivers/scsi/mpt3sas/mpt3sas_base.c int_status = ioc->base_readl(&ioc->chip->HostInterruptStatus); ioc 5528 drivers/scsi/mpt3sas/mpt3sas_base.c dhsprintk(ioc, ioc 5529 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s: successful count(%d), timeout(%d)\n", ioc 5533 drivers/scsi/mpt3sas/mpt3sas_base.c doorbell = ioc->base_readl(&ioc->chip->Doorbell); ioc 5536 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_fault_info(ioc , doorbell); ioc 5547 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: failed due to timeout count(%d), int_status(%x)!\n", ioc 5560 drivers/scsi/mpt3sas/mpt3sas_base.c _base_wait_for_doorbell_not_used(struct MPT3SAS_ADAPTER *ioc, int timeout) ioc 5568 drivers/scsi/mpt3sas/mpt3sas_base.c doorbell_reg = ioc->base_readl(&ioc->chip->Doorbell); ioc 5570 drivers/scsi/mpt3sas/mpt3sas_base.c dhsprintk(ioc, ioc 5571 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s: successful count(%d), timeout(%d)\n", ioc 5580 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: failed due to timeout count(%d), doorbell_reg(%x)!\n", ioc 5594 drivers/scsi/mpt3sas/mpt3sas_base.c _base_send_ioc_reset(struct MPT3SAS_ADAPTER *ioc, u8 reset_type, int timeout) ioc 5600 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: unknown reset_type\n", __func__); ioc 5604 drivers/scsi/mpt3sas/mpt3sas_base.c if (!(ioc->facts.IOCCapabilities & ioc 5608 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "sending message unit reset !!\n"); ioc 5611 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->chip->Doorbell); ioc 5612 drivers/scsi/mpt3sas/mpt3sas_base.c if ((_base_wait_for_doorbell_ack(ioc, 15))) { ioc 5616 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_state = _base_wait_on_iocstate(ioc, MPI2_IOC_STATE_READY, timeout); ioc 5618 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: failed going to ready state (ioc_state=0x%x)\n", ioc 5624 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "message unit reset: %s\n", ioc 5640 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_wait_for_ioc(struct MPT3SAS_ADAPTER *ioc, int timeout) ioc 5646 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_state = mpt3sas_base_get_iocstate(ioc, 1); ioc 5650 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s: waiting for operational state(count=%d)\n", ioc 5654 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: failed due to ioc not operational\n", __func__); ioc 5658 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "ioc is operational\n"); ioc 5674 drivers/scsi/mpt3sas/mpt3sas_base.c _base_handshake_req_reply_wait(struct MPT3SAS_ADAPTER *ioc, int request_bytes, ioc 5683 drivers/scsi/mpt3sas/mpt3sas_base.c if ((ioc->base_readl(&ioc->chip->Doorbell) & MPI2_DOORBELL_USED)) { ioc 5684 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "doorbell is in use (line=%d)\n", __LINE__); ioc 5689 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->base_readl(&ioc->chip->HostInterruptStatus) & ioc 5691 drivers/scsi/mpt3sas/mpt3sas_base.c writel(0, &ioc->chip->HostInterruptStatus); ioc 5696 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->chip->Doorbell); ioc 5698 drivers/scsi/mpt3sas/mpt3sas_base.c if ((_base_spin_on_doorbell_int(ioc, 5))) { ioc 5699 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "doorbell handshake int failed (line=%d)\n", ioc 5703 drivers/scsi/mpt3sas/mpt3sas_base.c writel(0, &ioc->chip->HostInterruptStatus); ioc 5705 drivers/scsi/mpt3sas/mpt3sas_base.c if ((_base_wait_for_doorbell_ack(ioc, 5))) { ioc 5706 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "doorbell handshake ack failed (line=%d)\n", ioc 5713 drivers/scsi/mpt3sas/mpt3sas_base.c writel(cpu_to_le32(request[i]), &ioc->chip->Doorbell); ioc 5714 drivers/scsi/mpt3sas/mpt3sas_base.c if ((_base_wait_for_doorbell_ack(ioc, 5))) ioc 5719 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "doorbell handshake sending request failed (line=%d)\n", ioc 5725 drivers/scsi/mpt3sas/mpt3sas_base.c if ((_base_wait_for_doorbell_int(ioc, timeout))) { ioc 5726 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "doorbell handshake int failed (line=%d)\n", ioc 5732 drivers/scsi/mpt3sas/mpt3sas_base.c reply[0] = le16_to_cpu(ioc->base_readl(&ioc->chip->Doorbell) ioc 5734 drivers/scsi/mpt3sas/mpt3sas_base.c writel(0, &ioc->chip->HostInterruptStatus); ioc 5735 drivers/scsi/mpt3sas/mpt3sas_base.c if ((_base_wait_for_doorbell_int(ioc, 5))) { ioc 5736 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "doorbell handshake int failed (line=%d)\n", ioc 5740 drivers/scsi/mpt3sas/mpt3sas_base.c reply[1] = le16_to_cpu(ioc->base_readl(&ioc->chip->Doorbell) ioc 5742 drivers/scsi/mpt3sas/mpt3sas_base.c writel(0, &ioc->chip->HostInterruptStatus); ioc 5745 drivers/scsi/mpt3sas/mpt3sas_base.c if ((_base_wait_for_doorbell_int(ioc, 5))) { ioc 5746 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "doorbell handshake int failed (line=%d)\n", ioc 5751 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_readl(&ioc->chip->Doorbell); ioc 5754 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_readl(&ioc->chip->Doorbell) ioc 5756 drivers/scsi/mpt3sas/mpt3sas_base.c writel(0, &ioc->chip->HostInterruptStatus); ioc 5759 drivers/scsi/mpt3sas/mpt3sas_base.c _base_wait_for_doorbell_int(ioc, 5); ioc 5760 drivers/scsi/mpt3sas/mpt3sas_base.c if (_base_wait_for_doorbell_not_used(ioc, 5) != 0) { ioc 5761 drivers/scsi/mpt3sas/mpt3sas_base.c dhsprintk(ioc, ioc 5762 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "doorbell is in use (line=%d)\n", ioc 5765 drivers/scsi/mpt3sas/mpt3sas_base.c writel(0, &ioc->chip->HostInterruptStatus); ioc 5767 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->logging_level & MPT_DEBUG_INIT) { ioc 5792 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_sas_iounit_control(struct MPT3SAS_ADAPTER *ioc, ioc 5801 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); ioc 5803 drivers/scsi/mpt3sas/mpt3sas_base.c mutex_lock(&ioc->base_cmds.mutex); ioc 5805 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->base_cmds.status != MPT3_CMD_NOT_USED) { ioc 5806 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: base_cmd in use\n", __func__); ioc 5811 drivers/scsi/mpt3sas/mpt3sas_base.c rc = mpt3sas_wait_for_ioc(ioc, IOC_OPERATIONAL_WAIT_COUNT); ioc 5815 drivers/scsi/mpt3sas/mpt3sas_base.c smid = mpt3sas_base_get_smid(ioc, ioc->base_cb_idx); ioc 5817 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); ioc 5823 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_cmds.status = MPT3_CMD_PENDING; ioc 5824 drivers/scsi/mpt3sas/mpt3sas_base.c request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 5825 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_cmds.smid = smid; ioc 5829 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->ioc_link_reset_in_progress = 1; ioc 5830 drivers/scsi/mpt3sas/mpt3sas_base.c init_completion(&ioc->base_cmds.done); ioc 5831 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->put_smid_default(ioc, smid); ioc 5832 drivers/scsi/mpt3sas/mpt3sas_base.c wait_for_completion_timeout(&ioc->base_cmds.done, ioc 5836 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->ioc_link_reset_in_progress) ioc 5837 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->ioc_link_reset_in_progress = 0; ioc 5838 drivers/scsi/mpt3sas/mpt3sas_base.c if (!(ioc->base_cmds.status & MPT3_CMD_COMPLETE)) { ioc 5840 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_check_cmd_timeout(ioc, ioc 5841 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_cmds.status, mpi_request, ioc 5845 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->base_cmds.status & MPT3_CMD_REPLY_VALID) ioc 5846 drivers/scsi/mpt3sas/mpt3sas_base.c memcpy(mpi_reply, ioc->base_cmds.reply, ioc 5850 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_cmds.status = MPT3_CMD_NOT_USED; ioc 5855 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER); ioc 5856 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_cmds.status = MPT3_CMD_NOT_USED; ioc 5859 drivers/scsi/mpt3sas/mpt3sas_base.c mutex_unlock(&ioc->base_cmds.mutex); ioc 5875 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_scsi_enclosure_processor(struct MPT3SAS_ADAPTER *ioc, ioc 5883 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); ioc 5885 drivers/scsi/mpt3sas/mpt3sas_base.c mutex_lock(&ioc->base_cmds.mutex); ioc 5887 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->base_cmds.status != MPT3_CMD_NOT_USED) { ioc 5888 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: base_cmd in use\n", __func__); ioc 5893 drivers/scsi/mpt3sas/mpt3sas_base.c rc = mpt3sas_wait_for_ioc(ioc, IOC_OPERATIONAL_WAIT_COUNT); ioc 5897 drivers/scsi/mpt3sas/mpt3sas_base.c smid = mpt3sas_base_get_smid(ioc, ioc->base_cb_idx); ioc 5899 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); ioc 5905 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_cmds.status = MPT3_CMD_PENDING; ioc 5906 drivers/scsi/mpt3sas/mpt3sas_base.c request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 5907 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_cmds.smid = smid; ioc 5908 drivers/scsi/mpt3sas/mpt3sas_base.c memset(request, 0, ioc->request_sz); ioc 5910 drivers/scsi/mpt3sas/mpt3sas_base.c init_completion(&ioc->base_cmds.done); ioc 5911 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->put_smid_default(ioc, smid); ioc 5912 drivers/scsi/mpt3sas/mpt3sas_base.c wait_for_completion_timeout(&ioc->base_cmds.done, ioc 5914 drivers/scsi/mpt3sas/mpt3sas_base.c if (!(ioc->base_cmds.status & MPT3_CMD_COMPLETE)) { ioc 5916 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_check_cmd_timeout(ioc, ioc 5917 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_cmds.status, mpi_request, ioc 5921 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->base_cmds.status & MPT3_CMD_REPLY_VALID) ioc 5922 drivers/scsi/mpt3sas/mpt3sas_base.c memcpy(mpi_reply, ioc->base_cmds.reply, ioc 5926 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_cmds.status = MPT3_CMD_NOT_USED; ioc 5931 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER); ioc 5932 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_cmds.status = MPT3_CMD_NOT_USED; ioc 5935 drivers/scsi/mpt3sas/mpt3sas_base.c mutex_unlock(&ioc->base_cmds.mutex); ioc 5947 drivers/scsi/mpt3sas/mpt3sas_base.c _base_get_port_facts(struct MPT3SAS_ADAPTER *ioc, int port) ioc 5954 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); ioc 5961 drivers/scsi/mpt3sas/mpt3sas_base.c r = _base_handshake_req_reply_wait(ioc, mpi_request_sz, ioc 5965 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: handshake failed (r=%d)\n", __func__, r); ioc 5969 drivers/scsi/mpt3sas/mpt3sas_base.c pfacts = &ioc->pfacts[port]; ioc 5988 drivers/scsi/mpt3sas/mpt3sas_base.c _base_wait_for_iocstate(struct MPT3SAS_ADAPTER *ioc, int timeout) ioc 5993 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); ioc 5995 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->pci_error_recovery) { ioc 5996 drivers/scsi/mpt3sas/mpt3sas_base.c dfailprintk(ioc, ioc 5997 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s: host in pci error recovery\n", ioc 6002 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_state = mpt3sas_base_get_iocstate(ioc, 0); ioc 6003 drivers/scsi/mpt3sas/mpt3sas_base.c dhsprintk(ioc, ioc 6004 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s: ioc_state(0x%08x)\n", ioc 6012 drivers/scsi/mpt3sas/mpt3sas_base.c dhsprintk(ioc, ioc_info(ioc, "unexpected doorbell active!\n")); ioc 6017 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_fault_info(ioc, ioc_state & ioc 6022 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_state = _base_wait_on_iocstate(ioc, MPI2_IOC_STATE_READY, timeout); ioc 6024 drivers/scsi/mpt3sas/mpt3sas_base.c dfailprintk(ioc, ioc 6025 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s: failed going to ready state (ioc_state=0x%x)\n", ioc 6031 drivers/scsi/mpt3sas/mpt3sas_base.c rc = _base_diag_reset(ioc); ioc 6042 drivers/scsi/mpt3sas/mpt3sas_base.c _base_get_ioc_facts(struct MPT3SAS_ADAPTER *ioc) ioc 6049 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); ioc 6051 drivers/scsi/mpt3sas/mpt3sas_base.c r = _base_wait_for_iocstate(ioc, 10); ioc 6053 drivers/scsi/mpt3sas/mpt3sas_base.c dfailprintk(ioc, ioc 6054 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s: failed getting to correct state\n", ioc 6062 drivers/scsi/mpt3sas/mpt3sas_base.c r = _base_handshake_req_reply_wait(ioc, mpi_request_sz, ioc 6066 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: handshake failed (r=%d)\n", __func__, r); ioc 6070 drivers/scsi/mpt3sas/mpt3sas_base.c facts = &ioc->facts; ioc 6081 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->msix_enable && (facts->MaxMSIxVectors <= ioc 6082 drivers/scsi/mpt3sas/mpt3sas_base.c MAX_COMBINED_MSIX_VECTORS(ioc->is_gen35_ioc))) ioc 6083 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->combined_reply_queue = 0; ioc 6090 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->ir_firmware = 1; ioc 6093 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->rdpq_array_capable = 1; ioc 6095 drivers/scsi/mpt3sas/mpt3sas_base.c && ioc->is_aero_ioc) ioc 6096 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->atomic_desc_capable = 1; ioc 6100 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->hba_mpi_version_belonged != MPI2_VERSION) { ioc 6106 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->shost->max_id = -1; ioc 6119 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->page_size = 1 << facts->CurrentHostPageSize; ioc 6120 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->page_size == 1) { ioc 6121 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "CurrentHostPageSize is 0: Setting default host page size to 4k\n"); ioc 6122 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->page_size = 1 << MPT3SAS_HOST_PAGE_SIZE_4K; ioc 6124 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc 6125 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "CurrentHostPageSize(%d)\n", ioc 6128 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc 6129 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "hba queue depth(%d), max chains per io(%d)\n", ioc 6131 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc 6132 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "request frame size(%d), reply frame size(%d)\n", ioc 6145 drivers/scsi/mpt3sas/mpt3sas_base.c _base_send_ioc_init(struct MPT3SAS_ADAPTER *ioc) ioc 6154 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); ioc 6161 drivers/scsi/mpt3sas/mpt3sas_base.c mpi_request.MsgVersion = cpu_to_le16(ioc->hba_mpi_version_belonged); ioc 6165 drivers/scsi/mpt3sas/mpt3sas_base.c if (_base_is_controller_msix_enabled(ioc)) ioc 6166 drivers/scsi/mpt3sas/mpt3sas_base.c mpi_request.HostMSIxVectors = ioc->reply_queue_count; ioc 6167 drivers/scsi/mpt3sas/mpt3sas_base.c mpi_request.SystemRequestFrameSize = cpu_to_le16(ioc->request_sz/4); ioc 6169 drivers/scsi/mpt3sas/mpt3sas_base.c cpu_to_le16(ioc->reply_post_queue_depth); ioc 6171 drivers/scsi/mpt3sas/mpt3sas_base.c cpu_to_le16(ioc->reply_free_queue_depth); ioc 6174 drivers/scsi/mpt3sas/mpt3sas_base.c cpu_to_le32((u64)ioc->sense_dma >> 32); ioc 6176 drivers/scsi/mpt3sas/mpt3sas_base.c cpu_to_le32((u64)ioc->reply_dma >> 32); ioc 6178 drivers/scsi/mpt3sas/mpt3sas_base.c cpu_to_le64((u64)ioc->request_dma); ioc 6180 drivers/scsi/mpt3sas/mpt3sas_base.c cpu_to_le64((u64)ioc->reply_free_dma); ioc 6182 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->rdpq_array_enable) { ioc 6183 drivers/scsi/mpt3sas/mpt3sas_base.c reply_post_free_array_sz = ioc->reply_queue_count * ioc 6185 drivers/scsi/mpt3sas/mpt3sas_base.c memset(ioc->reply_post_free_array, 0, reply_post_free_array_sz); ioc 6186 drivers/scsi/mpt3sas/mpt3sas_base.c for (i = 0; i < ioc->reply_queue_count; i++) ioc 6187 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_post_free_array[i].RDPQBaseAddress = ioc 6189 drivers/scsi/mpt3sas/mpt3sas_base.c (u64)ioc->reply_post[i].reply_post_free_dma); ioc 6192 drivers/scsi/mpt3sas/mpt3sas_base.c cpu_to_le64((u64)ioc->reply_post_free_array_dma); ioc 6195 drivers/scsi/mpt3sas/mpt3sas_base.c cpu_to_le64((u64)ioc->reply_post[0].reply_post_free_dma); ioc 6204 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->logging_level & MPT_DEBUG_INIT) { ioc 6215 drivers/scsi/mpt3sas/mpt3sas_base.c r = _base_handshake_req_reply_wait(ioc, ioc 6220 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: handshake failed (r=%d)\n", __func__, r); ioc 6227 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: failed\n", __func__); ioc 6245 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_port_enable_done(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index, ioc 6251 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->port_enable_cmds.status == MPT3_CMD_NOT_USED) ioc 6254 drivers/scsi/mpt3sas/mpt3sas_base.c mpi_reply = mpt3sas_base_get_reply_virt_addr(ioc, reply); ioc 6261 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->port_enable_cmds.status &= ~MPT3_CMD_PENDING; ioc 6262 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->port_enable_cmds.status |= MPT3_CMD_COMPLETE; ioc 6263 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->port_enable_cmds.status |= MPT3_CMD_REPLY_VALID; ioc 6264 drivers/scsi/mpt3sas/mpt3sas_base.c memcpy(ioc->port_enable_cmds.reply, mpi_reply, mpi_reply->MsgLength*4); ioc 6267 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->port_enable_failed = 1; ioc 6269 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->is_driver_loading) { ioc 6271 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_port_enable_complete(ioc); ioc 6274 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->start_scan_failed = ioc_status; ioc 6275 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->start_scan = 0; ioc 6279 drivers/scsi/mpt3sas/mpt3sas_base.c complete(&ioc->port_enable_cmds.done); ioc 6290 drivers/scsi/mpt3sas/mpt3sas_base.c _base_send_port_enable(struct MPT3SAS_ADAPTER *ioc) ioc 6298 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "sending port enable !!\n"); ioc 6300 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->port_enable_cmds.status & MPT3_CMD_PENDING) { ioc 6301 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: internal command already in use\n", __func__); ioc 6305 drivers/scsi/mpt3sas/mpt3sas_base.c smid = mpt3sas_base_get_smid(ioc, ioc->port_enable_cb_idx); ioc 6307 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); ioc 6311 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->port_enable_cmds.status = MPT3_CMD_PENDING; ioc 6312 drivers/scsi/mpt3sas/mpt3sas_base.c mpi_request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 6313 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->port_enable_cmds.smid = smid; ioc 6317 drivers/scsi/mpt3sas/mpt3sas_base.c init_completion(&ioc->port_enable_cmds.done); ioc 6318 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->put_smid_default(ioc, smid); ioc 6319 drivers/scsi/mpt3sas/mpt3sas_base.c wait_for_completion_timeout(&ioc->port_enable_cmds.done, 300*HZ); ioc 6320 drivers/scsi/mpt3sas/mpt3sas_base.c if (!(ioc->port_enable_cmds.status & MPT3_CMD_COMPLETE)) { ioc 6321 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: timeout\n", __func__); ioc 6324 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->port_enable_cmds.status & MPT3_CMD_RESET) ioc 6331 drivers/scsi/mpt3sas/mpt3sas_base.c mpi_reply = ioc->port_enable_cmds.reply; ioc 6334 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: failed with (ioc_status=0x%08x)\n", ioc 6341 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->port_enable_cmds.status = MPT3_CMD_NOT_USED; ioc 6342 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "port enable: %s\n", r == 0 ? "SUCCESS" : "FAILED"); ioc 6353 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_port_enable(struct MPT3SAS_ADAPTER *ioc) ioc 6358 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "sending port enable !!\n"); ioc 6360 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->port_enable_cmds.status & MPT3_CMD_PENDING) { ioc 6361 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: internal command already in use\n", __func__); ioc 6365 drivers/scsi/mpt3sas/mpt3sas_base.c smid = mpt3sas_base_get_smid(ioc, ioc->port_enable_cb_idx); ioc 6367 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); ioc 6371 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->port_enable_cmds.status = MPT3_CMD_PENDING; ioc 6372 drivers/scsi/mpt3sas/mpt3sas_base.c mpi_request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 6373 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->port_enable_cmds.smid = smid; ioc 6377 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->put_smid_default(ioc, smid); ioc 6391 drivers/scsi/mpt3sas/mpt3sas_base.c _base_determine_wait_on_discovery(struct MPT3SAS_ADAPTER *ioc) ioc 6399 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->ir_firmware) ioc 6403 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->bios_pg3.BiosVersion) ioc 6413 drivers/scsi/mpt3sas/mpt3sas_base.c if ((ioc->bios_pg2.CurrentBootDeviceForm & ioc 6417 drivers/scsi/mpt3sas/mpt3sas_base.c (ioc->bios_pg2.ReqBootDeviceForm & ioc 6421 drivers/scsi/mpt3sas/mpt3sas_base.c (ioc->bios_pg2.ReqAltBootDeviceForm & ioc 6437 drivers/scsi/mpt3sas/mpt3sas_base.c _base_unmask_events(struct MPT3SAS_ADAPTER *ioc, u16 event) ioc 6447 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->event_masks[0] &= ~desired_event; ioc 6449 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->event_masks[1] &= ~desired_event; ioc 6451 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->event_masks[2] &= ~desired_event; ioc 6453 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->event_masks[3] &= ~desired_event; ioc 6463 drivers/scsi/mpt3sas/mpt3sas_base.c _base_event_notification(struct MPT3SAS_ADAPTER *ioc) ioc 6470 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); ioc 6472 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->base_cmds.status & MPT3_CMD_PENDING) { ioc 6473 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: internal command already in use\n", __func__); ioc 6477 drivers/scsi/mpt3sas/mpt3sas_base.c smid = mpt3sas_base_get_smid(ioc, ioc->base_cb_idx); ioc 6479 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); ioc 6482 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_cmds.status = MPT3_CMD_PENDING; ioc 6483 drivers/scsi/mpt3sas/mpt3sas_base.c mpi_request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 6484 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_cmds.smid = smid; ioc 6491 drivers/scsi/mpt3sas/mpt3sas_base.c cpu_to_le32(ioc->event_masks[i]); ioc 6492 drivers/scsi/mpt3sas/mpt3sas_base.c init_completion(&ioc->base_cmds.done); ioc 6493 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->put_smid_default(ioc, smid); ioc 6494 drivers/scsi/mpt3sas/mpt3sas_base.c wait_for_completion_timeout(&ioc->base_cmds.done, 30*HZ); ioc 6495 drivers/scsi/mpt3sas/mpt3sas_base.c if (!(ioc->base_cmds.status & MPT3_CMD_COMPLETE)) { ioc 6496 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: timeout\n", __func__); ioc 6499 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->base_cmds.status & MPT3_CMD_RESET) ioc 6504 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc_info(ioc, "%s: complete\n", __func__)); ioc 6505 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_cmds.status = MPT3_CMD_NOT_USED; ioc 6518 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_validate_event_type(struct MPT3SAS_ADAPTER *ioc, u32 *event_type) ioc 6530 drivers/scsi/mpt3sas/mpt3sas_base.c (ioc->event_masks[i] & desired_event)) { ioc 6531 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->event_masks[i] &= ~desired_event; ioc 6541 drivers/scsi/mpt3sas/mpt3sas_base.c mutex_lock(&ioc->base_cmds.mutex); ioc 6542 drivers/scsi/mpt3sas/mpt3sas_base.c _base_event_notification(ioc); ioc 6543 drivers/scsi/mpt3sas/mpt3sas_base.c mutex_unlock(&ioc->base_cmds.mutex); ioc 6553 drivers/scsi/mpt3sas/mpt3sas_base.c _base_diag_reset(struct MPT3SAS_ADAPTER *ioc) ioc 6560 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "sending diag reset !!\n"); ioc 6562 drivers/scsi/mpt3sas/mpt3sas_base.c drsprintk(ioc, ioc_info(ioc, "clear interrupts\n")); ioc 6569 drivers/scsi/mpt3sas/mpt3sas_base.c drsprintk(ioc, ioc_info(ioc, "write magic sequence\n")); ioc 6570 drivers/scsi/mpt3sas/mpt3sas_base.c writel(MPI2_WRSEQ_FLUSH_KEY_VALUE, &ioc->chip->WriteSequence); ioc 6571 drivers/scsi/mpt3sas/mpt3sas_base.c writel(MPI2_WRSEQ_1ST_KEY_VALUE, &ioc->chip->WriteSequence); ioc 6572 drivers/scsi/mpt3sas/mpt3sas_base.c writel(MPI2_WRSEQ_2ND_KEY_VALUE, &ioc->chip->WriteSequence); ioc 6573 drivers/scsi/mpt3sas/mpt3sas_base.c writel(MPI2_WRSEQ_3RD_KEY_VALUE, &ioc->chip->WriteSequence); ioc 6574 drivers/scsi/mpt3sas/mpt3sas_base.c writel(MPI2_WRSEQ_4TH_KEY_VALUE, &ioc->chip->WriteSequence); ioc 6575 drivers/scsi/mpt3sas/mpt3sas_base.c writel(MPI2_WRSEQ_5TH_KEY_VALUE, &ioc->chip->WriteSequence); ioc 6576 drivers/scsi/mpt3sas/mpt3sas_base.c writel(MPI2_WRSEQ_6TH_KEY_VALUE, &ioc->chip->WriteSequence); ioc 6584 drivers/scsi/mpt3sas/mpt3sas_base.c host_diagnostic = ioc->base_readl(&ioc->chip->HostDiagnostic); ioc 6585 drivers/scsi/mpt3sas/mpt3sas_base.c drsprintk(ioc, ioc 6586 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "wrote magic sequence: count(%d), host_diagnostic(0x%08x)\n", ioc 6591 drivers/scsi/mpt3sas/mpt3sas_base.c hcb_size = ioc->base_readl(&ioc->chip->HCBSize); ioc 6593 drivers/scsi/mpt3sas/mpt3sas_base.c drsprintk(ioc, ioc_info(ioc, "diag reset: issued\n")); ioc 6595 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->chip->HostDiagnostic); ioc 6604 drivers/scsi/mpt3sas/mpt3sas_base.c host_diagnostic = ioc->base_readl(&ioc->chip->HostDiagnostic); ioc 6616 drivers/scsi/mpt3sas/mpt3sas_base.c drsprintk(ioc, ioc 6617 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "restart the adapter assuming the HCB Address points to good F/W\n")); ioc 6620 drivers/scsi/mpt3sas/mpt3sas_base.c writel(host_diagnostic, &ioc->chip->HostDiagnostic); ioc 6622 drivers/scsi/mpt3sas/mpt3sas_base.c drsprintk(ioc, ioc_info(ioc, "re-enable the HCDW\n")); ioc 6624 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->chip->HCBSize); ioc 6627 drivers/scsi/mpt3sas/mpt3sas_base.c drsprintk(ioc, ioc_info(ioc, "restart the adapter\n")); ioc 6629 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->chip->HostDiagnostic); ioc 6631 drivers/scsi/mpt3sas/mpt3sas_base.c drsprintk(ioc, ioc 6632 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "disable writes to the diagnostic register\n")); ioc 6633 drivers/scsi/mpt3sas/mpt3sas_base.c writel(MPI2_WRSEQ_FLUSH_KEY_VALUE, &ioc->chip->WriteSequence); ioc 6635 drivers/scsi/mpt3sas/mpt3sas_base.c drsprintk(ioc, ioc_info(ioc, "Wait for FW to go to the READY state\n")); ioc 6636 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_state = _base_wait_on_iocstate(ioc, MPI2_IOC_STATE_READY, 20); ioc 6638 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: failed going to ready state (ioc_state=0x%x)\n", ioc 6643 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "diag reset: SUCCESS\n"); ioc 6647 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "diag reset: FAILED\n"); ioc 6659 drivers/scsi/mpt3sas/mpt3sas_base.c _base_make_ioc_ready(struct MPT3SAS_ADAPTER *ioc, enum reset_type type) ioc 6665 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); ioc 6667 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->pci_error_recovery) ioc 6670 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_state = mpt3sas_base_get_iocstate(ioc, 0); ioc 6671 drivers/scsi/mpt3sas/mpt3sas_base.c dhsprintk(ioc, ioc 6672 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s: ioc_state(0x%08x)\n", ioc 6681 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: failed going to ready state (ioc_state=0x%x)\n", ioc 6686 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_state = mpt3sas_base_get_iocstate(ioc, 0); ioc 6694 drivers/scsi/mpt3sas/mpt3sas_base.c dhsprintk(ioc, ioc_info(ioc, "unexpected doorbell active!\n")); ioc 6699 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_fault_info(ioc, ioc_state & ioc 6708 drivers/scsi/mpt3sas/mpt3sas_base.c if (!(_base_send_ioc_reset(ioc, ioc 6714 drivers/scsi/mpt3sas/mpt3sas_base.c rc = _base_diag_reset(ioc); ioc 6725 drivers/scsi/mpt3sas/mpt3sas_base.c _base_make_ioc_operational(struct MPT3SAS_ADAPTER *ioc) ioc 6738 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); ioc 6742 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->delayed_tr_list, list) { ioc 6749 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->delayed_tr_volume_list, list) { ioc 6755 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->delayed_sc_list, list) { ioc 6761 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->delayed_event_ack_list, list) { ioc 6766 drivers/scsi/mpt3sas/mpt3sas_base.c spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); ioc 6769 drivers/scsi/mpt3sas/mpt3sas_base.c INIT_LIST_HEAD(&ioc->hpr_free_list); ioc 6770 drivers/scsi/mpt3sas/mpt3sas_base.c smid = ioc->hi_priority_smid; ioc 6771 drivers/scsi/mpt3sas/mpt3sas_base.c for (i = 0; i < ioc->hi_priority_depth; i++, smid++) { ioc 6772 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->hpr_lookup[i].cb_idx = 0xFF; ioc 6773 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->hpr_lookup[i].smid = smid; ioc 6774 drivers/scsi/mpt3sas/mpt3sas_base.c list_add_tail(&ioc->hpr_lookup[i].tracker_list, ioc 6775 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->hpr_free_list); ioc 6779 drivers/scsi/mpt3sas/mpt3sas_base.c INIT_LIST_HEAD(&ioc->internal_free_list); ioc 6780 drivers/scsi/mpt3sas/mpt3sas_base.c smid = ioc->internal_smid; ioc 6781 drivers/scsi/mpt3sas/mpt3sas_base.c for (i = 0; i < ioc->internal_depth; i++, smid++) { ioc 6782 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->internal_lookup[i].cb_idx = 0xFF; ioc 6783 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->internal_lookup[i].smid = smid; ioc 6784 drivers/scsi/mpt3sas/mpt3sas_base.c list_add_tail(&ioc->internal_lookup[i].tracker_list, ioc 6785 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->internal_free_list); ioc 6788 drivers/scsi/mpt3sas/mpt3sas_base.c spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags); ioc 6791 drivers/scsi/mpt3sas/mpt3sas_base.c for (i = 0, reply_address = (u32)ioc->reply_dma ; ioc 6792 drivers/scsi/mpt3sas/mpt3sas_base.c i < ioc->reply_free_queue_depth ; i++, reply_address += ioc 6793 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_sz) { ioc 6794 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_free[i] = cpu_to_le32(reply_address); ioc 6795 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->is_mcpu_endpoint) ioc 6796 drivers/scsi/mpt3sas/mpt3sas_base.c _base_clone_reply_to_sys_mem(ioc, ioc 6801 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->is_driver_loading) ioc 6802 drivers/scsi/mpt3sas/mpt3sas_base.c _base_assign_reply_queues(ioc); ioc 6806 drivers/scsi/mpt3sas/mpt3sas_base.c reply_post_free_contig = ioc->reply_post[0].reply_post_free; ioc 6807 drivers/scsi/mpt3sas/mpt3sas_base.c list_for_each_entry(reply_q, &ioc->reply_queue_list, list) { ioc 6812 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->rdpq_array_enable) { ioc 6814 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_post[index++].reply_post_free; ioc 6817 drivers/scsi/mpt3sas/mpt3sas_base.c reply_post_free_contig += ioc->reply_post_queue_depth; ioc 6821 drivers/scsi/mpt3sas/mpt3sas_base.c for (i = 0; i < ioc->reply_post_queue_depth; i++) ioc 6824 drivers/scsi/mpt3sas/mpt3sas_base.c if (!_base_is_controller_msix_enabled(ioc)) ioc 6829 drivers/scsi/mpt3sas/mpt3sas_base.c r = _base_send_ioc_init(ioc); ioc 6836 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->is_driver_loading) ioc 6839 drivers/scsi/mpt3sas/mpt3sas_base.c rc = _base_check_for_fault_and_issue_reset(ioc); ioc 6840 drivers/scsi/mpt3sas/mpt3sas_base.c if (rc || (_base_send_ioc_init(ioc))) ioc 6845 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_free_host_index = ioc->reply_free_queue_depth - 1; ioc 6846 drivers/scsi/mpt3sas/mpt3sas_base.c writel(ioc->reply_free_host_index, &ioc->chip->ReplyFreeHostIndex); ioc 6849 drivers/scsi/mpt3sas/mpt3sas_base.c list_for_each_entry(reply_q, &ioc->reply_queue_list, list) { ioc 6850 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->combined_reply_queue) ioc 6853 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->replyPostRegisterIndex[reply_q->msix_index/8]); ioc 6857 drivers/scsi/mpt3sas/mpt3sas_base.c &ioc->chip->ReplyPostHostIndex); ioc 6859 drivers/scsi/mpt3sas/mpt3sas_base.c if (!_base_is_controller_msix_enabled(ioc)) ioc 6865 drivers/scsi/mpt3sas/mpt3sas_base.c _base_unmask_interrupts(ioc); ioc 6867 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->hba_mpi_version_belonged != MPI2_VERSION) { ioc 6868 drivers/scsi/mpt3sas/mpt3sas_base.c r = _base_display_fwpkg_version(ioc); ioc 6873 drivers/scsi/mpt3sas/mpt3sas_base.c _base_static_config_pages(ioc); ioc 6874 drivers/scsi/mpt3sas/mpt3sas_base.c r = _base_event_notification(ioc); ioc 6878 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->is_driver_loading) { ioc 6880 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->is_warpdrive && ioc->manu_pg10.OEMIdentifier ioc 6883 drivers/scsi/mpt3sas/mpt3sas_base.c le32_to_cpu(ioc->manu_pg10.OEMSpecificFlags0) & ioc 6886 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->mfg_pg10_hide_flag = hide_flag; ioc 6889 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->wait_for_discovery_to_complete = ioc 6890 drivers/scsi/mpt3sas/mpt3sas_base.c _base_determine_wait_on_discovery(ioc); ioc 6895 drivers/scsi/mpt3sas/mpt3sas_base.c r = _base_send_port_enable(ioc); ioc 6907 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_free_resources(struct MPT3SAS_ADAPTER *ioc) ioc 6909 drivers/scsi/mpt3sas/mpt3sas_base.c dexitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); ioc 6912 drivers/scsi/mpt3sas/mpt3sas_base.c mutex_lock(&ioc->pci_access_mutex); ioc 6913 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->chip_phys && ioc->chip) { ioc 6914 drivers/scsi/mpt3sas/mpt3sas_base.c _base_mask_interrupts(ioc); ioc 6915 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->shost_recovery = 1; ioc 6916 drivers/scsi/mpt3sas/mpt3sas_base.c _base_make_ioc_ready(ioc, SOFT_RESET); ioc 6917 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->shost_recovery = 0; ioc 6920 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_unmap_resources(ioc); ioc 6921 drivers/scsi/mpt3sas/mpt3sas_base.c mutex_unlock(&ioc->pci_access_mutex); ioc 6932 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_attach(struct MPT3SAS_ADAPTER *ioc) ioc 6937 drivers/scsi/mpt3sas/mpt3sas_base.c dinitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); ioc 6940 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->cpu_count = num_online_cpus(); ioc 6943 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->cpu_msix_table_sz = last_cpu_id + 1; ioc 6944 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->cpu_msix_table = kzalloc(ioc->cpu_msix_table_sz, GFP_KERNEL); ioc 6945 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_queue_count = 1; ioc 6946 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->cpu_msix_table) { ioc 6947 drivers/scsi/mpt3sas/mpt3sas_base.c dfailprintk(ioc, ioc 6948 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "allocation for cpu_msix_table failed!!!\n")); ioc 6953 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->is_warpdrive) { ioc 6954 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->reply_post_host_index = kcalloc(ioc->cpu_msix_table_sz, ioc 6956 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->reply_post_host_index) { ioc 6957 drivers/scsi/mpt3sas/mpt3sas_base.c dfailprintk(ioc, ioc 6958 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "allocation for reply_post_host_index failed!!!\n")); ioc 6964 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->smp_affinity_enable = smp_affinity_enable; ioc 6966 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->rdpq_array_enable_assigned = 0; ioc 6967 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->dma_mask = 0; ioc 6968 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->is_aero_ioc) ioc 6969 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_readl = &_base_readl_aero; ioc 6971 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_readl = &_base_readl; ioc 6972 drivers/scsi/mpt3sas/mpt3sas_base.c r = mpt3sas_base_map_resources(ioc); ioc 6976 drivers/scsi/mpt3sas/mpt3sas_base.c pci_set_drvdata(ioc->pdev, ioc->shost); ioc 6977 drivers/scsi/mpt3sas/mpt3sas_base.c r = _base_get_ioc_facts(ioc); ioc 6979 drivers/scsi/mpt3sas/mpt3sas_base.c rc = _base_check_for_fault_and_issue_reset(ioc); ioc 6980 drivers/scsi/mpt3sas/mpt3sas_base.c if (rc || (_base_get_ioc_facts(ioc))) ioc 6984 drivers/scsi/mpt3sas/mpt3sas_base.c switch (ioc->hba_mpi_version_belonged) { ioc 6986 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->build_sg_scmd = &_base_build_sg_scmd; ioc 6987 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->build_sg = &_base_build_sg; ioc 6988 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->build_zero_len_sge = &_base_build_zero_len_sge; ioc 6989 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->get_msix_index_for_smlio = &_base_get_msix_index; ioc 6999 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->build_sg_scmd = &_base_build_sg_scmd_ieee; ioc 7000 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->build_sg = &_base_build_sg_ieee; ioc 7001 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->build_nvme_prp = &_base_build_nvme_prp; ioc 7002 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->build_zero_len_sge = &_base_build_zero_len_sge_ieee; ioc 7003 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->sge_size_ieee = sizeof(Mpi2IeeeSgeSimple64_t); ioc 7004 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->high_iops_queues) ioc 7005 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->get_msix_index_for_smlio = ioc 7008 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->get_msix_index_for_smlio = &_base_get_msix_index; ioc 7011 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->atomic_desc_capable) { ioc 7012 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->put_smid_default = &_base_put_smid_default_atomic; ioc 7013 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->put_smid_scsi_io = &_base_put_smid_scsi_io_atomic; ioc 7014 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->put_smid_fast_path = ioc 7016 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->put_smid_hi_priority = ioc 7019 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->put_smid_default = &_base_put_smid_default; ioc 7020 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->put_smid_fast_path = &_base_put_smid_fast_path; ioc 7021 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->put_smid_hi_priority = &_base_put_smid_hi_priority; ioc 7022 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->is_mcpu_endpoint) ioc 7023 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->put_smid_scsi_io = ioc 7026 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->put_smid_scsi_io = &_base_put_smid_scsi_io; ioc 7034 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->build_sg_mpi = &_base_build_sg; ioc 7035 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->build_zero_len_sge_mpi = &_base_build_zero_len_sge; ioc 7037 drivers/scsi/mpt3sas/mpt3sas_base.c r = _base_make_ioc_ready(ioc, SOFT_RESET); ioc 7041 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pfacts = kcalloc(ioc->facts.NumberOfPorts, ioc 7043 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->pfacts) { ioc 7048 drivers/scsi/mpt3sas/mpt3sas_base.c for (i = 0 ; i < ioc->facts.NumberOfPorts; i++) { ioc 7049 drivers/scsi/mpt3sas/mpt3sas_base.c r = _base_get_port_facts(ioc, i); ioc 7051 drivers/scsi/mpt3sas/mpt3sas_base.c rc = _base_check_for_fault_and_issue_reset(ioc); ioc 7052 drivers/scsi/mpt3sas/mpt3sas_base.c if (rc || (_base_get_port_facts(ioc, i))) ioc 7057 drivers/scsi/mpt3sas/mpt3sas_base.c r = _base_allocate_memory_pools(ioc); ioc 7062 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->thresh_hold = irqpoll_weight; ioc 7064 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->thresh_hold = ioc->hba_queue_depth/4; ioc 7066 drivers/scsi/mpt3sas/mpt3sas_base.c _base_init_irqpolls(ioc); ioc 7067 drivers/scsi/mpt3sas/mpt3sas_base.c init_waitqueue_head(&ioc->reset_wq); ioc 7070 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pd_handles_sz = (ioc->facts.MaxDevHandle / 8); ioc 7071 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->facts.MaxDevHandle % 8) ioc 7072 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pd_handles_sz++; ioc 7073 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pd_handles = kzalloc(ioc->pd_handles_sz, ioc 7075 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->pd_handles) { ioc 7079 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->blocking_handles = kzalloc(ioc->pd_handles_sz, ioc 7081 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->blocking_handles) { ioc 7087 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pend_os_device_add_sz = (ioc->facts.MaxDevHandle / 8); ioc 7088 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->facts.MaxDevHandle % 8) ioc 7089 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pend_os_device_add_sz++; ioc 7090 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pend_os_device_add = kzalloc(ioc->pend_os_device_add_sz, ioc 7092 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->pend_os_device_add) ioc 7095 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->device_remove_in_progress_sz = ioc->pend_os_device_add_sz; ioc 7096 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->device_remove_in_progress = ioc 7097 drivers/scsi/mpt3sas/mpt3sas_base.c kzalloc(ioc->device_remove_in_progress_sz, GFP_KERNEL); ioc 7098 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->device_remove_in_progress) ioc 7101 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->fwfault_debug = mpt3sas_fwfault_debug; ioc 7104 drivers/scsi/mpt3sas/mpt3sas_base.c mutex_init(&ioc->base_cmds.mutex); ioc 7105 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_cmds.reply = kzalloc(ioc->reply_sz, GFP_KERNEL); ioc 7106 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_cmds.status = MPT3_CMD_NOT_USED; ioc 7109 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->port_enable_cmds.reply = kzalloc(ioc->reply_sz, GFP_KERNEL); ioc 7110 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->port_enable_cmds.status = MPT3_CMD_NOT_USED; ioc 7113 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->transport_cmds.reply = kzalloc(ioc->reply_sz, GFP_KERNEL); ioc 7114 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->transport_cmds.status = MPT3_CMD_NOT_USED; ioc 7115 drivers/scsi/mpt3sas/mpt3sas_base.c mutex_init(&ioc->transport_cmds.mutex); ioc 7118 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->scsih_cmds.reply = kzalloc(ioc->reply_sz, GFP_KERNEL); ioc 7119 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->scsih_cmds.status = MPT3_CMD_NOT_USED; ioc 7120 drivers/scsi/mpt3sas/mpt3sas_base.c mutex_init(&ioc->scsih_cmds.mutex); ioc 7123 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->tm_cmds.reply = kzalloc(ioc->reply_sz, GFP_KERNEL); ioc 7124 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->tm_cmds.status = MPT3_CMD_NOT_USED; ioc 7125 drivers/scsi/mpt3sas/mpt3sas_base.c mutex_init(&ioc->tm_cmds.mutex); ioc 7128 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->config_cmds.reply = kzalloc(ioc->reply_sz, GFP_KERNEL); ioc 7129 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->config_cmds.status = MPT3_CMD_NOT_USED; ioc 7130 drivers/scsi/mpt3sas/mpt3sas_base.c mutex_init(&ioc->config_cmds.mutex); ioc 7133 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->ctl_cmds.reply = kzalloc(ioc->reply_sz, GFP_KERNEL); ioc 7134 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->ctl_cmds.sense = kzalloc(SCSI_SENSE_BUFFERSIZE, GFP_KERNEL); ioc 7135 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->ctl_cmds.status = MPT3_CMD_NOT_USED; ioc 7136 drivers/scsi/mpt3sas/mpt3sas_base.c mutex_init(&ioc->ctl_cmds.mutex); ioc 7138 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->base_cmds.reply || !ioc->port_enable_cmds.reply || ioc 7139 drivers/scsi/mpt3sas/mpt3sas_base.c !ioc->transport_cmds.reply || !ioc->scsih_cmds.reply || ioc 7140 drivers/scsi/mpt3sas/mpt3sas_base.c !ioc->tm_cmds.reply || !ioc->config_cmds.reply || ioc 7141 drivers/scsi/mpt3sas/mpt3sas_base.c !ioc->ctl_cmds.reply || !ioc->ctl_cmds.sense) { ioc 7147 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->event_masks[i] = -1; ioc 7150 drivers/scsi/mpt3sas/mpt3sas_base.c _base_unmask_events(ioc, MPI2_EVENT_SAS_DISCOVERY); ioc 7151 drivers/scsi/mpt3sas/mpt3sas_base.c _base_unmask_events(ioc, MPI2_EVENT_SAS_BROADCAST_PRIMITIVE); ioc 7152 drivers/scsi/mpt3sas/mpt3sas_base.c _base_unmask_events(ioc, MPI2_EVENT_SAS_TOPOLOGY_CHANGE_LIST); ioc 7153 drivers/scsi/mpt3sas/mpt3sas_base.c _base_unmask_events(ioc, MPI2_EVENT_SAS_DEVICE_STATUS_CHANGE); ioc 7154 drivers/scsi/mpt3sas/mpt3sas_base.c _base_unmask_events(ioc, MPI2_EVENT_SAS_ENCL_DEVICE_STATUS_CHANGE); ioc 7155 drivers/scsi/mpt3sas/mpt3sas_base.c _base_unmask_events(ioc, MPI2_EVENT_IR_CONFIGURATION_CHANGE_LIST); ioc 7156 drivers/scsi/mpt3sas/mpt3sas_base.c _base_unmask_events(ioc, MPI2_EVENT_IR_VOLUME); ioc 7157 drivers/scsi/mpt3sas/mpt3sas_base.c _base_unmask_events(ioc, MPI2_EVENT_IR_PHYSICAL_DISK); ioc 7158 drivers/scsi/mpt3sas/mpt3sas_base.c _base_unmask_events(ioc, MPI2_EVENT_IR_OPERATION_STATUS); ioc 7159 drivers/scsi/mpt3sas/mpt3sas_base.c _base_unmask_events(ioc, MPI2_EVENT_LOG_ENTRY_ADDED); ioc 7160 drivers/scsi/mpt3sas/mpt3sas_base.c _base_unmask_events(ioc, MPI2_EVENT_TEMP_THRESHOLD); ioc 7161 drivers/scsi/mpt3sas/mpt3sas_base.c _base_unmask_events(ioc, MPI2_EVENT_ACTIVE_CABLE_EXCEPTION); ioc 7162 drivers/scsi/mpt3sas/mpt3sas_base.c _base_unmask_events(ioc, MPI2_EVENT_SAS_DEVICE_DISCOVERY_ERROR); ioc 7163 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->hba_mpi_version_belonged == MPI26_VERSION) { ioc 7164 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->is_gen35_ioc) { ioc 7165 drivers/scsi/mpt3sas/mpt3sas_base.c _base_unmask_events(ioc, ioc 7167 drivers/scsi/mpt3sas/mpt3sas_base.c _base_unmask_events(ioc, MPI2_EVENT_PCIE_ENUMERATION); ioc 7168 drivers/scsi/mpt3sas/mpt3sas_base.c _base_unmask_events(ioc, ioc 7172 drivers/scsi/mpt3sas/mpt3sas_base.c r = _base_make_ioc_operational(ioc); ioc 7180 drivers/scsi/mpt3sas/mpt3sas_base.c memcpy(&ioc->prev_fw_facts, &ioc->facts, ioc 7183 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->non_operational_loop = 0; ioc 7184 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->got_task_abort_from_ioctl = 0; ioc 7189 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->remove_host = 1; ioc 7191 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_free_resources(ioc); ioc 7192 drivers/scsi/mpt3sas/mpt3sas_base.c _base_release_memory_pools(ioc); ioc 7193 drivers/scsi/mpt3sas/mpt3sas_base.c pci_set_drvdata(ioc->pdev, NULL); ioc 7194 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->cpu_msix_table); ioc 7195 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->is_warpdrive) ioc 7196 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->reply_post_host_index); ioc 7197 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->pd_handles); ioc 7198 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->blocking_handles); ioc 7199 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->device_remove_in_progress); ioc 7200 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->pend_os_device_add); ioc 7201 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->tm_cmds.reply); ioc 7202 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->transport_cmds.reply); ioc 7203 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->scsih_cmds.reply); ioc 7204 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->config_cmds.reply); ioc 7205 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->base_cmds.reply); ioc 7206 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->port_enable_cmds.reply); ioc 7207 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->ctl_cmds.reply); ioc 7208 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->ctl_cmds.sense); ioc 7209 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->pfacts); ioc 7210 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->ctl_cmds.reply = NULL; ioc 7211 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_cmds.reply = NULL; ioc 7212 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->tm_cmds.reply = NULL; ioc 7213 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->scsih_cmds.reply = NULL; ioc 7214 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->transport_cmds.reply = NULL; ioc 7215 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->config_cmds.reply = NULL; ioc 7216 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pfacts = NULL; ioc 7226 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_detach(struct MPT3SAS_ADAPTER *ioc) ioc 7228 drivers/scsi/mpt3sas/mpt3sas_base.c dexitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); ioc 7230 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_stop_watchdog(ioc); ioc 7231 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_free_resources(ioc); ioc 7232 drivers/scsi/mpt3sas/mpt3sas_base.c _base_release_memory_pools(ioc); ioc 7233 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_free_enclosure_list(ioc); ioc 7234 drivers/scsi/mpt3sas/mpt3sas_base.c pci_set_drvdata(ioc->pdev, NULL); ioc 7235 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->cpu_msix_table); ioc 7236 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->is_warpdrive) ioc 7237 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->reply_post_host_index); ioc 7238 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->pd_handles); ioc 7239 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->blocking_handles); ioc 7240 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->device_remove_in_progress); ioc 7241 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->pend_os_device_add); ioc 7242 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->pfacts); ioc 7243 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->ctl_cmds.reply); ioc 7244 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->ctl_cmds.sense); ioc 7245 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->base_cmds.reply); ioc 7246 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->port_enable_cmds.reply); ioc 7247 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->tm_cmds.reply); ioc 7248 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->transport_cmds.reply); ioc 7249 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->scsih_cmds.reply); ioc 7250 drivers/scsi/mpt3sas/mpt3sas_base.c kfree(ioc->config_cmds.reply); ioc 7257 drivers/scsi/mpt3sas/mpt3sas_base.c static void _base_pre_reset_handler(struct MPT3SAS_ADAPTER *ioc) ioc 7259 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_scsih_pre_reset_handler(ioc); ioc 7260 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_ctl_pre_reset_handler(ioc); ioc 7261 drivers/scsi/mpt3sas/mpt3sas_base.c dtmprintk(ioc, ioc_info(ioc, "%s: MPT3_IOC_PRE_RESET\n", __func__)); ioc 7268 drivers/scsi/mpt3sas/mpt3sas_base.c static void _base_after_reset_handler(struct MPT3SAS_ADAPTER *ioc) ioc 7270 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_scsih_after_reset_handler(ioc); ioc 7271 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_ctl_after_reset_handler(ioc); ioc 7272 drivers/scsi/mpt3sas/mpt3sas_base.c dtmprintk(ioc, ioc_info(ioc, "%s: MPT3_IOC_AFTER_RESET\n", __func__)); ioc 7273 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->transport_cmds.status & MPT3_CMD_PENDING) { ioc 7274 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->transport_cmds.status |= MPT3_CMD_RESET; ioc 7275 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_free_smid(ioc, ioc->transport_cmds.smid); ioc 7276 drivers/scsi/mpt3sas/mpt3sas_base.c complete(&ioc->transport_cmds.done); ioc 7278 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->base_cmds.status & MPT3_CMD_PENDING) { ioc 7279 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->base_cmds.status |= MPT3_CMD_RESET; ioc 7280 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_free_smid(ioc, ioc->base_cmds.smid); ioc 7281 drivers/scsi/mpt3sas/mpt3sas_base.c complete(&ioc->base_cmds.done); ioc 7283 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->port_enable_cmds.status & MPT3_CMD_PENDING) { ioc 7284 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->port_enable_failed = 1; ioc 7285 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->port_enable_cmds.status |= MPT3_CMD_RESET; ioc 7286 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_free_smid(ioc, ioc->port_enable_cmds.smid); ioc 7287 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->is_driver_loading) { ioc 7288 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->start_scan_failed = ioc 7290 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->start_scan = 0; ioc 7291 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->port_enable_cmds.status = ioc 7294 drivers/scsi/mpt3sas/mpt3sas_base.c complete(&ioc->port_enable_cmds.done); ioc 7297 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->config_cmds.status & MPT3_CMD_PENDING) { ioc 7298 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->config_cmds.status |= MPT3_CMD_RESET; ioc 7299 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_free_smid(ioc, ioc->config_cmds.smid); ioc 7300 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->config_cmds.smid = USHRT_MAX; ioc 7301 drivers/scsi/mpt3sas/mpt3sas_base.c complete(&ioc->config_cmds.done); ioc 7309 drivers/scsi/mpt3sas/mpt3sas_base.c static void _base_reset_done_handler(struct MPT3SAS_ADAPTER *ioc) ioc 7311 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_scsih_reset_done_handler(ioc); ioc 7312 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_ctl_reset_done_handler(ioc); ioc 7313 drivers/scsi/mpt3sas/mpt3sas_base.c dtmprintk(ioc, ioc_info(ioc, "%s: MPT3_IOC_DONE_RESET\n", __func__)); ioc 7324 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_wait_for_commands_to_complete(struct MPT3SAS_ADAPTER *ioc) ioc 7328 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pending_io_count = 0; ioc 7330 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_state = mpt3sas_base_get_iocstate(ioc, 0); ioc 7335 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pending_io_count = scsi_host_busy(ioc->shost); ioc 7337 drivers/scsi/mpt3sas/mpt3sas_base.c if (!ioc->pending_io_count) ioc 7341 drivers/scsi/mpt3sas/mpt3sas_base.c wait_event_timeout(ioc->reset_wq, ioc->pending_io_count == 0, 10 * HZ); ioc 7352 drivers/scsi/mpt3sas/mpt3sas_base.c _base_check_ioc_facts_changes(struct MPT3SAS_ADAPTER *ioc) ioc 7357 drivers/scsi/mpt3sas/mpt3sas_base.c struct mpt3sas_facts *old_facts = &ioc->prev_fw_facts; ioc 7359 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->facts.MaxDevHandle > old_facts->MaxDevHandle) { ioc 7360 drivers/scsi/mpt3sas/mpt3sas_base.c pd_handles_sz = (ioc->facts.MaxDevHandle / 8); ioc 7361 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->facts.MaxDevHandle % 8) ioc 7364 drivers/scsi/mpt3sas/mpt3sas_base.c pd_handles = krealloc(ioc->pd_handles, pd_handles_sz, ioc 7367 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, ioc 7372 drivers/scsi/mpt3sas/mpt3sas_base.c memset(pd_handles + ioc->pd_handles_sz, 0, ioc 7373 drivers/scsi/mpt3sas/mpt3sas_base.c (pd_handles_sz - ioc->pd_handles_sz)); ioc 7374 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pd_handles = pd_handles; ioc 7376 drivers/scsi/mpt3sas/mpt3sas_base.c blocking_handles = krealloc(ioc->blocking_handles, ioc 7379 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, ioc 7385 drivers/scsi/mpt3sas/mpt3sas_base.c memset(blocking_handles + ioc->pd_handles_sz, 0, ioc 7386 drivers/scsi/mpt3sas/mpt3sas_base.c (pd_handles_sz - ioc->pd_handles_sz)); ioc 7387 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->blocking_handles = blocking_handles; ioc 7388 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pd_handles_sz = pd_handles_sz; ioc 7390 drivers/scsi/mpt3sas/mpt3sas_base.c pend_os_device_add = krealloc(ioc->pend_os_device_add, ioc 7393 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, ioc 7398 drivers/scsi/mpt3sas/mpt3sas_base.c memset(pend_os_device_add + ioc->pend_os_device_add_sz, 0, ioc 7399 drivers/scsi/mpt3sas/mpt3sas_base.c (pd_handles_sz - ioc->pend_os_device_add_sz)); ioc 7400 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pend_os_device_add = pend_os_device_add; ioc 7401 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->pend_os_device_add_sz = pd_handles_sz; ioc 7404 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->device_remove_in_progress, pd_handles_sz, GFP_KERNEL); ioc 7406 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, ioc 7413 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->device_remove_in_progress_sz, 0, ioc 7414 drivers/scsi/mpt3sas/mpt3sas_base.c (pd_handles_sz - ioc->device_remove_in_progress_sz)); ioc 7415 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->device_remove_in_progress = device_remove_in_progress; ioc 7416 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->device_remove_in_progress_sz = pd_handles_sz; ioc 7419 drivers/scsi/mpt3sas/mpt3sas_base.c memcpy(&ioc->prev_fw_facts, &ioc->facts, sizeof(struct mpt3sas_facts)); ioc 7431 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_hard_reset_handler(struct MPT3SAS_ADAPTER *ioc, ioc 7439 drivers/scsi/mpt3sas/mpt3sas_base.c dtmprintk(ioc, ioc_info(ioc, "%s: enter\n", __func__)); ioc 7441 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->pci_error_recovery) { ioc 7442 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_err(ioc, "%s: pci error recovery reset\n", __func__); ioc 7448 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_halt_firmware(ioc); ioc 7451 drivers/scsi/mpt3sas/mpt3sas_base.c mutex_lock(&ioc->reset_in_progress_mutex); ioc 7453 drivers/scsi/mpt3sas/mpt3sas_base.c spin_lock_irqsave(&ioc->ioc_reset_in_progress_lock, flags); ioc 7454 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->shost_recovery = 1; ioc 7455 drivers/scsi/mpt3sas/mpt3sas_base.c spin_unlock_irqrestore(&ioc->ioc_reset_in_progress_lock, flags); ioc 7457 drivers/scsi/mpt3sas/mpt3sas_base.c if ((ioc->diag_buffer_status[MPI2_DIAG_BUF_TYPE_TRACE] & ioc 7459 drivers/scsi/mpt3sas/mpt3sas_base.c (!(ioc->diag_buffer_status[MPI2_DIAG_BUF_TYPE_TRACE] & ioc 7462 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_state = mpt3sas_base_get_iocstate(ioc, 0); ioc 7466 drivers/scsi/mpt3sas/mpt3sas_base.c _base_pre_reset_handler(ioc); ioc 7467 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_wait_for_commands_to_complete(ioc); ioc 7468 drivers/scsi/mpt3sas/mpt3sas_base.c _base_mask_interrupts(ioc); ioc 7469 drivers/scsi/mpt3sas/mpt3sas_base.c r = _base_make_ioc_ready(ioc, type); ioc 7472 drivers/scsi/mpt3sas/mpt3sas_base.c _base_after_reset_handler(ioc); ioc 7477 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->is_driver_loading && ioc->port_enable_failed) { ioc 7478 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->remove_host = 1; ioc 7482 drivers/scsi/mpt3sas/mpt3sas_base.c r = _base_get_ioc_facts(ioc); ioc 7486 drivers/scsi/mpt3sas/mpt3sas_base.c r = _base_check_ioc_facts_changes(ioc); ioc 7488 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, ioc 7493 drivers/scsi/mpt3sas/mpt3sas_base.c if (ioc->rdpq_array_enable && !ioc->rdpq_array_capable) ioc 7496 drivers/scsi/mpt3sas/mpt3sas_base.c " firmware version is running\n", ioc->name); ioc 7498 drivers/scsi/mpt3sas/mpt3sas_base.c r = _base_make_ioc_operational(ioc); ioc 7500 drivers/scsi/mpt3sas/mpt3sas_base.c _base_reset_done_handler(ioc); ioc 7503 drivers/scsi/mpt3sas/mpt3sas_base.c dtmprintk(ioc, ioc 7504 drivers/scsi/mpt3sas/mpt3sas_base.c ioc_info(ioc, "%s: %s\n", ioc 7507 drivers/scsi/mpt3sas/mpt3sas_base.c spin_lock_irqsave(&ioc->ioc_reset_in_progress_lock, flags); ioc 7508 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->shost_recovery = 0; ioc 7509 drivers/scsi/mpt3sas/mpt3sas_base.c spin_unlock_irqrestore(&ioc->ioc_reset_in_progress_lock, flags); ioc 7510 drivers/scsi/mpt3sas/mpt3sas_base.c ioc->ioc_reset_count++; ioc 7511 drivers/scsi/mpt3sas/mpt3sas_base.c mutex_unlock(&ioc->reset_in_progress_mutex); ioc 7516 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_trigger_master(ioc, MASTER_TRIGGER_FW_FAULT); ioc 7518 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_trigger_master(ioc, ioc 7521 drivers/scsi/mpt3sas/mpt3sas_base.c dtmprintk(ioc, ioc_info(ioc, "%s: exit\n", __func__)); ioc 166 drivers/scsi/mpt3sas/mpt3sas_base.h #define ioc_err(ioc, fmt, ...) \ ioc 167 drivers/scsi/mpt3sas/mpt3sas_base.h pr_err("%s: " fmt, (ioc)->name, ##__VA_ARGS__) ioc 168 drivers/scsi/mpt3sas/mpt3sas_base.h #define ioc_notice(ioc, fmt, ...) \ ioc 169 drivers/scsi/mpt3sas/mpt3sas_base.h pr_notice("%s: " fmt, (ioc)->name, ##__VA_ARGS__) ioc 170 drivers/scsi/mpt3sas/mpt3sas_base.h #define ioc_warn(ioc, fmt, ...) \ ioc 171 drivers/scsi/mpt3sas/mpt3sas_base.h pr_warn("%s: " fmt, (ioc)->name, ##__VA_ARGS__) ioc 172 drivers/scsi/mpt3sas/mpt3sas_base.h #define ioc_info(ioc, fmt, ...) \ ioc 173 drivers/scsi/mpt3sas/mpt3sas_base.h pr_info("%s: " fmt, (ioc)->name, ##__VA_ARGS__) ioc 901 drivers/scsi/mpt3sas/mpt3sas_base.h struct MPT3SAS_ADAPTER *ioc; ioc 917 drivers/scsi/mpt3sas/mpt3sas_base.h typedef int (*MPT_BUILD_SG_SCMD)(struct MPT3SAS_ADAPTER *ioc, ioc 919 drivers/scsi/mpt3sas/mpt3sas_base.h typedef void (*MPT_BUILD_SG)(struct MPT3SAS_ADAPTER *ioc, void *psge, ioc 922 drivers/scsi/mpt3sas/mpt3sas_base.h typedef void (*MPT_BUILD_ZERO_LEN_SGE)(struct MPT3SAS_ADAPTER *ioc, ioc 926 drivers/scsi/mpt3sas/mpt3sas_base.h typedef void (*NVME_BUILD_PRP)(struct MPT3SAS_ADAPTER *ioc, u16 smid, ioc 932 drivers/scsi/mpt3sas/mpt3sas_base.h typedef void (*PUT_SMID_IO_FP_HIP) (struct MPT3SAS_ADAPTER *ioc, u16 smid, ioc 934 drivers/scsi/mpt3sas/mpt3sas_base.h typedef void (*PUT_SMID_DEFAULT) (struct MPT3SAS_ADAPTER *ioc, u16 smid); ioc 940 drivers/scsi/mpt3sas/mpt3sas_base.h typedef u8 (*GET_MSIX_INDEX) (struct MPT3SAS_ADAPTER *ioc, ioc 996 drivers/scsi/mpt3sas/mpt3sas_base.h typedef void (*MPT3SAS_FLUSH_RUNNING_CMDS)(struct MPT3SAS_ADAPTER *ioc); ioc 1462 drivers/scsi/mpt3sas/mpt3sas_base.h typedef u8 (*MPT_CALLBACK)(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index, ioc 1481 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_base_start_watchdog(struct MPT3SAS_ADAPTER *ioc); ioc 1482 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_base_stop_watchdog(struct MPT3SAS_ADAPTER *ioc); ioc 1484 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_base_attach(struct MPT3SAS_ADAPTER *ioc); ioc 1485 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_base_detach(struct MPT3SAS_ADAPTER *ioc); ioc 1486 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_base_map_resources(struct MPT3SAS_ADAPTER *ioc); ioc 1487 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_base_free_resources(struct MPT3SAS_ADAPTER *ioc); ioc 1488 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_free_enclosure_list(struct MPT3SAS_ADAPTER *ioc); ioc 1489 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_base_hard_reset_handler(struct MPT3SAS_ADAPTER *ioc, ioc 1492 drivers/scsi/mpt3sas/mpt3sas_base.h void *mpt3sas_base_get_msg_frame(struct MPT3SAS_ADAPTER *ioc, u16 smid); ioc 1493 drivers/scsi/mpt3sas/mpt3sas_base.h void *mpt3sas_base_get_sense_buffer(struct MPT3SAS_ADAPTER *ioc, u16 smid); ioc 1494 drivers/scsi/mpt3sas/mpt3sas_base.h __le32 mpt3sas_base_get_sense_buffer_dma(struct MPT3SAS_ADAPTER *ioc, ioc 1496 drivers/scsi/mpt3sas/mpt3sas_base.h void *mpt3sas_base_get_pcie_sgl(struct MPT3SAS_ADAPTER *ioc, u16 smid); ioc 1497 drivers/scsi/mpt3sas/mpt3sas_base.h dma_addr_t mpt3sas_base_get_pcie_sgl_dma(struct MPT3SAS_ADAPTER *ioc, u16 smid); ioc 1498 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_base_sync_reply_irqs(struct MPT3SAS_ADAPTER *ioc); ioc 1500 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_base_put_smid_fast_path(struct MPT3SAS_ADAPTER *ioc, u16 smid, ioc 1502 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_base_put_smid_hi_priority(struct MPT3SAS_ADAPTER *ioc, u16 smid, ioc 1504 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_base_put_smid_nvme_encap(struct MPT3SAS_ADAPTER *ioc, u16 smid); ioc 1505 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_base_put_smid_default(struct MPT3SAS_ADAPTER *ioc, u16 smid); ioc 1507 drivers/scsi/mpt3sas/mpt3sas_base.h u16 mpt3sas_base_get_smid_hpr(struct MPT3SAS_ADAPTER *ioc, u8 cb_idx); ioc 1508 drivers/scsi/mpt3sas/mpt3sas_base.h u16 mpt3sas_base_get_smid_scsiio(struct MPT3SAS_ADAPTER *ioc, u8 cb_idx, ioc 1510 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_base_clear_st(struct MPT3SAS_ADAPTER *ioc, ioc 1513 drivers/scsi/mpt3sas/mpt3sas_base.h u16 mpt3sas_base_get_smid(struct MPT3SAS_ADAPTER *ioc, u8 cb_idx); ioc 1514 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_base_free_smid(struct MPT3SAS_ADAPTER *ioc, u16 smid); ioc 1519 drivers/scsi/mpt3sas/mpt3sas_base.h u8 mpt3sas_base_done(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index, ioc 1521 drivers/scsi/mpt3sas/mpt3sas_base.h u8 mpt3sas_port_enable_done(struct MPT3SAS_ADAPTER *ioc, u16 smid, ioc 1523 drivers/scsi/mpt3sas/mpt3sas_base.h void *mpt3sas_base_get_reply_virt_addr(struct MPT3SAS_ADAPTER *ioc, ioc 1526 drivers/scsi/mpt3sas/mpt3sas_base.h u32 mpt3sas_base_get_iocstate(struct MPT3SAS_ADAPTER *ioc, int cooked); ioc 1528 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_base_fault_info(struct MPT3SAS_ADAPTER *ioc , u16 fault_code); ioc 1529 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_base_sas_iounit_control(struct MPT3SAS_ADAPTER *ioc, ioc 1532 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_base_scsi_enclosure_processor(struct MPT3SAS_ADAPTER *ioc, ioc 1535 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_base_validate_event_type(struct MPT3SAS_ADAPTER *ioc, ioc 1538 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_halt_firmware(struct MPT3SAS_ADAPTER *ioc); ioc 1540 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_base_update_missing_delay(struct MPT3SAS_ADAPTER *ioc, ioc 1543 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_port_enable(struct MPT3SAS_ADAPTER *ioc); ioc 1546 drivers/scsi/mpt3sas/mpt3sas_base.h mpt3sas_wait_for_commands_to_complete(struct MPT3SAS_ADAPTER *ioc); ioc 1548 drivers/scsi/mpt3sas/mpt3sas_base.h u8 mpt3sas_base_check_cmd_timeout(struct MPT3SAS_ADAPTER *ioc, ioc 1550 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_wait_for_ioc(struct MPT3SAS_ADAPTER *ioc, int wait_count); ioc 1553 drivers/scsi/mpt3sas/mpt3sas_base.h struct scsi_cmnd *mpt3sas_scsih_scsi_lookup_get(struct MPT3SAS_ADAPTER *ioc, ioc 1555 drivers/scsi/mpt3sas/mpt3sas_base.h u8 mpt3sas_scsih_event_callback(struct MPT3SAS_ADAPTER *ioc, u8 msix_index, ioc 1557 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_scsih_pre_reset_handler(struct MPT3SAS_ADAPTER *ioc); ioc 1558 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_scsih_after_reset_handler(struct MPT3SAS_ADAPTER *ioc); ioc 1559 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_scsih_reset_done_handler(struct MPT3SAS_ADAPTER *ioc); ioc 1561 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_scsih_issue_tm(struct MPT3SAS_ADAPTER *ioc, u16 handle, u64 lun, ioc 1563 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_scsih_issue_locked_tm(struct MPT3SAS_ADAPTER *ioc, u16 handle, ioc 1567 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_scsih_set_tm_flag(struct MPT3SAS_ADAPTER *ioc, u16 handle); ioc 1568 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_scsih_clear_tm_flag(struct MPT3SAS_ADAPTER *ioc, u16 handle); ioc 1569 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_expander_remove(struct MPT3SAS_ADAPTER *ioc, u64 sas_address); ioc 1570 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_device_remove_by_sas_address(struct MPT3SAS_ADAPTER *ioc, ioc 1572 drivers/scsi/mpt3sas/mpt3sas_base.h u8 mpt3sas_check_for_pending_internal_cmds(struct MPT3SAS_ADAPTER *ioc, ioc 1576 drivers/scsi/mpt3sas/mpt3sas_base.h struct MPT3SAS_ADAPTER *ioc, u16 handle); ioc 1578 drivers/scsi/mpt3sas/mpt3sas_base.h struct MPT3SAS_ADAPTER *ioc, u64 sas_address); ioc 1580 drivers/scsi/mpt3sas/mpt3sas_base.h struct MPT3SAS_ADAPTER *ioc, u64 sas_address); ioc 1582 drivers/scsi/mpt3sas/mpt3sas_base.h struct MPT3SAS_ADAPTER *ioc, u64 sas_address); ioc 1583 drivers/scsi/mpt3sas/mpt3sas_base.h struct _sas_device *mpt3sas_get_sdev_by_handle(struct MPT3SAS_ADAPTER *ioc, ioc 1585 drivers/scsi/mpt3sas/mpt3sas_base.h struct _pcie_device *mpt3sas_get_pdev_by_handle(struct MPT3SAS_ADAPTER *ioc, ioc 1588 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_port_enable_complete(struct MPT3SAS_ADAPTER *ioc); ioc 1590 drivers/scsi/mpt3sas/mpt3sas_base.h mpt3sas_raid_device_find_by_handle(struct MPT3SAS_ADAPTER *ioc, u16 handle); ioc 1594 drivers/scsi/mpt3sas/mpt3sas_base.h u8 mpt3sas_config_done(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index, ioc 1596 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_get_number_hba_phys(struct MPT3SAS_ADAPTER *ioc, ioc 1598 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_get_manufacturing_pg0(struct MPT3SAS_ADAPTER *ioc, ioc 1600 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_get_manufacturing_pg7(struct MPT3SAS_ADAPTER *ioc, ioc 1603 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_get_manufacturing_pg10(struct MPT3SAS_ADAPTER *ioc, ioc 1607 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_get_manufacturing_pg11(struct MPT3SAS_ADAPTER *ioc, ioc 1610 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_set_manufacturing_pg11(struct MPT3SAS_ADAPTER *ioc, ioc 1614 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_get_bios_pg2(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigReply_t ioc 1616 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_get_bios_pg3(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigReply_t ioc 1618 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_get_iounit_pg0(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigReply_t ioc 1620 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_get_sas_device_pg0(struct MPT3SAS_ADAPTER *ioc, ioc 1623 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_get_sas_device_pg1(struct MPT3SAS_ADAPTER *ioc, ioc 1626 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_get_pcie_device_pg0(struct MPT3SAS_ADAPTER *ioc, ioc 1629 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_get_pcie_device_pg2(struct MPT3SAS_ADAPTER *ioc, ioc 1632 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_get_sas_iounit_pg0(struct MPT3SAS_ADAPTER *ioc, ioc 1635 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_get_iounit_pg1(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigReply_t ioc 1637 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_get_iounit_pg3(struct MPT3SAS_ADAPTER *ioc, ioc 1639 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_set_iounit_pg1(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigReply_t ioc 1641 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_get_iounit_pg8(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigReply_t ioc 1643 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_get_sas_iounit_pg1(struct MPT3SAS_ADAPTER *ioc, ioc 1646 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_set_sas_iounit_pg1(struct MPT3SAS_ADAPTER *ioc, ioc 1649 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_get_ioc_pg1(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigReply_t ioc 1651 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_set_ioc_pg1(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigReply_t ioc 1653 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_get_ioc_pg8(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigReply_t ioc 1655 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_get_expander_pg0(struct MPT3SAS_ADAPTER *ioc, ioc 1658 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_get_expander_pg1(struct MPT3SAS_ADAPTER *ioc, ioc 1661 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_get_enclosure_pg0(struct MPT3SAS_ADAPTER *ioc, ioc 1664 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_get_phy_pg0(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigReply_t ioc 1666 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_get_phy_pg1(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigReply_t ioc 1668 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_get_raid_volume_pg1(struct MPT3SAS_ADAPTER *ioc, ioc 1671 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_get_number_pds(struct MPT3SAS_ADAPTER *ioc, u16 handle, ioc 1673 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_get_raid_volume_pg0(struct MPT3SAS_ADAPTER *ioc, ioc 1676 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_get_phys_disk_pg0(struct MPT3SAS_ADAPTER *ioc, ioc 1679 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_get_volume_handle(struct MPT3SAS_ADAPTER *ioc, u16 pd_handle, ioc 1681 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_config_get_volume_wwid(struct MPT3SAS_ADAPTER *ioc, ioc 1689 drivers/scsi/mpt3sas/mpt3sas_base.h u8 mpt3sas_ctl_done(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index, ioc 1691 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_ctl_pre_reset_handler(struct MPT3SAS_ADAPTER *ioc); ioc 1692 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_ctl_after_reset_handler(struct MPT3SAS_ADAPTER *ioc); ioc 1693 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_ctl_reset_done_handler(struct MPT3SAS_ADAPTER *ioc); ioc 1694 drivers/scsi/mpt3sas/mpt3sas_base.h u8 mpt3sas_ctl_event_callback(struct MPT3SAS_ADAPTER *ioc, ioc 1696 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_ctl_add_to_event_log(struct MPT3SAS_ADAPTER *ioc, ioc 1699 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_enable_diag_buffer(struct MPT3SAS_ADAPTER *ioc, ioc 1701 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_send_diag_release(struct MPT3SAS_ADAPTER *ioc, u8 buffer_type, ioc 1706 drivers/scsi/mpt3sas/mpt3sas_base.h u8 mpt3sas_transport_done(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index, ioc 1708 drivers/scsi/mpt3sas/mpt3sas_base.h struct _sas_port *mpt3sas_transport_port_add(struct MPT3SAS_ADAPTER *ioc, ioc 1710 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_transport_port_remove(struct MPT3SAS_ADAPTER *ioc, u64 sas_address, ioc 1712 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_transport_add_host_phy(struct MPT3SAS_ADAPTER *ioc, struct _sas_phy ioc 1714 drivers/scsi/mpt3sas/mpt3sas_base.h int mpt3sas_transport_add_expander_phy(struct MPT3SAS_ADAPTER *ioc, ioc 1717 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_transport_update_links(struct MPT3SAS_ADAPTER *ioc, ioc 1722 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_send_trigger_data_event(struct MPT3SAS_ADAPTER *ioc, ioc 1724 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_process_trigger_data(struct MPT3SAS_ADAPTER *ioc, ioc 1726 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_trigger_master(struct MPT3SAS_ADAPTER *ioc, ioc 1728 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_trigger_event(struct MPT3SAS_ADAPTER *ioc, u16 event, ioc 1730 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_trigger_scsi(struct MPT3SAS_ADAPTER *ioc, u8 sense_key, ioc 1732 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_trigger_mpi(struct MPT3SAS_ADAPTER *ioc, u16 ioc_status, ioc 1736 drivers/scsi/mpt3sas/mpt3sas_base.h u8 mpt3sas_get_num_volumes(struct MPT3SAS_ADAPTER *ioc); ioc 1737 drivers/scsi/mpt3sas/mpt3sas_base.h void mpt3sas_init_warpdrive_properties(struct MPT3SAS_ADAPTER *ioc, ioc 1740 drivers/scsi/mpt3sas/mpt3sas_base.h mpt3sas_setup_direct_io(struct MPT3SAS_ADAPTER *ioc, struct scsi_cmnd *scmd, ioc 98 drivers/scsi/mpt3sas/mpt3sas_config.c _config_display_some_debug(struct MPT3SAS_ADAPTER *ioc, u16 smid, ioc 104 drivers/scsi/mpt3sas/mpt3sas_config.c if (!(ioc->logging_level & MPT_DEBUG_CONFIG)) ioc 107 drivers/scsi/mpt3sas/mpt3sas_config.c mpi_request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 178 drivers/scsi/mpt3sas/mpt3sas_config.c ioc_info(ioc, "%s: %s(%d), action(%d), form(0x%08x), smid(%d)\n", ioc 187 drivers/scsi/mpt3sas/mpt3sas_config.c ioc_info(ioc, "\tiocstatus(0x%04x), loginfo(0x%08x)\n", ioc 202 drivers/scsi/mpt3sas/mpt3sas_config.c _config_alloc_config_dma_memory(struct MPT3SAS_ADAPTER *ioc, ioc 207 drivers/scsi/mpt3sas/mpt3sas_config.c if (mem->sz > ioc->config_page_sz) { ioc 208 drivers/scsi/mpt3sas/mpt3sas_config.c mem->page = dma_alloc_coherent(&ioc->pdev->dev, mem->sz, ioc 211 drivers/scsi/mpt3sas/mpt3sas_config.c ioc_err(ioc, "%s: dma_alloc_coherent failed asking for (%d) bytes!!\n", ioc 216 drivers/scsi/mpt3sas/mpt3sas_config.c mem->page = ioc->config_page; ioc 217 drivers/scsi/mpt3sas/mpt3sas_config.c mem->page_dma = ioc->config_page_dma; ioc 219 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->config_vaddr = mem->page; ioc 233 drivers/scsi/mpt3sas/mpt3sas_config.c _config_free_config_dma_memory(struct MPT3SAS_ADAPTER *ioc, ioc 236 drivers/scsi/mpt3sas/mpt3sas_config.c if (mem->sz > ioc->config_page_sz) ioc 237 drivers/scsi/mpt3sas/mpt3sas_config.c dma_free_coherent(&ioc->pdev->dev, mem->sz, mem->page, ioc 255 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_done(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index, ioc 260 drivers/scsi/mpt3sas/mpt3sas_config.c if (ioc->config_cmds.status == MPT3_CMD_NOT_USED) ioc 262 drivers/scsi/mpt3sas/mpt3sas_config.c if (ioc->config_cmds.smid != smid) ioc 264 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->config_cmds.status |= MPT3_CMD_COMPLETE; ioc 265 drivers/scsi/mpt3sas/mpt3sas_config.c mpi_reply = mpt3sas_base_get_reply_virt_addr(ioc, reply); ioc 267 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->config_cmds.status |= MPT3_CMD_REPLY_VALID; ioc 268 drivers/scsi/mpt3sas/mpt3sas_config.c memcpy(ioc->config_cmds.reply, mpi_reply, ioc 271 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->config_cmds.status &= ~MPT3_CMD_PENDING; ioc 272 drivers/scsi/mpt3sas/mpt3sas_config.c _config_display_some_debug(ioc, smid, "config_done", mpi_reply); ioc 273 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->config_cmds.smid = USHRT_MAX; ioc 274 drivers/scsi/mpt3sas/mpt3sas_config.c complete(&ioc->config_cmds.done); ioc 298 drivers/scsi/mpt3sas/mpt3sas_config.c _config_request(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigRequest_t ioc 309 drivers/scsi/mpt3sas/mpt3sas_config.c mutex_lock(&ioc->config_cmds.mutex); ioc 310 drivers/scsi/mpt3sas/mpt3sas_config.c if (ioc->config_cmds.status != MPT3_CMD_NOT_USED) { ioc 311 drivers/scsi/mpt3sas/mpt3sas_config.c ioc_err(ioc, "%s: config_cmd in use\n", __func__); ioc 312 drivers/scsi/mpt3sas/mpt3sas_config.c mutex_unlock(&ioc->config_cmds.mutex); ioc 333 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_alloc_config_dma_memory(ioc, &mem); ioc 340 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->base_add_sg_single(&mpi_request->PageBufferSGE, ioc 347 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->base_add_sg_single(&mpi_request->PageBufferSGE, ioc 359 drivers/scsi/mpt3sas/mpt3sas_config.c ioc_info(ioc, "%s: attempting retry (%d)\n", ioc 363 drivers/scsi/mpt3sas/mpt3sas_config.c r = mpt3sas_wait_for_ioc(ioc, MPT3_CONFIG_PAGE_DEFAULT_TIMEOUT); ioc 367 drivers/scsi/mpt3sas/mpt3sas_config.c smid = mpt3sas_base_get_smid(ioc, ioc->config_cb_idx); ioc 369 drivers/scsi/mpt3sas/mpt3sas_config.c ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); ioc 370 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->config_cmds.status = MPT3_CMD_NOT_USED; ioc 377 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->config_cmds.status = MPT3_CMD_PENDING; ioc 378 drivers/scsi/mpt3sas/mpt3sas_config.c config_request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 379 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->config_cmds.smid = smid; ioc 381 drivers/scsi/mpt3sas/mpt3sas_config.c _config_display_some_debug(ioc, smid, "config_request", NULL); ioc 382 drivers/scsi/mpt3sas/mpt3sas_config.c init_completion(&ioc->config_cmds.done); ioc 383 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->put_smid_default(ioc, smid); ioc 384 drivers/scsi/mpt3sas/mpt3sas_config.c wait_for_completion_timeout(&ioc->config_cmds.done, timeout*HZ); ioc 385 drivers/scsi/mpt3sas/mpt3sas_config.c if (!(ioc->config_cmds.status & MPT3_CMD_COMPLETE)) { ioc 386 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_base_check_cmd_timeout(ioc, ioc 387 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->config_cmds.status, mpi_request, ioc 390 drivers/scsi/mpt3sas/mpt3sas_config.c if (ioc->config_cmds.smid == smid) ioc 391 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_base_free_smid(ioc, smid); ioc 392 drivers/scsi/mpt3sas/mpt3sas_config.c if ((ioc->shost_recovery) || (ioc->config_cmds.status & ioc 393 drivers/scsi/mpt3sas/mpt3sas_config.c MPT3_CMD_RESET) || ioc->pci_error_recovery) ioc 400 drivers/scsi/mpt3sas/mpt3sas_config.c if (ioc->config_cmds.status & MPT3_CMD_REPLY_VALID) { ioc 401 drivers/scsi/mpt3sas/mpt3sas_config.c memcpy(mpi_reply, ioc->config_cmds.reply, ioc 407 drivers/scsi/mpt3sas/mpt3sas_config.c _debug_dump_mf(mpi_request, ioc->request_sz/4); ioc 408 drivers/scsi/mpt3sas/mpt3sas_config.c _debug_dump_reply(mpi_reply, ioc->request_sz/4); ioc 410 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->name, __func__, ioc 418 drivers/scsi/mpt3sas/mpt3sas_config.c _debug_dump_mf(mpi_request, ioc->request_sz/4); ioc 419 drivers/scsi/mpt3sas/mpt3sas_config.c _debug_dump_reply(mpi_reply, ioc->request_sz/4); ioc 421 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->name, __func__, ioc 430 drivers/scsi/mpt3sas/mpt3sas_config.c ioc_info(ioc, "%s: retry (%d) completed!!\n", ioc 442 drivers/scsi/mpt3sas/mpt3sas_config.c _debug_dump_mf(mpi_request, ioc->request_sz/4); ioc 443 drivers/scsi/mpt3sas/mpt3sas_config.c _debug_dump_reply(mpi_reply, ioc->request_sz/4); ioc 447 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->name, __func__, ioc 455 drivers/scsi/mpt3sas/mpt3sas_config.c _debug_dump_mf(mpi_request, ioc->request_sz/4); ioc 456 drivers/scsi/mpt3sas/mpt3sas_config.c _debug_dump_reply(mpi_reply, ioc->request_sz/4); ioc 460 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->name, __func__, ioc 470 drivers/scsi/mpt3sas/mpt3sas_config.c _config_free_config_dma_memory(ioc, &mem); ioc 472 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->config_cmds.status = MPT3_CMD_NOT_USED; ioc 473 drivers/scsi/mpt3sas/mpt3sas_config.c mutex_unlock(&ioc->config_cmds.mutex); ioc 476 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER); ioc 490 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_get_manufacturing_pg0(struct MPT3SAS_ADAPTER *ioc, ioc 502 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 503 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 509 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 527 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_get_manufacturing_pg7(struct MPT3SAS_ADAPTER *ioc, ioc 540 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 541 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 547 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 564 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_get_manufacturing_pg10(struct MPT3SAS_ADAPTER *ioc, ioc 577 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 578 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 584 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 601 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_get_manufacturing_pg11(struct MPT3SAS_ADAPTER *ioc, ioc 614 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 615 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 621 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 638 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_set_manufacturing_pg11(struct MPT3SAS_ADAPTER *ioc, ioc 651 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 652 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 658 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 675 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_get_bios_pg2(struct MPT3SAS_ADAPTER *ioc, ioc 687 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 688 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 694 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 711 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_get_bios_pg3(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigReply_t ioc 723 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 724 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 730 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 747 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_get_iounit_pg0(struct MPT3SAS_ADAPTER *ioc, ioc 759 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 760 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 766 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 783 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_get_iounit_pg1(struct MPT3SAS_ADAPTER *ioc, ioc 795 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 796 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 802 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 819 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_set_iounit_pg1(struct MPT3SAS_ADAPTER *ioc, ioc 831 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 832 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 838 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 856 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_get_iounit_pg3(struct MPT3SAS_ADAPTER *ioc, ioc 868 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 869 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 875 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 891 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_get_iounit_pg8(struct MPT3SAS_ADAPTER *ioc, ioc 903 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 904 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 910 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 927 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_get_ioc_pg8(struct MPT3SAS_ADAPTER *ioc, ioc 939 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 940 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 946 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 962 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_get_ioc_pg1(struct MPT3SAS_ADAPTER *ioc, ioc 974 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 975 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 981 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 998 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_set_ioc_pg1(struct MPT3SAS_ADAPTER *ioc, ioc 1010 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 1011 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1017 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1036 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_get_sas_device_pg0(struct MPT3SAS_ADAPTER *ioc, ioc 1050 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 1051 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1058 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1077 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_get_sas_device_pg1(struct MPT3SAS_ADAPTER *ioc, ioc 1091 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 1092 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1099 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1118 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_get_pcie_device_pg0(struct MPT3SAS_ADAPTER *ioc, ioc 1132 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 1133 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1140 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1159 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_get_pcie_device_pg2(struct MPT3SAS_ADAPTER *ioc, ioc 1173 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 1174 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1181 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1197 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_get_number_hba_phys(struct MPT3SAS_ADAPTER *ioc, u8 *num_phys) ioc 1213 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 1214 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, &mpi_reply, ioc 1220 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, &mpi_reply, ioc 1247 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_get_sas_iounit_pg0(struct MPT3SAS_ADAPTER *ioc, ioc 1261 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 1262 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1268 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1288 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_get_sas_iounit_pg1(struct MPT3SAS_ADAPTER *ioc, ioc 1302 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 1303 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1309 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1329 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_set_sas_iounit_pg1(struct MPT3SAS_ADAPTER *ioc, ioc 1343 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 1344 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1350 drivers/scsi/mpt3sas/mpt3sas_config.c _config_request(ioc, &mpi_request, mpi_reply, ioc 1353 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1371 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_get_expander_pg0(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigReply_t ioc 1384 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 1385 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1392 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1411 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_get_expander_pg1(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigReply_t ioc 1425 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 1426 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1435 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1454 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_get_enclosure_pg0(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigReply_t ioc 1467 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 1468 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1475 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1493 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_get_phy_pg0(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigReply_t ioc 1506 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 1507 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1515 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1533 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_get_phy_pg1(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigReply_t ioc 1546 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 1547 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1555 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1574 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_get_raid_volume_pg1(struct MPT3SAS_ADAPTER *ioc, ioc 1587 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 1588 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1595 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1612 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_get_number_pds(struct MPT3SAS_ADAPTER *ioc, u16 handle, ioc 1628 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 1629 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, &mpi_reply, ioc 1637 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, &mpi_reply, ioc 1664 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_get_raid_volume_pg0(struct MPT3SAS_ADAPTER *ioc, ioc 1677 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 1678 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1685 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1703 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_get_phys_disk_pg0(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigReply_t ioc 1716 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 1717 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1724 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, mpi_reply, ioc 1742 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_get_volume_handle(struct MPT3SAS_ADAPTER *ioc, u16 pd_handle, ioc 1762 drivers/scsi/mpt3sas/mpt3sas_config.c ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); ioc 1763 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, &mpi_reply, ioc 1780 drivers/scsi/mpt3sas/mpt3sas_config.c r = _config_request(ioc, &mpi_request, &mpi_reply, ioc 1832 drivers/scsi/mpt3sas/mpt3sas_config.c mpt3sas_config_get_volume_wwid(struct MPT3SAS_ADAPTER *ioc, u16 volume_handle, ioc 1839 drivers/scsi/mpt3sas/mpt3sas_config.c if (!(mpt3sas_config_get_raid_volume_pg1(ioc, &mpi_reply, ioc 93 drivers/scsi/mpt3sas/mpt3sas_ctl.c _ctl_display_some_debug(struct MPT3SAS_ADAPTER *ioc, u16 smid, ioc 99 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (!(ioc->logging_level & MPT_DEBUG_IOCTL)) ioc 102 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpi_request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 109 drivers/scsi/mpt3sas/mpt3sas_ctl.c snprintf(ioc->tmp_string, MPT_STRING_LENGTH, ioc 113 drivers/scsi/mpt3sas/mpt3sas_ctl.c desc = ioc->tmp_string; ioc 130 drivers/scsi/mpt3sas/mpt3sas_ctl.c snprintf(ioc->tmp_string, MPT_STRING_LENGTH, ioc 135 drivers/scsi/mpt3sas/mpt3sas_ctl.c desc = ioc->tmp_string; ioc 161 drivers/scsi/mpt3sas/mpt3sas_ctl.c snprintf(ioc->tmp_string, MPT_STRING_LENGTH, ioc 165 drivers/scsi/mpt3sas/mpt3sas_ctl.c desc = ioc->tmp_string; ioc 188 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, "%s: %s, smid(%d)\n", calling_function_name, desc, smid); ioc 194 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, "\tiocstatus(0x%04x), loginfo(0x%08x)\n", ioc 206 drivers/scsi/mpt3sas/mpt3sas_ctl.c sas_device = mpt3sas_get_sdev_by_handle(ioc, ioc 209 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_warn(ioc, "\tsas_address(0x%016llx), phy(%d)\n", ioc 212 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_warn(ioc, "\tenclosure_logical_id(0x%016llx), slot(%d)\n", ioc 218 drivers/scsi/mpt3sas/mpt3sas_ctl.c pcie_device = mpt3sas_get_pdev_by_handle(ioc, ioc 221 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_warn(ioc, "\tWWID(0x%016llx), port(%d)\n", ioc 225 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_warn(ioc, "\tenclosure_logical_id(0x%016llx), slot(%d)\n", ioc 232 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, "\tscsi_state(0x%02x), scsi_status(0x%02x)\n", ioc 252 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_ctl_done(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index, ioc 261 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (ioc->ctl_cmds.status == MPT3_CMD_NOT_USED) ioc 263 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (ioc->ctl_cmds.smid != smid) ioc 265 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->ctl_cmds.status |= MPT3_CMD_COMPLETE; ioc 266 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpi_reply = mpt3sas_base_get_reply_virt_addr(ioc, reply); ioc 268 drivers/scsi/mpt3sas/mpt3sas_ctl.c memcpy(ioc->ctl_cmds.reply, mpi_reply, mpi_reply->MsgLength*4); ioc 269 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->ctl_cmds.status |= MPT3_CMD_REPLY_VALID; ioc 279 drivers/scsi/mpt3sas/mpt3sas_ctl.c sense_data = mpt3sas_base_get_sense_buffer(ioc, ioc 281 drivers/scsi/mpt3sas/mpt3sas_ctl.c memcpy(ioc->ctl_cmds.sense, sense_data, sz); ioc 293 drivers/scsi/mpt3sas/mpt3sas_ctl.c sense_data = mpt3sas_base_get_sense_buffer(ioc, smid); ioc 294 drivers/scsi/mpt3sas/mpt3sas_ctl.c memcpy(ioc->ctl_cmds.sense, sense_data, sz); ioc 298 drivers/scsi/mpt3sas/mpt3sas_ctl.c _ctl_display_some_debug(ioc, smid, "ctl_done", mpi_reply); ioc 299 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->ctl_cmds.status &= ~MPT3_CMD_PENDING; ioc 300 drivers/scsi/mpt3sas/mpt3sas_ctl.c complete(&ioc->ctl_cmds.done); ioc 315 drivers/scsi/mpt3sas/mpt3sas_ctl.c _ctl_check_event_type(struct MPT3SAS_ADAPTER *ioc, u16 event) ioc 320 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (event >= 128 || !event || !ioc->event_log) ioc 327 drivers/scsi/mpt3sas/mpt3sas_ctl.c return desired_event & ioc->event_type[i]; ioc 336 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_ctl_add_to_event_log(struct MPT3SAS_ADAPTER *ioc, ioc 345 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (!ioc->event_log) ioc 350 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (_ctl_check_event_type(ioc, event)) { ioc 353 drivers/scsi/mpt3sas/mpt3sas_ctl.c i = ioc->event_context % MPT3SAS_CTL_EVENT_LOG_SIZE; ioc 354 drivers/scsi/mpt3sas/mpt3sas_ctl.c event_log = ioc->event_log; ioc 356 drivers/scsi/mpt3sas/mpt3sas_ctl.c event_log[i].context = ioc->event_context++; ioc 370 drivers/scsi/mpt3sas/mpt3sas_ctl.c (send_aen && !ioc->aen_event_read_flag)) { ioc 371 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->aen_event_read_flag = 1; ioc 392 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_ctl_event_callback(struct MPT3SAS_ADAPTER *ioc, u8 msix_index, ioc 397 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpi_reply = mpt3sas_base_get_reply_virt_addr(ioc, reply); ioc 399 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_ctl_add_to_event_log(ioc, mpi_reply); ioc 416 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc; ioc 420 drivers/scsi/mpt3sas/mpt3sas_ctl.c list_for_each_entry(ioc, &mpt3sas_ioc_list, list) { ioc 421 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (ioc->id != ioc_number) ioc 426 drivers/scsi/mpt3sas/mpt3sas_ctl.c version = ioc->hba_mpi_version_belonged; ioc 442 drivers/scsi/mpt3sas/mpt3sas_ctl.c *iocpp = ioc; ioc 456 drivers/scsi/mpt3sas/mpt3sas_ctl.c void mpt3sas_ctl_pre_reset_handler(struct MPT3SAS_ADAPTER *ioc) ioc 461 drivers/scsi/mpt3sas/mpt3sas_ctl.c dtmprintk(ioc, ioc_info(ioc, "%s: MPT3_IOC_PRE_RESET\n", __func__)); ioc 463 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (!(ioc->diag_buffer_status[i] & ioc 466 drivers/scsi/mpt3sas/mpt3sas_ctl.c if ((ioc->diag_buffer_status[i] & ioc 469 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_send_diag_release(ioc, i, &issue_reset); ioc 479 drivers/scsi/mpt3sas/mpt3sas_ctl.c void mpt3sas_ctl_after_reset_handler(struct MPT3SAS_ADAPTER *ioc) ioc 481 drivers/scsi/mpt3sas/mpt3sas_ctl.c dtmprintk(ioc, ioc_info(ioc, "%s: MPT3_IOC_AFTER_RESET\n", __func__)); ioc 482 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (ioc->ctl_cmds.status & MPT3_CMD_PENDING) { ioc 483 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->ctl_cmds.status |= MPT3_CMD_RESET; ioc 484 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_base_free_smid(ioc, ioc->ctl_cmds.smid); ioc 485 drivers/scsi/mpt3sas/mpt3sas_ctl.c complete(&ioc->ctl_cmds.done); ioc 495 drivers/scsi/mpt3sas/mpt3sas_ctl.c void mpt3sas_ctl_reset_done_handler(struct MPT3SAS_ADAPTER *ioc) ioc 499 drivers/scsi/mpt3sas/mpt3sas_ctl.c dtmprintk(ioc, ioc_info(ioc, "%s: MPT3_IOC_DONE_RESET\n", __func__)); ioc 502 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (!(ioc->diag_buffer_status[i] & ioc 505 drivers/scsi/mpt3sas/mpt3sas_ctl.c if ((ioc->diag_buffer_status[i] & ioc 508 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->diag_buffer_status[i] |= ioc 536 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc; ioc 542 drivers/scsi/mpt3sas/mpt3sas_ctl.c list_for_each_entry(ioc, &mpt3sas_ioc_list, list) { ioc 543 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (ioc->aen_event_read_flag) { ioc 562 drivers/scsi/mpt3sas/mpt3sas_ctl.c _ctl_set_task_mid(struct MPT3SAS_ADAPTER *ioc, struct mpt3_ioctl_command *karg, ioc 585 drivers/scsi/mpt3sas/mpt3sas_ctl.c for (smid = ioc->scsiio_depth; smid && !found; smid--) { ioc 588 drivers/scsi/mpt3sas/mpt3sas_ctl.c scmd = mpt3sas_scsih_scsi_lookup_get(ioc, smid); ioc 612 drivers/scsi/mpt3sas/mpt3sas_ctl.c dctlprintk(ioc, ioc 613 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, "%s: handle(0x%04x), lun(%d), no active mid!!\n", ioc 616 drivers/scsi/mpt3sas/mpt3sas_ctl.c tm_reply = ioc->ctl_cmds.reply; ioc 623 drivers/scsi/mpt3sas/mpt3sas_ctl.c sz = min_t(u32, karg->max_reply_bytes, ioc->reply_sz); ioc 624 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (copy_to_user(karg->reply_frame_buf_ptr, ioc->ctl_cmds.reply, ioc 631 drivers/scsi/mpt3sas/mpt3sas_ctl.c dctlprintk(ioc, ioc 632 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, "%s: handle(0x%04x), lun(%d), task_mid(%d)\n", ioc 645 drivers/scsi/mpt3sas/mpt3sas_ctl.c _ctl_do_mpt_command(struct MPT3SAS_ADAPTER *ioc, struct mpt3_ioctl_command karg, ioc 668 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (ioc->ctl_cmds.status != MPT3_CMD_NOT_USED) { ioc 669 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: ctl_cmd in use\n", __func__); ioc 674 drivers/scsi/mpt3sas/mpt3sas_ctl.c ret = mpt3sas_wait_for_ioc(ioc, IOC_OPERATIONAL_WAIT_COUNT); ioc 678 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpi_request = kzalloc(ioc->request_sz, GFP_KERNEL); ioc 680 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: failed obtaining a memory for mpi_request\n", ioc 687 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (karg.data_sge_offset * 4 > ioc->request_sz || ioc 702 drivers/scsi/mpt3sas/mpt3sas_ctl.c smid = mpt3sas_base_get_smid_hpr(ioc, ioc->ctl_cb_idx); ioc 704 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); ioc 710 drivers/scsi/mpt3sas/mpt3sas_ctl.c smid = ioc->scsiio_depth - INTERNAL_SCSIIO_CMDS_COUNT + 1; ioc 714 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->ctl_cmds.status = MPT3_CMD_PENDING; ioc 715 drivers/scsi/mpt3sas/mpt3sas_ctl.c memset(ioc->ctl_cmds.reply, 0, ioc->reply_sz); ioc 716 drivers/scsi/mpt3sas/mpt3sas_ctl.c request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 717 drivers/scsi/mpt3sas/mpt3sas_ctl.c memset(request, 0, ioc->request_sz); ioc 719 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->ctl_cmds.smid = smid; ioc 731 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->facts.MaxDevHandle)) { ioc 733 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_base_free_smid(ioc, smid); ioc 740 drivers/scsi/mpt3sas/mpt3sas_ctl.c data_out = dma_alloc_coherent(&ioc->pdev->dev, data_out_sz, ioc 746 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_base_free_smid(ioc, smid); ioc 754 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_base_free_smid(ioc, smid); ioc 760 drivers/scsi/mpt3sas/mpt3sas_ctl.c data_in = dma_alloc_coherent(&ioc->pdev->dev, data_in_sz, ioc 766 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_base_free_smid(ioc, smid); ioc 774 drivers/scsi/mpt3sas/mpt3sas_ctl.c _ctl_display_some_debug(ioc, smid, "ctl_request", NULL); ioc 776 drivers/scsi/mpt3sas/mpt3sas_ctl.c init_completion(&ioc->ctl_cmds.done); ioc 781 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (!ioc->pcie_sg_lookup) { ioc 782 drivers/scsi/mpt3sas/mpt3sas_ctl.c dtmprintk(ioc, ioc_info(ioc, ioc 786 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (ioc->logging_level & MPT_DEBUG_TM) ioc 788 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->request_sz/4); ioc 789 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_base_free_smid(ioc, smid); ioc 803 drivers/scsi/mpt3sas/mpt3sas_ctl.c cpu_to_le64(ioc->sense_dma & 0xFFFFFFFF00000000UL); ioc 806 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_base_get_sense_buffer_dma(ioc, smid))); ioc 809 drivers/scsi/mpt3sas/mpt3sas_ctl.c memset(ioc->ctl_cmds.sense, 0, NVME_ERROR_RESPONSE_SIZE); ioc 810 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->build_nvme_prp(ioc, smid, nvme_encap_request, ioc 812 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (test_bit(device_handle, ioc->device_remove_in_progress)) { ioc 813 drivers/scsi/mpt3sas/mpt3sas_ctl.c dtmprintk(ioc, ioc 814 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, "handle(0x%04x): ioctl failed due to device removal in progress\n", ioc 816 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_base_free_smid(ioc, smid); ioc 820 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_base_put_smid_nvme_encap(ioc, smid); ioc 830 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_base_get_sense_buffer_dma(ioc, smid); ioc 831 drivers/scsi/mpt3sas/mpt3sas_ctl.c memset(ioc->ctl_cmds.sense, 0, SCSI_SENSE_BUFFERSIZE); ioc 832 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (test_bit(device_handle, ioc->device_remove_in_progress)) { ioc 833 drivers/scsi/mpt3sas/mpt3sas_ctl.c dtmprintk(ioc, ioc 834 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, "handle(0x%04x) :ioctl failed due to device removal in progress\n", ioc 836 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_base_free_smid(ioc, smid); ioc 840 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->build_sg(ioc, psge, data_out_dma, data_out_sz, ioc 843 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->put_smid_scsi_io(ioc, smid, device_handle); ioc 845 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->put_smid_default(ioc, smid); ioc 853 drivers/scsi/mpt3sas/mpt3sas_ctl.c dtmprintk(ioc, ioc 854 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, "TASK_MGMT: handle(0x%04x), task_type(0x%02x)\n", ioc 857 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->got_task_abort_from_ioctl = 1; ioc 862 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (_ctl_set_task_mid(ioc, &karg, tm_request)) { ioc 863 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_base_free_smid(ioc, smid); ioc 864 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->got_task_abort_from_ioctl = 0; ioc 868 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->got_task_abort_from_ioctl = 0; ioc 870 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (test_bit(device_handle, ioc->device_remove_in_progress)) { ioc 871 drivers/scsi/mpt3sas/mpt3sas_ctl.c dtmprintk(ioc, ioc 872 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, "handle(0x%04x) :ioctl failed due to device removal in progress\n", ioc 874 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_base_free_smid(ioc, smid); ioc 878 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_scsih_set_tm_flag(ioc, le16_to_cpu( ioc 880 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->build_sg_mpi(ioc, psge, data_out_dma, data_out_sz, ioc 882 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->put_smid_hi_priority(ioc, smid, 0); ioc 900 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_base_free_smid(ioc, smid); ioc 908 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->ioc_link_reset_in_progress = 1; ioc 909 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->ignore_loginfos = 1; ioc 911 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->build_sg(ioc, psge, data_out_dma, data_out_sz, data_in_dma, ioc 913 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->put_smid_default(ioc, smid); ioc 918 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (test_bit(device_handle, ioc->device_remove_in_progress)) { ioc 919 drivers/scsi/mpt3sas/mpt3sas_ctl.c dtmprintk(ioc, ioc 920 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, "handle(0x%04x) :ioctl failed due to device removal in progress\n", ioc 922 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_base_free_smid(ioc, smid); ioc 926 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->build_sg(ioc, psge, data_out_dma, data_out_sz, data_in_dma, ioc 928 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->put_smid_default(ioc, smid); ioc 934 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->build_sg(ioc, psge, data_out_dma, data_out_sz, data_in_dma, ioc 936 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->put_smid_default(ioc, smid); ioc 947 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->build_sg(ioc, psge, data_out_dma, data_out_sz, ioc 955 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->build_sg_mpi(ioc, psge, data_out_dma, ioc 960 drivers/scsi/mpt3sas/mpt3sas_ctl.c src = (void *)dst + ioc->sge_size; ioc 962 drivers/scsi/mpt3sas/mpt3sas_ctl.c memcpy(&tmp, src, ioc->sge_size); ioc 963 drivers/scsi/mpt3sas/mpt3sas_ctl.c memcpy(src, dst, ioc->sge_size); ioc 964 drivers/scsi/mpt3sas/mpt3sas_ctl.c memcpy(dst, &tmp, ioc->sge_size); ioc 966 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (ioc->logging_level & MPT_DEBUG_TM) { ioc 967 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, ioc 970 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->request_sz/4); ioc 973 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->build_sg_mpi(ioc, psge, data_out_dma, data_out_sz, ioc 975 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->put_smid_default(ioc, smid); ioc 986 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->ioc_link_reset_in_progress = 1; ioc 987 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->ignore_loginfos = 1; ioc 993 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->build_sg_mpi(ioc, psge, data_out_dma, data_out_sz, ioc 995 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->put_smid_default(ioc, smid); ioc 1003 drivers/scsi/mpt3sas/mpt3sas_ctl.c wait_for_completion_timeout(&ioc->ctl_cmds.done, timeout*HZ); ioc 1007 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_scsih_clear_tm_flag(ioc, le16_to_cpu( ioc 1009 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_trigger_master(ioc, MASTER_TRIGGER_TASK_MANAGMENT); ioc 1012 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->ioc_link_reset_in_progress) { ioc 1013 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->ioc_link_reset_in_progress = 0; ioc 1014 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->ignore_loginfos = 0; ioc 1016 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (!(ioc->ctl_cmds.status & MPT3_CMD_COMPLETE)) { ioc 1018 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_base_check_cmd_timeout(ioc, ioc 1019 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->ctl_cmds.status, mpi_request, ioc 1024 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpi_reply = ioc->ctl_cmds.reply; ioc 1027 drivers/scsi/mpt3sas/mpt3sas_ctl.c (ioc->logging_level & MPT_DEBUG_TM)) { ioc 1031 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, "TASK_MGMT: IOCStatus(0x%04x), IOCLogInfo(0x%08x), TerminationCount(0x%08x)\n", ioc 1050 drivers/scsi/mpt3sas/mpt3sas_ctl.c sz = min_t(u32, karg.max_reply_bytes, ioc->reply_sz); ioc 1051 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (copy_to_user(karg.reply_frame_buf_ptr, ioc->ctl_cmds.reply, ioc 1066 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, "Response buffer provided by application is NULL; Response data will not be returned\n"); ioc 1073 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (copy_to_user(karg.sense_data_ptr, ioc->ctl_cmds.sense, ioc 1089 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, "issue target reset: handle = (0x%04x)\n", ioc 1091 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_halt_firmware(ioc); ioc 1092 drivers/scsi/mpt3sas/mpt3sas_ctl.c pcie_device = mpt3sas_get_pdev_by_handle(ioc, ioc 1094 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (pcie_device && (!ioc->tm_custom_handling) && ioc 1097 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_scsih_issue_locked_tm(ioc, ioc 1103 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_scsih_issue_locked_tm(ioc, ioc 1108 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER); ioc 1117 drivers/scsi/mpt3sas/mpt3sas_ctl.c dma_free_coherent(&ioc->pdev->dev, data_in_sz, data_in, ioc 1121 drivers/scsi/mpt3sas/mpt3sas_ctl.c dma_free_coherent(&ioc->pdev->dev, data_out_sz, data_out, ioc 1125 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->ctl_cmds.status = MPT3_CMD_NOT_USED; ioc 1135 drivers/scsi/mpt3sas/mpt3sas_ctl.c _ctl_getiocinfo(struct MPT3SAS_ADAPTER *ioc, void __user *arg) ioc 1139 drivers/scsi/mpt3sas/mpt3sas_ctl.c dctlprintk(ioc, ioc_info(ioc, "%s: enter\n", ioc 1143 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (ioc->pfacts) ioc 1144 drivers/scsi/mpt3sas/mpt3sas_ctl.c karg.port_number = ioc->pfacts[0].PortNumber; ioc 1145 drivers/scsi/mpt3sas/mpt3sas_ctl.c karg.hw_rev = ioc->pdev->revision; ioc 1146 drivers/scsi/mpt3sas/mpt3sas_ctl.c karg.pci_id = ioc->pdev->device; ioc 1147 drivers/scsi/mpt3sas/mpt3sas_ctl.c karg.subsystem_device = ioc->pdev->subsystem_device; ioc 1148 drivers/scsi/mpt3sas/mpt3sas_ctl.c karg.subsystem_vendor = ioc->pdev->subsystem_vendor; ioc 1149 drivers/scsi/mpt3sas/mpt3sas_ctl.c karg.pci_information.u.bits.bus = ioc->pdev->bus->number; ioc 1150 drivers/scsi/mpt3sas/mpt3sas_ctl.c karg.pci_information.u.bits.device = PCI_SLOT(ioc->pdev->devfn); ioc 1151 drivers/scsi/mpt3sas/mpt3sas_ctl.c karg.pci_information.u.bits.function = PCI_FUNC(ioc->pdev->devfn); ioc 1152 drivers/scsi/mpt3sas/mpt3sas_ctl.c karg.pci_information.segment_id = pci_domain_nr(ioc->pdev->bus); ioc 1153 drivers/scsi/mpt3sas/mpt3sas_ctl.c karg.firmware_version = ioc->facts.FWVersion.Word; ioc 1154 drivers/scsi/mpt3sas/mpt3sas_ctl.c strcpy(karg.driver_version, ioc->driver_name); ioc 1156 drivers/scsi/mpt3sas/mpt3sas_ctl.c switch (ioc->hba_mpi_version_belonged) { ioc 1158 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (ioc->is_warpdrive) ioc 1166 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (ioc->is_gen35_ioc) ioc 1173 drivers/scsi/mpt3sas/mpt3sas_ctl.c karg.bios_version = le32_to_cpu(ioc->bios_pg3.BiosVersion); ioc 1189 drivers/scsi/mpt3sas/mpt3sas_ctl.c _ctl_eventquery(struct MPT3SAS_ADAPTER *ioc, void __user *arg) ioc 1199 drivers/scsi/mpt3sas/mpt3sas_ctl.c dctlprintk(ioc, ioc_info(ioc, "%s: enter\n", ioc 1203 drivers/scsi/mpt3sas/mpt3sas_ctl.c memcpy(karg.event_types, ioc->event_type, ioc 1220 drivers/scsi/mpt3sas/mpt3sas_ctl.c _ctl_eventenable(struct MPT3SAS_ADAPTER *ioc, void __user *arg) ioc 1230 drivers/scsi/mpt3sas/mpt3sas_ctl.c dctlprintk(ioc, ioc_info(ioc, "%s: enter\n", ioc 1233 drivers/scsi/mpt3sas/mpt3sas_ctl.c memcpy(ioc->event_type, karg.event_types, ioc 1235 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_base_validate_event_type(ioc, ioc->event_type); ioc 1237 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (ioc->event_log) ioc 1240 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->event_context = 0; ioc 1241 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->aen_event_read_flag = 0; ioc 1242 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->event_log = kcalloc(MPT3SAS_CTL_EVENT_LOG_SIZE, ioc 1244 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (!ioc->event_log) { ioc 1258 drivers/scsi/mpt3sas/mpt3sas_ctl.c _ctl_eventreport(struct MPT3SAS_ADAPTER *ioc, void __user *arg) ioc 1270 drivers/scsi/mpt3sas/mpt3sas_ctl.c dctlprintk(ioc, ioc_info(ioc, "%s: enter\n", ioc 1281 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (!max || !ioc->event_log) ioc 1285 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (copy_to_user(uarg->event_data, ioc->event_log, number_bytes)) { ioc 1292 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->aen_event_read_flag = 0; ioc 1302 drivers/scsi/mpt3sas/mpt3sas_ctl.c _ctl_do_reset(struct MPT3SAS_ADAPTER *ioc, void __user *arg) ioc 1313 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (ioc->shost_recovery || ioc->pci_error_recovery || ioc 1314 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->is_driver_loading) ioc 1317 drivers/scsi/mpt3sas/mpt3sas_ctl.c dctlprintk(ioc, ioc_info(ioc, "%s: enter\n", ioc 1320 drivers/scsi/mpt3sas/mpt3sas_ctl.c retval = mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER); ioc 1321 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, "host reset: %s\n", ((!retval) ? "SUCCESS" : "FAILED")); ioc 1331 drivers/scsi/mpt3sas/mpt3sas_ctl.c _ctl_btdh_search_sas_device(struct MPT3SAS_ADAPTER *ioc, ioc 1338 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (list_empty(&ioc->sas_device_list)) ioc 1341 drivers/scsi/mpt3sas/mpt3sas_ctl.c spin_lock_irqsave(&ioc->sas_device_lock, flags); ioc 1342 drivers/scsi/mpt3sas/mpt3sas_ctl.c list_for_each_entry(sas_device, &ioc->sas_device_list, list) { ioc 1357 drivers/scsi/mpt3sas/mpt3sas_ctl.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 1367 drivers/scsi/mpt3sas/mpt3sas_ctl.c _ctl_btdh_search_pcie_device(struct MPT3SAS_ADAPTER *ioc, ioc 1374 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (list_empty(&ioc->pcie_device_list)) ioc 1377 drivers/scsi/mpt3sas/mpt3sas_ctl.c spin_lock_irqsave(&ioc->pcie_device_lock, flags); ioc 1378 drivers/scsi/mpt3sas/mpt3sas_ctl.c list_for_each_entry(pcie_device, &ioc->pcie_device_list, list) { ioc 1393 drivers/scsi/mpt3sas/mpt3sas_ctl.c spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); ioc 1403 drivers/scsi/mpt3sas/mpt3sas_ctl.c _ctl_btdh_search_raid_device(struct MPT3SAS_ADAPTER *ioc, ioc 1410 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (list_empty(&ioc->raid_device_list)) ioc 1413 drivers/scsi/mpt3sas/mpt3sas_ctl.c spin_lock_irqsave(&ioc->raid_device_lock, flags); ioc 1414 drivers/scsi/mpt3sas/mpt3sas_ctl.c list_for_each_entry(raid_device, &ioc->raid_device_list, list) { ioc 1429 drivers/scsi/mpt3sas/mpt3sas_ctl.c spin_unlock_irqrestore(&ioc->raid_device_lock, flags); ioc 1439 drivers/scsi/mpt3sas/mpt3sas_ctl.c _ctl_btdh_mapping(struct MPT3SAS_ADAPTER *ioc, void __user *arg) ioc 1450 drivers/scsi/mpt3sas/mpt3sas_ctl.c dctlprintk(ioc, ioc_info(ioc, "%s\n", ioc 1453 drivers/scsi/mpt3sas/mpt3sas_ctl.c rc = _ctl_btdh_search_sas_device(ioc, &karg); ioc 1455 drivers/scsi/mpt3sas/mpt3sas_ctl.c rc = _ctl_btdh_search_pcie_device(ioc, &karg); ioc 1457 drivers/scsi/mpt3sas/mpt3sas_ctl.c _ctl_btdh_search_raid_device(ioc, &karg); ioc 1475 drivers/scsi/mpt3sas/mpt3sas_ctl.c _ctl_diag_capability(struct MPT3SAS_ADAPTER *ioc, u8 buffer_type) ioc 1481 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (ioc->facts.IOCCapabilities & ioc 1486 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (ioc->facts.IOCCapabilities & ioc 1491 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (ioc->facts.IOCCapabilities & ioc 1507 drivers/scsi/mpt3sas/mpt3sas_ctl.c _ctl_diag_register_2(struct MPT3SAS_ADAPTER *ioc, ioc 1522 drivers/scsi/mpt3sas/mpt3sas_ctl.c dctlprintk(ioc, ioc_info(ioc, "%s\n", ioc 1525 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_state = mpt3sas_base_get_iocstate(ioc, 1); ioc 1527 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: failed due to ioc not operational\n", ioc 1533 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (ioc->ctl_cmds.status != MPT3_CMD_NOT_USED) { ioc 1534 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: ctl_cmd in use\n", __func__); ioc 1540 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (!_ctl_diag_capability(ioc, buffer_type)) { ioc 1541 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: doesn't have capability for buffer_type(0x%02x)\n", ioc 1546 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (ioc->diag_buffer_status[buffer_type] & ioc 1548 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: already has a registered buffer for buffer_type(0x%02x)\n", ioc 1554 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: the requested_buffer_size is not 4 byte aligned\n", ioc 1559 drivers/scsi/mpt3sas/mpt3sas_ctl.c smid = mpt3sas_base_get_smid(ioc, ioc->ctl_cb_idx); ioc 1561 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); ioc 1567 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->ctl_cmds.status = MPT3_CMD_PENDING; ioc 1568 drivers/scsi/mpt3sas/mpt3sas_ctl.c memset(ioc->ctl_cmds.reply, 0, ioc->reply_sz); ioc 1569 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpi_request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 1570 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->ctl_cmds.smid = smid; ioc 1572 drivers/scsi/mpt3sas/mpt3sas_ctl.c request_data = ioc->diag_buffer[buffer_type]; ioc 1574 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->unique_id[buffer_type] = diag_register->unique_id; ioc 1575 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->diag_buffer_status[buffer_type] = 0; ioc 1576 drivers/scsi/mpt3sas/mpt3sas_ctl.c memcpy(ioc->product_specific[buffer_type], ioc 1578 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->diagnostic_flags[buffer_type] = diag_register->diagnostic_flags; ioc 1581 drivers/scsi/mpt3sas/mpt3sas_ctl.c request_data_dma = ioc->diag_buffer_dma[buffer_type]; ioc 1582 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (request_data_sz != ioc->diag_buffer_sz[buffer_type]) { ioc 1583 drivers/scsi/mpt3sas/mpt3sas_ctl.c dma_free_coherent(&ioc->pdev->dev, ioc 1584 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->diag_buffer_sz[buffer_type], ioc 1591 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->diag_buffer_sz[buffer_type] = 0; ioc 1592 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->diag_buffer_dma[buffer_type] = 0; ioc 1593 drivers/scsi/mpt3sas/mpt3sas_ctl.c request_data = dma_alloc_coherent(&ioc->pdev->dev, ioc 1596 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: failed allocating memory for diag buffers, requested size(%d)\n", ioc 1598 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_base_free_smid(ioc, smid); ioc 1602 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->diag_buffer[buffer_type] = request_data; ioc 1603 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->diag_buffer_sz[buffer_type] = request_data_sz; ioc 1604 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->diag_buffer_dma[buffer_type] = request_data_dma; ioc 1615 drivers/scsi/mpt3sas/mpt3sas_ctl.c dctlprintk(ioc, ioc 1616 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, "%s: diag_buffer(0x%p), dma(0x%llx), sz(%d)\n", ioc 1623 drivers/scsi/mpt3sas/mpt3sas_ctl.c cpu_to_le32(ioc->product_specific[buffer_type][i]); ioc 1625 drivers/scsi/mpt3sas/mpt3sas_ctl.c init_completion(&ioc->ctl_cmds.done); ioc 1626 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->put_smid_default(ioc, smid); ioc 1627 drivers/scsi/mpt3sas/mpt3sas_ctl.c wait_for_completion_timeout(&ioc->ctl_cmds.done, ioc 1630 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (!(ioc->ctl_cmds.status & MPT3_CMD_COMPLETE)) { ioc 1632 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_base_check_cmd_timeout(ioc, ioc 1633 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->ctl_cmds.status, mpi_request, ioc 1639 drivers/scsi/mpt3sas/mpt3sas_ctl.c if ((ioc->ctl_cmds.status & MPT3_CMD_REPLY_VALID) == 0) { ioc 1640 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: no reply message\n", __func__); ioc 1645 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpi_reply = ioc->ctl_cmds.reply; ioc 1649 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->diag_buffer_status[buffer_type] |= ioc 1651 drivers/scsi/mpt3sas/mpt3sas_ctl.c dctlprintk(ioc, ioc_info(ioc, "%s: success\n", __func__)); ioc 1653 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, "%s: ioc_status(0x%04x) log_info(0x%08x)\n", ioc 1661 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER); ioc 1666 drivers/scsi/mpt3sas/mpt3sas_ctl.c dma_free_coherent(&ioc->pdev->dev, request_data_sz, ioc 1669 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->ctl_cmds.status = MPT3_CMD_NOT_USED; ioc 1682 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_enable_diag_buffer(struct MPT3SAS_ADAPTER *ioc, u8 bits_to_register) ioc 1689 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, "registering trace buffer support\n"); ioc 1690 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->diag_trigger_master.MasterData = ioc 1696 drivers/scsi/mpt3sas/mpt3sas_ctl.c _ctl_diag_register_2(ioc, &diag_register); ioc 1700 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, "registering snapshot buffer support\n"); ioc 1705 drivers/scsi/mpt3sas/mpt3sas_ctl.c _ctl_diag_register_2(ioc, &diag_register); ioc 1709 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, "registering extended buffer support\n"); ioc 1714 drivers/scsi/mpt3sas/mpt3sas_ctl.c _ctl_diag_register_2(ioc, &diag_register); ioc 1727 drivers/scsi/mpt3sas/mpt3sas_ctl.c _ctl_diag_register(struct MPT3SAS_ADAPTER *ioc, void __user *arg) ioc 1738 drivers/scsi/mpt3sas/mpt3sas_ctl.c rc = _ctl_diag_register_2(ioc, &karg); ioc 1751 drivers/scsi/mpt3sas/mpt3sas_ctl.c _ctl_diag_unregister(struct MPT3SAS_ADAPTER *ioc, void __user *arg) ioc 1765 drivers/scsi/mpt3sas/mpt3sas_ctl.c dctlprintk(ioc, ioc_info(ioc, "%s\n", ioc 1769 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (!_ctl_diag_capability(ioc, buffer_type)) { ioc 1770 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: doesn't have capability for buffer_type(0x%02x)\n", ioc 1775 drivers/scsi/mpt3sas/mpt3sas_ctl.c if ((ioc->diag_buffer_status[buffer_type] & ioc 1777 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: buffer_type(0x%02x) is not registered\n", ioc 1781 drivers/scsi/mpt3sas/mpt3sas_ctl.c if ((ioc->diag_buffer_status[buffer_type] & ioc 1783 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: buffer_type(0x%02x) has not been released\n", ioc 1788 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (karg.unique_id != ioc->unique_id[buffer_type]) { ioc 1789 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: unique_id(0x%08x) is not registered\n", ioc 1794 drivers/scsi/mpt3sas/mpt3sas_ctl.c request_data = ioc->diag_buffer[buffer_type]; ioc 1796 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: doesn't have memory allocated for buffer_type(0x%02x)\n", ioc 1801 drivers/scsi/mpt3sas/mpt3sas_ctl.c request_data_sz = ioc->diag_buffer_sz[buffer_type]; ioc 1802 drivers/scsi/mpt3sas/mpt3sas_ctl.c request_data_dma = ioc->diag_buffer_dma[buffer_type]; ioc 1803 drivers/scsi/mpt3sas/mpt3sas_ctl.c dma_free_coherent(&ioc->pdev->dev, request_data_sz, ioc 1805 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->diag_buffer[buffer_type] = NULL; ioc 1806 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->diag_buffer_status[buffer_type] = 0; ioc 1820 drivers/scsi/mpt3sas/mpt3sas_ctl.c _ctl_diag_query(struct MPT3SAS_ADAPTER *ioc, void __user *arg) ioc 1833 drivers/scsi/mpt3sas/mpt3sas_ctl.c dctlprintk(ioc, ioc_info(ioc, "%s\n", ioc 1839 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (!_ctl_diag_capability(ioc, buffer_type)) { ioc 1840 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: doesn't have capability for buffer_type(0x%02x)\n", ioc 1845 drivers/scsi/mpt3sas/mpt3sas_ctl.c if ((ioc->diag_buffer_status[buffer_type] & ioc 1847 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: buffer_type(0x%02x) is not registered\n", ioc 1853 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (karg.unique_id != ioc->unique_id[buffer_type]) { ioc 1854 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: unique_id(0x%08x) is not registered\n", ioc 1860 drivers/scsi/mpt3sas/mpt3sas_ctl.c request_data = ioc->diag_buffer[buffer_type]; ioc 1862 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: doesn't have buffer for buffer_type(0x%02x)\n", ioc 1867 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (ioc->diag_buffer_status[buffer_type] & MPT3_DIAG_BUFFER_IS_RELEASED) ioc 1877 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->product_specific[buffer_type][i]; ioc 1879 drivers/scsi/mpt3sas/mpt3sas_ctl.c karg.total_buffer_size = ioc->diag_buffer_sz[buffer_type]; ioc 1881 drivers/scsi/mpt3sas/mpt3sas_ctl.c karg.unique_id = ioc->unique_id[buffer_type]; ioc 1882 drivers/scsi/mpt3sas/mpt3sas_ctl.c karg.diagnostic_flags = ioc->diagnostic_flags[buffer_type]; ioc 1885 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: unable to write mpt3_diag_query data @ %p\n", ioc 1900 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_send_diag_release(struct MPT3SAS_ADAPTER *ioc, u8 buffer_type, ioc 1910 drivers/scsi/mpt3sas/mpt3sas_ctl.c dctlprintk(ioc, ioc_info(ioc, "%s\n", ioc 1916 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_state = mpt3sas_base_get_iocstate(ioc, 1); ioc 1918 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (ioc->diag_buffer_status[buffer_type] & ioc 1920 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->diag_buffer_status[buffer_type] |= ioc 1922 drivers/scsi/mpt3sas/mpt3sas_ctl.c dctlprintk(ioc, ioc 1923 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, "%s: skipping due to FAULT state\n", ioc 1929 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (ioc->ctl_cmds.status != MPT3_CMD_NOT_USED) { ioc 1930 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: ctl_cmd in use\n", __func__); ioc 1935 drivers/scsi/mpt3sas/mpt3sas_ctl.c smid = mpt3sas_base_get_smid(ioc, ioc->ctl_cb_idx); ioc 1937 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); ioc 1942 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->ctl_cmds.status = MPT3_CMD_PENDING; ioc 1943 drivers/scsi/mpt3sas/mpt3sas_ctl.c memset(ioc->ctl_cmds.reply, 0, ioc->reply_sz); ioc 1944 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpi_request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 1945 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->ctl_cmds.smid = smid; ioc 1952 drivers/scsi/mpt3sas/mpt3sas_ctl.c init_completion(&ioc->ctl_cmds.done); ioc 1953 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->put_smid_default(ioc, smid); ioc 1954 drivers/scsi/mpt3sas/mpt3sas_ctl.c wait_for_completion_timeout(&ioc->ctl_cmds.done, ioc 1957 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (!(ioc->ctl_cmds.status & MPT3_CMD_COMPLETE)) { ioc 1958 drivers/scsi/mpt3sas/mpt3sas_ctl.c *issue_reset = mpt3sas_base_check_cmd_timeout(ioc, ioc 1959 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->ctl_cmds.status, mpi_request, ioc 1966 drivers/scsi/mpt3sas/mpt3sas_ctl.c if ((ioc->ctl_cmds.status & MPT3_CMD_REPLY_VALID) == 0) { ioc 1967 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: no reply message\n", __func__); ioc 1972 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpi_reply = ioc->ctl_cmds.reply; ioc 1976 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->diag_buffer_status[buffer_type] |= ioc 1978 drivers/scsi/mpt3sas/mpt3sas_ctl.c dctlprintk(ioc, ioc_info(ioc, "%s: success\n", __func__)); ioc 1980 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, "%s: ioc_status(0x%04x) log_info(0x%08x)\n", ioc 1987 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->ctl_cmds.status = MPT3_CMD_NOT_USED; ioc 2001 drivers/scsi/mpt3sas/mpt3sas_ctl.c _ctl_diag_release(struct MPT3SAS_ADAPTER *ioc, void __user *arg) ioc 2015 drivers/scsi/mpt3sas/mpt3sas_ctl.c dctlprintk(ioc, ioc_info(ioc, "%s\n", ioc 2019 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (!_ctl_diag_capability(ioc, buffer_type)) { ioc 2020 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: doesn't have capability for buffer_type(0x%02x)\n", ioc 2025 drivers/scsi/mpt3sas/mpt3sas_ctl.c if ((ioc->diag_buffer_status[buffer_type] & ioc 2027 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: buffer_type(0x%02x) is not registered\n", ioc 2032 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (karg.unique_id != ioc->unique_id[buffer_type]) { ioc 2033 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: unique_id(0x%08x) is not registered\n", ioc 2038 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (ioc->diag_buffer_status[buffer_type] & ioc 2040 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: buffer_type(0x%02x) is already released\n", ioc 2045 drivers/scsi/mpt3sas/mpt3sas_ctl.c request_data = ioc->diag_buffer[buffer_type]; ioc 2048 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: doesn't have memory allocated for buffer_type(0x%02x)\n", ioc 2054 drivers/scsi/mpt3sas/mpt3sas_ctl.c if ((ioc->diag_buffer_status[buffer_type] & ioc 2056 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->diag_buffer_status[buffer_type] |= ioc 2058 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->diag_buffer_status[buffer_type] &= ioc 2060 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: buffer_type(0x%02x) was released due to host reset\n", ioc 2065 drivers/scsi/mpt3sas/mpt3sas_ctl.c rc = mpt3sas_send_diag_release(ioc, buffer_type, &issue_reset); ioc 2068 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER); ioc 2079 drivers/scsi/mpt3sas/mpt3sas_ctl.c _ctl_diag_read_buffer(struct MPT3SAS_ADAPTER *ioc, void __user *arg) ioc 2099 drivers/scsi/mpt3sas/mpt3sas_ctl.c dctlprintk(ioc, ioc_info(ioc, "%s\n", ioc 2103 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (!_ctl_diag_capability(ioc, buffer_type)) { ioc 2104 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: doesn't have capability for buffer_type(0x%02x)\n", ioc 2109 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (karg.unique_id != ioc->unique_id[buffer_type]) { ioc 2110 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: unique_id(0x%08x) is not registered\n", ioc 2115 drivers/scsi/mpt3sas/mpt3sas_ctl.c request_data = ioc->diag_buffer[buffer_type]; ioc 2117 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: doesn't have buffer for buffer_type(0x%02x)\n", ioc 2122 drivers/scsi/mpt3sas/mpt3sas_ctl.c request_size = ioc->diag_buffer_sz[buffer_type]; ioc 2125 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: either the starting_offset or bytes_to_read are not 4 byte aligned\n", ioc 2134 drivers/scsi/mpt3sas/mpt3sas_ctl.c dctlprintk(ioc, ioc 2135 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, "%s: diag_buffer(%p), offset(%d), sz(%d)\n", ioc 2148 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: Unable to write mpt_diag_read_buffer_t data @ %p\n", ioc 2156 drivers/scsi/mpt3sas/mpt3sas_ctl.c dctlprintk(ioc, ioc 2157 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, "%s: Reregister buffer_type(0x%02x)\n", ioc 2159 drivers/scsi/mpt3sas/mpt3sas_ctl.c if ((ioc->diag_buffer_status[buffer_type] & ioc 2161 drivers/scsi/mpt3sas/mpt3sas_ctl.c dctlprintk(ioc, ioc 2162 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, "%s: buffer_type(0x%02x) is still registered\n", ioc 2169 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (ioc->ctl_cmds.status != MPT3_CMD_NOT_USED) { ioc 2170 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: ctl_cmd in use\n", __func__); ioc 2175 drivers/scsi/mpt3sas/mpt3sas_ctl.c smid = mpt3sas_base_get_smid(ioc, ioc->ctl_cb_idx); ioc 2177 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); ioc 2183 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->ctl_cmds.status = MPT3_CMD_PENDING; ioc 2184 drivers/scsi/mpt3sas/mpt3sas_ctl.c memset(ioc->ctl_cmds.reply, 0, ioc->reply_sz); ioc 2185 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpi_request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 2186 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->ctl_cmds.smid = smid; ioc 2191 drivers/scsi/mpt3sas/mpt3sas_ctl.c cpu_to_le32(ioc->diag_buffer_sz[buffer_type]); ioc 2193 drivers/scsi/mpt3sas/mpt3sas_ctl.c cpu_to_le64(ioc->diag_buffer_dma[buffer_type]); ioc 2196 drivers/scsi/mpt3sas/mpt3sas_ctl.c cpu_to_le32(ioc->product_specific[buffer_type][i]); ioc 2200 drivers/scsi/mpt3sas/mpt3sas_ctl.c init_completion(&ioc->ctl_cmds.done); ioc 2201 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->put_smid_default(ioc, smid); ioc 2202 drivers/scsi/mpt3sas/mpt3sas_ctl.c wait_for_completion_timeout(&ioc->ctl_cmds.done, ioc 2205 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (!(ioc->ctl_cmds.status & MPT3_CMD_COMPLETE)) { ioc 2207 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_base_check_cmd_timeout(ioc, ioc 2208 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->ctl_cmds.status, mpi_request, ioc 2214 drivers/scsi/mpt3sas/mpt3sas_ctl.c if ((ioc->ctl_cmds.status & MPT3_CMD_REPLY_VALID) == 0) { ioc 2215 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: no reply message\n", __func__); ioc 2220 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpi_reply = ioc->ctl_cmds.reply; ioc 2224 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->diag_buffer_status[buffer_type] |= ioc 2226 drivers/scsi/mpt3sas/mpt3sas_ctl.c dctlprintk(ioc, ioc_info(ioc, "%s: success\n", __func__)); ioc 2228 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, "%s: ioc_status(0x%04x) log_info(0x%08x)\n", ioc 2236 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER); ioc 2240 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->ctl_cmds.status = MPT3_CMD_NOT_USED; ioc 2256 drivers/scsi/mpt3sas/mpt3sas_ctl.c _ctl_compat_mpt_command(struct MPT3SAS_ADAPTER *ioc, unsigned cmd, ioc 2288 drivers/scsi/mpt3sas/mpt3sas_ctl.c return _ctl_do_mpt_command(ioc, karg, &uarg->mf); ioc 2305 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc; ioc 2319 drivers/scsi/mpt3sas/mpt3sas_ctl.c &ioc, mpi_version) == -1 || !ioc) ioc 2323 drivers/scsi/mpt3sas/mpt3sas_ctl.c mutex_lock(&ioc->pci_access_mutex); ioc 2325 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (ioc->shost_recovery || ioc->pci_error_recovery || ioc 2326 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->is_driver_loading || ioc->remove_host) { ioc 2333 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (!mutex_trylock(&ioc->ctl_cmds.mutex)) { ioc 2337 drivers/scsi/mpt3sas/mpt3sas_ctl.c } else if (mutex_lock_interruptible(&ioc->ctl_cmds.mutex)) { ioc 2346 drivers/scsi/mpt3sas/mpt3sas_ctl.c ret = _ctl_getiocinfo(ioc, arg); ioc 2358 drivers/scsi/mpt3sas/mpt3sas_ctl.c ret = _ctl_compat_mpt_command(ioc, cmd, arg); ioc 2375 drivers/scsi/mpt3sas/mpt3sas_ctl.c ret = _ctl_do_mpt_command(ioc, karg, &uarg->mf); ioc 2381 drivers/scsi/mpt3sas/mpt3sas_ctl.c ret = _ctl_eventquery(ioc, arg); ioc 2385 drivers/scsi/mpt3sas/mpt3sas_ctl.c ret = _ctl_eventenable(ioc, arg); ioc 2388 drivers/scsi/mpt3sas/mpt3sas_ctl.c ret = _ctl_eventreport(ioc, arg); ioc 2392 drivers/scsi/mpt3sas/mpt3sas_ctl.c ret = _ctl_do_reset(ioc, arg); ioc 2396 drivers/scsi/mpt3sas/mpt3sas_ctl.c ret = _ctl_btdh_mapping(ioc, arg); ioc 2400 drivers/scsi/mpt3sas/mpt3sas_ctl.c ret = _ctl_diag_register(ioc, arg); ioc 2404 drivers/scsi/mpt3sas/mpt3sas_ctl.c ret = _ctl_diag_unregister(ioc, arg); ioc 2408 drivers/scsi/mpt3sas/mpt3sas_ctl.c ret = _ctl_diag_query(ioc, arg); ioc 2412 drivers/scsi/mpt3sas/mpt3sas_ctl.c ret = _ctl_diag_release(ioc, arg); ioc 2416 drivers/scsi/mpt3sas/mpt3sas_ctl.c ret = _ctl_diag_read_buffer(ioc, arg); ioc 2419 drivers/scsi/mpt3sas/mpt3sas_ctl.c dctlprintk(ioc, ioc 2420 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, "unsupported ioctl opcode(0x%08x)\n", ioc 2425 drivers/scsi/mpt3sas/mpt3sas_ctl.c mutex_unlock(&ioc->ctl_cmds.mutex); ioc 2427 drivers/scsi/mpt3sas/mpt3sas_ctl.c mutex_unlock(&ioc->pci_access_mutex); ioc 2519 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 2522 drivers/scsi/mpt3sas/mpt3sas_ctl.c (ioc->facts.FWVersion.Word & 0xFF000000) >> 24, ioc 2523 drivers/scsi/mpt3sas/mpt3sas_ctl.c (ioc->facts.FWVersion.Word & 0x00FF0000) >> 16, ioc 2524 drivers/scsi/mpt3sas/mpt3sas_ctl.c (ioc->facts.FWVersion.Word & 0x0000FF00) >> 8, ioc 2525 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->facts.FWVersion.Word & 0x000000FF); ioc 2542 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 2544 drivers/scsi/mpt3sas/mpt3sas_ctl.c u32 version = le32_to_cpu(ioc->bios_pg3.BiosVersion); ioc 2567 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 2570 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->facts.MsgVersion, ioc->facts.HeaderVersion >> 8); ioc 2587 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 2589 drivers/scsi/mpt3sas/mpt3sas_ctl.c return snprintf(buf, 16, "%s\n", ioc->manu_pg0.ChipName); ioc 2606 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 2609 drivers/scsi/mpt3sas/mpt3sas_ctl.c le32_to_cpu(ioc->iounit_pg0.NvdataVersionPersistent.Word)); ioc 2626 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 2629 drivers/scsi/mpt3sas/mpt3sas_ctl.c le32_to_cpu(ioc->iounit_pg0.NvdataVersionDefault.Word)); ioc 2646 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 2648 drivers/scsi/mpt3sas/mpt3sas_ctl.c return snprintf(buf, 16, "%s\n", ioc->manu_pg0.BoardName); ioc 2665 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 2667 drivers/scsi/mpt3sas/mpt3sas_ctl.c return snprintf(buf, 16, "%s\n", ioc->manu_pg0.BoardAssembly); ioc 2684 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 2686 drivers/scsi/mpt3sas/mpt3sas_ctl.c return snprintf(buf, 16, "%s\n", ioc->manu_pg0.BoardTracerNumber); ioc 2706 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 2708 drivers/scsi/mpt3sas/mpt3sas_ctl.c return snprintf(buf, PAGE_SIZE, "%02d\n", ioc->io_missing_delay); ioc 2728 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 2730 drivers/scsi/mpt3sas/mpt3sas_ctl.c return snprintf(buf, PAGE_SIZE, "%02d\n", ioc->device_missing_delay); ioc 2749 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 2751 drivers/scsi/mpt3sas/mpt3sas_ctl.c return snprintf(buf, PAGE_SIZE, "%02d\n", ioc->facts.RequestCredit); ioc 2771 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 2774 drivers/scsi/mpt3sas/mpt3sas_ctl.c (unsigned long long)ioc->sas_hba.sas_address); ioc 2791 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 2793 drivers/scsi/mpt3sas/mpt3sas_ctl.c return snprintf(buf, PAGE_SIZE, "%08xh\n", ioc->logging_level); ioc 2800 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 2806 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->logging_level = val; ioc 2807 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, "logging_level=%08xh\n", ioc 2808 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->logging_level); ioc 2827 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 2829 drivers/scsi/mpt3sas/mpt3sas_ctl.c return snprintf(buf, PAGE_SIZE, "%d\n", ioc->fwfault_debug); ioc 2836 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 2842 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->fwfault_debug = val; ioc 2843 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, "fwfault_debug=%d\n", ioc 2844 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->fwfault_debug); ioc 2864 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 2866 drivers/scsi/mpt3sas/mpt3sas_ctl.c return snprintf(buf, PAGE_SIZE, "%d\n", ioc->ioc_reset_count); ioc 2886 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 2888 drivers/scsi/mpt3sas/mpt3sas_ctl.c if ((ioc->facts.IOCCapabilities & ioc 2889 drivers/scsi/mpt3sas/mpt3sas_ctl.c MPI2_IOCFACTS_CAPABILITY_MSI_X_INDEX) && ioc->msix_enable) ioc 2890 drivers/scsi/mpt3sas/mpt3sas_ctl.c reply_queue_count = ioc->reply_queue_count; ioc 2913 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 2921 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (!ioc->is_warpdrive) { ioc 2922 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: BRM attribute is only for warpdrive\n", ioc 2927 drivers/scsi/mpt3sas/mpt3sas_ctl.c mutex_lock(&ioc->pci_access_mutex); ioc 2928 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (ioc->pci_error_recovery || ioc->remove_host) { ioc 2929 drivers/scsi/mpt3sas/mpt3sas_ctl.c mutex_unlock(&ioc->pci_access_mutex); ioc 2937 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: failed allocating memory for iounit_pg3: (%d) bytes\n", ioc 2942 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (mpt3sas_config_get_iounit_pg3(ioc, &mpi_reply, io_unit_pg3, sz) != ioc 2944 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: failed reading iounit_pg3\n", ioc 2951 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: iounit_pg3 failed with ioc_status(0x%04x)\n", ioc 2957 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: iounit_pg3->GPIOCount less than 25 entries, detected (%d) entries\n", ioc 2968 drivers/scsi/mpt3sas/mpt3sas_ctl.c mutex_unlock(&ioc->pci_access_mutex); ioc 2996 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 3000 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (!ioc->diag_buffer[MPI2_DIAG_BUF_TYPE_TRACE]) { ioc 3001 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: host_trace_buffer is not registered\n", ioc 3006 drivers/scsi/mpt3sas/mpt3sas_ctl.c if ((ioc->diag_buffer_status[MPI2_DIAG_BUF_TYPE_TRACE] & ioc 3008 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: host_trace_buffer is not registered\n", ioc 3014 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->diag_buffer[MPI2_DIAG_BUF_TYPE_TRACE]; ioc 3021 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->ring_buffer_sz = size; ioc 3043 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 3047 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (!ioc->diag_buffer[MPI2_DIAG_BUF_TYPE_TRACE]) { ioc 3048 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: host_trace_buffer is not registered\n", ioc 3053 drivers/scsi/mpt3sas/mpt3sas_ctl.c if ((ioc->diag_buffer_status[MPI2_DIAG_BUF_TYPE_TRACE] & ioc 3055 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_err(ioc, "%s: host_trace_buffer is not registered\n", ioc 3060 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (ioc->ring_buffer_offset > ioc->ring_buffer_sz) ioc 3063 drivers/scsi/mpt3sas/mpt3sas_ctl.c size = ioc->ring_buffer_sz - ioc->ring_buffer_offset; ioc 3065 drivers/scsi/mpt3sas/mpt3sas_ctl.c request_data = ioc->diag_buffer[0] + ioc->ring_buffer_offset; ioc 3075 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 3081 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->ring_buffer_offset = val; ioc 3104 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 3106 drivers/scsi/mpt3sas/mpt3sas_ctl.c if ((!ioc->diag_buffer[MPI2_DIAG_BUF_TYPE_TRACE]) || ioc 3107 drivers/scsi/mpt3sas/mpt3sas_ctl.c ((ioc->diag_buffer_status[MPI2_DIAG_BUF_TYPE_TRACE] & ioc 3110 drivers/scsi/mpt3sas/mpt3sas_ctl.c else if ((ioc->diag_buffer_status[MPI2_DIAG_BUF_TYPE_TRACE] & ioc 3122 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 3128 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (ioc->shost_recovery || ioc->remove_host || ioc 3129 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->pci_error_recovery || ioc->is_driver_loading) ioc 3137 drivers/scsi/mpt3sas/mpt3sas_ctl.c if ((ioc->diag_buffer[MPI2_DIAG_BUF_TYPE_TRACE]) && ioc 3138 drivers/scsi/mpt3sas/mpt3sas_ctl.c (ioc->diag_buffer_status[MPI2_DIAG_BUF_TYPE_TRACE] & ioc 3140 drivers/scsi/mpt3sas/mpt3sas_ctl.c ((ioc->diag_buffer_status[MPI2_DIAG_BUF_TYPE_TRACE] & ioc 3144 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, "posting host trace buffers\n"); ioc 3148 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->diag_buffer_status[MPI2_DIAG_BUF_TYPE_TRACE] = 0; ioc 3149 drivers/scsi/mpt3sas/mpt3sas_ctl.c _ctl_diag_register_2(ioc, &diag_register); ioc 3152 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (!ioc->diag_buffer[MPI2_DIAG_BUF_TYPE_TRACE]) ioc 3154 drivers/scsi/mpt3sas/mpt3sas_ctl.c if ((ioc->diag_buffer_status[MPI2_DIAG_BUF_TYPE_TRACE] & ioc 3157 drivers/scsi/mpt3sas/mpt3sas_ctl.c if ((ioc->diag_buffer_status[MPI2_DIAG_BUF_TYPE_TRACE] & ioc 3160 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc_info(ioc, "releasing host trace buffer\n"); ioc 3161 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_send_diag_release(ioc, MPI2_DIAG_BUF_TYPE_TRACE, ioc 3186 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 3190 drivers/scsi/mpt3sas/mpt3sas_ctl.c spin_lock_irqsave(&ioc->diag_trigger_lock, flags); ioc 3192 drivers/scsi/mpt3sas/mpt3sas_ctl.c memcpy(buf, &ioc->diag_trigger_master, rc); ioc 3193 drivers/scsi/mpt3sas/mpt3sas_ctl.c spin_unlock_irqrestore(&ioc->diag_trigger_lock, flags); ioc 3212 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 3216 drivers/scsi/mpt3sas/mpt3sas_ctl.c spin_lock_irqsave(&ioc->diag_trigger_lock, flags); ioc 3218 drivers/scsi/mpt3sas/mpt3sas_ctl.c memset(&ioc->diag_trigger_master, 0, ioc 3220 drivers/scsi/mpt3sas/mpt3sas_ctl.c memcpy(&ioc->diag_trigger_master, buf, rc); ioc 3221 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->diag_trigger_master.MasterData |= ioc 3223 drivers/scsi/mpt3sas/mpt3sas_ctl.c spin_unlock_irqrestore(&ioc->diag_trigger_lock, flags); ioc 3242 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 3246 drivers/scsi/mpt3sas/mpt3sas_ctl.c spin_lock_irqsave(&ioc->diag_trigger_lock, flags); ioc 3248 drivers/scsi/mpt3sas/mpt3sas_ctl.c memcpy(buf, &ioc->diag_trigger_event, rc); ioc 3249 drivers/scsi/mpt3sas/mpt3sas_ctl.c spin_unlock_irqrestore(&ioc->diag_trigger_lock, flags); ioc 3268 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 3272 drivers/scsi/mpt3sas/mpt3sas_ctl.c spin_lock_irqsave(&ioc->diag_trigger_lock, flags); ioc 3274 drivers/scsi/mpt3sas/mpt3sas_ctl.c memset(&ioc->diag_trigger_event, 0, ioc 3276 drivers/scsi/mpt3sas/mpt3sas_ctl.c memcpy(&ioc->diag_trigger_event, buf, sz); ioc 3277 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (ioc->diag_trigger_event.ValidEntries > NUM_VALID_ENTRIES) ioc 3278 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->diag_trigger_event.ValidEntries = NUM_VALID_ENTRIES; ioc 3279 drivers/scsi/mpt3sas/mpt3sas_ctl.c spin_unlock_irqrestore(&ioc->diag_trigger_lock, flags); ioc 3298 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 3302 drivers/scsi/mpt3sas/mpt3sas_ctl.c spin_lock_irqsave(&ioc->diag_trigger_lock, flags); ioc 3304 drivers/scsi/mpt3sas/mpt3sas_ctl.c memcpy(buf, &ioc->diag_trigger_scsi, rc); ioc 3305 drivers/scsi/mpt3sas/mpt3sas_ctl.c spin_unlock_irqrestore(&ioc->diag_trigger_lock, flags); ioc 3323 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 3327 drivers/scsi/mpt3sas/mpt3sas_ctl.c spin_lock_irqsave(&ioc->diag_trigger_lock, flags); ioc 3328 drivers/scsi/mpt3sas/mpt3sas_ctl.c sz = min(sizeof(ioc->diag_trigger_scsi), count); ioc 3329 drivers/scsi/mpt3sas/mpt3sas_ctl.c memset(&ioc->diag_trigger_scsi, 0, sizeof(ioc->diag_trigger_scsi)); ioc 3330 drivers/scsi/mpt3sas/mpt3sas_ctl.c memcpy(&ioc->diag_trigger_scsi, buf, sz); ioc 3331 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (ioc->diag_trigger_scsi.ValidEntries > NUM_VALID_ENTRIES) ioc 3332 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->diag_trigger_scsi.ValidEntries = NUM_VALID_ENTRIES; ioc 3333 drivers/scsi/mpt3sas/mpt3sas_ctl.c spin_unlock_irqrestore(&ioc->diag_trigger_lock, flags); ioc 3352 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 3356 drivers/scsi/mpt3sas/mpt3sas_ctl.c spin_lock_irqsave(&ioc->diag_trigger_lock, flags); ioc 3358 drivers/scsi/mpt3sas/mpt3sas_ctl.c memcpy(buf, &ioc->diag_trigger_mpi, rc); ioc 3359 drivers/scsi/mpt3sas/mpt3sas_ctl.c spin_unlock_irqrestore(&ioc->diag_trigger_lock, flags); ioc 3377 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 3381 drivers/scsi/mpt3sas/mpt3sas_ctl.c spin_lock_irqsave(&ioc->diag_trigger_lock, flags); ioc 3383 drivers/scsi/mpt3sas/mpt3sas_ctl.c memset(&ioc->diag_trigger_mpi, 0, ioc 3384 drivers/scsi/mpt3sas/mpt3sas_ctl.c sizeof(ioc->diag_trigger_mpi)); ioc 3385 drivers/scsi/mpt3sas/mpt3sas_ctl.c memcpy(&ioc->diag_trigger_mpi, buf, sz); ioc 3386 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (ioc->diag_trigger_mpi.ValidEntries > NUM_VALID_ENTRIES) ioc 3387 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->diag_trigger_mpi.ValidEntries = NUM_VALID_ENTRIES; ioc 3388 drivers/scsi/mpt3sas/mpt3sas_ctl.c spin_unlock_irqrestore(&ioc->diag_trigger_lock, flags); ioc 3410 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 3412 drivers/scsi/mpt3sas/mpt3sas_ctl.c return snprintf(buf, PAGE_SIZE, "0x%08x\n", ioc->drv_support_bitmap); ioc 3429 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 3431 drivers/scsi/mpt3sas/mpt3sas_ctl.c return snprintf(buf, PAGE_SIZE, "%d\n", ioc->enable_sdev_max_qd); ioc 3449 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 3462 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->enable_sdev_max_qd = 0; ioc 3463 drivers/scsi/mpt3sas/mpt3sas_ctl.c shost_for_each_device(sdev, ioc->shost) { ioc 3474 drivers/scsi/mpt3sas/mpt3sas_ctl.c mpt3sas_raid_device_find_by_handle(ioc, ioc 3504 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->enable_sdev_max_qd = 1; ioc 3505 drivers/scsi/mpt3sas/mpt3sas_ctl.c shost_for_each_device(sdev, ioc->shost) ioc 3709 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct MPT3SAS_ADAPTER *ioc; ioc 3712 drivers/scsi/mpt3sas/mpt3sas_ctl.c list_for_each_entry(ioc, &mpt3sas_ioc_list, list) { ioc 3716 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (!ioc->diag_buffer[i]) ioc 3718 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (!(ioc->diag_buffer_status[i] & ioc 3721 drivers/scsi/mpt3sas/mpt3sas_ctl.c if ((ioc->diag_buffer_status[i] & ioc 3724 drivers/scsi/mpt3sas/mpt3sas_ctl.c dma_free_coherent(&ioc->pdev->dev, ioc 3725 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->diag_buffer_sz[i], ioc 3726 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->diag_buffer[i], ioc 3727 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->diag_buffer_dma[i]); ioc 3728 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->diag_buffer[i] = NULL; ioc 3729 drivers/scsi/mpt3sas/mpt3sas_ctl.c ioc->diag_buffer_status[i] = 0; ioc 3732 drivers/scsi/mpt3sas/mpt3sas_ctl.c kfree(ioc->event_log); ioc 66 drivers/scsi/mpt3sas/mpt3sas_scsih.c static void _scsih_expander_node_remove(struct MPT3SAS_ADAPTER *ioc, ioc 70 drivers/scsi/mpt3sas/mpt3sas_scsih.c static void _scsih_remove_device(struct MPT3SAS_ADAPTER *ioc, ioc 72 drivers/scsi/mpt3sas/mpt3sas_scsih.c static int _scsih_add_device(struct MPT3SAS_ADAPTER *ioc, u16 handle, ioc 74 drivers/scsi/mpt3sas/mpt3sas_scsih.c static int _scsih_pcie_add_device(struct MPT3SAS_ADAPTER *ioc, u16 handle); ioc 75 drivers/scsi/mpt3sas/mpt3sas_scsih.c static void _scsih_pcie_device_remove_from_sml(struct MPT3SAS_ADAPTER *ioc, ioc 78 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_pcie_check_device(struct MPT3SAS_ADAPTER *ioc, u16 handle); ioc 79 drivers/scsi/mpt3sas/mpt3sas_scsih.c static u8 _scsih_check_for_pending_tm(struct MPT3SAS_ADAPTER *ioc, u16 smid); ioc 203 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct MPT3SAS_ADAPTER *ioc; ioc 299 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct MPT3SAS_ADAPTER *ioc; ioc 306 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_for_each_entry(ioc, &mpt3sas_ioc_list, list) ioc 307 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->logging_level = logging_level; ioc 413 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_get_sas_address(struct MPT3SAS_ADAPTER *ioc, u16 handle, ioc 422 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((mpt3sas_config_get_sas_device_pg0(ioc, &mpi_reply, &sas_device_pg0, ioc 424 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 434 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((handle <= ioc->sas_hba.num_phys) && ioc 437 drivers/scsi/mpt3sas/mpt3sas_scsih.c *sas_address = ioc->sas_hba.sas_address; ioc 448 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "handle(0x%04x), ioc_status(0x%04x), failure at %s:%d/%s()!\n", ioc 467 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_determine_boot_device(struct MPT3SAS_ADAPTER *ioc, void *device, ioc 479 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->is_driver_loading) ioc 483 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->bios_pg3.BiosVersion) ioc 506 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->req_boot_device.device) { ioc 509 drivers/scsi/mpt3sas/mpt3sas_scsih.c (ioc->bios_pg2.ReqBootDeviceForm & ioc 511 drivers/scsi/mpt3sas/mpt3sas_scsih.c &ioc->bios_pg2.RequestedBootDevice)) { ioc 512 drivers/scsi/mpt3sas/mpt3sas_scsih.c dinitprintk(ioc, ioc 513 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: req_boot_device(0x%016llx)\n", ioc 515 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->req_boot_device.device = device; ioc 516 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->req_boot_device.channel = channel; ioc 520 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->req_alt_boot_device.device) { ioc 523 drivers/scsi/mpt3sas/mpt3sas_scsih.c (ioc->bios_pg2.ReqAltBootDeviceForm & ioc 525 drivers/scsi/mpt3sas/mpt3sas_scsih.c &ioc->bios_pg2.RequestedAltBootDevice)) { ioc 526 drivers/scsi/mpt3sas/mpt3sas_scsih.c dinitprintk(ioc, ioc 527 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: req_alt_boot_device(0x%016llx)\n", ioc 529 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->req_alt_boot_device.device = device; ioc 530 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->req_alt_boot_device.channel = channel; ioc 534 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->current_boot_device.device) { ioc 537 drivers/scsi/mpt3sas/mpt3sas_scsih.c (ioc->bios_pg2.CurrentBootDeviceForm & ioc 539 drivers/scsi/mpt3sas/mpt3sas_scsih.c &ioc->bios_pg2.CurrentBootDevice)) { ioc 540 drivers/scsi/mpt3sas/mpt3sas_scsih.c dinitprintk(ioc, ioc 541 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: current_boot_device(0x%016llx)\n", ioc 543 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->current_boot_device.device = device; ioc 544 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->current_boot_device.channel = channel; ioc 550 drivers/scsi/mpt3sas/mpt3sas_scsih.c __mpt3sas_get_sdev_from_target(struct MPT3SAS_ADAPTER *ioc, ioc 555 drivers/scsi/mpt3sas/mpt3sas_scsih.c assert_spin_locked(&ioc->sas_device_lock); ioc 565 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_get_sdev_from_target(struct MPT3SAS_ADAPTER *ioc, ioc 571 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_device_lock, flags); ioc 572 drivers/scsi/mpt3sas/mpt3sas_scsih.c ret = __mpt3sas_get_sdev_from_target(ioc, tgt_priv); ioc 573 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 579 drivers/scsi/mpt3sas/mpt3sas_scsih.c __mpt3sas_get_pdev_from_target(struct MPT3SAS_ADAPTER *ioc, ioc 584 drivers/scsi/mpt3sas/mpt3sas_scsih.c assert_spin_locked(&ioc->pcie_device_lock); ioc 604 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_get_pdev_from_target(struct MPT3SAS_ADAPTER *ioc, ioc 610 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->pcie_device_lock, flags); ioc 611 drivers/scsi/mpt3sas/mpt3sas_scsih.c ret = __mpt3sas_get_pdev_from_target(ioc, tgt_priv); ioc 612 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); ioc 618 drivers/scsi/mpt3sas/mpt3sas_scsih.c __mpt3sas_get_sdev_by_addr(struct MPT3SAS_ADAPTER *ioc, ioc 623 drivers/scsi/mpt3sas/mpt3sas_scsih.c assert_spin_locked(&ioc->sas_device_lock); ioc 625 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_for_each_entry(sas_device, &ioc->sas_device_list, list) ioc 629 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_for_each_entry(sas_device, &ioc->sas_device_init_list, list) ioc 650 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_get_sdev_by_addr(struct MPT3SAS_ADAPTER *ioc, ioc 656 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_device_lock, flags); ioc 657 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_device = __mpt3sas_get_sdev_by_addr(ioc, ioc 659 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 665 drivers/scsi/mpt3sas/mpt3sas_scsih.c __mpt3sas_get_sdev_by_handle(struct MPT3SAS_ADAPTER *ioc, u16 handle) ioc 669 drivers/scsi/mpt3sas/mpt3sas_scsih.c assert_spin_locked(&ioc->sas_device_lock); ioc 671 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_for_each_entry(sas_device, &ioc->sas_device_list, list) ioc 675 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_for_each_entry(sas_device, &ioc->sas_device_init_list, list) ioc 696 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_get_sdev_by_handle(struct MPT3SAS_ADAPTER *ioc, u16 handle) ioc 701 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_device_lock, flags); ioc 702 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_device = __mpt3sas_get_sdev_by_handle(ioc, handle); ioc 703 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 716 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_display_enclosure_chassis_info(struct MPT3SAS_ADAPTER *ioc, ioc 753 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "enclosure logical id(0x%016llx), slot(%d)\n", ioc 757 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "enclosure level(0x%04x), connector name( %s)\n", ioc 761 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "chassis slot(0x%04x)\n", ioc 775 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_device_remove(struct MPT3SAS_ADAPTER *ioc, ioc 782 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "removing handle(0x%04x), sas_addr(0x%016llx)\n", ioc 785 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_display_enclosure_chassis_info(ioc, sas_device, NULL, NULL); ioc 791 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_device_lock, flags); ioc 796 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 805 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_device_remove_by_handle(struct MPT3SAS_ADAPTER *ioc, u16 handle) ioc 810 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->shost_recovery) ioc 813 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_device_lock, flags); ioc 814 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_device = __mpt3sas_get_sdev_by_handle(ioc, handle); ioc 819 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 821 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_remove_device(ioc, sas_device); ioc 832 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_device_remove_by_sas_address(struct MPT3SAS_ADAPTER *ioc, ioc 838 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->shost_recovery) ioc 841 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_device_lock, flags); ioc 842 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_device = __mpt3sas_get_sdev_by_addr(ioc, sas_address); ioc 847 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 849 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_remove_device(ioc, sas_device); ioc 863 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_device_add(struct MPT3SAS_ADAPTER *ioc, ioc 868 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 869 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: handle(0x%04x), sas_addr(0x%016llx)\n", ioc 873 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, _scsih_display_enclosure_chassis_info(ioc, sas_device, ioc 876 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_device_lock, flags); ioc 878 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_add_tail(&sas_device->list, &ioc->sas_device_list); ioc 879 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 881 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->hide_drives) { ioc 882 drivers/scsi/mpt3sas/mpt3sas_scsih.c clear_bit(sas_device->handle, ioc->pend_os_device_add); ioc 886 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!mpt3sas_transport_port_add(ioc, sas_device->handle, ioc 888 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_device_remove(ioc, sas_device); ioc 895 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->is_driver_loading) { ioc 896 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_transport_port_remove(ioc, ioc 899 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_device_remove(ioc, sas_device); ioc 902 drivers/scsi/mpt3sas/mpt3sas_scsih.c clear_bit(sas_device->handle, ioc->pend_os_device_add); ioc 914 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_device_init_add(struct MPT3SAS_ADAPTER *ioc, ioc 919 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 920 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: handle(0x%04x), sas_addr(0x%016llx)\n", ioc 924 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, _scsih_display_enclosure_chassis_info(ioc, sas_device, ioc 927 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_device_lock, flags); ioc 929 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_add_tail(&sas_device->list, &ioc->sas_device_init_list); ioc 930 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_determine_boot_device(ioc, sas_device, 0); ioc 931 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 936 drivers/scsi/mpt3sas/mpt3sas_scsih.c __mpt3sas_get_pdev_by_wwid(struct MPT3SAS_ADAPTER *ioc, u64 wwid) ioc 940 drivers/scsi/mpt3sas/mpt3sas_scsih.c assert_spin_locked(&ioc->pcie_device_lock); ioc 942 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_for_each_entry(pcie_device, &ioc->pcie_device_list, list) ioc 946 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_for_each_entry(pcie_device, &ioc->pcie_device_init_list, list) ioc 969 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_get_pdev_by_wwid(struct MPT3SAS_ADAPTER *ioc, u64 wwid) ioc 974 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->pcie_device_lock, flags); ioc 975 drivers/scsi/mpt3sas/mpt3sas_scsih.c pcie_device = __mpt3sas_get_pdev_by_wwid(ioc, wwid); ioc 976 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); ioc 983 drivers/scsi/mpt3sas/mpt3sas_scsih.c __mpt3sas_get_pdev_by_idchannel(struct MPT3SAS_ADAPTER *ioc, int id, ioc 988 drivers/scsi/mpt3sas/mpt3sas_scsih.c assert_spin_locked(&ioc->pcie_device_lock); ioc 990 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_for_each_entry(pcie_device, &ioc->pcie_device_list, list) ioc 994 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_for_each_entry(pcie_device, &ioc->pcie_device_init_list, list) ioc 1006 drivers/scsi/mpt3sas/mpt3sas_scsih.c __mpt3sas_get_pdev_by_handle(struct MPT3SAS_ADAPTER *ioc, u16 handle) ioc 1010 drivers/scsi/mpt3sas/mpt3sas_scsih.c assert_spin_locked(&ioc->pcie_device_lock); ioc 1012 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_for_each_entry(pcie_device, &ioc->pcie_device_list, list) ioc 1016 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_for_each_entry(pcie_device, &ioc->pcie_device_init_list, list) ioc 1040 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_get_pdev_by_handle(struct MPT3SAS_ADAPTER *ioc, u16 handle) ioc 1045 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->pcie_device_lock, flags); ioc 1046 drivers/scsi/mpt3sas/mpt3sas_scsih.c pcie_device = __mpt3sas_get_pdev_by_handle(ioc, handle); ioc 1047 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); ioc 1061 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_pcie_device_remove(struct MPT3SAS_ADAPTER *ioc, ioc 1069 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "removing handle(0x%04x), wwid(0x%016llx)\n", ioc 1072 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "removing enclosure logical id(0x%016llx), slot(%d)\n", ioc 1076 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "removing enclosure level(0x%04x), connector name( %s)\n", ioc 1080 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->pcie_device_lock, flags); ioc 1085 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); ioc 1099 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_pcie_device_remove_by_handle(struct MPT3SAS_ADAPTER *ioc, u16 handle) ioc 1105 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->shost_recovery) ioc 1108 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->pcie_device_lock, flags); ioc 1109 drivers/scsi/mpt3sas/mpt3sas_scsih.c pcie_device = __mpt3sas_get_pdev_by_handle(ioc, handle); ioc 1117 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); ioc 1119 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_pcie_device_remove_from_sml(ioc, pcie_device); ioc 1132 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_pcie_device_add(struct MPT3SAS_ADAPTER *ioc, ioc 1137 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 1138 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: handle (0x%04x), wwid(0x%016llx)\n", ioc 1142 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 1143 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: enclosure logical id(0x%016llx), slot( %d)\n", ioc 1148 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 1149 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: enclosure level(0x%04x), connector name( %s)\n", ioc 1153 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->pcie_device_lock, flags); ioc 1155 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_add_tail(&pcie_device->list, &ioc->pcie_device_list); ioc 1156 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); ioc 1160 drivers/scsi/mpt3sas/mpt3sas_scsih.c clear_bit(pcie_device->handle, ioc->pend_os_device_add); ioc 1163 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (scsi_add_device(ioc->shost, PCIE_CHANNEL, pcie_device->id, 0)) { ioc 1164 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_pcie_device_remove(ioc, pcie_device); ioc 1166 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->is_driver_loading) { ioc 1168 drivers/scsi/mpt3sas/mpt3sas_scsih.c clear_bit(pcie_device->handle, ioc->pend_os_device_add); ioc 1171 drivers/scsi/mpt3sas/mpt3sas_scsih.c clear_bit(pcie_device->handle, ioc->pend_os_device_add); ioc 1183 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_pcie_device_init_add(struct MPT3SAS_ADAPTER *ioc, ioc 1188 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 1189 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: handle (0x%04x), wwid(0x%016llx)\n", ioc 1193 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 1194 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: enclosure logical id(0x%016llx), slot( %d)\n", ioc 1199 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 1200 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: enclosure level(0x%04x), connector name( %s)\n", ioc 1204 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->pcie_device_lock, flags); ioc 1206 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_add_tail(&pcie_device->list, &ioc->pcie_device_init_list); ioc 1209 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_determine_boot_device(ioc, pcie_device, PCIE_CHANNEL); ioc 1210 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); ioc 1223 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_raid_device_find_by_id(struct MPT3SAS_ADAPTER *ioc, int id, int channel) ioc 1228 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_for_each_entry(raid_device, &ioc->raid_device_list, list) { ioc 1249 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_raid_device_find_by_handle(struct MPT3SAS_ADAPTER *ioc, u16 handle) ioc 1254 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_for_each_entry(raid_device, &ioc->raid_device_list, list) { ioc 1275 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_raid_device_find_by_wwid(struct MPT3SAS_ADAPTER *ioc, u64 wwid) ioc 1280 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_for_each_entry(raid_device, &ioc->raid_device_list, list) { ioc 1299 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_raid_device_add(struct MPT3SAS_ADAPTER *ioc, ioc 1304 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 1305 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: handle(0x%04x), wwid(0x%016llx)\n", ioc 1309 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->raid_device_lock, flags); ioc 1310 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_add_tail(&raid_device->list, &ioc->raid_device_list); ioc 1311 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->raid_device_lock, flags); ioc 1321 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_raid_device_remove(struct MPT3SAS_ADAPTER *ioc, ioc 1326 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->raid_device_lock, flags); ioc 1329 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->raid_device_lock, flags); ioc 1342 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_scsih_expander_find_by_handle(struct MPT3SAS_ADAPTER *ioc, u16 handle) ioc 1347 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_for_each_entry(sas_expander, &ioc->sas_expander_list, list) { ioc 1367 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_scsih_enclosure_find_by_handle(struct MPT3SAS_ADAPTER *ioc, u16 handle) ioc 1372 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_for_each_entry(enclosure_dev, &ioc->enclosure_list, list) { ioc 1391 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_scsih_expander_find_by_sas_address(struct MPT3SAS_ADAPTER *ioc, ioc 1397 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_for_each_entry(sas_expander, &ioc->sas_expander_list, list) { ioc 1416 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_expander_node_add(struct MPT3SAS_ADAPTER *ioc, ioc 1421 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_node_lock, flags); ioc 1422 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_add_tail(&sas_expander->list, &ioc->sas_expander_list); ioc 1423 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_node_lock, flags); ioc 1474 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_scsih_scsi_lookup_get(struct MPT3SAS_ADAPTER *ioc, u16 smid) ioc 1481 drivers/scsi/mpt3sas/mpt3sas_scsih.c smid <= ioc->scsiio_depth - INTERNAL_SCSIIO_CMDS_COUNT) { ioc 1484 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpi_request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 1495 drivers/scsi/mpt3sas/mpt3sas_scsih.c scmd = scsi_host_find_tag(ioc->shost, unique_tag); ioc 1517 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 1529 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->enable_sdev_max_qd) ioc 1541 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_device_lock, flags); ioc 1542 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_device = __mpt3sas_get_sdev_from_target(ioc, sas_target_priv_data); ioc 1549 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 1571 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 1573 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->enable_sdev_max_qd) ioc 1590 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 1609 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->raid_device_lock, flags); ioc 1610 drivers/scsi/mpt3sas/mpt3sas_scsih.c raid_device = _scsih_raid_device_find_by_id(ioc, starget->id, ioc 1616 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->is_warpdrive) ioc 1620 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->raid_device_lock, flags); ioc 1626 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->pcie_device_lock, flags); ioc 1627 drivers/scsi/mpt3sas/mpt3sas_scsih.c pcie_device = __mpt3sas_get_pdev_by_idchannel(ioc, starget->id, ioc 1642 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); ioc 1647 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_device_lock, flags); ioc 1649 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_device = __mpt3sas_get_sdev_by_addr(ioc, ioc 1659 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (test_bit(sas_device->handle, ioc->pd_handles)) ioc 1666 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 1679 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 1691 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->raid_device_lock, flags); ioc 1692 drivers/scsi/mpt3sas/mpt3sas_scsih.c raid_device = _scsih_raid_device_find_by_id(ioc, starget->id, ioc 1698 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->raid_device_lock, flags); ioc 1703 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->pcie_device_lock, flags); ioc 1704 drivers/scsi/mpt3sas/mpt3sas_scsih.c pcie_device = __mpt3sas_get_pdev_from_target(ioc, ioc 1719 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); ioc 1723 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_device_lock, flags); ioc 1724 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_device = __mpt3sas_get_sdev_from_target(ioc, sas_target_priv_data); ioc 1739 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 1757 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct MPT3SAS_ADAPTER *ioc; ioc 1783 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc = shost_priv(shost); ioc 1785 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->raid_device_lock, flags); ioc 1786 drivers/scsi/mpt3sas/mpt3sas_scsih.c raid_device = _scsih_raid_device_find_by_id(ioc, ioc 1790 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->raid_device_lock, flags); ioc 1793 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->pcie_device_lock, flags); ioc 1794 drivers/scsi/mpt3sas/mpt3sas_scsih.c pcie_device = __mpt3sas_get_pdev_by_wwid(ioc, ioc 1805 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); ioc 1808 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_device_lock, flags); ioc 1809 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_device = __mpt3sas_get_sdev_by_addr(ioc, ioc 1821 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 1837 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct MPT3SAS_ADAPTER *ioc; ioc 1850 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc = shost_priv(shost); ioc 1853 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->pcie_device_lock, flags); ioc 1854 drivers/scsi/mpt3sas/mpt3sas_scsih.c pcie_device = __mpt3sas_get_pdev_from_target(ioc, ioc 1862 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); ioc 1865 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_device_lock, flags); ioc 1866 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_device = __mpt3sas_get_sdev_from_target(ioc, ioc 1873 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 1887 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_display_sata_capabilities(struct MPT3SAS_ADAPTER *ioc, ioc 1896 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((mpt3sas_config_get_sas_device_pg0(ioc, &mpi_reply, &sas_device_pg0, ioc 1898 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 1906 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 1941 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct MPT3SAS_ADAPTER *ioc = shost_priv(sdev->host); ioc 1943 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->is_warpdrive) ioc 1964 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct MPT3SAS_ADAPTER *ioc = shost_priv(sdev->host); ioc 1975 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->is_warpdrive) ioc 1978 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->raid_device_lock, flags); ioc 1979 drivers/scsi/mpt3sas/mpt3sas_scsih.c raid_device = _scsih_raid_device_find_by_id(ioc, sdev->id, ioc 1985 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->raid_device_lock, flags); ioc 1990 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (mpt3sas_config_get_raid_volume_pg0(ioc, &mpi_reply, &vol_pg0, ioc 1993 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 2006 drivers/scsi/mpt3sas/mpt3sas_scsih.c switch (ioc->hba_mpi_version_belonged) { ioc 2025 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct MPT3SAS_ADAPTER *ioc = shost_priv(sdev->host); ioc 2034 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->raid_device_lock, flags); ioc 2035 drivers/scsi/mpt3sas/mpt3sas_scsih.c raid_device = _scsih_raid_device_find_by_id(ioc, sdev->id, ioc 2039 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->raid_device_lock, flags); ioc 2044 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (mpt3sas_config_get_raid_volume_pg0(ioc, &mpi_reply, &vol_pg0, ioc 2047 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 2072 drivers/scsi/mpt3sas/mpt3sas_scsih.c switch (ioc->hba_mpi_version_belonged) { ioc 2090 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_set_level(struct MPT3SAS_ADAPTER *ioc, ioc 2110 drivers/scsi/mpt3sas/mpt3sas_scsih.c switch (ioc->hba_mpi_version_belonged) { ioc 2132 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_get_volume_capabilities(struct MPT3SAS_ADAPTER *ioc, ioc 2142 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((mpt3sas_config_get_number_pds(ioc, raid_device->handle, ioc 2144 drivers/scsi/mpt3sas/mpt3sas_scsih.c dfailprintk(ioc, ioc 2145 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_warn(ioc, "failure at %s:%d/%s()!\n", ioc 2155 drivers/scsi/mpt3sas/mpt3sas_scsih.c dfailprintk(ioc, ioc 2156 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_warn(ioc, "failure at %s:%d/%s()!\n", ioc 2161 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((mpt3sas_config_get_raid_volume_pg0(ioc, &mpi_reply, vol_pg0, ioc 2163 drivers/scsi/mpt3sas/mpt3sas_scsih.c dfailprintk(ioc, ioc 2164 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_warn(ioc, "failure at %s:%d/%s()!\n", ioc 2175 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!(mpt3sas_config_get_phys_disk_pg0(ioc, &mpi_reply, ioc 2178 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!(mpt3sas_config_get_sas_device_pg0(ioc, &mpi_reply, ioc 2200 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_enable_tlr(struct MPT3SAS_ADAPTER *ioc, struct scsi_device *sdev) ioc 2207 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!(ioc->facts.IOCCapabilities & MPI2_IOCFACTS_CAPABILITY_TLR)) ioc 2228 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 2252 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->raid_device_lock, flags); ioc 2253 drivers/scsi/mpt3sas/mpt3sas_scsih.c raid_device = mpt3sas_raid_device_find_by_handle(ioc, handle); ioc 2254 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->raid_device_lock, flags); ioc 2256 drivers/scsi/mpt3sas/mpt3sas_scsih.c dfailprintk(ioc, ioc 2257 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_warn(ioc, "failure at %s:%d/%s()!\n", ioc 2262 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (_scsih_get_volume_capabilities(ioc, raid_device)) { ioc 2263 drivers/scsi/mpt3sas/mpt3sas_scsih.c dfailprintk(ioc, ioc 2264 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_warn(ioc, "failure at %s:%d/%s()!\n", ioc 2272 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_init_warpdrive_properties(ioc, raid_device); ioc 2298 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->manu_pg10.OEMIdentifier && ioc 2299 drivers/scsi/mpt3sas/mpt3sas_scsih.c (le32_to_cpu(ioc->manu_pg10.GenericFlags0) & ioc 2321 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->hide_ir_msg) ioc 2340 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->is_warpdrive) ioc 2341 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_set_level(ioc, sdev, raid_device->volume_type); ioc 2347 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (mpt3sas_config_get_volume_handle(ioc, handle, ioc 2349 drivers/scsi/mpt3sas/mpt3sas_scsih.c dfailprintk(ioc, ioc 2350 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_warn(ioc, "failure at %s:%d/%s()!\n", ioc 2354 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (volume_handle && mpt3sas_config_get_volume_wwid(ioc, ioc 2356 drivers/scsi/mpt3sas/mpt3sas_scsih.c dfailprintk(ioc, ioc 2357 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_warn(ioc, "failure at %s:%d/%s()!\n", ioc 2365 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->pcie_device_lock, flags); ioc 2366 drivers/scsi/mpt3sas/mpt3sas_scsih.c pcie_device = __mpt3sas_get_pdev_by_wwid(ioc, ioc 2369 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); ioc 2370 drivers/scsi/mpt3sas/mpt3sas_scsih.c dfailprintk(ioc, ioc 2371 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_warn(ioc, "failure at %s:%d/%s()!\n", ioc 2400 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); ioc 2409 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->page_size - 1); ioc 2413 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_device_lock, flags); ioc 2414 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_device = __mpt3sas_get_sdev_by_addr(ioc, ioc 2417 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 2418 drivers/scsi/mpt3sas/mpt3sas_scsih.c dfailprintk(ioc, ioc 2419 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_warn(ioc, "failure at %s:%d/%s()!\n", ioc 2455 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 2458 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_display_sata_capabilities(ioc, handle, sdev); ioc 2465 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_enable_tlr(ioc, sdev); ioc 2523 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_response_code(struct MPT3SAS_ADAPTER *ioc, u8 response_code) ioc 2556 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_warn(ioc, "response_code(0x%01x): %s\n", response_code, desc); ioc 2573 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_tm_done(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index, u32 reply) ioc 2577 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->tm_cmds.status == MPT3_CMD_NOT_USED) ioc 2579 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->tm_cmds.smid != smid) ioc 2581 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->tm_cmds.status |= MPT3_CMD_COMPLETE; ioc 2582 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpi_reply = mpt3sas_base_get_reply_virt_addr(ioc, reply); ioc 2584 drivers/scsi/mpt3sas/mpt3sas_scsih.c memcpy(ioc->tm_cmds.reply, mpi_reply, mpi_reply->MsgLength*4); ioc 2585 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->tm_cmds.status |= MPT3_CMD_REPLY_VALID; ioc 2587 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->tm_cmds.status &= ~MPT3_CMD_PENDING; ioc 2588 drivers/scsi/mpt3sas/mpt3sas_scsih.c complete(&ioc->tm_cmds.done); ioc 2600 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_scsih_set_tm_flag(struct MPT3SAS_ADAPTER *ioc, u16 handle) ioc 2606 drivers/scsi/mpt3sas/mpt3sas_scsih.c shost_for_each_device(sdev, ioc->shost) { ioc 2615 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->ignore_loginfos = 1; ioc 2628 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_scsih_clear_tm_flag(struct MPT3SAS_ADAPTER *ioc, u16 handle) ioc 2634 drivers/scsi/mpt3sas/mpt3sas_scsih.c shost_for_each_device(sdev, ioc->shost) { ioc 2643 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->ignore_loginfos = 0; ioc 2668 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_scsih_issue_tm(struct MPT3SAS_ADAPTER *ioc, u16 handle, u64 lun, ioc 2677 drivers/scsi/mpt3sas/mpt3sas_scsih.c lockdep_assert_held(&ioc->tm_cmds.mutex); ioc 2679 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->tm_cmds.status != MPT3_CMD_NOT_USED) { ioc 2680 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: tm_cmd busy!!!\n", __func__); ioc 2684 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->shost_recovery || ioc->remove_host || ioc 2685 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->pci_error_recovery) { ioc 2686 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: host reset in progress!\n", __func__); ioc 2690 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_state = mpt3sas_base_get_iocstate(ioc, 0); ioc 2692 drivers/scsi/mpt3sas/mpt3sas_scsih.c dhsprintk(ioc, ioc_info(ioc, "unexpected doorbell active!\n")); ioc 2693 drivers/scsi/mpt3sas/mpt3sas_scsih.c rc = mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER); ioc 2698 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_base_fault_info(ioc, ioc_state & ioc 2700 drivers/scsi/mpt3sas/mpt3sas_scsih.c rc = mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER); ioc 2704 drivers/scsi/mpt3sas/mpt3sas_scsih.c smid = mpt3sas_base_get_smid_hpr(ioc, ioc->tm_cb_idx); ioc 2706 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); ioc 2710 drivers/scsi/mpt3sas/mpt3sas_scsih.c dtmprintk(ioc, ioc 2711 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "sending tm: handle(0x%04x), task_type(0x%02x), smid(%d), timeout(%d), tr_method(0x%x)\n", ioc 2713 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->tm_cmds.status = MPT3_CMD_PENDING; ioc 2714 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpi_request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 2715 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->tm_cmds.smid = smid; ioc 2717 drivers/scsi/mpt3sas/mpt3sas_scsih.c memset(ioc->tm_cmds.reply, 0, sizeof(Mpi2SCSITaskManagementReply_t)); ioc 2724 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_scsih_set_tm_flag(ioc, handle); ioc 2725 drivers/scsi/mpt3sas/mpt3sas_scsih.c init_completion(&ioc->tm_cmds.done); ioc 2726 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->put_smid_hi_priority(ioc, smid, msix_task); ioc 2727 drivers/scsi/mpt3sas/mpt3sas_scsih.c wait_for_completion_timeout(&ioc->tm_cmds.done, timeout*HZ); ioc 2728 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!(ioc->tm_cmds.status & MPT3_CMD_COMPLETE)) { ioc 2729 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (mpt3sas_base_check_cmd_timeout(ioc, ioc 2730 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->tm_cmds.status, mpi_request, ioc 2732 drivers/scsi/mpt3sas/mpt3sas_scsih.c rc = mpt3sas_base_hard_reset_handler(ioc, ioc 2740 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_base_sync_reply_irqs(ioc); ioc 2742 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->tm_cmds.status & MPT3_CMD_REPLY_VALID) { ioc 2743 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_trigger_master(ioc, MASTER_TRIGGER_TASK_MANAGMENT); ioc 2744 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpi_reply = ioc->tm_cmds.reply; ioc 2745 drivers/scsi/mpt3sas/mpt3sas_scsih.c dtmprintk(ioc, ioc 2746 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "complete tm: ioc_status(0x%04x), loginfo(0x%08x), term_count(0x%08x)\n", ioc 2750 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->logging_level & MPT_DEBUG_TM) { ioc 2751 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_response_code(ioc, mpi_reply->ResponseCode); ioc 2760 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_scsih_clear_tm_flag(ioc, handle); ioc 2761 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->tm_cmds.status = MPT3_CMD_NOT_USED; ioc 2765 drivers/scsi/mpt3sas/mpt3sas_scsih.c int mpt3sas_scsih_issue_locked_tm(struct MPT3SAS_ADAPTER *ioc, u16 handle, ioc 2771 drivers/scsi/mpt3sas/mpt3sas_scsih.c mutex_lock(&ioc->tm_cmds.mutex); ioc 2772 drivers/scsi/mpt3sas/mpt3sas_scsih.c ret = mpt3sas_scsih_issue_tm(ioc, handle, lun, type, smid_task, ioc 2774 drivers/scsi/mpt3sas/mpt3sas_scsih.c mutex_unlock(&ioc->tm_cmds.mutex); ioc 2787 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_tm_display_info(struct MPT3SAS_ADAPTER *ioc, struct scsi_cmnd *scmd) ioc 2798 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->hide_ir_msg) ioc 2811 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->pcie_device_lock, flags); ioc 2812 drivers/scsi/mpt3sas/mpt3sas_scsih.c pcie_device = __mpt3sas_get_pdev_from_target(ioc, priv_target); ioc 2832 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); ioc 2835 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_device_lock, flags); ioc 2836 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_device = __mpt3sas_get_sdev_from_target(ioc, priv_target); ioc 2857 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 2870 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct MPT3SAS_ADAPTER *ioc = shost_priv(scmd->device->host); ioc 2880 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_tm_display_info(ioc, scmd); ioc 2884 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->remove_host) { ioc 2909 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_halt_firmware(ioc); ioc 2912 drivers/scsi/mpt3sas/mpt3sas_scsih.c pcie_device = mpt3sas_get_pdev_by_handle(ioc, handle); ioc 2913 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (pcie_device && (!ioc->tm_custom_handling) && ioc 2915 drivers/scsi/mpt3sas/mpt3sas_scsih.c timeout = ioc->nvme_abort_timeout; ioc 2916 drivers/scsi/mpt3sas/mpt3sas_scsih.c r = mpt3sas_scsih_issue_locked_tm(ioc, handle, scmd->device->lun, ioc 2939 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct MPT3SAS_ADAPTER *ioc = shost_priv(scmd->device->host); ioc 2953 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_tm_display_info(ioc, scmd); ioc 2957 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->remove_host) { ioc 2970 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_device = mpt3sas_get_sdev_from_target(ioc, ioc 2983 drivers/scsi/mpt3sas/mpt3sas_scsih.c pcie_device = mpt3sas_get_pdev_by_handle(ioc, handle); ioc 2985 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (pcie_device && (!ioc->tm_custom_handling) && ioc 2992 drivers/scsi/mpt3sas/mpt3sas_scsih.c r = mpt3sas_scsih_issue_locked_tm(ioc, handle, scmd->device->lun, ioc 3019 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct MPT3SAS_ADAPTER *ioc = shost_priv(scmd->device->host); ioc 3032 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_tm_display_info(ioc, scmd); ioc 3036 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->remove_host) { ioc 3049 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_device = mpt3sas_get_sdev_from_target(ioc, ioc 3062 drivers/scsi/mpt3sas/mpt3sas_scsih.c pcie_device = mpt3sas_get_pdev_by_handle(ioc, handle); ioc 3064 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (pcie_device && (!ioc->tm_custom_handling) && ioc 3070 drivers/scsi/mpt3sas/mpt3sas_scsih.c r = mpt3sas_scsih_issue_locked_tm(ioc, handle, 0, ioc 3097 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct MPT3SAS_ADAPTER *ioc = shost_priv(scmd->device->host); ioc 3100 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "attempting host reset! scmd(%p)\n", scmd); ioc 3103 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->is_driver_loading || ioc->remove_host) { ioc 3104 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "Blocking the host reset\n"); ioc 3109 drivers/scsi/mpt3sas/mpt3sas_scsih.c retval = mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER); ioc 3112 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "host reset: %s scmd(%p)\n", ioc 3128 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_fw_event_add(struct MPT3SAS_ADAPTER *ioc, struct fw_event_work *fw_event) ioc 3132 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->firmware_event_thread == NULL) ioc 3135 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->fw_event_lock, flags); ioc 3138 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_add_tail(&fw_event->list, &ioc->fw_event_list); ioc 3141 drivers/scsi/mpt3sas/mpt3sas_scsih.c queue_work(ioc->firmware_event_thread, &fw_event->work); ioc 3142 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->fw_event_lock, flags); ioc 3154 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_fw_event_del_from_list(struct MPT3SAS_ADAPTER *ioc, struct fw_event_work ioc 3159 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->fw_event_lock, flags); ioc 3164 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->fw_event_lock, flags); ioc 3174 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_send_trigger_data_event(struct MPT3SAS_ADAPTER *ioc, ioc 3180 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->is_driver_loading) ioc 3187 drivers/scsi/mpt3sas/mpt3sas_scsih.c fw_event->ioc = ioc; ioc 3189 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_fw_event_add(ioc, fw_event); ioc 3198 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_error_recovery_delete_devices(struct MPT3SAS_ADAPTER *ioc) ioc 3202 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->is_driver_loading) ioc 3208 drivers/scsi/mpt3sas/mpt3sas_scsih.c fw_event->ioc = ioc; ioc 3209 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_fw_event_add(ioc, fw_event); ioc 3218 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_port_enable_complete(struct MPT3SAS_ADAPTER *ioc) ioc 3226 drivers/scsi/mpt3sas/mpt3sas_scsih.c fw_event->ioc = ioc; ioc 3227 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_fw_event_add(ioc, fw_event); ioc 3231 drivers/scsi/mpt3sas/mpt3sas_scsih.c static struct fw_event_work *dequeue_next_fw_event(struct MPT3SAS_ADAPTER *ioc) ioc 3236 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->fw_event_lock, flags); ioc 3237 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!list_empty(&ioc->fw_event_list)) { ioc 3238 drivers/scsi/mpt3sas/mpt3sas_scsih.c fw_event = list_first_entry(&ioc->fw_event_list, ioc 3242 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->fw_event_lock, flags); ioc 3255 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_fw_event_cleanup_queue(struct MPT3SAS_ADAPTER *ioc) ioc 3259 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (list_empty(&ioc->fw_event_list) || ioc 3260 drivers/scsi/mpt3sas/mpt3sas_scsih.c !ioc->firmware_event_thread || in_interrupt()) ioc 3263 drivers/scsi/mpt3sas/mpt3sas_scsih.c while ((fw_event = dequeue_next_fw_event(ioc))) { ioc 3355 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_ublock_io_all_device(struct MPT3SAS_ADAPTER *ioc) ioc 3360 drivers/scsi/mpt3sas/mpt3sas_scsih.c shost_for_each_device(sdev, ioc->shost) { ioc 3367 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, sdev_printk(KERN_INFO, sdev, ioc 3383 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_ublock_io_device(struct MPT3SAS_ADAPTER *ioc, u64 sas_address) ioc 3388 drivers/scsi/mpt3sas/mpt3sas_scsih.c shost_for_each_device(sdev, ioc->shost) { ioc 3408 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_block_io_all_device(struct MPT3SAS_ADAPTER *ioc) ioc 3413 drivers/scsi/mpt3sas/mpt3sas_scsih.c shost_for_each_device(sdev, ioc->shost) { ioc 3437 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_block_io_device(struct MPT3SAS_ADAPTER *ioc, u16 handle) ioc 3443 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_device = mpt3sas_get_sdev_by_handle(ioc, handle); ioc 3445 drivers/scsi/mpt3sas/mpt3sas_scsih.c shost_for_each_device(sdev, ioc->shost) { ioc 3478 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_block_io_to_children_attached_to_ex(struct MPT3SAS_ADAPTER *ioc, ioc 3493 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_device_lock, flags); ioc 3494 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_device = __mpt3sas_get_sdev_by_addr(ioc, ioc 3498 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->blocking_handles); ioc 3501 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 3514 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc, mpt3sas_port->remote_identify.sas_address); ioc 3515 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_block_io_to_children_attached_to_ex(ioc, ioc 3530 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_block_io_to_children_attached_directly(struct MPT3SAS_ADAPTER *ioc, ioc 3544 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_block_io_device(ioc, handle); ioc 3557 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_block_io_to_pcie_children_attached_directly(struct MPT3SAS_ADAPTER *ioc, ioc 3572 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_block_io_device(ioc, handle); ioc 3591 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_tm_tr_send(struct MPT3SAS_ADAPTER *ioc, u16 handle) ioc 3604 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->pci_error_recovery) { ioc 3605 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 3606 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: host in pci error recovery: handle(0x%04x)\n", ioc 3610 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_state = mpt3sas_base_get_iocstate(ioc, 1); ioc 3612 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 3613 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: host is not operational: handle(0x%04x)\n", ioc 3619 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (test_bit(handle, ioc->pd_handles)) ioc 3622 drivers/scsi/mpt3sas/mpt3sas_scsih.c clear_bit(handle, ioc->pend_os_device_add); ioc 3624 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_device_lock, flags); ioc 3625 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_device = __mpt3sas_get_sdev_by_handle(ioc, handle); ioc 3632 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 3634 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->pcie_device_lock, flags); ioc 3635 drivers/scsi/mpt3sas/mpt3sas_scsih.c pcie_device = __mpt3sas_get_pdev_by_handle(ioc, handle); ioc 3642 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); ioc 3643 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (pcie_device && (!ioc->tm_custom_handling) && ioc 3652 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 3653 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "setting delete flag: handle(0x%04x), sas_addr(0x%016llx)\n", ioc 3657 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 3658 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "setting delete flag:enclosure logical id(0x%016llx), slot(%d)\n", ioc 3662 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 3663 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "setting delete flag: enclosure level(0x%04x), connector name( %s)\n", ioc 3668 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 3669 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "setting delete flag: logical id(0x%016llx), slot(%d)\n", ioc 3673 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 3674 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "setting delete flag:, enclosure level(0x%04x), connector name( %s)\n", ioc 3678 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_ublock_io_device(ioc, sas_address); ioc 3682 drivers/scsi/mpt3sas/mpt3sas_scsih.c smid = mpt3sas_base_get_smid_hpr(ioc, ioc->tm_tr_cb_idx); ioc 3689 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_add_tail(&delayed_tr->list, &ioc->delayed_tr_list); ioc 3690 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 3691 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "DELAYED:tr:handle(0x%04x), (open)\n", ioc 3696 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 3697 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "tr_send:handle(0x%04x), (open), smid(%d), cb(%d)\n", ioc 3698 drivers/scsi/mpt3sas/mpt3sas_scsih.c handle, smid, ioc->tm_tr_cb_idx)); ioc 3699 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpi_request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 3705 drivers/scsi/mpt3sas/mpt3sas_scsih.c set_bit(handle, ioc->device_remove_in_progress); ioc 3706 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->put_smid_hi_priority(ioc, smid, 0); ioc 3707 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_trigger_master(ioc, MASTER_TRIGGER_DEVICE_REMOVAL); ioc 3733 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_tm_tr_complete(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index, ioc 3739 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_base_get_reply_virt_addr(ioc, reply); ioc 3745 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->pci_error_recovery) { ioc 3746 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 3747 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: host in pci error recovery\n", ioc 3751 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_state = mpt3sas_base_get_iocstate(ioc, 1); ioc 3753 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 3754 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: host is not operational\n", ioc 3759 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "mpi_reply not valid at %s:%d/%s()!\n", ioc 3763 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpi_request_tm = mpt3sas_base_get_msg_frame(ioc, smid); ioc 3766 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 3767 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "spurious interrupt: handle(0x%04x:0x%04x), smid(%d)!!!\n", ioc 3773 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_trigger_master(ioc, MASTER_TRIGGER_TASK_MANAGMENT); ioc 3774 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 3775 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "tr_complete:handle(0x%04x), (open) smid(%d), ioc_status(0x%04x), loginfo(0x%08x), completed(%d)\n", ioc 3780 drivers/scsi/mpt3sas/mpt3sas_scsih.c smid_sas_ctrl = mpt3sas_base_get_smid(ioc, ioc->tm_sas_control_cb_idx); ioc 3784 drivers/scsi/mpt3sas/mpt3sas_scsih.c return _scsih_check_for_pending_tm(ioc, smid); ioc 3787 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_add_tail(&delayed_sc->list, &ioc->delayed_sc_list); ioc 3788 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 3789 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "DELAYED:sc:handle(0x%04x), (open)\n", ioc 3791 drivers/scsi/mpt3sas/mpt3sas_scsih.c return _scsih_check_for_pending_tm(ioc, smid); ioc 3794 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 3795 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "sc_send:handle(0x%04x), (open), smid(%d), cb(%d)\n", ioc 3796 drivers/scsi/mpt3sas/mpt3sas_scsih.c handle, smid_sas_ctrl, ioc->tm_sas_control_cb_idx)); ioc 3797 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpi_request = mpt3sas_base_get_msg_frame(ioc, smid_sas_ctrl); ioc 3802 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->put_smid_default(ioc, smid_sas_ctrl); ioc 3804 drivers/scsi/mpt3sas/mpt3sas_scsih.c return _scsih_check_for_pending_tm(ioc, smid); ioc 3814 drivers/scsi/mpt3sas/mpt3sas_scsih.c inline bool _scsih_allow_scmd_to_device(struct MPT3SAS_ADAPTER *ioc, ioc 3818 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->pci_error_recovery) ioc 3821 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->hba_mpi_version_belonged == MPI2_VERSION) { ioc 3822 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->remove_host) ioc 3828 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->remove_host) { ioc 3858 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_control_complete(struct MPT3SAS_ADAPTER *ioc, u16 smid, ioc 3862 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_base_get_reply_virt_addr(ioc, reply); ioc 3865 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 3866 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "sc_complete:handle(0x%04x), (open) smid(%d), ioc_status(0x%04x), loginfo(0x%08x)\n", ioc 3873 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->device_remove_in_progress); ioc 3876 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "mpi_reply not valid at %s:%d/%s()!\n", ioc 3879 drivers/scsi/mpt3sas/mpt3sas_scsih.c return mpt3sas_check_for_pending_internal_cmds(ioc, smid); ioc 3893 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_tm_tr_volume_send(struct MPT3SAS_ADAPTER *ioc, u16 handle) ioc 3899 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->pci_error_recovery) { ioc 3900 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 3901 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: host reset in progress!\n", ioc 3906 drivers/scsi/mpt3sas/mpt3sas_scsih.c smid = mpt3sas_base_get_smid_hpr(ioc, ioc->tm_tr_volume_cb_idx); ioc 3913 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_add_tail(&delayed_tr->list, &ioc->delayed_tr_volume_list); ioc 3914 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 3915 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "DELAYED:tr:handle(0x%04x), (open)\n", ioc 3920 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 3921 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "tr_send:handle(0x%04x), (open), smid(%d), cb(%d)\n", ioc 3922 drivers/scsi/mpt3sas/mpt3sas_scsih.c handle, smid, ioc->tm_tr_volume_cb_idx)); ioc 3923 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpi_request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 3928 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->put_smid_hi_priority(ioc, smid, 0); ioc 3943 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_tm_volume_tr_complete(struct MPT3SAS_ADAPTER *ioc, u16 smid, ioc 3949 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_base_get_reply_virt_addr(ioc, reply); ioc 3951 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->shost_recovery || ioc->pci_error_recovery) { ioc 3952 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 3953 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: host reset in progress!\n", ioc 3958 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "mpi_reply not valid at %s:%d/%s()!\n", ioc 3963 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpi_request_tm = mpt3sas_base_get_msg_frame(ioc, smid); ioc 3966 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 3967 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "spurious interrupt: handle(0x%04x:0x%04x), smid(%d)!!!\n", ioc 3973 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 3974 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "tr_complete:handle(0x%04x), (open) smid(%d), ioc_status(0x%04x), loginfo(0x%08x), completed(%d)\n", ioc 3979 drivers/scsi/mpt3sas/mpt3sas_scsih.c return _scsih_check_for_pending_tm(ioc, smid); ioc 3992 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_issue_delayed_event_ack(struct MPT3SAS_ADAPTER *ioc, u16 smid, U16 event, ioc 3996 drivers/scsi/mpt3sas/mpt3sas_scsih.c int i = smid - ioc->internal_smid; ioc 4003 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); ioc 4004 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->internal_lookup[i].cb_idx = ioc->base_cb_idx; ioc 4005 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags); ioc 4007 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 4008 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "EVENT ACK: event(0x%04x), smid(%d), cb(%d)\n", ioc 4009 drivers/scsi/mpt3sas/mpt3sas_scsih.c le16_to_cpu(event), smid, ioc->base_cb_idx)); ioc 4010 drivers/scsi/mpt3sas/mpt3sas_scsih.c ack_request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 4017 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->put_smid_default(ioc, smid); ioc 4030 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_issue_delayed_sas_io_unit_ctrl(struct MPT3SAS_ADAPTER *ioc, ioc 4035 drivers/scsi/mpt3sas/mpt3sas_scsih.c int i = smid - ioc->internal_smid; ioc 4038 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->remove_host) { ioc 4039 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 4040 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: host has been removed\n", ioc 4043 drivers/scsi/mpt3sas/mpt3sas_scsih.c } else if (ioc->pci_error_recovery) { ioc 4044 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 4045 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: host in pci error recovery\n", ioc 4049 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_state = mpt3sas_base_get_iocstate(ioc, 1); ioc 4051 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 4052 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: host is not operational\n", ioc 4061 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); ioc 4062 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->internal_lookup[i].cb_idx = ioc->tm_sas_control_cb_idx; ioc 4063 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags); ioc 4065 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 4066 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "sc_send:handle(0x%04x), (open), smid(%d), cb(%d)\n", ioc 4067 drivers/scsi/mpt3sas/mpt3sas_scsih.c handle, smid, ioc->tm_sas_control_cb_idx)); ioc 4068 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpi_request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 4073 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->put_smid_default(ioc, smid); ioc 4090 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_check_for_pending_internal_cmds(struct MPT3SAS_ADAPTER *ioc, u16 smid) ioc 4095 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!list_empty(&ioc->delayed_event_ack_list)) { ioc 4096 drivers/scsi/mpt3sas/mpt3sas_scsih.c delayed_event_ack = list_entry(ioc->delayed_event_ack_list.next, ioc 4098 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_issue_delayed_event_ack(ioc, smid, ioc 4105 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!list_empty(&ioc->delayed_sc_list)) { ioc 4106 drivers/scsi/mpt3sas/mpt3sas_scsih.c delayed_sc = list_entry(ioc->delayed_sc_list.next, ioc 4108 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_issue_delayed_sas_io_unit_ctrl(ioc, smid, ioc 4129 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_check_for_pending_tm(struct MPT3SAS_ADAPTER *ioc, u16 smid) ioc 4133 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!list_empty(&ioc->delayed_tr_volume_list)) { ioc 4134 drivers/scsi/mpt3sas/mpt3sas_scsih.c delayed_tr = list_entry(ioc->delayed_tr_volume_list.next, ioc 4136 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_base_free_smid(ioc, smid); ioc 4137 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_tm_tr_volume_send(ioc, delayed_tr->handle); ioc 4143 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!list_empty(&ioc->delayed_tr_list)) { ioc 4144 drivers/scsi/mpt3sas/mpt3sas_scsih.c delayed_tr = list_entry(ioc->delayed_tr_list.next, ioc 4146 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_base_free_smid(ioc, smid); ioc 4147 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_tm_tr_send(ioc, delayed_tr->handle); ioc 4168 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_check_topo_delete_events(struct MPT3SAS_ADAPTER *ioc, ioc 4186 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_tm_tr_send(ioc, handle); ioc 4190 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (expander_handle < ioc->sas_hba.num_phys) { ioc 4191 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_block_io_to_children_attached_directly(ioc, event_data); ioc 4197 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_node_lock, flags); ioc 4198 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_expander = mpt3sas_scsih_expander_find_by_handle(ioc, ioc 4200 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_block_io_to_children_attached_to_ex(ioc, sas_expander); ioc 4201 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_node_lock, flags); ioc 4203 drivers/scsi/mpt3sas/mpt3sas_scsih.c handle = find_first_bit(ioc->blocking_handles, ioc 4204 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->facts.MaxDevHandle); ioc 4205 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (handle < ioc->facts.MaxDevHandle) ioc 4206 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_block_io_device(ioc, handle); ioc 4207 drivers/scsi/mpt3sas/mpt3sas_scsih.c } while (test_and_clear_bit(handle, ioc->blocking_handles)); ioc 4209 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_block_io_to_children_attached_directly(ioc, event_data); ioc 4215 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->fw_event_lock, flags); ioc 4216 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_for_each_entry(fw_event, &ioc->fw_event_list, list) { ioc 4228 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 4229 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "setting ignoring flag\n")); ioc 4234 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->fw_event_lock, flags); ioc 4249 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_check_pcie_topo_remove_events(struct MPT3SAS_ADAPTER *ioc, ioc 4265 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_tm_tr_send(ioc, handle); ioc 4271 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc, event_data); ioc 4280 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc, event_data); ioc 4286 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->fw_event_lock, flags); ioc 4287 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_for_each_entry(fw_event, &ioc->fw_event_list, list) { ioc 4300 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 4301 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "setting ignoring flag for switch event\n")); ioc 4306 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->fw_event_lock, flags); ioc 4317 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_set_volume_delete_flag(struct MPT3SAS_ADAPTER *ioc, u16 handle) ioc 4323 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->raid_device_lock, flags); ioc 4324 drivers/scsi/mpt3sas/mpt3sas_scsih.c raid_device = mpt3sas_raid_device_find_by_handle(ioc, handle); ioc 4330 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 4331 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "setting delete flag: handle(0x%04x), wwid(0x%016llx)\n", ioc 4334 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->raid_device_lock, flags); ioc 4371 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_check_ir_config_unhide_events(struct MPT3SAS_ADAPTER *ioc, ioc 4382 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->is_warpdrive) ioc 4396 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_set_volume_delete_flag(ioc, volume_handle); ioc 4414 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_tm_tr_volume_send(ioc, a); ioc 4416 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_tm_tr_volume_send(ioc, b); ioc 4425 drivers/scsi/mpt3sas/mpt3sas_scsih.c clear_bit(handle, ioc->pd_handles); ioc 4427 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_tm_tr_send(ioc, handle); ioc 4433 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_add_tail(&delayed_tr->list, &ioc->delayed_tr_list); ioc 4434 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 4435 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "DELAYED:tr:handle(0x%04x), (open)\n", ioc 4438 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_tm_tr_send(ioc, handle); ioc 4454 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_check_volume_delete_events(struct MPT3SAS_ADAPTER *ioc, ioc 4464 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_set_volume_delete_flag(ioc, ioc 4475 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_temp_threshold_events(struct MPT3SAS_ADAPTER *ioc, ioc 4478 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->temp_sensors_count >= event_data->SensorNum) { ioc 4479 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "Temperature Threshold flags %s%s%s%s exceeded for Sensor: %d !!!\n", ioc 4485 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "Current Temp In Celsius: %d\n", ioc 4512 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_flush_running_cmds(struct MPT3SAS_ADAPTER *ioc) ioc 4519 drivers/scsi/mpt3sas/mpt3sas_scsih.c for (smid = 1; smid <= ioc->scsiio_depth; smid++) { ioc 4520 drivers/scsi/mpt3sas/mpt3sas_scsih.c scmd = mpt3sas_scsih_scsi_lookup_get(ioc, smid); ioc 4526 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_base_clear_st(ioc, st); ioc 4528 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->pci_error_recovery || ioc->remove_host) ioc 4534 drivers/scsi/mpt3sas/mpt3sas_scsih.c dtmprintk(ioc, ioc_info(ioc, "completing %d cmds\n", count)); ioc 4546 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_setup_eedp(struct MPT3SAS_ADAPTER *ioc, struct scsi_cmnd *scmd, ioc 4593 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->is_gen35_ioc) ioc 4642 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 4654 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->logging_level & MPT_DEBUG_SCSI) ioc 4664 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!(_scsih_allow_scmd_to_device(ioc, scmd))) { ioc 4681 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->shost_recovery || ioc->ioc_link_reset_in_progress) { ioc 4723 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (((!ioc->is_warpdrive && !scsih_is_raid(&scmd->device->sdev_gendev)) ioc 4728 drivers/scsi/mpt3sas/mpt3sas_scsih.c smid = mpt3sas_base_get_smid_scsiio(ioc, ioc->scsi_io_cb_idx, scmd); ioc 4730 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); ioc 4734 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpi_request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 4735 drivers/scsi/mpt3sas/mpt3sas_scsih.c memset(mpi_request, 0, ioc->request_sz); ioc 4736 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_setup_eedp(ioc, scmd, mpi_request); ioc 4753 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_base_get_sense_buffer_dma(ioc, smid); ioc 4761 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->build_sg_scmd(ioc, scmd, smid, pcie_device)) { ioc 4762 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_base_free_smid(ioc, smid); ioc 4767 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->build_zero_len_sge(ioc, &mpi_request->SGL); ioc 4771 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_setup_direct_io(ioc, scmd, ioc 4778 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->put_smid_fast_path(ioc, smid, handle); ioc 4780 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->put_smid_scsi_io(ioc, smid, ioc 4783 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->put_smid_default(ioc, smid); ioc 4823 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_scsi_ioc_info(struct MPT3SAS_ADAPTER *ioc, struct scsi_cmnd *scmd, ioc 4834 drivers/scsi/mpt3sas/mpt3sas_scsih.c char *desc_scsi_state = ioc->tmp_string; ioc 4844 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->hide_ir_msg) ioc 4968 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_warn(ioc, "\t%s wwid(0x%016llx)\n", ioc 4971 drivers/scsi/mpt3sas/mpt3sas_scsih.c pcie_device = mpt3sas_get_pdev_from_target(ioc, priv_target); ioc 4973 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "\twwid(0x%016llx), port(%d)\n", ioc 4976 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "\tenclosure logical id(0x%016llx), slot(%d)\n", ioc 4980 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "\tenclosure level(0x%04x), connector name( %s)\n", ioc 4986 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_device = mpt3sas_get_sdev_from_target(ioc, priv_target); ioc 4988 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_warn(ioc, "\tsas_address(0x%016llx), phy(%d)\n", ioc 4991 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_display_enclosure_chassis_info(ioc, sas_device, ioc 4998 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_warn(ioc, "\thandle(0x%04x), ioc_status(%s)(0x%04x), smid(%d)\n", ioc 5001 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_warn(ioc, "\trequest_len(%d), underflow(%d), resid(%d)\n", ioc 5003 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_warn(ioc, "\ttag(%d), transfer_count(%d), sc->result(0x%08x)\n", ioc 5006 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_warn(ioc, "\tscsi_status(%s)(0x%02x), scsi_state(%s)(0x%02x)\n", ioc 5012 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_warn(ioc, "\t[sense_key,asc,ascq]: [0x%02x,0x%02x,0x%02x], count(%d)\n", ioc 5019 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_response_code(ioc, response_bytes[0]); ioc 5030 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_turn_on_pfa_led(struct MPT3SAS_ADAPTER *ioc, u16 handle) ioc 5036 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_device = mpt3sas_get_sdev_by_handle(ioc, handle); ioc 5047 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((mpt3sas_base_scsi_enclosure_processor(ioc, &mpi_reply, ioc 5049 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 5056 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 5057 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "enclosure_processor: ioc_status (0x%04x), loginfo(0x%08x)\n", ioc 5073 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_turn_off_pfa_led(struct MPT3SAS_ADAPTER *ioc, ioc 5087 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((mpt3sas_base_scsi_enclosure_processor(ioc, &mpi_reply, ioc 5089 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 5095 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 5096 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "enclosure_processor: ioc_status (0x%04x), loginfo(0x%08x)\n", ioc 5110 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_send_event_to_turn_on_pfa_led(struct MPT3SAS_ADAPTER *ioc, u16 handle) ioc 5119 drivers/scsi/mpt3sas/mpt3sas_scsih.c fw_event->ioc = ioc; ioc 5120 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_fw_event_add(ioc, fw_event); ioc 5131 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_smart_predicted_fault(struct MPT3SAS_ADAPTER *ioc, u16 handle) ioc 5142 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_device_lock, flags); ioc 5143 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_device = __mpt3sas_get_sdev_by_handle(ioc, handle); ioc 5156 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 5158 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->pdev->subsystem_vendor == PCI_VENDOR_ID_IBM) ioc 5159 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_send_event_to_turn_on_pfa_led(ioc, handle); ioc 5166 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 5183 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_ctl_add_to_event_log(ioc, event_reply); ioc 5191 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 5208 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_io_done(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index, u32 reply) ioc 5222 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpi_reply = mpt3sas_base_get_reply_virt_addr(ioc, reply); ioc 5224 drivers/scsi/mpt3sas/mpt3sas_scsih.c scmd = mpt3sas_scsih_scsi_lookup_get(ioc, smid); ioc 5230 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpi_request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 5258 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->put_smid_scsi_io(ioc, smid, ioc 5269 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((!ioc->is_warpdrive && ioc 5297 drivers/scsi/mpt3sas/mpt3sas_scsih.c const void *sense_data = mpt3sas_base_get_sense_buffer(ioc, ioc 5305 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_smart_predicted_fault(ioc, ioc 5307 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_trigger_scsi(ioc, data.skey, data.asc, data.ascq); ioc 5309 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((ioc->logging_level & MPT_DEBUG_REPLY) && ioc 5313 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_scsi_ioc_info(ioc, scmd, mpi_reply, smid); ioc 5427 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (scmd->result && (ioc->logging_level & MPT_DEBUG_REPLY)) ioc 5428 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_scsi_ioc_info(ioc , scmd, mpi_reply, smid); ioc 5433 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_base_free_smid(ioc, smid); ioc 5448 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_host_refresh(struct MPT3SAS_ADAPTER *ioc) ioc 5458 drivers/scsi/mpt3sas/mpt3sas_scsih.c dtmprintk(ioc, ioc 5459 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "updating handles for sas_host(0x%016llx)\n", ioc 5460 drivers/scsi/mpt3sas/mpt3sas_scsih.c (u64)ioc->sas_hba.sas_address)); ioc 5462 drivers/scsi/mpt3sas/mpt3sas_scsih.c sz = offsetof(Mpi2SasIOUnitPage0_t, PhyData) + (ioc->sas_hba.num_phys ioc 5466 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 5471 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((mpt3sas_config_get_sas_iounit_pg0(ioc, &mpi_reply, ioc 5477 drivers/scsi/mpt3sas/mpt3sas_scsih.c for (i = 0; i < ioc->sas_hba.num_phys ; i++) { ioc 5480 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->sas_hba.handle = le16_to_cpu(sas_iounit_pg0-> ioc 5482 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->sas_hba.phy[i].handle = ioc->sas_hba.handle; ioc 5487 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_transport_update_links(ioc, ioc->sas_hba.sas_address, ioc 5501 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_host_add(struct MPT3SAS_ADAPTER *ioc) ioc 5515 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_config_get_number_hba_phys(ioc, &num_phys); ioc 5517 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 5521 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->sas_hba.phy = kcalloc(num_phys, ioc 5523 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->sas_hba.phy) { ioc 5524 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 5528 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->sas_hba.num_phys = num_phys; ioc 5531 drivers/scsi/mpt3sas/mpt3sas_scsih.c sz = offsetof(Mpi2SasIOUnitPage0_t, PhyData) + (ioc->sas_hba.num_phys * ioc 5535 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 5539 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((mpt3sas_config_get_sas_iounit_pg0(ioc, &mpi_reply, ioc 5541 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 5548 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 5554 drivers/scsi/mpt3sas/mpt3sas_scsih.c sz = offsetof(Mpi2SasIOUnitPage1_t, PhyData) + (ioc->sas_hba.num_phys * ioc 5558 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 5562 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((mpt3sas_config_get_sas_iounit_pg1(ioc, &mpi_reply, ioc 5564 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 5571 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 5576 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->io_missing_delay = ioc 5581 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->device_missing_delay = (device_missing_delay & ioc 5584 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->device_missing_delay = device_missing_delay & ioc 5587 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->sas_hba.parent_dev = &ioc->shost->shost_gendev; ioc 5588 drivers/scsi/mpt3sas/mpt3sas_scsih.c for (i = 0; i < ioc->sas_hba.num_phys ; i++) { ioc 5589 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((mpt3sas_config_get_phy_pg0(ioc, &mpi_reply, &phy_pg0, ioc 5591 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 5598 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 5604 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->sas_hba.handle = le16_to_cpu(sas_iounit_pg0-> ioc 5606 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->sas_hba.phy[i].handle = ioc->sas_hba.handle; ioc 5607 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->sas_hba.phy[i].phy_id = i; ioc 5608 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_transport_add_host_phy(ioc, &ioc->sas_hba.phy[i], ioc 5609 drivers/scsi/mpt3sas/mpt3sas_scsih.c phy_pg0, ioc->sas_hba.parent_dev); ioc 5611 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((mpt3sas_config_get_sas_device_pg0(ioc, &mpi_reply, &sas_device_pg0, ioc 5612 drivers/scsi/mpt3sas/mpt3sas_scsih.c MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, ioc->sas_hba.handle))) { ioc 5613 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 5617 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->sas_hba.enclosure_handle = ioc 5619 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->sas_hba.sas_address = le64_to_cpu(sas_device_pg0.SASAddress); ioc 5620 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "host_add: handle(0x%04x), sas_addr(0x%016llx), phys(%d)\n", ioc 5621 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->sas_hba.handle, ioc 5622 drivers/scsi/mpt3sas/mpt3sas_scsih.c (u64)ioc->sas_hba.sas_address, ioc 5623 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->sas_hba.num_phys); ioc 5625 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->sas_hba.enclosure_handle) { ioc 5626 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!(mpt3sas_config_get_enclosure_pg0(ioc, &mpi_reply, ioc 5628 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->sas_hba.enclosure_handle))) ioc 5629 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->sas_hba.enclosure_logical_id = ioc 5648 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_expander_add(struct MPT3SAS_ADAPTER *ioc, u16 handle) ioc 5667 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->shost_recovery || ioc->pci_error_recovery) ioc 5670 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((mpt3sas_config_get_expander_pg0(ioc, &mpi_reply, &expander_pg0, ioc 5672 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 5680 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 5687 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (_scsih_get_sas_address(ioc, parent_handle, &sas_address_parent) ioc 5689 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 5693 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (sas_address_parent != ioc->sas_hba.sas_address) { ioc 5694 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_node_lock, flags); ioc 5695 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_expander = mpt3sas_scsih_expander_find_by_sas_address(ioc, ioc 5697 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_node_lock, flags); ioc 5699 drivers/scsi/mpt3sas/mpt3sas_scsih.c rc = _scsih_expander_add(ioc, parent_handle); ioc 5705 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_node_lock, flags); ioc 5707 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_expander = mpt3sas_scsih_expander_find_by_sas_address(ioc, ioc 5709 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_node_lock, flags); ioc 5717 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 5727 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "expander_add: handle(0x%04x), parent(0x%04x), sas_addr(0x%016llx), phys(%d)\n", ioc 5736 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 5743 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_port = mpt3sas_transport_port_add(ioc, handle, ioc 5746 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 5754 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((mpt3sas_config_get_expander_pg1(ioc, &mpi_reply, ioc 5756 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 5764 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((mpt3sas_transport_add_expander_phy(ioc, ioc 5767 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 5776 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_scsih_enclosure_find_by_handle(ioc, ioc 5783 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_expander_node_add(ioc, sas_expander); ioc 5789 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_transport_port_remove(ioc, sas_expander->sas_address, ioc 5801 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_expander_remove(struct MPT3SAS_ADAPTER *ioc, u64 sas_address) ioc 5806 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->shost_recovery) ioc 5809 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_node_lock, flags); ioc 5810 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_expander = mpt3sas_scsih_expander_find_by_sas_address(ioc, ioc 5812 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_node_lock, flags); ioc 5814 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_expander_node_remove(ioc, sas_expander); ioc 5831 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_done(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index, u32 reply) ioc 5835 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpi_reply = mpt3sas_base_get_reply_virt_addr(ioc, reply); ioc 5836 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->scsih_cmds.status == MPT3_CMD_NOT_USED) ioc 5838 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->scsih_cmds.smid != smid) ioc 5840 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->scsih_cmds.status |= MPT3_CMD_COMPLETE; ioc 5842 drivers/scsi/mpt3sas/mpt3sas_scsih.c memcpy(ioc->scsih_cmds.reply, mpi_reply, ioc 5844 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->scsih_cmds.status |= MPT3_CMD_REPLY_VALID; ioc 5846 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->scsih_cmds.status &= ~MPT3_CMD_PENDING; ioc 5847 drivers/scsi/mpt3sas/mpt3sas_scsih.c complete(&ioc->scsih_cmds.done); ioc 5867 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_check_access_status(struct MPT3SAS_ADAPTER *ioc, u64 sas_address, ioc 5915 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "discovery errors(%s): sas_address(0x%016llx), handle(0x%04x)\n", ioc 5929 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_check_device(struct MPT3SAS_ADAPTER *ioc, ioc 5943 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((mpt3sas_config_get_sas_device_pg0(ioc, &mpi_reply, &sas_device_pg0, ioc 5962 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_device_lock, flags); ioc 5964 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_device = __mpt3sas_get_sdev_by_addr(ioc, ioc 5993 drivers/scsi/mpt3sas/mpt3sas_scsih.c enclosure_dev = mpt3sas_scsih_enclosure_find_by_handle(ioc, ioc 6010 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "device is not present handle(0x%04x), flags!!!\n", ioc 6016 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (_scsih_check_access_status(ioc, sas_address, handle, ioc 6020 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 6021 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_ublock_io_device(ioc, sas_address); ioc 6028 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 6045 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_add_device(struct MPT3SAS_ADAPTER *ioc, u16 handle, u8 phy_num, ioc 6056 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((mpt3sas_config_get_sas_device_pg0(ioc, &mpi_reply, &sas_device_pg0, ioc 6058 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 6066 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 6075 drivers/scsi/mpt3sas/mpt3sas_scsih.c set_bit(handle, ioc->pend_os_device_add); ioc 6081 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "device is not present handle(0x04%x)!!!\n", ioc 6087 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (_scsih_check_access_status(ioc, sas_address, handle, ioc 6091 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_device = mpt3sas_get_sdev_by_addr(ioc, ioc 6094 drivers/scsi/mpt3sas/mpt3sas_scsih.c clear_bit(handle, ioc->pend_os_device_add); ioc 6101 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_scsih_enclosure_find_by_handle(ioc, ioc 6104 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "Enclosure handle(0x%04x) doesn't match with enclosure device!\n", ioc 6111 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 6118 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (_scsih_get_sas_address(ioc, ioc 6121 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 6161 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->wait_for_discovery_to_complete) ioc 6162 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_device_init_add(ioc, sas_device); ioc 6164 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_device_add(ioc, sas_device); ioc 6176 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_remove_device(struct MPT3SAS_ADAPTER *ioc, ioc 6181 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((ioc->pdev->subsystem_vendor == PCI_VENDOR_ID_IBM) && ioc 6183 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_turn_off_pfa_led(ioc, sas_device); ioc 6187 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 6188 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: enter: handle(0x%04x), sas_addr(0x%016llx)\n", ioc 6192 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, _scsih_display_enclosure_chassis_info(ioc, sas_device, ioc 6198 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_ublock_io_device(ioc, sas_device->sas_address); ioc 6203 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->hide_drives) ioc 6204 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_transport_port_remove(ioc, ioc 6208 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "removing handle(0x%04x), sas_addr(0x%016llx)\n", ioc 6211 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_display_enclosure_chassis_info(ioc, sas_device, NULL, NULL); ioc 6213 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 6214 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: exit: handle(0x%04x), sas_addr(0x%016llx)\n", ioc 6217 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, _scsih_display_enclosure_chassis_info(ioc, sas_device, ioc 6228 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_topology_change_event_debug(struct MPT3SAS_ADAPTER *ioc, ioc 6256 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "sas topology change: (%s)\n", status_str); ioc 6306 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_topology_change_event(struct MPT3SAS_ADAPTER *ioc, ioc 6321 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->logging_level & MPT_DEBUG_EVENT_WORK_TASK) ioc 6322 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_topology_change_event_debug(ioc, event_data); ioc 6324 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->shost_recovery || ioc->remove_host || ioc->pci_error_recovery) ioc 6327 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->sas_hba.num_phys) ioc 6328 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_host_add(ioc); ioc 6330 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_host_refresh(ioc); ioc 6333 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc_info(ioc, "ignoring expander event\n")); ioc 6341 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (_scsih_expander_add(ioc, parent_handle) != 0) ioc 6344 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_node_lock, flags); ioc 6345 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_expander = mpt3sas_scsih_expander_find_by_handle(ioc, ioc 6350 drivers/scsi/mpt3sas/mpt3sas_scsih.c } else if (parent_handle < ioc->sas_hba.num_phys) { ioc 6351 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_address = ioc->sas_hba.sas_address; ioc 6352 drivers/scsi/mpt3sas/mpt3sas_scsih.c max_phys = ioc->sas_hba.num_phys; ioc 6354 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_node_lock, flags); ioc 6357 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_node_lock, flags); ioc 6362 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 6363 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "ignoring expander event\n")); ioc 6366 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->remove_host || ioc->pci_error_recovery) ioc 6385 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->shost_recovery) ioc 6391 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_transport_update_links(ioc, sas_address, ioc 6397 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_check_device(ioc, sas_address, handle, ioc 6400 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!test_bit(handle, ioc->pend_os_device_add)) ioc 6407 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->shost_recovery) ioc 6410 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_transport_update_links(ioc, sas_address, ioc 6413 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_add_device(ioc, handle, phy_number, 0); ioc 6418 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_device_remove_by_handle(ioc, handle); ioc 6426 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_expander_remove(ioc, sas_address); ioc 6438 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_device_status_change_event_debug(struct MPT3SAS_ADAPTER *ioc, ioc 6487 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "device status change: (%s)\thandle(0x%04x), sas address(0x%016llx), tag(%d)", ioc 6504 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_device_status_change_event(struct MPT3SAS_ADAPTER *ioc, ioc 6515 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((ioc->facts.HeaderVersion >> 8) < 0xC) ioc 6524 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_device_lock, flags); ioc 6526 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_device = __mpt3sas_get_sdev_by_addr(ioc, ioc 6542 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->logging_level & MPT_DEBUG_EVENT_WORK_TASK) ioc 6543 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, ioc 6552 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 6566 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_check_pcie_access_status(struct MPT3SAS_ADAPTER *ioc, u64 wwid, ioc 6582 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, ioc 6631 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "NVMe discovery error(0x%02x): wwid(0x%016llx), handle(0x%04x)\n", ioc 6639 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "NVMe discovery error(%s): wwid(0x%016llx), handle(0x%04x)\n", ioc 6651 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_pcie_device_remove_from_sml(struct MPT3SAS_ADAPTER *ioc, ioc 6656 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 6657 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: enter: handle(0x%04x), wwid(0x%016llx)\n", ioc 6661 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 6662 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: enter: enclosure logical id(0x%016llx), slot(%d)\n", ioc 6667 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 6668 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: enter: enclosure level(0x%04x), connector name(%s)\n", ioc 6676 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_ublock_io_device(ioc, pcie_device->wwid); ioc 6680 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "removing handle(0x%04x), wwid(0x%016llx)\n", ioc 6683 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "removing : enclosure logical id(0x%016llx), slot(%d)\n", ioc 6687 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "removing: enclosure level(0x%04x), connector name( %s)\n", ioc 6694 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 6695 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: exit: handle(0x%04x), wwid(0x%016llx)\n", ioc 6699 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 6700 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: exit: enclosure logical id(0x%016llx), slot(%d)\n", ioc 6705 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 6706 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: exit: enclosure level(0x%04x), connector name( %s)\n", ioc 6721 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_pcie_check_device(struct MPT3SAS_ADAPTER *ioc, u16 handle) ioc 6733 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((mpt3sas_config_get_pcie_device_pg0(ioc, &mpi_reply, ioc 6747 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->pcie_device_lock, flags); ioc 6748 drivers/scsi/mpt3sas/mpt3sas_scsih.c pcie_device = __mpt3sas_get_pdev_by_wwid(ioc, wwid); ioc 6751 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); ioc 6780 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "device is not present handle(0x%04x), flags!!!\n", ioc 6782 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); ioc 6788 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (_scsih_check_pcie_access_status(ioc, wwid, handle, ioc 6790 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); ioc 6795 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); ioc 6798 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_ublock_io_device(ioc, wwid); ioc 6813 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_pcie_add_device(struct MPT3SAS_ADAPTER *ioc, u16 handle) ioc 6823 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((mpt3sas_config_get_pcie_device_pg0(ioc, &mpi_reply, ioc 6825 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 6832 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 6837 drivers/scsi/mpt3sas/mpt3sas_scsih.c set_bit(handle, ioc->pend_os_device_add); ioc 6843 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "device is not present handle(0x04%x)!!!\n", ioc 6849 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (_scsih_check_pcie_access_status(ioc, wwid, handle, ioc 6857 drivers/scsi/mpt3sas/mpt3sas_scsih.c pcie_device = mpt3sas_get_pdev_by_wwid(ioc, wwid); ioc 6859 drivers/scsi/mpt3sas/mpt3sas_scsih.c clear_bit(handle, ioc->pend_os_device_add); ioc 6870 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (mpt3sas_config_get_pcie_device_pg2(ioc, &mpi_reply, ioc 6873 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, ioc 6882 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, ioc 6891 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 6897 drivers/scsi/mpt3sas/mpt3sas_scsih.c pcie_device->id = ioc->pcie_target_id++; ioc 6925 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_scsih_enclosure_find_by_handle(ioc, ioc 6944 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->wait_for_discovery_to_complete) ioc 6945 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_pcie_device_init_add(ioc, pcie_device); ioc 6947 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_pcie_device_add(ioc, pcie_device); ioc 6961 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_pcie_topology_change_event_debug(struct MPT3SAS_ADAPTER *ioc, ioc 6989 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "pcie topology change: (%s)\n", status_str); ioc 7041 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_pcie_topology_change_event(struct MPT3SAS_ADAPTER *ioc, ioc 7054 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->logging_level & MPT_DEBUG_EVENT_WORK_TASK) ioc 7055 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_pcie_topology_change_event_debug(ioc, event_data); ioc 7057 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->shost_recovery || ioc->remove_host || ioc 7058 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->pci_error_recovery) ioc 7062 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc_info(ioc, "ignoring switch event\n")); ioc 7069 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 7070 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "ignoring switch event\n")); ioc 7073 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->remove_host || ioc->pci_error_recovery) ioc 7088 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->shost_recovery) ioc 7095 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_pcie_check_device(ioc, handle); ioc 7103 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->pcie_device_lock, flags); ioc 7104 drivers/scsi/mpt3sas/mpt3sas_scsih.c pcie_device = __mpt3sas_get_pdev_by_handle(ioc, handle); ioc 7105 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); ioc 7112 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!test_bit(handle, ioc->pend_os_device_add)) ioc 7115 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 7116 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "handle(0x%04x) device not found: convert event to a device add\n", ioc 7123 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->shost_recovery) ioc 7128 drivers/scsi/mpt3sas/mpt3sas_scsih.c rc = _scsih_pcie_add_device(ioc, handle); ioc 7140 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_pcie_device_remove_by_handle(ioc, handle); ioc 7153 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_pcie_device_status_change_event_debug(struct MPT3SAS_ADAPTER *ioc, ioc 7200 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "PCIE device status change: (%s)\n" ioc 7219 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_pcie_device_status_change_event(struct MPT3SAS_ADAPTER *ioc, ioc 7228 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->logging_level & MPT_DEBUG_EVENT_WORK_TASK) ioc 7229 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_pcie_device_status_change_event_debug(ioc, ioc 7238 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->pcie_device_lock, flags); ioc 7240 drivers/scsi/mpt3sas/mpt3sas_scsih.c pcie_device = __mpt3sas_get_pdev_by_wwid(ioc, wwid); ioc 7258 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); ioc 7269 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_enclosure_dev_status_change_event_debug(struct MPT3SAS_ADAPTER *ioc, ioc 7286 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "enclosure status change: (%s)\n" ioc 7301 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_enclosure_dev_status_change_event(struct MPT3SAS_ADAPTER *ioc, ioc 7311 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->logging_level & MPT_DEBUG_EVENT_WORK_TASK) ioc 7312 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_enclosure_dev_status_change_event_debug(ioc, ioc 7315 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->shost_recovery) ioc 7320 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_scsih_enclosure_find_by_handle(ioc, ioc 7329 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "failure at %s:%d/%s()!\n", ioc 7333 drivers/scsi/mpt3sas/mpt3sas_scsih.c rc = mpt3sas_config_get_enclosure_pg0(ioc, &mpi_reply, ioc 7345 drivers/scsi/mpt3sas/mpt3sas_scsih.c &ioc->enclosure_list); ioc 7366 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_broadcast_primitive_event(struct MPT3SAS_ADAPTER *ioc, ioc 7387 drivers/scsi/mpt3sas/mpt3sas_scsih.c mutex_lock(&ioc->tm_cmds.mutex); ioc 7388 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: enter: phy number(%d), width(%d)\n", ioc 7391 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_block_io_all_device(ioc); ioc 7393 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); ioc 7394 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpi_reply = ioc->tm_cmds.reply; ioc 7399 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc_info(ioc, "%s: giving up\n", __func__)); ioc 7402 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 7403 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: %d retry\n", ioc 7408 drivers/scsi/mpt3sas/mpt3sas_scsih.c for (smid = 1; smid <= ioc->scsiio_depth; smid++) { ioc 7409 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->shost_recovery) ioc 7411 drivers/scsi/mpt3sas/mpt3sas_scsih.c scmd = mpt3sas_scsih_scsi_lookup_get(ioc, smid); ioc 7436 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->shost_recovery) ioc 7439 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags); ioc 7440 drivers/scsi/mpt3sas/mpt3sas_scsih.c r = mpt3sas_scsih_issue_tm(ioc, handle, lun, ioc 7447 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); ioc 7456 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); ioc 7465 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); ioc 7471 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 7472 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: ABORT_TASK: giving up\n", ioc 7474 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); ioc 7478 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->shost_recovery) ioc 7481 drivers/scsi/mpt3sas/mpt3sas_scsih.c r = mpt3sas_scsih_issue_tm(ioc, handle, sdev->lun, ioc 7498 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); ioc 7501 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->broadcast_aen_pending) { ioc 7502 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 7503 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, ioc 7506 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->broadcast_aen_pending = 0; ioc 7511 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags); ioc 7514 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 7515 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s - exit, query_count = %d termination_count = %d\n", ioc 7518 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->broadcast_aen_busy = 0; ioc 7519 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->shost_recovery) ioc 7520 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_ublock_io_all_device(ioc); ioc 7521 drivers/scsi/mpt3sas/mpt3sas_scsih.c mutex_unlock(&ioc->tm_cmds.mutex); ioc 7531 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_discovery_event(struct MPT3SAS_ADAPTER *ioc, ioc 7537 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->logging_level & MPT_DEBUG_EVENT_WORK_TASK) { ioc 7538 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "discovery event: (%s)", ioc 7548 drivers/scsi/mpt3sas/mpt3sas_scsih.c !ioc->sas_hba.num_phys) { ioc 7549 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (disable_discovery > 0 && ioc->shost_recovery) { ioc 7551 drivers/scsi/mpt3sas/mpt3sas_scsih.c while (ioc->shost_recovery) ioc 7554 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_host_add(ioc); ioc 7566 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_device_discovery_error_event(struct MPT3SAS_ADAPTER *ioc, ioc 7574 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_warn(ioc, "SMP command sent to the expander (handle:0x%04x, sas_address:0x%016llx, physical_port:0x%02x) has failed\n", ioc 7580 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_warn(ioc, "SMP command sent to the expander (handle:0x%04x, sas_address:0x%016llx, physical_port:0x%02x) has timed out\n", ioc 7597 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_pcie_enumeration_event(struct MPT3SAS_ADAPTER *ioc, ioc 7603 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!(ioc->logging_level & MPT_DEBUG_EVENT_WORK_TASK)) ioc 7606 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "pcie enumeration event: (%s) Flag 0x%02x", ioc 7625 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_ir_fastpath(struct MPT3SAS_ADAPTER *ioc, u16 handle, u8 phys_disk_num) ioc 7635 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->hba_mpi_version_belonged == MPI2_VERSION) ioc 7638 drivers/scsi/mpt3sas/mpt3sas_scsih.c mutex_lock(&ioc->scsih_cmds.mutex); ioc 7640 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->scsih_cmds.status != MPT3_CMD_NOT_USED) { ioc 7641 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "%s: scsih_cmd in use\n", __func__); ioc 7645 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->scsih_cmds.status = MPT3_CMD_PENDING; ioc 7647 drivers/scsi/mpt3sas/mpt3sas_scsih.c smid = mpt3sas_base_get_smid(ioc, ioc->scsih_cb_idx); ioc 7649 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); ioc 7650 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->scsih_cmds.status = MPT3_CMD_NOT_USED; ioc 7655 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpi_request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 7656 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->scsih_cmds.smid = smid; ioc 7663 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 7664 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "IR RAID_ACTION: turning fast path on for handle(0x%04x), phys_disk_num (0x%02x)\n", ioc 7667 drivers/scsi/mpt3sas/mpt3sas_scsih.c init_completion(&ioc->scsih_cmds.done); ioc 7668 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->put_smid_default(ioc, smid); ioc 7669 drivers/scsi/mpt3sas/mpt3sas_scsih.c wait_for_completion_timeout(&ioc->scsih_cmds.done, 10*HZ); ioc 7671 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!(ioc->scsih_cmds.status & MPT3_CMD_COMPLETE)) { ioc 7673 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_base_check_cmd_timeout(ioc, ioc 7674 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->scsih_cmds.status, mpi_request, ioc 7680 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->scsih_cmds.status & MPT3_CMD_REPLY_VALID) { ioc 7682 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpi_reply = ioc->scsih_cmds.reply; ioc 7690 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 7691 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "IR RAID_ACTION: failed: ioc_status(0x%04x), loginfo(0x%08x)!!!\n", ioc 7695 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 7696 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "IR RAID_ACTION: completed successfully\n")); ioc 7700 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->scsih_cmds.status = MPT3_CMD_NOT_USED; ioc 7701 drivers/scsi/mpt3sas/mpt3sas_scsih.c mutex_unlock(&ioc->scsih_cmds.mutex); ioc 7704 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER); ioc 7730 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_volume_add(struct MPT3SAS_ADAPTER *ioc, ioc 7739 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_config_get_volume_wwid(ioc, handle, &wwid); ioc 7741 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 7746 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->raid_device_lock, flags); ioc 7747 drivers/scsi/mpt3sas/mpt3sas_scsih.c raid_device = _scsih_raid_device_find_by_wwid(ioc, wwid); ioc 7748 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->raid_device_lock, flags); ioc 7755 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 7760 drivers/scsi/mpt3sas/mpt3sas_scsih.c raid_device->id = ioc->sas_id++; ioc 7764 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_raid_device_add(ioc, raid_device); ioc 7765 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->wait_for_discovery_to_complete) { ioc 7766 drivers/scsi/mpt3sas/mpt3sas_scsih.c rc = scsi_add_device(ioc->shost, RAID_CHANNEL, ioc 7769 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_raid_device_remove(ioc, raid_device); ioc 7771 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->raid_device_lock, flags); ioc 7772 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_determine_boot_device(ioc, raid_device, 1); ioc 7773 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->raid_device_lock, flags); ioc 7784 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_volume_delete(struct MPT3SAS_ADAPTER *ioc, u16 handle) ioc 7791 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->raid_device_lock, flags); ioc 7792 drivers/scsi/mpt3sas/mpt3sas_scsih.c raid_device = mpt3sas_raid_device_find_by_handle(ioc, handle); ioc 7799 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "removing handle(0x%04x), wwid(0x%016llx)\n", ioc 7804 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->raid_device_lock, flags); ioc 7816 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_pd_expose(struct MPT3SAS_ADAPTER *ioc, ioc 7825 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_device_lock, flags); ioc 7826 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_device = __mpt3sas_get_sdev_by_handle(ioc, handle); ioc 7830 drivers/scsi/mpt3sas/mpt3sas_scsih.c clear_bit(handle, ioc->pd_handles); ioc 7838 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 7856 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_pd_hide(struct MPT3SAS_ADAPTER *ioc, ioc 7867 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_config_get_volume_handle(ioc, handle, &volume_handle); ioc 7869 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_config_get_volume_wwid(ioc, volume_handle, ioc 7872 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_device_lock, flags); ioc 7873 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_device = __mpt3sas_get_sdev_by_handle(ioc, handle); ioc 7875 drivers/scsi/mpt3sas/mpt3sas_scsih.c set_bit(handle, ioc->pd_handles); ioc 7885 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 7890 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_ir_fastpath(ioc, handle, element->PhysDiskNum); ioc 7905 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_pd_delete(struct MPT3SAS_ADAPTER *ioc, ioc 7910 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_device_remove_by_handle(ioc, handle); ioc 7920 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_pd_add(struct MPT3SAS_ADAPTER *ioc, ioc 7931 drivers/scsi/mpt3sas/mpt3sas_scsih.c set_bit(handle, ioc->pd_handles); ioc 7933 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_device = mpt3sas_get_sdev_by_handle(ioc, handle); ioc 7935 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_ir_fastpath(ioc, handle, element->PhysDiskNum); ioc 7940 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((mpt3sas_config_get_sas_device_pg0(ioc, &mpi_reply, &sas_device_pg0, ioc 7942 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 7950 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 7956 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!_scsih_get_sas_address(ioc, parent_handle, &sas_address)) ioc 7957 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_transport_update_links(ioc, sas_address, handle, ioc 7960 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_ir_fastpath(ioc, handle, element->PhysDiskNum); ioc 7961 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_add_device(ioc, handle, 0, 1); ioc 7971 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_ir_config_change_event_debug(struct MPT3SAS_ADAPTER *ioc, ioc 7981 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "raid config change: (%s), elements(%d)\n", ioc 8049 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_ir_config_change_event(struct MPT3SAS_ADAPTER *ioc, ioc 8059 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((ioc->logging_level & MPT_DEBUG_EVENT_WORK_TASK) && ioc 8060 drivers/scsi/mpt3sas/mpt3sas_scsih.c (!ioc->hide_ir_msg)) ioc 8061 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_ir_config_change_event_debug(ioc, event_data); ioc 8067 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->shost_recovery && ioc 8068 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->hba_mpi_version_belonged != MPI2_VERSION) { ioc 8071 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_ir_fastpath(ioc, ioc 8084 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_volume_add(ioc, element); ioc 8089 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_volume_delete(ioc, ioc 8093 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->is_warpdrive) ioc 8094 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_pd_hide(ioc, element); ioc 8097 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->is_warpdrive) ioc 8098 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_pd_expose(ioc, element); ioc 8101 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->is_warpdrive) ioc 8102 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_pd_add(ioc, element); ioc 8105 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->is_warpdrive) ioc 8106 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_pd_delete(ioc, element); ioc 8119 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_ir_volume_event(struct MPT3SAS_ADAPTER *ioc, ioc 8131 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->shost_recovery) ioc 8139 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->hide_ir_msg) ioc 8140 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 8141 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: handle(0x%04x), old(0x%08x), new(0x%08x)\n", ioc 8148 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_volume_delete(ioc, handle); ioc 8155 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->raid_device_lock, flags); ioc 8156 drivers/scsi/mpt3sas/mpt3sas_scsih.c raid_device = mpt3sas_raid_device_find_by_handle(ioc, handle); ioc 8157 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->raid_device_lock, flags); ioc 8162 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_config_get_volume_wwid(ioc, handle, &wwid); ioc 8164 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 8171 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 8176 drivers/scsi/mpt3sas/mpt3sas_scsih.c raid_device->id = ioc->sas_id++; ioc 8180 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_raid_device_add(ioc, raid_device); ioc 8181 drivers/scsi/mpt3sas/mpt3sas_scsih.c rc = scsi_add_device(ioc->shost, RAID_CHANNEL, ioc 8184 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_raid_device_remove(ioc, raid_device); ioc 8200 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_ir_physical_disk_event(struct MPT3SAS_ADAPTER *ioc, ioc 8213 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->shost_recovery) ioc 8222 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->hide_ir_msg) ioc 8223 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 8224 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "%s: handle(0x%04x), old(0x%08x), new(0x%08x)\n", ioc 8236 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->is_warpdrive) ioc 8237 drivers/scsi/mpt3sas/mpt3sas_scsih.c set_bit(handle, ioc->pd_handles); ioc 8239 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_device = mpt3sas_get_sdev_by_handle(ioc, handle); ioc 8245 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((mpt3sas_config_get_sas_device_pg0(ioc, &mpi_reply, ioc 8248 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 8256 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 8262 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!_scsih_get_sas_address(ioc, parent_handle, &sas_address)) ioc 8263 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_transport_update_links(ioc, sas_address, handle, ioc 8266 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_add_device(ioc, handle, 0, 1); ioc 8285 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_ir_operation_status_event_debug(struct MPT3SAS_ADAPTER *ioc, ioc 8311 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "raid operational status: (%s)\thandle(0x%04x), percent complete(%d)\n", ioc 8324 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_ir_operation_status_event(struct MPT3SAS_ADAPTER *ioc, ioc 8334 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((ioc->logging_level & MPT_DEBUG_EVENT_WORK_TASK) && ioc 8335 drivers/scsi/mpt3sas/mpt3sas_scsih.c (!ioc->hide_ir_msg)) ioc 8336 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_ir_operation_status_event_debug(ioc, ioc 8342 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->raid_device_lock, flags); ioc 8344 drivers/scsi/mpt3sas/mpt3sas_scsih.c raid_device = mpt3sas_raid_device_find_by_handle(ioc, handle); ioc 8348 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->raid_device_lock, flags); ioc 8360 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_prep_device_scan(struct MPT3SAS_ADAPTER *ioc) ioc 8365 drivers/scsi/mpt3sas/mpt3sas_scsih.c shost_for_each_device(sdev, ioc->shost) { ioc 8381 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_mark_responding_sas_device(struct MPT3SAS_ADAPTER *ioc, ioc 8392 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_scsih_enclosure_find_by_handle(ioc, ioc 8395 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "Enclosure handle(0x%04x) doesn't match with enclosure device!\n", ioc 8398 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_device_lock, flags); ioc 8399 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_for_each_entry(sas_device, &ioc->sas_device_list, list) { ioc 8465 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 8474 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_create_enclosure_list_after_reset(struct MPT3SAS_ADAPTER *ioc) ioc 8482 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_free_enclosure_list(ioc); ioc 8490 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 8494 drivers/scsi/mpt3sas/mpt3sas_scsih.c rc = mpt3sas_config_get_enclosure_pg0(ioc, &mpi_reply, ioc 8505 drivers/scsi/mpt3sas/mpt3sas_scsih.c &ioc->enclosure_list); ioc 8519 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_search_responding_sas_devices(struct MPT3SAS_ADAPTER *ioc) ioc 8527 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "search for end-devices: start\n"); ioc 8529 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (list_empty(&ioc->sas_device_list)) ioc 8533 drivers/scsi/mpt3sas/mpt3sas_scsih.c while (!(mpt3sas_config_get_sas_device_pg0(ioc, &mpi_reply, ioc 8544 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_mark_responding_sas_device(ioc, &sas_device_pg0); ioc 8548 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "search for end-devices: complete\n"); ioc 8560 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_mark_responding_pcie_device(struct MPT3SAS_ADAPTER *ioc, ioc 8568 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->pcie_device_lock, flags); ioc 8569 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_for_each_entry(pcie_device, &ioc->pcie_device_list, list) { ioc 8599 drivers/scsi/mpt3sas/mpt3sas_scsih.c (ioc->hba_mpi_version_belonged != MPI2_VERSION)) { ioc 8624 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); ioc 8635 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_search_responding_pcie_devices(struct MPT3SAS_ADAPTER *ioc) ioc 8643 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "search for end-devices: start\n"); ioc 8645 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (list_empty(&ioc->pcie_device_list)) ioc 8649 drivers/scsi/mpt3sas/mpt3sas_scsih.c while (!(mpt3sas_config_get_pcie_device_pg0(ioc, &mpi_reply, ioc 8655 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "\tbreak from %s: ioc_status(0x%04x), loginfo(0x%08x)\n", ioc 8664 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_mark_responding_pcie_device(ioc, &pcie_device_pg0); ioc 8667 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "search for PCIe end-devices: complete\n"); ioc 8680 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_mark_responding_raid_device(struct MPT3SAS_ADAPTER *ioc, u64 wwid, ioc 8688 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->raid_device_lock, flags); ioc 8689 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_for_each_entry(raid_device, &ioc->raid_device_list, list) { ioc 8698 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->raid_device_lock, flags); ioc 8708 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_init_warpdrive_properties(ioc, raid_device); ioc 8709 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->raid_device_lock, flags); ioc 8711 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->raid_device_lock, ioc 8720 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->raid_device_lock, flags); ioc 8724 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->raid_device_lock, flags); ioc 8735 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_search_responding_raid_devices(struct MPT3SAS_ADAPTER *ioc) ioc 8745 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->ir_firmware) ioc 8748 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "search for raid volumes: start\n"); ioc 8750 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (list_empty(&ioc->raid_device_list)) ioc 8754 drivers/scsi/mpt3sas/mpt3sas_scsih.c while (!(mpt3sas_config_get_raid_volume_pg1(ioc, &mpi_reply, ioc 8762 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (mpt3sas_config_get_raid_volume_pg0(ioc, &mpi_reply, ioc 8770 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_mark_responding_raid_device(ioc, ioc 8775 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->is_warpdrive) { ioc 8777 drivers/scsi/mpt3sas/mpt3sas_scsih.c memset(ioc->pd_handles, 0, ioc->pd_handles_sz); ioc 8778 drivers/scsi/mpt3sas/mpt3sas_scsih.c while (!(mpt3sas_config_get_phys_disk_pg0(ioc, &mpi_reply, ioc 8787 drivers/scsi/mpt3sas/mpt3sas_scsih.c set_bit(handle, ioc->pd_handles); ioc 8791 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "search for responding raid volumes: complete\n"); ioc 8803 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_mark_responding_expander(struct MPT3SAS_ADAPTER *ioc, ioc 8816 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_scsih_enclosure_find_by_handle(ioc, ioc 8819 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_node_lock, flags); ioc 8820 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_for_each_entry(sas_expander, &ioc->sas_expander_list, list) { ioc 8844 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_node_lock, flags); ioc 8855 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_search_responding_expanders(struct MPT3SAS_ADAPTER *ioc) ioc 8863 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "search for expanders: start\n"); ioc 8865 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (list_empty(&ioc->sas_expander_list)) ioc 8869 drivers/scsi/mpt3sas/mpt3sas_scsih.c while (!(mpt3sas_config_get_expander_pg0(ioc, &mpi_reply, &expander_pg0, ioc 8882 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_mark_responding_expander(ioc, &expander_pg0); ioc 8886 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "search for expanders: complete\n"); ioc 8894 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_remove_unresponding_devices(struct MPT3SAS_ADAPTER *ioc) ioc 8904 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "removing unresponding devices: start\n"); ioc 8907 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "removing unresponding devices: end-devices\n"); ioc 8912 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_device_lock, flags); ioc 8914 drivers/scsi/mpt3sas/mpt3sas_scsih.c &ioc->sas_device_list, list) { ioc 8920 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 8926 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_remove_device(ioc, sas_device); ioc 8931 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "Removing unresponding devices: pcie end-devices\n"); ioc 8933 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->pcie_device_lock, flags); ioc 8935 drivers/scsi/mpt3sas/mpt3sas_scsih.c &ioc->pcie_device_list, list) { ioc 8941 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); ioc 8944 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_pcie_device_remove_from_sml(ioc, pcie_device); ioc 8950 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->ir_firmware) { ioc 8951 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "removing unresponding devices: volumes\n"); ioc 8953 drivers/scsi/mpt3sas/mpt3sas_scsih.c &ioc->raid_device_list, list) { ioc 8955 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_volume_delete(ioc, ioc 8963 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "removing unresponding devices: expanders\n"); ioc 8964 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_node_lock, flags); ioc 8967 drivers/scsi/mpt3sas/mpt3sas_scsih.c &ioc->sas_expander_list, list) { ioc 8973 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_node_lock, flags); ioc 8976 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_expander_node_remove(ioc, sas_expander); ioc 8979 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "removing unresponding devices: complete\n"); ioc 8982 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_ublock_io_all_device(ioc); ioc 8986 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_refresh_expander_links(struct MPT3SAS_ADAPTER *ioc, ioc 8994 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((mpt3sas_config_get_expander_pg1(ioc, &mpi_reply, ioc 8996 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 9001 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_transport_update_links(ioc, sas_expander->sas_address, ioc 9012 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_scan_for_devices_after_reset(struct MPT3SAS_ADAPTER *ioc) ioc 9033 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "scan devices: start\n"); ioc 9035 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_host_refresh(ioc); ioc 9037 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "\tscan devices: expanders start\n"); ioc 9041 drivers/scsi/mpt3sas/mpt3sas_scsih.c while (!(mpt3sas_config_get_expander_pg0(ioc, &mpi_reply, &expander_pg0, ioc 9046 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "\tbreak from expander scan: ioc_status(0x%04x), loginfo(0x%08x)\n", ioc 9051 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_node_lock, flags); ioc 9053 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc, le64_to_cpu(expander_pg0.SASAddress)); ioc 9054 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_node_lock, flags); ioc 9056 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_refresh_expander_links(ioc, expander_device, ioc 9059 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "\tBEFORE adding expander: handle (0x%04x), sas_addr(0x%016llx)\n", ioc 9062 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_expander_add(ioc, handle); ioc 9063 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "\tAFTER adding expander: handle (0x%04x), sas_addr(0x%016llx)\n", ioc 9069 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "\tscan devices: expanders complete\n"); ioc 9071 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->ir_firmware) ioc 9074 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "\tscan devices: phys disk start\n"); ioc 9078 drivers/scsi/mpt3sas/mpt3sas_scsih.c while (!(mpt3sas_config_get_phys_disk_pg0(ioc, &mpi_reply, ioc 9084 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "\tbreak from phys disk scan: ioc_status(0x%04x), loginfo(0x%08x)\n", ioc 9090 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_device = mpt3sas_get_sdev_by_handle(ioc, handle); ioc 9095 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (mpt3sas_config_get_sas_device_pg0(ioc, &mpi_reply, ioc 9102 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "\tbreak from phys disk scan ioc_status(0x%04x), loginfo(0x%08x)\n", ioc 9107 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!_scsih_get_sas_address(ioc, parent_handle, ioc 9109 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "\tBEFORE adding phys disk: handle (0x%04x), sas_addr(0x%016llx)\n", ioc 9112 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_transport_update_links(ioc, sas_address, ioc 9115 drivers/scsi/mpt3sas/mpt3sas_scsih.c set_bit(handle, ioc->pd_handles); ioc 9121 drivers/scsi/mpt3sas/mpt3sas_scsih.c while (_scsih_add_device(ioc, handle, retry_count++, ioc 9125 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "\tAFTER adding phys disk: handle (0x%04x), sas_addr(0x%016llx)\n", ioc 9131 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "\tscan devices: phys disk complete\n"); ioc 9133 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "\tscan devices: volumes start\n"); ioc 9137 drivers/scsi/mpt3sas/mpt3sas_scsih.c while (!(mpt3sas_config_get_raid_volume_pg1(ioc, &mpi_reply, ioc 9142 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "\tbreak from volume scan: ioc_status(0x%04x), loginfo(0x%08x)\n", ioc 9147 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->raid_device_lock, flags); ioc 9148 drivers/scsi/mpt3sas/mpt3sas_scsih.c raid_device = _scsih_raid_device_find_by_wwid(ioc, ioc 9150 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->raid_device_lock, flags); ioc 9153 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (mpt3sas_config_get_raid_volume_pg0(ioc, &mpi_reply, ioc 9160 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "\tbreak from volume scan: ioc_status(0x%04x), loginfo(0x%08x)\n", ioc 9170 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "\tBEFORE adding volume: handle (0x%04x)\n", ioc 9172 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_volume_add(ioc, &element); ioc 9173 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "\tAFTER adding volume: handle (0x%04x)\n", ioc 9178 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "\tscan devices: volumes complete\n"); ioc 9182 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "\tscan devices: end devices start\n"); ioc 9186 drivers/scsi/mpt3sas/mpt3sas_scsih.c while (!(mpt3sas_config_get_sas_device_pg0(ioc, &mpi_reply, ioc 9192 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "\tbreak from end device scan: ioc_status(0x%04x), loginfo(0x%08x)\n", ioc 9200 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_device = mpt3sas_get_sdev_by_addr(ioc, ioc 9207 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!_scsih_get_sas_address(ioc, parent_handle, &sas_address)) { ioc 9208 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "\tBEFORE adding end device: handle (0x%04x), sas_addr(0x%016llx)\n", ioc 9211 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_transport_update_links(ioc, sas_address, handle, ioc 9218 drivers/scsi/mpt3sas/mpt3sas_scsih.c while (_scsih_add_device(ioc, handle, retry_count++, ioc 9222 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "\tAFTER adding end device: handle (0x%04x), sas_addr(0x%016llx)\n", ioc 9227 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "\tscan devices: end devices complete\n"); ioc 9228 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "\tscan devices: pcie end devices start\n"); ioc 9232 drivers/scsi/mpt3sas/mpt3sas_scsih.c while (!(mpt3sas_config_get_pcie_device_pg0(ioc, &mpi_reply, ioc 9238 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "\tbreak from pcie end device scan: ioc_status(0x%04x), loginfo(0x%08x)\n", ioc 9246 drivers/scsi/mpt3sas/mpt3sas_scsih.c pcie_device = mpt3sas_get_pdev_by_wwid(ioc, ioc 9254 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_pcie_add_device(ioc, handle); ioc 9256 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "\tAFTER adding pcie end device: handle (0x%04x), wwid(0x%016llx)\n", ioc 9259 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "\tpcie devices: pcie end devices complete\n"); ioc 9260 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "scan devices: complete\n"); ioc 9269 drivers/scsi/mpt3sas/mpt3sas_scsih.c void mpt3sas_scsih_pre_reset_handler(struct MPT3SAS_ADAPTER *ioc) ioc 9271 drivers/scsi/mpt3sas/mpt3sas_scsih.c dtmprintk(ioc, ioc_info(ioc, "%s: MPT3_IOC_PRE_RESET\n", __func__)); ioc 9281 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_scsih_after_reset_handler(struct MPT3SAS_ADAPTER *ioc) ioc 9283 drivers/scsi/mpt3sas/mpt3sas_scsih.c dtmprintk(ioc, ioc_info(ioc, "%s: MPT3_IOC_AFTER_RESET\n", __func__)); ioc 9284 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->scsih_cmds.status & MPT3_CMD_PENDING) { ioc 9285 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->scsih_cmds.status |= MPT3_CMD_RESET; ioc 9286 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_base_free_smid(ioc, ioc->scsih_cmds.smid); ioc 9287 drivers/scsi/mpt3sas/mpt3sas_scsih.c complete(&ioc->scsih_cmds.done); ioc 9289 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->tm_cmds.status & MPT3_CMD_PENDING) { ioc 9290 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->tm_cmds.status |= MPT3_CMD_RESET; ioc 9291 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_base_free_smid(ioc, ioc->tm_cmds.smid); ioc 9292 drivers/scsi/mpt3sas/mpt3sas_scsih.c complete(&ioc->tm_cmds.done); ioc 9295 drivers/scsi/mpt3sas/mpt3sas_scsih.c memset(ioc->pend_os_device_add, 0, ioc->pend_os_device_add_sz); ioc 9296 drivers/scsi/mpt3sas/mpt3sas_scsih.c memset(ioc->device_remove_in_progress, 0, ioc 9297 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->device_remove_in_progress_sz); ioc 9298 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_fw_event_cleanup_queue(ioc); ioc 9299 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_flush_running_cmds(ioc); ioc 9309 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_scsih_reset_done_handler(struct MPT3SAS_ADAPTER *ioc) ioc 9311 drivers/scsi/mpt3sas/mpt3sas_scsih.c dtmprintk(ioc, ioc_info(ioc, "%s: MPT3_IOC_DONE_RESET\n", __func__)); ioc 9312 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((!ioc->is_driver_loading) && !(disable_discovery > 0 && ioc 9313 drivers/scsi/mpt3sas/mpt3sas_scsih.c !ioc->sas_hba.num_phys)) { ioc 9314 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_prep_device_scan(ioc); ioc 9315 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_create_enclosure_list_after_reset(ioc); ioc 9316 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_search_responding_sas_devices(ioc); ioc 9317 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_search_responding_pcie_devices(ioc); ioc 9318 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_search_responding_raid_devices(ioc); ioc 9319 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_search_responding_expanders(ioc); ioc 9320 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_error_recovery_delete_devices(ioc); ioc 9331 drivers/scsi/mpt3sas/mpt3sas_scsih.c _mpt3sas_fw_work(struct MPT3SAS_ADAPTER *ioc, struct fw_event_work *fw_event) ioc 9333 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_fw_event_del_from_list(ioc, fw_event); ioc 9336 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->remove_host || ioc->pci_error_recovery) { ioc 9343 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_process_trigger_data(ioc, ioc 9348 drivers/scsi/mpt3sas/mpt3sas_scsih.c while (scsi_host_in_recovery(ioc->shost) || ioc 9349 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->shost_recovery) { ioc 9354 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->remove_host) ioc 9358 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_remove_unresponding_devices(ioc); ioc 9359 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_scan_for_devices_after_reset(ioc); ioc 9362 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->start_scan = 0; ioc 9364 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_base_update_missing_delay(ioc, missing_delay[0], ioc 9366 drivers/scsi/mpt3sas/mpt3sas_scsih.c dewtprintk(ioc, ioc 9367 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "port enable: complete from worker thread\n")); ioc 9370 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_turn_on_pfa_led(ioc, fw_event->device_handle); ioc 9373 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_topology_change_event(ioc, fw_event); ioc 9376 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->logging_level & MPT_DEBUG_EVENT_WORK_TASK) ioc 9377 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_device_status_change_event_debug(ioc, ioc 9382 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_discovery_event(ioc, fw_event); ioc 9385 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_device_discovery_error_event(ioc, fw_event); ioc 9388 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_broadcast_primitive_event(ioc, fw_event); ioc 9391 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_enclosure_dev_status_change_event(ioc, ioc 9395 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_ir_config_change_event(ioc, fw_event); ioc 9398 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_ir_volume_event(ioc, fw_event); ioc 9401 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_ir_physical_disk_event(ioc, fw_event); ioc 9404 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_ir_operation_status_event(ioc, fw_event); ioc 9407 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_pcie_device_status_change_event(ioc, fw_event); ioc 9410 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_pcie_enumeration_event(ioc, fw_event); ioc 9413 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_pcie_topology_change_event(ioc, fw_event); ioc 9435 drivers/scsi/mpt3sas/mpt3sas_scsih.c _mpt3sas_fw_work(fw_event->ioc, fw_event); ioc 9452 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_scsih_event_callback(struct MPT3SAS_ADAPTER *ioc, u8 msix_index, ioc 9462 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->pci_error_recovery) ioc 9465 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpi_reply = mpt3sas_base_get_reply_virt_addr(ioc, reply); ioc 9468 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "mpi_reply not valid at %s:%d/%s()!\n", ioc 9476 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_trigger_event(ioc, event, 0); ioc 9490 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->broadcast_aen_busy) { ioc 9491 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->broadcast_aen_pending++; ioc 9494 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->broadcast_aen_busy = 1; ioc 9499 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_check_topo_delete_events(ioc, ioc 9504 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_check_pcie_topo_remove_events(ioc, ioc 9509 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_check_ir_config_unhide_events(ioc, ioc 9514 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_check_volume_delete_events(ioc, ioc 9523 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->is_warpdrive) ioc 9536 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_warn(ioc, "WarpDrive Warning: IO Throttling has occurred in the WarpDrive subsystem. Check WarpDrive documentation for additional details.\n"); ioc 9539 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_warn(ioc, "WarpDrive Warning: Program/Erase Cycles for the WarpDrive subsystem in degraded range. Check WarpDrive documentation for additional details.\n"); ioc 9542 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "WarpDrive Fatal Error: There are no Program/Erase Cycles for the WarpDrive subsystem. The storage device will be in read-only mode. Check WarpDrive documentation for additional details.\n"); ioc 9545 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "WarpDrive Fatal Error: The Backup Rail Monitor has failed on the WarpDrive subsystem. Check WarpDrive documentation for additional details.\n"); ioc 9552 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_device_status_change_event(ioc, ioc 9566 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_temp_threshold_events(ioc, ioc 9575 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_notice(ioc, "Currently an active cable with ReceptacleID %d\n", ioc 9584 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_notice(ioc, "Currently a cable with ReceptacleID %d\n", ioc 9600 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 9606 drivers/scsi/mpt3sas/mpt3sas_scsih.c fw_event->ioc = ioc; ioc 9610 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_fw_event_add(ioc, fw_event); ioc 9624 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_expander_node_remove(struct MPT3SAS_ADAPTER *ioc, ioc 9633 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->shost_recovery) ioc 9637 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_device_remove_by_sas_address(ioc, ioc 9643 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_expander_remove(ioc, ioc 9647 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_transport_port_remove(ioc, sas_expander->sas_address, ioc 9650 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "expander_remove: handle(0x%04x), sas_addr(0x%016llx)\n", ioc 9654 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_node_lock, flags); ioc 9656 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_node_lock, flags); ioc 9670 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_ir_shutdown(struct MPT3SAS_ADAPTER *ioc) ioc 9677 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->ir_firmware) ioc 9681 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (list_empty(&ioc->raid_device_list)) ioc 9684 drivers/scsi/mpt3sas/mpt3sas_scsih.c mutex_lock(&ioc->scsih_cmds.mutex); ioc 9686 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->scsih_cmds.status != MPT3_CMD_NOT_USED) { ioc 9687 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "%s: scsih_cmd in use\n", __func__); ioc 9690 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->scsih_cmds.status = MPT3_CMD_PENDING; ioc 9692 drivers/scsi/mpt3sas/mpt3sas_scsih.c smid = mpt3sas_base_get_smid(ioc, ioc->scsih_cb_idx); ioc 9694 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); ioc 9695 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->scsih_cmds.status = MPT3_CMD_NOT_USED; ioc 9699 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpi_request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 9700 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->scsih_cmds.smid = smid; ioc 9706 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->hide_ir_msg) ioc 9707 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "IR shutdown (sending)\n"); ioc 9708 drivers/scsi/mpt3sas/mpt3sas_scsih.c init_completion(&ioc->scsih_cmds.done); ioc 9709 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->put_smid_default(ioc, smid); ioc 9710 drivers/scsi/mpt3sas/mpt3sas_scsih.c wait_for_completion_timeout(&ioc->scsih_cmds.done, 10*HZ); ioc 9712 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!(ioc->scsih_cmds.status & MPT3_CMD_COMPLETE)) { ioc 9713 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "%s: timeout\n", __func__); ioc 9717 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->scsih_cmds.status & MPT3_CMD_REPLY_VALID) { ioc 9718 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpi_reply = ioc->scsih_cmds.reply; ioc 9719 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->hide_ir_msg) ioc 9720 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "IR shutdown (complete): ioc_status(0x%04x), loginfo(0x%08x)\n", ioc 9726 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->scsih_cmds.status = MPT3_CMD_NOT_USED; ioc 9727 drivers/scsi/mpt3sas/mpt3sas_scsih.c mutex_unlock(&ioc->scsih_cmds.mutex); ioc 9739 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 9748 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->remove_host = 1; ioc 9751 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_flush_running_cmds(ioc); ioc 9753 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_fw_event_cleanup_queue(ioc); ioc 9755 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->fw_event_lock, flags); ioc 9756 drivers/scsi/mpt3sas/mpt3sas_scsih.c wq = ioc->firmware_event_thread; ioc 9757 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->firmware_event_thread = NULL; ioc 9758 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->fw_event_lock, flags); ioc 9765 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->is_aero_ioc) ioc 9766 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_config_set_ioc_pg1(ioc, &mpi_reply, ioc 9767 drivers/scsi/mpt3sas/mpt3sas_scsih.c &ioc->ioc_pg1_copy); ioc 9769 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_ir_shutdown(ioc); ioc 9771 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_for_each_entry_safe(raid_device, next, &ioc->raid_device_list, ioc 9779 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "removing handle(0x%04x), wwid(0x%016llx)\n", ioc 9781 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_raid_device_remove(ioc, raid_device); ioc 9783 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_for_each_entry_safe(pcie_device, pcienext, &ioc->pcie_device_list, ioc 9785 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_pcie_device_remove_from_sml(ioc, pcie_device); ioc 9792 drivers/scsi/mpt3sas/mpt3sas_scsih.c &ioc->sas_hba.sas_port_list, port_list) { ioc 9795 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_device_remove_by_sas_address(ioc, ioc 9801 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_expander_remove(ioc, ioc 9806 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->sas_hba.num_phys) { ioc 9807 drivers/scsi/mpt3sas/mpt3sas_scsih.c kfree(ioc->sas_hba.phy); ioc 9808 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->sas_hba.phy = NULL; ioc 9809 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->sas_hba.num_phys = 0; ioc 9812 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_base_detach(ioc); ioc 9814 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_del(&ioc->list); ioc 9827 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 9832 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->remove_host = 1; ioc 9835 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_flush_running_cmds(ioc); ioc 9837 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_fw_event_cleanup_queue(ioc); ioc 9839 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->fw_event_lock, flags); ioc 9840 drivers/scsi/mpt3sas/mpt3sas_scsih.c wq = ioc->firmware_event_thread; ioc 9841 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->firmware_event_thread = NULL; ioc 9842 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->fw_event_lock, flags); ioc 9849 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->is_aero_ioc) ioc 9850 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_config_set_ioc_pg1(ioc, &mpi_reply, ioc 9851 drivers/scsi/mpt3sas/mpt3sas_scsih.c &ioc->ioc_pg1_copy); ioc 9853 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_ir_shutdown(ioc); ioc 9854 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_base_detach(ioc); ioc 9867 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_probe_boot_devices(struct MPT3SAS_ADAPTER *ioc) ioc 9882 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->bios_pg3.BiosVersion) ioc 9886 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->req_boot_device.device) { ioc 9887 drivers/scsi/mpt3sas/mpt3sas_scsih.c device = ioc->req_boot_device.device; ioc 9888 drivers/scsi/mpt3sas/mpt3sas_scsih.c channel = ioc->req_boot_device.channel; ioc 9889 drivers/scsi/mpt3sas/mpt3sas_scsih.c } else if (ioc->req_alt_boot_device.device) { ioc 9890 drivers/scsi/mpt3sas/mpt3sas_scsih.c device = ioc->req_alt_boot_device.device; ioc 9891 drivers/scsi/mpt3sas/mpt3sas_scsih.c channel = ioc->req_alt_boot_device.channel; ioc 9892 drivers/scsi/mpt3sas/mpt3sas_scsih.c } else if (ioc->current_boot_device.device) { ioc 9893 drivers/scsi/mpt3sas/mpt3sas_scsih.c device = ioc->current_boot_device.device; ioc 9894 drivers/scsi/mpt3sas/mpt3sas_scsih.c channel = ioc->current_boot_device.channel; ioc 9902 drivers/scsi/mpt3sas/mpt3sas_scsih.c rc = scsi_add_device(ioc->shost, RAID_CHANNEL, ioc 9905 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_raid_device_remove(ioc, raid_device); ioc 9907 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->pcie_device_lock, flags); ioc 9910 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_move_tail(&pcie_device->list, &ioc->pcie_device_list); ioc 9911 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); ioc 9912 drivers/scsi/mpt3sas/mpt3sas_scsih.c rc = scsi_add_device(ioc->shost, PCIE_CHANNEL, tid, 0); ioc 9914 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_pcie_device_remove(ioc, pcie_device); ioc 9916 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_device_lock, flags); ioc 9921 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_move_tail(&sas_device->list, &ioc->sas_device_list); ioc 9922 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 9924 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->hide_drives) ioc 9926 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!mpt3sas_transport_port_add(ioc, handle, ioc 9928 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_device_remove(ioc, sas_device); ioc 9930 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->is_driver_loading) { ioc 9931 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_transport_port_remove(ioc, ioc 9934 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_device_remove(ioc, sas_device); ioc 9947 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_probe_raid(struct MPT3SAS_ADAPTER *ioc) ioc 9953 drivers/scsi/mpt3sas/mpt3sas_scsih.c &ioc->raid_device_list, list) { ioc 9956 drivers/scsi/mpt3sas/mpt3sas_scsih.c rc = scsi_add_device(ioc->shost, RAID_CHANNEL, ioc 9959 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_raid_device_remove(ioc, raid_device); ioc 9963 drivers/scsi/mpt3sas/mpt3sas_scsih.c static struct _sas_device *get_next_sas_device(struct MPT3SAS_ADAPTER *ioc) ioc 9968 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_device_lock, flags); ioc 9969 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!list_empty(&ioc->sas_device_init_list)) { ioc 9970 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_device = list_first_entry(&ioc->sas_device_init_list, ioc 9974 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 9979 drivers/scsi/mpt3sas/mpt3sas_scsih.c static void sas_device_make_active(struct MPT3SAS_ADAPTER *ioc, ioc 9984 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->sas_device_lock, flags); ioc 10000 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_add_tail(&sas_device->list, &ioc->sas_device_list); ioc 10002 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 10012 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_probe_sas(struct MPT3SAS_ADAPTER *ioc) ioc 10016 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->hide_drives) ioc 10019 drivers/scsi/mpt3sas/mpt3sas_scsih.c while ((sas_device = get_next_sas_device(ioc))) { ioc 10020 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!mpt3sas_transport_port_add(ioc, sas_device->handle, ioc 10022 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_device_remove(ioc, sas_device); ioc 10032 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->is_driver_loading) { ioc 10033 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_transport_port_remove(ioc, ioc 10036 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_sas_device_remove(ioc, sas_device); ioc 10041 drivers/scsi/mpt3sas/mpt3sas_scsih.c sas_device_make_active(ioc, sas_device); ioc 10055 drivers/scsi/mpt3sas/mpt3sas_scsih.c static struct _pcie_device *get_next_pcie_device(struct MPT3SAS_ADAPTER *ioc) ioc 10060 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->pcie_device_lock, flags); ioc 10061 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!list_empty(&ioc->pcie_device_init_list)) { ioc 10062 drivers/scsi/mpt3sas/mpt3sas_scsih.c pcie_device = list_first_entry(&ioc->pcie_device_init_list, ioc 10066 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); ioc 10079 drivers/scsi/mpt3sas/mpt3sas_scsih.c static void pcie_device_make_active(struct MPT3SAS_ADAPTER *ioc, ioc 10084 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_irqsave(&ioc->pcie_device_lock, flags); ioc 10091 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_add_tail(&pcie_device->list, &ioc->pcie_device_list); ioc 10093 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); ioc 10103 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_probe_pcie(struct MPT3SAS_ADAPTER *ioc) ioc 10109 drivers/scsi/mpt3sas/mpt3sas_scsih.c while ((pcie_device = get_next_pcie_device(ioc))) { ioc 10116 drivers/scsi/mpt3sas/mpt3sas_scsih.c pcie_device_make_active(ioc, pcie_device); ioc 10120 drivers/scsi/mpt3sas/mpt3sas_scsih.c rc = scsi_add_device(ioc->shost, PCIE_CHANNEL, ioc 10123 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_pcie_device_remove(ioc, pcie_device); ioc 10133 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->is_driver_loading) { ioc 10137 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_pcie_device_remove(ioc, pcie_device); ioc 10142 drivers/scsi/mpt3sas/mpt3sas_scsih.c pcie_device_make_active(ioc, pcie_device); ioc 10154 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_probe_devices(struct MPT3SAS_ADAPTER *ioc) ioc 10158 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!(ioc->facts.ProtocolFlags & MPI2_IOCFACTS_PROTOCOL_SCSI_INITIATOR)) ioc 10161 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_probe_boot_devices(ioc); ioc 10163 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->ir_firmware) { ioc 10165 drivers/scsi/mpt3sas/mpt3sas_scsih.c le16_to_cpu(ioc->ioc_pg8.IRVolumeMappingFlags) & ioc 10169 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_probe_raid(ioc); ioc 10170 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_probe_sas(ioc); ioc 10172 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_probe_sas(ioc); ioc 10173 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_probe_raid(ioc); ioc 10176 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_probe_sas(ioc); ioc 10177 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_probe_pcie(ioc); ioc 10192 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 10195 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_enable_diag_buffer(ioc, diag_buffer_enable); ioc 10200 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->start_scan = 1; ioc 10201 drivers/scsi/mpt3sas/mpt3sas_scsih.c rc = mpt3sas_port_enable(ioc); ioc 10204 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "port enable: FAILED\n"); ioc 10219 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 10222 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->is_driver_loading = 0; ioc 10223 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->wait_for_discovery_to_complete = 0; ioc 10228 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->port_enable_cmds.status = MPT3_CMD_NOT_USED; ioc 10229 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "port enable: FAILED with timeout (timeout=300s)\n"); ioc 10230 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->is_driver_loading = 0; ioc 10234 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->start_scan) ioc 10237 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->start_scan_failed) { ioc 10238 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "port enable: FAILED with (ioc_status=0x%08x)\n", ioc 10239 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->start_scan_failed); ioc 10240 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->is_driver_loading = 0; ioc 10241 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->wait_for_discovery_to_complete = 0; ioc 10242 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->remove_host = 1; ioc 10246 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "port enable: SUCCESS\n"); ioc 10247 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->port_enable_cmds.status = MPT3_CMD_NOT_USED; ioc 10249 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->wait_for_discovery_to_complete) { ioc 10250 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->wait_for_discovery_to_complete = 0; ioc 10251 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_probe_devices(ioc); ioc 10253 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_base_start_watchdog(ioc); ioc 10254 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->is_driver_loading = 0; ioc 10413 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct MPT3SAS_ADAPTER *ioc; ioc 10445 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc = shost_priv(shost); ioc 10446 drivers/scsi/mpt3sas/mpt3sas_scsih.c memset(ioc, 0, sizeof(struct MPT3SAS_ADAPTER)); ioc 10447 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->hba_mpi_version_belonged = hba_mpi_version; ioc 10448 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->id = mpt2_ids++; ioc 10449 drivers/scsi/mpt3sas/mpt3sas_scsih.c sprintf(ioc->driver_name, "%s", MPT2SAS_DRIVER_NAME); ioc 10452 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->is_warpdrive = 1; ioc 10453 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->hide_ir_msg = 1; ioc 10457 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->is_mcpu_endpoint = 1; ioc 10460 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->mfg_pg10_hide_flag = MFG_PAGE10_EXPOSE_ALL_DISKS; ioc 10471 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc = shost_priv(shost); ioc 10472 drivers/scsi/mpt3sas/mpt3sas_scsih.c memset(ioc, 0, sizeof(struct MPT3SAS_ADAPTER)); ioc 10473 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->hba_mpi_version_belonged = hba_mpi_version; ioc 10474 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->id = mpt3_ids++; ioc 10475 drivers/scsi/mpt3sas/mpt3sas_scsih.c sprintf(ioc->driver_name, "%s", MPT3SAS_DRIVER_NAME); ioc 10485 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->is_gen35_ioc = 1; ioc 10494 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->is_aero_ioc = ioc->is_gen35_ioc = 1; ioc 10497 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->is_gen35_ioc = ioc->is_aero_ioc = 0; ioc 10499 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((ioc->hba_mpi_version_belonged == MPI25_VERSION && ioc 10501 drivers/scsi/mpt3sas/mpt3sas_scsih.c (ioc->hba_mpi_version_belonged == MPI26_VERSION)) { ioc 10502 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->combined_reply_queue = 1; ioc 10503 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->is_gen35_ioc) ioc 10504 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->combined_reply_index_count = ioc 10507 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->combined_reply_index_count = ioc 10515 drivers/scsi/mpt3sas/mpt3sas_scsih.c INIT_LIST_HEAD(&ioc->list); ioc 10517 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_add_tail(&ioc->list, &mpt3sas_ioc_list); ioc 10519 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->shost = shost; ioc 10520 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->pdev = pdev; ioc 10521 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->scsi_io_cb_idx = scsi_io_cb_idx; ioc 10522 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->tm_cb_idx = tm_cb_idx; ioc 10523 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->ctl_cb_idx = ctl_cb_idx; ioc 10524 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->base_cb_idx = base_cb_idx; ioc 10525 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->port_enable_cb_idx = port_enable_cb_idx; ioc 10526 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->transport_cb_idx = transport_cb_idx; ioc 10527 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->scsih_cb_idx = scsih_cb_idx; ioc 10528 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->config_cb_idx = config_cb_idx; ioc 10529 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->tm_tr_cb_idx = tm_tr_cb_idx; ioc 10530 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->tm_tr_volume_cb_idx = tm_tr_volume_cb_idx; ioc 10531 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->tm_sas_control_cb_idx = tm_sas_control_cb_idx; ioc 10532 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->logging_level = logging_level; ioc 10533 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->schedule_dead_ioc_flush_running_cmds = &_scsih_flush_running_cmds; ioc 10537 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->drv_support_bitmap |= MPT_DRV_SUPPORT_BITMAP_MEMMOVE; ioc 10539 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->enable_sdev_max_qd = enable_sdev_max_qd; ioc 10542 drivers/scsi/mpt3sas/mpt3sas_scsih.c mutex_init(&ioc->reset_in_progress_mutex); ioc 10544 drivers/scsi/mpt3sas/mpt3sas_scsih.c mutex_init(&ioc->pci_access_mutex); ioc 10545 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_init(&ioc->ioc_reset_in_progress_lock); ioc 10546 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_init(&ioc->scsi_lookup_lock); ioc 10547 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_init(&ioc->sas_device_lock); ioc 10548 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_init(&ioc->sas_node_lock); ioc 10549 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_init(&ioc->fw_event_lock); ioc 10550 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_init(&ioc->raid_device_lock); ioc 10551 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_init(&ioc->pcie_device_lock); ioc 10552 drivers/scsi/mpt3sas/mpt3sas_scsih.c spin_lock_init(&ioc->diag_trigger_lock); ioc 10554 drivers/scsi/mpt3sas/mpt3sas_scsih.c INIT_LIST_HEAD(&ioc->sas_device_list); ioc 10555 drivers/scsi/mpt3sas/mpt3sas_scsih.c INIT_LIST_HEAD(&ioc->sas_device_init_list); ioc 10556 drivers/scsi/mpt3sas/mpt3sas_scsih.c INIT_LIST_HEAD(&ioc->sas_expander_list); ioc 10557 drivers/scsi/mpt3sas/mpt3sas_scsih.c INIT_LIST_HEAD(&ioc->enclosure_list); ioc 10558 drivers/scsi/mpt3sas/mpt3sas_scsih.c INIT_LIST_HEAD(&ioc->pcie_device_list); ioc 10559 drivers/scsi/mpt3sas/mpt3sas_scsih.c INIT_LIST_HEAD(&ioc->pcie_device_init_list); ioc 10560 drivers/scsi/mpt3sas/mpt3sas_scsih.c INIT_LIST_HEAD(&ioc->fw_event_list); ioc 10561 drivers/scsi/mpt3sas/mpt3sas_scsih.c INIT_LIST_HEAD(&ioc->raid_device_list); ioc 10562 drivers/scsi/mpt3sas/mpt3sas_scsih.c INIT_LIST_HEAD(&ioc->sas_hba.sas_port_list); ioc 10563 drivers/scsi/mpt3sas/mpt3sas_scsih.c INIT_LIST_HEAD(&ioc->delayed_tr_list); ioc 10564 drivers/scsi/mpt3sas/mpt3sas_scsih.c INIT_LIST_HEAD(&ioc->delayed_sc_list); ioc 10565 drivers/scsi/mpt3sas/mpt3sas_scsih.c INIT_LIST_HEAD(&ioc->delayed_event_ack_list); ioc 10566 drivers/scsi/mpt3sas/mpt3sas_scsih.c INIT_LIST_HEAD(&ioc->delayed_tr_volume_list); ioc 10567 drivers/scsi/mpt3sas/mpt3sas_scsih.c INIT_LIST_HEAD(&ioc->reply_queue_list); ioc 10569 drivers/scsi/mpt3sas/mpt3sas_scsih.c sprintf(ioc->name, "%s_cm%d", ioc->driver_name, ioc->id); ioc 10575 drivers/scsi/mpt3sas/mpt3sas_scsih.c shost->unique_id = ioc->id; ioc 10577 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->is_mcpu_endpoint) { ioc 10580 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "The max_sectors value is set to %d\n", ioc 10586 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_warn(ioc, "Invalid value %d passed for max_sectors, range is 64 to 32767. Assigning value of 64.\n", ioc 10590 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_warn(ioc, "Invalid value %d passed for max_sectors, range is 64 to 32767.Assigning default value of 32767.\n", ioc 10594 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "The max_sectors value is set to %d\n", ioc 10610 drivers/scsi/mpt3sas/mpt3sas_scsih.c snprintf(ioc->firmware_event_name, sizeof(ioc->firmware_event_name), ioc 10611 drivers/scsi/mpt3sas/mpt3sas_scsih.c "fw_event_%s%d", ioc->driver_name, ioc->id); ioc 10612 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->firmware_event_thread = alloc_ordered_workqueue( ioc 10613 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->firmware_event_name, 0); ioc 10614 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (!ioc->firmware_event_thread) { ioc 10615 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 10621 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->is_driver_loading = 1; ioc 10622 drivers/scsi/mpt3sas/mpt3sas_scsih.c if ((mpt3sas_base_attach(ioc))) { ioc 10623 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 10629 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->is_warpdrive) { ioc 10630 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (ioc->mfg_pg10_hide_flag == MFG_PAGE10_EXPOSE_ALL_DISKS) ioc 10631 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->hide_drives = 0; ioc 10632 drivers/scsi/mpt3sas/mpt3sas_scsih.c else if (ioc->mfg_pg10_hide_flag == MFG_PAGE10_HIDE_ALL_DISKS) ioc 10633 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->hide_drives = 1; ioc 10635 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (mpt3sas_get_num_volumes(ioc)) ioc 10636 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->hide_drives = 1; ioc 10638 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->hide_drives = 0; ioc 10641 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->hide_drives = 0; ioc 10645 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 10653 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_base_detach(ioc); ioc 10655 drivers/scsi/mpt3sas/mpt3sas_scsih.c destroy_workqueue(ioc->firmware_event_thread); ioc 10658 drivers/scsi/mpt3sas/mpt3sas_scsih.c list_del(&ioc->list); ioc 10676 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 10679 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_base_stop_watchdog(ioc); ioc 10683 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "pdev=0x%p, slot=%s, entering operating state [D%d]\n", ioc 10687 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_base_free_resources(ioc); ioc 10702 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 10706 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "pdev=0x%p, slot=%s, previous operating state [D%d]\n", ioc 10712 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->pdev = pdev; ioc 10713 drivers/scsi/mpt3sas/mpt3sas_scsih.c r = mpt3sas_base_map_resources(ioc); ioc 10717 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_base_hard_reset_handler(ioc, SOFT_RESET); ioc 10719 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_base_start_watchdog(ioc); ioc 10737 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 10739 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "PCI error: detected callback, state(%d)!!\n", state); ioc 10746 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->pci_error_recovery = 1; ioc 10747 drivers/scsi/mpt3sas/mpt3sas_scsih.c scsi_block_requests(ioc->shost); ioc 10748 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_base_stop_watchdog(ioc); ioc 10749 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_base_free_resources(ioc); ioc 10753 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->pci_error_recovery = 1; ioc 10754 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_base_stop_watchdog(ioc); ioc 10755 drivers/scsi/mpt3sas/mpt3sas_scsih.c _scsih_flush_running_cmds(ioc); ioc 10773 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 10776 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "PCI error: slot reset callback!!\n"); ioc 10778 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->pci_error_recovery = 0; ioc 10779 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc->pdev = pdev; ioc 10781 drivers/scsi/mpt3sas/mpt3sas_scsih.c rc = mpt3sas_base_map_resources(ioc); ioc 10785 drivers/scsi/mpt3sas/mpt3sas_scsih.c rc = mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER); ioc 10787 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_warn(ioc, "hard reset: %s\n", ioc 10808 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 10810 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "PCI error: resume callback!!\n"); ioc 10812 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_base_start_watchdog(ioc); ioc 10813 drivers/scsi/mpt3sas/mpt3sas_scsih.c scsi_unblock_requests(ioc->shost); ioc 10824 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 10826 drivers/scsi/mpt3sas/mpt3sas_scsih.c ioc_info(ioc, "PCI error: mmio enabled callback!!\n"); ioc 73 drivers/scsi/mpt3sas/mpt3sas_transport.c _transport_sas_node_find_by_sas_address(struct MPT3SAS_ADAPTER *ioc, ioc 76 drivers/scsi/mpt3sas/mpt3sas_transport.c if (ioc->sas_hba.sas_address == sas_address) ioc 77 drivers/scsi/mpt3sas/mpt3sas_transport.c return &ioc->sas_hba; ioc 79 drivers/scsi/mpt3sas/mpt3sas_transport.c return mpt3sas_scsih_expander_find_by_sas_address(ioc, ioc 140 drivers/scsi/mpt3sas/mpt3sas_transport.c _transport_set_identify(struct MPT3SAS_ADAPTER *ioc, u16 handle, ioc 148 drivers/scsi/mpt3sas/mpt3sas_transport.c if (ioc->shost_recovery || ioc->pci_error_recovery) { ioc 149 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_info(ioc, "%s: host reset in progress!\n", __func__); ioc 153 drivers/scsi/mpt3sas/mpt3sas_transport.c if ((mpt3sas_config_get_sas_device_pg0(ioc, &mpi_reply, &sas_device_pg0, ioc 155 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 163 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "handle(0x%04x), ioc_status(0x%04x) failure at %s:%d/%s()!\n", ioc 230 drivers/scsi/mpt3sas/mpt3sas_transport.c mpt3sas_transport_done(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index, ioc 235 drivers/scsi/mpt3sas/mpt3sas_transport.c mpi_reply = mpt3sas_base_get_reply_virt_addr(ioc, reply); ioc 236 drivers/scsi/mpt3sas/mpt3sas_transport.c if (ioc->transport_cmds.status == MPT3_CMD_NOT_USED) ioc 238 drivers/scsi/mpt3sas/mpt3sas_transport.c if (ioc->transport_cmds.smid != smid) ioc 240 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc->transport_cmds.status |= MPT3_CMD_COMPLETE; ioc 242 drivers/scsi/mpt3sas/mpt3sas_transport.c memcpy(ioc->transport_cmds.reply, mpi_reply, ioc 244 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc->transport_cmds.status |= MPT3_CMD_REPLY_VALID; ioc 246 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc->transport_cmds.status &= ~MPT3_CMD_PENDING; ioc 247 drivers/scsi/mpt3sas/mpt3sas_transport.c complete(&ioc->transport_cmds.done); ioc 290 drivers/scsi/mpt3sas/mpt3sas_transport.c _transport_expander_report_manufacture(struct MPT3SAS_ADAPTER *ioc, ioc 307 drivers/scsi/mpt3sas/mpt3sas_transport.c if (ioc->shost_recovery || ioc->pci_error_recovery) { ioc 308 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_info(ioc, "%s: host reset in progress!\n", __func__); ioc 312 drivers/scsi/mpt3sas/mpt3sas_transport.c mutex_lock(&ioc->transport_cmds.mutex); ioc 314 drivers/scsi/mpt3sas/mpt3sas_transport.c if (ioc->transport_cmds.status != MPT3_CMD_NOT_USED) { ioc 315 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "%s: transport_cmds in use\n", __func__); ioc 319 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc->transport_cmds.status = MPT3_CMD_PENDING; ioc 321 drivers/scsi/mpt3sas/mpt3sas_transport.c rc = mpt3sas_wait_for_ioc(ioc, IOC_OPERATIONAL_WAIT_COUNT); ioc 325 drivers/scsi/mpt3sas/mpt3sas_transport.c smid = mpt3sas_base_get_smid(ioc, ioc->transport_cb_idx); ioc 327 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); ioc 333 drivers/scsi/mpt3sas/mpt3sas_transport.c mpi_request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 334 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc->transport_cmds.smid = smid; ioc 338 drivers/scsi/mpt3sas/mpt3sas_transport.c data_out = dma_alloc_coherent(&ioc->pdev->dev, data_out_sz + data_in_sz, ioc 344 drivers/scsi/mpt3sas/mpt3sas_transport.c mpt3sas_base_free_smid(ioc, smid); ioc 363 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc->build_sg(ioc, psge, data_out_dma, data_out_sz, data_in_dma, ioc 366 drivers/scsi/mpt3sas/mpt3sas_transport.c dtransportprintk(ioc, ioc 367 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_info(ioc, "report_manufacture - send to sas_addr(0x%016llx)\n", ioc 369 drivers/scsi/mpt3sas/mpt3sas_transport.c init_completion(&ioc->transport_cmds.done); ioc 370 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc->put_smid_default(ioc, smid); ioc 371 drivers/scsi/mpt3sas/mpt3sas_transport.c wait_for_completion_timeout(&ioc->transport_cmds.done, 10*HZ); ioc 373 drivers/scsi/mpt3sas/mpt3sas_transport.c if (!(ioc->transport_cmds.status & MPT3_CMD_COMPLETE)) { ioc 374 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "%s: timeout\n", __func__); ioc 377 drivers/scsi/mpt3sas/mpt3sas_transport.c if (!(ioc->transport_cmds.status & MPT3_CMD_RESET)) ioc 382 drivers/scsi/mpt3sas/mpt3sas_transport.c dtransportprintk(ioc, ioc_info(ioc, "report_manufacture - complete\n")); ioc 384 drivers/scsi/mpt3sas/mpt3sas_transport.c if (ioc->transport_cmds.status & MPT3_CMD_REPLY_VALID) { ioc 387 drivers/scsi/mpt3sas/mpt3sas_transport.c mpi_reply = ioc->transport_cmds.reply; ioc 389 drivers/scsi/mpt3sas/mpt3sas_transport.c dtransportprintk(ioc, ioc 390 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_info(ioc, "report_manufacture - reply data transfer size(%d)\n", ioc 415 drivers/scsi/mpt3sas/mpt3sas_transport.c dtransportprintk(ioc, ioc 416 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_info(ioc, "report_manufacture - no reply\n")); ioc 420 drivers/scsi/mpt3sas/mpt3sas_transport.c mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER); ioc 422 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc->transport_cmds.status = MPT3_CMD_NOT_USED; ioc 424 drivers/scsi/mpt3sas/mpt3sas_transport.c dma_free_coherent(&ioc->pdev->dev, data_out_sz + data_in_sz, ioc 427 drivers/scsi/mpt3sas/mpt3sas_transport.c mutex_unlock(&ioc->transport_cmds.mutex); ioc 438 drivers/scsi/mpt3sas/mpt3sas_transport.c _transport_delete_port(struct MPT3SAS_ADAPTER *ioc, ioc 449 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc->logging_level |= MPT_DEBUG_TRANSPORT; ioc 451 drivers/scsi/mpt3sas/mpt3sas_transport.c mpt3sas_device_remove_by_sas_address(ioc, sas_address); ioc 454 drivers/scsi/mpt3sas/mpt3sas_transport.c mpt3sas_expander_remove(ioc, sas_address); ioc 455 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc->logging_level &= ~MPT_DEBUG_TRANSPORT; ioc 465 drivers/scsi/mpt3sas/mpt3sas_transport.c _transport_delete_phy(struct MPT3SAS_ADAPTER *ioc, ioc 487 drivers/scsi/mpt3sas/mpt3sas_transport.c _transport_add_phy(struct MPT3SAS_ADAPTER *ioc, struct _sas_port *mpt3sas_port, ioc 510 drivers/scsi/mpt3sas/mpt3sas_transport.c _transport_add_phy_to_an_existing_port(struct MPT3SAS_ADAPTER *ioc, ioc 530 drivers/scsi/mpt3sas/mpt3sas_transport.c _transport_add_phy(ioc, mpt3sas_port, mpt3sas_phy); ioc 543 drivers/scsi/mpt3sas/mpt3sas_transport.c _transport_del_phy_from_an_existing_port(struct MPT3SAS_ADAPTER *ioc, ioc 560 drivers/scsi/mpt3sas/mpt3sas_transport.c _transport_delete_port(ioc, mpt3sas_port); ioc 562 drivers/scsi/mpt3sas/mpt3sas_transport.c _transport_delete_phy(ioc, mpt3sas_port, ioc 578 drivers/scsi/mpt3sas/mpt3sas_transport.c _transport_sanity_check(struct MPT3SAS_ADAPTER *ioc, struct _sas_node *sas_node, ioc 587 drivers/scsi/mpt3sas/mpt3sas_transport.c _transport_del_phy_from_an_existing_port(ioc, sas_node, ioc 604 drivers/scsi/mpt3sas/mpt3sas_transport.c mpt3sas_transport_port_add(struct MPT3SAS_ADAPTER *ioc, u16 handle, ioc 619 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 626 drivers/scsi/mpt3sas/mpt3sas_transport.c spin_lock_irqsave(&ioc->sas_node_lock, flags); ioc 627 drivers/scsi/mpt3sas/mpt3sas_transport.c sas_node = _transport_sas_node_find_by_sas_address(ioc, sas_address); ioc 628 drivers/scsi/mpt3sas/mpt3sas_transport.c spin_unlock_irqrestore(&ioc->sas_node_lock, flags); ioc 631 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "%s: Could not find parent sas_address(0x%016llx)!\n", ioc 636 drivers/scsi/mpt3sas/mpt3sas_transport.c if ((_transport_set_identify(ioc, handle, ioc 638 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 644 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 649 drivers/scsi/mpt3sas/mpt3sas_transport.c _transport_sanity_check(ioc, sas_node, ioc 662 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 668 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 674 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 681 drivers/scsi/mpt3sas/mpt3sas_transport.c if ((ioc->logging_level & MPT_DEBUG_TRANSPORT)) ioc 701 drivers/scsi/mpt3sas/mpt3sas_transport.c sas_device = mpt3sas_get_sdev_by_addr(ioc, ioc 704 drivers/scsi/mpt3sas/mpt3sas_transport.c dfailprintk(ioc, ioc 705 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_info(ioc, "failure at %s:%d/%s()!\n", ioc 713 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 722 drivers/scsi/mpt3sas/mpt3sas_transport.c if ((ioc->logging_level & MPT_DEBUG_TRANSPORT)) ioc 728 drivers/scsi/mpt3sas/mpt3sas_transport.c spin_lock_irqsave(&ioc->sas_node_lock, flags); ioc 730 drivers/scsi/mpt3sas/mpt3sas_transport.c spin_unlock_irqrestore(&ioc->sas_node_lock, flags); ioc 737 drivers/scsi/mpt3sas/mpt3sas_transport.c _transport_expander_report_manufacture(ioc, ioc 761 drivers/scsi/mpt3sas/mpt3sas_transport.c mpt3sas_transport_port_remove(struct MPT3SAS_ADAPTER *ioc, u64 sas_address, ioc 771 drivers/scsi/mpt3sas/mpt3sas_transport.c spin_lock_irqsave(&ioc->sas_node_lock, flags); ioc 772 drivers/scsi/mpt3sas/mpt3sas_transport.c sas_node = _transport_sas_node_find_by_sas_address(ioc, ioc 775 drivers/scsi/mpt3sas/mpt3sas_transport.c spin_unlock_irqrestore(&ioc->sas_node_lock, flags); ioc 788 drivers/scsi/mpt3sas/mpt3sas_transport.c spin_unlock_irqrestore(&ioc->sas_node_lock, flags); ioc 798 drivers/scsi/mpt3sas/mpt3sas_transport.c spin_unlock_irqrestore(&ioc->sas_node_lock, flags); ioc 802 drivers/scsi/mpt3sas/mpt3sas_transport.c if ((ioc->logging_level & MPT_DEBUG_TRANSPORT)) ioc 809 drivers/scsi/mpt3sas/mpt3sas_transport.c if (!ioc->remove_host) ioc 814 drivers/scsi/mpt3sas/mpt3sas_transport.c if (!ioc->remove_host) ioc 829 drivers/scsi/mpt3sas/mpt3sas_transport.c mpt3sas_transport_add_host_phy(struct MPT3SAS_ADAPTER *ioc, struct _sas_phy ioc 839 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 843 drivers/scsi/mpt3sas/mpt3sas_transport.c if ((_transport_set_identify(ioc, mpt3sas_phy->handle, ioc 845 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 853 drivers/scsi/mpt3sas/mpt3sas_transport.c _transport_set_identify(ioc, mpt3sas_phy->attached_handle, ioc 868 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 873 drivers/scsi/mpt3sas/mpt3sas_transport.c if ((ioc->logging_level & MPT_DEBUG_TRANSPORT)) ioc 897 drivers/scsi/mpt3sas/mpt3sas_transport.c mpt3sas_transport_add_expander_phy(struct MPT3SAS_ADAPTER *ioc, struct _sas_phy ioc 907 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 911 drivers/scsi/mpt3sas/mpt3sas_transport.c if ((_transport_set_identify(ioc, mpt3sas_phy->handle, ioc 913 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 922 drivers/scsi/mpt3sas/mpt3sas_transport.c _transport_set_identify(ioc, mpt3sas_phy->attached_handle, ioc 938 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 943 drivers/scsi/mpt3sas/mpt3sas_transport.c if ((ioc->logging_level & MPT_DEBUG_TRANSPORT)) ioc 965 drivers/scsi/mpt3sas/mpt3sas_transport.c mpt3sas_transport_update_links(struct MPT3SAS_ADAPTER *ioc, ioc 972 drivers/scsi/mpt3sas/mpt3sas_transport.c if (ioc->shost_recovery || ioc->pci_error_recovery) ioc 975 drivers/scsi/mpt3sas/mpt3sas_transport.c spin_lock_irqsave(&ioc->sas_node_lock, flags); ioc 976 drivers/scsi/mpt3sas/mpt3sas_transport.c sas_node = _transport_sas_node_find_by_sas_address(ioc, sas_address); ioc 978 drivers/scsi/mpt3sas/mpt3sas_transport.c spin_unlock_irqrestore(&ioc->sas_node_lock, flags); ioc 984 drivers/scsi/mpt3sas/mpt3sas_transport.c spin_unlock_irqrestore(&ioc->sas_node_lock, flags); ioc 986 drivers/scsi/mpt3sas/mpt3sas_transport.c _transport_set_identify(ioc, handle, ioc 988 drivers/scsi/mpt3sas/mpt3sas_transport.c _transport_add_phy_to_an_existing_port(ioc, sas_node, ioc 998 drivers/scsi/mpt3sas/mpt3sas_transport.c if ((ioc->logging_level & MPT_DEBUG_TRANSPORT)) ioc 1058 drivers/scsi/mpt3sas/mpt3sas_transport.c _transport_get_expander_phy_error_log(struct MPT3SAS_ADAPTER *ioc, ioc 1073 drivers/scsi/mpt3sas/mpt3sas_transport.c if (ioc->shost_recovery || ioc->pci_error_recovery) { ioc 1074 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_info(ioc, "%s: host reset in progress!\n", __func__); ioc 1078 drivers/scsi/mpt3sas/mpt3sas_transport.c mutex_lock(&ioc->transport_cmds.mutex); ioc 1080 drivers/scsi/mpt3sas/mpt3sas_transport.c if (ioc->transport_cmds.status != MPT3_CMD_NOT_USED) { ioc 1081 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "%s: transport_cmds in use\n", __func__); ioc 1085 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc->transport_cmds.status = MPT3_CMD_PENDING; ioc 1087 drivers/scsi/mpt3sas/mpt3sas_transport.c rc = mpt3sas_wait_for_ioc(ioc, IOC_OPERATIONAL_WAIT_COUNT); ioc 1091 drivers/scsi/mpt3sas/mpt3sas_transport.c smid = mpt3sas_base_get_smid(ioc, ioc->transport_cb_idx); ioc 1093 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); ioc 1098 drivers/scsi/mpt3sas/mpt3sas_transport.c mpi_request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 1099 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc->transport_cmds.smid = smid; ioc 1103 drivers/scsi/mpt3sas/mpt3sas_transport.c data_out = dma_alloc_coherent(&ioc->pdev->dev, sz, &data_out_dma, ioc 1109 drivers/scsi/mpt3sas/mpt3sas_transport.c mpt3sas_base_free_smid(ioc, smid); ioc 1132 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc->build_sg(ioc, psge, data_out_dma, ioc 1137 drivers/scsi/mpt3sas/mpt3sas_transport.c dtransportprintk(ioc, ioc 1138 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_info(ioc, "phy_error_log - send to sas_addr(0x%016llx), phy(%d)\n", ioc 1141 drivers/scsi/mpt3sas/mpt3sas_transport.c init_completion(&ioc->transport_cmds.done); ioc 1142 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc->put_smid_default(ioc, smid); ioc 1143 drivers/scsi/mpt3sas/mpt3sas_transport.c wait_for_completion_timeout(&ioc->transport_cmds.done, 10*HZ); ioc 1145 drivers/scsi/mpt3sas/mpt3sas_transport.c if (!(ioc->transport_cmds.status & MPT3_CMD_COMPLETE)) { ioc 1146 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "%s: timeout\n", __func__); ioc 1149 drivers/scsi/mpt3sas/mpt3sas_transport.c if (!(ioc->transport_cmds.status & MPT3_CMD_RESET)) ioc 1154 drivers/scsi/mpt3sas/mpt3sas_transport.c dtransportprintk(ioc, ioc_info(ioc, "phy_error_log - complete\n")); ioc 1156 drivers/scsi/mpt3sas/mpt3sas_transport.c if (ioc->transport_cmds.status & MPT3_CMD_REPLY_VALID) { ioc 1158 drivers/scsi/mpt3sas/mpt3sas_transport.c mpi_reply = ioc->transport_cmds.reply; ioc 1160 drivers/scsi/mpt3sas/mpt3sas_transport.c dtransportprintk(ioc, ioc 1161 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_info(ioc, "phy_error_log - reply data transfer size(%d)\n", ioc 1171 drivers/scsi/mpt3sas/mpt3sas_transport.c dtransportprintk(ioc, ioc 1172 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_info(ioc, "phy_error_log - function_result(%d)\n", ioc 1185 drivers/scsi/mpt3sas/mpt3sas_transport.c dtransportprintk(ioc, ioc 1186 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_info(ioc, "phy_error_log - no reply\n")); ioc 1190 drivers/scsi/mpt3sas/mpt3sas_transport.c mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER); ioc 1192 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc->transport_cmds.status = MPT3_CMD_NOT_USED; ioc 1194 drivers/scsi/mpt3sas/mpt3sas_transport.c dma_free_coherent(&ioc->pdev->dev, sz, data_out, data_out_dma); ioc 1196 drivers/scsi/mpt3sas/mpt3sas_transport.c mutex_unlock(&ioc->transport_cmds.mutex); ioc 1210 drivers/scsi/mpt3sas/mpt3sas_transport.c struct MPT3SAS_ADAPTER *ioc = phy_to_ioc(phy); ioc 1215 drivers/scsi/mpt3sas/mpt3sas_transport.c spin_lock_irqsave(&ioc->sas_node_lock, flags); ioc 1216 drivers/scsi/mpt3sas/mpt3sas_transport.c if (_transport_sas_node_find_by_sas_address(ioc, ioc 1218 drivers/scsi/mpt3sas/mpt3sas_transport.c spin_unlock_irqrestore(&ioc->sas_node_lock, flags); ioc 1221 drivers/scsi/mpt3sas/mpt3sas_transport.c spin_unlock_irqrestore(&ioc->sas_node_lock, flags); ioc 1223 drivers/scsi/mpt3sas/mpt3sas_transport.c if (phy->identify.sas_address != ioc->sas_hba.sas_address) ioc 1224 drivers/scsi/mpt3sas/mpt3sas_transport.c return _transport_get_expander_phy_error_log(ioc, phy); ioc 1227 drivers/scsi/mpt3sas/mpt3sas_transport.c if ((mpt3sas_config_get_phy_pg1(ioc, &mpi_reply, &phy_pg1, ioc 1229 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 1235 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_info(ioc, "phy(%d), ioc_status (0x%04x), loginfo(0x%08x)\n", ioc 1261 drivers/scsi/mpt3sas/mpt3sas_transport.c struct MPT3SAS_ADAPTER *ioc = rphy_to_ioc(rphy); ioc 1266 drivers/scsi/mpt3sas/mpt3sas_transport.c spin_lock_irqsave(&ioc->sas_device_lock, flags); ioc 1267 drivers/scsi/mpt3sas/mpt3sas_transport.c sas_device = __mpt3sas_get_sdev_by_addr(ioc, ioc 1278 drivers/scsi/mpt3sas/mpt3sas_transport.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 1291 drivers/scsi/mpt3sas/mpt3sas_transport.c struct MPT3SAS_ADAPTER *ioc = rphy_to_ioc(rphy); ioc 1296 drivers/scsi/mpt3sas/mpt3sas_transport.c spin_lock_irqsave(&ioc->sas_device_lock, flags); ioc 1297 drivers/scsi/mpt3sas/mpt3sas_transport.c sas_device = __mpt3sas_get_sdev_by_addr(ioc, ioc 1305 drivers/scsi/mpt3sas/mpt3sas_transport.c spin_unlock_irqrestore(&ioc->sas_device_lock, flags); ioc 1348 drivers/scsi/mpt3sas/mpt3sas_transport.c _transport_expander_phy_control(struct MPT3SAS_ADAPTER *ioc, ioc 1363 drivers/scsi/mpt3sas/mpt3sas_transport.c if (ioc->shost_recovery || ioc->pci_error_recovery) { ioc 1364 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_info(ioc, "%s: host reset in progress!\n", __func__); ioc 1368 drivers/scsi/mpt3sas/mpt3sas_transport.c mutex_lock(&ioc->transport_cmds.mutex); ioc 1370 drivers/scsi/mpt3sas/mpt3sas_transport.c if (ioc->transport_cmds.status != MPT3_CMD_NOT_USED) { ioc 1371 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "%s: transport_cmds in use\n", __func__); ioc 1375 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc->transport_cmds.status = MPT3_CMD_PENDING; ioc 1377 drivers/scsi/mpt3sas/mpt3sas_transport.c rc = mpt3sas_wait_for_ioc(ioc, IOC_OPERATIONAL_WAIT_COUNT); ioc 1381 drivers/scsi/mpt3sas/mpt3sas_transport.c smid = mpt3sas_base_get_smid(ioc, ioc->transport_cb_idx); ioc 1383 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); ioc 1388 drivers/scsi/mpt3sas/mpt3sas_transport.c mpi_request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 1389 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc->transport_cmds.smid = smid; ioc 1393 drivers/scsi/mpt3sas/mpt3sas_transport.c data_out = dma_alloc_coherent(&ioc->pdev->dev, sz, &data_out_dma, ioc 1399 drivers/scsi/mpt3sas/mpt3sas_transport.c mpt3sas_base_free_smid(ioc, smid); ioc 1427 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc->build_sg(ioc, psge, data_out_dma, ioc 1432 drivers/scsi/mpt3sas/mpt3sas_transport.c dtransportprintk(ioc, ioc 1433 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_info(ioc, "phy_control - send to sas_addr(0x%016llx), phy(%d), opcode(%d)\n", ioc 1436 drivers/scsi/mpt3sas/mpt3sas_transport.c init_completion(&ioc->transport_cmds.done); ioc 1437 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc->put_smid_default(ioc, smid); ioc 1438 drivers/scsi/mpt3sas/mpt3sas_transport.c wait_for_completion_timeout(&ioc->transport_cmds.done, 10*HZ); ioc 1440 drivers/scsi/mpt3sas/mpt3sas_transport.c if (!(ioc->transport_cmds.status & MPT3_CMD_COMPLETE)) { ioc 1441 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "%s: timeout\n", __func__); ioc 1444 drivers/scsi/mpt3sas/mpt3sas_transport.c if (!(ioc->transport_cmds.status & MPT3_CMD_RESET)) ioc 1449 drivers/scsi/mpt3sas/mpt3sas_transport.c dtransportprintk(ioc, ioc_info(ioc, "phy_control - complete\n")); ioc 1451 drivers/scsi/mpt3sas/mpt3sas_transport.c if (ioc->transport_cmds.status & MPT3_CMD_REPLY_VALID) { ioc 1453 drivers/scsi/mpt3sas/mpt3sas_transport.c mpi_reply = ioc->transport_cmds.reply; ioc 1455 drivers/scsi/mpt3sas/mpt3sas_transport.c dtransportprintk(ioc, ioc 1456 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_info(ioc, "phy_control - reply data transfer size(%d)\n", ioc 1466 drivers/scsi/mpt3sas/mpt3sas_transport.c dtransportprintk(ioc, ioc 1467 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_info(ioc, "phy_control - function_result(%d)\n", ioc 1472 drivers/scsi/mpt3sas/mpt3sas_transport.c dtransportprintk(ioc, ioc 1473 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_info(ioc, "phy_control - no reply\n")); ioc 1477 drivers/scsi/mpt3sas/mpt3sas_transport.c mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER); ioc 1479 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc->transport_cmds.status = MPT3_CMD_NOT_USED; ioc 1481 drivers/scsi/mpt3sas/mpt3sas_transport.c dma_free_coherent(&ioc->pdev->dev, sz, data_out, ioc 1484 drivers/scsi/mpt3sas/mpt3sas_transport.c mutex_unlock(&ioc->transport_cmds.mutex); ioc 1498 drivers/scsi/mpt3sas/mpt3sas_transport.c struct MPT3SAS_ADAPTER *ioc = phy_to_ioc(phy); ioc 1503 drivers/scsi/mpt3sas/mpt3sas_transport.c spin_lock_irqsave(&ioc->sas_node_lock, flags); ioc 1504 drivers/scsi/mpt3sas/mpt3sas_transport.c if (_transport_sas_node_find_by_sas_address(ioc, ioc 1506 drivers/scsi/mpt3sas/mpt3sas_transport.c spin_unlock_irqrestore(&ioc->sas_node_lock, flags); ioc 1509 drivers/scsi/mpt3sas/mpt3sas_transport.c spin_unlock_irqrestore(&ioc->sas_node_lock, flags); ioc 1512 drivers/scsi/mpt3sas/mpt3sas_transport.c if (phy->identify.sas_address != ioc->sas_hba.sas_address) ioc 1513 drivers/scsi/mpt3sas/mpt3sas_transport.c return _transport_expander_phy_control(ioc, phy, ioc 1524 drivers/scsi/mpt3sas/mpt3sas_transport.c if ((mpt3sas_base_sas_iounit_control(ioc, &mpi_reply, &mpi_request))) { ioc 1525 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 1531 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_info(ioc, "phy(%d), ioc_status(0x%04x), loginfo(0x%08x)\n", ioc 1549 drivers/scsi/mpt3sas/mpt3sas_transport.c struct MPT3SAS_ADAPTER *ioc = phy_to_ioc(phy); ioc 1559 drivers/scsi/mpt3sas/mpt3sas_transport.c spin_lock_irqsave(&ioc->sas_node_lock, flags); ioc 1560 drivers/scsi/mpt3sas/mpt3sas_transport.c if (_transport_sas_node_find_by_sas_address(ioc, ioc 1562 drivers/scsi/mpt3sas/mpt3sas_transport.c spin_unlock_irqrestore(&ioc->sas_node_lock, flags); ioc 1565 drivers/scsi/mpt3sas/mpt3sas_transport.c spin_unlock_irqrestore(&ioc->sas_node_lock, flags); ioc 1568 drivers/scsi/mpt3sas/mpt3sas_transport.c if (phy->identify.sas_address != ioc->sas_hba.sas_address) ioc 1569 drivers/scsi/mpt3sas/mpt3sas_transport.c return _transport_expander_phy_control(ioc, phy, ioc 1576 drivers/scsi/mpt3sas/mpt3sas_transport.c sz = offsetof(Mpi2SasIOUnitPage0_t, PhyData) + (ioc->sas_hba.num_phys * ioc 1580 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 1585 drivers/scsi/mpt3sas/mpt3sas_transport.c if ((mpt3sas_config_get_sas_iounit_pg0(ioc, &mpi_reply, ioc 1587 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 1595 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 1602 drivers/scsi/mpt3sas/mpt3sas_transport.c for (i = 0, discovery_active = 0; i < ioc->sas_hba.num_phys ; i++) { ioc 1605 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "discovery is active on port = %d, phy = %d: unable to enable/disable phys, try again later!\n", ioc 1617 drivers/scsi/mpt3sas/mpt3sas_transport.c sz = offsetof(Mpi2SasIOUnitPage1_t, PhyData) + (ioc->sas_hba.num_phys * ioc 1621 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 1626 drivers/scsi/mpt3sas/mpt3sas_transport.c if ((mpt3sas_config_get_sas_iounit_pg1(ioc, &mpi_reply, ioc 1628 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 1636 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 1643 drivers/scsi/mpt3sas/mpt3sas_transport.c for (i = 0; i < ioc->sas_hba.num_phys ; i++) { ioc 1662 drivers/scsi/mpt3sas/mpt3sas_transport.c mpt3sas_config_set_sas_iounit_pg1(ioc, &mpi_reply, sas_iounit_pg1, sz); ioc 1686 drivers/scsi/mpt3sas/mpt3sas_transport.c struct MPT3SAS_ADAPTER *ioc = phy_to_ioc(phy); ioc 1696 drivers/scsi/mpt3sas/mpt3sas_transport.c spin_lock_irqsave(&ioc->sas_node_lock, flags); ioc 1697 drivers/scsi/mpt3sas/mpt3sas_transport.c if (_transport_sas_node_find_by_sas_address(ioc, ioc 1699 drivers/scsi/mpt3sas/mpt3sas_transport.c spin_unlock_irqrestore(&ioc->sas_node_lock, flags); ioc 1702 drivers/scsi/mpt3sas/mpt3sas_transport.c spin_unlock_irqrestore(&ioc->sas_node_lock, flags); ioc 1715 drivers/scsi/mpt3sas/mpt3sas_transport.c if (phy->identify.sas_address != ioc->sas_hba.sas_address) { ioc 1718 drivers/scsi/mpt3sas/mpt3sas_transport.c return _transport_expander_phy_control(ioc, phy, ioc 1725 drivers/scsi/mpt3sas/mpt3sas_transport.c sz = offsetof(Mpi2SasIOUnitPage1_t, PhyData) + (ioc->sas_hba.num_phys * ioc 1729 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 1734 drivers/scsi/mpt3sas/mpt3sas_transport.c if ((mpt3sas_config_get_sas_iounit_pg1(ioc, &mpi_reply, ioc 1736 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 1744 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 1750 drivers/scsi/mpt3sas/mpt3sas_transport.c for (i = 0; i < ioc->sas_hba.num_phys; i++) { ioc 1753 drivers/scsi/mpt3sas/mpt3sas_transport.c (ioc->sas_hba.phy[i].phy->minimum_linkrate + ioc 1754 drivers/scsi/mpt3sas/mpt3sas_transport.c (ioc->sas_hba.phy[i].phy->maximum_linkrate << 4)); ioc 1762 drivers/scsi/mpt3sas/mpt3sas_transport.c if (mpt3sas_config_set_sas_iounit_pg1(ioc, &mpi_reply, sas_iounit_pg1, ioc 1764 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "failure at %s:%d/%s()!\n", ioc 1774 drivers/scsi/mpt3sas/mpt3sas_transport.c if (!mpt3sas_config_get_phy_pg0(ioc, &mpi_reply, &phy_pg0, ioc 1836 drivers/scsi/mpt3sas/mpt3sas_transport.c struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); ioc 1850 drivers/scsi/mpt3sas/mpt3sas_transport.c if (ioc->shost_recovery || ioc->pci_error_recovery) { ioc 1851 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_info(ioc, "%s: host reset in progress!\n", __func__); ioc 1856 drivers/scsi/mpt3sas/mpt3sas_transport.c rc = mutex_lock_interruptible(&ioc->transport_cmds.mutex); ioc 1860 drivers/scsi/mpt3sas/mpt3sas_transport.c if (ioc->transport_cmds.status != MPT3_CMD_NOT_USED) { ioc 1861 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "%s: transport_cmds in use\n", ioc 1866 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc->transport_cmds.status = MPT3_CMD_PENDING; ioc 1868 drivers/scsi/mpt3sas/mpt3sas_transport.c rc = _transport_map_smp_buffer(&ioc->pdev->dev, &job->request_payload, ioc 1878 drivers/scsi/mpt3sas/mpt3sas_transport.c rc = _transport_map_smp_buffer(&ioc->pdev->dev, &job->reply_payload, ioc 1883 drivers/scsi/mpt3sas/mpt3sas_transport.c rc = mpt3sas_wait_for_ioc(ioc, IOC_OPERATIONAL_WAIT_COUNT); ioc 1887 drivers/scsi/mpt3sas/mpt3sas_transport.c smid = mpt3sas_base_get_smid(ioc, ioc->transport_cb_idx); ioc 1889 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); ioc 1895 drivers/scsi/mpt3sas/mpt3sas_transport.c mpi_request = mpt3sas_base_get_msg_frame(ioc, smid); ioc 1896 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc->transport_cmds.smid = smid; ioc 1903 drivers/scsi/mpt3sas/mpt3sas_transport.c cpu_to_le64(ioc->sas_hba.sas_address); ioc 1907 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc->build_sg(ioc, psge, dma_addr_out, dma_len_out - 4, dma_addr_in, ioc 1910 drivers/scsi/mpt3sas/mpt3sas_transport.c dtransportprintk(ioc, ioc 1911 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_info(ioc, "%s: sending smp request\n", __func__)); ioc 1913 drivers/scsi/mpt3sas/mpt3sas_transport.c init_completion(&ioc->transport_cmds.done); ioc 1914 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc->put_smid_default(ioc, smid); ioc 1915 drivers/scsi/mpt3sas/mpt3sas_transport.c wait_for_completion_timeout(&ioc->transport_cmds.done, 10*HZ); ioc 1917 drivers/scsi/mpt3sas/mpt3sas_transport.c if (!(ioc->transport_cmds.status & MPT3_CMD_COMPLETE)) { ioc 1918 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_err(ioc, "%s: timeout\n", __func__); ioc 1921 drivers/scsi/mpt3sas/mpt3sas_transport.c if (!(ioc->transport_cmds.status & MPT3_CMD_RESET)) { ioc 1922 drivers/scsi/mpt3sas/mpt3sas_transport.c mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER); ioc 1928 drivers/scsi/mpt3sas/mpt3sas_transport.c dtransportprintk(ioc, ioc_info(ioc, "%s - complete\n", __func__)); ioc 1930 drivers/scsi/mpt3sas/mpt3sas_transport.c if (!(ioc->transport_cmds.status & MPT3_CMD_REPLY_VALID)) { ioc 1931 drivers/scsi/mpt3sas/mpt3sas_transport.c dtransportprintk(ioc, ioc 1932 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_info(ioc, "%s: no reply\n", __func__)); ioc 1937 drivers/scsi/mpt3sas/mpt3sas_transport.c mpi_reply = ioc->transport_cmds.reply; ioc 1939 drivers/scsi/mpt3sas/mpt3sas_transport.c dtransportprintk(ioc, ioc 1940 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc_info(ioc, "%s: reply data transfer size(%d)\n", ioc 1956 drivers/scsi/mpt3sas/mpt3sas_transport.c _transport_unmap_smp_buffer(&ioc->pdev->dev, &job->reply_payload, ioc 1959 drivers/scsi/mpt3sas/mpt3sas_transport.c _transport_unmap_smp_buffer(&ioc->pdev->dev, &job->request_payload, ioc 1962 drivers/scsi/mpt3sas/mpt3sas_transport.c ioc->transport_cmds.status = MPT3_CMD_NOT_USED; ioc 1963 drivers/scsi/mpt3sas/mpt3sas_transport.c mutex_unlock(&ioc->transport_cmds.mutex); ioc 68 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c _mpt3sas_raise_sigio(struct MPT3SAS_ADAPTER *ioc, ioc 75 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c dTriggerDiagPrintk(ioc, ioc_info(ioc, "%s: enter\n", __func__)); ioc 87 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c dTriggerDiagPrintk(ioc, ioc 88 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c ioc_info(ioc, "%s: add to driver event log\n", ioc 90 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c mpt3sas_ctl_add_to_event_log(ioc, mpi_reply); ioc 95 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c spin_lock_irqsave(&ioc->diag_trigger_lock, flags); ioc 96 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c dTriggerDiagPrintk(ioc, ioc 97 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c ioc_info(ioc, "%s: clearing diag_trigger_active flag\n", ioc 99 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c ioc->diag_trigger_active = 0; ioc 100 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c spin_unlock_irqrestore(&ioc->diag_trigger_lock, flags); ioc 102 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c dTriggerDiagPrintk(ioc, ioc_info(ioc, "%s: exit\n", ioc 112 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c mpt3sas_process_trigger_data(struct MPT3SAS_ADAPTER *ioc, ioc 117 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c dTriggerDiagPrintk(ioc, ioc_info(ioc, "%s: enter\n", __func__)); ioc 120 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c if ((ioc->diag_buffer_status[MPI2_DIAG_BUF_TYPE_TRACE] & ioc 122 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c dTriggerDiagPrintk(ioc, ioc 123 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c ioc_info(ioc, "%s: release trace diag buffer\n", ioc 125 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c mpt3sas_send_diag_release(ioc, MPI2_DIAG_BUF_TYPE_TRACE, ioc 129 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c _mpt3sas_raise_sigio(ioc, event_data); ioc 131 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c dTriggerDiagPrintk(ioc, ioc_info(ioc, "%s: exit\n", ioc 142 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c mpt3sas_trigger_master(struct MPT3SAS_ADAPTER *ioc, u32 trigger_bitmask) ioc 148 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c spin_lock_irqsave(&ioc->diag_trigger_lock, flags); ioc 155 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c if ((ioc->diag_buffer_status[MPI2_DIAG_BUF_TYPE_TRACE] & ioc 157 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c spin_unlock_irqrestore(&ioc->diag_trigger_lock, flags); ioc 162 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c if (ioc->diag_buffer_status[MPI2_DIAG_BUF_TYPE_TRACE] & ioc 164 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c spin_unlock_irqrestore(&ioc->diag_trigger_lock, flags); ioc 170 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c dTriggerDiagPrintk(ioc, ioc 171 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c ioc_info(ioc, "%s: enter - trigger_bitmask = 0x%08x\n", ioc 175 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c if (ioc->diag_trigger_active) { ioc 176 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c spin_unlock_irqrestore(&ioc->diag_trigger_lock, flags); ioc 181 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c if (ioc->diag_trigger_master.MasterData & trigger_bitmask) { ioc 183 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c ioc->diag_trigger_active = 1; ioc 184 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c dTriggerDiagPrintk(ioc, ioc 185 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c ioc_info(ioc, "%s: setting diag_trigger_active flag\n", ioc 188 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c spin_unlock_irqrestore(&ioc->diag_trigger_lock, flags); ioc 199 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c _mpt3sas_raise_sigio(ioc, &event_data); ioc 201 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c mpt3sas_send_trigger_data_event(ioc, &event_data); ioc 204 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c dTriggerDiagPrintk(ioc, ioc_info(ioc, "%s: exit\n", ioc 216 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c mpt3sas_trigger_event(struct MPT3SAS_ADAPTER *ioc, u16 event, ioc 225 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c spin_lock_irqsave(&ioc->diag_trigger_lock, flags); ioc 228 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c if ((ioc->diag_buffer_status[MPI2_DIAG_BUF_TYPE_TRACE] & ioc 230 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c spin_unlock_irqrestore(&ioc->diag_trigger_lock, flags); ioc 235 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c if (ioc->diag_buffer_status[MPI2_DIAG_BUF_TYPE_TRACE] & ioc 237 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c spin_unlock_irqrestore(&ioc->diag_trigger_lock, flags); ioc 241 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c dTriggerDiagPrintk(ioc, ioc 242 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c ioc_info(ioc, "%s: enter - event = 0x%04x, log_entry_qualifier = 0x%04x\n", ioc 246 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c if (ioc->diag_trigger_active) { ioc 247 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c spin_unlock_irqrestore(&ioc->diag_trigger_lock, flags); ioc 252 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c event_trigger = ioc->diag_trigger_event.EventTriggerEntry; ioc 253 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c for (i = 0 , found_match = 0; i < ioc->diag_trigger_event.ValidEntries ioc 264 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c ioc->diag_trigger_active = 1; ioc 265 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c dTriggerDiagPrintk(ioc, ioc 266 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c ioc_info(ioc, "%s: setting diag_trigger_active flag\n", ioc 269 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c spin_unlock_irqrestore(&ioc->diag_trigger_lock, flags); ioc 274 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c dTriggerDiagPrintk(ioc, ioc 275 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c ioc_info(ioc, "%s: setting diag_trigger_active flag\n", ioc 281 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c mpt3sas_send_trigger_data_event(ioc, &event_data); ioc 283 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c dTriggerDiagPrintk(ioc, ioc_info(ioc, "%s: exit\n", ioc 296 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c mpt3sas_trigger_scsi(struct MPT3SAS_ADAPTER *ioc, u8 sense_key, u8 asc, ioc 305 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c spin_lock_irqsave(&ioc->diag_trigger_lock, flags); ioc 308 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c if ((ioc->diag_buffer_status[MPI2_DIAG_BUF_TYPE_TRACE] & ioc 310 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c spin_unlock_irqrestore(&ioc->diag_trigger_lock, flags); ioc 315 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c if (ioc->diag_buffer_status[MPI2_DIAG_BUF_TYPE_TRACE] & ioc 317 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c spin_unlock_irqrestore(&ioc->diag_trigger_lock, flags); ioc 321 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c dTriggerDiagPrintk(ioc, ioc 322 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c ioc_info(ioc, "%s: enter - sense_key = 0x%02x, asc = 0x%02x, ascq = 0x%02x\n", ioc 326 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c if (ioc->diag_trigger_active) { ioc 327 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c spin_unlock_irqrestore(&ioc->diag_trigger_lock, flags); ioc 332 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c scsi_trigger = ioc->diag_trigger_scsi.SCSITriggerEntry; ioc 333 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c for (i = 0 , found_match = 0; i < ioc->diag_trigger_scsi.ValidEntries ioc 342 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c ioc->diag_trigger_active = 1; ioc 344 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c spin_unlock_irqrestore(&ioc->diag_trigger_lock, flags); ioc 349 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c dTriggerDiagPrintk(ioc, ioc 350 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c ioc_info(ioc, "%s: setting diag_trigger_active flag\n", ioc 357 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c mpt3sas_send_trigger_data_event(ioc, &event_data); ioc 359 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c dTriggerDiagPrintk(ioc, ioc_info(ioc, "%s: exit\n", ioc 371 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c mpt3sas_trigger_mpi(struct MPT3SAS_ADAPTER *ioc, u16 ioc_status, u32 loginfo) ioc 379 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c spin_lock_irqsave(&ioc->diag_trigger_lock, flags); ioc 382 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c if ((ioc->diag_buffer_status[MPI2_DIAG_BUF_TYPE_TRACE] & ioc 384 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c spin_unlock_irqrestore(&ioc->diag_trigger_lock, flags); ioc 389 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c if (ioc->diag_buffer_status[MPI2_DIAG_BUF_TYPE_TRACE] & ioc 391 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c spin_unlock_irqrestore(&ioc->diag_trigger_lock, flags); ioc 395 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c dTriggerDiagPrintk(ioc, ioc 396 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c ioc_info(ioc, "%s: enter - ioc_status = 0x%04x, loginfo = 0x%08x\n", ioc 400 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c if (ioc->diag_trigger_active) { ioc 401 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c spin_unlock_irqrestore(&ioc->diag_trigger_lock, flags); ioc 406 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c mpi_trigger = ioc->diag_trigger_mpi.MPITriggerEntry; ioc 407 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c for (i = 0 , found_match = 0; i < ioc->diag_trigger_mpi.ValidEntries ioc 415 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c ioc->diag_trigger_active = 1; ioc 417 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c spin_unlock_irqrestore(&ioc->diag_trigger_lock, flags); ioc 422 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c dTriggerDiagPrintk(ioc, ioc 423 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c ioc_info(ioc, "%s: setting diag_trigger_active flag\n", ioc 429 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c mpt3sas_send_trigger_data_event(ioc, &event_data); ioc 431 drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c dTriggerDiagPrintk(ioc, ioc_info(ioc, "%s: exit\n", ioc 54 drivers/scsi/mpt3sas/mpt3sas_warpdrive.c _warpdrive_disable_ddio(struct MPT3SAS_ADAPTER *ioc) ioc 64 drivers/scsi/mpt3sas/mpt3sas_warpdrive.c while (!(mpt3sas_config_get_raid_volume_pg1(ioc, &mpi_reply, ioc 71 drivers/scsi/mpt3sas/mpt3sas_warpdrive.c spin_lock_irqsave(&ioc->raid_device_lock, flags); ioc 72 drivers/scsi/mpt3sas/mpt3sas_warpdrive.c raid_device = mpt3sas_raid_device_find_by_handle(ioc, handle); ioc 75 drivers/scsi/mpt3sas/mpt3sas_warpdrive.c spin_unlock_irqrestore(&ioc->raid_device_lock, flags); ioc 86 drivers/scsi/mpt3sas/mpt3sas_warpdrive.c mpt3sas_get_num_volumes(struct MPT3SAS_ADAPTER *ioc) ioc 95 drivers/scsi/mpt3sas/mpt3sas_warpdrive.c while (!(mpt3sas_config_get_raid_volume_pg1(ioc, &mpi_reply, ioc 114 drivers/scsi/mpt3sas/mpt3sas_warpdrive.c mpt3sas_init_warpdrive_properties(struct MPT3SAS_ADAPTER *ioc, ioc 126 drivers/scsi/mpt3sas/mpt3sas_warpdrive.c if (!ioc->is_warpdrive) ioc 129 drivers/scsi/mpt3sas/mpt3sas_warpdrive.c if (ioc->mfg_pg10_hide_flag == MFG_PAGE10_EXPOSE_ALL_DISKS) { ioc 130 drivers/scsi/mpt3sas/mpt3sas_warpdrive.c ioc_info(ioc, "WarpDrive : Direct IO is disabled globally as drives are exposed\n"); ioc 133 drivers/scsi/mpt3sas/mpt3sas_warpdrive.c if (mpt3sas_get_num_volumes(ioc) > 1) { ioc 134 drivers/scsi/mpt3sas/mpt3sas_warpdrive.c _warpdrive_disable_ddio(ioc); ioc 135 drivers/scsi/mpt3sas/mpt3sas_warpdrive.c ioc_info(ioc, "WarpDrive : Direct IO is disabled globally as number of drives > 1\n"); ioc 138 drivers/scsi/mpt3sas/mpt3sas_warpdrive.c if ((mpt3sas_config_get_number_pds(ioc, raid_device->handle, ioc 140 drivers/scsi/mpt3sas/mpt3sas_warpdrive.c ioc_info(ioc, "WarpDrive : Direct IO is disabled Failure in computing number of drives\n"); ioc 148 drivers/scsi/mpt3sas/mpt3sas_warpdrive.c ioc_info(ioc, "WarpDrive : Direct IO is disabled Memory allocation failure for RVPG0\n"); ioc 152 drivers/scsi/mpt3sas/mpt3sas_warpdrive.c if ((mpt3sas_config_get_raid_volume_pg0(ioc, &mpi_reply, vol_pg0, ioc 154 drivers/scsi/mpt3sas/mpt3sas_warpdrive.c ioc_info(ioc, "WarpDrive : Direct IO is disabled Failure in retrieving RVPG0\n"); ioc 164 drivers/scsi/mpt3sas/mpt3sas_warpdrive.c ioc_warn(ioc, "WarpDrive : Direct IO is disabled for the drive with handle(0x%04x): num_mem=%d, max_mem_allowed=%d\n", ioc 170 drivers/scsi/mpt3sas/mpt3sas_warpdrive.c if (mpt3sas_config_get_phys_disk_pg0(ioc, &mpi_reply, ioc 175 drivers/scsi/mpt3sas/mpt3sas_warpdrive.c ioc_info(ioc, "WarpDrive : Direct IO is disabled for the drive with handle(0x%04x) member handle retrieval failed for member number=%d\n", ioc 183 drivers/scsi/mpt3sas/mpt3sas_warpdrive.c ioc_info(ioc, "WarpDrive : Direct IO is disabled for the drive with handle(0x%04x) member handle (0x%04x) unsupported max lba 0x%016llx\n", ioc 198 drivers/scsi/mpt3sas/mpt3sas_warpdrive.c ioc_info(ioc, "WarpDrive : Direct IO is disabled for the drive with handle(0x%04x): type=%d, s_sz=%uK, blk_size=%u\n", ioc 209 drivers/scsi/mpt3sas/mpt3sas_warpdrive.c ioc_info(ioc, "WarpDrive : Direct IO is disabled for the drive with handle(0x%04x) invalid stripe sz %uK\n", ioc 219 drivers/scsi/mpt3sas/mpt3sas_warpdrive.c ioc_info(ioc, "WarpDrive : Direct IO is disabled for the drive with handle(0x%04x) invalid block sz %u\n", ioc 226 drivers/scsi/mpt3sas/mpt3sas_warpdrive.c ioc_info(ioc, "WarpDrive : Direct IO is Enabled for the drive with handle(0x%04x)\n", ioc 256 drivers/scsi/mpt3sas/mpt3sas_warpdrive.c mpt3sas_setup_direct_io(struct MPT3SAS_ADAPTER *ioc, struct scsi_cmnd *scmd, ioc 112 drivers/spi/spi-ath79.c u32 ioc = sp->ioc_base; ioc 119 drivers/spi/spi-ath79.c out = ioc | AR71XX_SPI_IOC_DO; ioc 121 drivers/spi/spi-ath79.c out = ioc & ~AR71XX_SPI_IOC_DO; ioc 343 drivers/spi/spidev.c struct spi_ioc_transfer *ioc; ioc 466 drivers/spi/spidev.c ioc = spidev_get_ioc_message(cmd, ioc 468 drivers/spi/spidev.c if (IS_ERR(ioc)) { ioc 469 drivers/spi/spidev.c retval = PTR_ERR(ioc); ioc 472 drivers/spi/spidev.c if (!ioc) ioc 476 drivers/spi/spidev.c retval = spidev_message(spidev, ioc, n_ioc); ioc 477 drivers/spi/spidev.c kfree(ioc); ioc 496 drivers/spi/spidev.c struct spi_ioc_transfer *ioc; ioc 515 drivers/spi/spidev.c ioc = spidev_get_ioc_message(cmd, u_ioc, &n_ioc); ioc 516 drivers/spi/spidev.c if (IS_ERR(ioc)) { ioc 517 drivers/spi/spidev.c retval = PTR_ERR(ioc); ioc 520 drivers/spi/spidev.c if (!ioc) ioc 525 drivers/spi/spidev.c ioc[n].rx_buf = (uintptr_t) compat_ptr(ioc[n].rx_buf); ioc 526 drivers/spi/spidev.c ioc[n].tx_buf = (uintptr_t) compat_ptr(ioc[n].tx_buf); ioc 530 drivers/spi/spidev.c retval = spidev_message(spidev, ioc, n_ioc); ioc 531 drivers/spi/spidev.c kfree(ioc); ioc 210 drivers/usb/gadget/udc/mv_u3d.h u32 ioc:1; /* interrupt on complete */ ioc 325 drivers/usb/gadget/udc/mv_u3d_core.c trb_hw->ctrl.ioc = 1; ioc 382 drivers/usb/gadget/udc/mv_u3d_core.c trb->trb_hw->ctrl.ioc = 1; ioc 88 drivers/usb/host/fhci-mem.c u16 interval, u16 start_frame, bool ioc) ioc 104 drivers/usb/host/fhci-mem.c td->ioc = ioc; ioc 156 drivers/usb/host/fhci-q.c if (td->ioc) ioc 351 drivers/usb/host/fhci.h bool ioc; /* Inform On Completion */ ioc 520 drivers/usb/host/fhci.h u16 interval, u16 start_frame, bool ioc); ioc 651 fs/btrfs/volumes.c struct io_context *ioc; ioc 653 fs/btrfs/volumes.c ioc = current->io_context; ioc 664 fs/btrfs/volumes.c if (ioc && ioc->nr_batch_requests > 0 && ioc 665 fs/btrfs/volumes.c time_before(jiffies, ioc->last_waited + HZ/50UL) && ioc 667 fs/btrfs/volumes.c ioc->last_waited == last_waited)) { ioc 674 fs/btrfs/volumes.c last_waited = ioc->last_waited; ioc 124 fs/nfs/write.c static void nfs_io_completion_init(struct nfs_io_completion *ioc, ioc 127 fs/nfs/write.c ioc->complete = complete; ioc 128 fs/nfs/write.c ioc->data = data; ioc 129 fs/nfs/write.c kref_init(&ioc->refcount); ioc 134 fs/nfs/write.c struct nfs_io_completion *ioc = container_of(kref, ioc 136 fs/nfs/write.c ioc->complete(ioc->data); ioc 137 fs/nfs/write.c kfree(ioc); ioc 140 fs/nfs/write.c static void nfs_io_completion_get(struct nfs_io_completion *ioc) ioc 142 fs/nfs/write.c if (ioc != NULL) ioc 143 fs/nfs/write.c kref_get(&ioc->refcount); ioc 146 fs/nfs/write.c static void nfs_io_completion_put(struct nfs_io_completion *ioc) ioc 148 fs/nfs/write.c if (ioc != NULL) ioc 149 fs/nfs/write.c kref_put(&ioc->refcount, nfs_io_completion_release); ioc 725 fs/nfs/write.c struct nfs_io_completion *ioc; ioc 730 fs/nfs/write.c ioc = nfs_io_completion_alloc(GFP_KERNEL); ioc 731 fs/nfs/write.c if (ioc) ioc 732 fs/nfs/write.c nfs_io_completion_init(ioc, nfs_io_completion_commit, inode); ioc 736 fs/nfs/write.c pgio.pg_io_completion = ioc; ioc 740 fs/nfs/write.c nfs_io_completion_put(ioc); ioc 75 include/linux/iocontext.h struct io_context *ioc; ioc 130 include/linux/iocontext.h static inline void get_io_context_active(struct io_context *ioc) ioc 132 include/linux/iocontext.h WARN_ON_ONCE(atomic_long_read(&ioc->refcount) <= 0); ioc 133 include/linux/iocontext.h WARN_ON_ONCE(atomic_read(&ioc->active_ref) <= 0); ioc 134 include/linux/iocontext.h atomic_long_inc(&ioc->refcount); ioc 135 include/linux/iocontext.h atomic_inc(&ioc->active_ref); ioc 138 include/linux/iocontext.h static inline void ioc_task_link(struct io_context *ioc) ioc 140 include/linux/iocontext.h get_io_context_active(ioc); ioc 142 include/linux/iocontext.h WARN_ON_ONCE(atomic_read(&ioc->nr_tasks) <= 0); ioc 143 include/linux/iocontext.h atomic_inc(&ioc->nr_tasks); ioc 148 include/linux/iocontext.h void put_io_context(struct io_context *ioc); ioc 149 include/linux/iocontext.h void put_io_context_active(struct io_context *ioc); ioc 155 include/linux/iocontext.h static inline void put_io_context(struct io_context *ioc) { } ioc 79 include/linux/ioprio.h struct io_context *ioc = current->io_context; ioc 81 include/linux/ioprio.h if (ioc) ioc 82 include/linux/ioprio.h return ioc->ioprio; ioc 5 include/trace/events/iocost.h struct ioc; ioc 22 include/trace/events/iocost.h __string(devname, ioc_name(iocg->ioc)) ioc 38 include/trace/events/iocost.h __assign_str(devname, ioc_name(iocg->ioc)); ioc 75 include/trace/events/iocost.h __string(devname, ioc_name(iocg->ioc)) ioc 85 include/trace/events/iocost.h __assign_str(devname, ioc_name(iocg->ioc)); ioc 133 include/trace/events/iocost.h TP_PROTO(struct ioc *ioc, u64 new_vrate, u32 *missed_ppm, ioc 137 include/trace/events/iocost.h TP_ARGS(ioc, new_vrate, missed_ppm, rq_wait_pct, nr_lagging, nr_shortages, ioc 141 include/trace/events/iocost.h __string(devname, ioc_name(ioc)) ioc 154 include/trace/events/iocost.h __assign_str(devname, ioc_name(ioc)); ioc 155 include/trace/events/iocost.h __entry->old_vrate = atomic64_read(&ioc->vtime_rate);; ioc 157 include/trace/events/iocost.h __entry->busy_level = ioc->busy_level; ioc 1476 kernel/fork.c struct io_context *ioc = current->io_context; ioc 1479 kernel/fork.c if (!ioc) ioc 1485 kernel/fork.c ioc_task_link(ioc); ioc 1486 kernel/fork.c tsk->io_context = ioc; ioc 1487 kernel/fork.c } else if (ioprio_valid(ioc->ioprio)) { ioc 1492 kernel/fork.c new_ioc->ioprio = ioc->ioprio; ioc 39 net/rxrpc/conn_event.c int ret, ioc; ioc 85 net/rxrpc/conn_event.c ioc = 1; ioc 106 net/rxrpc/conn_event.c ioc = 3; ioc 136 net/rxrpc/conn_event.c ret = kernel_sendmsg(conn->params.local->socket, &msg, iov, ioc, len); ioc 519 net/rxrpc/output.c int ret, ioc; ioc 543 net/rxrpc/output.c ioc = 1; ioc 549 net/rxrpc/output.c ioc = 2; ioc 568 net/rxrpc/output.c iov, ioc, size); ioc 26 security/keys/compat.c unsigned ioc, ioc 34 security/keys/compat.c ioc = 0; ioc 36 security/keys/compat.c ret = compat_import_iovec(WRITE, _payload_iov, ioc, ioc 1271 security/keys/keyctl.c unsigned ioc, ioc 1279 security/keys/keyctl.c ioc = 0; ioc 1281 security/keys/keyctl.c ret = import_iovec(WRITE, _payload_iov, ioc, ioc 32 sound/soc/sof/intel/hda-stream.c int offset, int size, int ioc) ioc 62 sound/soc/sof/intel/hda-stream.c bdl->ioc = (size || !ioc) ? 0 : cpu_to_le32(0x01); ioc 86 sound/soc/sof/intel/hda-stream.c int remain, ioc; ioc 110 sound/soc/sof/intel/hda-stream.c ioc = hda->no_ipc_position ? ioc 122 sound/soc/sof/intel/hda-stream.c period_bytes, ioc); ioc 375 sound/soc/sof/intel/hda.h __le32 ioc; ioc 185 tools/perf/lib/evsel.c int ioc, void *arg) ioc 192 tools/perf/lib/evsel.c err = ioctl(fd, ioc, arg);