Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
ed661ed6
Commit
ed661ed6
authored
Oct 29, 2002
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
USB: drivers/net/irda fixups due to USB structure changes.
parent
8a88fa5d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
drivers/net/irda/irda-usb.c
drivers/net/irda/irda-usb.c
+10
-10
No files found.
drivers/net/irda/irda-usb.c
View file @
ed661ed6
...
@@ -1258,7 +1258,7 @@ static inline int irda_usb_close(struct irda_usb_cb *self)
...
@@ -1258,7 +1258,7 @@ static inline int irda_usb_close(struct irda_usb_cb *self)
* Most dongle have also an interrupt endpoint, that will be probably
* Most dongle have also an interrupt endpoint, that will be probably
* documented in the next spec...
* documented in the next spec...
*/
*/
static
inline
int
irda_usb_parse_endpoints
(
struct
irda_usb_cb
*
self
,
struct
usb_
endpoint_descriptor
*
endpoint
,
int
ennum
)
static
inline
int
irda_usb_parse_endpoints
(
struct
irda_usb_cb
*
self
,
struct
usb_
host_endpoint
*
endpoint
,
int
ennum
)
{
{
int
i
;
/* Endpoint index in table */
int
i
;
/* Endpoint index in table */
...
@@ -1277,10 +1277,10 @@ static inline int irda_usb_parse_endpoints(struct irda_usb_cb *self, struct usb_
...
@@ -1277,10 +1277,10 @@ static inline int irda_usb_parse_endpoints(struct irda_usb_cb *self, struct usb_
__u16
psize
;
/* Endpoint max packet size in bytes */
__u16
psize
;
/* Endpoint max packet size in bytes */
/* Get endpoint address, direction and attribute */
/* Get endpoint address, direction and attribute */
ep
=
endpoint
[
i
].
bEndpointAddress
&
USB_ENDPOINT_NUMBER_MASK
;
ep
=
endpoint
[
i
].
desc
.
bEndpointAddress
&
USB_ENDPOINT_NUMBER_MASK
;
dir
=
endpoint
[
i
].
bEndpointAddress
&
USB_ENDPOINT_DIR_MASK
;
dir
=
endpoint
[
i
].
desc
.
bEndpointAddress
&
USB_ENDPOINT_DIR_MASK
;
attr
=
endpoint
[
i
].
bmAttributes
;
attr
=
endpoint
[
i
].
desc
.
bmAttributes
;
psize
=
endpoint
[
i
].
wMaxPacketSize
;
psize
=
endpoint
[
i
].
desc
.
wMaxPacketSize
;
/* Is it a bulk endpoint ??? */
/* Is it a bulk endpoint ??? */
if
(
attr
==
USB_ENDPOINT_XFER_BULK
)
{
if
(
attr
==
USB_ENDPOINT_XFER_BULK
)
{
...
@@ -1366,7 +1366,7 @@ static inline struct irda_class_desc *irda_usb_find_class_desc(struct usb_interf
...
@@ -1366,7 +1366,7 @@ static inline struct irda_class_desc *irda_usb_find_class_desc(struct usb_interf
ret
=
usb_control_msg
(
dev
,
usb_rcvctrlpipe
(
dev
,
0
),
ret
=
usb_control_msg
(
dev
,
usb_rcvctrlpipe
(
dev
,
0
),
IU_REQ_GET_CLASS_DESC
,
IU_REQ_GET_CLASS_DESC
,
USB_DIR_IN
|
USB_TYPE_CLASS
|
USB_RECIP_INTERFACE
,
USB_DIR_IN
|
USB_TYPE_CLASS
|
USB_RECIP_INTERFACE
,
0
,
intf
->
altsetting
->
bInterfaceNumber
,
desc
,
0
,
intf
->
altsetting
->
desc
.
bInterfaceNumber
,
desc
,
sizeof
(
*
desc
),
MSECS_TO_JIFFIES
(
500
));
sizeof
(
*
desc
),
MSECS_TO_JIFFIES
(
500
));
IRDA_DEBUG
(
1
,
"%s(), ret=%d
\n
"
,
__FUNCTION__
,
ret
);
IRDA_DEBUG
(
1
,
"%s(), ret=%d
\n
"
,
__FUNCTION__
,
ret
);
...
@@ -1407,7 +1407,7 @@ static int irda_usb_probe(struct usb_interface *intf,
...
@@ -1407,7 +1407,7 @@ static int irda_usb_probe(struct usb_interface *intf,
{
{
struct
usb_device
*
dev
=
interface_to_usbdev
(
intf
);
struct
usb_device
*
dev
=
interface_to_usbdev
(
intf
);
struct
irda_usb_cb
*
self
=
NULL
;
struct
irda_usb_cb
*
self
=
NULL
;
struct
usb_
interface_descriptor
*
interface
;
struct
usb_
host_interface
*
interface
;
struct
irda_class_desc
*
irda_desc
;
struct
irda_class_desc
*
irda_desc
;
int
ret
;
int
ret
;
int
i
;
int
i
;
...
@@ -1477,7 +1477,7 @@ static int irda_usb_probe(struct usb_interface *intf,
...
@@ -1477,7 +1477,7 @@ static int irda_usb_probe(struct usb_interface *intf,
}
}
/* Is this really necessary? */
/* Is this really necessary? */
if
(
usb_set_configuration
(
dev
,
dev
->
config
[
0
].
bConfigurationValue
)
<
0
)
{
if
(
usb_set_configuration
(
dev
,
dev
->
config
[
0
].
desc
.
bConfigurationValue
)
<
0
)
{
err
(
"set_configuration failed"
);
err
(
"set_configuration failed"
);
return
-
EIO
;
return
-
EIO
;
}
}
...
@@ -1486,7 +1486,7 @@ static int irda_usb_probe(struct usb_interface *intf,
...
@@ -1486,7 +1486,7 @@ static int irda_usb_probe(struct usb_interface *intf,
/* Note : some driver do hardcode the interface number, some others
/* Note : some driver do hardcode the interface number, some others
* specify an alternate, but very few driver do like this.
* specify an alternate, but very few driver do like this.
* Jean II */
* Jean II */
ret
=
usb_set_interface
(
dev
,
intf
->
altsetting
->
bInterfaceNumber
,
0
);
ret
=
usb_set_interface
(
dev
,
intf
->
altsetting
->
desc
.
bInterfaceNumber
,
0
);
IRDA_DEBUG
(
1
,
"usb-irda: set interface %d result %d
\n
"
,
intf
->
altsetting
->
bInterfaceNumber
,
ret
);
IRDA_DEBUG
(
1
,
"usb-irda: set interface %d result %d
\n
"
,
intf
->
altsetting
->
bInterfaceNumber
,
ret
);
switch
(
ret
)
{
switch
(
ret
)
{
case
0
:
case
0
:
...
@@ -1504,7 +1504,7 @@ static int irda_usb_probe(struct usb_interface *intf,
...
@@ -1504,7 +1504,7 @@ static int irda_usb_probe(struct usb_interface *intf,
/* Find our endpoints */
/* Find our endpoints */
interface
=
&
intf
->
altsetting
[
0
];
interface
=
&
intf
->
altsetting
[
0
];
if
(
!
irda_usb_parse_endpoints
(
self
,
interface
->
endpoint
,
if
(
!
irda_usb_parse_endpoints
(
self
,
interface
->
endpoint
,
interface
->
bNumEndpoints
))
{
interface
->
desc
.
bNumEndpoints
))
{
ERROR
(
"%s(), Bogus endpoints...
\n
"
,
__FUNCTION__
);
ERROR
(
"%s(), Bogus endpoints...
\n
"
,
__FUNCTION__
);
return
-
EIO
;
return
-
EIO
;
}
}
...
...
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