aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/viohs.c
diff options
context:
space:
mode:
authorDavid L Stevens <david.stevens@oracle.com>2014-09-29 19:47:59 -0400
committerDavid S. Miller <davem@davemloft.net>2014-09-30 17:17:08 -0400
commit163a4e7473061388bba0899a1a063bae44e1715a (patch)
treecee8585401e0efb14d3ea54c436b403f144c4513 /arch/sparc/kernel/viohs.c
parent9d0713edf72461438bc3526e4ea55fec47754cd9 (diff)
sparc: VIO protocol version 1.6
Add VIO protocol version 1.6 interfaces. Signed-off-by: David L Stevens <david.stevens@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/viohs.c')
-rw-r--r--arch/sparc/kernel/viohs.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/sparc/kernel/viohs.c b/arch/sparc/kernel/viohs.c
index 9c5fbd0b8a04..526fcb5d8ce9 100644
--- a/arch/sparc/kernel/viohs.c
+++ b/arch/sparc/kernel/viohs.c
@@ -426,6 +426,13 @@ static int process_dreg_info(struct vio_driver_state *vio,
426 if (vio->dr_state & VIO_DR_STATE_RXREG) 426 if (vio->dr_state & VIO_DR_STATE_RXREG)
427 goto send_nack; 427 goto send_nack;
428 428
429 /* v1.6 and higher, ACK with desired, supported mode, or NACK */
430 if (vio_version_after_eq(vio, 1, 6)) {
431 if (!(pkt->options & VIO_TX_DRING))
432 goto send_nack;
433 pkt->options = VIO_TX_DRING;
434 }
435
429 BUG_ON(vio->desc_buf); 436 BUG_ON(vio->desc_buf);
430 437
431 vio->desc_buf = kzalloc(pkt->descr_size, GFP_ATOMIC); 438 vio->desc_buf = kzalloc(pkt->descr_size, GFP_ATOMIC);
@@ -453,8 +460,11 @@ static int process_dreg_info(struct vio_driver_state *vio,
453 pkt->tag.stype = VIO_SUBTYPE_ACK; 460 pkt->tag.stype = VIO_SUBTYPE_ACK;
454 pkt->dring_ident = ++dr->ident; 461 pkt->dring_ident = ++dr->ident;
455 462
456 viodbg(HS, "SEND DRING_REG ACK ident[%llx]\n", 463 viodbg(HS, "SEND DRING_REG ACK ident[%llx] "
457 (unsigned long long) pkt->dring_ident); 464 "ndesc[%u] dsz[%u] opt[0x%x] ncookies[%u]\n",
465 (unsigned long long) pkt->dring_ident,
466 pkt->num_descr, pkt->descr_size, pkt->options,
467 pkt->num_cookies);
458 468
459 len = (sizeof(*pkt) + 469 len = (sizeof(*pkt) +
460 (dr->ncookies * sizeof(struct ldc_trans_cookie))); 470 (dr->ncookies * sizeof(struct ldc_trans_cookie)));