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
c632fbc3
Commit
c632fbc3
authored
Oct 29, 2002
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
USB: drivers/usb fixups due to USB structure changes.
parent
8414871b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
22 deletions
+22
-22
drivers/bluetooth/hci_usb.c
drivers/bluetooth/hci_usb.c
+22
-22
No files found.
drivers/bluetooth/hci_usb.c
View file @
c632fbc3
...
...
@@ -629,13 +629,13 @@ static void hci_usb_destruct(struct hci_dev *hdev)
int
hci_usb_probe
(
struct
usb_interface
*
intf
,
const
struct
usb_device_id
*
id
)
{
struct
usb_device
*
udev
=
interface_to_usbdev
(
intf
);
struct
usb_
endpoint_descriptor
*
bulk_out_ep
[
HCI_MAX_IFACE_NUM
];
struct
usb_
endpoint_descriptor
*
isoc_out_ep
[
HCI_MAX_IFACE_NUM
];
struct
usb_
endpoint_descriptor
*
bulk_in_ep
[
HCI_MAX_IFACE_NUM
];
struct
usb_
endpoint_descriptor
*
isoc_in_ep
[
HCI_MAX_IFACE_NUM
];
struct
usb_
endpoint_descriptor
*
intr_in_ep
[
HCI_MAX_IFACE_NUM
];
struct
usb_
interface_descriptor
*
uif
;
struct
usb_
endpoint_descriptor
*
ep
;
struct
usb_
host_endpoint
*
bulk_out_ep
[
HCI_MAX_IFACE_NUM
];
struct
usb_
host_endpoint
*
isoc_out_ep
[
HCI_MAX_IFACE_NUM
];
struct
usb_
host_endpoint
*
bulk_in_ep
[
HCI_MAX_IFACE_NUM
];
struct
usb_
host_endpoint
*
isoc_in_ep
[
HCI_MAX_IFACE_NUM
];
struct
usb_
host_endpoint
*
intr_in_ep
[
HCI_MAX_IFACE_NUM
];
struct
usb_
host_interface
*
uif
;
struct
usb_
host_endpoint
*
ep
;
struct
usb_interface
*
iface
,
*
isoc_iface
;
struct
hci_usb
*
husb
;
struct
hci_dev
*
hdev
;
...
...
@@ -648,7 +648,7 @@ int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
return
-
EIO
;
/* Check number of endpoints */
if
(
intf
->
altsetting
[
0
].
bNumEndpoints
<
3
)
if
(
intf
->
altsetting
[
0
].
desc
.
bNumEndpoints
<
3
)
return
-
EIO
;
memset
(
bulk_out_ep
,
0
,
sizeof
(
bulk_out_ep
));
...
...
@@ -663,37 +663,37 @@ int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
/* Find endpoints that we need */
ifn
=
min_t
(
unsigned
int
,
udev
->
actconfig
->
bNumInterfaces
,
HCI_MAX_IFACE_NUM
);
ifn
=
min_t
(
unsigned
int
,
udev
->
actconfig
->
desc
.
bNumInterfaces
,
HCI_MAX_IFACE_NUM
);
for
(
i
=
0
;
i
<
ifn
;
i
++
)
{
iface
=
&
udev
->
actconfig
->
interface
[
i
];
for
(
a
=
0
;
a
<
iface
->
num_altsetting
;
a
++
)
{
uif
=
&
iface
->
altsetting
[
a
];
for
(
e
=
0
;
e
<
uif
->
bNumEndpoints
;
e
++
)
{
for
(
e
=
0
;
e
<
uif
->
desc
.
bNumEndpoints
;
e
++
)
{
ep
=
&
uif
->
endpoint
[
e
];
switch
(
ep
->
bmAttributes
&
USB_ENDPOINT_XFERTYPE_MASK
)
{
switch
(
ep
->
desc
.
bmAttributes
&
USB_ENDPOINT_XFERTYPE_MASK
)
{
case
USB_ENDPOINT_XFER_INT
:
if
(
ep
->
bEndpointAddress
&
USB_DIR_IN
)
if
(
ep
->
desc
.
bEndpointAddress
&
USB_DIR_IN
)
intr_in_ep
[
i
]
=
ep
;
break
;
case
USB_ENDPOINT_XFER_BULK
:
if
(
ep
->
bEndpointAddress
&
USB_DIR_IN
)
if
(
ep
->
desc
.
bEndpointAddress
&
USB_DIR_IN
)
bulk_in_ep
[
i
]
=
ep
;
else
bulk_out_ep
[
i
]
=
ep
;
break
;
case
USB_ENDPOINT_XFER_ISOC
:
if
(
ep
->
wMaxPacketSize
<
size
)
if
(
ep
->
desc
.
wMaxPacketSize
<
size
)
break
;
size
=
ep
->
wMaxPacketSize
;
size
=
ep
->
desc
.
wMaxPacketSize
;
isoc_iface
=
iface
;
isoc_alts
=
a
;
isoc_ifnum
=
i
;
if
(
ep
->
bEndpointAddress
&
USB_DIR_IN
)
if
(
ep
->
desc
.
bEndpointAddress
&
USB_DIR_IN
)
isoc_in_ep
[
i
]
=
ep
;
else
isoc_out_ep
[
i
]
=
ep
;
...
...
@@ -721,11 +721,11 @@ int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
memset
(
husb
,
0
,
sizeof
(
struct
hci_usb
));
husb
->
udev
=
udev
;
husb
->
bulk_out_ep
=
bulk_out_ep
[
0
]
->
bEndpointAddress
;
husb
->
bulk_in_ep
=
bulk_in_ep
[
0
]
->
bEndpointAddress
;
husb
->
bulk_out_ep
=
bulk_out_ep
[
0
]
->
desc
.
bEndpointAddress
;
husb
->
bulk_in_ep
=
bulk_in_ep
[
0
]
->
desc
.
bEndpointAddress
;
husb
->
intr_ep
=
intr_in_ep
[
0
]
->
bEndpointAddress
;
husb
->
intr_interval
=
intr_in_ep
[
0
]
->
bInterval
;
husb
->
intr_ep
=
intr_in_ep
[
0
]
->
desc
.
bEndpointAddress
;
husb
->
intr_interval
=
intr_in_ep
[
0
]
->
desc
.
bInterval
;
if
(
isoc_iface
)
{
if
(
usb_set_interface
(
udev
,
isoc_ifnum
,
isoc_alts
))
{
...
...
@@ -735,8 +735,8 @@ int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
usb_driver_claim_interface
(
&
hci_usb_driver
,
isoc_iface
,
husb
);
husb
->
isoc_iface
=
isoc_iface
;
husb
->
isoc_in_ep
=
isoc_in_ep
[
1
]
->
bEndpointAddress
;
husb
->
isoc_out_ep
=
isoc_in_ep
[
1
]
->
bEndpointAddress
;
husb
->
isoc_in_ep
=
isoc_in_ep
[
1
]
->
desc
.
bEndpointAddress
;
husb
->
isoc_out_ep
=
isoc_in_ep
[
1
]
->
desc
.
bEndpointAddress
;
}
husb
->
completion_lock
=
RW_LOCK_UNLOCKED
;
...
...
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