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
fdb6357e
Commit
fdb6357e
authored
Mar 06, 2003
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Plain Diff
Merge kroah.com:/home/greg/linux/BK/bleed-2.5
into kroah.com:/home/greg/linux/BK/gregkh-2.5
parents
d0c451f8
06ad5d94
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
179 additions
and
43 deletions
+179
-43
drivers/usb/class/usb-midi.h
drivers/usb/class/usb-midi.h
+21
-2
drivers/usb/core/hub.c
drivers/usb/core/hub.c
+1
-0
drivers/usb/core/message.c
drivers/usb/core/message.c
+14
-2
drivers/usb/core/urb.c
drivers/usb/core/urb.c
+16
-2
drivers/usb/core/usb.c
drivers/usb/core/usb.c
+20
-9
drivers/usb/serial/io_edgeport.c
drivers/usb/serial/io_edgeport.c
+23
-22
drivers/usb/serial/pl2303.c
drivers/usb/serial/pl2303.c
+1
-0
drivers/usb/serial/pl2303.h
drivers/usb/serial/pl2303.h
+3
-0
drivers/usb/serial/visor.c
drivers/usb/serial/visor.c
+48
-1
drivers/usb/storage/transport.c
drivers/usb/storage/transport.c
+10
-3
include/linux/usb.h
include/linux/usb.h
+1
-2
include/linux/usb_ch9.h
include/linux/usb_ch9.h
+21
-0
No files found.
drivers/usb/class/usb-midi.h
View file @
fdb6357e
...
...
@@ -54,6 +54,10 @@
#define USB_VENDOR_ID_STEINBERG 0x0763
#define USBMIDI_STEINBERG_USB2MIDI 0x1001
/* Mark of the Unicorn MIDI Devices */
#define USB_VENDOR_ID_MOTU 0x07fd
#define USBMIDI_MOTU_FASTLANE 0x0001
/* ------------------------------------------------------------------------- */
/* Supported devices */
...
...
@@ -101,8 +105,15 @@ static struct usb_midi_device usb_midi_devices[] = {
{
/* Roland SC8850 */
"Roland SC8850"
,
USB_VENDOR_ID_ROLAND
,
USBMIDI_ROLAND_SC8850
,
2
,
-
1
,
{
{
0x81
,
15
},
{
-
1
,
-
1
}
},
/** cables 0,1,2, and 3 **/
{
{
0x01
,
15
},
{
-
1
,
-
1
}
},
{
{
0x81
,
0x3f
},
{
-
1
,
-
1
}
},
{
{
0x01
,
0x3f
},
{
-
1
,
-
1
}
},
},
{
/* Roland SC8820 */
"Roland SC8820"
,
USB_VENDOR_ID_ROLAND
,
USBMIDI_ROLAND_SC8820
,
2
,
-
1
,
{
{
0x81
,
0x13
},
{
-
1
,
-
1
}
},
{
{
0x01
,
0x13
},
{
-
1
,
-
1
}
},
},
{
/* Roland SC8820 */
...
...
@@ -123,6 +134,12 @@ static struct usb_midi_device usb_midi_devices[] = {
USB_VENDOR_ID_ROLAND
,
USBMIDI_ROLAND_PC300
,
2
,
-
1
,
{
{
0x81
,
1
},
{
-
1
,
-
1
}
},
{
{
0x01
,
1
},
{
-
1
,
-
1
}
},
},
{
/* MOTU Fastlane USB */
"MOTU Fastlane USB"
,
USB_VENDOR_ID_MOTU
,
USBMIDI_MOTU_FASTLANE
,
1
,
0
,
{
{
0x82
,
3
},
{
-
1
,
-
1
}
},
{
{
0x02
,
3
},
{
-
1
,
-
1
}
},
}
};
...
...
@@ -138,7 +155,9 @@ static struct usb_device_id usb_midi_ids [] = {
{
USB_DEVICE
(
USB_VENDOR_ID_ROLAND
,
USBMIDI_ROLAND_UA100G
)
},
{
USB_DEVICE
(
USB_VENDOR_ID_ROLAND
,
USBMIDI_ROLAND_PC300
)
},
{
USB_DEVICE
(
USB_VENDOR_ID_ROLAND
,
USBMIDI_ROLAND_SC8850
)
},
{
USB_DEVICE
(
USB_VENDOR_ID_ROLAND
,
USBMIDI_ROLAND_SC8820
)
},
{
USB_DEVICE
(
USB_VENDOR_ID_YAMAHA
,
USBMIDI_YAMAHA_MU1000
)
},
{
USB_DEVICE
(
USB_VENDOR_ID_MOTU
,
USBMIDI_MOTU_FASTLANE
)
},
/* { USB_DEVICE( USB_VENDOR_ID_STEINBERG, USBMIDI_STEINBERG_USB2MIDI ) },*/
{
}
/* Terminating entry */
};
...
...
drivers/usb/core/hub.c
View file @
fdb6357e
...
...
@@ -876,6 +876,7 @@ static void usb_hub_port_connect_change(struct usb_hub *hubstate, int port,
}
hub
->
children
[
port
]
=
dev
;
dev
->
state
=
USB_STATE_POWERED
;
/* Reset the device, and detect its speed */
if
(
usb_hub_port_reset
(
hub
,
port
,
dev
,
delay
))
{
...
...
drivers/usb/core/message.c
View file @
fdb6357e
...
...
@@ -904,17 +904,29 @@ int usb_set_configuration(struct usb_device *dev, int configuration)
break
;
}
}
if
(
!
cp
)
{
if
(
(
!
cp
&&
configuration
!=
0
)
||
(
cp
&&
configuration
==
0
)
)
{
warn
(
"selecting invalid configuration %d"
,
configuration
);
return
-
EINVAL
;
}
/* if it's already configured, clear out old state first. */
if
(
dev
->
state
!=
USB_STATE_ADDRESS
)
{
/* FIXME unbind drivers from all "old" interfaces.
* handshake with hcd to reset cached hc endpoint state.
*/
}
if
((
ret
=
usb_control_msg
(
dev
,
usb_sndctrlpipe
(
dev
,
0
),
USB_REQ_SET_CONFIGURATION
,
0
,
configuration
,
0
,
NULL
,
0
,
HZ
*
USB_CTRL_SET_TIMEOUT
))
<
0
)
return
ret
;
if
(
configuration
)
dev
->
state
=
USB_STATE_CONFIGURED
;
else
dev
->
state
=
USB_STATE_ADDRESS
;
dev
->
actconfig
=
cp
;
/* reset more hc/hcd endpoint state */
dev
->
toggle
[
0
]
=
0
;
dev
->
toggle
[
1
]
=
0
;
usb_set_maxpacket
(
dev
);
...
...
drivers/usb/core/urb.c
View file @
fdb6357e
...
...
@@ -195,7 +195,9 @@ int usb_submit_urb(struct urb *urb, int mem_flags)
if
(
!
urb
||
urb
->
hcpriv
||
!
urb
->
complete
)
return
-
EINVAL
;
if
(
!
(
dev
=
urb
->
dev
)
||
!
dev
->
present
||
!
dev
->
bus
||
dev
->
devnum
<=
0
)
if
(
!
(
dev
=
urb
->
dev
)
||
(
dev
->
state
<
USB_STATE_DEFAULT
)
||
(
!
dev
->
bus
)
||
(
dev
->
devnum
<=
0
))
return
-
ENODEV
;
if
(
!
(
op
=
dev
->
bus
->
op
)
||
!
op
->
submit_urb
)
return
-
ENODEV
;
...
...
@@ -211,6 +213,9 @@ int usb_submit_urb(struct urb *urb, int mem_flags)
temp
=
usb_pipetype
(
pipe
);
is_out
=
usb_pipeout
(
pipe
);
if
(
!
usb_pipecontrol
(
pipe
)
&&
dev
->
state
<
USB_STATE_CONFIGURED
)
return
-
ENODEV
;
/* (actually HCDs may need to duplicate this, endpoint might yet
* stall due to queued bulk/intr transactions that complete after
* we check)
...
...
@@ -376,7 +381,16 @@ int usb_submit_urb(struct urb *urb, int mem_flags)
*/
int
usb_unlink_urb
(
struct
urb
*
urb
)
{
if
(
urb
&&
urb
->
dev
&&
urb
->
dev
->
present
&&
urb
->
dev
->
bus
&&
urb
->
dev
->
bus
->
op
)
/* FIXME
* We should not care about the state here, but the host controllers
* die a horrible death if we submit a urb for a device that has been
* physically removed.
*/
if
(
urb
&&
urb
->
dev
&&
(
urb
->
dev
->
state
>=
USB_STATE_DEFAULT
)
&&
urb
->
dev
->
bus
&&
urb
->
dev
->
bus
->
op
)
return
urb
->
dev
->
bus
->
op
->
unlink_urb
(
urb
);
else
return
-
ENODEV
;
...
...
drivers/usb/core/usb.c
View file @
fdb6357e
...
...
@@ -679,7 +679,7 @@ struct usb_device *usb_alloc_dev(struct usb_device *parent, struct usb_bus *bus)
memset
(
dev
,
0
,
sizeof
(
*
dev
));
device_initialize
(
&
dev
->
dev
);
dev
->
present
=
1
;
dev
->
state
=
USB_STATE_ATTACHED
;
usb_bus_get
(
bus
);
...
...
@@ -828,6 +828,11 @@ void usb_disconnect(struct usb_device **pdev)
*
pdev
=
NULL
;
/* mark the device as inactive, so any further urb submissions for
* this device will fail.
*/
dev
->
state
=
USB_STATE_NOTATTACHED
;
dev_info
(
&
dev
->
dev
,
"USB disconnect, address %d
\n
"
,
dev
->
devnum
);
/* Free up all the children before we remove this device */
...
...
@@ -855,10 +860,6 @@ void usb_disconnect(struct usb_device **pdev)
}
device_unregister
(
&
dev
->
dev
);
/* mark the device as not present so any further urb submissions for
* this device will fail. */
dev
->
present
=
0
;
/* Decrement the reference count, it'll auto free everything when */
/* it hits 0 which could very well be now */
usb_put_dev
(
dev
);
...
...
@@ -906,9 +907,17 @@ void usb_connect(struct usb_device *dev)
// otherwise used internally, for usb_new_device()
int
usb_set_address
(
struct
usb_device
*
dev
)
{
return
usb_control_msg
(
dev
,
usb_snddefctrl
(
dev
),
USB_REQ_SET_ADDRESS
,
// FIXME USB_CTRL_SET_TIMEOUT
0
,
dev
->
devnum
,
0
,
NULL
,
0
,
HZ
*
USB_CTRL_GET_TIMEOUT
);
int
retval
;
if
(
dev
->
devnum
==
0
)
return
-
EINVAL
;
if
(
dev
->
state
!=
USB_STATE_DEFAULT
&&
dev
->
state
!=
USB_STATE_ADDRESS
)
return
-
EINVAL
;
retval
=
usb_control_msg
(
dev
,
usb_snddefctrl
(
dev
),
USB_REQ_SET_ADDRESS
,
0
,
dev
->
devnum
,
0
,
NULL
,
0
,
HZ
*
USB_CTRL_SET_TIMEOUT
);
if
(
retval
==
0
)
dev
->
state
=
USB_STATE_ADDRESS
;
return
retval
;
}
...
...
@@ -1014,7 +1023,8 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
/* dma masks come from the controller; readonly, except to hcd */
dev
->
dev
.
dma_mask
=
parent
->
dma_mask
;
/* USB device state == default ... it's not usable yet */
/* it's not usable yet */
dev
->
state
=
USB_STATE_DEFAULT
;
/* USB 2.0 section 5.5.3 talks about ep0 maxpacket ...
* it's fixed size except for full speed devices.
...
...
@@ -1049,6 +1059,7 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
if
(
err
<
0
)
{
dev_err
(
&
dev
->
dev
,
"USB device not accepting new address=%d (error=%d)
\n
"
,
dev
->
devnum
,
err
);
dev
->
state
=
USB_STATE_DEFAULT
;
clear_bit
(
dev
->
devnum
,
dev
->
bus
->
devmap
.
devicemap
);
dev
->
devnum
=
-
1
;
return
1
;
...
...
drivers/usb/serial/io_edgeport.c
View file @
fdb6357e
...
...
@@ -522,7 +522,7 @@ static void update_edgeport_E2PROM (struct edgeport_serial *edge_serial)
case
EDGE_DOWNLOAD_FILE_I930
:
BootMajorVersion
=
BootCodeImageVersion_GEN1
.
MajorVersion
;
BootMinorVersion
=
BootCodeImageVersion_GEN1
.
MinorVersion
;
BootBuildNumber
=
BootCodeImageVersion_GEN1
.
BuildNumber
;
BootBuildNumber
=
cpu_to_le16
(
BootCodeImageVersion_GEN1
.
BuildNumber
)
;
BootImage
=
&
BootCodeImage_GEN1
[
0
];
BootSize
=
sizeof
(
BootCodeImage_GEN1
);
break
;
...
...
@@ -530,7 +530,7 @@ static void update_edgeport_E2PROM (struct edgeport_serial *edge_serial)
case
EDGE_DOWNLOAD_FILE_80251
:
BootMajorVersion
=
BootCodeImageVersion_GEN2
.
MajorVersion
;
BootMinorVersion
=
BootCodeImageVersion_GEN2
.
MinorVersion
;
BootBuildNumber
=
BootCodeImageVersion_GEN2
.
BuildNumber
;
BootBuildNumber
=
cpu_to_le16
(
BootCodeImageVersion_GEN2
.
BuildNumber
)
;
BootImage
=
&
BootCodeImage_GEN2
[
0
];
BootSize
=
sizeof
(
BootCodeImage_GEN2
);
break
;
...
...
@@ -542,26 +542,26 @@ static void update_edgeport_E2PROM (struct edgeport_serial *edge_serial)
// Check Boot Image Version
BootCurVer
=
(
edge_serial
->
boot_descriptor
.
MajorVersion
<<
24
)
+
(
edge_serial
->
boot_descriptor
.
MinorVersion
<<
16
)
+
edge_serial
->
boot_descriptor
.
BuildNumber
;
le16_to_cpu
(
edge_serial
->
boot_descriptor
.
BuildNumber
)
;
BootNewVer
=
(
BootMajorVersion
<<
24
)
+
(
BootMinorVersion
<<
16
)
+
BootBuildNumber
;
le16_to_cpu
(
BootBuildNumber
)
;
dbg
(
"Current Boot Image version %d.%d.%d"
,
edge_serial
->
boot_descriptor
.
MajorVersion
,
edge_serial
->
boot_descriptor
.
MinorVersion
,
edge_serial
->
boot_descriptor
.
BuildNumber
);
le16_to_cpu
(
edge_serial
->
boot_descriptor
.
BuildNumber
)
);
if
(
BootNewVer
>
BootCurVer
)
{
dbg
(
"**Update Boot Image from %d.%d.%d to %d.%d.%d"
,
edge_serial
->
boot_descriptor
.
MajorVersion
,
edge_serial
->
boot_descriptor
.
MinorVersion
,
edge_serial
->
boot_descriptor
.
BuildNumber
,
le16_to_cpu
(
edge_serial
->
boot_descriptor
.
BuildNumber
)
,
BootMajorVersion
,
BootMinorVersion
,
BootBuildNumber
);
le16_to_cpu
(
BootBuildNumber
)
);
dbg
(
"Downloading new Boot Image"
);
...
...
@@ -570,12 +570,12 @@ static void update_edgeport_E2PROM (struct edgeport_serial *edge_serial)
for
(;;)
{
record
=
(
struct
edge_firmware_image_record
*
)
firmware
;
response
=
rom_write
(
edge_serial
->
serial
,
record
->
ExtAddr
,
record
->
Addr
,
record
->
Len
,
&
record
->
Data
[
0
]);
response
=
rom_write
(
edge_serial
->
serial
,
le16_to_cpu
(
record
->
ExtAddr
),
le16_to_cpu
(
record
->
Addr
),
le16_to_cpu
(
record
->
Len
)
,
&
record
->
Data
[
0
]);
if
(
response
<
0
)
{
dev_err
(
&
edge_serial
->
serial
->
dev
->
dev
,
"
sram_write failed (%x, %x, %d)
\n
"
,
record
->
ExtAddr
,
record
->
Addr
,
record
->
Len
);
dev_err
(
&
edge_serial
->
serial
->
dev
->
dev
,
"
rom_write failed (%x, %x, %d)
\n
"
,
le16_to_cpu
(
record
->
ExtAddr
),
le16_to_cpu
(
record
->
Addr
),
le16_to_cpu
(
record
->
Len
)
);
break
;
}
firmware
+=
sizeof
(
struct
edge_firmware_image_record
)
+
record
->
Len
;
firmware
+=
sizeof
(
struct
edge_firmware_image_record
)
+
le16_to_cpu
(
record
->
Len
)
;
if
(
firmware
>=
&
BootImage
[
BootSize
])
{
break
;
}
...
...
@@ -678,12 +678,12 @@ static void get_product_info(struct edgeport_serial *edge_serial)
if
(
edge_serial
->
serial
->
dev
->
descriptor
.
idProduct
&
ION_DEVICE_ID_GENERATION_2
)
{
product_info
->
FirmwareMajorVersion
=
OperationalCodeImageVersion_GEN2
.
MajorVersion
;
product_info
->
FirmwareMinorVersion
=
OperationalCodeImageVersion_GEN2
.
MinorVersion
;
product_info
->
FirmwareBuildNumber
=
OperationalCodeImageVersion_GEN2
.
BuildNumber
;
product_info
->
FirmwareBuildNumber
=
cpu_to_le16
(
OperationalCodeImageVersion_GEN2
.
BuildNumber
)
;
product_info
->
iDownloadFile
=
EDGE_DOWNLOAD_FILE_80251
;
}
else
{
product_info
->
FirmwareMajorVersion
=
OperationalCodeImageVersion_GEN1
.
MajorVersion
;
product_info
->
FirmwareMinorVersion
=
OperationalCodeImageVersion_GEN1
.
MinorVersion
;
product_info
->
FirmwareBuildNumber
=
OperationalCodeImageVersion_GEN1
.
BuildNumber
;
product_info
->
FirmwareBuildNumber
=
cpu_to_le16
(
OperationalCodeImageVersion_GEN1
.
BuildNumber
)
;
product_info
->
iDownloadFile
=
EDGE_DOWNLOAD_FILE_I930
;
}
...
...
@@ -729,10 +729,10 @@ static void get_product_info(struct edgeport_serial *edge_serial)
dbg
(
" BoardRev %x"
,
product_info
->
BoardRev
);
dbg
(
" BootMajorVersion %d.%d.%d"
,
product_info
->
BootMajorVersion
,
product_info
->
BootMinorVersion
,
product_info
->
BootBuildNumber
);
le16_to_cpu
(
product_info
->
BootBuildNumber
)
);
dbg
(
" FirmwareMajorVersion %d.%d.%d"
,
product_info
->
FirmwareMajorVersion
,
product_info
->
FirmwareMinorVersion
,
product_info
->
FirmwareBuildNumber
);
le16_to_cpu
(
product_info
->
FirmwareBuildNumber
)
);
dbg
(
" ManufactureDescDate %d/%d/%d"
,
product_info
->
ManufactureDescDate
[
0
],
product_info
->
ManufactureDescDate
[
1
],
product_info
->
ManufactureDescDate
[
2
]
+
1900
);
...
...
@@ -2326,7 +2326,7 @@ static int sram_write (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u
__u16
current_length
;
unsigned
char
*
transfer_buffer
;
//
dbg("%s - %x, %x, %d", __FUNCTION__, extAddr, addr, length);
dbg
(
"%s - %x, %x, %d"
,
__FUNCTION__
,
extAddr
,
addr
,
length
);
transfer_buffer
=
kmalloc
(
64
,
GFP_KERNEL
);
if
(
!
transfer_buffer
)
{
...
...
@@ -2811,12 +2811,13 @@ static void change_port_settings (struct edgeport_port *edge_port, struct termio
* Turns a string from Unicode into ASCII.
* Doesn't do a good job with any characters that are outside the normal
* ASCII range, but it's only for debugging...
* NOTE: expects the unicode in LE format
****************************************************************************/
static
void
unicode_to_ascii
(
char
*
string
,
short
*
unicode
,
int
unicode_size
)
{
int
i
;
for
(
i
=
0
;
i
<
unicode_size
;
++
i
)
{
string
[
i
]
=
(
char
)(
unicode
[
i
]
);
string
[
i
]
=
(
char
)(
le16_to_cpu
(
unicode
[
i
])
);
}
string
[
unicode_size
]
=
0x00
;
}
...
...
@@ -2880,11 +2881,11 @@ static void get_boot_desc (struct edgeport_serial *edge_serial)
dev_err
(
&
edge_serial
->
serial
->
dev
->
dev
,
"error in getting boot descriptor
\n
"
);
}
else
{
dbg
(
"**Boot Descriptor:"
);
dbg
(
" BootCodeLength: %d"
,
edge_serial
->
boot_descriptor
.
BootCodeLength
);
dbg
(
" BootCodeLength: %d"
,
le16_to_cpu
(
edge_serial
->
boot_descriptor
.
BootCodeLength
)
);
dbg
(
" MajorVersion: %d"
,
edge_serial
->
boot_descriptor
.
MajorVersion
);
dbg
(
" MinorVersion: %d"
,
edge_serial
->
boot_descriptor
.
MinorVersion
);
dbg
(
" BuildNumber: %d"
,
edge_serial
->
boot_descriptor
.
BuildNumber
);
dbg
(
" Capabilities: 0x%x"
,
edge_serial
->
boot_descriptor
.
Capabilities
);
dbg
(
" BuildNumber: %d"
,
le16_to_cpu
(
edge_serial
->
boot_descriptor
.
BuildNumber
)
);
dbg
(
" Capabilities: 0x%x"
,
le16_to_cpu
(
edge_serial
->
boot_descriptor
.
Capabilities
)
);
dbg
(
" UConfig0: %d"
,
edge_serial
->
boot_descriptor
.
UConfig0
);
dbg
(
" UConfig1: %d"
,
edge_serial
->
boot_descriptor
.
UConfig1
);
}
...
...
@@ -2936,12 +2937,12 @@ static void load_application_firmware (struct edgeport_serial *edge_serial)
for
(;;)
{
record
=
(
struct
edge_firmware_image_record
*
)
firmware
;
response
=
sram_write
(
edge_serial
->
serial
,
record
->
ExtAddr
,
record
->
Addr
,
record
->
Len
,
&
record
->
Data
[
0
]);
response
=
sram_write
(
edge_serial
->
serial
,
le16_to_cpu
(
record
->
ExtAddr
),
le16_to_cpu
(
record
->
Addr
),
le16_to_cpu
(
record
->
Len
)
,
&
record
->
Data
[
0
]);
if
(
response
<
0
)
{
dev_err
(
&
edge_serial
->
serial
->
dev
->
dev
,
"sram_write failed (%x, %x, %d)
\n
"
,
record
->
ExtAddr
,
record
->
Addr
,
record
->
Len
);
dev_err
(
&
edge_serial
->
serial
->
dev
->
dev
,
"sram_write failed (%x, %x, %d)
\n
"
,
le16_to_cpu
(
record
->
ExtAddr
),
le16_to_cpu
(
record
->
Addr
)
,
record
->
Len
);
break
;
}
firmware
+=
sizeof
(
struct
edge_firmware_image_record
)
+
record
->
Len
;
firmware
+=
sizeof
(
struct
edge_firmware_image_record
)
+
le16_to_cpu
(
record
->
Len
)
;
if
(
firmware
>=
&
FirmwareImage
[
ImageSize
])
{
break
;
}
...
...
drivers/usb/serial/pl2303.c
View file @
fdb6357e
...
...
@@ -75,6 +75,7 @@ static struct usb_device_id id_table [] = {
{
USB_DEVICE
(
MA620_VENDOR_ID
,
MA620_PRODUCT_ID
)
},
{
USB_DEVICE
(
RATOC_VENDOR_ID
,
RATOC_PRODUCT_ID
)
},
{
USB_DEVICE
(
TRIPP_VENDOR_ID
,
TRIPP_PRODUCT_ID
)
},
{
USB_DEVICE
(
RADIOSHACK_VENDOR_ID
,
RADIOSHACK_PRODUCT_ID
)
},
{
}
/* Terminating entry */
};
...
...
drivers/usb/serial/pl2303.h
View file @
fdb6357e
...
...
@@ -31,3 +31,6 @@
#define TRIPP_VENDOR_ID 0x2478
#define TRIPP_PRODUCT_ID 0x2008
#define RADIOSHACK_VENDOR_ID 0x1453
#define RADIOSHACK_PRODUCT_ID 0x4026
drivers/usb/serial/visor.c
View file @
fdb6357e
...
...
@@ -12,6 +12,9 @@
*
* See Documentation/usb/usb-serial.txt for more information on using this driver
*
* (03/05/2003) gkh
* Think Treo support is now working.
*
* (04/03/2002) gkh
* Added support for the Sony OS 4.1 devices. Thanks to Hiroyuki ARAKI
* <hiro@zob.ne.jp> for the information.
...
...
@@ -156,7 +159,7 @@
/*
* Version Information
*/
#define DRIVER_VERSION "v2.
0
"
#define DRIVER_VERSION "v2.
1
"
#define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com>"
#define DRIVER_DESC "USB HandSpring Visor, Palm m50x, Sony Clié driver"
...
...
@@ -177,6 +180,7 @@ static void visor_write_bulk_callback (struct urb *urb, struct pt_regs *regs);
static
void
visor_read_bulk_callback
(
struct
urb
*
urb
,
struct
pt_regs
*
regs
);
static
void
visor_read_int_callback
(
struct
urb
*
urb
,
struct
pt_regs
*
regs
);
static
int
clie_3_5_startup
(
struct
usb_serial
*
serial
);
static
int
treo_attach
(
struct
usb_serial
*
serial
);
static
int
palm_os_3_probe
(
struct
usb_serial
*
serial
,
const
struct
usb_device_id
*
id
);
static
int
palm_os_4_probe
(
struct
usb_serial
*
serial
,
const
struct
usb_device_id
*
id
);
...
...
@@ -262,6 +266,7 @@ static struct usb_serial_device_type handspring_device = {
.
close
=
visor_close
,
.
throttle
=
visor_throttle
,
.
unthrottle
=
visor_unthrottle
,
.
attach
=
treo_attach
,
.
probe
=
visor_probe
,
.
calc_num_ports
=
visor_calc_num_ports
,
.
shutdown
=
visor_shutdown
,
...
...
@@ -801,6 +806,48 @@ static int clie_3_5_startup (struct usb_serial *serial)
return
0
;
}
static
int
treo_attach
(
struct
usb_serial
*
serial
)
{
struct
usb_serial_port
*
port
;
int
i
;
/* Only do this endpoint hack for the Handspring devices with
* interrupt in endpoints, which for now are the Treo devices. */
if
((
serial
->
dev
->
descriptor
.
idVendor
!=
HANDSPRING_VENDOR_ID
)
||
(
serial
->
num_interrupt_in
==
0
))
return
0
;
dbg
(
"%s"
,
__FUNCTION__
);
/* Ok, this is pretty ugly, but these devices want to use the
* interrupt endpoint as paired up with a bulk endpoint for a
* "virtual serial port". So let's force the endpoints to be
* where we want them to be. */
for
(
i
=
serial
->
num_bulk_in
;
i
<
serial
->
num_ports
;
++
i
)
{
port
=
&
serial
->
port
[
i
];
port
->
read_urb
=
serial
->
port
[
0
].
read_urb
;
port
->
bulk_in_endpointAddress
=
serial
->
port
[
0
].
bulk_in_endpointAddress
;
port
->
bulk_in_buffer
=
serial
->
port
[
0
].
bulk_in_buffer
;
}
for
(
i
=
serial
->
num_bulk_out
;
i
<
serial
->
num_ports
;
++
i
)
{
port
=
&
serial
->
port
[
i
];
port
->
write_urb
=
serial
->
port
[
0
].
write_urb
;
port
->
bulk_out_size
=
serial
->
port
[
0
].
bulk_out_size
;
port
->
bulk_out_endpointAddress
=
serial
->
port
[
0
].
bulk_out_endpointAddress
;
port
->
bulk_out_buffer
=
serial
->
port
[
0
].
bulk_out_buffer
;
}
for
(
i
=
serial
->
num_interrupt_in
;
i
<
serial
->
num_ports
;
++
i
)
{
port
=
&
serial
->
port
[
i
];
port
->
interrupt_in_urb
=
serial
->
port
[
0
].
interrupt_in_urb
;
port
->
interrupt_in_endpointAddress
=
serial
->
port
[
0
].
interrupt_in_endpointAddress
;
port
->
interrupt_in_buffer
=
serial
->
port
[
0
].
interrupt_in_buffer
;
}
return
0
;
}
static
void
visor_shutdown
(
struct
usb_serial
*
serial
)
{
...
...
drivers/usb/storage/transport.c
View file @
fdb6357e
...
...
@@ -582,20 +582,26 @@ void usb_stor_invoke_transport(Scsi_Cmnd *srb, struct us_data *us)
unsigned
short
old_sg
;
unsigned
old_request_bufflen
;
unsigned
char
old_sc_data_direction
;
unsigned
char
old_cmd_len
;
unsigned
char
old_cmnd
[
MAX_COMMAND_SIZE
];
US_DEBUGP
(
"Issuing auto-REQUEST_SENSE
\n
"
);
/* save the old command */
memcpy
(
old_cmnd
,
srb
->
cmnd
,
MAX_COMMAND_SIZE
);
old_cmd_len
=
srb
->
cmd_len
;
/* set the command and the LUN */
memset
(
srb
->
cmnd
,
0
,
MAX_COMMAND_SIZE
);
srb
->
cmnd
[
0
]
=
REQUEST_SENSE
;
srb
->
cmnd
[
1
]
=
old_cmnd
[
1
]
&
0xE0
;
srb
->
cmnd
[
2
]
=
0
;
srb
->
cmnd
[
3
]
=
0
;
srb
->
cmnd
[
4
]
=
18
;
srb
->
cmnd
[
5
]
=
0
;
/* FIXME: we must do the protocol translation here */
if
(
us
->
subclass
==
US_SC_RBC
||
us
->
subclass
==
US_SC_SCSI
)
srb
->
cmd_len
=
6
;
else
srb
->
cmd_len
=
12
;
/* set the transfer direction */
old_sc_data_direction
=
srb
->
sc_data_direction
;
...
...
@@ -621,6 +627,7 @@ void usb_stor_invoke_transport(Scsi_Cmnd *srb, struct us_data *us)
srb
->
request_bufflen
=
old_request_bufflen
;
srb
->
use_sg
=
old_sg
;
srb
->
sc_data_direction
=
old_sc_data_direction
;
srb
->
cmd_len
=
old_cmd_len
;
memcpy
(
srb
->
cmnd
,
old_cmnd
,
MAX_COMMAND_SIZE
);
if
(
atomic_read
(
&
us
->
sm_state
)
==
US_STATE_ABORTING
)
{
...
...
include/linux/usb.h
View file @
fdb6357e
...
...
@@ -213,7 +213,7 @@ struct usb_tt;
struct
usb_device
{
int
devnum
;
/* Address on USB bus */
char
devpath
[
16
];
/* Use in messages: /port/port/... */
enum
usb_device_state
state
;
/* configured, not attached, etc */
enum
usb_device_speed
speed
;
/* high/full/low (or error) */
struct
usb_tt
*
tt
;
/* low/full speed dev, highspeed hub */
...
...
@@ -240,7 +240,6 @@ struct usb_device {
int
have_langid
;
/* whether string_langid is valid yet */
int
string_langid
;
/* language ID for strings */
int
present
;
/* if device is present or not */
void
*
hcpriv
;
/* Host Controller private data */
...
...
include/linux/usb_ch9.h
View file @
fdb6357e
...
...
@@ -291,4 +291,25 @@ enum usb_device_speed {
USB_SPEED_HIGH
/* usb 2.0 */
};
enum
usb_device_state
{
/* NOTATTACHED isn't in the USB spec, and this state acts
* the same as ATTACHED ... but it's clearer this way.
*/
USB_STATE_NOTATTACHED
=
0
,
/* the chapter 9 device states */
USB_STATE_ATTACHED
,
USB_STATE_POWERED
,
USB_STATE_DEFAULT
,
/* limited function */
USB_STATE_ADDRESS
,
USB_STATE_CONFIGURED
,
/* most functions */
USB_STATE_SUSPENDED
/* NOTE: there are actually four different SUSPENDED
* states, returning to POWERED, DEFAULT, ADDRESS, or
* CONFIGURED respectively when SOF tokens flow again.
*/
};
#endif
/* __LINUX_USB_CH9_H */
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