Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
fa469929
Commit
fa469929
authored
Jun 12, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://bk.linux1394.org/ieee1394-2.6
into evo.osdl.org:/home/torvalds/v2.6/linux
parents
992d6a32
bbf1aca9
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
54 additions
and
22 deletions
+54
-22
drivers/ieee1394/csr1212.c
drivers/ieee1394/csr1212.c
+5
-1
drivers/ieee1394/csr1212.h
drivers/ieee1394/csr1212.h
+4
-2
drivers/ieee1394/eth1394.c
drivers/ieee1394/eth1394.c
+2
-2
drivers/ieee1394/highlevel.c
drivers/ieee1394/highlevel.c
+1
-1
drivers/ieee1394/hosts.c
drivers/ieee1394/hosts.c
+11
-11
drivers/ieee1394/hosts.h
drivers/ieee1394/hosts.h
+1
-1
drivers/ieee1394/ieee1394_core.c
drivers/ieee1394/ieee1394_core.c
+6
-0
drivers/ieee1394/nodemgr.c
drivers/ieee1394/nodemgr.c
+12
-2
drivers/ieee1394/ohci1394.c
drivers/ieee1394/ohci1394.c
+7
-1
drivers/ieee1394/sbp2.c
drivers/ieee1394/sbp2.c
+1
-1
drivers/ieee1394/video1394.c
drivers/ieee1394/video1394.c
+4
-0
No files found.
drivers/ieee1394/csr1212.c
View file @
fa469929
...
@@ -1061,6 +1061,10 @@ void csr1212_fill_cache(struct csr1212_csr_rom_cache *cache)
...
@@ -1061,6 +1061,10 @@ void csr1212_fill_cache(struct csr1212_csr_rom_cache *cache)
}
}
nkv
=
kv
->
next
;
nkv
=
kv
->
next
;
if
(
kv
->
prev
)
kv
->
prev
->
next
=
NULL
;
if
(
kv
->
next
)
kv
->
next
->
prev
=
NULL
;
kv
->
prev
=
NULL
;
kv
->
prev
=
NULL
;
kv
->
next
=
NULL
;
kv
->
next
=
NULL
;
}
}
...
@@ -1134,7 +1138,7 @@ int csr1212_generate_csr_image(struct csr1212_csr *csr)
...
@@ -1134,7 +1138,7 @@ int csr1212_generate_csr_image(struct csr1212_csr *csr)
/* Make sure the Extended ROM leaf is a multiple of
/* Make sure the Extended ROM leaf is a multiple of
* max_rom in size. */
* max_rom in size. */
leaf_size
=
(
cache
->
len
+
(
csr
->
max_rom
-
1
))
&
leaf_size
=
(
cache
->
len
+
(
csr
->
max_rom
-
1
))
&
(
csr
->
max_rom
-
1
);
~
(
csr
->
max_rom
-
1
);
/* Zero out the unused ROM region */
/* Zero out the unused ROM region */
memset
(
cache
->
data
+
bytes_to_quads
(
cache
->
len
),
0x00
,
memset
(
cache
->
data
+
bytes_to_quads
(
cache
->
len
),
0x00
,
...
...
drivers/ieee1394/csr1212.h
View file @
fa469929
...
@@ -38,9 +38,11 @@
...
@@ -38,9 +38,11 @@
#include <linux/slab.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/interrupt.h>
#include <linux/sched.h>
#include <linux/sched.h>
#include <linux/vmalloc.h>
#include <asm/pgalloc.h>
#define CSR1212_MALLOC(size)
kmalloc((size), in_interrupt() ? GFP_ATOMIC : GFP_KERNEL
)
#define CSR1212_MALLOC(size)
vmalloc((size)
)
#define CSR1212_FREE(ptr)
k
free(ptr)
#define CSR1212_FREE(ptr)
v
free(ptr)
#define CSR1212_BE16_TO_CPU(quad) be16_to_cpu(quad)
#define CSR1212_BE16_TO_CPU(quad) be16_to_cpu(quad)
#define CSR1212_CPU_TO_BE16(quad) cpu_to_be16(quad)
#define CSR1212_CPU_TO_BE16(quad) cpu_to_be16(quad)
#define CSR1212_BE32_TO_CPU(quad) be32_to_cpu(quad)
#define CSR1212_BE32_TO_CPU(quad) be32_to_cpu(quad)
...
...
drivers/ieee1394/eth1394.c
View file @
fa469929
...
@@ -89,7 +89,7 @@
...
@@ -89,7 +89,7 @@
#define TRACE() printk(KERN_ERR "%s:%s[%d] ---- TRACE\n", driver_name, __FUNCTION__, __LINE__)
#define TRACE() printk(KERN_ERR "%s:%s[%d] ---- TRACE\n", driver_name, __FUNCTION__, __LINE__)
static
char
version
[]
__devinitdata
=
static
char
version
[]
__devinitdata
=
"$Rev: 1
198
$ Ben Collins <bcollins@debian.org>"
;
"$Rev: 1
224
$ Ben Collins <bcollins@debian.org>"
;
struct
fragment_info
{
struct
fragment_info
{
struct
list_head
list
;
struct
list_head
list
;
...
@@ -1793,7 +1793,7 @@ static int ether1394_ethtool_ioctl(struct net_device *dev, void __user *useraddr
...
@@ -1793,7 +1793,7 @@ static int ether1394_ethtool_ioctl(struct net_device *dev, void __user *useraddr
case
ETHTOOL_GDRVINFO
:
{
case
ETHTOOL_GDRVINFO
:
{
struct
ethtool_drvinfo
info
=
{
ETHTOOL_GDRVINFO
};
struct
ethtool_drvinfo
info
=
{
ETHTOOL_GDRVINFO
};
strcpy
(
info
.
driver
,
driver_name
);
strcpy
(
info
.
driver
,
driver_name
);
strcpy
(
info
.
version
,
"$Rev: 1
198
$"
);
strcpy
(
info
.
version
,
"$Rev: 1
224
$"
);
/* FIXME XXX provide sane businfo */
/* FIXME XXX provide sane businfo */
strcpy
(
info
.
bus_info
,
"ieee1394"
);
strcpy
(
info
.
bus_info
,
"ieee1394"
);
if
(
copy_to_user
(
useraddr
,
&
info
,
sizeof
(
info
)))
if
(
copy_to_user
(
useraddr
,
&
info
,
sizeof
(
info
)))
...
...
drivers/ieee1394/highlevel.c
View file @
fa469929
...
@@ -383,7 +383,7 @@ u64 hpsb_allocate_and_register_addrspace(struct hpsb_highlevel *hl,
...
@@ -383,7 +383,7 @@ u64 hpsb_allocate_and_register_addrspace(struct hpsb_highlevel *hl,
a2sa
=
a2
->
start
&
align_mask
;
a2sa
=
a2
->
start
&
align_mask
;
a2ea
=
(
a2
->
end
+
alignment
-
1
)
&
align_mask
;
a2ea
=
(
a2
->
end
+
alignment
-
1
)
&
align_mask
;
if
((
a2sa
-
a1ea
>=
size
)
&&
(
a2sa
-
start
>=
size
)
&&
(
end
-
a1ea
>=
size
))
{
if
((
a2sa
-
a1ea
>=
size
)
&&
(
a2sa
-
start
>=
size
)
&&
(
a2sa
>
start
))
{
as
->
start
=
max
(
start
,
a1ea
);
as
->
start
=
max
(
start
,
a1ea
);
as
->
end
=
as
->
start
+
size
;
as
->
end
=
as
->
start
+
size
;
list_add
(
&
as
->
host_list
,
entry
);
list_add
(
&
as
->
host_list
,
entry
);
...
...
drivers/ieee1394/hosts.c
View file @
fa469929
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
#include "config_roms.h"
#include "config_roms.h"
static
void
delayed_reset_bus
(
unsigned
long
__reset_info
)
static
void
delayed_reset_bus
(
void
*
__reset_info
)
{
{
struct
hpsb_host
*
host
=
(
struct
hpsb_host
*
)
__reset_info
;
struct
hpsb_host
*
host
=
(
struct
hpsb_host
*
)
__reset_info
;
int
generation
=
host
->
csr
.
generation
+
1
;
int
generation
=
host
->
csr
.
generation
+
1
;
...
@@ -129,9 +129,6 @@ struct hpsb_host *hpsb_alloc_host(struct hpsb_host_driver *drv, size_t extra,
...
@@ -129,9 +129,6 @@ struct hpsb_host *hpsb_alloc_host(struct hpsb_host_driver *drv, size_t extra,
skb_queue_head_init
(
&
h
->
pending_packet_queue
);
skb_queue_head_init
(
&
h
->
pending_packet_queue
);
INIT_LIST_HEAD
(
&
h
->
addr_space
);
INIT_LIST_HEAD
(
&
h
->
addr_space
);
init_timer
(
&
h
->
delayed_reset
);
h
->
delayed_reset
.
function
=
delayed_reset_bus
;
h
->
delayed_reset
.
data
=
(
unsigned
long
)
h
;
for
(
i
=
2
;
i
<
16
;
i
++
)
for
(
i
=
2
;
i
<
16
;
i
++
)
h
->
csr
.
gen_timestamp
[
i
]
=
jiffies
-
60
*
HZ
;
h
->
csr
.
gen_timestamp
[
i
]
=
jiffies
-
60
*
HZ
;
...
@@ -140,6 +137,8 @@ struct hpsb_host *hpsb_alloc_host(struct hpsb_host_driver *drv, size_t extra,
...
@@ -140,6 +137,8 @@ struct hpsb_host *hpsb_alloc_host(struct hpsb_host_driver *drv, size_t extra,
atomic_set
(
&
h
->
generation
,
0
);
atomic_set
(
&
h
->
generation
,
0
);
INIT_WORK
(
&
h
->
delayed_reset
,
delayed_reset_bus
,
h
);
init_timer
(
&
h
->
timeout
);
init_timer
(
&
h
->
timeout
);
h
->
timeout
.
data
=
(
unsigned
long
)
h
;
h
->
timeout
.
data
=
(
unsigned
long
)
h
;
h
->
timeout
.
function
=
abort_timedouts
;
h
->
timeout
.
function
=
abort_timedouts
;
...
@@ -188,7 +187,8 @@ void hpsb_remove_host(struct hpsb_host *host)
...
@@ -188,7 +187,8 @@ void hpsb_remove_host(struct hpsb_host *host)
{
{
host
->
is_shutdown
=
1
;
host
->
is_shutdown
=
1
;
del_timer_sync
(
&
host
->
delayed_reset
);
cancel_delayed_work
(
&
host
->
delayed_reset
);
flush_scheduled_work
();
host
->
driver
=
&
dummy_driver
;
host
->
driver
=
&
dummy_driver
;
...
@@ -202,7 +202,7 @@ void hpsb_remove_host(struct hpsb_host *host)
...
@@ -202,7 +202,7 @@ void hpsb_remove_host(struct hpsb_host *host)
int
hpsb_update_config_rom_image
(
struct
hpsb_host
*
host
)
int
hpsb_update_config_rom_image
(
struct
hpsb_host
*
host
)
{
{
unsigned
long
reset_
time
;
unsigned
long
reset_
delay
;
int
next_gen
=
host
->
csr
.
generation
+
1
;
int
next_gen
=
host
->
csr
.
generation
+
1
;
if
(
!
host
->
update_config_rom
)
if
(
!
host
->
update_config_rom
)
...
@@ -213,21 +213,21 @@ int hpsb_update_config_rom_image(struct hpsb_host *host)
...
@@ -213,21 +213,21 @@ int hpsb_update_config_rom_image(struct hpsb_host *host)
/* Stop the delayed interrupt, we're about to change the config rom and
/* Stop the delayed interrupt, we're about to change the config rom and
* it would be a waste to do a bus reset twice. */
* it would be a waste to do a bus reset twice. */
del_timer_sync
(
&
host
->
delayed_reset
);
cancel_delayed_work
(
&
host
->
delayed_reset
);
/* IEEE 1394a-2000 prohibits using the same generation number
/* IEEE 1394a-2000 prohibits using the same generation number
* twice in a 60 second period. */
* twice in a 60 second period. */
if
(
jiffies
-
host
->
csr
.
gen_timestamp
[
next_gen
]
<
60
*
HZ
)
if
(
jiffies
-
host
->
csr
.
gen_timestamp
[
next_gen
]
<
60
*
HZ
)
/* Wait 60 seconds from the last time this generation number was
/* Wait 60 seconds from the last time this generation number was
* used. */
* used. */
reset_
time
=
(
60
*
HZ
)
+
host
->
csr
.
gen_timestamp
[
next_gen
]
;
reset_
delay
=
(
60
*
HZ
)
+
host
->
csr
.
gen_timestamp
[
next_gen
]
-
jiffies
;
else
else
/* Wait 1 second in case some other code wants to change the
/* Wait 1 second in case some other code wants to change the
* Config ROM in the near future. */
* Config ROM in the near future. */
reset_
time
=
jiffies
+
HZ
;
reset_
delay
=
HZ
;
/* This will add the timer as well as modify it */
PREPARE_WORK
(
&
host
->
delayed_reset
,
delayed_reset_bus
,
host
);
mod_timer
(
&
host
->
delayed_reset
,
reset_time
);
schedule_delayed_work
(
&
host
->
delayed_reset
,
reset_delay
);
return
0
;
return
0
;
}
}
drivers/ieee1394/hosts.h
View file @
fa469929
...
@@ -66,7 +66,7 @@ struct hpsb_host {
...
@@ -66,7 +66,7 @@ struct hpsb_host {
struct
class_device
class_dev
;
struct
class_device
class_dev
;
int
update_config_rom
;
int
update_config_rom
;
struct
timer_lis
t
delayed_reset
;
struct
work_struc
t
delayed_reset
;
unsigned
int
config_roms
;
unsigned
int
config_roms
;
...
...
drivers/ieee1394/ieee1394_core.c
View file @
fa469929
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
#include <linux/bitops.h>
#include <linux/bitops.h>
#include <linux/kdev_t.h>
#include <linux/kdev_t.h>
#include <linux/skbuff.h>
#include <linux/skbuff.h>
#include <linux/suspend.h>
#include <asm/byteorder.h>
#include <asm/byteorder.h>
#include <asm/semaphore.h>
#include <asm/semaphore.h>
...
@@ -1033,6 +1034,11 @@ static int hpsbpkt_thread(void *__hi)
...
@@ -1033,6 +1034,11 @@ static int hpsbpkt_thread(void *__hi)
if
(
khpsbpkt_kill
)
if
(
khpsbpkt_kill
)
break
;
break
;
if
(
current
->
flags
&
PF_FREEZE
)
{
refrigerator
(
0
);
continue
;
}
while
((
skb
=
skb_dequeue
(
&
hpsbpkt_queue
))
!=
NULL
)
{
while
((
skb
=
skb_dequeue
(
&
hpsbpkt_queue
))
!=
NULL
)
{
packet
=
(
struct
hpsb_packet
*
)
skb
->
data
;
packet
=
(
struct
hpsb_packet
*
)
skb
->
data
;
...
...
drivers/ieee1394/nodemgr.c
View file @
fa469929
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
#include <linux/delay.h>
#include <linux/delay.h>
#include <linux/pci.h>
#include <linux/pci.h>
#include <linux/moduleparam.h>
#include <linux/moduleparam.h>
#include <linux/suspend.h>
#include <asm/atomic.h>
#include <asm/atomic.h>
#include "ieee1394_types.h"
#include "ieee1394_types.h"
...
@@ -1474,11 +1475,20 @@ static int nodemgr_host_thread(void *__hi)
...
@@ -1474,11 +1475,20 @@ static int nodemgr_host_thread(void *__hi)
/* Sit and wait for a signal to probe the nodes on the bus. This
/* Sit and wait for a signal to probe the nodes on the bus. This
* happens when we get a bus reset. */
* happens when we get a bus reset. */
while
(
!
down_interruptible
(
&
hi
->
reset_sem
)
&&
while
(
1
)
{
!
down_interruptible
(
&
nodemgr_serialize
))
{
unsigned
int
generation
=
0
;
unsigned
int
generation
=
0
;
int
i
;
int
i
;
if
(
down_interruptible
(
&
hi
->
reset_sem
)
||
down_interruptible
(
&
nodemgr_serialize
))
{
if
(
current
->
flags
&
PF_FREEZE
)
{
refrigerator
(
0
);
continue
;
}
printk
(
"NodeMgr: received unexpected signal?!
\n
"
);
break
;
}
if
(
hi
->
kill_me
)
if
(
hi
->
kill_me
)
break
;
break
;
...
...
drivers/ieee1394/ohci1394.c
View file @
fa469929
...
@@ -162,7 +162,7 @@ printk(level "%s: " fmt "\n" , OHCI1394_DRIVER_NAME , ## args)
...
@@ -162,7 +162,7 @@ printk(level "%s: " fmt "\n" , OHCI1394_DRIVER_NAME , ## args)
printk(level "%s: fw-host%d: " fmt "\n" , OHCI1394_DRIVER_NAME, ohci->host->id , ## args)
printk(level "%s: fw-host%d: " fmt "\n" , OHCI1394_DRIVER_NAME, ohci->host->id , ## args)
static
char
version
[]
__devinitdata
=
static
char
version
[]
__devinitdata
=
"$Rev: 12
0
3 $ Ben Collins <bcollins@debian.org>"
;
"$Rev: 12
2
3 $ Ben Collins <bcollins@debian.org>"
;
/* Module Parameters */
/* Module Parameters */
static
int
phys_dma
=
1
;
static
int
phys_dma
=
1
;
...
@@ -516,6 +516,12 @@ static void ohci_initialize(struct ti_ohci *ohci)
...
@@ -516,6 +516,12 @@ static void ohci_initialize(struct ti_ohci *ohci)
ohci
->
max_packet_size
=
ohci
->
max_packet_size
=
1
<<
(((
reg_read
(
ohci
,
OHCI1394_BusOptions
)
>>
12
)
&
0xf
)
+
1
);
1
<<
(((
reg_read
(
ohci
,
OHCI1394_BusOptions
)
>>
12
)
&
0xf
)
+
1
);
if
(
ohci
->
max_packet_size
<
512
)
{
HPSB_WARNING
(
"warning: Invalid max packet size of %d, setting to 512"
,
ohci
->
max_packet_size
);
ohci
->
max_packet_size
=
512
;
}
/* Don't accept phy packets into AR request context */
/* Don't accept phy packets into AR request context */
reg_write
(
ohci
,
OHCI1394_LinkControlClear
,
0x00000400
);
reg_write
(
ohci
,
OHCI1394_LinkControlClear
,
0x00000400
);
...
...
drivers/ieee1394/sbp2.c
View file @
fa469929
...
@@ -78,7 +78,7 @@
...
@@ -78,7 +78,7 @@
#include "sbp2.h"
#include "sbp2.h"
static
char
version
[]
__devinitdata
=
static
char
version
[]
__devinitdata
=
"$Rev: 12
05
$ Ben Collins <bcollins@debian.org>"
;
"$Rev: 12
19
$ Ben Collins <bcollins@debian.org>"
;
/*
/*
* Module load parameter definitions
* Module load parameter definitions
...
...
drivers/ieee1394/video1394.c
View file @
fa469929
...
@@ -864,6 +864,7 @@ static int video1394_ioctl(struct inode *inode, struct file *file,
...
@@ -864,6 +864,7 @@ static int video1394_ioctl(struct inode *inode, struct file *file,
return
-
EFAULT
;
return
-
EFAULT
;
d
=
find_ctx
(
&
ctx
->
context_list
,
OHCI_ISO_RECEIVE
,
v
.
channel
);
d
=
find_ctx
(
&
ctx
->
context_list
,
OHCI_ISO_RECEIVE
,
v
.
channel
);
if
(
d
==
NULL
)
return
-
EFAULT
;
if
((
v
.
buffer
<
0
)
||
(
v
.
buffer
>
d
->
num_desc
))
{
if
((
v
.
buffer
<
0
)
||
(
v
.
buffer
>
d
->
num_desc
))
{
PRINT
(
KERN_ERR
,
ohci
->
host
->
id
,
PRINT
(
KERN_ERR
,
ohci
->
host
->
id
,
...
@@ -926,6 +927,7 @@ static int video1394_ioctl(struct inode *inode, struct file *file,
...
@@ -926,6 +927,7 @@ static int video1394_ioctl(struct inode *inode, struct file *file,
return
-
EFAULT
;
return
-
EFAULT
;
d
=
find_ctx
(
&
ctx
->
context_list
,
OHCI_ISO_RECEIVE
,
v
.
channel
);
d
=
find_ctx
(
&
ctx
->
context_list
,
OHCI_ISO_RECEIVE
,
v
.
channel
);
if
(
d
==
NULL
)
return
-
EFAULT
;
if
((
v
.
buffer
<
0
)
||
(
v
.
buffer
>
d
->
num_desc
))
{
if
((
v
.
buffer
<
0
)
||
(
v
.
buffer
>
d
->
num_desc
))
{
PRINT
(
KERN_ERR
,
ohci
->
host
->
id
,
PRINT
(
KERN_ERR
,
ohci
->
host
->
id
,
...
@@ -1009,6 +1011,7 @@ static int video1394_ioctl(struct inode *inode, struct file *file,
...
@@ -1009,6 +1011,7 @@ static int video1394_ioctl(struct inode *inode, struct file *file,
return
-
EFAULT
;
return
-
EFAULT
;
d
=
find_ctx
(
&
ctx
->
context_list
,
OHCI_ISO_TRANSMIT
,
v
.
channel
);
d
=
find_ctx
(
&
ctx
->
context_list
,
OHCI_ISO_TRANSMIT
,
v
.
channel
);
if
(
d
==
NULL
)
return
-
EFAULT
;
if
((
v
.
buffer
<
0
)
||
(
v
.
buffer
>
d
->
num_desc
))
{
if
((
v
.
buffer
<
0
)
||
(
v
.
buffer
>
d
->
num_desc
))
{
PRINT
(
KERN_ERR
,
ohci
->
host
->
id
,
PRINT
(
KERN_ERR
,
ohci
->
host
->
id
,
...
@@ -1112,6 +1115,7 @@ static int video1394_ioctl(struct inode *inode, struct file *file,
...
@@ -1112,6 +1115,7 @@ static int video1394_ioctl(struct inode *inode, struct file *file,
return
-
EFAULT
;
return
-
EFAULT
;
d
=
find_ctx
(
&
ctx
->
context_list
,
OHCI_ISO_TRANSMIT
,
v
.
channel
);
d
=
find_ctx
(
&
ctx
->
context_list
,
OHCI_ISO_TRANSMIT
,
v
.
channel
);
if
(
d
==
NULL
)
return
-
EFAULT
;
if
((
v
.
buffer
<
0
)
||
(
v
.
buffer
>
d
->
num_desc
))
{
if
((
v
.
buffer
<
0
)
||
(
v
.
buffer
>
d
->
num_desc
))
{
PRINT
(
KERN_ERR
,
ohci
->
host
->
id
,
PRINT
(
KERN_ERR
,
ohci
->
host
->
id
,
...
...
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