@@ -417,13 +417,17 @@ enum qeth_qdio_out_buffer_state {
417417 QETH_QDIO_BUF_EMPTY ,
418418 /* Filled by driver; owned by hardware in order to be sent. */
419419 QETH_QDIO_BUF_PRIMED ,
420- /* Discovered by the TX completion code: */
421- QETH_QDIO_BUF_PENDING ,
422- /* Finished by the TX completion code: */
423- QETH_QDIO_BUF_NEED_QAOB ,
424- /* Received QAOB notification on CQ: */
425- QETH_QDIO_BUF_QAOB_OK ,
426- QETH_QDIO_BUF_QAOB_ERROR ,
420+ };
421+
422+ enum qeth_qaob_state {
423+ QETH_QAOB_ISSUED ,
424+ QETH_QAOB_PENDING ,
425+ QETH_QAOB_DONE ,
426+ };
427+
428+ struct qeth_qaob_priv1 {
429+ unsigned int state ;
430+ u8 queue_no ;
427431};
428432
429433struct qeth_qdio_out_buffer {
@@ -433,9 +437,8 @@ struct qeth_qdio_out_buffer {
433437 unsigned int frames ;
434438 unsigned int bytes ;
435439 struct sk_buff_head skb_list ;
436- int is_header [ QDIO_MAX_ELEMENTS_PER_BUFFER ] ;
440+ DECLARE_BITMAP ( from_kmem_cache , QDIO_MAX_ELEMENTS_PER_BUFFER ) ;
437441
438- struct qeth_qdio_out_q * q ;
439442 struct list_head list_entry ;
440443 struct qaob * aob ;
441444};
@@ -483,6 +486,7 @@ struct qeth_out_q_stats {
483486 u64 stopped ;
484487 u64 doorbell ;
485488 u64 coal_frames ;
489+ u64 completion_irq ;
486490 u64 completion_yield ;
487491 u64 completion_timer ;
488492
@@ -526,6 +530,7 @@ struct qeth_qdio_out_q {
526530
527531 unsigned int coalesce_usecs ;
528532 unsigned int max_coalesced_frames ;
533+ unsigned int rescan_usecs ;
529534};
530535
531536#define qeth_for_each_output_queue (card , q , i ) \
@@ -612,7 +617,6 @@ struct qeth_channel {
612617 struct ccw_device * ccwdev ;
613618 struct qeth_cmd_buffer * active_cmd ;
614619 enum qeth_channel_states state ;
615- atomic_t irq_pending ;
616620};
617621
618622struct qeth_reply {
@@ -662,11 +666,6 @@ static inline struct ccw1 *__ccw_from_cmd(struct qeth_cmd_buffer *iob)
662666 return (struct ccw1 * )(iob -> data + ALIGN (iob -> length , 8 ));
663667}
664668
665- static inline bool qeth_trylock_channel (struct qeth_channel * channel )
666- {
667- return atomic_cmpxchg (& channel -> irq_pending , 0 , 1 ) == 0 ;
668- }
669-
670669/**
671670 * OSA card related definitions
672671 */
@@ -886,13 +885,24 @@ static inline bool qeth_card_hw_is_reachable(struct qeth_card *card)
886885 return card -> state == CARD_STATE_SOFTSETUP ;
887886}
888887
888+ static inline bool qeth_use_tx_irqs (struct qeth_card * card )
889+ {
890+ return !IS_IQD (card );
891+ }
892+
889893static inline void qeth_unlock_channel (struct qeth_card * card ,
890894 struct qeth_channel * channel )
891895{
892- atomic_set (& channel -> irq_pending , 0 );
896+ xchg (& channel -> active_cmd , NULL );
893897 wake_up (& card -> wait_q );
894898}
895899
900+ static inline bool qeth_trylock_channel (struct qeth_channel * channel ,
901+ struct qeth_cmd_buffer * cmd )
902+ {
903+ return cmpxchg (& channel -> active_cmd , NULL , cmd ) == NULL ;
904+ }
905+
896906struct qeth_trap_id {
897907 __u16 lparnr ;
898908 char vmname [8 ];
0 commit comments