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
Kirill Smelkov
linux
Commits
7ac1d67a
Commit
7ac1d67a
authored
Apr 03, 2003
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Plain Diff
Merge gregkh@kernel.bkbits.net:/home/gregkh/linux/linus-2.5
into kroah.com:/home/greg/linux/BK/gregkh-2.5
parents
2c12e127
be2a3ae7
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
45 additions
and
32 deletions
+45
-32
drivers/usb/core/usb.c
drivers/usb/core/usb.c
+0
-18
drivers/usb/host/ehci-mem.c
drivers/usb/host/ehci-mem.c
+1
-0
drivers/usb/host/ehci-q.c
drivers/usb/host/ehci-q.c
+7
-6
drivers/usb/host/ohci-hcd.c
drivers/usb/host/ohci-hcd.c
+8
-0
drivers/usb/host/ohci-q.c
drivers/usb/host/ohci-q.c
+2
-0
drivers/usb/input/hid-core.c
drivers/usb/input/hid-core.c
+3
-0
drivers/usb/input/usbkbd.c
drivers/usb/input/usbkbd.c
+3
-0
drivers/usb/input/usbmouse.c
drivers/usb/input/usbmouse.c
+3
-0
drivers/usb/misc/speedtch.c
drivers/usb/misc/speedtch.c
+18
-8
No files found.
drivers/usb/core/usb.c
View file @
7ac1d67a
...
@@ -89,11 +89,6 @@ int usb_device_probe(struct device *dev)
...
@@ -89,11 +89,6 @@ int usb_device_probe(struct device *dev)
if
(
!
driver
->
probe
)
if
(
!
driver
->
probe
)
return
error
;
return
error
;
if
(
!
try_module_get
(
driver
->
owner
))
{
dev_err
(
dev
,
"Can't get a module reference for %s
\n
"
,
driver
->
name
);
return
error
;
}
id
=
usb_match_id
(
intf
,
driver
->
id_table
);
id
=
usb_match_id
(
intf
,
driver
->
id_table
);
if
(
id
)
{
if
(
id
)
{
dev_dbg
(
dev
,
"%s - got id
\n
"
,
__FUNCTION__
);
dev_dbg
(
dev
,
"%s - got id
\n
"
,
__FUNCTION__
);
...
@@ -104,8 +99,6 @@ int usb_device_probe(struct device *dev)
...
@@ -104,8 +99,6 @@ int usb_device_probe(struct device *dev)
if
(
!
error
)
if
(
!
error
)
intf
->
driver
=
driver
;
intf
->
driver
=
driver
;
module_put
(
driver
->
owner
);
return
error
;
return
error
;
}
}
...
@@ -123,16 +116,6 @@ int usb_device_remove(struct device *dev)
...
@@ -123,16 +116,6 @@ int usb_device_remove(struct device *dev)
return
-
ENODEV
;
return
-
ENODEV
;
}
}
if
(
!
try_module_get
(
driver
->
owner
))
{
// FIXME this happens even when we just rmmod
// drivers that aren't in active use...
dev_err
(
dev
,
"Dieing driver still bound to device.
\n
"
);
return
-
EIO
;
}
/* if we sleep here on an umanaged driver
* the holder of the lock guards against
* module unload */
down
(
&
driver
->
serialize
);
down
(
&
driver
->
serialize
);
if
(
intf
->
driver
&&
intf
->
driver
->
disconnect
)
if
(
intf
->
driver
&&
intf
->
driver
->
disconnect
)
...
@@ -143,7 +126,6 @@ int usb_device_remove(struct device *dev)
...
@@ -143,7 +126,6 @@ int usb_device_remove(struct device *dev)
usb_driver_release_interface
(
driver
,
intf
);
usb_driver_release_interface
(
driver
,
intf
);
up
(
&
driver
->
serialize
);
up
(
&
driver
->
serialize
);
module_put
(
driver
->
owner
);
return
0
;
return
0
;
}
}
...
...
drivers/usb/host/ehci-mem.c
View file @
7ac1d67a
...
@@ -62,6 +62,7 @@ static inline void ehci_qtd_init (struct ehci_qtd *qtd, dma_addr_t dma)
...
@@ -62,6 +62,7 @@ static inline void ehci_qtd_init (struct ehci_qtd *qtd, dma_addr_t dma)
{
{
memset
(
qtd
,
0
,
sizeof
*
qtd
);
memset
(
qtd
,
0
,
sizeof
*
qtd
);
qtd
->
qtd_dma
=
dma
;
qtd
->
qtd_dma
=
dma
;
qtd
->
hw_token
=
cpu_to_le32
(
QTD_STS_HALT
);
qtd
->
hw_next
=
EHCI_LIST_END
;
qtd
->
hw_next
=
EHCI_LIST_END
;
qtd
->
hw_alt_next
=
EHCI_LIST_END
;
qtd
->
hw_alt_next
=
EHCI_LIST_END
;
INIT_LIST_HEAD
(
&
qtd
->
qtd_list
);
INIT_LIST_HEAD
(
&
qtd
->
qtd_list
);
...
...
drivers/usb/host/ehci-q.c
View file @
7ac1d67a
...
@@ -137,7 +137,10 @@ static void qtd_copy_status (
...
@@ -137,7 +137,10 @@ static void qtd_copy_status (
if
(
QTD_CERR
(
token
))
if
(
QTD_CERR
(
token
))
urb
->
status
=
-
EPIPE
;
urb
->
status
=
-
EPIPE
;
else
{
else
{
dbg
(
"3strikes"
);
ehci_dbg
(
ehci
,
"devpath %s ep%d%s 3strikes
\n
"
,
urb
->
dev
->
devpath
,
usb_pipeendpoint
(
urb
->
pipe
),
usb_pipein
(
urb
->
pipe
)
?
"in"
:
"out"
);
urb
->
status
=
-
EPROTO
;
urb
->
status
=
-
EPROTO
;
}
}
/* CERR nonzero + no errors + halt --> stall */
/* CERR nonzero + no errors + halt --> stall */
...
@@ -213,7 +216,6 @@ ehci_urb_done (struct ehci_hcd *ehci, struct urb *urb, struct pt_regs *regs)
...
@@ -213,7 +216,6 @@ ehci_urb_done (struct ehci_hcd *ehci, struct urb *urb, struct pt_regs *regs)
/* complete() can reenter this HCD */
/* complete() can reenter this HCD */
spin_unlock
(
&
ehci
->
lock
);
spin_unlock
(
&
ehci
->
lock
);
usb_hcd_giveback_urb
(
&
ehci
->
hcd
,
urb
,
regs
);
usb_hcd_giveback_urb
(
&
ehci
->
hcd
,
urb
,
regs
);
spin_lock
(
&
ehci
->
lock
);
spin_lock
(
&
ehci
->
lock
);
}
}
...
@@ -827,7 +829,7 @@ static struct ehci_qh *qh_append_tds (
...
@@ -827,7 +829,7 @@ static struct ehci_qh *qh_append_tds (
* HC is allowed to fetch the old dummy (4.10.2).
* HC is allowed to fetch the old dummy (4.10.2).
*/
*/
token
=
qtd
->
hw_token
;
token
=
qtd
->
hw_token
;
qtd
->
hw_token
=
0
;
qtd
->
hw_token
=
cpu_to_le32
(
QTD_STS_HALT
)
;
wmb
();
wmb
();
dummy
=
qh
->
dummy
;
dummy
=
qh
->
dummy
;
...
@@ -879,8 +881,7 @@ submit_async (
...
@@ -879,8 +881,7 @@ submit_async (
if
(
usb_pipein
(
urb
->
pipe
)
&&
!
usb_pipecontrol
(
urb
->
pipe
))
if
(
usb_pipein
(
urb
->
pipe
)
&&
!
usb_pipecontrol
(
urb
->
pipe
))
epnum
|=
0x10
;
epnum
|=
0x10
;
vdbg
(
"%s: submit_async urb %p len %d ep %d-%s qtd %p [qh %p]"
,
ehci_vdbg
(
ehci
,
"submit_async urb %p len %d ep%d%s qtd %p [qh %p]
\n
"
,
hcd_to_bus
(
&
ehci
->
hcd
)
->
bus_name
,
urb
,
urb
->
transfer_buffer_length
,
urb
,
urb
->
transfer_buffer_length
,
epnum
&
0x0f
,
(
epnum
&
0x10
)
?
"in"
:
"out"
,
epnum
&
0x0f
,
(
epnum
&
0x10
)
?
"in"
:
"out"
,
qtd
,
dev
?
dev
->
ep
[
epnum
]
:
(
void
*
)
~
0
);
qtd
,
dev
?
dev
->
ep
[
epnum
]
:
(
void
*
)
~
0
);
...
@@ -916,7 +917,7 @@ static void end_unlink_async (struct ehci_hcd *ehci, struct pt_regs *regs)
...
@@ -916,7 +917,7 @@ static void end_unlink_async (struct ehci_hcd *ehci, struct pt_regs *regs)
del_timer
(
&
ehci
->
watchdog
);
del_timer
(
&
ehci
->
watchdog
);
qh
->
hw_next
=
cpu_to_le32
(
qh
->
qh_dma
);
//
qh->hw_next = cpu_to_le32 (qh->qh_dma);
qh
->
qh_state
=
QH_STATE_IDLE
;
qh
->
qh_state
=
QH_STATE_IDLE
;
qh
->
qh_next
.
qh
=
0
;
qh
->
qh_next
.
qh
=
0
;
qh_put
(
ehci
,
qh
);
// refcount from reclaim
qh_put
(
ehci
,
qh
);
// refcount from reclaim
...
...
drivers/usb/host/ohci-hcd.c
View file @
7ac1d67a
...
@@ -429,6 +429,8 @@ static int hc_reset (struct ohci_hcd *ohci)
...
@@ -429,6 +429,8 @@ static int hc_reset (struct ohci_hcd *ohci)
ohci
->
hc_control
=
readl
(
&
ohci
->
regs
->
control
);
ohci
->
hc_control
=
readl
(
&
ohci
->
regs
->
control
);
ohci
->
hc_control
&=
OHCI_CTRL_RWC
;
/* hcfs 0 = RESET */
ohci
->
hc_control
&=
OHCI_CTRL_RWC
;
/* hcfs 0 = RESET */
writel
(
ohci
->
hc_control
,
&
ohci
->
regs
->
control
);
writel
(
ohci
->
hc_control
,
&
ohci
->
regs
->
control
);
// flush those pci writes
(
void
)
readl
(
&
ohci
->
regs
->
control
);
wait_ms
(
50
);
wait_ms
(
50
);
/* HC Reset requires max 10 us delay */
/* HC Reset requires max 10 us delay */
...
@@ -450,6 +452,8 @@ static int hc_reset (struct ohci_hcd *ohci)
...
@@ -450,6 +452,8 @@ static int hc_reset (struct ohci_hcd *ohci)
* this if we write fmInterval after we're OPERATIONAL.
* this if we write fmInterval after we're OPERATIONAL.
*/
*/
writel
(
ohci
->
hc_control
,
&
ohci
->
regs
->
control
);
writel
(
ohci
->
hc_control
,
&
ohci
->
regs
->
control
);
// flush those pci writes
(
void
)
readl
(
&
ohci
->
regs
->
control
);
return
0
;
return
0
;
}
}
...
@@ -524,6 +528,8 @@ static int hc_start (struct ohci_hcd *ohci)
...
@@ -524,6 +528,8 @@ static int hc_start (struct ohci_hcd *ohci)
writel
(
tmp
,
&
ohci
->
regs
->
roothub
.
a
);
writel
(
tmp
,
&
ohci
->
regs
->
roothub
.
a
);
writel
(
RH_HS_LPSC
,
&
ohci
->
regs
->
roothub
.
status
);
writel
(
RH_HS_LPSC
,
&
ohci
->
regs
->
roothub
.
status
);
writel
(
0
,
&
ohci
->
regs
->
roothub
.
b
);
writel
(
0
,
&
ohci
->
regs
->
roothub
.
b
);
// flush those pci writes
(
void
)
readl
(
&
ohci
->
regs
->
control
);
// POTPGT delay is bits 24-31, in 2 ms units.
// POTPGT delay is bits 24-31, in 2 ms units.
mdelay
((
roothub_a
(
ohci
)
>>
23
)
&
0x1fe
);
mdelay
((
roothub_a
(
ohci
)
>>
23
)
&
0x1fe
);
...
@@ -610,6 +616,8 @@ static void ohci_irq (struct usb_hcd *hcd, struct pt_regs *ptregs)
...
@@ -610,6 +616,8 @@ static void ohci_irq (struct usb_hcd *hcd, struct pt_regs *ptregs)
writel
(
ints
,
&
regs
->
intrstatus
);
writel
(
ints
,
&
regs
->
intrstatus
);
writel
(
OHCI_INTR_MIE
,
&
regs
->
intrenable
);
writel
(
OHCI_INTR_MIE
,
&
regs
->
intrenable
);
// flush those pci writes
(
void
)
readl
(
&
ohci
->
regs
->
control
);
}
}
/*-------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------*/
...
...
drivers/usb/host/ohci-q.c
View file @
7ac1d67a
...
@@ -446,6 +446,8 @@ static void start_urb_unlink (struct ohci_hcd *ohci, struct ed *ed)
...
@@ -446,6 +446,8 @@ static void start_urb_unlink (struct ohci_hcd *ohci, struct ed *ed)
if
(
!
ohci
->
sleeping
)
{
if
(
!
ohci
->
sleeping
)
{
writel
(
OHCI_INTR_SF
,
&
ohci
->
regs
->
intrstatus
);
writel
(
OHCI_INTR_SF
,
&
ohci
->
regs
->
intrstatus
);
writel
(
OHCI_INTR_SF
,
&
ohci
->
regs
->
intrenable
);
writel
(
OHCI_INTR_SF
,
&
ohci
->
regs
->
intrenable
);
// flush those pci writes
(
void
)
readl
(
&
ohci
->
regs
->
control
);
}
}
}
}
...
...
drivers/usb/input/hid-core.c
View file @
7ac1d67a
...
@@ -1664,6 +1664,9 @@ static struct usb_driver hid_driver = {
...
@@ -1664,6 +1664,9 @@ static struct usb_driver hid_driver = {
.
probe
=
hid_probe
,
.
probe
=
hid_probe
,
.
disconnect
=
hid_disconnect
,
.
disconnect
=
hid_disconnect
,
.
id_table
=
hid_usb_ids
,
.
id_table
=
hid_usb_ids
,
.
driver
=
{
.
devclass
=
&
input_devclass
,
},
};
};
static
int
__init
hid_init
(
void
)
static
int
__init
hid_init
(
void
)
...
...
drivers/usb/input/usbkbd.c
View file @
7ac1d67a
...
@@ -359,6 +359,9 @@ static struct usb_driver usb_kbd_driver = {
...
@@ -359,6 +359,9 @@ static struct usb_driver usb_kbd_driver = {
.
probe
=
usb_kbd_probe
,
.
probe
=
usb_kbd_probe
,
.
disconnect
=
usb_kbd_disconnect
,
.
disconnect
=
usb_kbd_disconnect
,
.
id_table
=
usb_kbd_id_table
,
.
id_table
=
usb_kbd_id_table
,
.
driver
=
{
.
devclass
=
&
input_devclass
,
},
};
};
static
int
__init
usb_kbd_init
(
void
)
static
int
__init
usb_kbd_init
(
void
)
...
...
drivers/usb/input/usbmouse.c
View file @
7ac1d67a
...
@@ -242,6 +242,9 @@ static struct usb_driver usb_mouse_driver = {
...
@@ -242,6 +242,9 @@ static struct usb_driver usb_mouse_driver = {
.
probe
=
usb_mouse_probe
,
.
probe
=
usb_mouse_probe
,
.
disconnect
=
usb_mouse_disconnect
,
.
disconnect
=
usb_mouse_disconnect
,
.
id_table
=
usb_mouse_id_table
,
.
id_table
=
usb_mouse_id_table
,
.
driver
=
{
.
devclass
=
&
input_devclass
,
},
};
};
static
int
__init
usb_mouse_init
(
void
)
static
int
__init
usb_mouse_init
(
void
)
...
...
drivers/usb/misc/speedtch.c
View file @
7ac1d67a
...
@@ -1034,6 +1034,23 @@ static int udsl_atm_ioctl (struct atm_dev *dev, unsigned int cmd, void *arg)
...
@@ -1034,6 +1034,23 @@ static int udsl_atm_ioctl (struct atm_dev *dev, unsigned int cmd, void *arg)
** USB **
** USB **
**********/
**********/
static
int
udsl_set_alternate
(
struct
udsl_instance_data
*
instance
)
{
down
(
&
instance
->
serialize
);
/* vs self */
if
(
!
instance
->
firmware_loaded
)
{
int
ret
;
if
((
ret
=
usb_set_interface
(
instance
->
usb_dev
,
1
,
1
))
<
0
)
{
up
(
&
instance
->
serialize
);
return
ret
;
}
instance
->
firmware_loaded
=
1
;
}
up
(
&
instance
->
serialize
);
udsl_fire_receivers
(
instance
);
return
0
;
}
static
int
udsl_usb_ioctl
(
struct
usb_interface
*
intf
,
unsigned
int
code
,
void
*
user_data
)
static
int
udsl_usb_ioctl
(
struct
usb_interface
*
intf
,
unsigned
int
code
,
void
*
user_data
)
{
{
struct
udsl_instance_data
*
instance
=
usb_get_intfdata
(
intf
);
struct
udsl_instance_data
*
instance
=
usb_get_intfdata
(
intf
);
...
@@ -1048,14 +1065,7 @@ static int udsl_usb_ioctl (struct usb_interface *intf, unsigned int code, void *
...
@@ -1048,14 +1065,7 @@ static int udsl_usb_ioctl (struct usb_interface *intf, unsigned int code, void *
switch
(
code
)
{
switch
(
code
)
{
case
UDSL_IOCTL_START
:
case
UDSL_IOCTL_START
:
instance
->
atm_dev
->
signal
=
ATM_PHY_SIG_FOUND
;
instance
->
atm_dev
->
signal
=
ATM_PHY_SIG_FOUND
;
down
(
&
instance
->
serialize
);
/* vs self */
return
udsl_set_alternate
(
instance
);
if
(
!
instance
->
firmware_loaded
)
{
usb_set_interface
(
instance
->
usb_dev
,
1
,
1
);
instance
->
firmware_loaded
=
1
;
}
up
(
&
instance
->
serialize
);
udsl_fire_receivers
(
instance
);
return
0
;
case
UDSL_IOCTL_STOP
:
case
UDSL_IOCTL_STOP
:
instance
->
atm_dev
->
signal
=
ATM_PHY_SIG_LOST
;
instance
->
atm_dev
->
signal
=
ATM_PHY_SIG_LOST
;
return
0
;
return
0
;
...
...
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