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
9aa6f26c
Commit
9aa6f26c
authored
Aug 06, 2003
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Plain Diff
Merge samba.org:/scratch/anton/linux-2.5
into samba.org:/scratch/anton/tmp3
parents
f822bff7
a59a6ac5
Changes
23
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
104 additions
and
77 deletions
+104
-77
arch/mips/kernel/linux32.c
arch/mips/kernel/linux32.c
+1
-0
arch/parisc/kernel/sys_parisc32.c
arch/parisc/kernel/sys_parisc32.c
+1
-0
arch/ppc64/kernel/sys_ppc32.c
arch/ppc64/kernel/sys_ppc32.c
+1
-0
arch/s390/kernel/compat_linux.c
arch/s390/kernel/compat_linux.c
+1
-0
drivers/block/as-iosched.c
drivers/block/as-iosched.c
+1
-1
drivers/ieee1394/cmp.c
drivers/ieee1394/cmp.c
+1
-1
drivers/ieee1394/csr.c
drivers/ieee1394/csr.c
+5
-4
drivers/ieee1394/eth1394.c
drivers/ieee1394/eth1394.c
+5
-5
drivers/ieee1394/eth1394.h
drivers/ieee1394/eth1394.h
+3
-3
drivers/ieee1394/highlevel.c
drivers/ieee1394/highlevel.c
+2
-2
drivers/ieee1394/highlevel.h
drivers/ieee1394/highlevel.h
+6
-6
drivers/ieee1394/ieee1394_core.c
drivers/ieee1394/ieee1394_core.c
+5
-5
drivers/ieee1394/ieee1394_transactions.c
drivers/ieee1394/ieee1394_transactions.c
+18
-20
drivers/ieee1394/ieee1394_transactions.h
drivers/ieee1394/ieee1394_transactions.h
+1
-1
drivers/ieee1394/ieee1394_types.h
drivers/ieee1394/ieee1394_types.h
+1
-6
drivers/ieee1394/nodemgr.c
drivers/ieee1394/nodemgr.c
+1
-1
drivers/ieee1394/ohci1394.c
drivers/ieee1394/ohci1394.c
+1
-1
drivers/ieee1394/pcilynx.c
drivers/ieee1394/pcilynx.c
+3
-3
drivers/ieee1394/raw1394.c
drivers/ieee1394/raw1394.c
+16
-10
drivers/ieee1394/sbp2.c
drivers/ieee1394/sbp2.c
+14
-4
drivers/ieee1394/sbp2.h
drivers/ieee1394/sbp2.h
+3
-3
fs/ext3/file.c
fs/ext3/file.c
+2
-1
include/asm-i386/div64.h
include/asm-i386/div64.h
+12
-0
No files found.
arch/mips/kernel/linux32.c
View file @
9aa6f26c
...
...
@@ -253,6 +253,7 @@ do_execve32(char * filename, u32 * argv, u32 * envp, struct pt_regs * regs)
bprm
.
file
=
file
;
bprm
.
filename
=
filename
;
bprm
.
interp
=
filename
;
bprm
.
sh_bang
=
0
;
bprm
.
loader
=
0
;
bprm
.
exec
=
0
;
...
...
arch/parisc/kernel/sys_parisc32.c
View file @
9aa6f26c
...
...
@@ -183,6 +183,7 @@ do_execve32(char * filename, u32 * argv, u32 * envp, struct pt_regs * regs)
bprm
.
file
=
file
;
bprm
.
filename
=
filename
;
bprm
.
interp
=
filename
;
bprm
.
sh_bang
=
0
;
bprm
.
loader
=
0
;
bprm
.
exec
=
0
;
...
...
arch/ppc64/kernel/sys_ppc32.c
View file @
9aa6f26c
...
...
@@ -2018,6 +2018,7 @@ static int do_execve32(char * filename, u32 * argv, u32 * envp, struct pt_regs *
bprm
.
file
=
file
;
bprm
.
filename
=
filename
;
bprm
.
interp
=
filename
;
bprm
.
sh_bang
=
0
;
bprm
.
loader
=
0
;
bprm
.
exec
=
0
;
...
...
arch/s390/kernel/compat_linux.c
View file @
9aa6f26c
...
...
@@ -1873,6 +1873,7 @@ do_execve32(char * filename, u32 * argv, u32 * envp, struct pt_regs * regs)
bprm
.
file
=
file
;
bprm
.
filename
=
filename
;
bprm
.
interp
=
filename
;
bprm
.
sh_bang
=
0
;
bprm
.
loader
=
0
;
bprm
.
exec
=
0
;
...
...
drivers/block/as-iosched.c
View file @
9aa6f26c
...
...
@@ -1249,7 +1249,7 @@ static int as_dispatch_request(struct as_data *ad)
ad
->
changed_batch
=
0
;
}
else
ad
->
changed_batch
=
2
;
arq
->
request
->
flags
|=
REQ_
HARD
BARRIER
;
arq
->
request
->
flags
|=
REQ_
SOFT
BARRIER
;
}
/*
...
...
drivers/ieee1394/cmp.c
View file @
9aa6f26c
...
...
@@ -159,7 +159,7 @@ static void cmp_host_reset(struct hpsb_host *host)
}
static
int
pcr_read
(
struct
hpsb_host
*
host
,
int
nodeid
,
quadlet_t
*
buf
,
u64
addr
,
unsigned
in
t
length
,
u16
flags
)
u64
addr
,
size_
t
length
,
u16
flags
)
{
int
csraddr
=
addr
-
CSR_REGISTER_BASE
;
int
plug
;
...
...
drivers/ieee1394/csr.c
View file @
9aa6f26c
...
...
@@ -20,6 +20,7 @@
#include <linux/string.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/param.h>
#include "ieee1394_types.h"
#include "hosts.h"
...
...
@@ -190,7 +191,7 @@ int hpsb_get_config_rom(struct hpsb_host *host, quadlet_t *buffer,
/* Read topology / speed maps and configuration ROM */
static
int
read_maps
(
struct
hpsb_host
*
host
,
int
nodeid
,
quadlet_t
*
buffer
,
u64
addr
,
unsigned
in
t
length
,
u16
fl
)
u64
addr
,
size_
t
length
,
u16
fl
)
{
unsigned
long
flags
;
int
csraddr
=
addr
-
CSR_REGISTER_BASE
;
...
...
@@ -219,7 +220,7 @@ static int read_maps(struct hpsb_host *host, int nodeid, quadlet_t *buffer,
#define out if (--length == 0) break
static
int
read_regs
(
struct
hpsb_host
*
host
,
int
nodeid
,
quadlet_t
*
buf
,
u64
addr
,
unsigned
in
t
length
,
u16
flags
)
u64
addr
,
size_
t
length
,
u16
flags
)
{
int
csraddr
=
addr
-
CSR_REGISTER_BASE
;
int
oldcycle
;
...
...
@@ -333,7 +334,7 @@ static int read_regs(struct hpsb_host *host, int nodeid, quadlet_t *buf,
}
static
int
write_regs
(
struct
hpsb_host
*
host
,
int
nodeid
,
int
destid
,
quadlet_t
*
data
,
u64
addr
,
unsigned
in
t
length
,
u16
flags
)
quadlet_t
*
data
,
u64
addr
,
size_
t
length
,
u16
flags
)
{
int
csraddr
=
addr
-
CSR_REGISTER_BASE
;
...
...
@@ -659,7 +660,7 @@ static int lock64_regs(struct hpsb_host *host, int nodeid, octlet_t * store,
}
static
int
write_fcp
(
struct
hpsb_host
*
host
,
int
nodeid
,
int
dest
,
quadlet_t
*
data
,
u64
addr
,
unsigned
in
t
length
,
u16
flags
)
quadlet_t
*
data
,
u64
addr
,
size_
t
length
,
u16
flags
)
{
int
csraddr
=
addr
-
CSR_REGISTER_BASE
;
...
...
drivers/ieee1394/eth1394.c
View file @
9aa6f26c
...
...
@@ -89,7 +89,7 @@
#define TRACE() printk(KERN_ERR "%s:%s[%d] ---- TRACE\n", driver_name, __FUNCTION__, __LINE__)
static
char
version
[]
__devinitdata
=
"$Rev: 10
1
0 $ Ben Collins <bcollins@debian.org>"
;
"$Rev: 10
2
0 $ Ben Collins <bcollins@debian.org>"
;
struct
fragment_info
{
struct
list_head
list
;
...
...
@@ -130,7 +130,7 @@ static const int hdr_type_len[] = {
static
const
u16
eth1394_speedto_maxpayload
[]
=
{
/* S100, S200, S400, S800, S1600, S3200 */
512
,
1024
,
2048
,
4096
,
8192
,
16384
512
,
1024
,
2048
,
4096
,
4096
,
4096
};
MODULE_AUTHOR
(
"Ben Collins (bcollins@debian.org)"
);
...
...
@@ -1086,7 +1086,7 @@ static int ether1394_data_handler(struct net_device *dev, int srcid, int destid,
}
static
int
ether1394_write
(
struct
hpsb_host
*
host
,
int
srcid
,
int
destid
,
quadlet_t
*
data
,
u64
addr
,
unsigned
in
t
len
,
u16
flags
)
quadlet_t
*
data
,
u64
addr
,
size_
t
len
,
u16
flags
)
{
struct
host_info
*
hi
=
hpsb_get_hostinfo
(
&
eth1394_highlevel
,
host
);
...
...
@@ -1283,7 +1283,7 @@ static inline int ether1394_prep_write_packet(struct hpsb_packet *p,
p
->
header_size
=
16
;
p
->
expect_response
=
1
;
if
(
hpsb_get_tlabel
(
p
,
!
in_interrupt
()
))
{
if
(
hpsb_get_tlabel
(
p
))
{
ETH1394_PRINT_G
(
KERN_ERR
,
"No more tlabels left while sending "
"to node "
NODE_BUS_FMT
"
\n
"
,
NODE_BUS_ARGS
(
host
,
node
));
return
-
1
;
...
...
@@ -1600,7 +1600,7 @@ static int ether1394_ethtool_ioctl(struct net_device *dev, void *useraddr)
case
ETHTOOL_GDRVINFO
:
{
struct
ethtool_drvinfo
info
=
{
ETHTOOL_GDRVINFO
};
strcpy
(
info
.
driver
,
driver_name
);
strcpy
(
info
.
version
,
"$Rev: 10
1
0 $"
);
strcpy
(
info
.
version
,
"$Rev: 10
2
0 $"
);
/* FIXME XXX provide sane businfo */
strcpy
(
info
.
bus_info
,
"ieee1394"
);
if
(
copy_to_user
(
useraddr
,
&
info
,
sizeof
(
info
)))
...
...
drivers/ieee1394/eth1394.h
View file @
9aa6f26c
...
...
@@ -26,9 +26,9 @@
#include "ieee1394.h"
/* Register for incoming packets. This is
8192
bytes, which supports up to
*
1600mbs. We'll need to change this if that ever becomes "small" :)
*/
#define ETHER1394_REGION_ADDR_LEN
8192
/* Register for incoming packets. This is
4096
bytes, which supports up to
*
S3200 (per Table 16-3 of IEEE 1394b-2002).
*/
#define ETHER1394_REGION_ADDR_LEN
4096
#define ETHER1394_REGION_ADDR 0xfffff0200000ULL
#define ETHER1394_REGION_ADDR_END (ETHER1394_REGION_ADDR + ETHER1394_REGION_ADDR_LEN)
...
...
drivers/ieee1394/highlevel.c
View file @
9aa6f26c
...
...
@@ -436,7 +436,7 @@ void highlevel_host_reset(struct hpsb_host *host)
}
void
highlevel_iso_receive
(
struct
hpsb_host
*
host
,
void
*
data
,
unsigned
in
t
length
)
size_
t
length
)
{
struct
list_head
*
entry
;
struct
hpsb_highlevel
*
hl
;
...
...
@@ -456,7 +456,7 @@ void highlevel_iso_receive(struct hpsb_host *host, void *data,
}
void
highlevel_fcp_request
(
struct
hpsb_host
*
host
,
int
nodeid
,
int
direction
,
void
*
data
,
unsigned
in
t
length
)
void
*
data
,
size_
t
length
)
{
struct
list_head
*
entry
;
struct
hpsb_highlevel
*
hl
;
...
...
drivers/ieee1394/highlevel.h
View file @
9aa6f26c
...
...
@@ -46,14 +46,14 @@ struct hpsb_highlevel {
* packet header (first quadlet, CRCs are missing). You may get called
* for channel/host combinations you did not request. */
void
(
*
iso_receive
)
(
struct
hpsb_host
*
host
,
int
channel
,
quadlet_t
*
data
,
unsigned
in
t
length
);
quadlet_t
*
data
,
size_
t
length
);
/* A write request was received on either the FCP_COMMAND (direction =
* 0) or the FCP_RESPONSE (direction = 1) register. The cts arg
* contains the cts field (first byte of data).
*/
void
(
*
fcp_request
)
(
struct
hpsb_host
*
host
,
int
nodeid
,
int
direction
,
int
cts
,
u8
*
data
,
unsigned
in
t
length
);
int
cts
,
u8
*
data
,
size_
t
length
);
struct
list_head
hl_list
;
...
...
@@ -79,9 +79,9 @@ struct hpsb_address_ops {
will send the response itself
*/
int
(
*
read
)
(
struct
hpsb_host
*
host
,
int
nodeid
,
quadlet_t
*
buffer
,
u64
addr
,
unsigned
in
t
length
,
u16
flags
);
u64
addr
,
size_
t
length
,
u16
flags
);
int
(
*
write
)
(
struct
hpsb_host
*
host
,
int
nodeid
,
int
destid
,
quadlet_t
*
data
,
u64
addr
,
unsigned
in
t
length
,
u16
flags
);
quadlet_t
*
data
,
u64
addr
,
size_
t
length
,
u16
flags
);
/* Lock transactions: write results of ext_tcode operation into
* *store. */
...
...
@@ -117,9 +117,9 @@ int highlevel_lock64(struct hpsb_host *host, int nodeid, octlet_t *store,
u64
addr
,
octlet_t
data
,
octlet_t
arg
,
int
ext_tcode
,
u16
flags
);
void
highlevel_iso_receive
(
struct
hpsb_host
*
host
,
void
*
data
,
unsigned
in
t
length
);
size_
t
length
);
void
highlevel_fcp_request
(
struct
hpsb_host
*
host
,
int
nodeid
,
int
direction
,
void
*
data
,
unsigned
in
t
length
);
void
*
data
,
size_
t
length
);
/*
...
...
drivers/ieee1394/ieee1394_core.c
View file @
9aa6f26c
...
...
@@ -281,8 +281,8 @@ static int check_selfids(struct hpsb_host *host)
static
void
build_speed_map
(
struct
hpsb_host
*
host
,
int
nodecount
)
{
char
speedcap
[
nodecount
];
char
cldcnt
[
nodecount
];
u8
speedcap
[
nodecount
];
u8
cldcnt
[
nodecount
];
u8
*
map
=
host
->
speed_map
;
struct
selfid
*
sid
;
struct
ext_selfid
*
esid
;
...
...
@@ -333,7 +333,7 @@ static void build_speed_map(struct hpsb_host *host, int nodecount)
for
(
i
=
1
;
i
<
nodecount
;
i
++
)
{
for
(
j
=
cldcnt
[
i
],
n
=
i
-
1
;
j
>
0
;
j
--
)
{
cldcnt
[
i
]
+=
cldcnt
[
n
];
speedcap
[
n
]
=
MIN
(
speedcap
[
n
],
speedcap
[
i
]);
speedcap
[
n
]
=
min
(
speedcap
[
n
],
speedcap
[
i
]);
n
-=
cldcnt
[
n
]
+
1
;
}
}
...
...
@@ -342,11 +342,11 @@ static void build_speed_map(struct hpsb_host *host, int nodecount)
for
(
i
=
n
-
cldcnt
[
n
];
i
<=
n
;
i
++
)
{
for
(
j
=
0
;
j
<
(
n
-
cldcnt
[
n
]);
j
++
)
{
map
[
j
*
64
+
i
]
=
map
[
i
*
64
+
j
]
=
MIN
(
map
[
i
*
64
+
j
],
speedcap
[
n
]);
min
(
map
[
i
*
64
+
j
],
speedcap
[
n
]);
}
for
(
j
=
n
+
1
;
j
<
nodecount
;
j
++
)
{
map
[
j
*
64
+
i
]
=
map
[
i
*
64
+
j
]
=
MIN
(
map
[
i
*
64
+
j
],
speedcap
[
n
]);
min
(
map
[
i
*
64
+
j
],
speedcap
[
n
]);
}
}
}
...
...
drivers/ieee1394/ieee1394_transactions.c
View file @
9aa6f26c
...
...
@@ -113,35 +113,33 @@ static void fill_async_stream_packet(struct hpsb_packet *packet, int length,
/**
* hpsb_get_tlabel - allocate a transaction label
* @packet: the packet who's tlabel/tpool we set
* @wait: whether to sleep if no tlabel is available
*
* Every asynchronous transaction on the 1394 bus needs a transaction
label to
*
match the response to the request. This label has to be different from any
*
other transaction label in an outstanding request to the same node to make
* matching possible without ambiguity.
* Every asynchronous transaction on the 1394 bus needs a transaction
*
label to match the response to the request. This label has to be
*
different from any other transaction label in an outstanding request to
*
the same node to make
matching possible without ambiguity.
*
* There are 64 different tlabels, so an allocated tlabel has to be freed with
* hpsb_free_tlabel() after the transaction is complete (unless it's reused again for
* the same target node).
*
* @wait cannot be set if in_interrupt()
* There are 64 different tlabels, so an allocated tlabel has to be freed
* with hpsb_free_tlabel() after the transaction is complete (unless it's
* reused again for the same target node).
*
* Return value: Zero on success, otherwise non-zero. A non-zero return
* generally means there are no available tlabels.
* generally means there are no available tlabels. If this is called out
* of interrupt or atomic context, then it will sleep until can return a
* tlabel.
*/
int
hpsb_get_tlabel
(
struct
hpsb_packet
*
packet
,
int
wait
)
int
hpsb_get_tlabel
(
struct
hpsb_packet
*
packet
)
{
unsigned
long
flags
;
struct
hpsb_tlabel_pool
*
tp
;
tp
=
&
packet
->
host
->
tpool
[
packet
->
node_id
&
NODE_MASK
];
if
(
wait
)
{
BUG_ON
(
in_interrupt
());
down
(
&
tp
->
count
);
}
else
{
if
(
in_interrupt
()
||
in_atomic
())
{
if
(
down_trylock
(
&
tp
->
count
))
return
1
;
}
else
{
down
(
&
tp
->
count
);
}
spin_lock_irqsave
(
&
tp
->
lock
,
flags
);
...
...
@@ -270,7 +268,7 @@ struct hpsb_packet *hpsb_make_readpacket(struct hpsb_host *host, nodeid_t node,
packet
->
host
=
host
;
packet
->
node_id
=
node
;
if
(
hpsb_get_tlabel
(
packet
,
in_interrupt
()
?
0
:
1
))
{
if
(
hpsb_get_tlabel
(
packet
))
{
free_hpsb_packet
(
packet
);
return
NULL
;
}
...
...
@@ -301,7 +299,7 @@ struct hpsb_packet *hpsb_make_writepacket (struct hpsb_host *host, nodeid_t node
packet
->
host
=
host
;
packet
->
node_id
=
node
;
if
(
hpsb_get_tlabel
(
packet
,
in_interrupt
()
?
0
:
1
))
{
if
(
hpsb_get_tlabel
(
packet
))
{
free_hpsb_packet
(
packet
);
return
NULL
;
}
...
...
@@ -329,7 +327,7 @@ struct hpsb_packet *hpsb_make_lockpacket(struct hpsb_host *host, nodeid_t node,
p
->
host
=
host
;
p
->
node_id
=
node
;
if
(
hpsb_get_tlabel
(
p
,
in_interrupt
()
?
0
:
1
))
{
if
(
hpsb_get_tlabel
(
p
))
{
free_hpsb_packet
(
p
);
return
NULL
;
}
...
...
@@ -366,7 +364,7 @@ struct hpsb_packet *hpsb_make_lock64packet(struct hpsb_host *host, nodeid_t node
p
->
host
=
host
;
p
->
node_id
=
node
;
if
(
hpsb_get_tlabel
(
p
,
in_interrupt
()
?
0
:
1
))
{
if
(
hpsb_get_tlabel
(
p
))
{
free_hpsb_packet
(
p
);
return
NULL
;
}
...
...
drivers/ieee1394/ieee1394_transactions.h
View file @
9aa6f26c
...
...
@@ -7,7 +7,7 @@
/*
* Get and free transaction labels.
*/
int
hpsb_get_tlabel
(
struct
hpsb_packet
*
packet
,
int
wait
);
int
hpsb_get_tlabel
(
struct
hpsb_packet
*
packet
);
void
hpsb_free_tlabel
(
struct
hpsb_packet
*
packet
);
struct
hpsb_packet
*
hpsb_make_readpacket
(
struct
hpsb_host
*
host
,
nodeid_t
node
,
...
...
drivers/ieee1394/ieee1394_types.h
View file @
9aa6f26c
...
...
@@ -7,7 +7,7 @@
#include <linux/version.h>
#include <linux/list.h>
#include <linux/init.h>
#include <linux/s
tring
.h>
#include <linux/s
pinlock
.h>
#include <asm/semaphore.h>
#include <asm/byteorder.h>
...
...
@@ -18,11 +18,6 @@
#define minor(dev) MINOR(dev)
#endif
#include <linux/spinlock.h>
#ifndef MIN
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#endif
/* Transaction Label handling */
struct
hpsb_tlabel_pool
{
...
...
drivers/ieee1394/nodemgr.c
View file @
9aa6f26c
...
...
@@ -63,7 +63,7 @@ static char *nodemgr_find_oui_name(int oui)
*/
/*
* The nodemgr relies heavily on the Drive Model for device callbacks and
* The nodemgr relies heavily on the Drive
r
Model for device callbacks and
* driver/device mappings. The old nodemgr used to handle all this itself,
* but now we are much simpler because of the LDM.
*/
...
...
drivers/ieee1394/ohci1394.c
View file @
9aa6f26c
...
...
@@ -161,7 +161,7 @@ printk(level "%s: " fmt "\n" , OHCI1394_DRIVER_NAME , ## args)
printk(level "%s_%d: " fmt "\n" , OHCI1394_DRIVER_NAME, card , ## args)
static
char
version
[]
__devinitdata
=
"$Rev: 10
11
$ Ben Collins <bcollins@debian.org>"
;
"$Rev: 10
23
$ Ben Collins <bcollins@debian.org>"
;
/* Module Parameters */
static
int
phys_dma
=
1
;
...
...
drivers/ieee1394/pcilynx.c
View file @
9aa6f26c
...
...
@@ -1000,7 +1000,7 @@ static ssize_t mem_dmaread(struct memdata *md, u32 physbuf, ssize_t count,
DECLARE_WAITQUEUE
(
wait
,
current
);
count
&=
~
3
;
count
=
MIN
(
count
,
53196
);
count
=
min
(
count
,
53196
);
retval
=
count
;
if
(
reg_read
(
md
->
lynx
,
DMA_CHAN_CTRL
(
CHANNEL_LOCALBUS
))
...
...
@@ -1011,14 +1011,14 @@ static ssize_t mem_dmaread(struct memdata *md, u32 physbuf, ssize_t count,
reg_write
(
md
->
lynx
,
LBUS_ADDR
,
md
->
type
|
offset
);
pcl
=
edit_pcl
(
md
->
lynx
,
md
->
lynx
->
dmem_pcl
,
&
pcltmp
);
pcl
->
buffer
[
0
].
control
=
PCL_CMD_LBUS_TO_PCI
|
MIN
(
count
,
4092
);
pcl
->
buffer
[
0
].
control
=
PCL_CMD_LBUS_TO_PCI
|
min
(
count
,
4092
);
pcl
->
buffer
[
0
].
pointer
=
physbuf
;
count
-=
4092
;
i
=
0
;
while
(
count
>
0
)
{
i
++
;
pcl
->
buffer
[
i
].
control
=
MIN
(
count
,
4092
);
pcl
->
buffer
[
i
].
control
=
min
(
count
,
4092
);
pcl
->
buffer
[
i
].
pointer
=
physbuf
+
i
*
4092
;
count
-=
4092
;
}
...
...
drivers/ieee1394/raw1394.c
View file @
9aa6f26c
...
...
@@ -83,9 +83,9 @@ static const int iso_buffer_max = 4 * 1024 * 1024; /* 4 MB */
static
struct
hpsb_highlevel
raw1394_highlevel
;
static
int
arm_read
(
struct
hpsb_host
*
host
,
int
nodeid
,
quadlet_t
*
buffer
,
u64
addr
,
unsigned
in
t
length
,
u16
flags
);
u64
addr
,
size_
t
length
,
u16
flags
);
static
int
arm_write
(
struct
hpsb_host
*
host
,
int
nodeid
,
int
destid
,
quadlet_t
*
data
,
u64
addr
,
unsigned
in
t
length
,
u16
flags
);
quadlet_t
*
data
,
u64
addr
,
size_
t
length
,
u16
flags
);
static
int
arm_lock
(
struct
hpsb_host
*
host
,
int
nodeid
,
quadlet_t
*
store
,
u64
addr
,
quadlet_t
data
,
quadlet_t
arg
,
int
ext_tcode
,
u16
flags
);
static
int
arm_lock64
(
struct
hpsb_host
*
host
,
int
nodeid
,
octlet_t
*
store
,
...
...
@@ -293,7 +293,7 @@ static void host_reset(struct hpsb_host *host)
}
static
void
iso_receive
(
struct
hpsb_host
*
host
,
int
channel
,
quadlet_t
*
data
,
unsigned
in
t
length
)
size_
t
length
)
{
unsigned
long
flags
;
struct
list_head
*
lh
;
...
...
@@ -345,7 +345,7 @@ static void iso_receive(struct hpsb_host *host, int channel, quadlet_t *data,
req
->
req
.
generation
=
get_hpsb_generation
(
host
);
req
->
req
.
misc
=
0
;
req
->
req
.
recvb
=
ptr2int
(
fi
->
iso_buffer
);
req
->
req
.
length
=
MIN
(
length
,
fi
->
iso_buffer_length
);
req
->
req
.
length
=
min
(
length
,
fi
->
iso_buffer_length
);
list_add_tail
(
&
req
->
list
,
&
reqs
);
}
...
...
@@ -362,7 +362,7 @@ static void iso_receive(struct hpsb_host *host, int channel, quadlet_t *data,
}
static
void
fcp_request
(
struct
hpsb_host
*
host
,
int
nodeid
,
int
direction
,
int
cts
,
u8
*
data
,
unsigned
in
t
length
)
int
cts
,
u8
*
data
,
size_
t
length
)
{
unsigned
long
flags
;
struct
list_head
*
lh
;
...
...
@@ -538,9 +538,9 @@ static int state_initialized(struct file_info *fi, struct pending_request *req)
if
(
khl
!=
NULL
)
{
req
->
req
.
error
=
RAW1394_ERROR_NONE
;
req
->
req
.
length
=
MIN
(
req
->
req
.
length
,
sizeof
(
struct
raw1394_khost_list
)
*
req
->
req
.
misc
);
req
->
req
.
length
=
min
(
req
->
req
.
length
,
(
u32
)(
sizeof
(
struct
raw1394_khost_list
)
*
req
->
req
.
misc
)
)
;
req
->
free_data
=
1
;
}
else
{
return
-
ENOMEM
;
...
...
@@ -878,7 +878,7 @@ static int handle_async_send(struct file_info *fi, struct pending_request *req)
}
static
int
arm_read
(
struct
hpsb_host
*
host
,
int
nodeid
,
quadlet_t
*
buffer
,
u64
addr
,
unsigned
in
t
length
,
u16
flags
)
u64
addr
,
size_
t
length
,
u16
flags
)
{
struct
pending_request
*
req
;
struct
list_head
*
lh
;
...
...
@@ -1014,7 +1014,7 @@ static int arm_read (struct hpsb_host *host, int nodeid, quadlet_t *buffer,
}
static
int
arm_write
(
struct
hpsb_host
*
host
,
int
nodeid
,
int
destid
,
quadlet_t
*
data
,
u64
addr
,
unsigned
in
t
length
,
u16
flags
)
quadlet_t
*
data
,
u64
addr
,
size_
t
length
,
u16
flags
)
{
struct
pending_request
*
req
;
struct
list_head
*
lh
;
...
...
@@ -2079,6 +2079,9 @@ static int raw1394_iso_xmit_init(struct file_info *fi, void *uaddr)
{
struct
raw1394_iso_status
stat
;
if
(
!
fi
->
host
)
return
-
EINVAL
;
if
(
copy_from_user
(
&
stat
,
uaddr
,
sizeof
(
stat
)))
return
-
EFAULT
;
...
...
@@ -2108,6 +2111,9 @@ static int raw1394_iso_recv_init(struct file_info *fi, void *uaddr)
{
struct
raw1394_iso_status
stat
;
if
(
!
fi
->
host
)
return
-
EINVAL
;
if
(
copy_from_user
(
&
stat
,
uaddr
,
sizeof
(
stat
)))
return
-
EFAULT
;
...
...
drivers/ieee1394/sbp2.c
View file @
9aa6f26c
...
...
@@ -80,7 +80,7 @@
#include "sbp2.h"
static
char
version
[]
__devinitdata
=
"$Rev: 101
0
$ Ben Collins <bcollins@debian.org>"
;
"$Rev: 101
8
$ Ben Collins <bcollins@debian.org>"
;
/*
* Module load parameter definitions
...
...
@@ -944,6 +944,16 @@ static int sbp2_start_device(struct scsi_id_instance_data *scsi_id)
return
-
EBUSY
;
}
/* Schedule a timeout here. The reason is that we may be so close
* to a bus reset, that the device is not available for logins.
* This can happen when the bus reset is caused by the host
* connected to the sbp2 device being removed. That host would
* have a certain amount of time to relogin before the sbp2 device
* allows someone else to login instead. One second makes sense. */
set_current_state
(
TASK_INTERRUPTIBLE
);
schedule_timeout
(
HZ
);
/*
* Login to the sbp-2 device
*/
...
...
@@ -1060,7 +1070,7 @@ static void sbp2_remove_device(struct scsi_id_instance_data *scsi_id)
* physical dma in hardware). Mostly just here for debugging...
*/
static
int
sbp2_handle_physdma_write
(
struct
hpsb_host
*
host
,
int
nodeid
,
int
destid
,
quadlet_t
*
data
,
u64
addr
,
unsigned
in
t
length
,
u16
flags
)
u64
addr
,
size_
t
length
,
u16
flags
)
{
/*
...
...
@@ -1076,7 +1086,7 @@ static int sbp2_handle_physdma_write(struct hpsb_host *host, int nodeid, int des
* physical dma in hardware). Mostly just here for debugging...
*/
static
int
sbp2_handle_physdma_read
(
struct
hpsb_host
*
host
,
int
nodeid
,
quadlet_t
*
data
,
u64
addr
,
unsigned
in
t
length
,
u16
flags
)
u64
addr
,
size_
t
length
,
u16
flags
)
{
/*
...
...
@@ -2399,7 +2409,7 @@ static void sbp2_check_sbp2_response(struct scsi_id_instance_data *scsi_id,
* This function deals with status writes from the SBP-2 device
*/
static
int
sbp2_handle_status_write
(
struct
hpsb_host
*
host
,
int
nodeid
,
int
destid
,
quadlet_t
*
data
,
u64
addr
,
unsigned
in
t
length
,
u16
fl
)
quadlet_t
*
data
,
u64
addr
,
size_
t
length
,
u16
fl
)
{
struct
sbp2scsi_host_info
*
hi
=
NULL
;
struct
scsi_id_instance_data
*
scsi_id
=
NULL
;
...
...
drivers/ieee1394/sbp2.h
View file @
9aa6f26c
...
...
@@ -479,9 +479,9 @@ static void sbp2_remove_device(struct scsi_id_instance_data *scsi_id);
#ifdef CONFIG_IEEE1394_SBP2_PHYS_DMA
static
int
sbp2_handle_physdma_write
(
struct
hpsb_host
*
host
,
int
nodeid
,
int
destid
,
quadlet_t
*
data
,
u64
addr
,
unsigned
in
t
length
,
u16
flags
);
u64
addr
,
size_
t
length
,
u16
flags
);
static
int
sbp2_handle_physdma_read
(
struct
hpsb_host
*
host
,
int
nodeid
,
quadlet_t
*
data
,
u64
addr
,
unsigned
in
t
length
,
u16
flags
);
u64
addr
,
size_
t
length
,
u16
flags
);
#endif
/*
...
...
@@ -492,7 +492,7 @@ static int sbp2_login_device(struct scsi_id_instance_data *scsi_id);
static
int
sbp2_reconnect_device
(
struct
scsi_id_instance_data
*
scsi_id
);
static
int
sbp2_logout_device
(
struct
scsi_id_instance_data
*
scsi_id
);
static
int
sbp2_handle_status_write
(
struct
hpsb_host
*
host
,
int
nodeid
,
int
destid
,
quadlet_t
*
data
,
u64
addr
,
unsigned
in
t
length
,
u16
flags
);
quadlet_t
*
data
,
u64
addr
,
size_
t
length
,
u16
flags
);
static
int
sbp2_agent_reset
(
struct
scsi_id_instance_data
*
scsi_id
,
int
wait
);
static
int
sbp2_create_command_orb
(
struct
scsi_id_instance_data
*
scsi_id
,
struct
sbp2_command_info
*
command
,
...
...
fs/ext3/file.c
View file @
9aa6f26c
...
...
@@ -60,7 +60,8 @@ ext3_file_write(struct kiocb *iocb, const char *buf, size_t count, loff_t pos)
{
struct
file
*
file
=
iocb
->
ki_filp
;
struct
inode
*
inode
=
file
->
f_dentry
->
d_inode
;
int
ret
,
err
;
ssize_t
ret
;
int
err
;
ret
=
generic_file_aio_write
(
iocb
,
buf
,
count
,
pos
);
...
...
include/asm-i386/div64.h
View file @
9aa6f26c
#ifndef __I386_DIV64
#define __I386_DIV64
/*
* do_div() is NOT a C function. It wants to return
* two values (the quotient and the remainder), but
* since that doesn't work very well in C, what it
* does is:
*
* - modifies the 64-bit dividend _in_place_
* - returns the 32-bit remainder
*
* This ends up being the most efficient "calling
* convention" on x86.
*/
#define do_div(n,base) ({ \
unsigned long __upper, __low, __high, __mod; \
asm("":"=a" (__low), "=d" (__high):"A" (n)); \
...
...
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