[Linux1394-cvslog] rev 677 - trunk
Brought to you by:
aeb,
bencollins
From: SVN U. <ben...@li...> - 2002-11-16 20:39:55
|
Author: bencollins Date: 2002-11-16 15:39:21 -0500 (Sat, 16 Nov 2002) New Revision: 677 Modified: trunk/raw1394.c Log: Fix raw1394 so that it only needs to call hpsb_make_writepacket once, and not special case it. Modified: trunk/raw1394.c ============================================================================== --- trunk/raw1394.c (original) +++ trunk/raw1394.c 2002-11-16 15:39:22.000000000 -0500 @@ -666,27 +666,20 @@ case RAW1394_REQ_ASYNC_WRITE: DBGMSG("write_request called"); + + packet = hpsb_make_writepacket(fi->host, node, addr, NULL, + req->req.length); + if (!packet) + return -ENOMEM; + if (req->req.length == 4) { - quadlet_t x; - - if (copy_from_user(&x, int2ptr(req->req.sendb), + if (copy_from_user(&packet->header[3], int2ptr(req->req.sendb), req->req.length)) - req->req.error = RAW1394_ERROR_MEMFAULT; - - packet = hpsb_make_writepacket(fi->host, node, addr, &x, - req->req.length); - if (!packet) - return -ENOMEM; - + req->req.error = RAW1394_ERROR_MEMFAULT; } else { - packet = hpsb_make_writepacket(fi->host, node, addr, NULL, - req->req.length); - if (!packet) - return -ENOMEM; - if (copy_from_user(packet->data, int2ptr(req->req.sendb), req->req.length)) - req->req.error = RAW1394_ERROR_MEMFAULT; + req->req.error = RAW1394_ERROR_MEMFAULT; } req->req.length = 0; |