isp.c (9b4fcf851a73554063d4a2de9a4f10cd23a0a4f6) | isp.c (898899d9ddbd15925a9d3c6b1da0d426dbc6351b) |
---|---|
1/*- 2 * Copyright (c) 1997-2009 by Matthew Jacob 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * --- 4363 unchanged lines hidden (view full) --- 4372 /* 4373 * NB: we do not support long CDBs 4374 */ 4375 cdblen = XS_CDBLEN(xs); 4376 4377 if (IS_SCSI(isp)) { 4378 reqp->req_target = target | (XS_CHANNEL(xs) << 7); 4379 reqp->req_lun_trn = XS_LUN(xs); | 1/*- 2 * Copyright (c) 1997-2009 by Matthew Jacob 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * --- 4363 unchanged lines hidden (view full) --- 4372 /* 4373 * NB: we do not support long CDBs 4374 */ 4375 cdblen = XS_CDBLEN(xs); 4376 4377 if (IS_SCSI(isp)) { 4378 reqp->req_target = target | (XS_CHANNEL(xs) << 7); 4379 reqp->req_lun_trn = XS_LUN(xs); |
4380 cdblen = MIN(cdblen, sizeof (reqp->req_cdb)); | 4380 cdblen = ISP_MIN(cdblen, sizeof (reqp->req_cdb)); |
4381 cdbp = reqp->req_cdb; 4382 reqp->req_cdblen = cdblen; 4383 } else if (IS_24XX(isp)) { 4384 ispreqt7_t *t7 = (ispreqt7_t *)local; 4385 fcportdb_t *lp; 4386 4387 lp = &FCPARAM(isp, XS_CHANNEL(xs))->portdb[hdlidx]; 4388 t7->req_nphdl = target; 4389 t7->req_tidlo = lp->portid; 4390 t7->req_tidhi = lp->portid >> 16; 4391 t7->req_vpidx = ISP_GET_VPIDX(isp, XS_CHANNEL(xs)); 4392 if (XS_LUN(xs) > 256) { 4393 t7->req_lun[0] = XS_LUN(xs) >> 8; 4394 t7->req_lun[0] |= 0x40; 4395 } 4396 t7->req_lun[1] = XS_LUN(xs); 4397 tptr = &t7->req_time; 4398 cdbp = t7->req_cdb; | 4381 cdbp = reqp->req_cdb; 4382 reqp->req_cdblen = cdblen; 4383 } else if (IS_24XX(isp)) { 4384 ispreqt7_t *t7 = (ispreqt7_t *)local; 4385 fcportdb_t *lp; 4386 4387 lp = &FCPARAM(isp, XS_CHANNEL(xs))->portdb[hdlidx]; 4388 t7->req_nphdl = target; 4389 t7->req_tidlo = lp->portid; 4390 t7->req_tidhi = lp->portid >> 16; 4391 t7->req_vpidx = ISP_GET_VPIDX(isp, XS_CHANNEL(xs)); 4392 if (XS_LUN(xs) > 256) { 4393 t7->req_lun[0] = XS_LUN(xs) >> 8; 4394 t7->req_lun[0] |= 0x40; 4395 } 4396 t7->req_lun[1] = XS_LUN(xs); 4397 tptr = &t7->req_time; 4398 cdbp = t7->req_cdb; |
4399 cdblen = MIN(cdblen, sizeof (t7->req_cdb)); | 4399 cdblen = ISP_MIN(cdblen, sizeof (t7->req_cdb)); |
4400 } else if (ISP_CAP_2KLOGIN(isp)) { 4401 ispreqt2e_t *t2e = (ispreqt2e_t *)local; 4402 t2e->req_target = target; 4403 t2e->req_scclun = XS_LUN(xs); 4404 cdbp = t2e->req_cdb; | 4400 } else if (ISP_CAP_2KLOGIN(isp)) { 4401 ispreqt2e_t *t2e = (ispreqt2e_t *)local; 4402 t2e->req_target = target; 4403 t2e->req_scclun = XS_LUN(xs); 4404 cdbp = t2e->req_cdb; |
4405 cdblen = MIN(cdblen, sizeof (t2e->req_cdb)); | 4405 cdblen = ISP_MIN(cdblen, sizeof (t2e->req_cdb)); |
4406 } else if (ISP_CAP_SCCFW(isp)) { 4407 ispreqt2_t *t2 = (ispreqt2_t *)local; 4408 t2->req_target = target; 4409 t2->req_scclun = XS_LUN(xs); 4410 cdbp = t2->req_cdb; | 4406 } else if (ISP_CAP_SCCFW(isp)) { 4407 ispreqt2_t *t2 = (ispreqt2_t *)local; 4408 t2->req_target = target; 4409 t2->req_scclun = XS_LUN(xs); 4410 cdbp = t2->req_cdb; |
4411 cdblen = MIN(cdblen, sizeof (t2->req_cdb)); | 4411 cdblen = ISP_MIN(cdblen, sizeof (t2->req_cdb)); |
4412 } else { 4413 ispreqt2_t *t2 = (ispreqt2_t *)local; 4414 t2->req_target = target; 4415 t2->req_lun_trn = XS_LUN(xs); 4416 cdbp = t2->req_cdb; | 4412 } else { 4413 ispreqt2_t *t2 = (ispreqt2_t *)local; 4414 t2->req_target = target; 4415 t2->req_lun_trn = XS_LUN(xs); 4416 cdbp = t2->req_cdb; |
4417 cdblen = MIN(cdblen, sizeof (t2->req_cdb)); | 4417 cdblen = ISP_MIN(cdblen, sizeof (t2->req_cdb)); |
4418 } 4419 ISP_MEMCPY(cdbp, XS_CDBP(xs), cdblen); 4420 4421 *tptr = XS_TIME(xs) / 1000; 4422 if (*tptr == 0 && XS_TIME(xs)) { 4423 *tptr = 1; 4424 } 4425 if (IS_24XX(isp) && *tptr > 0x1999) { --- 3879 unchanged lines hidden --- | 4418 } 4419 ISP_MEMCPY(cdbp, XS_CDBP(xs), cdblen); 4420 4421 *tptr = XS_TIME(xs) / 1000; 4422 if (*tptr == 0 && XS_TIME(xs)) { 4423 *tptr = 1; 4424 } 4425 if (IS_24XX(isp) && *tptr > 0x1999) { --- 3879 unchanged lines hidden --- |