Lines Matching refs:irq_ptr
1360 qdio_irq_t *irq_ptr; in __tiqdio_inbound_processing() local
1418 irq_ptr=(qdio_irq_t*)q->irq_ptr; in __tiqdio_inbound_processing()
1419 for (i=0;i<irq_ptr->no_output_qs;i++) { in __tiqdio_inbound_processing()
1420 oq=irq_ptr->output_qs[i]; in __tiqdio_inbound_processing()
1607 qdio_irq_t *irq_ptr; in qdio_get_irq_ptr() local
1611 irq_ptr=first_irq[bucket]; in qdio_get_irq_ptr()
1612 while (irq_ptr) { in qdio_get_irq_ptr()
1613 if (irq_ptr->irq==irq) break; in qdio_get_irq_ptr()
1614 irq_ptr=irq_ptr->next; in qdio_get_irq_ptr()
1617 return irq_ptr; in qdio_get_irq_ptr()
1622 qdio_irq_t *irq_ptr=first_irq[irq&(QDIO_IRQ_BUCKETS-1)]; in qdio_get_irq_ptr_wolock() local
1624 while (irq_ptr) { in qdio_get_irq_ptr_wolock()
1625 if (irq_ptr->irq==irq) break; in qdio_get_irq_ptr_wolock()
1626 irq_ptr=irq_ptr->next; in qdio_get_irq_ptr_wolock()
1628 return irq_ptr; in qdio_get_irq_ptr_wolock()
1632 static void qdio_insert_irq_ptr(qdio_irq_t *irq_ptr) in qdio_insert_irq_ptr() argument
1637 if (!irq_ptr) return; in qdio_insert_irq_ptr()
1639 irq=irq_ptr->irq; in qdio_insert_irq_ptr()
1644 if (irq_ptr==qdio_get_irq_ptr_wolock(irq)) goto out; in qdio_insert_irq_ptr()
1647 first_irq[bucket]=irq_ptr; in qdio_insert_irq_ptr()
1652 i_p->next=irq_ptr; in qdio_insert_irq_ptr()
1654 irq_ptr->next=NULL; in qdio_insert_irq_ptr()
1659 static void qdio_remove_irq_ptr(qdio_irq_t *irq_ptr) in qdio_remove_irq_ptr() argument
1664 if (!irq_ptr) return; in qdio_remove_irq_ptr()
1666 irq=irq_ptr->irq; in qdio_remove_irq_ptr()
1673 if (first_irq[irq&(QDIO_IRQ_BUCKETS-1)]==irq_ptr) { in qdio_remove_irq_ptr()
1674 first_irq[irq&(QDIO_IRQ_BUCKETS-1)]=irq_ptr->next; in qdio_remove_irq_ptr()
1677 i_p->next!=irq_ptr;i_p=i_p->next); in qdio_remove_irq_ptr()
1678 i_p->next=irq_ptr->next; in qdio_remove_irq_ptr()
1680 irq_ptr->next=NULL; in qdio_remove_irq_ptr()
1685 static void qdio_release_irq_memory(qdio_irq_t *irq_ptr) in qdio_release_irq_memory() argument
1691 if (!irq_ptr->input_qs[i]) goto next; in qdio_release_irq_memory()
1693 if (!irq_ptr->input_qs[i]->is_0copy_sbals_q) in qdio_release_irq_memory()
1696 if (irq_ptr->input_qs[i]->sbal[j]) in qdio_release_irq_memory()
1697 kfree((void*)irq_ptr-> in qdio_release_irq_memory()
1703 if (irq_ptr->input_qs[i]->slib) in qdio_release_irq_memory()
1704 kfree(irq_ptr->input_qs[i]->slib); in qdio_release_irq_memory()
1705 kfree(irq_ptr->input_qs[i]); in qdio_release_irq_memory()
1708 if (!irq_ptr->output_qs[i]) continue; in qdio_release_irq_memory()
1710 if (!irq_ptr->output_qs[i]->is_0copy_sbals_q) in qdio_release_irq_memory()
1713 if (irq_ptr->output_qs[i]->sbal[j]) in qdio_release_irq_memory()
1714 kfree((void*)irq_ptr-> in qdio_release_irq_memory()
1720 if (irq_ptr->output_qs[i]->slib) in qdio_release_irq_memory()
1721 kfree(irq_ptr->output_qs[i]->slib); in qdio_release_irq_memory()
1722 kfree(irq_ptr->output_qs[i]); in qdio_release_irq_memory()
1725 kfree(irq_ptr->qdr); in qdio_release_irq_memory()
1726 kfree(irq_ptr); in qdio_release_irq_memory()
1729 static inline void qdio_wakeup(atomic_t *var,qdio_irq_t *irq_ptr) in qdio_wakeup() argument
1735 sprintf(dbf_text,"qwkp%4x",irq_ptr->irq); in qdio_wakeup()
1740 if ((wait_q=&irq_ptr->wait_q)) in qdio_wakeup()
1744 static int qdio_sleepon(atomic_t *var,int timeout,qdio_irq_t *irq_ptr) in qdio_sleepon() argument
1752 sprintf(dbf_text,"qslp%4x",irq_ptr->irq); in qdio_sleepon()
1756 add_wait_queue(&irq_ptr->wait_q,¤t_wait_q); in qdio_sleepon()
1767 sprintf(dbf_text,"%xtime",irq_ptr->irq); in qdio_sleepon()
1777 remove_wait_queue(&irq_ptr->wait_q,¤t_wait_q); in qdio_sleepon()
1781 static void qdio_set_impl_params(qdio_irq_t *irq_ptr, in qdio_set_impl_params() argument
1793 if (!irq_ptr) return; in qdio_set_impl_params()
1795 irq_ptr->qib.pfmt=qib_param_field_format; in qdio_set_impl_params()
1797 memcpy(irq_ptr->qib.parm,qib_param_field, in qdio_set_impl_params()
1803 irq_ptr->input_qs[i]->slib->slibe[j].parms= in qdio_set_impl_params()
1810 irq_ptr->output_qs[i]->slib->slibe[j].parms= in qdio_set_impl_params()
1818 static int qdio_alloc_qs(qdio_irq_t *irq_ptr,int no_input_qs,int no_output_qs, in qdio_alloc_qs() argument
1875 irq_ptr->input_qs[i]=q; in qdio_alloc_qs()
1876 q->irq=irq_ptr->irq; in qdio_alloc_qs()
1877 q->irq_ptr=irq_ptr; in qdio_alloc_qs()
1885 q->dev_st_chg_ind=irq_ptr->dev_st_chg_ind; in qdio_alloc_qs()
1891 ((irq_ptr->is_thinint_irq)?&tiqdio_inbound_processing: in qdio_alloc_qs()
1905 if (i>0) irq_ptr->input_qs[i-1]->slib->nsliba= in qdio_alloc_qs()
1974 irq_ptr->output_qs[i]=q; in qdio_alloc_qs()
1977 q->irq=irq_ptr->irq; in qdio_alloc_qs()
1978 q->irq_ptr=irq_ptr; in qdio_alloc_qs()
1993 if (i>0) irq_ptr->output_qs[i-1]->slib->nsliba= in qdio_alloc_qs()
2025 static void qdio_fill_thresholds(qdio_irq_t *irq_ptr, in qdio_fill_thresholds() argument
2037 q=irq_ptr->input_qs[i]; in qdio_fill_thresholds()
2048 q=irq_ptr->output_qs[i]; in qdio_fill_thresholds()
2082 static void qdio_set_state(qdio_irq_t *irq_ptr,int state) in qdio_set_state() argument
2088 sprintf(dbf_text,"%4x%4x",irq_ptr->irq,state); in qdio_set_state()
2091 irq_ptr->state=state; in qdio_set_state()
2092 for (i=0;i<irq_ptr->no_input_qs;i++) in qdio_set_state()
2093 irq_ptr->input_qs[i]->state=state; in qdio_set_state()
2094 for (i=0;i<irq_ptr->no_output_qs;i++) in qdio_set_state()
2095 irq_ptr->output_qs[i]->state=state; in qdio_set_state()
2101 qdio_irq_t *irq_ptr; in qdio_handler() local
2121 irq_ptr=qdio_get_irq_ptr(irq); in qdio_handler()
2122 if (!irq_ptr) { in qdio_handler()
2140 irq_ptr->io_result_cstat=ioinfo[irq]->devstat.cstat; in qdio_handler()
2141 irq_ptr->io_result_dstat=ioinfo[irq]->devstat.dstat; in qdio_handler()
2142 irq_ptr->io_result_flags=ioinfo[irq]->devstat.flag; in qdio_handler()
2150 for (i=0;i<irq_ptr->no_input_qs;i++) { in qdio_handler()
2151 q=irq_ptr->input_qs[i]; in qdio_handler()
2161 if (irq_ptr->hydra_gives_outbound_pcis) { in qdio_handler()
2162 for (i=0;i<irq_ptr->no_output_qs;i++) { in qdio_handler()
2163 q=irq_ptr->output_qs[i]; in qdio_handler()
2168 if (!irq_ptr->sync_done_on_outb_pcis) { in qdio_handler()
2195 qdio_set_state(irq_ptr,QDIO_IRQ_STATE_STOPPED); in qdio_handler()
2202 qdio_wakeup(&irq_ptr->interrupt_has_been_cleaned,irq_ptr); in qdio_handler()
2217 if (irq_ptr->no_input_qs) { in qdio_handler()
2218 q=irq_ptr->input_qs[0]; in qdio_handler()
2219 } else if (irq_ptr->no_output_qs) { in qdio_handler()
2220 q=irq_ptr->output_qs[0]; in qdio_handler()
2230 qdio_set_state(irq_ptr,QDIO_IRQ_STATE_STOPPED); in qdio_handler()
2234 qdio_wakeup(&irq_ptr->interrupt_has_arrived,irq_ptr); in qdio_handler()
2244 qdio_irq_t *irq_ptr; in qdio_synchronize() local
2254 irq_ptr=qdio_get_irq_ptr(irq); in qdio_synchronize()
2255 if (!irq_ptr) return -ENODEV; in qdio_synchronize()
2258 q=irq_ptr->input_qs[queue_number]; in qdio_synchronize()
2264 q=irq_ptr->output_qs[queue_number]; in qdio_synchronize()
2309 qdio_irq_t *irq_ptr; in qdio_get_slsb_state() local
2312 irq_ptr=qdio_get_irq_ptr(irq); in qdio_get_slsb_state()
2313 if (!irq_ptr) return SLSB_ERROR_DURING_LOOKUP; in qdio_get_slsb_state()
2316 q=irq_ptr->input_qs[queue_number]; in qdio_get_slsb_state()
2318 q=irq_ptr->output_qs[queue_number]; in qdio_get_slsb_state()
2504 static unsigned int tiqdio_set_subchannel_ind(qdio_irq_t *irq_ptr, in tiqdio_set_subchannel_ind() argument
2516 if (!irq_ptr->is_thinint_irq) return -ENODEV; in tiqdio_set_subchannel_ind()
2525 virt_to_phys((volatile void *)irq_ptr->dev_st_chg_ind); in tiqdio_set_subchannel_ind()
2547 subsystem_id=(1<<16)+irq_ptr->irq; in tiqdio_set_subchannel_ind()
2552 "cc=%i.\n",irq_ptr->irq,result); in tiqdio_set_subchannel_ind()
2581 static unsigned int tiqdio_set_delay_target(qdio_irq_t *irq_ptr, in tiqdio_set_delay_target() argument
2590 if (!irq_ptr->is_thinint_irq) return -ENODEV; in tiqdio_set_delay_target()
2603 "cc=%i. Continuing.\n",irq_ptr->irq,result); in tiqdio_set_delay_target()
2628 qdio_irq_t *irq_ptr; in qdio_cleanup() local
2640 irq_ptr=qdio_get_irq_ptr(irq); in qdio_cleanup()
2641 if (!irq_ptr) return -ENODEV; in qdio_cleanup()
2643 down(&irq_ptr->setting_up_lock); in qdio_cleanup()
2646 for (i=0;i<irq_ptr->no_input_qs;i++) { in qdio_cleanup()
2647 atomic_set(&irq_ptr->input_qs[i]->is_in_shutdown,1); in qdio_cleanup()
2649 for (i=0;i<irq_ptr->no_output_qs;i++) { in qdio_cleanup()
2650 atomic_set(&irq_ptr->output_qs[i]->is_in_shutdown,1); in qdio_cleanup()
2655 for (i=0;i<irq_ptr->no_input_qs;i++) { in qdio_cleanup()
2656 qdio_unmark_q(irq_ptr->input_qs[i]); in qdio_cleanup()
2657 tasklet_kill(&irq_ptr->input_qs[i]->tasklet); in qdio_cleanup()
2658 if (qdio_wait_for_no_use_count(&irq_ptr->input_qs[i]-> in qdio_cleanup()
2663 for (i=0;i<irq_ptr->no_output_qs;i++) { in qdio_cleanup()
2664 tasklet_kill(&irq_ptr->output_qs[i]->tasklet); in qdio_cleanup()
2665 if (qdio_wait_for_no_use_count(&irq_ptr->output_qs[i]-> in qdio_cleanup()
2670 atomic_set(&irq_ptr->interrupt_has_been_cleaned,0); in qdio_cleanup()
2675 clear_IO(irq_ptr->irq,QDIO_DOING_CLEANUP,0); in qdio_cleanup()
2678 halt_IO(irq_ptr->irq,QDIO_DOING_CLEANUP,0); in qdio_cleanup()
2681 halt_IO(irq_ptr->irq,QDIO_DOING_CLEANUP,0); in qdio_cleanup()
2686 if (qdio_sleepon(&irq_ptr->interrupt_has_been_cleaned, in qdio_cleanup()
2687 timeout,irq_ptr)==-ETIME) { in qdio_cleanup()
2696 if (irq_ptr->is_thinint_irq) { in qdio_cleanup()
2697 qdio_put_indicator((__u32*)irq_ptr->dev_st_chg_ind); in qdio_cleanup()
2698 tiqdio_set_subchannel_ind(irq_ptr,1); /* reset adapter in qdio_cleanup()
2706 irq_ptr->original_int_handler; in qdio_cleanup()
2710 qdio_set_state(irq_ptr,QDIO_IRQ_STATE_INACTIVE); in qdio_cleanup()
2715 up(&irq_ptr->setting_up_lock); in qdio_cleanup()
2717 qdio_remove_irq_ptr(irq_ptr); in qdio_cleanup()
2718 qdio_release_irq_memory(irq_ptr); in qdio_cleanup()
2728 qdio_irq_t *irq_ptr; in qdio_get_characteristics() local
2731 irq_ptr=qdio_get_irq_ptr(irq); in qdio_get_characteristics()
2732 if (!irq_ptr) return -ENODEV; in qdio_get_characteristics()
2734 if (irq_ptr->state!=QDIO_IRQ_STATE_ACTIVE) { in qdio_get_characteristics()
2738 if (irq_ptr->state==QDIO_IRQ_STATE_INACTIVE) { in qdio_get_characteristics()
2740 } else if (irq_ptr->state==QDIO_IRQ_STATE_ESTABLISHED) { in qdio_get_characteristics()
2742 } else if (irq_ptr->state==QDIO_IRQ_STATE_ACTIVE) { in qdio_get_characteristics()
2744 } else if (irq_ptr->state==QDIO_IRQ_STATE_STOPPED) { in qdio_get_characteristics()
2748 if (irq_ptr->hydra_gives_outbound_pcis) in qdio_get_characteristics()
2758 qdio_irq_t *irq_ptr=NULL; in qdio_initialize() local
2843 irq_ptr=kmalloc(sizeof(qdio_irq_t),GFP_DMA); in qdio_initialize()
2846 QDIO_DBF_HEX0(0,setup,&irq_ptr,sizeof(void*)); in qdio_initialize()
2848 if (!irq_ptr) { in qdio_initialize()
2854 memset(irq_ptr,0,sizeof(qdio_irq_t)); /* wipes qib.ac, in qdio_initialize()
2857 irq_ptr->qdr=kmalloc(sizeof(qdr_t),GFP_DMA); in qdio_initialize()
2858 if (!(irq_ptr->qdr)) { in qdio_initialize()
2859 kfree(irq_ptr); in qdio_initialize()
2864 memset(irq_ptr->qdr,0,sizeof(qdr_t)); in qdio_initialize()
2866 QDIO_DBF_HEX0(0,setup,&irq_ptr->qdr,sizeof(void*)); in qdio_initialize()
2868 init_waitqueue_head(&irq_ptr->wait_q); in qdio_initialize()
2870 irq_ptr->int_parm=init_data->int_parm; in qdio_initialize()
2872 irq_ptr->irq=init_data->irq; in qdio_initialize()
2873 irq_ptr->no_input_qs=init_data->no_input_qs; in qdio_initialize()
2874 irq_ptr->no_output_qs=init_data->no_output_qs; in qdio_initialize()
2877 irq_ptr->is_iqdio_irq=1; in qdio_initialize()
2878 irq_ptr->is_thinint_irq=1; in qdio_initialize()
2880 irq_ptr->is_iqdio_irq=0; in qdio_initialize()
2881 irq_ptr->is_thinint_irq=hydra_thinints; in qdio_initialize()
2884 irq_ptr->is_iqdio_irq,irq_ptr->is_thinint_irq); in qdio_initialize()
2887 if (irq_ptr->is_thinint_irq) { in qdio_initialize()
2888 irq_ptr->dev_st_chg_ind=qdio_get_indicator(); in qdio_initialize()
2889 QDIO_DBF_HEX1(0,setup,&irq_ptr->dev_st_chg_ind,sizeof(void*)); in qdio_initialize()
2890 if (!irq_ptr->dev_st_chg_ind) { in qdio_initialize()
2892 "for irq 0x%x\n",irq_ptr->irq); in qdio_initialize()
2893 qdio_release_irq_memory(irq_ptr); in qdio_initialize()
2900 irq_ptr->other_flags |= QDIO_PFIX; in qdio_initialize()
2903 irq_ptr->commands.eq=DEFAULT_ESTABLISH_QS_CMD; in qdio_initialize()
2904 irq_ptr->commands.count_eq=DEFAULT_ESTABLISH_QS_COUNT; in qdio_initialize()
2905 irq_ptr->commands.aq=DEFAULT_ACTIVATE_QS_CMD; in qdio_initialize()
2906 irq_ptr->commands.count_aq=DEFAULT_ACTIVATE_QS_COUNT; in qdio_initialize()
2908 if (!qdio_alloc_qs(irq_ptr,init_data->no_input_qs, in qdio_initialize()
2915 qdio_release_irq_memory(irq_ptr); in qdio_initialize()
2920 qdio_set_state(irq_ptr,QDIO_IRQ_STATE_INACTIVE); in qdio_initialize()
2922 sema_init(&irq_ptr->setting_up_lock,1); in qdio_initialize()
2927 down(&irq_ptr->setting_up_lock); in qdio_initialize()
2929 qdio_insert_irq_ptr(irq_ptr); in qdio_initialize()
2931 qdio_fill_thresholds(irq_ptr,init_data->no_input_qs, in qdio_initialize()
2939 irq_ptr->qdr->qfmt=init_data->q_format; in qdio_initialize()
2940 irq_ptr->qdr->iqdcnt=init_data->no_input_qs; in qdio_initialize()
2941 irq_ptr->qdr->oqdcnt=init_data->no_output_qs; in qdio_initialize()
2942 irq_ptr->qdr->iqdsz=sizeof(qdesfmt0_t)/4; /* size in words */ in qdio_initialize()
2943 irq_ptr->qdr->oqdsz=sizeof(qdesfmt0_t)/4; in qdio_initialize()
2945 irq_ptr->qdr->qiba=QDIO_PFIX_GET_ADDR(&irq_ptr->qib); in qdio_initialize()
2946 irq_ptr->qdr->qkey=QDIO_STORAGE_ACC_KEY; in qdio_initialize()
2949 irq_ptr->qib.qfmt=init_data->q_format; in qdio_initialize()
2950 if (init_data->no_input_qs) irq_ptr->qib.isliba= in qdio_initialize()
2951 QDIO_PFIX_GET_ADDR(irq_ptr->input_qs[0]->slib); in qdio_initialize()
2952 if (init_data->no_output_qs) irq_ptr->qib.osliba=(unsigned long) in qdio_initialize()
2953 QDIO_PFIX_GET_ADDR(irq_ptr->output_qs[0]->slib); in qdio_initialize()
2954 memcpy(irq_ptr->qib.ebcnam,init_data->adapter_name,8); in qdio_initialize()
2956 qdio_set_impl_params(irq_ptr,init_data->qib_param_field_format, in qdio_initialize()
2965 irq_ptr->input_qs[i]->is_iqdio_q= in qdio_initialize()
2967 irq_ptr->input_qs[i]->is_thinint_q=irq_ptr->is_thinint_irq; in qdio_initialize()
2969 irq_ptr->qdr->qdf0[i].sliba= in qdio_initialize()
2970 QDIO_PFIX_GET_ADDR(irq_ptr->input_qs[i]->slib); in qdio_initialize()
2972 irq_ptr->qdr->qdf0[i].sla= in qdio_initialize()
2973 QDIO_PFIX_GET_ADDR(irq_ptr->input_qs[i]->sl); in qdio_initialize()
2975 irq_ptr->qdr->qdf0[i].slsba= in qdio_initialize()
2977 ((void *)&irq_ptr->input_qs[i]->slsb.acc.val[0]); in qdio_initialize()
2979 irq_ptr->qdr->qdf0[i].akey=QDIO_STORAGE_ACC_KEY; in qdio_initialize()
2980 irq_ptr->qdr->qdf0[i].bkey=QDIO_STORAGE_ACC_KEY; in qdio_initialize()
2981 irq_ptr->qdr->qdf0[i].ckey=QDIO_STORAGE_ACC_KEY; in qdio_initialize()
2982 irq_ptr->qdr->qdf0[i].dkey=QDIO_STORAGE_ACC_KEY; in qdio_initialize()
2986 irq_ptr->output_qs[i]->is_iqdio_q= in qdio_initialize()
2988 irq_ptr->output_qs[i]->is_thinint_q=irq_ptr->is_thinint_irq; in qdio_initialize()
2990 irq_ptr->qdr->qdf0[i+init_data->no_input_qs].sliba= in qdio_initialize()
2991 QDIO_PFIX_GET_ADDR(irq_ptr->output_qs[i]->slib); in qdio_initialize()
2993 irq_ptr->qdr->qdf0[i+init_data->no_input_qs].sla= in qdio_initialize()
2994 QDIO_PFIX_GET_ADDR(irq_ptr->output_qs[i]->sl); in qdio_initialize()
2996 irq_ptr->qdr->qdf0[i+init_data->no_input_qs].slsba= in qdio_initialize()
2998 ((void *)&irq_ptr->output_qs[i]->slsb.acc.val[0]); in qdio_initialize()
3000 irq_ptr->qdr->qdf0[i+init_data->no_input_qs].akey= in qdio_initialize()
3002 irq_ptr->qdr->qdf0[i+init_data->no_input_qs].bkey= in qdio_initialize()
3004 irq_ptr->qdr->qdf0[i+init_data->no_input_qs].ckey= in qdio_initialize()
3006 irq_ptr->qdr->qdf0[i+init_data->no_input_qs].dkey= in qdio_initialize()
3011 s390irq_spin_lock_irqsave(irq_ptr->irq,saveflags); in qdio_initialize()
3013 irq_ptr->original_int_handler=ioinfo[irq_ptr->irq]->irq_desc.handler; in qdio_initialize()
3016 ioinfo[irq_ptr->irq]->irq_desc.handler=(void*)qdio_handler; in qdio_initialize()
3018 s390irq_spin_unlock_irqrestore(irq_ptr->irq,saveflags); in qdio_initialize()
3020 …fine TAKEOVER_CIW(x) irq_ptr->commands.x=ioinfo[irq_ptr->irq]->senseid.ciw[ciw_cnt].cmd; irq_ptr->… in qdio_initialize()
3024 switch (ioinfo[irq_ptr->irq]->senseid.ciw[ciw_cnt].ct) { in qdio_initialize()
3032 (ioinfo[irq_ptr->irq]->senseid.ciw[ciw_cnt].ct==0) && in qdio_initialize()
3033 (ioinfo[irq_ptr->irq]->senseid.ciw[ciw_cnt].cmd==0) && in qdio_initialize()
3034 (ioinfo[irq_ptr->irq]->senseid.ciw[ciw_cnt].count) ) in qdio_initialize()
3044 if (irq_ptr->is_thinint_irq) { in qdio_initialize()
3051 result=tiqdio_set_subchannel_ind(irq_ptr,0); in qdio_initialize()
3053 up(&irq_ptr->setting_up_lock); in qdio_initialize()
3054 qdio_cleanup(irq_ptr->irq, in qdio_initialize()
3058 tiqdio_set_delay_target(irq_ptr,TIQDIO_DELAY_TARGET); in qdio_initialize()
3062 irq_ptr->ccw.cmd_code=irq_ptr->commands.eq; in qdio_initialize()
3063 irq_ptr->ccw.flags=CCW_FLAG_SLI; in qdio_initialize()
3064 irq_ptr->ccw.count=irq_ptr->commands.count_eq; in qdio_initialize()
3065 irq_ptr->ccw.cda=QDIO_GET_32BIT_ADDR(QDIO_PFIX_GET_ADDR(irq_ptr->qdr)); in qdio_initialize()
3067 s390irq_spin_lock_irqsave(irq_ptr->irq,saveflags); in qdio_initialize()
3068 atomic_set(&irq_ptr->interrupt_has_arrived,0); in qdio_initialize()
3070 result=do_IO(irq_ptr->irq,&irq_ptr->ccw,QDIO_DOING_ESTABLISH,0, in qdio_initialize()
3071 ((irq_ptr->other_flags&QDIO_PFIX)?DOIO_USE_DIAG98:0)); in qdio_initialize()
3073 result2=do_IO(irq_ptr->irq,&irq_ptr->ccw, in qdio_initialize()
3075 ((irq_ptr->other_flags&QDIO_PFIX)? in qdio_initialize()
3085 irq_ptr->irq,result,result2); in qdio_initialize()
3089 s390irq_spin_unlock_irqrestore(irq_ptr->irq,saveflags); in qdio_initialize()
3092 up(&irq_ptr->setting_up_lock); in qdio_initialize()
3093 qdio_cleanup(irq_ptr->irq,QDIO_FLAG_CLEANUP_USING_CLEAR); in qdio_initialize()
3097 result=qdio_sleepon(&irq_ptr->interrupt_has_arrived, in qdio_initialize()
3098 QDIO_ESTABLISH_TIMEOUT,irq_ptr); in qdio_initialize()
3102 irq_ptr->irq); in qdio_initialize()
3104 up(&irq_ptr->setting_up_lock); in qdio_initialize()
3105 qdio_cleanup(irq_ptr->irq,QDIO_FLAG_CLEANUP_USING_CLEAR); in qdio_initialize()
3109 if (!(irq_ptr->io_result_dstat & DEV_STAT_DEV_END)) { in qdio_initialize()
3111 QDIO_DBF_HEX2(0,setup,&irq_ptr->io_result_dstat, in qdio_initialize()
3112 sizeof(irq_ptr->io_result_dstat)); in qdio_initialize()
3113 QDIO_DBF_HEX2(0,setup,&irq_ptr->io_result_cstat, in qdio_initialize()
3114 sizeof(irq_ptr->io_result_cstat)); in qdio_initialize()
3115 QDIO_DBF_HEX2(0,setup,&irq_ptr->io_result_flags, in qdio_initialize()
3116 sizeof(irq_ptr->io_result_flags)); in qdio_initialize()
3120 irq_ptr->irq,irq_ptr->io_result_dstat, in qdio_initialize()
3121 irq_ptr->io_result_cstat, in qdio_initialize()
3122 irq_ptr->io_result_flags); in qdio_initialize()
3123 up(&irq_ptr->setting_up_lock); in qdio_initialize()
3124 qdio_cleanup(irq_ptr->irq,QDIO_FLAG_CLEANUP_USING_CLEAR); in qdio_initialize()
3129 if (irq_ptr->io_result_dstat & ~(DEV_STAT_CHN_END|DEV_STAT_DEV_END)) { in qdio_initialize()
3131 QDIO_DBF_HEX2(0,setup,&irq_ptr->io_result_dstat, in qdio_initialize()
3132 sizeof(irq_ptr->io_result_dstat)); in qdio_initialize()
3133 QDIO_DBF_HEX2(0,setup,&irq_ptr->io_result_cstat, in qdio_initialize()
3134 sizeof(irq_ptr->io_result_cstat)); in qdio_initialize()
3135 QDIO_DBF_HEX2(0,setup,&irq_ptr->io_result_flags, in qdio_initialize()
3136 sizeof(irq_ptr->io_result_flags)); in qdio_initialize()
3140 irq_ptr->irq,irq_ptr->io_result_dstat, in qdio_initialize()
3141 irq_ptr->io_result_cstat, in qdio_initialize()
3142 irq_ptr->io_result_flags); in qdio_initialize()
3144 up(&irq_ptr->setting_up_lock); in qdio_initialize()
3148 irq_ptr->qdioac=qdio_check_siga_needs(irq_ptr->irq); in qdio_initialize()
3149 sprintf(dbf_text,"qdioac%2x",irq_ptr->qdioac); in qdio_initialize()
3153 if (irq_ptr->qdioac&CHSC_FLAG_SIGA_SYNC_NECESSARY) { in qdio_initialize()
3157 sprintf(dbf_text,"qib ac%2x",irq_ptr->qib.ac); in qdio_initialize()
3161 irq_ptr->hydra_gives_outbound_pcis= in qdio_initialize()
3162 irq_ptr->qib.ac&QIB_AC_OUTBOUND_PCI_SUPPORTED; in qdio_initialize()
3164 irq_ptr->hydra_gives_outbound_pcis=0; in qdio_initialize()
3166 irq_ptr->sync_done_on_outb_pcis= in qdio_initialize()
3167 irq_ptr->qdioac&CHSC_FLAG_SIGA_SYNC_DONE_ON_OUTB_PCIS; in qdio_initialize()
3170 irq_ptr->input_qs[i]->siga_sync= in qdio_initialize()
3171 irq_ptr->qdioac&CHSC_FLAG_SIGA_SYNC_NECESSARY; in qdio_initialize()
3172 irq_ptr->input_qs[i]->siga_in= in qdio_initialize()
3173 irq_ptr->qdioac&CHSC_FLAG_SIGA_INPUT_NECESSARY; in qdio_initialize()
3174 irq_ptr->input_qs[i]->siga_out= in qdio_initialize()
3175 irq_ptr->qdioac&CHSC_FLAG_SIGA_OUTPUT_NECESSARY; in qdio_initialize()
3176 irq_ptr->input_qs[i]->siga_sync_done_on_thinints= in qdio_initialize()
3177 irq_ptr->qdioac&CHSC_FLAG_SIGA_SYNC_DONE_ON_THININTS; in qdio_initialize()
3178 irq_ptr->input_qs[i]->hydra_gives_outbound_pcis= in qdio_initialize()
3179 irq_ptr->hydra_gives_outbound_pcis; in qdio_initialize()
3180 irq_ptr->input_qs[i]->siga_sync_done_on_outb_tis= in qdio_initialize()
3181 ( (irq_ptr->qdioac& in qdio_initialize()
3189 irq_ptr->output_qs[i]->siga_sync= in qdio_initialize()
3190 irq_ptr->qdioac&CHSC_FLAG_SIGA_SYNC_NECESSARY; in qdio_initialize()
3191 irq_ptr->output_qs[i]->siga_in= in qdio_initialize()
3192 irq_ptr->qdioac&CHSC_FLAG_SIGA_INPUT_NECESSARY; in qdio_initialize()
3193 irq_ptr->output_qs[i]->siga_out= in qdio_initialize()
3194 irq_ptr->qdioac&CHSC_FLAG_SIGA_OUTPUT_NECESSARY; in qdio_initialize()
3195 irq_ptr->output_qs[i]->siga_sync_done_on_thinints= in qdio_initialize()
3196 irq_ptr->qdioac&CHSC_FLAG_SIGA_SYNC_DONE_ON_THININTS; in qdio_initialize()
3197 irq_ptr->output_qs[i]->hydra_gives_outbound_pcis= in qdio_initialize()
3198 irq_ptr->hydra_gives_outbound_pcis; in qdio_initialize()
3199 irq_ptr->output_qs[i]->siga_sync_done_on_outb_tis= in qdio_initialize()
3200 ( (irq_ptr->qdioac& in qdio_initialize()
3208 memcpy(init_data->qib_param_field,irq_ptr->qib.parm, in qdio_initialize()
3211 qdio_set_state(irq_ptr,QDIO_IRQ_STATE_ESTABLISHED); in qdio_initialize()
3213 if (irq_ptr) { in qdio_initialize()
3214 up(&irq_ptr->setting_up_lock); in qdio_initialize()
3224 qdio_irq_t *irq_ptr; in qdio_activate() local
3229 irq_ptr=qdio_get_irq_ptr(irq); in qdio_activate()
3230 if (!irq_ptr) return -ENODEV; in qdio_activate()
3232 down(&irq_ptr->setting_up_lock); in qdio_activate()
3233 if (irq_ptr->state==QDIO_IRQ_STATE_INACTIVE) { in qdio_activate()
3243 irq_ptr->ccw.cmd_code=irq_ptr->commands.aq; in qdio_activate()
3244 irq_ptr->ccw.flags=CCW_FLAG_SLI; in qdio_activate()
3245 irq_ptr->ccw.count=irq_ptr->commands.count_aq; in qdio_activate()
3246 irq_ptr->ccw.cda=QDIO_GET_32BIT_ADDR(0); /* no QDIO_PFIX_GET_ADDR here, in qdio_activate()
3249 s390irq_spin_lock_irqsave(irq_ptr->irq,saveflags); in qdio_activate()
3250 atomic_set(&irq_ptr->interrupt_has_arrived,0); in qdio_activate()
3252 result=do_IO(irq_ptr->irq,&irq_ptr->ccw,QDIO_DOING_ACTIVATE, in qdio_activate()
3254 ((irq_ptr->other_flags&QDIO_PFIX)?DOIO_USE_DIAG98:0)); in qdio_activate()
3256 result2=do_IO(irq_ptr->irq,&irq_ptr->ccw, in qdio_activate()
3258 ((irq_ptr->other_flags&QDIO_PFIX) ? in qdio_activate()
3268 irq_ptr->irq,result,result2); in qdio_activate()
3272 s390irq_spin_unlock_irqrestore(irq_ptr->irq,saveflags); in qdio_activate()
3278 result=qdio_sleepon(&irq_ptr->interrupt_has_arrived, in qdio_activate()
3279 QDIO_ACTIVATE_TIMEOUT,irq_ptr); in qdio_activate()
3283 QDIO_DBF_HEX2(0,setup,&irq_ptr->io_result_dstat, in qdio_activate()
3284 sizeof(irq_ptr->io_result_dstat)); in qdio_activate()
3285 QDIO_DBF_HEX2(0,setup,&irq_ptr->io_result_cstat, in qdio_activate()
3286 sizeof(irq_ptr->io_result_cstat)); in qdio_activate()
3287 QDIO_DBF_HEX2(0,setup,&irq_ptr->io_result_flags, in qdio_activate()
3288 sizeof(irq_ptr->io_result_flags)); in qdio_activate()
3292 irq_ptr->irq,irq_ptr->io_result_dstat, in qdio_activate()
3293 irq_ptr->io_result_cstat, in qdio_activate()
3294 irq_ptr->io_result_flags); in qdio_activate()
3302 for (i=0;i<irq_ptr->no_input_qs;i++) { in qdio_activate()
3303 if (irq_ptr->is_thinint_irq) { in qdio_activate()
3309 qdio_reserve_q(irq_ptr->input_qs[i]); in qdio_activate()
3310 qdio_mark_tiq(irq_ptr->input_qs[i]); in qdio_activate()
3311 qdio_release_q(irq_ptr->input_qs[i]); in qdio_activate()
3316 for (i=0;i<irq_ptr->no_input_qs;i++) { in qdio_activate()
3317 irq_ptr->input_qs[i]->is_input_q|= in qdio_activate()
3324 qdio_set_state(irq_ptr,QDIO_IRQ_STATE_ACTIVE); in qdio_activate()
3327 up(&irq_ptr->setting_up_lock); in qdio_activate()
3378 qdio_irq_t *irq_ptr; in do_QDIO() local
3396 irq_ptr=qdio_get_irq_ptr(irq); in do_QDIO()
3397 if (!irq_ptr) return -ENODEV; in do_QDIO()
3401 QDIO_DBF_HEX3(0,trace,&irq_ptr->input_qs[queue_number], in do_QDIO()
3404 QDIO_DBF_HEX3(0,trace,&irq_ptr->output_qs[queue_number], in do_QDIO()
3411 (!irq_ptr->input_qs[queue_number]->is_0copy_sbals_q)) || in do_QDIO()
3413 (!irq_ptr->output_qs[queue_number]->is_0copy_sbals_q)) ) in do_QDIO()
3417 if (irq_ptr->state!=QDIO_IRQ_STATE_ACTIVE) { in do_QDIO()
3423 q=irq_ptr->input_qs[queue_number]; in do_QDIO()
3454 q=irq_ptr->output_qs[queue_number]; in do_QDIO()
3517 qdio_irq_t *irq_ptr; in qdio_perf_procfile_read() local
3554 irq_ptr=first_irq[bucket]; in qdio_perf_procfile_read()
3556 while (irq_ptr) { in qdio_perf_procfile_read()
3559 irq_ptr->irq,irq_ptr->input_qs[0]-> in qdio_perf_procfile_read()
3561 irq_ptr=irq_ptr->next; in qdio_perf_procfile_read()