9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] [PATCH] nusb/ptp: increase payload
@ 2022-06-30  1:58 akw
  2022-06-30  4:54 ` ori
  0 siblings, 1 reply; 2+ messages in thread
From: akw @ 2022-06-30  1:58 UTC (permalink / raw)
  To: 9front

A silly little patch, but some ptp devices (like the camera I own) use USB3 endpoints and subsequently require the data size of the payload to be 1024(-12 for metadata). This is reflected in libgphoto2's current ptp driver.

diff e6d31c1715cc50bd3d9a0301a41647295f739071 uncommitted
--- a/sys/src/cmd/nusb/ptp/ptp.c
+++ b/sys/src/cmd/nusb/ptp/ptp.c
@@ -45,7 +45,7 @@
 	uchar	type[2];
 	uchar	code[2];
 	uchar	transid[4];
-	uchar	d[500];
+	uchar	d[1012];
 };
 
 struct Node

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9front] [PATCH] nusb/ptp: increase payload
  2022-06-30  1:58 [9front] [PATCH] nusb/ptp: increase payload akw
@ 2022-06-30  4:54 ` ori
  0 siblings, 0 replies; 2+ messages in thread
From: ori @ 2022-06-30  4:54 UTC (permalink / raw)
  To: 9front

Quoth akw@oneirism.org:
> A silly little patch, but some ptp devices (like the camera I own) use USB3 endpoints and subsequently require the data size of the payload to be 1024(-12 for metadata). This is reflected in libgphoto2's current ptp driver.
> 
> diff e6d31c1715cc50bd3d9a0301a41647295f739071 uncommitted
> --- a/sys/src/cmd/nusb/ptp/ptp.c
> +++ b/sys/src/cmd/nusb/ptp/ptp.c
> @@ -45,7 +45,7 @@
>  	uchar	type[2];
>  	uchar	code[2];
>  	uchar	transid[4];
> -	uchar	d[500];
> +	uchar	d[1012];
>  };
>  
>  struct Node

Looks good, committed.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-30  4:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-30  1:58 [9front] [PATCH] nusb/ptp: increase payload akw
2022-06-30  4:54 ` ori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).