Deleted Added
sdiff udiff text old ( 282533 ) new ( 299670 )
full compact
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 $");
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))
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;
963 if ((sc->device_id == MRSAS_INVADER) || (sc->device_id == MRSAS_FURY))
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
1454 if ((sc->device_id == MRSAS_INVADER) || (sc->device_id == MRSAS_FURY))
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 ---