Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
RiscOS
S
Sources
H
HWSupport
USB
USBDriver
Commits
a5e474f7
Commit
a5e474f7
authored
20 years ago
by
Kevin Bracey
Browse files
Options
Download
Email Patches
Plain Diff
More John fixes.
Version 0.27. Tagged as 'NetBSD-0_27'
parent
e7c1e36d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
26 deletions
+26
-26
VersionNum
VersionNum
+10
-10
build/c/usbmodule
build/c/usbmodule
+13
-9
dev/usb/c/usbdi
dev/usb/c/usbdi
+3
-6
dev/usb/h/usbdi
dev/usb/h/usbdi
+0
-1
No files found.
VersionNum
View file @
a5e474f7
/* (0.2
6
)
/* (0.2
7
)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.68.
*
*/
#define Module_MajorVersion_CMHG 0.2
6
#define Module_MajorVersion_CMHG 0.2
7
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG
3
0 Ju
n
2004
#define Module_Date_CMHG 0
1
Ju
l
2004
#define Module_MajorVersion "0.2
6
"
#define Module_Version 2
6
#define Module_MajorVersion "0.2
7
"
#define Module_Version 2
7
#define Module_MinorVersion ""
#define Module_Date "
3
0 Ju
n
2004"
#define Module_Date "0
1
Ju
l
2004"
#define Module_ApplicationDate "
3
0-Ju
n
-04"
#define Module_ApplicationDate "0
1
-Ju
l
-04"
#define Module_ComponentName "NetBSD"
#define Module_ComponentPath "RiscOS/Sources/HWSupport/USB/NetBSD"
#define Module_FullVersion "0.2
6
"
#define Module_HelpVersion "0.2
6
(
3
0 Ju
n
2004)"
#define Module_LibraryVersionInfo "0:2
6
"
#define Module_FullVersion "0.2
7
"
#define Module_HelpVersion "0.2
7
(0
1
Ju
l
2004)"
#define Module_LibraryVersionInfo "0:2
7
"
This diff is collapsed.
Click to expand it.
build/c/usbmodule
View file @
a5e474f7
...
...
@@ -1463,9 +1463,13 @@ struct device* attach_device (struct device* parent, struct usb_attach_arg* aux,
if
(
e
!=
NULL
)
{
dprintf
((
""
,
"failed to register: %s
\n
"
,
e
->
errmess
));
#if 0
free (dev);
free (softc);
return NULL;
#else
softc
->
sc_devfs
=
0
;
#endif
}
dprintf
((
""
,
"registered driver %p
\n
"
,
softc
->
sc_devfs
));
...
...
@@ -1495,6 +1499,7 @@ int detach_device (struct device* dev, int d)
#endif
if
(
udev
->
sc_devfs
)
_swix
(
DeviceFS_Deregister
,
_IN
(
0
),
udev
->
sc_devfs
);
dprintf
((
""
,
"deregistered driver %p
\n
"
,
udev
->
sc_devfs
));
free
(
udev
);
...
...
@@ -2117,8 +2122,7 @@ static void read_cb(usbd_xfer_handle xfer, usbd_private_handle priv,
{
struct
devstream
*
str
=
priv
;
if
(
(
status
!=
USBD_NORMAL_COMPLETION
)
&&
(
status
!=
USBD_SHORT_XFER_DONE
))
if
(
(
status
!=
USBD_NORMAL_COMPLETION
))
{
dprintf
((
""
,
"Bad completion code: %d (%s) %d bytes read
\n
"
,
status
,
ccodes
[
status
],
xfer
->
actlen
));
...
...
@@ -2138,7 +2142,7 @@ static void read_cb(usbd_xfer_handle xfer, usbd_private_handle priv,
transfer must have ended.. else.. try more */
// if (!(xfer->actlen/UGETW(xfer->pipe->endpoint->edesc->wMaxPacketSize)) &&
// str->count != str->totalcount)
if
(
status
==
USBD_SHORT_XFER_DONE
)
if
(
xfer
->
actlen
<
xfer
->
length
)
{
char
zero
[
UGETW
(
xfer
->
pipe
->
endpoint
->
edesc
->
wMaxPacketSize
)];
memset
(
zero
,
0
,
sizeof
zero
);
...
...
This diff is collapsed.
Click to expand it.
dev/usb/c/usbdi
View file @
a5e474f7
...
...
@@ -866,16 +866,13 @@ usb_transfer_complete(usbd_xfer_handle xfer)
[
pipe
->
endpoint
->
edesc
->
bmAttributes
&
UE_XFERTYPE
];
xfer
->
done
=
1
;
if
(
!
xfer
->
status
&&
xfer
->
actlen
<
xfer
->
length
)
if
(
!
xfer
->
status
&&
xfer
->
actlen
<
xfer
->
length
&&
!
(
xfer
->
flags
&
USBD_SHORT_XFER_OK
))
{
if
(
!
(
xfer
->
flags
&
USBD_SHORT_XFER_OK
))
{
DPRINTFN
(
-
1
,(
"usbd_transfer_cb: short transfer %d<%d
\n
"
,
xfer
->
actlen
,
xfer
->
length
));
xfer
->
status
=
USBD_SHORT_XFER
;
}
else
xfer
->
status
=
USBD_SHORT_XFER_DONE
;
}
if
(
xfer
->
callback
)
xfer
->
callback
(
xfer
,
xfer
->
priv
,
xfer
->
status
);
...
...
This diff is collapsed.
Click to expand it.
dev/usb/h/usbdi
View file @
a5e474f7
...
...
@@ -66,7 +66,6 @@ typedef enum { /* keep in sync with usbd_status_msgs */
USBD_SHORT_XFER
,
/* 16 */
USBD_STALLED
,
/* 17 */
USBD_INTERRUPTED
,
/* 18 */
USBD_SHORT_XFER_DONE
,
/* 19 */
USBD_ERROR_MAX
/* must be last */
}
usbd_status
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment