Revert uio.uio_td back to uio.uio_procp, using a #define in usb_port to

do the right thing on -current.
This commit is contained in:
Josef Karthauser 2002-01-02 23:31:08 +00:00
parent 7ccc786694
commit 0f24ab6fa0
4 changed files with 7 additions and 5 deletions

View File

@ -1259,7 +1259,7 @@ ugen_do_ioctl(struct ugen_softc *sc, int endpt, u_long cmd,
uio.uio_offset = 0;
uio.uio_segflg = UIO_USERSPACE;
uio.uio_rw = UIO_READ;
uio.uio_td = p;
uio.uio_procp = p;
error = uiomove((void *)cdesc, len, &uio);
free(cdesc, M_TEMP);
return (error);
@ -1305,7 +1305,7 @@ ugen_do_ioctl(struct ugen_softc *sc, int endpt, u_long cmd,
uio.uio_rw =
ur->request.bmRequestType & UT_READ ?
UIO_READ : UIO_WRITE;
uio.uio_td = p;
uio.uio_procp = p;
ptr = malloc(len, M_TEMP, M_WAITOK);
if (uio.uio_rw == UIO_WRITE) {
error = uiomove(ptr, len, &uio);

View File

@ -585,7 +585,7 @@ urioioctl(dev, cmd, addr, flag, p)
uio.uio_rw =
req.bmRequestType & UT_READ ?
UIO_READ : UIO_WRITE;
uio.uio_td = p;
uio.uio_procp = p;
ptr = malloc(len, M_TEMP, M_WAITOK);
if (uio.uio_rw == UIO_WRITE) {
error = uiomove(ptr, len, &uio);

View File

@ -50,7 +50,6 @@
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/mutex.h>
#include <sys/kthread.h>
#if defined(__NetBSD__) || defined(__OpenBSD__)
#include <sys/device.h>
#elif defined(__FreeBSD__)
@ -60,6 +59,7 @@
#include <sys/filio.h>
#include <sys/uio.h>
#endif
#include <sys/kthread.h>
#include <sys/proc.h>
#include <sys/conf.h>
#include <sys/poll.h>
@ -474,7 +474,7 @@ usbioctl(dev_t devt, u_long cmd, caddr_t data, int flag, usb_proc_ptr p)
uio.uio_rw =
ur->request.bmRequestType & UT_READ ?
UIO_READ : UIO_WRITE;
uio.uio_td = p;
uio.uio_procp = p;
ptr = malloc(len, M_TEMP, M_WAITOK);
if (uio.uio_rw == UIO_WRITE) {
error = uiomove(ptr, len, &uio);

View File

@ -294,6 +294,8 @@ __CONCAT(dname,_detach)(self, flags) \
typedef struct thread *usb_proc_ptr;
#define uio_procp uio_td
/* XXX Change this when FreeBSD has memset */
#define memcpy(d, s, l) bcopy((s),(d),(l))
#define memset(d, v, l) bzero((d),(l))