FreeBSD Bugzilla – Attachment 20940 Details for
Bug 36847
Fix build of graphics/vid broken cause of usb structure rename
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch-aa.diff
patch-aa.diff (text/plain), 3.26 KB, created by
Marc Fonvieille
on 2002-04-07 14:40:01 UTC
(
hide
)
Description:
patch-aa.diff
Filename:
MIME Type:
Creator:
Marc Fonvieille
Created:
2002-04-07 14:40:01 UTC
Size:
3.26 KB
patch
obsolete
>--- patch-aa.orig Thu Feb 1 20:10:45 2001 >+++ patch-aa Sat Apr 6 18:34:46 2002 >@@ -1,5 +1,53 @@ >---- vid.c.old Mon May 8 00:59:03 2000 >-+++ vid.c Wed Jan 31 14:26:27 2001 >+--- vid.c.orig Mon May 8 06:59:03 2000 >++++ vid.c Sat Apr 6 18:27:02 2002 >+@@ -48,15 +48,15 @@ >+ struct usb_ctl_request ur; >+ unsigned char data[1024]; >+ >+- ur.request.bmRequestType = UT_READ_VENDOR_INTERFACE; >+- ur.request.bRequest = 2; >++ ur.ucr_request.bmRequestType = UT_READ_VENDOR_INTERFACE; >++ ur.ucr_request.bRequest = 2; >+ >+- USETW(ur.request.wValue, 0); /* unused */ >+- USETW(ur.request.wIndex, reg); /* index */ >+- USETW(ur.request.wLength, 1); /* payload len in bytes */ >+- ur.data = data; >+- ur.flags = 0; >+- ur.actlen = 0; >++ USETW(ur.ucr_request.wValue, 0); /* unused */ >++ USETW(ur.ucr_request.wIndex, reg); /* index */ >++ USETW(ur.ucr_request.wLength, 1); /* payload len in bytes */ >++ ur.ucr_data = data; >++ ur.ucr_flags = 0; >++ ur.ucr_actlen = 0; >+ >+ if(ioctl(fd, USB_DO_REQUEST, &ur) < 0) { >+ return -1; >+@@ -72,15 +72,15 @@ >+ >+ data[0] = val; >+ >+- ur.request.bmRequestType = UT_WRITE_VENDOR_INTERFACE; >+- ur.request.bRequest = 2; >++ ur.ucr_request.bmRequestType = UT_WRITE_VENDOR_INTERFACE; >++ ur.ucr_request.bRequest = 2; >+ >+- USETW(ur.request.wValue, 0); /* unused */ >+- USETW(ur.request.wIndex, reg); /* index */ >+- USETW(ur.request.wLength, 1); /* payload len in bytes */ >+- ur.data = data; >+- ur.flags = 0; >+- ur.actlen = 0; >++ USETW(ur.ucr_request.wValue, 0); /* unused */ >++ USETW(ur.ucr_request.wIndex, reg); /* index */ >++ USETW(ur.ucr_request.wLength, 1); /* payload len in bytes */ >++ ur.ucr_data = data; >++ ur.ucr_flags = 0; >++ ur.ucr_actlen = 0; >+ >+ if(ioctl(fd, USB_DO_REQUEST, &ur) < 0) { >+ return -1; > @@ -217,12 +217,15 @@ > struct vidstate vs; /* current read state */ > int small = 0; /* use 320x240 */ >@@ -32,8 +80,8 @@ > > - if(udi.vendorNo != 0x05A9 || udi.productNo != 0x0511) { > - fprintf(stderr, "device %s is not an OmniVision OV511\n", devname); >-+ if(udi.vendorNo != 0x05A9 || (udi.productNo != 0x0511 && >-+ udi.productNo != 0xa511)) { >++ if(udi.udi_vendorNo != 0x05A9 || (udi.udi_productNo != 0x0511 && >++ udi.udi_productNo != 0xa511)) { > + fprintf(stderr, "device %s is not an OmniVision OV511 or OV511+\n", devname); > exit(1); > } >@@ -43,8 +91,8 @@ > continue; > if(ioctl(fd, USB_GET_DEVICEINFO, &udi) < 0 > - || udi.vendorNo != 0x05A9 || udi.productNo != 0x0511) { >-+ || udi.vendorNo != 0x05A9 || (udi.productNo != 0x0511 && >-+ udi.productNo != 0xa511)) { >++ || udi.udi_vendorNo != 0x05A9 || (udi.udi_productNo != 0x0511 && >++ udi.udi_productNo != 0xa511)) { > close(fd); > fd = -1; > continue; >@@ -60,7 +108,7 @@ > devname = dev; > } > + >-+ isplus = udi.productNo == 0xa511; >++ isplus = udi.udi_productNo == 0xa511; > + bufsize = (isplus ? 961 : 993); > > /* reset the OV511 */ >@@ -148,9 +196,10 @@ > exit(1); > > /* select the 993-byte alternative */ >- alt.interface_index = 0; >+- alt.interface_index = 0; > - alt.alt_no = 1; >-+ alt.alt_no = (isplus ? 7 : 1); >++ alt.uai_interface_index = 0; >++ alt.uai_alt_no = (isplus ? 7 : 1); > if(ioctl(fd, USB_SET_ALTINTERFACE, &alt) < 0) { > perror("USB_SET_ALTINTERFACE"); > exit(1);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 36847
: 20940 |
20941