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
6f6d2400
Commit
6f6d2400
authored
Nov 23, 2007
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Linux 2.4.0-test9pre4
- continued SCSI cleanup - more USB updates
parent
64214d62
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
73 additions
and
49 deletions
+73
-49
arch/i386/kernel/bluesmoke.c
arch/i386/kernel/bluesmoke.c
+3
-1
drivers/media/video/cpia_usb.c
drivers/media/video/cpia_usb.c
+17
-7
drivers/pci/proc.c
drivers/pci/proc.c
+2
-2
drivers/scsi/Makefile
drivers/scsi/Makefile
+1
-1
drivers/scsi/hosts.c
drivers/scsi/hosts.c
+4
-4
drivers/scsi/hosts.h
drivers/scsi/hosts.h
+0
-1
drivers/scsi/scsi.c
drivers/scsi/scsi.c
+16
-26
drivers/usb/hid.c
drivers/usb/hid.c
+4
-2
drivers/usb/microtek.c
drivers/usb/microtek.c
+26
-5
No files found.
arch/i386/kernel/bluesmoke.c
View file @
6f6d2400
...
@@ -37,7 +37,7 @@ void mcheck_fault(void)
...
@@ -37,7 +37,7 @@ void mcheck_fault(void)
high
&=~
(
1
<<
31
);
high
&=~
(
1
<<
31
);
if
(
high
&
(
1
<<
27
))
if
(
high
&
(
1
<<
27
))
{
{
rdmsr
(
0x40
2
+
i
*
4
,
alow
,
ahigh
);
rdmsr
(
0x40
3
+
i
*
4
,
alow
,
ahigh
);
printk
(
"[%08x%08x]"
,
alow
,
ahigh
);
printk
(
"[%08x%08x]"
,
alow
,
ahigh
);
}
}
if
(
high
&
(
1
<<
26
))
if
(
high
&
(
1
<<
26
))
...
@@ -47,6 +47,8 @@ void mcheck_fault(void)
...
@@ -47,6 +47,8 @@ void mcheck_fault(void)
high
,
low
);
high
,
low
);
}
}
wrmsr
(
0x401
+
i
*
4
,
low
,
high
);
wrmsr
(
0x401
+
i
*
4
,
low
,
high
);
/* Serialize */
mb
();
}
}
}
}
...
...
drivers/media/video/cpia_usb.c
View file @
6f6d2400
...
@@ -187,7 +187,7 @@ static int cpia_usb_open(void *privdata)
...
@@ -187,7 +187,7 @@ static int cpia_usb_open(void *privdata)
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
printk
(
KERN_ERR
"cpia_usb_open: usb_set_interface error (ret = %d)
\n
"
,
ret
);
printk
(
KERN_ERR
"cpia_usb_open: usb_set_interface error (ret = %d)
\n
"
,
ret
);
retval
=
-
EBUSY
;
retval
=
-
EBUSY
;
goto
error_
all
;
goto
error_
1
;
}
}
ucpia
->
buffers
[
0
]
->
status
=
FRAME_EMPTY
;
ucpia
->
buffers
[
0
]
->
status
=
FRAME_EMPTY
;
...
@@ -204,7 +204,7 @@ static int cpia_usb_open(void *privdata)
...
@@ -204,7 +204,7 @@ static int cpia_usb_open(void *privdata)
if
(
!
urb
)
{
if
(
!
urb
)
{
printk
(
KERN_ERR
"cpia_init_isoc: usb_alloc_urb 0
\n
"
);
printk
(
KERN_ERR
"cpia_init_isoc: usb_alloc_urb 0
\n
"
);
retval
=
-
ENOMEM
;
retval
=
-
ENOMEM
;
goto
error_
all
;
goto
error_
1
;
}
}
ucpia
->
sbuf
[
0
].
urb
=
urb
;
ucpia
->
sbuf
[
0
].
urb
=
urb
;
...
@@ -223,9 +223,9 @@ static int cpia_usb_open(void *privdata)
...
@@ -223,9 +223,9 @@ static int cpia_usb_open(void *privdata)
urb
=
usb_alloc_urb
(
FRAMES_PER_DESC
);
urb
=
usb_alloc_urb
(
FRAMES_PER_DESC
);
if
(
!
urb
)
{
if
(
!
urb
)
{
printk
(
KERN_ERR
"cpia_init_isoc: usb_alloc_urb
0
\n
"
);
printk
(
KERN_ERR
"cpia_init_isoc: usb_alloc_urb
1
\n
"
);
retval
=
-
ENOMEM
;
retval
=
-
ENOMEM
;
goto
error_
all
;
goto
error_
urb0
;
}
}
ucpia
->
sbuf
[
1
].
urb
=
urb
;
ucpia
->
sbuf
[
1
].
urb
=
urb
;
...
@@ -246,20 +246,30 @@ static int cpia_usb_open(void *privdata)
...
@@ -246,20 +246,30 @@ static int cpia_usb_open(void *privdata)
ucpia
->
sbuf
[
0
].
urb
->
next
=
ucpia
->
sbuf
[
1
].
urb
;
ucpia
->
sbuf
[
0
].
urb
->
next
=
ucpia
->
sbuf
[
1
].
urb
;
err
=
usb_submit_urb
(
ucpia
->
sbuf
[
0
].
urb
);
err
=
usb_submit_urb
(
ucpia
->
sbuf
[
0
].
urb
);
if
(
err
)
if
(
err
)
{
printk
(
KERN_ERR
"cpia_init_isoc: usb_submit_urb 0 ret %d
\n
"
,
printk
(
KERN_ERR
"cpia_init_isoc: usb_submit_urb 0 ret %d
\n
"
,
err
);
err
);
goto
error_urb1
;
}
err
=
usb_submit_urb
(
ucpia
->
sbuf
[
1
].
urb
);
err
=
usb_submit_urb
(
ucpia
->
sbuf
[
1
].
urb
);
if
(
err
)
if
(
err
)
{
printk
(
KERN_ERR
"cpia_init_isoc: usb_submit_urb 1 ret %d
\n
"
,
printk
(
KERN_ERR
"cpia_init_isoc: usb_submit_urb 1 ret %d
\n
"
,
err
);
err
);
goto
error_urb1
;
}
ucpia
->
streaming
=
1
;
ucpia
->
streaming
=
1
;
ucpia
->
open
=
1
;
ucpia
->
open
=
1
;
return
0
;
return
0
;
error_all:
error_urb1:
/* free urb 1 */
usb_free_urb
(
ucpia
->
sbuf
[
1
].
urb
);
error_urb0:
/* free urb 0 */
usb_free_urb
(
ucpia
->
sbuf
[
0
].
urb
);
error_1:
kfree
(
ucpia
->
sbuf
[
1
].
data
);
kfree
(
ucpia
->
sbuf
[
1
].
data
);
error_0:
error_0:
kfree
(
ucpia
->
sbuf
[
0
].
data
);
kfree
(
ucpia
->
sbuf
[
0
].
data
);
...
...
drivers/pci/proc.c
View file @
6f6d2400
...
@@ -46,8 +46,8 @@ proc_bus_pci_read(struct file *file, char *buf, size_t nbytes, loff_t *ppos)
...
@@ -46,8 +46,8 @@ proc_bus_pci_read(struct file *file, char *buf, size_t nbytes, loff_t *ppos)
const
struct
inode
*
ino
=
file
->
f_dentry
->
d_inode
;
const
struct
inode
*
ino
=
file
->
f_dentry
->
d_inode
;
const
struct
proc_dir_entry
*
dp
=
ino
->
u
.
generic_ip
;
const
struct
proc_dir_entry
*
dp
=
ino
->
u
.
generic_ip
;
struct
pci_dev
*
dev
=
dp
->
data
;
struct
pci_dev
*
dev
=
dp
->
data
;
int
pos
=
*
ppos
;
unsigned
int
pos
=
*
ppos
;
int
cnt
,
size
;
unsigned
int
cnt
,
size
;
/*
/*
* Normal users can read only the standardized portion of the
* Normal users can read only the standardized portion of the
...
...
drivers/scsi/Makefile
View file @
6f6d2400
...
@@ -137,7 +137,7 @@ obj-m := $(filter-out $(obj-y), $(obj-m))
...
@@ -137,7 +137,7 @@ obj-m := $(filter-out $(obj-y), $(obj-m))
int-m
:=
$(
filter-out
$
(
int-y
)
,
$
(
int-m
))
int-m
:=
$(
filter-out
$
(
int-y
)
,
$
(
int-m
))
# Take multi-part drivers out of obj-y and put components in.
# Take multi-part drivers out of obj-y and put components in.
#
obj-y := $(filter-out $(list-multi), $(obj-y)) $(int-y)
obj-y
:=
$(
filter-out
$
(
list-multi
)
,
$
(
obj-y
))
$
(
int-y
)
O_OBJS
:=
$(
filter-out
$
(
export-objs
)
,
$
(
obj-y
))
O_OBJS
:=
$(
filter-out
$
(
export-objs
)
,
$
(
obj-y
))
OX_OBJS
:=
$(
filter
$
(
export-objs
)
,
$
(
obj-y
))
OX_OBJS
:=
$(
filter
$
(
export-objs
)
,
$
(
obj-y
))
...
...
drivers/scsi/hosts.c
View file @
6f6d2400
...
@@ -147,12 +147,12 @@ struct Scsi_Host * scsi_register(Scsi_Host_Template * tpnt, int j){
...
@@ -147,12 +147,12 @@ struct Scsi_Host * scsi_register(Scsi_Host_Template * tpnt, int j){
hname
=
(
tpnt
->
proc_name
)
?
tpnt
->
proc_name
:
""
;
hname
=
(
tpnt
->
proc_name
)
?
tpnt
->
proc_name
:
""
;
hname_len
=
strlen
(
hname
);
hname_len
=
strlen
(
hname
);
for
(
shn
=
scsi_host_no_list
;
shn
;
shn
=
shn
->
next
)
{
for
(
shn
=
scsi_host_no_list
;
shn
;
shn
=
shn
->
next
)
{
if
(
!
(
shn
->
host_registered
)
&&
shn
->
loaded_as_module
&&
if
(
!
(
shn
->
host_registered
)
&&
(
hname_len
>
0
)
&&
(
0
==
strncmp
(
hname
,
shn
->
name
,
hname_len
)))
{
(
hname_len
>
0
)
&&
(
0
==
strncmp
(
hname
,
shn
->
name
,
hname_len
)))
{
flag_new
=
0
;
flag_new
=
0
;
retval
->
host_no
=
shn
->
host_no
;
retval
->
host_no
=
shn
->
host_no
;
shn
->
host_registered
=
1
;
shn
->
host_registered
=
1
;
shn
->
loaded_as_module
=
scsi_loadable_module_flag
;
shn
->
loaded_as_module
=
1
;
break
;
break
;
}
}
}
}
...
@@ -161,7 +161,7 @@ struct Scsi_Host * scsi_register(Scsi_Host_Template * tpnt, int j){
...
@@ -161,7 +161,7 @@ struct Scsi_Host * scsi_register(Scsi_Host_Template * tpnt, int j){
retval
->
host_failed
=
0
;
retval
->
host_failed
=
0
;
if
(
j
>
0xffff
)
panic
(
"Too many extra bytes requested
\n
"
);
if
(
j
>
0xffff
)
panic
(
"Too many extra bytes requested
\n
"
);
retval
->
extra_bytes
=
j
;
retval
->
extra_bytes
=
j
;
retval
->
loaded_as_module
=
scsi_loadable_module_flag
;
retval
->
loaded_as_module
=
1
;
if
(
flag_new
)
{
if
(
flag_new
)
{
shn
=
(
Scsi_Host_Name
*
)
kmalloc
(
sizeof
(
Scsi_Host_Name
),
GFP_ATOMIC
);
shn
=
(
Scsi_Host_Name
*
)
kmalloc
(
sizeof
(
Scsi_Host_Name
),
GFP_ATOMIC
);
shn
->
name
=
kmalloc
(
hname_len
+
1
,
GFP_ATOMIC
);
shn
->
name
=
kmalloc
(
hname_len
+
1
,
GFP_ATOMIC
);
...
@@ -170,7 +170,7 @@ struct Scsi_Host * scsi_register(Scsi_Host_Template * tpnt, int j){
...
@@ -170,7 +170,7 @@ struct Scsi_Host * scsi_register(Scsi_Host_Template * tpnt, int j){
shn
->
name
[
hname_len
]
=
0
;
shn
->
name
[
hname_len
]
=
0
;
shn
->
host_no
=
max_scsi_hosts
++
;
shn
->
host_no
=
max_scsi_hosts
++
;
shn
->
host_registered
=
1
;
shn
->
host_registered
=
1
;
shn
->
loaded_as_module
=
scsi_loadable_module_flag
;
shn
->
loaded_as_module
=
1
;
shn
->
next
=
NULL
;
shn
->
next
=
NULL
;
if
(
scsi_host_no_list
)
{
if
(
scsi_host_no_list
)
{
for
(
shn2
=
scsi_host_no_list
;
shn2
->
next
;
shn2
=
shn2
->
next
)
for
(
shn2
=
scsi_host_no_list
;
shn2
->
next
;
shn2
=
shn2
->
next
)
...
...
drivers/scsi/hosts.h
View file @
6f6d2400
...
@@ -459,7 +459,6 @@ extern void build_proc_dir_entries(Scsi_Host_Template *);
...
@@ -459,7 +459,6 @@ extern void build_proc_dir_entries(Scsi_Host_Template *);
extern
int
next_scsi_host
;
extern
int
next_scsi_host
;
extern
int
scsi_loadable_module_flag
;
unsigned
int
scsi_init
(
void
);
unsigned
int
scsi_init
(
void
);
extern
struct
Scsi_Host
*
scsi_register
(
Scsi_Host_Template
*
,
int
j
);
extern
struct
Scsi_Host
*
scsi_register
(
Scsi_Host_Template
*
,
int
j
);
extern
void
scsi_unregister
(
struct
Scsi_Host
*
i
);
extern
void
scsi_unregister
(
struct
Scsi_Host
*
i
);
...
...
drivers/scsi/scsi.c
View file @
6f6d2400
...
@@ -1375,8 +1375,6 @@ void scsi_finish_command(Scsi_Cmnd * SCpnt)
...
@@ -1375,8 +1375,6 @@ void scsi_finish_command(Scsi_Cmnd * SCpnt)
static
int
scsi_register_host
(
Scsi_Host_Template
*
);
static
int
scsi_register_host
(
Scsi_Host_Template
*
);
static
void
scsi_unregister_host
(
Scsi_Host_Template
*
);
static
void
scsi_unregister_host
(
Scsi_Host_Template
*
);
int
scsi_loadable_module_flag
;
/* Set after we scan builtin drivers */
/*
/*
* Function: scsi_release_commandblocks()
* Function: scsi_release_commandblocks()
*
*
...
@@ -1440,10 +1438,9 @@ void scsi_build_commandblocks(Scsi_Device * SDpnt)
...
@@ -1440,10 +1438,9 @@ void scsi_build_commandblocks(Scsi_Device * SDpnt)
kmalloc
(
sizeof
(
Scsi_Cmnd
),
kmalloc
(
sizeof
(
Scsi_Cmnd
),
GFP_ATOMIC
|
GFP_ATOMIC
|
(
host
->
unchecked_isa_dma
?
GFP_DMA
:
0
));
(
host
->
unchecked_isa_dma
?
GFP_DMA
:
0
));
memset
(
SCpnt
,
0
,
sizeof
(
Scsi_Cmnd
));
if
(
NULL
==
SCpnt
)
if
(
NULL
==
SCpnt
)
break
;
/* If not, the next line will oops ... */
break
;
/* If not, the next line will oops ... */
memset
(
&
SCpnt
->
eh_timeout
,
0
,
sizeof
(
SCpnt
->
eh_timeout
));
memset
(
SCpnt
,
0
,
sizeof
(
Scsi_Cmnd
));
SCpnt
->
host
=
host
;
SCpnt
->
host
=
host
;
SCpnt
->
device
=
SDpnt
;
SCpnt
->
device
=
SDpnt
;
SCpnt
->
target
=
SDpnt
->
id
;
SCpnt
->
target
=
SDpnt
->
id
;
...
@@ -1978,8 +1975,6 @@ static void scsi_unregister_host(Scsi_Host_Template * tpnt)
...
@@ -1978,8 +1975,6 @@ static void scsi_unregister_host(Scsi_Host_Template * tpnt)
struct
Scsi_Device_Template
*
sdtpnt
;
struct
Scsi_Device_Template
*
sdtpnt
;
struct
Scsi_Host
*
sh1
;
struct
Scsi_Host
*
sh1
;
struct
Scsi_Host
*
shpnt
;
struct
Scsi_Host
*
shpnt
;
Scsi_Host_Template
*
SHT
;
Scsi_Host_Template
*
SHTp
;
char
name
[
10
];
/* host_no>=10^9? I don't think so. */
char
name
[
10
];
/* host_no>=10^9? I don't think so. */
/*
/*
...
@@ -2115,7 +2110,7 @@ static void scsi_unregister_host(Scsi_Host_Template * tpnt)
...
@@ -2115,7 +2110,7 @@ static void scsi_unregister_host(Scsi_Host_Template * tpnt)
for
(
shpnt
=
scsi_hostlist
;
shpnt
;
shpnt
=
sh1
)
{
for
(
shpnt
=
scsi_hostlist
;
shpnt
;
shpnt
=
sh1
)
{
sh1
=
shpnt
->
next
;
sh1
=
shpnt
->
next
;
if
(
shpnt
->
hostt
!=
tpnt
||
!
shpnt
->
loaded_as_module
)
if
(
shpnt
->
hostt
!=
tpnt
)
continue
;
continue
;
pcount
=
next_scsi_host
;
pcount
=
next_scsi_host
;
/* Remove the /proc/scsi directory entry */
/* Remove the /proc/scsi directory entry */
...
@@ -2129,7 +2124,7 @@ static void scsi_unregister_host(Scsi_Host_Template * tpnt)
...
@@ -2129,7 +2124,7 @@ static void scsi_unregister_host(Scsi_Host_Template * tpnt)
* written host adapters.
* written host adapters.
*/
*/
if
(
shpnt
->
irq
)
if
(
shpnt
->
irq
)
free_irq
(
shpnt
->
irq
,
NULL
);
free_irq
(
shpnt
->
irq
,
NULL
);
if
(
shpnt
->
dma_channel
!=
0xff
)
if
(
shpnt
->
dma_channel
!=
0xff
)
free_dma
(
shpnt
->
dma_channel
);
free_dma
(
shpnt
->
dma_channel
);
if
(
shpnt
->
io_port
&&
shpnt
->
n_io_port
)
if
(
shpnt
->
io_port
&&
shpnt
->
n_io_port
)
...
@@ -2158,24 +2153,21 @@ static void scsi_unregister_host(Scsi_Host_Template * tpnt)
...
@@ -2158,24 +2153,21 @@ static void scsi_unregister_host(Scsi_Host_Template * tpnt)
(
scsi_memory_upper_value
-
scsi_init_memory_start
)
/
1024
);
(
scsi_memory_upper_value
-
scsi_init_memory_start
)
/
1024
);
#endif
#endif
/*
There were some hosts that were loaded at boot time, so we cannot
/*
Remove it from the linked list and /proc */
do any more than this */
if
(
tpnt
->
present
)
{
if
(
tpnt
->
present
)
Scsi_Host_Template
**
SHTp
=
&
scsi_hosts
;
return
;
Scsi_Host_Template
*
SHT
;
/* OK, this is the very last step. Remove this host adapter from the
while
((
SHT
=
*
SHTp
)
!=
NULL
)
{
linked list. */
if
(
SHT
==
tpnt
)
{
for
(
SHTp
=
NULL
,
SHT
=
scsi_hosts
;
SHT
;
SHTp
=
SHT
,
SHT
=
SHT
->
next
)
*
SHTp
=
SHT
->
next
;
if
(
SHT
==
tpnt
)
{
break
;
if
(
SHTp
)
}
SHTp
->
next
=
SHT
->
next
;
SHTp
=
&
SHT
->
next
;
else
scsi_hosts
=
SHT
->
next
;
SHT
->
next
=
NULL
;
break
;
}
}
/* Rebuild the /proc/scsi directory entries */
/* Rebuild the /proc/scsi directory entries */
remove_proc_entry
(
tpnt
->
proc_name
,
proc_scsi
);
remove_proc_entry
(
tpnt
->
proc_name
,
proc_scsi
);
}
MOD_DEC_USE_COUNT
;
MOD_DEC_USE_COUNT
;
}
}
...
@@ -2514,8 +2506,6 @@ static int __init init_scsi(void)
...
@@ -2514,8 +2506,6 @@ static int __init init_scsi(void)
generic
->
write_proc
=
proc_scsi_gen_write
;
generic
->
write_proc
=
proc_scsi_gen_write
;
#endif
#endif
scsi_loadable_module_flag
=
1
;
scsi_devfs_handle
=
devfs_mk_dir
(
NULL
,
"scsi"
,
NULL
);
scsi_devfs_handle
=
devfs_mk_dir
(
NULL
,
"scsi"
,
NULL
);
scsi_host_no_init
(
scsihosts
);
scsi_host_no_init
(
scsihosts
);
/*
/*
...
...
drivers/usb/hid.c
View file @
6f6d2400
/*
/*
* $Id: hid.c,v 1.1
4 2000/08/14 21:05:26
vojtech Exp $
* $Id: hid.c,v 1.1
6 2000/09/18 21:38:55
vojtech Exp $
*
*
* Copyright (c) 1999 Andreas Gal
* Copyright (c) 1999 Andreas Gal
* Copyright (c) 2000 Vojtech Pavlik
* Copyright (c) 2000 Vojtech Pavlik
...
@@ -924,6 +924,8 @@ static void hid_configure_usage(struct hid_device *device, struct hid_field *fie
...
@@ -924,6 +924,8 @@ static void hid_configure_usage(struct hid_device *device, struct hid_field *fie
usage
->
code
=
find_next_zero_bit
(
bit
,
max
+
1
,
usage
->
code
);
usage
->
code
=
find_next_zero_bit
(
bit
,
max
+
1
,
usage
->
code
);
}
}
if
(
usage
->
code
>
max
)
return
;
if
(
usage
->
type
==
EV_ABS
)
{
if
(
usage
->
type
==
EV_ABS
)
{
int
a
=
field
->
logical_minimum
;
int
a
=
field
->
logical_minimum
;
int
b
=
field
->
logical_maximum
;
int
b
=
field
->
logical_maximum
;
...
@@ -936,7 +938,7 @@ static void hid_configure_usage(struct hid_device *device, struct hid_field *fie
...
@@ -936,7 +938,7 @@ static void hid_configure_usage(struct hid_device *device, struct hid_field *fie
if
(
usage
->
hat
)
{
if
(
usage
->
hat
)
{
int
i
;
int
i
;
for
(
i
=
usage
->
code
;
i
<
usage
->
code
+
2
;
i
++
)
{
for
(
i
=
usage
->
code
;
i
<
usage
->
code
+
2
&&
i
<=
max
;
i
++
)
{
input
->
absmax
[
i
]
=
1
;
input
->
absmax
[
i
]
=
1
;
input
->
absmin
[
i
]
=
-
1
;
input
->
absmin
[
i
]
=
-
1
;
input
->
absfuzz
[
i
]
=
0
;
input
->
absfuzz
[
i
]
=
0
;
...
...
drivers/usb/microtek.c
View file @
6f6d2400
...
@@ -98,10 +98,12 @@
...
@@ -98,10 +98,12 @@
* 20000603 Version 0.2.1
* 20000603 Version 0.2.1
* 20000620 minor cosmetic changes
* 20000620 minor cosmetic changes
* 20000620 Version 0.2.2
* 20000620 Version 0.2.2
* 20000822 Hopefully fixed deadlock in mts_remove_nolock()
* 20000822 Hopefully fixed deadlock in mts_remove_nolock()
* 20000822 Fixed minor race in mts_transfer_cleanup()
* 20000822 Fixed minor race in mts_transfer_cleanup()
* 20000822 Fixed deadlock on submission error in queuecommand
* 20000822 Fixed deadlock on submission error in queuecommand
* 20000822 Version 0.2.3
* 20000822 Version 0.2.3
* 20000913 Reduced module size if debugging is off
* 20000913 Version 0.2.4
*/
*/
#include <linux/module.h>
#include <linux/module.h>
...
@@ -151,7 +153,7 @@ static struct usb_driver mts_usb_driver = {
...
@@ -151,7 +153,7 @@ static struct usb_driver mts_usb_driver = {
/* Internal driver stuff */
/* Internal driver stuff */
#define MTS_VERSION "0.2.
3
"
#define MTS_VERSION "0.2.
4
"
#define MTS_NAME "microtek usb (rev " MTS_VERSION "): "
#define MTS_NAME "microtek usb (rev " MTS_VERSION "): "
#define MTS_WARNING(x...) \
#define MTS_WARNING(x...) \
...
@@ -198,6 +200,8 @@ static struct usb_driver mts_usb_driver = {
...
@@ -198,6 +200,8 @@ static struct usb_driver mts_usb_driver = {
MTS_DEBUG_INT();\
MTS_DEBUG_INT();\
} while (0)
} while (0)
#ifdef MTS_DO_DEBUG
static
inline
void
mts_debug_dump
(
struct
mts_desc
*
desc
)
{
static
inline
void
mts_debug_dump
(
struct
mts_desc
*
desc
)
{
MTS_DEBUG
(
"desc at 0x%x: halted = %x%x, toggle = %x%x
\n
"
,
MTS_DEBUG
(
"desc at 0x%x: halted = %x%x, toggle = %x%x
\n
"
,
(
int
)
desc
,(
int
)
desc
->
usb_dev
->
halted
[
1
],(
int
)
desc
->
usb_dev
->
halted
[
0
],
(
int
)
desc
,(
int
)
desc
->
usb_dev
->
halted
[
1
],(
int
)
desc
->
usb_dev
->
halted
[
0
],
...
@@ -293,6 +297,23 @@ static inline void mts_show_command(Scsi_Cmnd *srb)
...
@@ -293,6 +297,23 @@ static inline void mts_show_command(Scsi_Cmnd *srb)
srb
->
cmnd
[
6
],
srb
->
cmnd
[
7
],
srb
->
cmnd
[
8
],
srb
->
cmnd
[
9
]);
srb
->
cmnd
[
6
],
srb
->
cmnd
[
7
],
srb
->
cmnd
[
8
],
srb
->
cmnd
[
9
]);
}
}
#else
static
inline
void
mts_show_command
(
Scsi_Cmnd
*
srb
)
{
while
(
0
)
{}
}
static
inline
void
mts_debug_dump
(
struct
mts_desc
*
desc
)
{
while
(
0
)
{}
}
#endif
static
inline
int
mts_is_aborting
(
struct
mts_desc
*
desc
)
{
static
inline
int
mts_is_aborting
(
struct
mts_desc
*
desc
)
{
return
(
atomic_read
(
&
desc
->
context
.
do_abort
));
return
(
atomic_read
(
&
desc
->
context
.
do_abort
));
}
}
...
...
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