1/*- 2 * Implementation of the Common Access Method Transport (XPT) layer. 3 * 4 * Copyright (c) 1997, 1998, 1999 Justin T. Gibbs. 5 * Copyright (c) 1997, 1998, 1999 Kenneth D. Merry. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 14 unchanged lines hidden (view full) --- 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 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: head/sys/cam/cam_xpt.c 228022 2011-11-27 15:43:40Z marius $"); |
32 33#include <sys/param.h> 34#include <sys/bus.h> 35#include <sys/systm.h> 36#include <sys/types.h> 37#include <sys/malloc.h> 38#include <sys/kernel.h> 39#include <sys/time.h> --- 21 unchanged lines hidden (view full) --- 61#include <cam/cam_xpt_sim.h> 62#include <cam/cam_xpt_periph.h> 63#include <cam/cam_xpt_internal.h> 64#include <cam/cam_debug.h> 65 66#include <cam/scsi/scsi_all.h> 67#include <cam/scsi/scsi_message.h> 68#include <cam/scsi/scsi_pass.h> |
69 70#include <machine/md_var.h> /* geometry translation */ |
71#include <machine/stdarg.h> /* for xpt_print below */ |
72 |
73#include "opt_cam.h" 74 75/* 76 * This is the maximum number of high powered commands (e.g. start unit) 77 * that can be outstanding at a particular time. 78 */ 79#ifndef CAM_MAX_HIGHPOWER 80#define CAM_MAX_HIGHPOWER 4 --- 2373 unchanged lines hidden (view full) --- 2454 if (start_ccb->ccg.block_size == 0 2455 || start_ccb->ccg.volume_size == 0) { 2456 start_ccb->ccg.cylinders = 0; 2457 start_ccb->ccg.heads = 0; 2458 start_ccb->ccg.secs_per_track = 0; 2459 start_ccb->ccb_h.status = CAM_REQ_CMP; 2460 break; 2461 } |
2462#if defined(PC98) || defined(__sparc64__) |
2463 /* 2464 * In a PC-98 system, geometry translation depens on 2465 * the "real" device geometry obtained from mode page 4. 2466 * SCSI geometry translation is performed in the 2467 * initialization routine of the SCSI BIOS and the result 2468 * stored in host memory. If the translation is available 2469 * in host memory, use it. If not, rely on the default 2470 * translation the device driver performs. |
2471 * For sparc64, we may need adjust the geometry of large 2472 * disks in order to fit the limitations of the 16-bit 2473 * fields of the VTOC8 disk label. |
2474 */ 2475 if (scsi_da_bios_params(&start_ccb->ccg) != 0) { 2476 start_ccb->ccb_h.status = CAM_REQ_CMP; 2477 break; 2478 } 2479#endif 2480 sim = path->bus->sim; 2481 (*(sim->sim_action))(sim, start_ccb); --- 2493 unchanged lines hidden --- |