aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-01-12 13:21:22 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-12 13:21:22 -0500
commit45bfe98bd790b5ded00462cd582effcfb42263cc (patch)
treed4a1f2c5303dda106635b615f8f40ea9104bf25e /drivers/block
parent9f5974c8734d83d4ab7096ed98136a82f41210d6 (diff)
parent624cee31bcb14bfd85559fbec5dd7bb833542965 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge
Fix up delete/modify conflict of arch/ppc/kernel/process.c by hand (it's gone, gone, gone). Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/viodasd.c32
1 files changed, 15 insertions, 17 deletions
diff --git a/drivers/block/viodasd.c b/drivers/block/viodasd.c
index d1aaf31bd97e..f63e07bd9f9c 100644
--- a/drivers/block/viodasd.c
+++ b/drivers/block/viodasd.c
@@ -293,6 +293,7 @@ static int send_request(struct request *req)
293 u16 viocmd; 293 u16 viocmd;
294 HvLpEvent_Rc hvrc; 294 HvLpEvent_Rc hvrc;
295 struct vioblocklpevent *bevent; 295 struct vioblocklpevent *bevent;
296 struct HvLpEvent *hev;
296 struct scatterlist sg[VIOMAXBLOCKDMA]; 297 struct scatterlist sg[VIOMAXBLOCKDMA];
297 int sgindex; 298 int sgindex;
298 int statindex; 299 int statindex;
@@ -347,22 +348,19 @@ static int send_request(struct request *req)
347 * token so we can match the response up later 348 * token so we can match the response up later
348 */ 349 */
349 memset(bevent, 0, sizeof(struct vioblocklpevent)); 350 memset(bevent, 0, sizeof(struct vioblocklpevent));
350 bevent->event.xFlags.xValid = 1; 351 hev = &bevent->event;
351 bevent->event.xFlags.xFunction = HvLpEvent_Function_Int; 352 hev->flags = HV_LP_EVENT_VALID | HV_LP_EVENT_DO_ACK |
352 bevent->event.xFlags.xAckInd = HvLpEvent_AckInd_DoAck; 353 HV_LP_EVENT_INT;
353 bevent->event.xFlags.xAckType = HvLpEvent_AckType_ImmediateAck; 354 hev->xType = HvLpEvent_Type_VirtualIo;
354 bevent->event.xType = HvLpEvent_Type_VirtualIo; 355 hev->xSubtype = viocmd;
355 bevent->event.xSubtype = viocmd; 356 hev->xSourceLp = HvLpConfig_getLpIndex();
356 bevent->event.xSourceLp = HvLpConfig_getLpIndex(); 357 hev->xTargetLp = viopath_hostLp;
357 bevent->event.xTargetLp = viopath_hostLp; 358 hev->xSizeMinus1 =
358 bevent->event.xSizeMinus1 =
359 offsetof(struct vioblocklpevent, u.rw_data.dma_info) + 359 offsetof(struct vioblocklpevent, u.rw_data.dma_info) +
360 (sizeof(bevent->u.rw_data.dma_info[0]) * nsg) - 1; 360 (sizeof(bevent->u.rw_data.dma_info[0]) * nsg) - 1;
361 bevent->event.xSourceInstanceId = 361 hev->xSourceInstanceId = viopath_sourceinst(viopath_hostLp);
362 viopath_sourceinst(viopath_hostLp); 362 hev->xTargetInstanceId = viopath_targetinst(viopath_hostLp);
363 bevent->event.xTargetInstanceId = 363 hev->xCorrelationToken = (u64)req;
364 viopath_targetinst(viopath_hostLp);
365 bevent->event.xCorrelationToken = (u64)req;
366 bevent->version = VIOVERSION; 364 bevent->version = VIOVERSION;
367 bevent->disk = DEVICE_NO(d); 365 bevent->disk = DEVICE_NO(d);
368 bevent->u.rw_data.offset = start; 366 bevent->u.rw_data.offset = start;
@@ -649,10 +647,10 @@ static void handle_block_event(struct HvLpEvent *event)
649 /* Notification that a partition went away! */ 647 /* Notification that a partition went away! */
650 return; 648 return;
651 /* First, we should NEVER get an int here...only acks */ 649 /* First, we should NEVER get an int here...only acks */
652 if (event->xFlags.xFunction == HvLpEvent_Function_Int) { 650 if (hvlpevent_is_int(event)) {
653 printk(VIOD_KERN_WARNING 651 printk(VIOD_KERN_WARNING
654 "Yikes! got an int in viodasd event handler!\n"); 652 "Yikes! got an int in viodasd event handler!\n");
655 if (event->xFlags.xAckInd == HvLpEvent_AckInd_DoAck) { 653 if (hvlpevent_need_ack(event)) {
656 event->xRc = HvLpEvent_Rc_InvalidSubtype; 654 event->xRc = HvLpEvent_Rc_InvalidSubtype;
657 HvCallEvent_ackLpEvent(event); 655 HvCallEvent_ackLpEvent(event);
658 } 656 }
@@ -695,7 +693,7 @@ static void handle_block_event(struct HvLpEvent *event)
695 693
696 default: 694 default:
697 printk(VIOD_KERN_WARNING "invalid subtype!"); 695 printk(VIOD_KERN_WARNING "invalid subtype!");
698 if (event->xFlags.xAckInd == HvLpEvent_AckInd_DoAck) { 696 if (hvlpevent_need_ack(event)) {
699 event->xRc = HvLpEvent_Rc_InvalidSubtype; 697 event->xRc = HvLpEvent_Rc_InvalidSubtype;
700 HvCallEvent_ackLpEvent(event); 698 HvCallEvent_ackLpEvent(event);
701 } 699 }