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
324b683a
Commit
324b683a
authored
Oct 03, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/lord/xfs-2.6
into home.osdl.org:/home/torvalds/v2.5/linux
parents
1ac6fcb7
5fc0a431
Changes
24
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
943 additions
and
433 deletions
+943
-433
arch/x86_64/ia32/ia32_binfmt.c
arch/x86_64/ia32/ia32_binfmt.c
+6
-3
drivers/ide/ide.c
drivers/ide/ide.c
+3
-7
drivers/ide/legacy/pdc4030.c
drivers/ide/legacy/pdc4030.c
+17
-70
drivers/ide/pci/amd74xx.c
drivers/ide/pci/amd74xx.c
+4
-21
drivers/ide/pci/amd74xx.h
drivers/ide/pci/amd74xx.h
+0
-15
drivers/ide/pci/via82cxxx.c
drivers/ide/pci/via82cxxx.c
+7
-26
drivers/ide/pci/via82cxxx.h
drivers/ide/pci/via82cxxx.h
+0
-5
drivers/usb/core/inode.c
drivers/usb/core/inode.c
+76
-67
drivers/usb/host/uhci-debug.c
drivers/usb/host/uhci-debug.c
+83
-83
drivers/usb/host/uhci-hcd.c
drivers/usb/host/uhci-hcd.c
+1
-1
drivers/usb/input/Kconfig
drivers/usb/input/Kconfig
+2
-5
drivers/usb/misc/brlvger.c
drivers/usb/misc/brlvger.c
+3
-3
drivers/usb/misc/speedtch.c
drivers/usb/misc/speedtch.c
+63
-57
drivers/usb/serial/keyspan.c
drivers/usb/serial/keyspan.c
+397
-23
drivers/usb/serial/keyspan.h
drivers/usb/serial/keyspan.h
+30
-3
drivers/usb/serial/keyspan_usa26msg.h
drivers/usb/serial/keyspan_usa26msg.h
+2
-6
drivers/usb/serial/keyspan_usa28msg.h
drivers/usb/serial/keyspan_usa28msg.h
+2
-6
drivers/usb/serial/keyspan_usa49msg.h
drivers/usb/serial/keyspan_usa49msg.h
+2
-6
drivers/usb/serial/keyspan_usa90msg.h
drivers/usb/serial/keyspan_usa90msg.h
+198
-0
drivers/usb/storage/freecom.c
drivers/usb/storage/freecom.c
+12
-4
drivers/usb/storage/unusual_devs.h
drivers/usb/storage/unusual_devs.h
+7
-1
include/asm-i386/elf.h
include/asm-i386/elf.h
+4
-1
include/asm-ia64/elf.h
include/asm-ia64/elf.h
+21
-17
include/linux/usb.h
include/linux/usb.h
+3
-3
No files found.
arch/x86_64/ia32/ia32_binfmt.c
View file @
324b683a
...
...
@@ -82,9 +82,12 @@ do { \
int i; \
Elf32_Off ofs = 0; \
for (i = 0; i < VSYSCALL32_EHDR->e_phnum; ++i) { \
struct elf_phdr phdr = vsyscall_phdrs[i]; \
struct elf
32
_phdr phdr = vsyscall_phdrs[i]; \
if (phdr.p_type == PT_LOAD) { \
BUG_ON(ofs != 0); \
ofs = phdr.p_offset = offset; \
phdr.p_memsz = PAGE_ALIGN(phdr.p_memsz); \
phdr.p_filesz = phdr.p_memsz; \
offset += phdr.p_filesz; \
} \
else \
...
...
@@ -99,10 +102,10 @@ do { \
(const struct elf32_phdr *) (VSYSCALL32_BASE \
+ VSYSCALL32_EHDR->e_phoff); \
int i; \
for (i = 0; i < VSYSCALL
32_EHDR->e_phnum; ++i) {
\
for (i = 0; i < VSYSCALL
_EHDR->e_phnum; ++i) {
\
if (vsyscall_phdrs[i].p_type == PT_LOAD) \
DUMP_WRITE((void *) (u64) vsyscall_phdrs[i].p_vaddr, \
vsyscall_phdrs[i].p_filesz);
\
PAGE_ALIGN(vsyscall_phdrs[i].p_memsz));
\
} \
} while (0)
...
...
drivers/ide/ide.c
View file @
324b683a
...
...
@@ -1800,7 +1800,6 @@ static int __init match_parm (char *s, const char *keywords[], int vals[], int m
#ifdef CONFIG_BLK_DEV_PDC4030
static
int
__initdata
probe_pdc4030
;
extern
void
init_pdc4030
(
void
);
#endif
#ifdef CONFIG_BLK_DEV_ALI14XX
static
int
__initdata
probe_ali14xx
;
...
...
@@ -2238,8 +2237,9 @@ static void __init probe_for_hwifs (void)
#endif
/* CONFIG_BLK_DEV_CMD640 */
#ifdef CONFIG_BLK_DEV_PDC4030
{
extern
int
ide_probe_for_pdc4030
(
void
);
(
void
)
ide_probe_for_pdc4030
();
extern
int
pdc4030_init
(
void
);
if
(
probe_pdc4030
)
(
void
)
pdc4030_init
();
}
#endif
/* CONFIG_BLK_DEV_PDC4030 */
#ifdef CONFIG_BLK_DEV_IDE_PMAC
...
...
@@ -2595,10 +2595,6 @@ int __init ide_init (void)
init_ide_data
();
#ifdef CONFIG_BLK_DEV_PDC4030
if
(
probe_pdc4030
)
init_pdc4030
();
#endif
#ifdef CONFIG_BLK_DEV_ALI14XX
if
(
probe_ali14xx
)
(
void
)
ali14xx_init
();
...
...
drivers/ide/legacy/pdc4030.c
View file @
324b683a
...
...
@@ -147,8 +147,6 @@ int pdc4030_identify(ide_drive_t *drive)
return
pdc4030_cmd
(
drive
,
PROMISE_IDENTIFY
);
}
int
enable_promise_support
;
/*
* setup_pdc4030()
* Completes the setup of a Promise DC4030 controller card, once found.
...
...
@@ -296,27 +294,24 @@ int __init detect_pdc4030(ide_hwif_t *hwif)
}
}
int
__init
ide_probe_for_pdc4030
(
void
)
int
__init
pdc4030_init
(
void
)
{
unsigned
int
index
;
ide_hwif_t
*
hwif
;
#ifndef MODULE
if
(
enable_promise_support
==
0
)
return
0
;
#endif
for
(
index
=
0
;
index
<
MAX_HWIFS
;
index
++
)
{
hwif
=
&
ide_hwifs
[
index
];
if
(
hwif
->
chipset
==
ide_unknown
&&
detect_pdc4030
(
hwif
))
return
setup_pdc4030
(
hwif
);
}
if
(
hwif
->
chipset
==
ide_unknown
&&
detect_pdc4030
(
hwif
))
{
if
(
!
setup_pdc4030
(
hwif
))
return
-
ENODEV
;
return
0
;
}
}
return
-
ENODEV
;
}
static
void
__exit
release_pdc4030
(
ide_hwif_t
*
hwif
,
ide_hwif_t
*
mate
)
#ifdef MODULE
static
void
__exit
pdc4030_release_hwif
(
ide_hwif_t
*
hwif
)
{
hwif
->
chipset
=
ide_unknown
;
hwif
->
selectproc
=
NULL
;
...
...
@@ -327,72 +322,24 @@ static void __exit release_pdc4030(ide_hwif_t *hwif, ide_hwif_t *mate)
hwif
->
drives
[
1
].
keep_settings
=
0
;
hwif
->
drives
[
0
].
noprobe
=
0
;
hwif
->
drives
[
1
].
noprobe
=
0
;
if
(
mate
!=
NULL
)
{
mate
->
chipset
=
ide_unknown
;
mate
->
selectproc
=
NULL
;
mate
->
serialized
=
0
;
mate
->
drives
[
0
].
io_32bit
=
0
;
mate
->
drives
[
1
].
io_32bit
=
0
;
mate
->
drives
[
0
].
keep_settings
=
0
;
mate
->
drives
[
1
].
keep_settings
=
0
;
mate
->
drives
[
0
].
noprobe
=
0
;
mate
->
drives
[
1
].
noprobe
=
0
;
}
}
#ifndef MODULE
/*
* init_pdc4030:
*
* called by ide.c when parsing command line
*/
void
__init
init_pdc4030
(
void
)
static
void
__exit
pdc4030_exit
(
void
)
{
enable_promise_support
=
1
;
unsigned
int
index
;
for
(
index
=
0
;
index
<
MAX_HWIFS
;
index
++
)
pdc4030_release_hwif
(
&
ide_hwifs
[
index
]);
}
#else
module_init
(
pdc4030_init
);
module_exit
(
pdc4030_exit
);
#endif
MODULE_AUTHOR
(
"Peter Denison"
);
MODULE_DESCRIPTION
(
"Support of Promise 4030 VLB series IDE chipsets"
);
MODULE_LICENSE
(
"GPL"
);
static
int
__init
pdc4030_mod_init
(
void
)
{
if
(
enable_promise_support
==
0
)
enable_promise_support
=
1
;
if
(
!
ide_probe_for_pdc4030
())
return
-
ENODEV
;
return
0
;
}
module_init
(
pdc4030_mod_init
);
static
void
__exit
pdc4030_mod_exit
(
void
)
{
unsigned
int
index
;
ide_hwif_t
*
hwif
;
if
(
enable_promise_support
==
0
)
return
;
for
(
index
=
0
;
index
<
MAX_HWIFS
;
index
++
)
{
hwif
=
&
ide_hwifs
[
index
];
if
(
hwif
->
chipset
==
ide_pdc4030
)
{
ide_hwif_t
*
mate
=
&
ide_hwifs
[
hwif
->
index
+
1
];
if
(
mate
->
chipset
==
ide_pdc4030
)
release_pdc4030
(
hwif
,
mate
);
else
release_pdc4030
(
hwif
,
NULL
);
}
}
enable_promise_support
=
0
;
}
module_exit
(
pdc4030_mod_exit
);
#endif
/*
* promise_read_intr() is the handler for disk read/multread interrupts
*/
...
...
drivers/ide/pci/amd74xx.c
View file @
324b683a
/*
* Version 2.
9
* Version 2.
11
*
* AMD 755/756/766/8111 and nVidia nForce IDE driver for Linux.
*
...
...
@@ -65,7 +65,6 @@ static struct amd_ide_chip {
};
static
struct
amd_ide_chip
*
amd_config
;
static
unsigned
char
amd_enabled
;
static
unsigned
int
amd_80w
;
static
unsigned
int
amd_clock
;
...
...
@@ -103,7 +102,7 @@ static int amd74xx_get_info(char *buffer, char **addr, off_t offset, int count)
amd_print
(
"----------AMD BusMastering IDE Configuration----------------"
);
amd_print
(
"Driver Version: 2.
9
"
);
amd_print
(
"Driver Version: 2.
11
"
);
amd_print
(
"South Bridge: %s"
,
pci_name
(
bmide_dev
));
pci_read_config_byte
(
dev
,
PCI_REVISION_ID
,
&
t
);
...
...
@@ -250,9 +249,6 @@ static int amd_set_drive(ide_drive_t *drive, u8 speed)
static
void
amd74xx_tune_drive
(
ide_drive_t
*
drive
,
u8
pio
)
{
if
(
!
((
amd_enabled
>>
HWIF
(
drive
)
->
channel
)
&
1
))
return
;
if
(
pio
==
255
)
{
amd_set_drive
(
drive
,
ide_find_best_mode
(
drive
,
XFER_PIO
|
XFER_EPIO
));
return
;
...
...
@@ -330,9 +326,6 @@ static unsigned int __init init_chipset_amd74xx(struct pci_dev *dev, const char
break
;
}
pci_read_config_dword
(
dev
,
AMD_IDE_ENABLE
,
&
u
);
amd_enabled
=
((
u
&
1
)
?
2
:
0
)
|
((
u
&
2
)
?
1
:
0
);
/*
* Take care of prefetch & postwrite.
*/
...
...
@@ -408,8 +401,8 @@ static void __init init_hwif_amd74xx(ide_hwif_t *hwif)
hwif
->
mwdma_mask
=
0x07
;
hwif
->
swdma_mask
=
0x07
;
if
(
!
(
hwif
->
udma_four
)
)
hwif
->
udma_four
=
((
amd_enabled
&
amd_80w
)
>>
hwif
->
channel
)
&
1
;
if
(
!
hwif
->
udma_four
)
hwif
->
udma_four
=
(
amd_80w
>>
hwif
->
channel
)
&
1
;
hwif
->
ide_dma_check
=
&
amd74xx_ide_dma_check
;
if
(
!
noautodma
)
hwif
->
autodma
=
1
;
...
...
@@ -417,16 +410,6 @@ static void __init init_hwif_amd74xx(ide_hwif_t *hwif)
hwif
->
drives
[
1
].
autodma
=
hwif
->
autodma
;
}
/*
* We allow the BM-DMA driver only work on enabled interfaces.
*/
static
void
__init
init_dma_amd74xx
(
ide_hwif_t
*
hwif
,
unsigned
long
dmabase
)
{
if
((
amd_enabled
>>
hwif
->
channel
)
&
1
)
ide_setup_dma
(
hwif
,
dmabase
,
8
);
}
extern
void
ide_setup_pci_device
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
int
__devinit
amd74xx_probe
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
...
...
drivers/ide/pci/amd74xx.h
View file @
324b683a
...
...
@@ -27,7 +27,6 @@ static ide_pci_host_proc_t amd74xx_procs[] __initdata = {
static
unsigned
int
init_chipset_amd74xx
(
struct
pci_dev
*
,
const
char
*
);
static
void
init_hwif_amd74xx
(
ide_hwif_t
*
);
static
void
init_dma_amd74xx
(
ide_hwif_t
*
,
unsigned
long
);
static
ide_pci_device_t
amd74xx_chipsets
[]
__devinitdata
=
{
{
/* 0 */
...
...
@@ -35,9 +34,7 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = {
.
device
=
PCI_DEVICE_ID_AMD_COBRA_7401
,
.
name
=
"AMD7401"
,
.
init_chipset
=
init_chipset_amd74xx
,
.
init_iops
=
NULL
,
.
init_hwif
=
init_hwif_amd74xx
,
.
init_dma
=
init_dma_amd74xx
,
.
channels
=
2
,
.
autodma
=
AUTODMA
,
.
enablebits
=
{{
0x40
,
0x02
,
0x02
},
{
0x40
,
0x01
,
0x01
}},
...
...
@@ -48,9 +45,7 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = {
.
device
=
PCI_DEVICE_ID_AMD_VIPER_7409
,
.
name
=
"AMD7409"
,
.
init_chipset
=
init_chipset_amd74xx
,
.
init_iops
=
NULL
,
.
init_hwif
=
init_hwif_amd74xx
,
.
init_dma
=
init_dma_amd74xx
,
.
channels
=
2
,
.
autodma
=
AUTODMA
,
.
enablebits
=
{{
0x40
,
0x02
,
0x02
},
{
0x40
,
0x01
,
0x01
}},
...
...
@@ -61,9 +56,7 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = {
.
device
=
PCI_DEVICE_ID_AMD_VIPER_7411
,
.
name
=
"AMD7411"
,
.
init_chipset
=
init_chipset_amd74xx
,
.
init_iops
=
NULL
,
.
init_hwif
=
init_hwif_amd74xx
,
.
init_dma
=
init_dma_amd74xx
,
.
channels
=
2
,
.
autodma
=
AUTODMA
,
.
enablebits
=
{{
0x40
,
0x02
,
0x02
},
{
0x40
,
0x01
,
0x01
}},
...
...
@@ -74,9 +67,7 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = {
.
device
=
PCI_DEVICE_ID_AMD_OPUS_7441
,
.
name
=
"AMD7441"
,
.
init_chipset
=
init_chipset_amd74xx
,
.
init_iops
=
NULL
,
.
init_hwif
=
init_hwif_amd74xx
,
.
init_dma
=
init_dma_amd74xx
,
.
channels
=
2
,
.
autodma
=
AUTODMA
,
.
enablebits
=
{{
0x40
,
0x02
,
0x02
},
{
0x40
,
0x01
,
0x01
}},
...
...
@@ -87,9 +78,7 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = {
.
device
=
PCI_DEVICE_ID_AMD_8111_IDE
,
.
name
=
"AMD8111"
,
.
init_chipset
=
init_chipset_amd74xx
,
.
init_iops
=
NULL
,
.
init_hwif
=
init_hwif_amd74xx
,
.
init_dma
=
init_dma_amd74xx
,
.
autodma
=
AUTODMA
,
.
channels
=
2
,
.
enablebits
=
{{
0x40
,
0x02
,
0x02
},
{
0x40
,
0x01
,
0x01
}},
...
...
@@ -101,9 +90,7 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = {
.
device
=
PCI_DEVICE_ID_NVIDIA_NFORCE_IDE
,
.
name
=
"NFORCE"
,
.
init_chipset
=
init_chipset_amd74xx
,
.
init_iops
=
NULL
,
.
init_hwif
=
init_hwif_amd74xx
,
.
init_dma
=
init_dma_amd74xx
,
.
channels
=
2
,
.
autodma
=
AUTODMA
,
.
enablebits
=
{{
0x50
,
0x02
,
0x02
},
{
0x50
,
0x01
,
0x01
}},
...
...
@@ -115,9 +102,7 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = {
.
device
=
PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE
,
.
name
=
"NFORCE2"
,
.
init_chipset
=
init_chipset_amd74xx
,
.
init_iops
=
NULL
,
.
init_hwif
=
init_hwif_amd74xx
,
.
init_dma
=
init_dma_amd74xx
,
.
channels
=
2
,
.
autodma
=
AUTODMA
,
.
enablebits
=
{{
0x50
,
0x02
,
0x02
},
{
0x50
,
0x01
,
0x01
}},
...
...
drivers/ide/pci/via82cxxx.c
View file @
324b683a
/*
*
* Version 3.3
7
* Version 3.3
8
*
* VIA IDE driver for Linux. Supported southbridges:
*
...
...
@@ -96,7 +96,6 @@ static struct via_isa_bridge {
};
static
struct
via_isa_bridge
*
via_config
;
static
unsigned
char
via_enabled
;
static
unsigned
int
via_80w
;
static
unsigned
int
via_clock
;
static
char
*
via_dma
[]
=
{
"MWDMA16"
,
"UDMA33"
,
"UDMA66"
,
"UDMA100"
,
"UDMA133"
};
...
...
@@ -146,7 +145,7 @@ static int via_get_info(char *buffer, char **addr, off_t offset, int count)
via_print
(
"----------VIA BusMastering IDE Configuration"
"----------------"
);
via_print
(
"Driver Version: 3.3
7
"
);
via_print
(
"Driver Version: 3.3
8
"
);
via_print
(
"South Bridge: VIA %s"
,
via_config
->
name
);
...
...
@@ -370,9 +369,6 @@ static int via_set_drive(ide_drive_t *drive, u8 speed)
static
void
via82cxxx_tune_drive
(
ide_drive_t
*
drive
,
u8
pio
)
{
if
(
!
((
via_enabled
>>
HWIF
(
drive
)
->
channel
)
&
1
))
return
;
if
(
pio
==
255
)
{
via_set_drive
(
drive
,
ide_find_best_mode
(
drive
,
XFER_PIO
|
XFER_EPIO
));
...
...
@@ -506,7 +502,6 @@ static unsigned int __init init_chipset_via82cxxx(struct pci_dev *dev, const cha
*/
pci_read_config_byte
(
dev
,
VIA_IDE_ENABLE
,
&
v
);
via_enabled
=
((
v
&
1
)
?
2
:
0
)
|
((
v
&
2
)
?
1
:
0
);
/*
* Set up FIFO sizes and thresholds.
...
...
@@ -523,9 +518,9 @@ static unsigned int __init init_chipset_via82cxxx(struct pci_dev *dev, const cha
/* Fix FIFO split between channels */
if
(
via_config
->
flags
&
VIA_SET_FIFO
)
{
t
&=
(
t
&
0x9f
);
switch
(
v
ia_enabled
)
{
case
1
:
t
|=
0x00
;
break
;
/* 16 on primary */
case
2
:
t
|=
0x60
;
break
;
/* 16 on secondary */
switch
(
v
&
3
)
{
case
2
:
t
|=
0x00
;
break
;
/* 16 on primary */
case
1
:
t
|=
0x60
;
break
;
/* 16 on secondary */
case
3
:
t
|=
0x20
;
break
;
/* 8 pri 8 sec */
}
}
...
...
@@ -603,8 +598,8 @@ static void __init init_hwif_via82cxxx(ide_hwif_t *hwif)
hwif
->
mwdma_mask
=
0x07
;
hwif
->
swdma_mask
=
0x07
;
if
(
!
(
hwif
->
udma_four
)
)
hwif
->
udma_four
=
(
(
via_enabled
&
via_80w
)
>>
hwif
->
channel
)
&
1
;
if
(
!
hwif
->
udma_four
)
hwif
->
udma_four
=
(
via_80w
>>
hwif
->
channel
)
&
1
;
hwif
->
ide_dma_check
=
&
via82cxxx_ide_dma_check
;
if
(
!
noautodma
)
hwif
->
autodma
=
1
;
...
...
@@ -612,20 +607,6 @@ static void __init init_hwif_via82cxxx(ide_hwif_t *hwif)
hwif
->
drives
[
1
].
autodma
=
hwif
->
autodma
;
}
/**
* init_dma_via82cxxx - set up for IDE DMA
* @hwif: IDE interface
* @dmabase: DMA base address
*
* We allow the BM-DMA driver to only work on enabled interfaces.
*/
static
void
__init
init_dma_via82cxxx
(
ide_hwif_t
*
hwif
,
unsigned
long
dmabase
)
{
if
((
via_enabled
>>
hwif
->
channel
)
&
1
)
ide_setup_dma
(
hwif
,
dmabase
,
8
);
}
extern
void
ide_setup_pci_device
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
int
__devinit
via_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
...
...
drivers/ide/pci/via82cxxx.h
View file @
324b683a
...
...
@@ -27,7 +27,6 @@ static ide_pci_host_proc_t via_procs[] __initdata = {
static
unsigned
int
init_chipset_via82cxxx
(
struct
pci_dev
*
,
const
char
*
);
static
void
init_hwif_via82cxxx
(
ide_hwif_t
*
);
static
void
init_dma_via82cxxx
(
ide_hwif_t
*
,
unsigned
long
);
static
ide_pci_device_t
via82cxxx_chipsets
[]
__devinitdata
=
{
{
/* 0 */
...
...
@@ -35,9 +34,7 @@ static ide_pci_device_t via82cxxx_chipsets[] __devinitdata = {
.
device
=
PCI_DEVICE_ID_VIA_82C576_1
,
.
name
=
"VP_IDE"
,
.
init_chipset
=
init_chipset_via82cxxx
,
.
init_iops
=
NULL
,
.
init_hwif
=
init_hwif_via82cxxx
,
.
init_dma
=
init_dma_via82cxxx
,
.
channels
=
2
,
.
autodma
=
NOAUTODMA
,
.
enablebits
=
{{
0x40
,
0x02
,
0x02
},
{
0x40
,
0x01
,
0x01
}},
...
...
@@ -48,9 +45,7 @@ static ide_pci_device_t via82cxxx_chipsets[] __devinitdata = {
.
device
=
PCI_DEVICE_ID_VIA_82C586_1
,
.
name
=
"VP_IDE"
,
.
init_chipset
=
init_chipset_via82cxxx
,
.
init_iops
=
NULL
,
.
init_hwif
=
init_hwif_via82cxxx
,
.
init_dma
=
init_dma_via82cxxx
,
.
channels
=
2
,
.
autodma
=
NOAUTODMA
,
.
enablebits
=
{{
0x40
,
0x02
,
0x02
},
{
0x40
,
0x01
,
0x01
}},
...
...
drivers/usb/core/inode.c
View file @
324b683a
...
...
@@ -38,6 +38,7 @@
#include <linux/namei.h>
#include <linux/usbdevice_fs.h>
#include <linux/smp_lock.h>
#include <linux/parser.h>
#include <asm/byteorder.h>
static
struct
super_operations
usbfs_ops
;
...
...
@@ -62,76 +63,87 @@ static umode_t devmode = S_IWUSR | S_IRUGO;
static
umode_t
busmode
=
S_IXUGO
|
S_IRUGO
;
static
umode_t
listmode
=
S_IRUGO
;
enum
{
Opt_devuid
,
Opt_devgid
,
Opt_devmode
,
Opt_busuid
,
Opt_busgid
,
Opt_busmode
,
Opt_listuid
,
Opt_listgid
,
Opt_listmode
,
Opt_err
,
};
static
match_table_t
tokens
=
{
{
Opt_devuid
,
"devuid=%u"
},
{
Opt_devgid
,
"devgid=%u"
},
{
Opt_devmode
,
"devmode=%o"
},
{
Opt_busuid
,
"busuid=%u"
},
{
Opt_busgid
,
"busgid=%u"
},
{
Opt_busmode
,
"busmode=%o"
},
{
Opt_listuid
,
"listuid=%u"
},
{
Opt_listgid
,
"listgid=%u"
},
{
Opt_listmode
,
"listmode=%o"
},
{
Opt_err
,
NULL
}
};
static
int
parse_options
(
struct
super_block
*
s
,
char
*
data
)
{
char
*
curopt
=
NULL
,
*
value
;
char
*
p
;
int
option
;
while
((
curopt
=
strsep
(
&
data
,
","
))
!=
NULL
)
{
if
(
!*
curopt
)
while
((
p
=
strsep
(
&
data
,
","
))
!=
NULL
)
{
substring_t
args
[
MAX_OPT_ARGS
];
int
token
;
if
(
!*
p
)
continue
;
if
((
value
=
strchr
(
curopt
,
'='
))
!=
NULL
)
*
value
++
=
0
;
if
(
!
strcmp
(
curopt
,
"devuid"
))
{
if
(
!
value
||
!
value
[
0
])
return
-
EINVAL
;
devuid
=
simple_strtoul
(
value
,
&
value
,
0
);
if
(
*
value
)
return
-
EINVAL
;
}
if
(
!
strcmp
(
curopt
,
"devgid"
))
{
if
(
!
value
||
!
value
[
0
])
return
-
EINVAL
;
devgid
=
simple_strtoul
(
value
,
&
value
,
0
);
if
(
*
value
)
return
-
EINVAL
;
}
if
(
!
strcmp
(
curopt
,
"devmode"
))
{
if
(
!
value
||
!
value
[
0
])
return
-
EINVAL
;
devmode
=
simple_strtoul
(
value
,
&
value
,
0
)
&
S_IRWXUGO
;
if
(
*
value
)
return
-
EINVAL
;
}
if
(
!
strcmp
(
curopt
,
"busuid"
))
{
if
(
!
value
||
!
value
[
0
])
return
-
EINVAL
;
busuid
=
simple_strtoul
(
value
,
&
value
,
0
);
if
(
*
value
)
return
-
EINVAL
;
}
if
(
!
strcmp
(
curopt
,
"busgid"
))
{
if
(
!
value
||
!
value
[
0
])
token
=
match_token
(
p
,
tokens
,
args
);
switch
(
token
)
{
case
Opt_devuid
:
if
(
match_int
(
&
args
[
0
],
&
option
))
return
-
EINVAL
;
busgid
=
simple_strtoul
(
value
,
&
value
,
0
);
if
(
*
value
)
devuid
=
option
;
break
;
case
Opt_devgid
:
if
(
match_int
(
&
args
[
0
],
&
option
))
return
-
EINVAL
;
}
if
(
!
strcmp
(
curopt
,
"busmode"
))
{
if
(
!
value
||
!
value
[
0
])
devgid
=
option
;
break
;
case
Opt_devmode
:
if
(
match_octal
(
&
args
[
0
],
&
option
))
return
-
EINVAL
;
busmode
=
simple_strtoul
(
value
,
&
value
,
0
)
&
S_IRWXUGO
;
if
(
*
value
)
devmode
=
option
&
S_IRWXUGO
;
break
;
case
Opt_busuid
:
if
(
match_int
(
&
args
[
0
],
&
option
))
return
-
EINVAL
;
}
if
(
!
strcmp
(
curopt
,
"listuid"
))
{
if
(
!
value
||
!
value
[
0
])
busuid
=
option
;
break
;
case
Opt_busgid
:
if
(
match_int
(
&
args
[
0
],
&
option
))
return
-
EINVAL
;
listuid
=
simple_strtoul
(
value
,
&
value
,
0
);
if
(
*
value
)
busgid
=
option
;
break
;
case
Opt_busmode
:
if
(
match_octal
(
&
args
[
0
],
&
option
))
return
-
EINVAL
;
}
if
(
!
strcmp
(
curopt
,
"listgid"
))
{
if
(
!
value
||
!
value
[
0
])
busmode
=
option
&
S_IRWXUGO
;
break
;
case
Opt_listuid
:
if
(
match_int
(
&
args
[
0
],
&
option
))
return
-
EINVAL
;
listgid
=
simple_strtoul
(
value
,
&
value
,
0
);
if
(
*
value
)
listuid
=
option
;
break
;
case
Opt_listgid
:
if
(
match_int
(
&
args
[
0
],
&
option
))
return
-
EINVAL
;
}
if
(
!
strcmp
(
curopt
,
"listmode"
))
{
if
(
!
value
||
!
value
[
0
])
listgid
=
option
;
break
;
case
Opt_listmode
:
if
(
match_octal
(
&
args
[
0
],
&
option
))
return
-
EINVAL
;
listmode
=
simple_strtoul
(
value
,
&
value
,
0
)
&
S_IRWXUGO
;
if
(
*
value
)
listmode
=
option
&
S_IRWXUGO
;
break
;
default:
err
(
"usbfs: unrecognised mount option
\"
%s
\"
"
"or missing value
\n
"
,
p
);
return
-
EINVAL
;
}
}
...
...
@@ -139,9 +151,6 @@ static int parse_options(struct super_block *s, char *data)
return
0
;
}
/* --------------------------------------------------------------------- */
static
struct
inode
*
usbfs_get_inode
(
struct
super_block
*
sb
,
int
mode
,
dev_t
dev
)
{
struct
inode
*
inode
=
new_inode
(
sb
);
...
...
drivers/usb/host/uhci-debug.c
View file @
324b683a
...
...
@@ -99,82 +99,6 @@ static int uhci_show_td(struct uhci_td *td, char *buf, int len, int space)
return
out
-
buf
;
}
static
int
uhci_show_sc
(
int
port
,
unsigned
short
status
,
char
*
buf
,
int
len
)
{
char
*
out
=
buf
;
/* Try to make sure there's enough memory */
if
(
len
<
80
)
return
0
;
out
+=
sprintf
(
out
,
" stat%d = %04x %s%s%s%s%s%s%s%s
\n
"
,
port
,
status
,
(
status
&
USBPORTSC_SUSP
)
?
"PortSuspend "
:
""
,
(
status
&
USBPORTSC_PR
)
?
"PortReset "
:
""
,
(
status
&
USBPORTSC_LSDA
)
?
"LowSpeed "
:
""
,
(
status
&
USBPORTSC_RD
)
?
"ResumeDetect "
:
""
,
(
status
&
USBPORTSC_PEC
)
?
"EnableChange "
:
""
,
(
status
&
USBPORTSC_PE
)
?
"PortEnabled "
:
""
,
(
status
&
USBPORTSC_CSC
)
?
"ConnectChange "
:
""
,
(
status
&
USBPORTSC_CCS
)
?
"PortConnected "
:
""
);
return
out
-
buf
;
}
static
int
uhci_show_status
(
struct
uhci_hcd
*
uhci
,
char
*
buf
,
int
len
)
{
char
*
out
=
buf
;
unsigned
int
io_addr
=
uhci
->
io_addr
;
unsigned
short
usbcmd
,
usbstat
,
usbint
,
usbfrnum
;
unsigned
int
flbaseadd
;
unsigned
char
sof
;
unsigned
short
portsc1
,
portsc2
;
/* Try to make sure there's enough memory */
if
(
len
<
80
*
6
)
return
0
;
usbcmd
=
inw
(
io_addr
+
0
);
usbstat
=
inw
(
io_addr
+
2
);
usbint
=
inw
(
io_addr
+
4
);
usbfrnum
=
inw
(
io_addr
+
6
);
flbaseadd
=
inl
(
io_addr
+
8
);
sof
=
inb
(
io_addr
+
12
);
portsc1
=
inw
(
io_addr
+
16
);
portsc2
=
inw
(
io_addr
+
18
);
out
+=
sprintf
(
out
,
" usbcmd = %04x %s%s%s%s%s%s%s%s
\n
"
,
usbcmd
,
(
usbcmd
&
USBCMD_MAXP
)
?
"Maxp64 "
:
"Maxp32 "
,
(
usbcmd
&
USBCMD_CF
)
?
"CF "
:
""
,
(
usbcmd
&
USBCMD_SWDBG
)
?
"SWDBG "
:
""
,
(
usbcmd
&
USBCMD_FGR
)
?
"FGR "
:
""
,
(
usbcmd
&
USBCMD_EGSM
)
?
"EGSM "
:
""
,
(
usbcmd
&
USBCMD_GRESET
)
?
"GRESET "
:
""
,
(
usbcmd
&
USBCMD_HCRESET
)
?
"HCRESET "
:
""
,
(
usbcmd
&
USBCMD_RS
)
?
"RS "
:
""
);
out
+=
sprintf
(
out
,
" usbstat = %04x %s%s%s%s%s%s
\n
"
,
usbstat
,
(
usbstat
&
USBSTS_HCH
)
?
"HCHalted "
:
""
,
(
usbstat
&
USBSTS_HCPE
)
?
"HostControllerProcessError "
:
""
,
(
usbstat
&
USBSTS_HSE
)
?
"HostSystemError "
:
""
,
(
usbstat
&
USBSTS_RD
)
?
"ResumeDetect "
:
""
,
(
usbstat
&
USBSTS_ERROR
)
?
"USBError "
:
""
,
(
usbstat
&
USBSTS_USBINT
)
?
"USBINT "
:
""
);
out
+=
sprintf
(
out
,
" usbint = %04x
\n
"
,
usbint
);
out
+=
sprintf
(
out
,
" usbfrnum = (%d)%03x
\n
"
,
(
usbfrnum
>>
10
)
&
1
,
0xfff
&
(
4
*
(
unsigned
int
)
usbfrnum
));
out
+=
sprintf
(
out
,
" flbaseadd = %08x
\n
"
,
flbaseadd
);
out
+=
sprintf
(
out
,
" sof = %02x
\n
"
,
sof
);
out
+=
uhci_show_sc
(
1
,
portsc1
,
out
,
len
-
(
out
-
buf
));
out
+=
uhci_show_sc
(
2
,
portsc2
,
out
,
len
-
(
out
-
buf
));
return
out
-
buf
;
}
static
int
uhci_show_qh
(
struct
uhci_qh
*
qh
,
char
*
buf
,
int
len
,
int
space
)
{
char
*
out
=
buf
;
...
...
@@ -274,6 +198,13 @@ static int uhci_show_qh(struct uhci_qh *qh, char *buf, int len, int space)
return
out
-
buf
;
}
#define show_frame_num() \
if (!shown) { \
shown = 1; \
out += sprintf(out, "- Frame %d\n", i); \
}
#ifdef CONFIG_PROC_FS
static
const
char
*
qh_names
[]
=
{
"skel_int128_qh"
,
"skel_int64_qh"
,
"skel_int32_qh"
,
"skel_int16_qh"
,
...
...
@@ -283,18 +214,88 @@ static const char *qh_names[] = {
"skel_bulk_qh"
,
"skel_term_qh"
};
#define show_frame_num() \
if (!shown) { \
shown = 1; \
out += sprintf(out, "- Frame %d\n", i); \
}
#define show_qh_name() \
if (!shown) { \
shown = 1; \
out += sprintf(out, "- %s\n", qh_names[i]); \
}
static
int
uhci_show_sc
(
int
port
,
unsigned
short
status
,
char
*
buf
,
int
len
)
{
char
*
out
=
buf
;
/* Try to make sure there's enough memory */
if
(
len
<
80
)
return
0
;
out
+=
sprintf
(
out
,
" stat%d = %04x %s%s%s%s%s%s%s%s
\n
"
,
port
,
status
,
(
status
&
USBPORTSC_SUSP
)
?
"PortSuspend "
:
""
,
(
status
&
USBPORTSC_PR
)
?
"PortReset "
:
""
,
(
status
&
USBPORTSC_LSDA
)
?
"LowSpeed "
:
""
,
(
status
&
USBPORTSC_RD
)
?
"ResumeDetect "
:
""
,
(
status
&
USBPORTSC_PEC
)
?
"EnableChange "
:
""
,
(
status
&
USBPORTSC_PE
)
?
"PortEnabled "
:
""
,
(
status
&
USBPORTSC_CSC
)
?
"ConnectChange "
:
""
,
(
status
&
USBPORTSC_CCS
)
?
"PortConnected "
:
""
);
return
out
-
buf
;
}
static
int
uhci_show_status
(
struct
uhci_hcd
*
uhci
,
char
*
buf
,
int
len
)
{
char
*
out
=
buf
;
unsigned
int
io_addr
=
uhci
->
io_addr
;
unsigned
short
usbcmd
,
usbstat
,
usbint
,
usbfrnum
;
unsigned
int
flbaseadd
;
unsigned
char
sof
;
unsigned
short
portsc1
,
portsc2
;
/* Try to make sure there's enough memory */
if
(
len
<
80
*
6
)
return
0
;
usbcmd
=
inw
(
io_addr
+
0
);
usbstat
=
inw
(
io_addr
+
2
);
usbint
=
inw
(
io_addr
+
4
);
usbfrnum
=
inw
(
io_addr
+
6
);
flbaseadd
=
inl
(
io_addr
+
8
);
sof
=
inb
(
io_addr
+
12
);
portsc1
=
inw
(
io_addr
+
16
);
portsc2
=
inw
(
io_addr
+
18
);
out
+=
sprintf
(
out
,
" usbcmd = %04x %s%s%s%s%s%s%s%s
\n
"
,
usbcmd
,
(
usbcmd
&
USBCMD_MAXP
)
?
"Maxp64 "
:
"Maxp32 "
,
(
usbcmd
&
USBCMD_CF
)
?
"CF "
:
""
,
(
usbcmd
&
USBCMD_SWDBG
)
?
"SWDBG "
:
""
,
(
usbcmd
&
USBCMD_FGR
)
?
"FGR "
:
""
,
(
usbcmd
&
USBCMD_EGSM
)
?
"EGSM "
:
""
,
(
usbcmd
&
USBCMD_GRESET
)
?
"GRESET "
:
""
,
(
usbcmd
&
USBCMD_HCRESET
)
?
"HCRESET "
:
""
,
(
usbcmd
&
USBCMD_RS
)
?
"RS "
:
""
);
out
+=
sprintf
(
out
,
" usbstat = %04x %s%s%s%s%s%s
\n
"
,
usbstat
,
(
usbstat
&
USBSTS_HCH
)
?
"HCHalted "
:
""
,
(
usbstat
&
USBSTS_HCPE
)
?
"HostControllerProcessError "
:
""
,
(
usbstat
&
USBSTS_HSE
)
?
"HostSystemError "
:
""
,
(
usbstat
&
USBSTS_RD
)
?
"ResumeDetect "
:
""
,
(
usbstat
&
USBSTS_ERROR
)
?
"USBError "
:
""
,
(
usbstat
&
USBSTS_USBINT
)
?
"USBINT "
:
""
);
out
+=
sprintf
(
out
,
" usbint = %04x
\n
"
,
usbint
);
out
+=
sprintf
(
out
,
" usbfrnum = (%d)%03x
\n
"
,
(
usbfrnum
>>
10
)
&
1
,
0xfff
&
(
4
*
(
unsigned
int
)
usbfrnum
));
out
+=
sprintf
(
out
,
" flbaseadd = %08x
\n
"
,
flbaseadd
);
out
+=
sprintf
(
out
,
" sof = %02x
\n
"
,
sof
);
out
+=
uhci_show_sc
(
1
,
portsc1
,
out
,
len
-
(
out
-
buf
));
out
+=
uhci_show_sc
(
2
,
portsc2
,
out
,
len
-
(
out
-
buf
));
return
out
-
buf
;
}
static
int
uhci_show_urbp
(
struct
uhci_hcd
*
uhci
,
struct
urb_priv
*
urbp
,
char
*
buf
,
int
len
)
{
struct
list_head
*
tmp
;
...
...
@@ -512,7 +513,6 @@ static int uhci_sprint_schedule(struct uhci_hcd *uhci, char *buf, int len)
return
out
-
buf
;
}
#ifdef CONFIG_PROC_FS
#define MAX_OUTPUT (64 * 1024)
static
struct
proc_dir_entry
*
uhci_proc_root
=
NULL
;
...
...
drivers/usb/host/uhci-hcd.c
View file @
324b683a
...
...
@@ -2185,8 +2185,8 @@ static int uhci_reset(struct usb_hcd *hcd)
/* Maybe kick BIOS off this hardware. Then reset, so we won't get
* interrupts from any previous setup.
*/
pci_write_config_word
(
hcd
->
pdev
,
USBLEGSUP
,
USBLEGSUP_DEFAULT
);
reset_hc
(
uhci
);
pci_write_config_word
(
hcd
->
pdev
,
USBLEGSUP
,
USBLEGSUP_DEFAULT
);
return
0
;
}
...
...
drivers/usb/input/Kconfig
View file @
324b683a
...
...
@@ -186,8 +186,5 @@ config USB_XPAD
For information about how to connect the X-Box pad to USB, see
Documentation/input/xpad.txt.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called xpad. If you want to compile it as a
module, say M here and read <file:Documentation/modules.txt>.
To compile this driver as a module, choose M here: the
module will be called xpad.
drivers/usb/misc/brlvger.c
View file @
324b683a
...
...
@@ -591,14 +591,14 @@ brlvger_write(struct file *file, const char __user *buffer,
int
firstpart
=
6
-
off
;
#ifdef WRITE_DEBUG
dbg3
(
"off: %d, rs: %d, count: %d, firstpart: %d"
,
dbg3
(
"off: %
ll
d, rs: %d, count: %d, firstpart: %d"
,
off
,
rs
,
count
,
firstpart
);
#endif
firstpart
=
(
firstpart
<
count
)
?
firstpart
:
count
;
#ifdef WRITE_DEBUG
dbg3
(
"off: %d"
,
off
);
dbg3
(
"off: %
ll
d"
,
off
);
dbg3
(
"firstpart: %d"
,
firstpart
);
#endif
...
...
@@ -618,7 +618,7 @@ brlvger_write(struct file *file, const char __user *buffer,
off
+=
2
;
#ifdef WRITE_DEBUG
dbg3
(
"off: %d, rs: %d, count: %d, firstpart: %d, "
dbg3
(
"off: %
ll
d, rs: %d, count: %d, firstpart: %d, "
"written: %d"
,
off
,
rs
,
count
,
firstpart
,
written
);
#endif
}
...
...
drivers/usb/misc/speedtch.c
View file @
324b683a
...
...
@@ -189,8 +189,7 @@ struct udsl_vcc_data {
struct
atm_vcc
*
vcc
;
/* raw cell reassembly */
struct
sk_buff
*
skb
;
unsigned
int
max_pdu
;
struct
sk_buff
*
sarb
;
};
/* send */
...
...
@@ -314,12 +313,10 @@ static void udsl_extract_cells (struct udsl_instance_data *instance, unsigned ch
{
struct
udsl_vcc_data
*
cached_vcc
=
NULL
;
struct
atm_vcc
*
vcc
;
struct
sk_buff
*
s
k
b
;
struct
sk_buff
*
s
ar
b
;
struct
udsl_vcc_data
*
vcc_data
;
int
cached_vci
=
0
;
unsigned
int
i
;
unsigned
int
length
;
unsigned
int
pdu_length
;
int
pti
;
int
vci
;
short
cached_vpi
=
0
;
...
...
@@ -344,74 +341,73 @@ static void udsl_extract_cells (struct udsl_instance_data *instance, unsigned ch
}
vcc
=
vcc_data
->
vcc
;
sarb
=
vcc_data
->
sarb
;
if
(
!
vcc_data
->
skb
&&
!
(
vcc_data
->
skb
=
dev_alloc_skb
(
vcc_data
->
max_pdu
)))
{
dbg
(
"udsl_extract_cells: no memory for skb (vcc: 0x%p)!"
,
vcc
);
if
(
pti
)
atomic_inc
(
&
vcc
->
stats
->
rx_err
);
continue
;
}
skb
=
vcc_data
->
skb
;
if
(
skb
->
len
+
ATM_CELL_PAYLOAD
>
vcc_data
->
max_pdu
)
{
dbg
(
"udsl_extract_cells: buffer overrun (max_pdu: %u, skb->len %u, vcc: 0x%p)"
,
vcc_data
->
max_pdu
,
skb
->
len
,
vcc
);
if
(
sarb
->
tail
+
ATM_CELL_PAYLOAD
>
sarb
->
end
)
{
dbg
(
"udsl_extract_cells: buffer overrun (sarb->len %u, vcc: 0x%p)!"
,
sarb
->
len
,
vcc
);
/* discard cells already received */
skb_trim
(
skb
,
0
);
DEBUG_ON
(
vcc_data
->
max_pdu
<
ATM_CELL_PAYLOAD
);
skb_trim
(
sarb
,
0
);
}
memcpy
(
s
k
b
->
tail
,
source
+
ATM_CELL_HEADER
,
ATM_CELL_PAYLOAD
);
__skb_put
(
s
k
b
,
ATM_CELL_PAYLOAD
);
memcpy
(
s
ar
b
->
tail
,
source
+
ATM_CELL_HEADER
,
ATM_CELL_PAYLOAD
);
__skb_put
(
s
ar
b
,
ATM_CELL_PAYLOAD
);
if
(
pti
)
{
struct
sk_buff
*
skb
;
unsigned
int
length
;
unsigned
int
pdu_length
;
length
=
(
source
[
ATM_CELL_SIZE
-
6
]
<<
8
)
+
source
[
ATM_CELL_SIZE
-
5
];
/* guard against overflow */
if
(
length
>
ATM_MAX_AAL5_PDU
)
{
dbg
(
"udsl_extract_cells: bogus length %u (vcc: 0x%p)"
,
length
,
vcc
);
goto
drop
;
dbg
(
"udsl_extract_cells: bogus length %u (vcc: 0x%p)!"
,
length
,
vcc
);
atomic_inc
(
&
vcc
->
stats
->
rx_err
);
goto
out
;
}
pdu_length
=
UDSL_NUM_CELLS
(
length
)
*
ATM_CELL_PAYLOAD
;
if
(
skb
->
len
<
pdu_length
)
{
dbg
(
"udsl_extract_cells: bogus pdu_length %u (skb->len: %u, vcc: 0x%p)"
,
pdu_length
,
skb
->
len
,
vcc
);
goto
drop
;
if
(
sarb
->
len
<
pdu_length
)
{
dbg
(
"udsl_extract_cells: bogus pdu_length %u (sarb->len: %u, vcc: 0x%p)!"
,
pdu_length
,
sarb
->
len
,
vcc
);
atomic_inc
(
&
vcc
->
stats
->
rx_err
);
goto
out
;
}
if
(
crc32_be
(
~
0
,
skb
->
tail
-
pdu_length
,
pdu_length
)
!=
0xc704dd7b
)
{
dbg
(
"udsl_extract_cells: packet failed crc check (vcc: 0x%p)"
,
vcc
);
goto
drop
;
if
(
crc32_be
(
~
0
,
sarb
->
tail
-
pdu_length
,
pdu_length
)
!=
0xc704dd7b
)
{
dbg
(
"udsl_extract_cells: packet failed crc check (vcc: 0x%p)!"
,
vcc
);
atomic_inc
(
&
vcc
->
stats
->
rx_err
);
goto
out
;
}
if
(
!
atm_charge
(
vcc
,
skb
->
truesize
))
{
dbg
(
"udsl_extract_cells: failed atm_charge (skb->truesize: %u)"
,
skb
->
truesize
);
goto
drop_no_stats
;
/* atm_charge increments rx_drop */
}
vdbg
(
"udsl_extract_cells: got packet (length: %u, pdu_length: %u, vcc: 0x%p)"
,
length
,
pdu_length
,
vcc
);
/* now that we are sure to send the skb, it is ok to change skb->data */
if
(
skb
->
len
>
pdu_length
)
skb_pull
(
skb
,
skb
->
len
-
pdu_length
);
/* discard initial junk */
if
(
!
(
skb
=
dev_alloc_skb
(
length
)))
{
dbg
(
"udsl_extract_cells: no memory for skb (length: %u)!"
,
length
);
atomic_inc
(
&
vcc
->
stats
->
rx_drop
);
goto
out
;
}
skb_trim
(
skb
,
length
);
/* drop zero padding and trailer */
vdbg
(
"udsl_extract_cells: allocated new sk_buff (skb: 0x%p, skb->truesize: %u)"
,
skb
,
skb
->
truesize
);
atomic_inc
(
&
vcc
->
stats
->
rx
);
if
(
!
atm_charge
(
vcc
,
skb
->
truesize
))
{
dbg
(
"udsl_extract_cells: failed atm_charge (skb->truesize: %u)!"
,
skb
->
truesize
);
dev_kfree_skb
(
skb
);
goto
out
;
/* atm_charge increments rx_drop */
}
PACKETDEBUG
(
skb
->
data
,
skb
->
len
);
memcpy
(
skb
->
data
,
sarb
->
tail
-
pdu_length
,
length
);
__skb_put
(
skb
,
length
);
vdbg
(
"udsl_extract_cells: sending skb 0x%p, skb->len %u, skb->truesize %u"
,
skb
,
skb
->
len
,
skb
->
truesize
);
vcc
->
push
(
vcc
,
skb
);
vcc_data
->
skb
=
NULL
;
PACKETDEBUG
(
skb
->
data
,
skb
->
len
);
continue
;
vcc
->
push
(
vcc
,
skb
)
;
drop:
atomic_inc
(
&
vcc
->
stats
->
rx_err
);
drop_no_stats:
skb_trim
(
skb
,
0
);
atomic_inc
(
&
vcc
->
stats
->
rx
);
out:
skb_trim
(
sarb
,
0
);
}
}
}
...
...
@@ -871,6 +867,7 @@ static int udsl_atm_open (struct atm_vcc *vcc, short vpi, int vci)
{
struct
udsl_instance_data
*
instance
=
vcc
->
dev
->
dev_data
;
struct
udsl_vcc_data
*
new
;
unsigned
int
max_pdu
;
dbg
(
"udsl_atm_open: vpi %hd, vci %d"
,
vpi
,
vci
);
...
...
@@ -883,8 +880,10 @@ static int udsl_atm_open (struct atm_vcc *vcc, short vpi, int vci)
return
-
EINVAL
;
/* only support AAL5 */
if
((
vcc
->
qos
.
aal
!=
ATM_AAL5
)
||
(
vcc
->
qos
.
rxtp
.
max_sdu
<
0
)
||
(
vcc
->
qos
.
rxtp
.
max_sdu
>
ATM_MAX_AAL5_PDU
))
if
((
vcc
->
qos
.
aal
!=
ATM_AAL5
)
||
(
vcc
->
qos
.
rxtp
.
max_sdu
<
0
)
||
(
vcc
->
qos
.
rxtp
.
max_sdu
>
ATM_MAX_AAL5_PDU
))
{
dbg
(
"udsl_atm_open: unsupported ATM type %d!"
,
vcc
->
qos
.
aal
);
return
-
EINVAL
;
}
if
(
!
instance
->
firmware_loaded
)
{
dbg
(
"udsl_atm_open: firmware not loaded!"
);
...
...
@@ -894,11 +893,13 @@ static int udsl_atm_open (struct atm_vcc *vcc, short vpi, int vci)
down
(
&
instance
->
serialize
);
/* vs self, udsl_atm_close */
if
(
udsl_find_vcc
(
instance
,
vpi
,
vci
))
{
dbg
(
"udsl_atm_open: %hd/%d already in use!"
,
vpi
,
vci
);
up
(
&
instance
->
serialize
);
return
-
EADDRINUSE
;
}
if
(
!
(
new
=
kmalloc
(
sizeof
(
struct
udsl_vcc_data
),
GFP_KERNEL
)))
{
dbg
(
"udsl_atm_open: no memory for vcc_data!"
);
up
(
&
instance
->
serialize
);
return
-
ENOMEM
;
}
...
...
@@ -907,7 +908,15 @@ static int udsl_atm_open (struct atm_vcc *vcc, short vpi, int vci)
new
->
vcc
=
vcc
;
new
->
vpi
=
vpi
;
new
->
vci
=
vci
;
new
->
max_pdu
=
max
(
1
,
UDSL_NUM_CELLS
(
vcc
->
qos
.
rxtp
.
max_sdu
))
*
ATM_CELL_PAYLOAD
;
/* udsl_extract_cells requires at least one cell */
max_pdu
=
max
(
1
,
UDSL_NUM_CELLS
(
vcc
->
qos
.
rxtp
.
max_sdu
))
*
ATM_CELL_PAYLOAD
;
if
(
!
(
new
->
sarb
=
alloc_skb
(
max_pdu
,
GFP_KERNEL
)))
{
dbg
(
"udsl_atm_open: no memory for SAR buffer!"
);
kfree
(
new
);
up
(
&
instance
->
serialize
);
return
-
ENOMEM
;
}
vcc
->
dev_data
=
new
;
vcc
->
vpi
=
vpi
;
...
...
@@ -925,7 +934,7 @@ static int udsl_atm_open (struct atm_vcc *vcc, short vpi, int vci)
tasklet_schedule
(
&
instance
->
receive_tasklet
);
dbg
(
"udsl_atm_open: allocated vcc data 0x%p (max_pdu: %u)"
,
new
,
new
->
max_pdu
);
dbg
(
"udsl_atm_open: allocated vcc data 0x%p (max_pdu: %u)"
,
new
,
max_pdu
);
return
0
;
}
...
...
@@ -952,9 +961,8 @@ static void udsl_atm_close (struct atm_vcc *vcc)
list_del
(
&
vcc_data
->
list
);
tasklet_enable
(
&
instance
->
receive_tasklet
);
if
(
vcc_data
->
skb
)
dev_kfree_skb
(
vcc_data
->
skb
);
vcc_data
->
skb
=
NULL
;
kfree_skb
(
vcc_data
->
sarb
);
vcc_data
->
sarb
=
NULL
;
kfree
(
vcc_data
);
vcc
->
dev_data
=
NULL
;
...
...
@@ -1216,7 +1224,7 @@ static void udsl_usb_disconnect (struct usb_interface *intf)
for
(
i
=
0
;
i
<
num_rcv_urbs
;
i
++
)
if
((
result
=
usb_unlink_urb
(
instance
->
receivers
[
i
].
urb
))
<
0
)
dbg
(
"udsl_usb_disconnect: usb_unlink_urb on receive urb %d returned %d"
,
i
,
result
);
dbg
(
"udsl_usb_disconnect: usb_unlink_urb on receive urb %d returned %d
!
"
,
i
,
result
);
/* wait for completion handlers to finish */
do
{
...
...
@@ -1252,7 +1260,7 @@ static void udsl_usb_disconnect (struct usb_interface *intf)
for
(
i
=
0
;
i
<
num_snd_urbs
;
i
++
)
if
((
result
=
usb_unlink_urb
(
instance
->
senders
[
i
].
urb
))
<
0
)
dbg
(
"udsl_usb_disconnect: usb_unlink_urb on send urb %d returned %d"
,
i
,
result
);
dbg
(
"udsl_usb_disconnect: usb_unlink_urb on send urb %d returned %d
!
"
,
i
,
result
);
/* wait for completion handlers to finish */
do
{
...
...
@@ -1298,11 +1306,9 @@ static void udsl_usb_disconnect (struct usb_interface *intf)
static
int
__init
udsl_usb_init
(
void
)
{
struct
sk_buff
*
skb
;
/* dummy for sizeof */
dbg
(
"udsl_usb_init: driver version "
DRIVER_VERSION
);
if
(
sizeof
(
struct
udsl_control
)
>
sizeof
(
skb
->
cb
))
{
if
(
sizeof
(
struct
udsl_control
)
>
sizeof
(
((
struct
sk_buff
*
)
0
)
->
cb
))
{
printk
(
KERN_ERR
__FILE__
": unusable with this kernel!
\n
"
);
return
-
EIO
;
}
...
...
drivers/usb/serial/keyspan.c
View file @
324b683a
This diff is collapsed.
Click to expand it.
drivers/usb/serial/keyspan.h
View file @
324b683a
...
...
@@ -82,6 +82,10 @@ static int keyspan_usa28_calc_baud (u32 baud_rate, u32 baudclk,
u8
*
rate_hi
,
u8
*
rate_low
,
u8
*
prescaler
,
int
portnum
);
static
int
keyspan_usa19hs_calc_baud
(
u32
baud_rate
,
u32
baudclk
,
u8
*
rate_hi
,
u8
*
rate_low
,
u8
*
prescaler
,
int
portnum
);
static
int
keyspan_usa28_send_setup
(
struct
usb_serial
*
serial
,
struct
usb_serial_port
*
port
,
int
reset_port
);
...
...
@@ -92,6 +96,9 @@ static int keyspan_usa49_send_setup (struct usb_serial *serial,
struct
usb_serial_port
*
port
,
int
reset_port
);
static
int
keyspan_usa90_send_setup
(
struct
usb_serial
*
serial
,
struct
usb_serial_port
*
port
,
int
reset_port
);
/* Struct used for firmware - increased size of data section
to allow Keyspan's 'C' firmware struct to be used unmodified */
...
...
@@ -183,6 +190,7 @@ struct ezusb_hex_record {
#define KEYSPAN_USA18X_BAUDCLK (12000000L)
/* a guess */
#define KEYSPAN_USA19_BAUDCLK (12000000L)
#define KEYSPAN_USA19W_BAUDCLK (24000000L)
#define KEYSPAN_USA19HS_BAUDCLK (14769231L)
#define KEYSPAN_USA28_BAUDCLK (1843200L)
#define KEYSPAN_USA28X_BAUDCLK (12000000L)
#define KEYSPAN_USA49W_BAUDCLK (48000000L)
...
...
@@ -215,6 +223,7 @@ struct ezusb_hex_record {
#define keyspan_usa18x_product_id 0x0112
#define keyspan_usa19_product_id 0x0107
#define keyspan_usa19qi_product_id 0x010c
#define keyspan_usa19hs_product_id 0x0121
#define keyspan_mpr_product_id 0x011c
#define keyspan_usa19qw_product_id 0x0119
#define keyspan_usa19w_product_id 0x0108
...
...
@@ -230,7 +239,7 @@ struct keyspan_device_details {
/* product ID value */
int
product_id
;
enum
{
msg_usa26
,
msg_usa28
,
msg_usa49
}
msg_format
;
enum
{
msg_usa26
,
msg_usa28
,
msg_usa49
,
msg_usa90
}
msg_format
;
/* Number of physical ports */
int
num_ports
;
...
...
@@ -349,6 +358,22 @@ static const struct keyspan_device_details usa19w_device_details = {
.
baudclk
=
KEYSPAN_USA19W_BAUDCLK
,
};
static
const
struct
keyspan_device_details
usa19hs_device_details
=
{
product_id:
keyspan_usa19hs_product_id
,
msg_format:
msg_usa90
,
num_ports:
1
,
indat_endp_flip:
0
,
outdat_endp_flip:
0
,
indat_endpoints:
{
0x81
},
outdat_endpoints:
{
0x01
},
inack_endpoints:
{
-
1
},
outcont_endpoints:
{
0x02
},
instat_endpoint:
0x82
,
glocont_endpoint:
-
1
,
calculate_baud_rate:
keyspan_usa19hs_calc_baud
,
baudclk:
KEYSPAN_USA19HS_BAUDCLK
,
};
static
const
struct
keyspan_device_details
usa28_device_details
=
{
.
product_id
=
keyspan_usa28_product_id
,
.
msg_format
=
msg_usa28
,
...
...
@@ -437,6 +462,7 @@ static const struct keyspan_device_details *keyspan_devices[] = {
&
usa19qi_device_details
,
&
usa19qw_device_details
,
&
usa19w_device_details
,
&
usa19hs_device_details
,
&
usa28_device_details
,
&
usa28x_device_details
,
&
usa28xa_device_details
,
...
...
@@ -464,6 +490,7 @@ static struct usb_device_id keyspan_ids_combined[] = {
{
USB_DEVICE
(
KEYSPAN_VENDOR_ID
,
keyspan_usa19w_product_id
)
},
{
USB_DEVICE
(
KEYSPAN_VENDOR_ID
,
keyspan_usa19qi_product_id
)
},
{
USB_DEVICE
(
KEYSPAN_VENDOR_ID
,
keyspan_usa19qw_product_id
)
},
{
USB_DEVICE
(
KEYSPAN_VENDOR_ID
,
keyspan_usa19hs_product_id
)
},
{
USB_DEVICE
(
KEYSPAN_VENDOR_ID
,
keyspan_mpr_product_id
)
},
{
USB_DEVICE
(
KEYSPAN_VENDOR_ID
,
keyspan_usa28_product_id
)
},
{
USB_DEVICE
(
KEYSPAN_VENDOR_ID
,
keyspan_usa28x_product_id
)
},
...
...
@@ -544,8 +571,8 @@ static struct usb_serial_device_type keyspan_1port_device = {
.
short_name
=
"keyspan_1"
,
.
id_table
=
keyspan_1port_ids
,
.
num_interrupt_in
=
NUM_DONT_CARE
,
.
num_bulk_in
=
3
,
.
num_bulk_out
=
4
,
.
num_bulk_in
=
NUM_DONT_CARE
,
.
num_bulk_out
=
NUM_DONT_CARE
,
.
num_ports
=
1
,
.
open
=
keyspan_open
,
.
close
=
keyspan_close
,
...
...
drivers/usb/serial/keyspan_usa26msg.h
View file @
324b683a
...
...
@@ -4,7 +4,7 @@
Copyright (C) 1998-2000 InnoSys Incorporated. All Rights Reserved
This file is available under a BSD-style copyright
Keyspan USB Async
Firmware to run on Anchor EZ-USB
Keyspan USB Async
Message Formats for the USA28X
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
...
...
@@ -19,11 +19,7 @@
This file is available under a BSD-style copyright
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of InnoSys Incorporated may not be used to endorse or promote
2. The name of InnoSys Incorporated may not be used to endorse or promote
products derived from this software without specific prior written
permission.
...
...
drivers/usb/serial/keyspan_usa28msg.h
View file @
324b683a
...
...
@@ -4,7 +4,7 @@
Copyright (C) 1998-2000 InnoSys Incorporated. All Rights Reserved
This file is available under a BSD-style copyright
Keyspan USB Async
Firmware to run on Anchor EZ-USB
Keyspan USB Async
Message Formats for the USA26X
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
...
...
@@ -19,11 +19,7 @@
This file is available under a BSD-style copyright
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of InnoSys Incorporated may not be used to endorse or promote
2. The name of InnoSys Incorporated may not be used to endorse or promote
products derived from this software without specific prior written
permission.
...
...
drivers/usb/serial/keyspan_usa49msg.h
View file @
324b683a
...
...
@@ -4,7 +4,7 @@
Copyright (C) 1998-2000 InnoSys Incorporated. All Rights Reserved
This file is available under a BSD-style copyright
Keyspan USB Async
Firmware to run on Anchor EZ-USB
Keyspan USB Async
Message Formats for the USA49W
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
...
...
@@ -19,11 +19,7 @@
This file is available under a BSD-style copyright
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of InnoSys Incorporated may not be used to endorse or promote
2. The name of InnoSys Incorporated may not be used to endorse or promote
products derived from this software without specific prior written
permission.
...
...
drivers/usb/serial/keyspan_usa90msg.h
0 → 100644
View file @
324b683a
/*
usa90msg.h
Copyright (c) 1998-2003 InnoSys Incorporated. All Rights Reserved
This file is available under a BSD-style copyright
Keyspan USB Async Message Formats for the USA19HS
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain this licence text
without modification, this list of conditions, and the following
disclaimer. The following copyright notice must appear immediately at
the beginning of all source files:
Copyright (c) 1998-2003 InnoSys Incorporated. All Rights Reserved
This file is available under a BSD-style copyright
2. The name of InnoSys Incorprated may not be used to endorse or promote
products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY INNOSYS CORP. ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
Revisions:
2003feb14 add setTxMode/txMode and cancelRxXoff to portControl
2003mar21 change name of PARITY_0/1 to add MARK/SPACE
*/
#ifndef __USA90MSG__
#define __USA90MSG__
struct
keyspan_usa90_portControlMessage
{
/*
there are three types of "commands" sent in the control message:
1. configuration changes which must be requested by setting
the corresponding "set" flag (and should only be requested
when necessary, to reduce overhead on the device):
*/
u8
setClocking
,
// host requests baud rate be set
baudLo
,
// host does baud divisor calculation
baudHi
,
// host does baud divisor calculation
setLcr
,
// host requests lcr be set
lcr
,
// use PARITY, STOPBITS, DATABITS below
setRxMode
,
// set receive mode
rxMode
,
// RXMODE_DMA or RXMODE_BYHAND
setTxMode
,
// set transmit mode
txMode
,
// TXMODE_DMA or TXMODE_BYHAND
setTxFlowControl
,
// host requests tx flow control be set
txFlowControl
,
// use TX_FLOW... bits below
setRxFlowControl
,
// host requests rx flow control be set
rxFlowControl
,
// use RX_FLOW... bits below
sendXoff
,
// host requests XOFF transmitted immediately
sendXon
,
// host requests XON char transmitted
xonChar
,
// specified in current character format
xoffChar
,
// specified in current character format
sendChar
,
// host requests char transmitted immediately
txChar
,
// character to send
setRts
,
// host requests RTS output be set
rts
,
// 1=on, 0=off
setDtr
,
// host requests DTR output be set
dtr
;
// 1=on, 0=off
/*
2. configuration data which is simply used as is
and must be specified correctly in every host message.
*/
u8
rxForwardingLength
,
// forward when this number of chars available
rxForwardingTimeout
,
// (1-31 in ms)
txAckSetting
;
// 0=don't ack, 1=normal, 2-255 TBD...
/*
3. Firmware states which cause actions if they change
and must be specified correctly in every host message.
*/
u8
portEnabled
,
// 0=disabled, 1=enabled
txFlush
,
// 0=normal, 1=toss outbound data
txBreak
,
// 0=break off, 1=break on
loopbackMode
;
// 0=no loopback, 1=loopback enabled
/*
4. commands which are flags only; these are processed in order
(so that, e.g., if rxFlush and rxForward flags are set, the
port will have no data to forward); any non-zero value
is respected
*/
u8
rxFlush
,
// toss inbound data
rxForward
,
// forward all inbound data, NOW (as if fwdLen==1)
cancelRxXoff
,
// cancel any receive XOFF state (_txXoff)
returnStatus
;
// return current status NOW
};
// defines for bits in lcr
#define USA_DATABITS_5 0x00
#define USA_DATABITS_6 0x01
#define USA_DATABITS_7 0x02
#define USA_DATABITS_8 0x03
#define STOPBITS_5678_1 0x00 // 1 stop bit for all byte sizes
#define STOPBITS_5_1p5 0x04 // 1.5 stop bits for 5-bit byte
#define STOPBITS_678_2 0x04 // 2 stop bits for 6-8 bit byte
#define USA_PARITY_NONE 0x00
#define USA_PARITY_ODD 0x08
#define USA_PARITY_EVEN 0x18
#define PARITY_MARK_1 0x28 // force parity MARK
#define PARITY_SPACE_0 0x38 // force parity SPACE
#define TXFLOW_CTS 0x04
#define TXFLOW_DSR 0x08
#define TXFLOW_XOFF 0x01
#define TXFLOW_XOFF_ANY 0x02
#define TXFLOW_XOFF_BITS (TXFLOW_XOFF | TXFLOW_XOFF_ANY)
#define RXFLOW_XOFF 0x10
#define RXFLOW_RTS 0x20
#define RXFLOW_DTR 0x40
#define RXFLOW_DSR_SENSITIVITY 0x80
#define RXMODE_BYHAND 0x00
#define RXMODE_DMA 0x02
#define TXMODE_BYHAND 0x00
#define TXMODE_DMA 0x02
// all things called "StatusMessage" are sent on the status endpoint
struct
keyspan_usa90_portStatusMessage
{
u8
msr
,
// reports the actual MSR register
cts
,
// reports CTS pin
dcd
,
// reports DCD pin
dsr
,
// reports DSR pin
ri
,
// reports RI pin
_txXoff
,
// port is in XOFF state (we received XOFF)
rxBreak
,
// reports break state
rxOverrun
,
// count of overrun errors (since last reported)
rxParity
,
// count of parity errors (since last reported)
rxFrame
,
// count of frame errors (since last reported)
portState
,
// PORTSTATE_xxx bits (useful for debugging)
messageAck
,
// message acknowledgement
charAck
,
// character acknowledgement
controlResponse
;
// (value = returnStatus) a control message has been processed
};
// bits in RX data message when STAT byte is included
#define RXERROR_OVERRUN 0x02
#define RXERROR_PARITY 0x04
#define RXERROR_FRAMING 0x08
#define RXERROR_BREAK 0x10
#define PORTSTATE_ENABLED 0x80
#define PORTSTATE_TXFLUSH 0x01
#define PORTSTATE_TXBREAK 0x02
#define PORTSTATE_LOOPBACK 0x04
// MSR bits
#define MSR_dCTS 0x01 // CTS has changed since last report
#define MSR_dDSR 0x02
#define MSR_dRI 0x04
#define MSR_dDCD 0x08
#define MSR_CTS 0x10 // current state of CTS
#define MSR_DSR 0x20
#define MSR_RI 0x40
#define MSR_DCD 0x80
// ie: the maximum length of an endpoint buffer
#define MAX_DATA_LEN 64
#endif
drivers/usb/storage/freecom.c
View file @
324b683a
...
...
@@ -102,6 +102,7 @@ struct freecom_status {
/* All packets (except for status) are 64 bytes long. */
#define FCM_PACKET_LENGTH 64
#define FCM_STATUS_PACKET_LENGTH 4
static
int
freecom_readdata
(
Scsi_Cmnd
*
srb
,
struct
us_data
*
us
,
...
...
@@ -216,7 +217,7 @@ int freecom_transport(Scsi_Cmnd *srb, struct us_data *us)
/* There are times we can optimize out this status read, but it
* doesn't hurt us to always do it now. */
result
=
usb_stor_bulk_transfer_buf
(
us
,
ipipe
,
fst
,
FCM_PACKET_LENGTH
,
&
partial
);
FCM_
STATUS_
PACKET_LENGTH
,
&
partial
);
US_DEBUGP
(
"foo Status result %d %u
\n
"
,
result
,
partial
);
if
(
result
!=
USB_STOR_XFER_GOOD
)
return
USB_STOR_TRANSPORT_ERROR
;
...
...
@@ -256,10 +257,10 @@ int freecom_transport(Scsi_Cmnd *srb, struct us_data *us)
/* get the data */
result
=
usb_stor_bulk_transfer_buf
(
us
,
ipipe
,
fst
,
FCM_PACKET_LENGTH
,
&
partial
);
FCM_
STATUS_
PACKET_LENGTH
,
&
partial
);
US_DEBUGP
(
"bar Status result %d %u
\n
"
,
result
,
partial
);
if
(
result
>
USB_STOR_XFER_SHORT
)
if
(
result
!=
USB_STOR_XFER_GOOD
)
return
USB_STOR_TRANSPORT_ERROR
;
US_DEBUG
(
pdump
((
void
*
)
fst
,
partial
));
...
...
@@ -302,6 +303,9 @@ int freecom_transport(Scsi_Cmnd *srb, struct us_data *us)
switch
(
us
->
srb
->
sc_data_direction
)
{
case
SCSI_DATA_READ
:
/* catch bogus "read 0 length" case */
if
(
!
length
)
break
;
/* Make sure that the status indicates that the device
* wants data as well. */
if
((
fst
->
Status
&
DRQ_STAT
)
==
0
||
(
fst
->
Reason
&
3
)
!=
2
)
{
...
...
@@ -331,6 +335,9 @@ int freecom_transport(Scsi_Cmnd *srb, struct us_data *us)
break
;
case
SCSI_DATA_WRITE
:
/* catch bogus "write 0 length" case */
if
(
!
length
)
break
;
/* Make sure the status indicates that the device wants to
* send us data. */
/* !!IMPLEMENT!! */
...
...
@@ -362,6 +369,7 @@ int freecom_transport(Scsi_Cmnd *srb, struct us_data *us)
break
;
default:
/* should never hit here -- filtered in usb.c */
US_DEBUGP
(
"freecom unimplemented direction: %d
\n
"
,
us
->
srb
->
sc_data_direction
);
// Return fail, SCSI seems to handle this better.
...
...
drivers/usb/storage/unusual_devs.h
View file @
324b683a
...
...
@@ -394,6 +394,12 @@ UNUSUAL_DEV( 0x0686, 0x4011, 0x0001, 0x0001,
"Dimage F300"
,
US_SC_SCSI
,
US_PR_BULK
,
NULL
,
0
),
/* Reported by Miguel A. Fosas <amn3s1a@ono.com> */
UNUSUAL_DEV
(
0x0686
,
0x4017
,
0x0001
,
0x0001
,
"Minolta"
,
"DIMAGE E223"
,
US_SC_SCSI
,
US_PR_DEVICE
,
NULL
,
0
),
UNUSUAL_DEV
(
0x0693
,
0x0002
,
0x0100
,
0x0100
,
"Hagiwara"
,
"FlashGate SmartMedia"
,
...
...
@@ -542,7 +548,7 @@ UNUSUAL_DEV( 0x07c4, 0xa400, 0x0000, 0xffff,
* - They don't like the INQUIRY command. So we must handle this command
* of the SCSI layer ourselves.
*/
UNUSUAL_DEV
(
0x07cf
,
0x1001
,
0x1000
,
0x
9
009
,
UNUSUAL_DEV
(
0x07cf
,
0x1001
,
0x1000
,
0x
5
009
,
"Casio"
,
"QV DigitalCamera"
,
US_SC_8070
,
US_PR_CB
,
NULL
,
...
...
include/asm-i386/elf.h
View file @
324b683a
...
...
@@ -157,7 +157,10 @@ do { \
for (i = 0; i < VSYSCALL_EHDR->e_phnum; ++i) { \
struct elf_phdr phdr = vsyscall_phdrs[i]; \
if (phdr.p_type == PT_LOAD) { \
BUG_ON(ofs != 0); \
ofs = phdr.p_offset = offset; \
phdr.p_memsz = PAGE_ALIGN(phdr.p_memsz); \
phdr.p_filesz = phdr.p_memsz; \
offset += phdr.p_filesz; \
} \
else \
...
...
@@ -175,7 +178,7 @@ do { \
for (i = 0; i < VSYSCALL_EHDR->e_phnum; ++i) { \
if (vsyscall_phdrs[i].p_type == PT_LOAD) \
DUMP_WRITE((void *) vsyscall_phdrs[i].p_vaddr, \
vsyscall_phdrs[i].p_filesz);
\
PAGE_ALIGN(vsyscall_phdrs[i].p_memsz));
\
} \
} while (0)
...
...
include/asm-ia64/elf.h
View file @
324b683a
...
...
@@ -206,42 +206,46 @@ do { \
NEW_AUX_ENT(AT_SYSINFO_EHDR, (unsigned long) GATE_EHDR); \
} while (0)
/*
* These macros parameterize elf_core_dump in fs/binfmt_elf.c to write out extra segments
* containing the gate DSO contents. Dumping its contents makes post-mortem fully
* interpretable later without matching up the same kernel and hardware config to see what
* IP values meant. Dumping its extra ELF program headers includes all the other
* information a debugger needs to easily find how the gate DSO was being used.
* These macros parameterize elf_core_dump in fs/binfmt_elf.c to write out
* extra segments containing the gate DSO contents. Dumping its
* contents makes post-mortem fully interpretable later without matching up
* the same kernel and hardware config to see what PC values meant.
* Dumping its extra ELF program headers includes all the other information
* a debugger needs to easily find how the gate DSO was being used.
*/
#define ELF_CORE_EXTRA_PHDRS (GATE_EHDR->e_phnum)
#define ELF_CORE_WRITE_EXTRA_PHDRS \
do { \
const struct elf_phdr *const
gate_phdrs =
\
const struct elf_phdr *const
vsyscall_phdrs =
\
(const struct elf_phdr *) (GATE_ADDR + GATE_EHDR->e_phoff); \
int i; \
Elf
64_Off ofs = 0;
\
Elf
32_Off ofs = 0;
\
for (i = 0; i < GATE_EHDR->e_phnum; ++i) { \
struct elf_phdr phdr =
gate_phdrs[i];
\
struct elf_phdr phdr =
vsyscall_phdrs[i];
\
if (phdr.p_type == PT_LOAD) { \
BUG_ON(ofs != 0); \
ofs = phdr.p_offset = offset; \
phdr.p_memsz = PAGE_ALIGN(phdr.p_memsz); \
phdr.p_filesz = phdr.p_memsz; \
offset += phdr.p_filesz; \
} else \
} \
else \
phdr.p_offset += ofs; \
phdr.p_paddr = 0;
/* match other core phdrs */
\
DUMP_WRITE(&phdr, sizeof(phdr)); \
} \
} while (0)
#define ELF_CORE_WRITE_EXTRA_DATA \
do { \
const struct elf_phdr *const gate_phdrs = \
(const struct elf_phdr *) (GATE_ADDR \
+ GATE_EHDR->e_phoff); \
const struct elf_phdr *const vsyscall_phdrs = \
(const struct elf_phdr *) (GATE_ADDR + GATE_EHDR->e_phoff); \
int i; \
for (i = 0; i < GATE_EHDR->e_phnum; ++i) { \
if (
gate_phdrs[i].p_type == PT_LOAD)
\
DUMP_WRITE((void *)
gate_phdrs[i].p_vaddr,
\
gate_phdrs[i].p_filesz);
\
if (
vsyscall_phdrs[i].p_type == PT_LOAD)
\
DUMP_WRITE((void *)
vsyscall_phdrs[i].p_vaddr,
\
PAGE_ALIGN(vsyscall_phdrs[i].p_memsz));
\
} \
} while (0)
...
...
include/linux/usb.h
View file @
324b683a
...
...
@@ -1038,9 +1038,9 @@ void usb_show_string(struct usb_device *dev, char *id, int index);
#define dbg(format, arg...) do {} while (0)
#endif
#define err(format, arg...) printk(KERN_ERR
__FILE__ ": " format "\n"
, ## arg)
#define info(format, arg...) printk(KERN_INFO
__FILE__ ": " format "\n"
, ## arg)
#define warn(format, arg...) printk(KERN_WARNING
__FILE__ ": " format "\n"
, ## arg)
#define err(format, arg...) printk(KERN_ERR
"%s: " format "\n" , __FILE__
, ## arg)
#define info(format, arg...) printk(KERN_INFO
"%s: " format "\n" , __FILE__
, ## arg)
#define warn(format, arg...) printk(KERN_WARNING
"%s: " format "\n" , __FILE__
, ## arg)
#endif
/* __KERNEL__ */
...
...
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