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
7b16318d
Commit
7b16318d
authored
Dec 15, 2005
by
James Bottomley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix up SCSI mismerge
I forgot to do a git-update-cache on the merged files ...
parent
2a1e1379
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
16 deletions
+25
-16
drivers/scsi/scsi_lib.c
drivers/scsi/scsi_lib.c
+21
-12
drivers/scsi/sd.c
drivers/scsi/sd.c
+1
-1
drivers/scsi/sr.c
drivers/scsi/sr.c
+1
-1
drivers/scsi/st.c
drivers/scsi/st.c
+1
-1
include/scsi/scsi_cmnd.h
include/scsi/scsi_cmnd.h
+1
-1
No files found.
drivers/scsi/scsi_lib.c
View file @
7b16318d
...
...
@@ -1259,6 +1259,26 @@ static void scsi_generic_done(struct scsi_cmnd *cmd)
scsi_io_completion
(
cmd
,
cmd
->
bufflen
,
0
);
}
void
scsi_setup_blk_pc_cmnd
(
struct
scsi_cmnd
*
cmd
)
{
struct
request
*
req
=
cmd
->
request
;
BUG_ON
(
sizeof
(
req
->
cmd
)
>
sizeof
(
cmd
->
cmnd
));
memcpy
(
cmd
->
cmnd
,
req
->
cmd
,
sizeof
(
cmd
->
cmnd
));
cmd
->
cmd_len
=
req
->
cmd_len
;
if
(
!
req
->
data_len
)
cmd
->
sc_data_direction
=
DMA_NONE
;
else
if
(
rq_data_dir
(
req
)
==
WRITE
)
cmd
->
sc_data_direction
=
DMA_TO_DEVICE
;
else
cmd
->
sc_data_direction
=
DMA_FROM_DEVICE
;
cmd
->
transfersize
=
req
->
data_len
;
cmd
->
allowed
=
req
->
retries
;
cmd
->
timeout_per_command
=
req
->
timeout
;
}
EXPORT_SYMBOL_GPL
(
scsi_setup_blk_pc_cmnd
);
static
int
scsi_prep_fn
(
struct
request_queue
*
q
,
struct
request
*
req
)
{
struct
scsi_device
*
sdev
=
q
->
queuedata
;
...
...
@@ -1394,18 +1414,7 @@ static int scsi_prep_fn(struct request_queue *q, struct request *req)
goto
kill
;
}
}
else
{
memcpy
(
cmd
->
cmnd
,
req
->
cmd
,
sizeof
(
cmd
->
cmnd
));
cmd
->
cmd_len
=
req
->
cmd_len
;
if
(
rq_data_dir
(
req
)
==
WRITE
)
cmd
->
sc_data_direction
=
DMA_TO_DEVICE
;
else
if
(
req
->
data_len
)
cmd
->
sc_data_direction
=
DMA_FROM_DEVICE
;
else
cmd
->
sc_data_direction
=
DMA_NONE
;
cmd
->
transfersize
=
req
->
data_len
;
cmd
->
allowed
=
req
->
retries
;
cmd
->
timeout_per_command
=
req
->
timeout
;
scsi_setup_blk_pc_cmnd
(
cmd
);
cmd
->
done
=
scsi_generic_done
;
}
}
...
...
drivers/scsi/sd.c
View file @
7b16318d
...
...
@@ -245,7 +245,7 @@ static int sd_init_command(struct scsi_cmnd * SCpnt)
* SG_IO from block layer already setup, just copy cdb basically
*/
if
(
blk_pc_request
(
rq
))
{
scsi_setup_blk_pc_cmnd
(
SCpnt
,
SD_PASSTHROUGH_RETRIES
);
scsi_setup_blk_pc_cmnd
(
SCpnt
);
if
(
rq
->
timeout
)
timeout
=
rq
->
timeout
;
...
...
drivers/scsi/sr.c
View file @
7b16318d
...
...
@@ -320,7 +320,7 @@ static int sr_init_command(struct scsi_cmnd * SCpnt)
* these are already setup, just copy cdb basically
*/
if
(
SCpnt
->
request
->
flags
&
REQ_BLOCK_PC
)
{
scsi_setup_blk_pc_cmnd
(
SCpnt
,
MAX_RETRIES
);
scsi_setup_blk_pc_cmnd
(
SCpnt
);
if
(
SCpnt
->
timeout_per_command
)
timeout
=
SCpnt
->
timeout_per_command
;
...
...
drivers/scsi/st.c
View file @
7b16318d
...
...
@@ -4198,7 +4198,7 @@ static int st_init_command(struct scsi_cmnd *SCpnt)
if
(
!
(
SCpnt
->
request
->
flags
&
REQ_BLOCK_PC
))
return
0
;
scsi_setup_blk_pc_cmnd
(
SCpnt
,
0
);
scsi_setup_blk_pc_cmnd
(
SCpnt
);
SCpnt
->
done
=
st_intr
;
return
1
;
}
...
...
include/scsi/scsi_cmnd.h
View file @
7b16318d
...
...
@@ -151,6 +151,6 @@ extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, gfp_t);
extern
void
scsi_put_command
(
struct
scsi_cmnd
*
);
extern
void
scsi_io_completion
(
struct
scsi_cmnd
*
,
unsigned
int
,
unsigned
int
);
extern
void
scsi_finish_command
(
struct
scsi_cmnd
*
cmd
);
extern
void
scsi_setup_blk_pc_cmnd
(
struct
scsi_cmnd
*
cmd
,
int
retries
);
extern
void
scsi_setup_blk_pc_cmnd
(
struct
scsi_cmnd
*
cmd
);
#endif
/* _SCSI_SCSI_CMND_H */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment