mrsas_fp.c (282533) | mrsas_fp.c (299670) |
---|---|
1/* 2 * Copyright (c) 2015, AVAGO Tech. All rights reserved. Author: Marian Choy 3 * Copyright (c) 2014, LSI Corp. All rights reserved. Author: Marian Choy 4 * Support: freebsdraid@avagotech.com 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: --- 24 unchanged lines hidden (view full) --- 33 * official policies,either expressed or implied, of the FreeBSD Project. 34 * 35 * Send feedback to: <megaraidfbsd@avagotech.com> Mail to: AVAGO TECHNOLOGIES, 1621 36 * Barber Lane, Milpitas, CA 95035 ATTN: MegaRaid FreeBSD 37 * 38 */ 39 40#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 2015, AVAGO Tech. All rights reserved. Author: Marian Choy 3 * Copyright (c) 2014, LSI Corp. All rights reserved. Author: Marian Choy 4 * Support: freebsdraid@avagotech.com 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: --- 24 unchanged lines hidden (view full) --- 33 * official policies,either expressed or implied, of the FreeBSD Project. 34 * 35 * Send feedback to: <megaraidfbsd@avagotech.com> Mail to: AVAGO TECHNOLOGIES, 1621 36 * Barber Lane, Milpitas, CA 95035 ATTN: MegaRaid FreeBSD 37 * 38 */ 39 40#include <sys/cdefs.h> |
41__FBSDID("$FreeBSD: head/sys/dev/mrsas/mrsas_fp.c 282533 2015-05-06 10:46:28Z kadesai $"); | 41__FBSDID("$FreeBSD: head/sys/dev/mrsas/mrsas_fp.c 299670 2016-05-13 12:18:12Z kadesai $"); |
42 43#include <dev/mrsas/mrsas.h> 44 45#include <cam/cam.h> 46#include <cam/cam_ccb.h> 47#include <cam/cam_sim.h> 48#include <cam/cam_xpt_sim.h> 49#include <cam/cam_debug.h> --- 694 unchanged lines hidden (view full) --- 744 u_int8_t physArm, span; 745 u_int64_t row; 746 u_int8_t retval = TRUE; 747 u_int64_t *pdBlock = &io_info->pdBlock; 748 u_int16_t *pDevHandle = &io_info->devHandle; 749 u_int32_t logArm, rowMod, armQ, arm; 750 u_int8_t do_invader = 0; 751 | 42 43#include <dev/mrsas/mrsas.h> 44 45#include <cam/cam.h> 46#include <cam/cam_ccb.h> 47#include <cam/cam_sim.h> 48#include <cam/cam_xpt_sim.h> 49#include <cam/cam_debug.h> --- 694 unchanged lines hidden (view full) --- 744 u_int8_t physArm, span; 745 u_int64_t row; 746 u_int8_t retval = TRUE; 747 u_int64_t *pdBlock = &io_info->pdBlock; 748 u_int16_t *pDevHandle = &io_info->devHandle; 749 u_int32_t logArm, rowMod, armQ, arm; 750 u_int8_t do_invader = 0; 751 |
752 if ((sc->device_id == MRSAS_INVADER) || (sc->device_id == MRSAS_FURY)) | 752 if ((sc->device_id == MRSAS_INVADER) || 753 (sc->device_id == MRSAS_FURY) || 754 (sc->device_id == MRSAS_INTRUDER) || 755 (sc->device_id == MRSAS_INTRUDER_24)) |
753 do_invader = 1; 754 755 /* Get row and span from io_info for Uneven Span IO. */ 756 row = io_info->start_row; 757 span = io_info->start_span; 758 759 760 if (raid->level == 6) { --- 194 unchanged lines hidden (view full) --- 955 956 /* if IO ends within first strip of last row */ 957 if (endStrip == get_strip_from_row(sc, ld, endRow, map)) 958 regSize += ref_in_end_stripe + 1; 959 else 960 regSize += stripSize; 961 } 962 pRAID_Context->timeoutValue = map->raidMap.fpPdIoTimeoutSec; | 756 do_invader = 1; 757 758 /* Get row and span from io_info for Uneven Span IO. */ 759 row = io_info->start_row; 760 span = io_info->start_span; 761 762 763 if (raid->level == 6) { --- 194 unchanged lines hidden (view full) --- 958 959 /* if IO ends within first strip of last row */ 960 if (endStrip == get_strip_from_row(sc, ld, endRow, map)) 961 regSize += ref_in_end_stripe + 1; 962 else 963 regSize += stripSize; 964 } 965 pRAID_Context->timeoutValue = map->raidMap.fpPdIoTimeoutSec; |
963 if ((sc->device_id == MRSAS_INVADER) || (sc->device_id == MRSAS_FURY)) | 966 if ((sc->device_id == MRSAS_INVADER) || 967 (sc->device_id == MRSAS_FURY) || 968 (sc->device_id == MRSAS_INTRUDER) || 969 (sc->device_id == MRSAS_INTRUDER_24)) |
964 pRAID_Context->regLockFlags = (isRead) ? raid->regTypeReqOnRead : raid->regTypeReqOnWrite; 965 else 966 pRAID_Context->regLockFlags = (isRead) ? REGION_TYPE_SHARED_READ : raid->regTypeReqOnWrite; 967 pRAID_Context->VirtualDiskTgtId = raid->targetId; 968 pRAID_Context->regLockRowLBA = regStart; 969 pRAID_Context->regLockLength = regSize; 970 pRAID_Context->configSeqNum = raid->seqNum; 971 --- 474 unchanged lines hidden (view full) --- 1446 u_int64_t row; 1447 u_int8_t retval = TRUE; 1448 int error_code = 0; 1449 u_int64_t *pdBlock = &io_info->pdBlock; 1450 u_int16_t *pDevHandle = &io_info->devHandle; 1451 u_int32_t rowMod, armQ, arm, logArm; 1452 u_int8_t do_invader = 0; 1453 | 970 pRAID_Context->regLockFlags = (isRead) ? raid->regTypeReqOnRead : raid->regTypeReqOnWrite; 971 else 972 pRAID_Context->regLockFlags = (isRead) ? REGION_TYPE_SHARED_READ : raid->regTypeReqOnWrite; 973 pRAID_Context->VirtualDiskTgtId = raid->targetId; 974 pRAID_Context->regLockRowLBA = regStart; 975 pRAID_Context->regLockLength = regSize; 976 pRAID_Context->configSeqNum = raid->seqNum; 977 --- 474 unchanged lines hidden (view full) --- 1452 u_int64_t row; 1453 u_int8_t retval = TRUE; 1454 int error_code = 0; 1455 u_int64_t *pdBlock = &io_info->pdBlock; 1456 u_int16_t *pDevHandle = &io_info->devHandle; 1457 u_int32_t rowMod, armQ, arm, logArm; 1458 u_int8_t do_invader = 0; 1459 |
1454 if ((sc->device_id == MRSAS_INVADER) || (sc->device_id == MRSAS_FURY)) | 1460 if ((sc->device_id == MRSAS_INVADER) || 1461 (sc->device_id == MRSAS_FURY) || 1462 (sc->device_id == MRSAS_INTRUDER) || 1463 (sc->device_id == MRSAS_INTRUDER_24)) |
1455 do_invader = 1; 1456 1457 row = mega_div64_32(stripRow, raid->rowDataSize); 1458 1459 if (raid->level == 6) { 1460 /* logical arm within row */ 1461 logArm = mega_mod64(stripRow, raid->rowDataSize); 1462 if (raid->rowSize == 0) --- 92 unchanged lines hidden --- | 1464 do_invader = 1; 1465 1466 row = mega_div64_32(stripRow, raid->rowDataSize); 1467 1468 if (raid->level == 6) { 1469 /* logical arm within row */ 1470 logArm = mega_mod64(stripRow, raid->rowDataSize); 1471 if (raid->rowSize == 0) --- 92 unchanged lines hidden --- |