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
ddb6a1aa
Commit
ddb6a1aa
authored
Aug 08, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/gregkh/linux/linus-2.6
into home.osdl.org:/home/torvalds/v2.5/linux
parents
8d33ca95
e0efa2db
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
89 additions
and
154 deletions
+89
-154
drivers/isdn/hisax/st5481_b.c
drivers/isdn/hisax/st5481_b.c
+2
-2
drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
+1
-1
drivers/usb/core/hcd-pci.c
drivers/usb/core/hcd-pci.c
+2
-1
drivers/usb/core/hcd.c
drivers/usb/core/hcd.c
+2
-1
drivers/usb/core/hub.c
drivers/usb/core/hub.c
+1
-3
drivers/usb/core/usb.c
drivers/usb/core/usb.c
+29
-108
drivers/usb/gadget/net2280.c
drivers/usb/gadget/net2280.c
+0
-1
drivers/usb/host/ehci-dbg.c
drivers/usb/host/ehci-dbg.c
+2
-2
drivers/usb/host/ehci-mem.c
drivers/usb/host/ehci-mem.c
+1
-0
drivers/usb/host/ohci-hcd.c
drivers/usb/host/ohci-hcd.c
+1
-3
drivers/usb/host/ohci-mem.c
drivers/usb/host/ohci-mem.c
+1
-0
drivers/usb/host/ohci-pci.c
drivers/usb/host/ohci-pci.c
+5
-6
drivers/usb/host/ohci-sa1111.c
drivers/usb/host/ohci-sa1111.c
+1
-0
drivers/usb/host/uhci-hcd.c
drivers/usb/host/uhci-hcd.c
+1
-0
drivers/usb/net/pegasus.c
drivers/usb/net/pegasus.c
+3
-3
drivers/usb/net/rtl8150.c
drivers/usb/net/rtl8150.c
+12
-2
drivers/usb/net/usbnet.c
drivers/usb/net/usbnet.c
+8
-2
drivers/usb/serial/ftdi_sio.c
drivers/usb/serial/ftdi_sio.c
+7
-0
drivers/usb/serial/ftdi_sio.h
drivers/usb/serial/ftdi_sio.h
+6
-0
drivers/usb/serial/pl2303.c
drivers/usb/serial/pl2303.c
+0
-9
drivers/usb/serial/usb-serial.c
drivers/usb/serial/usb-serial.c
+0
-1
drivers/usb/storage/initializers.c
drivers/usb/storage/initializers.c
+3
-3
drivers/usb/storage/initializers.h
drivers/usb/storage/initializers.h
+0
-2
drivers/usb/usb-skeleton.c
drivers/usb/usb-skeleton.c
+1
-4
No files found.
drivers/isdn/hisax/st5481_b.c
View file @
ddb6a1aa
...
@@ -245,7 +245,7 @@ static void st5481B_mode(struct st5481_bcs *bcs, int mode)
...
@@ -245,7 +245,7 @@ static void st5481B_mode(struct st5481_bcs *bcs, int mode)
}
}
}
}
static
int
__devinit
st5481_setup_b_out
(
struct
st5481_bcs
*
bcs
)
static
int
st5481_setup_b_out
(
struct
st5481_bcs
*
bcs
)
{
{
struct
usb_device
*
dev
=
bcs
->
adapter
->
usb_dev
;
struct
usb_device
*
dev
=
bcs
->
adapter
->
usb_dev
;
struct
usb_host_interface
*
altsetting
;
struct
usb_host_interface
*
altsetting
;
...
@@ -279,7 +279,7 @@ static void st5481_release_b_out(struct st5481_bcs *bcs)
...
@@ -279,7 +279,7 @@ static void st5481_release_b_out(struct st5481_bcs *bcs)
st5481_release_isocpipes
(
b_out
->
urb
);
st5481_release_isocpipes
(
b_out
->
urb
);
}
}
int
__devinit
st5481_setup_b
(
struct
st5481_bcs
*
bcs
)
int
st5481_setup_b
(
struct
st5481_bcs
*
bcs
)
{
{
int
retval
;
int
retval
;
...
...
drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
View file @
ddb6a1aa
...
@@ -788,7 +788,7 @@ static void ttusb_iso_irq(struct urb *urb, struct pt_regs *ptregs)
...
@@ -788,7 +788,7 @@ static void ttusb_iso_irq(struct urb *urb, struct pt_regs *ptregs)
}
}
}
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
usb_submit_urb
(
urb
,
GFP_
KERNEL
);
usb_submit_urb
(
urb
,
GFP_
ATOMIC
);
#endif
#endif
}
}
...
...
drivers/usb/core/hcd-pci.c
View file @
ddb6a1aa
...
@@ -147,7 +147,8 @@ int usb_hcd_pci_probe (struct pci_dev *dev, const struct pci_device_id *id)
...
@@ -147,7 +147,8 @@ int usb_hcd_pci_probe (struct pci_dev *dev, const struct pci_device_id *id)
hcd
->
description
=
driver
->
description
;
hcd
->
description
=
driver
->
description
;
hcd
->
pdev
=
dev
;
hcd
->
pdev
=
dev
;
hcd
->
self
.
bus_name
=
pci_name
(
dev
);
hcd
->
self
.
bus_name
=
pci_name
(
dev
);
hcd
->
product_desc
=
dev
->
dev
.
name
;
if
(
hcd
->
product_desc
==
NULL
)
hcd
->
product_desc
=
"USB Host Controller"
;
hcd
->
self
.
controller
=
&
dev
->
dev
;
hcd
->
self
.
controller
=
&
dev
->
dev
;
hcd
->
controller
=
hcd
->
self
.
controller
;
hcd
->
controller
=
hcd
->
self
.
controller
;
...
...
drivers/usb/core/hcd.c
View file @
ddb6a1aa
...
@@ -1307,7 +1307,8 @@ static void hcd_endpoint_disable (struct usb_device *udev, int endpoint)
...
@@ -1307,7 +1307,8 @@ static void hcd_endpoint_disable (struct usb_device *udev, int endpoint)
/* ignore urbs for other endpoints */
/* ignore urbs for other endpoints */
if
(
usb_pipeendpoint
(
tmp
)
!=
epnum
)
if
(
usb_pipeendpoint
(
tmp
)
!=
epnum
)
continue
;
continue
;
if
((
tmp
^
endpoint
)
&
USB_DIR_IN
)
/* NOTE assumption that only ep0 is a control endpoint */
if
(
epnum
!=
0
&&
((
tmp
^
endpoint
)
&
USB_DIR_IN
))
continue
;
continue
;
/* another cpu may be in hcd, spinning on hcd_data_lock
/* another cpu may be in hcd, spinning on hcd_data_lock
...
...
drivers/usb/core/hub.c
View file @
ddb6a1aa
...
@@ -597,10 +597,8 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id)
...
@@ -597,10 +597,8 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id)
usb_set_intfdata
(
intf
,
hub
);
usb_set_intfdata
(
intf
,
hub
);
if
(
hub_configure
(
hub
,
endpoint
)
>=
0
)
{
if
(
hub_configure
(
hub
,
endpoint
)
>=
0
)
strcpy
(
intf
->
dev
.
name
,
"Hub"
);
return
0
;
return
0
;
}
hub_disconnect
(
intf
);
hub_disconnect
(
intf
);
return
-
ENODEV
;
return
-
ENODEV
;
...
...
drivers/usb/core/usb.c
View file @
ddb6a1aa
...
@@ -978,68 +978,6 @@ int usb_set_address(struct usb_device *dev)
...
@@ -978,68 +978,6 @@ int usb_set_address(struct usb_device *dev)
return
retval
;
return
retval
;
}
}
/* improve on the default device description, if we can ... and
* while we're at it, maybe show the vendor and product strings.
*/
static
void
set_device_description
(
struct
usb_device
*
dev
)
{
void
*
buf
;
int
mfgr
=
dev
->
descriptor
.
iManufacturer
;
int
prod
=
dev
->
descriptor
.
iProduct
;
int
vendor_id
=
dev
->
descriptor
.
idVendor
;
int
product_id
=
dev
->
descriptor
.
idProduct
;
char
*
mfgr_str
,
*
prod_str
;
/* set default; keep it if there are no strings, or kmalloc fails */
sprintf
(
dev
->
dev
.
name
,
"USB device %04x:%04x"
,
vendor_id
,
product_id
);
if
(
!
(
buf
=
kmalloc
(
256
*
2
,
GFP_KERNEL
)))
return
;
prod_str
=
(
char
*
)
buf
;
mfgr_str
=
(
char
*
)
buf
+
256
;
if
(
prod
&&
usb_string
(
dev
,
prod
,
prod_str
,
256
)
>
0
)
{
#ifdef DEBUG
dev_printk
(
KERN_INFO
,
&
dev
->
dev
,
"Product: %s
\n
"
,
prod_str
);
#endif
}
else
{
prod_str
=
0
;
}
if
(
mfgr
&&
usb_string
(
dev
,
mfgr
,
mfgr_str
,
256
)
>
0
)
{
#ifdef DEBUG
dev_printk
(
KERN_INFO
,
&
dev
->
dev
,
"Manufacturer: %s
\n
"
,
mfgr_str
);
#endif
}
else
{
mfgr_str
=
0
;
}
/* much like pci ... describe as either:
* - both strings: 'product descr (vendor descr)'
* - product only: 'product descr (USB device vvvv:pppp)'
* - vendor only: 'USB device vvvv:pppp (vendor descr)'
* - neither string: 'USB device vvvv:pppp'
*/
if
(
prod_str
&&
mfgr_str
)
{
snprintf
(
dev
->
dev
.
name
,
sizeof
dev
->
dev
.
name
,
"%s (%s)"
,
prod_str
,
mfgr_str
);
}
else
if
(
prod_str
)
{
snprintf
(
dev
->
dev
.
name
,
sizeof
dev
->
dev
.
name
,
"%s (USB device %04x:%04x)"
,
prod_str
,
vendor_id
,
product_id
);
}
else
if
(
mfgr_str
)
{
snprintf
(
dev
->
dev
.
name
,
sizeof
dev
->
dev
.
name
,
"USB device %04x:%04x (%s)"
,
vendor_id
,
product_id
,
mfgr_str
);
}
kfree
(
buf
);
}
/*
/*
* By the time we get here, we chose a new device address
* By the time we get here, we chose a new device address
* and is in the default state. We need to identify the thing and
* and is in the default state. We need to identify the thing and
...
@@ -1056,7 +994,7 @@ static void set_device_description (struct usb_device *dev)
...
@@ -1056,7 +994,7 @@ static void set_device_description (struct usb_device *dev)
#define SET_ADDRESS_RETRYS 2
#define SET_ADDRESS_RETRYS 2
int
usb_new_device
(
struct
usb_device
*
dev
,
struct
device
*
parent
)
int
usb_new_device
(
struct
usb_device
*
dev
,
struct
device
*
parent
)
{
{
int
err
=
0
;
int
err
=
-
EINVAL
;
int
i
;
int
i
;
int
j
;
int
j
;
...
@@ -1098,7 +1036,7 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
...
@@ -1098,7 +1036,7 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
i
=
8
;
i
=
8
;
break
;
break
;
default:
default:
return
-
EINVAL
;
goto
fail
;
}
}
dev
->
epmaxpacketin
[
0
]
=
i
;
dev
->
epmaxpacketin
[
0
]
=
i
;
dev
->
epmaxpacketout
[
0
]
=
i
;
dev
->
epmaxpacketout
[
0
]
=
i
;
...
@@ -1112,12 +1050,10 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
...
@@ -1112,12 +1050,10 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
wait_ms
(
200
);
wait_ms
(
200
);
}
}
if
(
err
<
0
)
{
if
(
err
<
0
)
{
dev_err
(
&
dev
->
dev
,
"USB device not accepting new address=%d (error=%d)
\n
"
,
dev_err
(
&
dev
->
dev
,
"device not accepting address %d, error %d
\n
"
,
dev
->
devnum
,
err
);
dev
->
devnum
,
err
);
dev
->
state
=
USB_STATE_DEFAULT
;
goto
fail
;
clear_bit
(
dev
->
devnum
,
dev
->
bus
->
devmap
.
devicemap
);
dev
->
devnum
=
-
1
;
return
1
;
}
}
wait_ms
(
10
);
/* Let the SET_ADDRESS settle */
wait_ms
(
10
);
/* Let the SET_ADDRESS settle */
...
@@ -1130,13 +1066,8 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
...
@@ -1130,13 +1066,8 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
}
}
if
(
err
<
8
)
{
if
(
err
<
8
)
{
if
(
err
<
0
)
dev_err
(
&
dev
->
dev
,
"device descriptor read/8, error %d
\n
"
,
err
);
dev_err
(
&
dev
->
dev
,
"USB device not responding, giving up (error=%d)
\n
"
,
err
);
goto
fail
;
else
dev_err
(
&
dev
->
dev
,
"USB device descriptor short read (expected %i, got %i)
\n
"
,
8
,
err
);
clear_bit
(
dev
->
devnum
,
dev
->
bus
->
devmap
.
devicemap
);
dev
->
devnum
=
-
1
;
return
1
;
}
}
if
(
dev
->
speed
==
USB_SPEED_FULL
)
{
if
(
dev
->
speed
==
USB_SPEED_FULL
)
{
dev
->
epmaxpacketin
[
0
]
=
dev
->
descriptor
.
bMaxPacketSize0
;
dev
->
epmaxpacketin
[
0
]
=
dev
->
descriptor
.
bMaxPacketSize0
;
...
@@ -1147,43 +1078,41 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
...
@@ -1147,43 +1078,41 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
err
=
usb_get_device_descriptor
(
dev
);
err
=
usb_get_device_descriptor
(
dev
);
if
(
err
<
(
signed
)
sizeof
(
dev
->
descriptor
))
{
if
(
err
<
(
signed
)
sizeof
(
dev
->
descriptor
))
{
if
(
err
<
0
)
dev_err
(
&
dev
->
dev
,
"device descriptor read/all, error %d
\n
"
,
err
);
dev_err
(
&
dev
->
dev
,
"unable to get device descriptor (error=%d)
\n
"
,
err
);
goto
fail
;
else
dev_err
(
&
dev
->
dev
,
"USB device descriptor short read (expected %Zi, got %i)
\n
"
,
sizeof
(
dev
->
descriptor
),
err
);
clear_bit
(
dev
->
devnum
,
dev
->
bus
->
devmap
.
devicemap
);
dev
->
devnum
=
-
1
;
return
1
;
}
}
err
=
usb_get_configuration
(
dev
);
err
=
usb_get_configuration
(
dev
);
if
(
err
<
0
)
{
if
(
err
<
0
)
{
dev_err
(
&
dev
->
dev
,
"unable to get device %d configuration (error=%d)
\n
"
,
dev_err
(
&
dev
->
dev
,
"unable to get device %d configuration (error=%d)
\n
"
,
dev
->
devnum
,
err
);
dev
->
devnum
,
err
);
clear_bit
(
dev
->
devnum
,
dev
->
bus
->
devmap
.
devicemap
);
goto
fail
;
dev
->
devnum
=
-
1
;
return
1
;
}
}
/* we set the default configuration here */
/* choose and set the configuration here */
if
(
dev
->
descriptor
.
bNumConfigurations
!=
1
)
{
dev_info
(
&
dev
->
dev
,
"configuration #%d chosen from %d choices
\n
"
,
dev
->
config
[
0
].
desc
.
bConfigurationValue
,
dev
->
descriptor
.
bNumConfigurations
);
}
err
=
usb_set_configuration
(
dev
,
dev
->
config
[
0
].
desc
.
bConfigurationValue
);
err
=
usb_set_configuration
(
dev
,
dev
->
config
[
0
].
desc
.
bConfigurationValue
);
if
(
err
)
{
if
(
err
)
{
dev_err
(
&
dev
->
dev
,
"failed to set device %d default configuration (error=%d)
\n
"
,
dev_err
(
&
dev
->
dev
,
"failed to set device %d default configuration (error=%d)
\n
"
,
dev
->
devnum
,
err
);
dev
->
devnum
,
err
);
clear_bit
(
dev
->
devnum
,
dev
->
bus
->
devmap
.
devicemap
);
goto
fail
;
dev
->
devnum
=
-
1
;
return
1
;
}
}
/* USB device state == configured ... tell the world! */
/* USB device state == configured ... tell the world! */
dev_dbg
(
&
dev
->
dev
,
"new device strings: Mfr=%d, Product=%d, SerialNumber=%d
\n
"
,
dev_dbg
(
&
dev
->
dev
,
"new device strings: Mfr=%d, Product=%d, SerialNumber=%d
\n
"
,
dev
->
descriptor
.
iManufacturer
,
dev
->
descriptor
.
iProduct
,
dev
->
descriptor
.
iSerialNumber
);
dev
->
descriptor
.
iManufacturer
,
dev
->
descriptor
.
iProduct
,
dev
->
descriptor
.
iSerialNumber
);
set_device_description
(
dev
);
#ifdef DEBUG
#ifdef DEBUG
if
(
dev
->
descriptor
.
iProduct
)
usb_show_string
(
dev
,
"Product"
,
dev
->
descriptor
.
iProduct
);
if
(
dev
->
descriptor
.
iManufacturer
)
usb_show_string
(
dev
,
"Manufacturer"
,
dev
->
descriptor
.
iManufacturer
);
if
(
dev
->
descriptor
.
iSerialNumber
)
if
(
dev
->
descriptor
.
iSerialNumber
)
usb_show_string
(
dev
,
"SerialNumber"
,
dev
->
descriptor
.
iSerialNumber
);
usb_show_string
(
dev
,
"SerialNumber"
,
dev
->
descriptor
.
iSerialNumber
);
#endif
#endif
...
@@ -1191,7 +1120,7 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
...
@@ -1191,7 +1120,7 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
/* put into sysfs, with device and config specific files */
/* put into sysfs, with device and config specific files */
err
=
device_add
(
&
dev
->
dev
);
err
=
device_add
(
&
dev
->
dev
);
if
(
err
)
if
(
err
)
return
err
;
goto
fail
;
usb_create_driverfs_dev_files
(
dev
);
usb_create_driverfs_dev_files
(
dev
);
/* Register all of the interfaces for this device with the driver core.
/* Register all of the interfaces for this device with the driver core.
...
@@ -1208,20 +1137,6 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
...
@@ -1208,20 +1137,6 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
sprintf
(
&
interface
->
dev
.
bus_id
[
0
],
"%d-%s:%d"
,
sprintf
(
&
interface
->
dev
.
bus_id
[
0
],
"%d-%s:%d"
,
dev
->
bus
->
busnum
,
dev
->
devpath
,
dev
->
bus
->
busnum
,
dev
->
devpath
,
desc
->
bInterfaceNumber
);
desc
->
bInterfaceNumber
);
if
(
!
desc
->
iInterface
||
usb_string
(
dev
,
desc
->
iInterface
,
interface
->
dev
.
name
,
sizeof
interface
->
dev
.
name
)
<=
0
)
{
/* typically devices won't bother with interface
* descriptions; this is the normal case. an
* interface's driver might describe it better.
* (also: iInterface is per-altsetting ...)
*/
sprintf
(
&
interface
->
dev
.
name
[
0
],
"usb-%s-%s interface %d"
,
dev
->
bus
->
bus_name
,
dev
->
devpath
,
desc
->
bInterfaceNumber
);
}
dev_dbg
(
&
dev
->
dev
,
"%s - registering interface %s
\n
"
,
__FUNCTION__
,
interface
->
dev
.
bus_id
);
dev_dbg
(
&
dev
->
dev
,
"%s - registering interface %s
\n
"
,
__FUNCTION__
,
interface
->
dev
.
bus_id
);
device_add
(
&
interface
->
dev
);
device_add
(
&
interface
->
dev
);
usb_create_driverfs_intf_files
(
interface
);
usb_create_driverfs_intf_files
(
interface
);
...
@@ -1231,6 +1146,12 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
...
@@ -1231,6 +1146,12 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
usbfs_add_device
(
dev
);
usbfs_add_device
(
dev
);
return
0
;
return
0
;
fail:
dev
->
state
=
USB_STATE_DEFAULT
;
clear_bit
(
dev
->
devnum
,
dev
->
bus
->
devmap
.
devicemap
);
dev
->
devnum
=
-
1
;
usb_put_dev
(
dev
);
return
err
;
}
}
/**
/**
...
...
drivers/usb/gadget/net2280.c
View file @
ddb6a1aa
...
@@ -2535,7 +2535,6 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id)
...
@@ -2535,7 +2535,6 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id)
dev
->
gadget
.
ops
=
&
net2280_ops
;
dev
->
gadget
.
ops
=
&
net2280_ops
;
strcpy
(
dev
->
gadget
.
dev
.
bus_id
,
pci_name
(
pdev
));
strcpy
(
dev
->
gadget
.
dev
.
bus_id
,
pci_name
(
pdev
));
strcpy
(
dev
->
gadget
.
dev
.
name
,
pdev
->
dev
.
name
);
dev
->
gadget
.
dev
.
parent
=
&
pdev
->
dev
;
dev
->
gadget
.
dev
.
parent
=
&
pdev
->
dev
;
dev
->
gadget
.
dev
.
dma_mask
=
pdev
->
dev
.
dma_mask
;
dev
->
gadget
.
dev
.
dma_mask
=
pdev
->
dev
.
dma_mask
;
dev
->
gadget
.
name
=
driver_name
;
dev
->
gadget
.
name
=
driver_name
;
...
...
drivers/usb/host/ehci-dbg.c
View file @
ddb6a1aa
...
@@ -591,8 +591,8 @@ show_registers (struct class_device *class_dev, char *buf)
...
@@ -591,8 +591,8 @@ show_registers (struct class_device *class_dev, char *buf)
/* Capability Registers */
/* Capability Registers */
i
=
readw
(
&
ehci
->
caps
->
hci_version
);
i
=
readw
(
&
ehci
->
caps
->
hci_version
);
temp
=
snprintf
(
next
,
size
,
temp
=
snprintf
(
next
,
size
,
"%s
\n
EHCI %x.%02x, hcd state %d (driver "
DRIVER_VERSION
")
\n
"
,
"
PCI device
%s
\n
EHCI %x.%02x, hcd state %d (driver "
DRIVER_VERSION
")
\n
"
,
hcd
->
pdev
->
dev
.
name
,
pci_name
(
hcd
->
pdev
)
,
i
>>
8
,
i
&
0x0ff
,
ehci
->
hcd
.
state
);
i
>>
8
,
i
&
0x0ff
,
ehci
->
hcd
.
state
);
size
-=
temp
;
size
-=
temp
;
next
+=
temp
;
next
+=
temp
;
...
...
drivers/usb/host/ehci-mem.c
View file @
ddb6a1aa
...
@@ -44,6 +44,7 @@ static struct usb_hcd *ehci_hcd_alloc (void)
...
@@ -44,6 +44,7 @@ static struct usb_hcd *ehci_hcd_alloc (void)
kmalloc
(
sizeof
(
struct
ehci_hcd
),
GFP_KERNEL
);
kmalloc
(
sizeof
(
struct
ehci_hcd
),
GFP_KERNEL
);
if
(
ehci
!=
0
)
{
if
(
ehci
!=
0
)
{
memset
(
ehci
,
0
,
sizeof
(
struct
ehci_hcd
));
memset
(
ehci
,
0
,
sizeof
(
struct
ehci_hcd
));
ehci
->
hcd
.
product_desc
=
"EHCI Host Controller"
;
return
&
ehci
->
hcd
;
return
&
ehci
->
hcd
;
}
}
return
0
;
return
0
;
...
...
drivers/usb/host/ohci-hcd.c
View file @
ddb6a1aa
...
@@ -412,8 +412,7 @@ static int hc_reset (struct ohci_hcd *ohci)
...
@@ -412,8 +412,7 @@ static int hc_reset (struct ohci_hcd *ohci)
/* Disable HC interrupts */
/* Disable HC interrupts */
writel
(
OHCI_INTR_MIE
,
&
ohci
->
regs
->
intrdisable
);
writel
(
OHCI_INTR_MIE
,
&
ohci
->
regs
->
intrdisable
);
ohci_dbg
(
ohci
,
"USB HC reset_hc %s: ctrl = 0x%x ;
\n
"
,
ohci_dbg
(
ohci
,
"reset, control = 0x%x
\n
"
,
hcd_to_bus
(
&
ohci
->
hcd
)
->
bus_name
,
readl
(
&
ohci
->
regs
->
control
));
readl
(
&
ohci
->
regs
->
control
));
/* Reset USB (needed by some controllers); RemoteWakeupConnected
/* Reset USB (needed by some controllers); RemoteWakeupConnected
...
@@ -548,7 +547,6 @@ static int hc_start (struct ohci_hcd *ohci)
...
@@ -548,7 +547,6 @@ static int hc_start (struct ohci_hcd *ohci)
return
-
ENODEV
;
return
-
ENODEV
;
}
}
create_debug_files
(
ohci
);
return
0
;
return
0
;
}
}
...
...
drivers/usb/host/ohci-mem.c
View file @
ddb6a1aa
...
@@ -30,6 +30,7 @@ static struct usb_hcd *ohci_hcd_alloc (void)
...
@@ -30,6 +30,7 @@ static struct usb_hcd *ohci_hcd_alloc (void)
ohci
=
(
struct
ohci_hcd
*
)
kmalloc
(
sizeof
*
ohci
,
GFP_KERNEL
);
ohci
=
(
struct
ohci_hcd
*
)
kmalloc
(
sizeof
*
ohci
,
GFP_KERNEL
);
if
(
ohci
!=
0
)
{
if
(
ohci
!=
0
)
{
memset
(
ohci
,
0
,
sizeof
(
struct
ohci_hcd
));
memset
(
ohci
,
0
,
sizeof
(
struct
ohci_hcd
));
ohci
->
hcd
.
product_desc
=
"OHCI Host Controller"
;
return
&
ohci
->
hcd
;
return
&
ohci
->
hcd
;
}
}
return
0
;
return
0
;
...
...
drivers/usb/host/ohci-pci.c
View file @
ddb6a1aa
...
@@ -101,6 +101,7 @@ ohci_pci_start (struct usb_hcd *hcd)
...
@@ -101,6 +101,7 @@ ohci_pci_start (struct usb_hcd *hcd)
ohci_stop
(
hcd
);
ohci_stop
(
hcd
);
return
-
EBUSY
;
return
-
EBUSY
;
}
}
create_debug_files
(
ohci
);
#ifdef DEBUG
#ifdef DEBUG
ohci_dump
(
ohci
,
1
);
ohci_dump
(
ohci
,
1
);
...
@@ -115,6 +116,7 @@ static int ohci_pci_suspend (struct usb_hcd *hcd, u32 state)
...
@@ -115,6 +116,7 @@ static int ohci_pci_suspend (struct usb_hcd *hcd, u32 state)
struct
ohci_hcd
*
ohci
=
hcd_to_ohci
(
hcd
);
struct
ohci_hcd
*
ohci
=
hcd_to_ohci
(
hcd
);
unsigned
long
flags
;
unsigned
long
flags
;
u16
cmd
;
u16
cmd
;
u32
tmp
;
if
((
ohci
->
hc_control
&
OHCI_CTRL_HCFS
)
!=
OHCI_USB_OPER
)
{
if
((
ohci
->
hc_control
&
OHCI_CTRL_HCFS
)
!=
OHCI_USB_OPER
)
{
ohci_dbg
(
ohci
,
"can't suspend (state is %s)
\n
"
,
ohci_dbg
(
ohci
,
"can't suspend (state is %s)
\n
"
,
...
@@ -156,15 +158,12 @@ static int ohci_pci_suspend (struct usb_hcd *hcd, u32 state)
...
@@ -156,15 +158,12 @@ static int ohci_pci_suspend (struct usb_hcd *hcd, u32 state)
(
void
)
readl
(
&
ohci
->
regs
->
control
);
(
void
)
readl
(
&
ohci
->
regs
->
control
);
mdelay
(
500
);
/* No schedule here ! */
mdelay
(
500
);
/* No schedule here ! */
switch
(
readl
(
&
ohci
->
regs
->
control
)
&
OHCI_CTRL_HCFS
)
{
tmp
=
readl
(
&
ohci
->
regs
->
control
)
|
OHCI_CTRL_HCFS
;
switch
(
tmp
)
{
case
OHCI_USB_RESET
:
case
OHCI_USB_RESET
:
ohci_dbg
(
ohci
,
"suspend->reset ?
\n
"
);
break
;
case
OHCI_USB_RESUME
:
case
OHCI_USB_RESUME
:
ohci_dbg
(
ohci
,
"suspend->resume ?
\n
"
);
break
;
case
OHCI_USB_OPER
:
case
OHCI_USB_OPER
:
ohci_
dbg
(
ohci
,
"suspend->operational ?
\n
"
);
ohci_
err
(
ohci
,
"can't suspend; hcfs %d
\n
"
,
tmp
);
break
;
break
;
case
OHCI_USB_SUSPEND
:
case
OHCI_USB_SUSPEND
:
ohci_dbg
(
ohci
,
"suspended
\n
"
);
ohci_dbg
(
ohci
,
"suspended
\n
"
);
...
...
drivers/usb/host/ohci-sa1111.c
View file @
ddb6a1aa
...
@@ -296,6 +296,7 @@ ohci_sa1111_start (struct usb_hcd *hcd)
...
@@ -296,6 +296,7 @@ ohci_sa1111_start (struct usb_hcd *hcd)
ohci_stop
(
hcd
);
ohci_stop
(
hcd
);
return
-
EBUSY
;
return
-
EBUSY
;
}
}
create_debug_files
(
ohci
);
#ifdef DEBUG
#ifdef DEBUG
ohci_dump
(
ohci
,
1
);
ohci_dump
(
ohci
,
1
);
...
...
drivers/usb/host/uhci-hcd.c
View file @
ddb6a1aa
...
@@ -2460,6 +2460,7 @@ static struct usb_hcd *uhci_hcd_alloc(void)
...
@@ -2460,6 +2460,7 @@ static struct usb_hcd *uhci_hcd_alloc(void)
return
NULL
;
return
NULL
;
memset
(
uhci
,
0
,
sizeof
(
*
uhci
));
memset
(
uhci
,
0
,
sizeof
(
*
uhci
));
uhci
->
hcd
.
product_desc
=
"UHCI Host Controller"
;
return
&
uhci
->
hcd
;
return
&
uhci
->
hcd
;
}
}
...
...
drivers/usb/net/pegasus.c
View file @
ddb6a1aa
...
@@ -121,7 +121,7 @@ static int get_registers(pegasus_t * pegasus, __u16 indx, __u16 size,
...
@@ -121,7 +121,7 @@ static int get_registers(pegasus_t * pegasus, __u16 indx, __u16 size,
char
*
buffer
;
char
*
buffer
;
DECLARE_WAITQUEUE
(
wait
,
current
);
DECLARE_WAITQUEUE
(
wait
,
current
);
buffer
=
kmalloc
(
size
,
GFP_
DMA
);
buffer
=
kmalloc
(
size
,
GFP_
KERNEL
);
if
(
!
buffer
)
{
if
(
!
buffer
)
{
warn
(
"%s: looks like we're out of memory"
,
__FUNCTION__
);
warn
(
"%s: looks like we're out of memory"
,
__FUNCTION__
);
return
-
ENOMEM
;
return
-
ENOMEM
;
...
@@ -170,7 +170,7 @@ static int set_registers(pegasus_t * pegasus, __u16 indx, __u16 size,
...
@@ -170,7 +170,7 @@ static int set_registers(pegasus_t * pegasus, __u16 indx, __u16 size,
char
*
buffer
;
char
*
buffer
;
DECLARE_WAITQUEUE
(
wait
,
current
);
DECLARE_WAITQUEUE
(
wait
,
current
);
buffer
=
kmalloc
(
size
,
GFP_
DMA
);
buffer
=
kmalloc
(
size
,
GFP_
KERNEL
);
if
(
!
buffer
)
{
if
(
!
buffer
)
{
warn
(
"%s: looks like we're out of memory"
,
__FUNCTION__
);
warn
(
"%s: looks like we're out of memory"
,
__FUNCTION__
);
return
-
ENOMEM
;
return
-
ENOMEM
;
...
@@ -218,7 +218,7 @@ static int set_register(pegasus_t * pegasus, __u16 indx, __u8 data)
...
@@ -218,7 +218,7 @@ static int set_register(pegasus_t * pegasus, __u16 indx, __u8 data)
char
*
tmp
;
char
*
tmp
;
DECLARE_WAITQUEUE
(
wait
,
current
);
DECLARE_WAITQUEUE
(
wait
,
current
);
tmp
=
kmalloc
(
1
,
GFP_
DMA
);
tmp
=
kmalloc
(
1
,
GFP_
KERNEL
);
if
(
!
tmp
)
{
if
(
!
tmp
)
{
warn
(
"%s: looks like we're out of memory"
,
__FUNCTION__
);
warn
(
"%s: looks like we're out of memory"
,
__FUNCTION__
);
return
-
ENOMEM
;
return
-
ENOMEM
;
...
...
drivers/usb/net/rtl8150.c
View file @
ddb6a1aa
...
@@ -51,6 +51,7 @@
...
@@ -51,6 +51,7 @@
#define PHY_GO 0x40
#define PHY_GO 0x40
#define MII_TIMEOUT 10
#define MII_TIMEOUT 10
#define INTBUFSIZE 8
#define RTL8150_REQT_READ 0xc0
#define RTL8150_REQT_READ 0xc0
#define RTL8150_REQT_WRITE 0x40
#define RTL8150_REQT_WRITE 0x40
...
@@ -98,7 +99,7 @@ struct rtl8150 {
...
@@ -98,7 +99,7 @@ struct rtl8150 {
struct
usb_ctrlrequest
dr
;
struct
usb_ctrlrequest
dr
;
int
intr_interval
;
int
intr_interval
;
u16
rx_creg
;
u16
rx_creg
;
u8
intr_buff
[
8
]
;
u8
*
intr_buff
;
u8
phy
;
u8
phy
;
};
};
...
@@ -646,7 +647,7 @@ static int rtl8150_open(struct net_device *netdev)
...
@@ -646,7 +647,7 @@ static int rtl8150_open(struct net_device *netdev)
if
((
res
=
usb_submit_urb
(
dev
->
rx_urb
,
GFP_KERNEL
)))
if
((
res
=
usb_submit_urb
(
dev
->
rx_urb
,
GFP_KERNEL
)))
warn
(
"%s: rx_urb submit failed: %d"
,
__FUNCTION__
,
res
);
warn
(
"%s: rx_urb submit failed: %d"
,
__FUNCTION__
,
res
);
usb_fill_int_urb
(
dev
->
intr_urb
,
dev
->
udev
,
usb_rcvintpipe
(
dev
->
udev
,
3
),
usb_fill_int_urb
(
dev
->
intr_urb
,
dev
->
udev
,
usb_rcvintpipe
(
dev
->
udev
,
3
),
dev
->
intr_buff
,
sizeof
(
dev
->
intr_buff
)
,
intr_callback
,
dev
->
intr_buff
,
INTBUFSIZE
,
intr_callback
,
dev
,
dev
->
intr_interval
);
dev
,
dev
->
intr_interval
);
if
((
res
=
usb_submit_urb
(
dev
->
intr_urb
,
GFP_KERNEL
)))
if
((
res
=
usb_submit_urb
(
dev
->
intr_urb
,
GFP_KERNEL
)))
warn
(
"%s: intr_urb submit failed: %d"
,
__FUNCTION__
,
res
);
warn
(
"%s: intr_urb submit failed: %d"
,
__FUNCTION__
,
res
);
...
@@ -790,8 +791,15 @@ static int rtl8150_probe(struct usb_interface *intf,
...
@@ -790,8 +791,15 @@ static int rtl8150_probe(struct usb_interface *intf,
}
else
}
else
memset
(
dev
,
0
,
sizeof
(
rtl8150_t
));
memset
(
dev
,
0
,
sizeof
(
rtl8150_t
));
dev
->
intr_buff
=
kmalloc
(
INTBUFSIZE
,
GFP_KERNEL
);
if
(
!
dev
->
intr_buff
)
{
kfree
(
dev
);
return
-
ENOMEM
;
}
netdev
=
alloc_etherdev
(
0
);
netdev
=
alloc_etherdev
(
0
);
if
(
!
netdev
)
{
if
(
!
netdev
)
{
kfree
(
dev
->
intr_buff
);
kfree
(
dev
);
kfree
(
dev
);
err
(
"Oh boy, out of memory again?!?"
);
err
(
"Oh boy, out of memory again?!?"
);
return
-
ENOMEM
;
return
-
ENOMEM
;
...
@@ -843,6 +851,7 @@ static int rtl8150_probe(struct usb_interface *intf,
...
@@ -843,6 +851,7 @@ static int rtl8150_probe(struct usb_interface *intf,
out1:
out1:
free_all_urbs
(
dev
);
free_all_urbs
(
dev
);
out:
out:
kfree
(
dev
->
intr_buff
);
kfree
(
netdev
);
kfree
(
netdev
);
kfree
(
dev
);
kfree
(
dev
);
return
-
EIO
;
return
-
EIO
;
...
@@ -862,6 +871,7 @@ static void rtl8150_disconnect(struct usb_interface *intf)
...
@@ -862,6 +871,7 @@ static void rtl8150_disconnect(struct usb_interface *intf)
if
(
dev
->
rx_skb
)
if
(
dev
->
rx_skb
)
dev_kfree_skb
(
dev
->
rx_skb
);
dev_kfree_skb
(
dev
->
rx_skb
);
kfree
(
dev
->
netdev
);
kfree
(
dev
->
netdev
);
kfree
(
dev
->
intr_buff
);
kfree
(
dev
);
kfree
(
dev
);
}
}
}
}
...
...
drivers/usb/net/usbnet.c
View file @
ddb6a1aa
...
@@ -2048,8 +2048,11 @@ static int usbnet_stop (struct net_device *net)
...
@@ -2048,8 +2048,11 @@ static int usbnet_stop (struct net_device *net)
dev
->
wait
=
0
;
dev
->
wait
=
0
;
remove_wait_queue
(
&
unlink_wakeup
,
&
wait
);
remove_wait_queue
(
&
unlink_wakeup
,
&
wait
);
// deferred work (task, timer, softirq) must also stop
/* deferred work (task, timer, softirq) must also stop.
flush_scheduled_work
();
* can't flush_scheduled_work() until we drop rtnl (later),
* else workers could deadlock; so make workers a NOP.
*/
dev
->
flags
=
0
;
del_timer_sync
(
&
dev
->
delay
);
del_timer_sync
(
&
dev
->
delay
);
tasklet_kill
(
&
dev
->
bh
);
tasklet_kill
(
&
dev
->
bh
);
...
@@ -2488,6 +2491,9 @@ static void usbnet_disconnect (struct usb_interface *intf)
...
@@ -2488,6 +2491,9 @@ static void usbnet_disconnect (struct usb_interface *intf)
unregister_netdev
(
dev
->
net
);
unregister_netdev
(
dev
->
net
);
/* we don't hold rtnl here ... */
flush_scheduled_work
();
if
(
dev
->
driver_info
->
unbind
)
if
(
dev
->
driver_info
->
unbind
)
dev
->
driver_info
->
unbind
(
dev
,
intf
);
dev
->
driver_info
->
unbind
(
dev
,
intf
);
...
...
drivers/usb/serial/ftdi_sio.c
View file @
ddb6a1aa
...
@@ -17,6 +17,10 @@
...
@@ -17,6 +17,10 @@
* See http://ftdi-usb-sio.sourceforge.net for upto date testing info
* See http://ftdi-usb-sio.sourceforge.net for upto date testing info
* and extra documentation
* and extra documentation
*
*
* (05/Aug/2003) Ian Abbott
* Added VID/PID for ID TECH IDT1221U USB to RS-232 adapter.
* VID/PID provided by Steve Briggs.
*
* (23/Jul/2003) Ian Abbott
* (23/Jul/2003) Ian Abbott
* Added PIDs for CrystalFontz 547, 633, 631, 635, 640 and 640 from
* Added PIDs for CrystalFontz 547, 633, 631, 635, 640 and 640 from
* Wayne Wylupski.
* Wayne Wylupski.
...
@@ -324,6 +328,7 @@ static struct usb_device_id id_table_8U232AM [] = {
...
@@ -324,6 +328,7 @@ static struct usb_device_id id_table_8U232AM [] = {
{
USB_DEVICE_VER
(
SEALEVEL_VID
,
SEALEVEL_2803_6_PID
,
0
,
0x3ff
)
},
{
USB_DEVICE_VER
(
SEALEVEL_VID
,
SEALEVEL_2803_6_PID
,
0
,
0x3ff
)
},
{
USB_DEVICE_VER
(
SEALEVEL_VID
,
SEALEVEL_2803_7_PID
,
0
,
0x3ff
)
},
{
USB_DEVICE_VER
(
SEALEVEL_VID
,
SEALEVEL_2803_7_PID
,
0
,
0x3ff
)
},
{
USB_DEVICE_VER
(
SEALEVEL_VID
,
SEALEVEL_2803_8_PID
,
0
,
0x3ff
)
},
{
USB_DEVICE_VER
(
SEALEVEL_VID
,
SEALEVEL_2803_8_PID
,
0
,
0x3ff
)
},
{
USB_DEVICE_VER
(
IDTECH_VID
,
IDTECH_IDT1221U_PID
,
0
,
0x3ff
)
},
{
}
/* Terminating entry */
{
}
/* Terminating entry */
};
};
...
@@ -395,6 +400,7 @@ static struct usb_device_id id_table_FT232BM [] = {
...
@@ -395,6 +400,7 @@ static struct usb_device_id id_table_FT232BM [] = {
{
USB_DEVICE_VER
(
SEALEVEL_VID
,
SEALEVEL_2803_6_PID
,
0x400
,
0xffff
)
},
{
USB_DEVICE_VER
(
SEALEVEL_VID
,
SEALEVEL_2803_6_PID
,
0x400
,
0xffff
)
},
{
USB_DEVICE_VER
(
SEALEVEL_VID
,
SEALEVEL_2803_7_PID
,
0x400
,
0xffff
)
},
{
USB_DEVICE_VER
(
SEALEVEL_VID
,
SEALEVEL_2803_7_PID
,
0x400
,
0xffff
)
},
{
USB_DEVICE_VER
(
SEALEVEL_VID
,
SEALEVEL_2803_8_PID
,
0x400
,
0xffff
)
},
{
USB_DEVICE_VER
(
SEALEVEL_VID
,
SEALEVEL_2803_8_PID
,
0x400
,
0xffff
)
},
{
USB_DEVICE_VER
(
IDTECH_VID
,
IDTECH_IDT1221U_PID
,
0x400
,
0xffff
)
},
{
}
/* Terminating entry */
{
}
/* Terminating entry */
};
};
...
@@ -479,6 +485,7 @@ static struct usb_device_id id_table_combined [] = {
...
@@ -479,6 +485,7 @@ static struct usb_device_id id_table_combined [] = {
{
USB_DEVICE
(
SEALEVEL_VID
,
SEALEVEL_2803_6_PID
)
},
{
USB_DEVICE
(
SEALEVEL_VID
,
SEALEVEL_2803_6_PID
)
},
{
USB_DEVICE
(
SEALEVEL_VID
,
SEALEVEL_2803_7_PID
)
},
{
USB_DEVICE
(
SEALEVEL_VID
,
SEALEVEL_2803_7_PID
)
},
{
USB_DEVICE
(
SEALEVEL_VID
,
SEALEVEL_2803_8_PID
)
},
{
USB_DEVICE
(
SEALEVEL_VID
,
SEALEVEL_2803_8_PID
)
},
{
USB_DEVICE
(
IDTECH_VID
,
IDTECH_IDT1221U_PID
)
},
{
USB_DEVICE_VER
(
FTDI_VID
,
FTDI_HE_TIRA1_PID
,
0x400
,
0xffff
)
},
{
USB_DEVICE_VER
(
FTDI_VID
,
FTDI_HE_TIRA1_PID
,
0x400
,
0xffff
)
},
{
USB_DEVICE
(
FTDI_VID
,
FTDI_USB_UIRT_PID
)
},
{
USB_DEVICE
(
FTDI_VID
,
FTDI_USB_UIRT_PID
)
},
{
}
/* Terminating entry */
{
}
/* Terminating entry */
...
...
drivers/usb/serial/ftdi_sio.h
View file @
ddb6a1aa
...
@@ -127,6 +127,12 @@
...
@@ -127,6 +127,12 @@
/* http://home.earthlink.net/~jrhees/USBUIRT/index.htm */
/* http://home.earthlink.net/~jrhees/USBUIRT/index.htm */
#define FTDI_USB_UIRT_PID 0xF850
/* Product Id */
#define FTDI_USB_UIRT_PID 0xF850
/* Product Id */
/*
* Definitions for ID TECH (www.idt-net.com) devices
*/
#define IDTECH_VID 0x0ACD
/* ID TECH Vendor ID */
#define IDTECH_IDT1221U_PID 0x0300
/* IDT1221U USB to RS-232 adapter */
/* Commands */
/* Commands */
#define FTDI_SIO_RESET 0
/* Reset the port */
#define FTDI_SIO_RESET 0
/* Reset the port */
#define FTDI_SIO_MODEM_CTRL 1
/* Set the modem control register */
#define FTDI_SIO_MODEM_CTRL 1
/* Set the modem control register */
...
...
drivers/usb/serial/pl2303.c
View file @
ddb6a1aa
...
@@ -285,12 +285,6 @@ static void pl2303_set_termios (struct usb_serial_port *port, struct termios *ol
...
@@ -285,12 +285,6 @@ static void pl2303_set_termios (struct usb_serial_port *port, struct termios *ol
buf
[
0
],
buf
[
1
],
buf
[
2
],
buf
[
3
],
buf
[
4
],
buf
[
5
],
buf
[
6
]);
buf
[
0
],
buf
[
1
],
buf
[
2
],
buf
[
3
],
buf
[
4
],
buf
[
5
],
buf
[
6
]);
i
=
usb_control_msg
(
serial
->
dev
,
usb_sndctrlpipe
(
serial
->
dev
,
0
),
VENDOR_WRITE_REQUEST
,
VENDOR_WRITE_REQUEST_TYPE
,
0
,
1
,
NULL
,
0
,
100
);
dbg
(
"0x40:1:0:1 %d"
,
i
);
if
(
cflag
&
CSIZE
)
{
if
(
cflag
&
CSIZE
)
{
switch
(
cflag
&
CSIZE
)
{
switch
(
cflag
&
CSIZE
)
{
case
CS5
:
buf
[
6
]
=
5
;
break
;
case
CS5
:
buf
[
6
]
=
5
;
break
;
...
@@ -428,9 +422,6 @@ static int pl2303_open (struct usb_serial_port *port, struct file *filp)
...
@@ -428,9 +422,6 @@ static int pl2303_open (struct usb_serial_port *port, struct file *filp)
SOUP
(
VENDOR_WRITE_REQUEST_TYPE
,
VENDOR_WRITE_REQUEST
,
0x0404
,
1
);
SOUP
(
VENDOR_WRITE_REQUEST_TYPE
,
VENDOR_WRITE_REQUEST
,
0x0404
,
1
);
FISH
(
VENDOR_READ_REQUEST_TYPE
,
VENDOR_READ_REQUEST
,
0x8484
,
0
);
FISH
(
VENDOR_READ_REQUEST_TYPE
,
VENDOR_READ_REQUEST
,
0x8484
,
0
);
FISH
(
VENDOR_READ_REQUEST_TYPE
,
VENDOR_READ_REQUEST
,
0x8383
,
0
);
FISH
(
VENDOR_READ_REQUEST_TYPE
,
VENDOR_READ_REQUEST
,
0x8383
,
0
);
SOUP
(
VENDOR_WRITE_REQUEST_TYPE
,
VENDOR_WRITE_REQUEST
,
0
,
1
);
SOUP
(
VENDOR_WRITE_REQUEST_TYPE
,
VENDOR_WRITE_REQUEST
,
1
,
0xc0
);
SOUP
(
VENDOR_WRITE_REQUEST_TYPE
,
VENDOR_WRITE_REQUEST
,
2
,
4
);
/* Setup termios */
/* Setup termios */
if
(
port
->
tty
)
{
if
(
port
->
tty
)
{
...
...
drivers/usb/serial/usb-serial.c
View file @
ddb6a1aa
...
@@ -1238,7 +1238,6 @@ int usb_serial_probe(struct usb_interface *interface,
...
@@ -1238,7 +1238,6 @@ int usb_serial_probe(struct usb_interface *interface,
port
->
dev
.
bus
=
&
usb_serial_bus_type
;
port
->
dev
.
bus
=
&
usb_serial_bus_type
;
snprintf
(
&
port
->
dev
.
bus_id
[
0
],
sizeof
(
port
->
dev
.
bus_id
),
"ttyUSB%d"
,
port
->
number
);
snprintf
(
&
port
->
dev
.
bus_id
[
0
],
sizeof
(
port
->
dev
.
bus_id
),
"ttyUSB%d"
,
port
->
number
);
snprintf
(
&
port
->
dev
.
name
[
0
],
sizeof
(
port
->
dev
.
name
),
"usb serial port %d"
,
port
->
number
);
dbg
(
"%s - registering %s"
,
__FUNCTION__
,
port
->
dev
.
bus_id
);
dbg
(
"%s - registering %s"
,
__FUNCTION__
,
port
->
dev
.
bus_id
);
device_register
(
&
port
->
dev
);
device_register
(
&
port
->
dev
);
}
}
...
...
drivers/usb/storage/initializers.c
View file @
ddb6a1aa
...
@@ -55,7 +55,6 @@ int usb_stor_euscsi_init(struct us_data *us)
...
@@ -55,7 +55,6 @@ int usb_stor_euscsi_init(struct us_data *us)
0x0C
,
USB_RECIP_INTERFACE
|
USB_TYPE_VENDOR
,
0x0C
,
USB_RECIP_INTERFACE
|
USB_TYPE_VENDOR
,
0x01
,
0x0
,
us
->
iobuf
,
0x1
,
5
*
HZ
);
0x01
,
0x0
,
us
->
iobuf
,
0x1
,
5
*
HZ
);
US_DEBUGP
(
"-- result is %d
\n
"
,
result
);
US_DEBUGP
(
"-- result is %d
\n
"
,
result
);
US_DEBUGP
(
"-- data afterwards is %d
\n
"
,
us
->
iobuf
[
0
]);
return
0
;
return
0
;
}
}
...
@@ -67,6 +66,7 @@ int usb_stor_ucr61s2b_init(struct us_data *us)
...
@@ -67,6 +66,7 @@ int usb_stor_ucr61s2b_init(struct us_data *us)
struct
bulk_cb_wrap
*
bcb
=
(
struct
bulk_cb_wrap
*
)
us
->
iobuf
;
struct
bulk_cb_wrap
*
bcb
=
(
struct
bulk_cb_wrap
*
)
us
->
iobuf
;
struct
bulk_cs_wrap
*
bcs
=
(
struct
bulk_cs_wrap
*
)
us
->
iobuf
;
struct
bulk_cs_wrap
*
bcs
=
(
struct
bulk_cs_wrap
*
)
us
->
iobuf
;
int
res
,
partial
;
int
res
,
partial
;
static
char
init_string
[]
=
"
\xec\x0a\x06\x00
$PCCHIPS"
;
US_DEBUGP
(
"Sending UCR-61S2B initialization packet...
\n
"
);
US_DEBUGP
(
"Sending UCR-61S2B initialization packet...
\n
"
);
...
@@ -74,9 +74,9 @@ int usb_stor_ucr61s2b_init(struct us_data *us)
...
@@ -74,9 +74,9 @@ int usb_stor_ucr61s2b_init(struct us_data *us)
bcb
->
Tag
=
0
;
bcb
->
Tag
=
0
;
bcb
->
DataTransferLength
=
cpu_to_le32
(
0
);
bcb
->
DataTransferLength
=
cpu_to_le32
(
0
);
bcb
->
Flags
=
bcb
->
Lun
=
0
;
bcb
->
Flags
=
bcb
->
Lun
=
0
;
bcb
->
Length
=
sizeof
(
UCR61S2B_INIT
)
;
bcb
->
Length
=
sizeof
(
init_string
)
-
1
;
memset
(
bcb
->
CDB
,
0
,
sizeof
(
bcb
->
CDB
));
memset
(
bcb
->
CDB
,
0
,
sizeof
(
bcb
->
CDB
));
memcpy
(
bcb
->
CDB
,
UCR61S2B_INIT
,
sizeof
(
UCR61S2B_INIT
)
);
memcpy
(
bcb
->
CDB
,
init_string
,
sizeof
(
init_string
)
-
1
);
res
=
usb_stor_bulk_transfer_buf
(
us
,
us
->
send_bulk_pipe
,
bcb
,
res
=
usb_stor_bulk_transfer_buf
(
us
,
us
->
send_bulk_pipe
,
bcb
,
US_BULK_CB_WRAP_LEN
,
&
partial
);
US_BULK_CB_WRAP_LEN
,
&
partial
);
...
...
drivers/usb/storage/initializers.h
View file @
ddb6a1aa
...
@@ -49,8 +49,6 @@ int usb_stor_euscsi_init(struct us_data *us);
...
@@ -49,8 +49,6 @@ int usb_stor_euscsi_init(struct us_data *us);
int
sddr09_init
(
struct
us_data
*
us
);
int
sddr09_init
(
struct
us_data
*
us
);
#endif
#endif
#define UCR61S2B_INIT "\xec\x0a\x06\x00$PCCHIPS"
/* This function is required to activate all four slots on the UCR-61S2B
/* This function is required to activate all four slots on the UCR-61S2B
* flash reader */
* flash reader */
int
usb_stor_ucr61s2b_init
(
struct
us_data
*
us
);
int
usb_stor_ucr61s2b_init
(
struct
us_data
*
us
);
drivers/usb/usb-skeleton.c
View file @
ddb6a1aa
...
@@ -526,7 +526,6 @@ static int skel_probe(struct usb_interface *interface, const struct usb_device_i
...
@@ -526,7 +526,6 @@ static int skel_probe(struct usb_interface *interface, const struct usb_device_i
init_MUTEX
(
&
dev
->
sem
);
init_MUTEX
(
&
dev
->
sem
);
dev
->
udev
=
udev
;
dev
->
udev
=
udev
;
dev
->
interface
=
interface
;
dev
->
interface
=
interface
;
dev
->
minor
=
interface
->
minor
;
/* set up the endpoint information */
/* set up the endpoint information */
/* check out the endpoints */
/* check out the endpoints */
...
@@ -606,6 +605,7 @@ static int skel_probe(struct usb_interface *interface, const struct usb_device_i
...
@@ -606,6 +605,7 @@ static int skel_probe(struct usb_interface *interface, const struct usb_device_i
goto
error
;
goto
error
;
}
}
dev
->
minor
=
interface
->
minor
;
/* let the user know what node this device is now attached to */
/* let the user know what node this device is now attached to */
info
(
"USB Skeleton device now attached to USBSkel-%d"
,
dev
->
minor
);
info
(
"USB Skeleton device now attached to USBSkel-%d"
,
dev
->
minor
);
...
@@ -641,9 +641,6 @@ static void skel_disconnect(struct usb_interface *interface)
...
@@ -641,9 +641,6 @@ static void skel_disconnect(struct usb_interface *interface)
down
(
&
dev
->
sem
);
down
(
&
dev
->
sem
);
/* disable open() */
interface
->
minor
=
-
1
;
minor
=
dev
->
minor
;
minor
=
dev
->
minor
;
/* give back our minor */
/* give back our minor */
...
...
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