@@ -310,26 +310,27 @@ static inline int qdio_siga_sync_q(struct qdio_q *q)
310
310
return qdio_siga_sync (q , q -> mask , 0 );
311
311
}
312
312
313
- static int qdio_siga_output (struct qdio_q * q , unsigned int * busy_bit ,
314
- unsigned long aob )
313
+ static int qdio_siga_output (struct qdio_q * q , unsigned int count ,
314
+ unsigned int * busy_bit , unsigned long aob )
315
315
{
316
316
unsigned long schid = * ((u32 * ) & q -> irq_ptr -> schid );
317
317
unsigned int fc = QDIO_SIGA_WRITE ;
318
318
u64 start_time = 0 ;
319
319
int retries = 0 , cc ;
320
- unsigned long laob = 0 ;
321
320
322
- if (aob ) {
323
- fc = QDIO_SIGA_WRITEQ ;
324
- laob = aob ;
321
+ if (queue_type (q ) == QDIO_IQDIO_QFMT && !multicast_outbound (q )) {
322
+ if (count > 1 )
323
+ fc = QDIO_SIGA_WRITEM ;
324
+ else if (aob )
325
+ fc = QDIO_SIGA_WRITEQ ;
325
326
}
326
327
327
328
if (is_qebsm (q )) {
328
329
schid = q -> irq_ptr -> sch_token ;
329
330
fc |= QDIO_SIGA_QEBSM_FLAG ;
330
331
}
331
332
again :
332
- cc = do_siga_output (schid , q -> mask , busy_bit , fc , laob );
333
+ cc = do_siga_output (schid , q -> mask , busy_bit , fc , aob );
333
334
334
335
/* hipersocket busy condition */
335
336
if (unlikely (* busy_bit )) {
@@ -781,7 +782,8 @@ static inline int qdio_outbound_q_moved(struct qdio_q *q, unsigned int start)
781
782
return count ;
782
783
}
783
784
784
- static int qdio_kick_outbound_q (struct qdio_q * q , unsigned long aob )
785
+ static int qdio_kick_outbound_q (struct qdio_q * q , unsigned int count ,
786
+ unsigned long aob )
785
787
{
786
788
int retries = 0 , cc ;
787
789
unsigned int busy_bit ;
@@ -793,7 +795,7 @@ static int qdio_kick_outbound_q(struct qdio_q *q, unsigned long aob)
793
795
retry :
794
796
qperf_inc (q , siga_write );
795
797
796
- cc = qdio_siga_output (q , & busy_bit , aob );
798
+ cc = qdio_siga_output (q , count , & busy_bit , aob );
797
799
switch (cc ) {
798
800
case 0 :
799
801
break ;
@@ -1526,7 +1528,7 @@ static int handle_inbound(struct qdio_q *q, unsigned int callflags,
1526
1528
* @count: how many buffers are filled
1527
1529
*/
1528
1530
static int handle_outbound (struct qdio_q * q , unsigned int callflags ,
1529
- int bufnr , int count )
1531
+ unsigned int bufnr , unsigned int count )
1530
1532
{
1531
1533
const unsigned int scan_threshold = q -> irq_ptr -> scan_threshold ;
1532
1534
unsigned char state = 0 ;
@@ -1549,13 +1551,10 @@ static int handle_outbound(struct qdio_q *q, unsigned int callflags,
1549
1551
if (queue_type (q ) == QDIO_IQDIO_QFMT ) {
1550
1552
unsigned long phys_aob = 0 ;
1551
1553
1552
- /* One SIGA-W per buffer required for unicast HSI */
1553
- WARN_ON_ONCE (count > 1 && !multicast_outbound (q ));
1554
-
1555
- if (q -> u .out .use_cq )
1554
+ if (q -> u .out .use_cq && count == 1 )
1556
1555
phys_aob = qdio_aob_for_buffer (& q -> u .out , bufnr );
1557
1556
1558
- rc = qdio_kick_outbound_q (q , phys_aob );
1557
+ rc = qdio_kick_outbound_q (q , count , phys_aob );
1559
1558
} else if (need_siga_sync (q )) {
1560
1559
rc = qdio_siga_sync_q (q );
1561
1560
} else if (count < QDIO_MAX_BUFFERS_PER_Q &&
@@ -1564,7 +1563,7 @@ static int handle_outbound(struct qdio_q *q, unsigned int callflags,
1564
1563
/* The previous buffer is not processed yet, tack on. */
1565
1564
qperf_inc (q , fast_requeue );
1566
1565
} else {
1567
- rc = qdio_kick_outbound_q (q , 0 );
1566
+ rc = qdio_kick_outbound_q (q , count , 0 );
1568
1567
}
1569
1568
1570
1569
/* Let drivers implement their own completion scanning: */
0 commit comments