tws_cam.c (253037) | tws_cam.c (263126) |
---|---|
1/* 2 * Copyright (c) 2010 LSI Corp. 3 * All rights reserved. 4 * Author : Manjunath Ranganathaiah <manjunath.ranganathaiah@lsi.com> 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * | 1/* 2 * Copyright (c) 2010 LSI Corp. 3 * All rights reserved. 4 * Author : Manjunath Ranganathaiah <manjunath.ranganathaiah@lsi.com> 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * |
27 * $FreeBSD: stable/9/sys/dev/tws/tws_cam.c 253037 2013-07-08 15:54:38Z mav $ | 27 * $FreeBSD: stable/9/sys/dev/tws/tws_cam.c 263126 2014-03-14 01:05:32Z delphij $ |
28 */ 29 30#include <dev/tws/tws.h> 31#include <dev/tws/tws_services.h> 32#include <dev/tws/tws_hdm.h> 33#include <dev/tws/tws_user.h> 34#include <cam/cam.h> 35#include <cam/cam_ccb.h> --- 1257 unchanged lines hidden (view full) --- 1293// device_printf(sc->tws_dev, "Sending initConnect\n"); 1294 if ( tws_init_connect(sc, tws_queue_depth) ) { 1295 TWS_TRACE_DEBUG(sc, "initConnect failed", 0, sc->is64bit); 1296 } 1297 tws_init_obfl_q(sc); 1298 1299 tws_turn_on_interrupts(sc); 1300 | 28 */ 29 30#include <dev/tws/tws.h> 31#include <dev/tws/tws_services.h> 32#include <dev/tws/tws_hdm.h> 33#include <dev/tws/tws_user.h> 34#include <cam/cam.h> 35#include <cam/cam_ccb.h> --- 1257 unchanged lines hidden (view full) --- 1293// device_printf(sc->tws_dev, "Sending initConnect\n"); 1294 if ( tws_init_connect(sc, tws_queue_depth) ) { 1295 TWS_TRACE_DEBUG(sc, "initConnect failed", 0, sc->is64bit); 1296 } 1297 tws_init_obfl_q(sc); 1298 1299 tws_turn_on_interrupts(sc); 1300 |
1301 wakeup_one(sc->chan); | 1301 wakeup_one(sc); |
1302} 1303 1304 1305static void 1306tws_freeze_simq(struct tws_softc *sc, struct tws_request *req) 1307{ 1308 /* Only for IO commands */ 1309 if (req->type == TWS_REQ_TYPE_SCSI_IO) { 1310 union ccb *ccb = (union ccb *)(req->ccb_ptr); 1311 1312 xpt_freeze_simq(sc->sim, 1); 1313 ccb->ccb_h.status |= CAM_RELEASE_SIMQ; 1314 ccb->ccb_h.status |= CAM_REQUEUE_REQ; 1315 } 1316} 1317 1318 1319TUNABLE_INT("hw.tws.cam_depth", &tws_cam_depth); | 1302} 1303 1304 1305static void 1306tws_freeze_simq(struct tws_softc *sc, struct tws_request *req) 1307{ 1308 /* Only for IO commands */ 1309 if (req->type == TWS_REQ_TYPE_SCSI_IO) { 1310 union ccb *ccb = (union ccb *)(req->ccb_ptr); 1311 1312 xpt_freeze_simq(sc->sim, 1); 1313 ccb->ccb_h.status |= CAM_RELEASE_SIMQ; 1314 ccb->ccb_h.status |= CAM_REQUEUE_REQ; 1315 } 1316} 1317 1318 1319TUNABLE_INT("hw.tws.cam_depth", &tws_cam_depth); |