Deleted Added
full compact
ctl_frontend_iscsi.c (268695) ctl_frontend_iscsi.c (268697)
1/*-
2 * Copyright (c) 2012 The FreeBSD Foundation
3 * All rights reserved.
4 *
5 * This software was developed by Edward Tomasz Napierala under sponsorship
6 * from the FreeBSD Foundation.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 12 unchanged lines hidden (view full) ---

21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
1/*-
2 * Copyright (c) 2012 The FreeBSD Foundation
3 * All rights reserved.
4 *
5 * This software was developed by Edward Tomasz Napierala under sponsorship
6 * from the FreeBSD Foundation.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 12 unchanged lines hidden (view full) ---

21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $FreeBSD: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c 268695 2014-07-15 17:16:58Z mav $
29 * $FreeBSD: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c 268697 2014-07-15 17:18:50Z mav $
30 */
31
32/*
33 * CTL frontend for the iSCSI protocol.
34 */
35
36#include <sys/cdefs.h>
30 */
31
32/*
33 * CTL frontend for the iSCSI protocol.
34 */
35
36#include <sys/cdefs.h>
37__FBSDID("$FreeBSD: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c 268695 2014-07-15 17:16:58Z mav $");
37__FBSDID("$FreeBSD: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c 268697 2014-07-15 17:18:50Z mav $");
38
39#include <sys/param.h>
40#include <sys/capability.h>
41#include <sys/condvar.h>
42#include <sys/file.h>
43#include <sys/kernel.h>
44#include <sys/kthread.h>
45#include <sys/lock.h>

--- 2655 unchanged lines hidden (view full) ---

2701 cdw->cdw_initiator_task_tag, ("dangling cdw"));
2702 CFISCSI_SESSION_UNLOCK(cs);
2703#endif
2704
2705 /*
2706 * Do not return status for aborted commands.
2707 * There are exceptions, but none supported by CTL yet.
2708 */
38
39#include <sys/param.h>
40#include <sys/capability.h>
41#include <sys/condvar.h>
42#include <sys/file.h>
43#include <sys/kernel.h>
44#include <sys/kthread.h>
45#include <sys/lock.h>

--- 2655 unchanged lines hidden (view full) ---

2701 cdw->cdw_initiator_task_tag, ("dangling cdw"));
2702 CFISCSI_SESSION_UNLOCK(cs);
2703#endif
2704
2705 /*
2706 * Do not return status for aborted commands.
2707 * There are exceptions, but none supported by CTL yet.
2708 */
2709 if (io->io_hdr.status == CTL_CMD_ABORTED) {
2709 if (io->io_hdr.status == CTL_CMD_ABORTED &&
2710 (io->io_hdr.flags & CTL_FLAG_ABORT_STATUS) == 0) {
2710 ctl_free_io(io);
2711 icl_pdu_free(request);
2712 return;
2713 }
2714
2715 response = cfiscsi_pdu_new_response(request, M_WAITOK);
2716 bhssr = (struct iscsi_bhs_scsi_response *)response->ip_bhs;
2717 bhssr->bhssr_opcode = ISCSI_BHS_OPCODE_SCSI_RESPONSE;

--- 152 unchanged lines hidden ---
2711 ctl_free_io(io);
2712 icl_pdu_free(request);
2713 return;
2714 }
2715
2716 response = cfiscsi_pdu_new_response(request, M_WAITOK);
2717 bhssr = (struct iscsi_bhs_scsi_response *)response->ip_bhs;
2718 bhssr->bhssr_opcode = ISCSI_BHS_OPCODE_SCSI_RESPONSE;

--- 152 unchanged lines hidden ---