From 8d6b924765b27cb482d57c7d1a38744250818609 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 2 Apr 2012 16:54:42 +0000 Subject: [PATCH] fcst: Port to kernel 3.4.0 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4179 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- fcst/ft_cmd.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/fcst/ft_cmd.c b/fcst/ft_cmd.c index 3945c2433..aca243ab1 100644 --- a/fcst/ft_cmd.c +++ b/fcst/ft_cmd.c @@ -521,7 +521,11 @@ static void ft_recv_tm(struct scst_session *scst_sess, scst_rx_mgmt_params_init(¶ms); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0) + params.lun = fcp->fc_lun.scsi_lun; +#else params.lun = fcp->fc_lun; +#endif params.lun_len = sizeof(fcp->fc_lun); params.lun_set = 1; params.atomic = SCST_ATOMIC; @@ -604,8 +608,14 @@ static void ft_recv_cmd(struct ft_sess *sess, struct fc_frame *fp) cdb_len += sizeof(fcp->fc_cdb); data_len = ntohl(*(__be32 *)(fcp->fc_cdb + cdb_len)); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0) + cmd = scst_rx_cmd(sess->scst_sess, fcp->fc_lun.scsi_lun, + sizeof(fcp->fc_lun), fcp->fc_cdb, cdb_len, + SCST_ATOMIC); +#else cmd = scst_rx_cmd(sess->scst_sess, fcp->fc_lun, sizeof(fcp->fc_lun), fcp->fc_cdb, cdb_len, SCST_ATOMIC); +#endif if (!cmd) goto busy; fcmd->scst_cmd = cmd;