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
master
USBDriver-1_33
USBDriver-1_32
USBDriver-1_32-1
USBDriver-1_31
USBDriver-1_30
USBDriver-1_29
USBDriver-1_28
USBDriver-1_27
USBDriver-1_26
USBDriver-1_25
USBDriver-1_24
USBDriver-1_23
USBDriver-1_22
USBDriver-1_21
USBDriver-1_20
USBDriver-1_19
RO_5_07
NetBSD-1_19
NetBSD-1_18
NetBSD-1_17
NetBSD-1_16
NetBSD-1_15
NetBSD-1_14
NetBSD-1_13
NetBSD-1_12
NetBSD-1_11
NetBSD-1_10
NetBSD-1_09
NetBSD-1_09-1
NetBSD-1_08
NetBSD-1_07
NetBSD-1_06
NetBSD-1_05
NetBSD-1_04
NetBSD-1_03
NetBSD-1_02
NetBSD-1_01
NetBSD-1_00
NetBSD-0_99
NetBSD-0_98
NetBSD-0_97
NetBSD-0_96
NetBSD-0_95
NetBSD-0_94
NetBSD-0_93
NetBSD-0_92
NetBSD-0_91
NetBSD-0_90
NetBSD-0_89
NetBSD-0_88
NetBSD-0_87
NetBSD-0_86
NetBSD-0_85
NetBSD-0_84
NetBSD-0_83
NetBSD-0_82
NetBSD-0_81
NetBSD-0_80
NetBSD-0_79
NetBSD-0_78
NetBSD-0_77
NetBSD-0_76
NetBSD-0_75
NetBSD-0_74
NetBSD-0_73
NetBSD-0_72
NetBSD-0_71
NetBSD-0_70
NetBSD-0_69
NetBSD-0_68
NetBSD-0_67
NetBSD-0_66
NetBSD-0_65
NetBSD-0_64
NetBSD-0_63
NetBSD-0_62
NetBSD-0_61
NetBSD-0_60
NetBSD-0_59
NetBSD-0_58
NetBSD-0_57
NetBSD-0_56
NetBSD-0_55
NetBSD-0_54
NetBSD-0_53
NetBSD-0_52
NetBSD-0_51
NetBSD-0_50
NetBSD-0_49
NetBSD-0_48
NetBSD-0_47
NetBSD-0_46
NetBSD-0_45
NetBSD-0_44
NetBSD-0_43
NetBSD-0_42
NetBSD-0_41
NetBSD-0_40
NetBSD-0_39
NetBSD-0_38
NetBSD-0_37
NetBSD-0_36
NetBSD-0_35
NetBSD-0_34
NetBSD-0_33
NetBSD-0_32
NetBSD-0_31
NetBSD-0_30
NetBSD-0_29
NetBSD-0_28
NetBSD-0_27
No related merge requests found
Changes
4
Hide 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
...
...
@@ -167,7 +167,7 @@ _kernel_oserror* uerror (char* e)
void
riscos_failed_device
(
void
*
p
)
{
//#ifdef STANDALONE
#ifndef RHENIUM
#ifndef RHENIUM
_kernel_oserror
*
e
;
(
void
)
p
;
e
=
uerror
(
E_BadDevice
);
...
...
@@ -1086,7 +1086,7 @@ struct device* attach_hub (struct device* parent, void* aux)
softc
->
dv_cfdata
=
(
void
*
)
1
;
// hub
(
*
uhub_uhub_ca
.
ca_attach
)
(
parent
,
softc
,
aux
);
dprintf
((
""
,
"Matched hub
\n
"
));
return
softc
;
...
...
@@ -1191,7 +1191,7 @@ char* service_call (usbd_device_handle dev, int unit, int link)
serv
->
dev
.
ifcs
=
idescs
;
for
(
epn
=
0
,
iface
=
0
;
iface
<
nifs
;
++
iface
)
{
{
int
ifcepn
=
dev
->
ifaces
[
iface
].
idesc
->
bNumEndpoints
;
dprintf
((
""
,
"iface %d, num endpoints = %d, at %p
\n
"
,
iface
,
ifcepn
,
idescs
[
iface
]));
memcpy
(
idescs
[
iface
],
dev
->
ifaces
[
iface
].
idesc
,
...
...
@@ -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,7 +1499,8 @@ int detach_device (struct device* dev, int d)
#endif
_swix
(
DeviceFS_Deregister
,
_IN
(
0
),
udev
->
sc_devfs
);
if
(
udev
->
sc_devfs
)
_swix
(
DeviceFS_Deregister
,
_IN
(
0
),
udev
->
sc_devfs
);
dprintf
((
""
,
"deregistered driver %p
\n
"
,
udev
->
sc_devfs
));
free
(
udev
);
return
0
;
...
...
@@ -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
));
...
...
@@ -2135,14 +2139,14 @@ static void read_cb(usbd_xfer_handle xfer, usbd_private_handle priv,
this is not a interrupt endpoint (the BSD framework restarts
repeating transfers) */
/* if we've got a number of bytes including a part packet, then
transfer must have ended.. else.. try more */
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
);
// fill up the rest of the request with garbage!
// fill up the rest of the request with garbage!
_kernel_swi_regs
r
;
r
.
r
[
0
]
=
BM_InsertBlock
;
r
.
r
[
1
]
=
(
int
)
str
->
buffer_id
;
...
...
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
->
flags
&
USBD_SHORT_XFER_OK
))
{
if
(
!
xfer
->
status
&&
xfer
->
actlen
<
xfer
->
length
&&
!
(
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