Init SCSI request properly on newer kernels
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
parent
5603a77302
commit
ed6b5f60ee
@ -20,11 +20,22 @@ check() {
|
|||||||
apply() {
|
apply() {
|
||||||
case "$1" in
|
case "$1" in
|
||||||
"1")
|
"1")
|
||||||
add_define "cas_blk_rq_set_block_pc(rq) \\
|
add_function "
|
||||||
blk_rq_set_block_pc(rq)" ;;
|
static inline void cas_blk_rq_set_block_pc(struct request *rq)
|
||||||
|
{
|
||||||
|
blk_rq_set_block_pc(rq);
|
||||||
|
}" ;;
|
||||||
"2")
|
"2")
|
||||||
add_define "cas_blk_rq_set_block_pc(rq) \\
|
add_function "
|
||||||
{}" ;;
|
#include <linux/blk-mq.h>
|
||||||
|
#include <scsi/scsi_request.h>
|
||||||
|
#include <scsi/scsi_cmnd.h>
|
||||||
|
static inline void cas_blk_rq_set_block_pc(struct request *rq)
|
||||||
|
{
|
||||||
|
struct scsi_cmnd *cmd = blk_mq_rq_to_pdu(rq);
|
||||||
|
|
||||||
|
scsi_req_init(&cmd->req);
|
||||||
|
}" ;;
|
||||||
*)
|
*)
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user