aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/viocons.c
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2006-01-11 21:47:43 -0500
committerPaul Mackerras <paulus@samba.org>2006-01-12 04:09:29 -0500
commit677f8c0d0455a35aaff08a0292ba9c6232ef4eb1 (patch)
treeebac30f3413ecc2eeb2b1f8788b379ac6b56a237 /drivers/char/viocons.c
parent6814350b80e0e7dfb87d2faebbcbef876573897c (diff)
[PATCH] powerpc: remove bitfields from HvLpEvent
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/char/viocons.c')
-rw-r--r--drivers/char/viocons.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/drivers/char/viocons.c b/drivers/char/viocons.c
index faee5e7acaf7..4e5360388748 100644
--- a/drivers/char/viocons.c
+++ b/drivers/char/viocons.c
@@ -476,19 +476,19 @@ static struct port_info *get_port_data(struct tty_struct *tty)
476 */ 476 */
477static void initDataEvent(struct viocharlpevent *viochar, HvLpIndex lp) 477static void initDataEvent(struct viocharlpevent *viochar, HvLpIndex lp)
478{ 478{
479 struct HvLpEvent *hev = &viochar->event;
480
479 memset(viochar, 0, sizeof(struct viocharlpevent)); 481 memset(viochar, 0, sizeof(struct viocharlpevent));
480 482
481 viochar->event.xFlags.xValid = 1; 483 hev->flags = HV_LP_EVENT_VALID | HV_LP_EVENT_DEFERRED_ACK |
482 viochar->event.xFlags.xFunction = HvLpEvent_Function_Int; 484 HV_LP_EVENT_INT;
483 viochar->event.xFlags.xAckInd = HvLpEvent_AckInd_NoAck; 485 hev->xType = HvLpEvent_Type_VirtualIo;
484 viochar->event.xFlags.xAckType = HvLpEvent_AckType_DeferredAck; 486 hev->xSubtype = viomajorsubtype_chario | viochardata;
485 viochar->event.xType = HvLpEvent_Type_VirtualIo; 487 hev->xSourceLp = HvLpConfig_getLpIndex();
486 viochar->event.xSubtype = viomajorsubtype_chario | viochardata; 488 hev->xTargetLp = lp;
487 viochar->event.xSourceLp = HvLpConfig_getLpIndex(); 489 hev->xSizeMinus1 = sizeof(struct viocharlpevent);
488 viochar->event.xTargetLp = lp; 490 hev->xSourceInstanceId = viopath_sourceinst(lp);
489 viochar->event.xSizeMinus1 = sizeof(struct viocharlpevent); 491 hev->xTargetInstanceId = viopath_targetinst(lp);
490 viochar->event.xSourceInstanceId = viopath_sourceinst(lp);
491 viochar->event.xTargetInstanceId = viopath_targetinst(lp);
492} 492}
493 493
494/* 494/*
@@ -752,7 +752,7 @@ static void vioHandleOpenEvent(struct HvLpEvent *event)
752 struct port_info *pi; 752 struct port_info *pi;
753 int reject = 0; 753 int reject = 0;
754 754
755 if (event->xFlags.xFunction == HvLpEvent_Function_Ack) { 755 if (hvlpevent_is_ack(event)) {
756 if (port >= VTTY_PORTS) 756 if (port >= VTTY_PORTS)
757 return; 757 return;
758 758
@@ -788,7 +788,7 @@ static void vioHandleOpenEvent(struct HvLpEvent *event)
788 } 788 }
789 789
790 /* This had better require an ack, otherwise complain */ 790 /* This had better require an ack, otherwise complain */
791 if (event->xFlags.xAckInd != HvLpEvent_AckInd_DoAck) { 791 if (!hvlpevent_need_ack(event)) {
792 printk(VIOCONS_KERN_WARN "viocharopen without ack bit!\n"); 792 printk(VIOCONS_KERN_WARN "viocharopen without ack bit!\n");
793 return; 793 return;
794 } 794 }
@@ -856,7 +856,7 @@ static void vioHandleCloseEvent(struct HvLpEvent *event)
856 struct viocharlpevent *cevent = (struct viocharlpevent *)event; 856 struct viocharlpevent *cevent = (struct viocharlpevent *)event;
857 u8 port = cevent->virtual_device; 857 u8 port = cevent->virtual_device;
858 858
859 if (event->xFlags.xFunction == HvLpEvent_Function_Int) { 859 if (hvlpevent_is_int(event)) {
860 if (port >= VTTY_PORTS) { 860 if (port >= VTTY_PORTS) {
861 printk(VIOCONS_KERN_WARN 861 printk(VIOCONS_KERN_WARN
862 "close message from invalid virtual device.\n"); 862 "close message from invalid virtual device.\n");
@@ -1056,8 +1056,7 @@ static void vioHandleCharEvent(struct HvLpEvent *event)
1056 vioHandleConfig(event); 1056 vioHandleConfig(event);
1057 break; 1057 break;
1058 default: 1058 default:
1059 if ((event->xFlags.xFunction == HvLpEvent_Function_Int) && 1059 if (hvlpevent_is_int(event) && hvlpevent_need_ack(event)) {
1060 (event->xFlags.xAckInd == HvLpEvent_AckInd_DoAck)) {
1061 event->xRc = HvLpEvent_Rc_InvalidSubtype; 1060 event->xRc = HvLpEvent_Rc_InvalidSubtype;
1062 HvCallEvent_ackLpEvent(event); 1061 HvCallEvent_ackLpEvent(event);
1063 } 1062 }