iscsi_subr.c (185289) | iscsi_subr.c (211095) |
---|---|
1/*- | 1/*- |
2 * Copyright (c) 2005-2008 Daniel Braniss <danny@cs.huji.ac.il> | 2 * Copyright (c) 2005-2010 Daniel Braniss <danny@cs.huji.ac.il> |
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 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright --- 9 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 */ 27/* | 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 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright --- 9 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 */ 27/* |
28 | $Id: iscsi_subr.c,v 1.17 2006/11/26 14:50:43 danny Exp danny $ | 28 | $Id: iscsi_subr.c 743 2009-08-08 10:54:53Z danny $ |
29 */ 30 31#include <sys/cdefs.h> | 29 */ 30 31#include <sys/cdefs.h> |
32__FBSDID("$FreeBSD: head/sys/dev/iscsi/initiator/iscsi_subr.c 185289 2008-11-25 07:17:11Z scottl $"); | 32__FBSDID("$FreeBSD: head/sys/dev/iscsi/initiator/iscsi_subr.c 211095 2010-08-09 12:36:36Z des $"); |
33 34#include "opt_iscsi_initiator.h" 35 36#include <sys/param.h> 37#include <sys/kernel.h> 38#include <sys/callout.h> 39#include <sys/malloc.h> 40#include <sys/mbuf.h> 41#include <sys/kthread.h> 42#include <sys/lock.h> 43#include <sys/mutex.h> 44#include <sys/uio.h> 45#include <sys/sysctl.h> | 33 34#include "opt_iscsi_initiator.h" 35 36#include <sys/param.h> 37#include <sys/kernel.h> 38#include <sys/callout.h> 39#include <sys/malloc.h> 40#include <sys/mbuf.h> 41#include <sys/kthread.h> 42#include <sys/lock.h> 43#include <sys/mutex.h> 44#include <sys/uio.h> 45#include <sys/sysctl.h> |
46#include <sys/sx.h> |
|
46 47#include <cam/cam.h> 48#include <cam/cam_ccb.h> 49#include <cam/cam_sim.h> 50#include <cam/cam_xpt_sim.h> 51#include <cam/cam_periph.h> 52#include <cam/scsi/scsi_message.h> 53#include <sys/eventhandler.h> --- 63 unchanged lines hidden (view full) --- 117 118 cmd->dsn = htonl(dsn); 119 cmd->bo = htonl(bo); 120 121 cmd->F = (bs < bleft)? 0: 1; // is this the last one? 122 bs = MIN(bs, bleft); 123 124 wpq->pdu.ds_len = bs; | 47 48#include <cam/cam.h> 49#include <cam/cam_ccb.h> 50#include <cam/cam_sim.h> 51#include <cam/cam_xpt_sim.h> 52#include <cam/cam_periph.h> 53#include <cam/scsi/scsi_message.h> 54#include <sys/eventhandler.h> --- 63 unchanged lines hidden (view full) --- 118 119 cmd->dsn = htonl(dsn); 120 cmd->bo = htonl(bo); 121 122 cmd->F = (bs < bleft)? 0: 1; // is this the last one? 123 bs = MIN(bs, bleft); 124 125 wpq->pdu.ds_len = bs; |
125 wpq->pdu.ds = bp; | 126 wpq->pdu.ds_addr = bp; |
126 127 error = isc_qout(sp, wpq); 128 sdebug(6, "bs=%x bo=%x bp=%p dsn=%x error=%d", bs, bo, bp, dsn, error); 129 if(error) 130 break; 131 bo += bs; 132 bp += bs; 133 bleft -= bs; --- 49 unchanged lines hidden (view full) --- 183 184 return 1; 185} 186 187/* 188 | Some information is from SAM draft. 189 */ 190static void | 127 128 error = isc_qout(sp, wpq); 129 sdebug(6, "bs=%x bo=%x bp=%p dsn=%x error=%d", bs, bo, bp, dsn, error); 130 if(error) 131 break; 132 bo += bs; 133 bp += bs; 134 bleft -= bs; --- 49 unchanged lines hidden (view full) --- 184 185 return 1; 186} 187 188/* 189 | Some information is from SAM draft. 190 */ 191static void |
191_scsi_done(struct isc_softc *isp, u_int response, u_int status, union ccb *ccb, pduq_t *pq) | 192_scsi_done(isc_session_t *sp, u_int response, u_int status, union ccb *ccb, pduq_t *pq) |
192{ 193 struct ccb_hdr *ccb_h = &ccb->ccb_h; 194 195 debug_called(8); 196 197 if(status || response) { | 193{ 194 struct ccb_hdr *ccb_h = &ccb->ccb_h; 195 196 debug_called(8); 197 198 if(status || response) { |
198 debug(3, "response=%x status=%x ccb=%p pq=%p", response, status, ccb, pq); | 199 sdebug(3, "response=%x status=%x ccb=%p pq=%p", response, status, ccb, pq); |
199 if(pq != NULL) | 200 if(pq != NULL) |
200 debug(3, "mp=%p buf=%p len=%d", pq->mp, pq->buf, pq->len); | 201 sdebug(3, "mp=%p buf=%p len=%d", pq->mp, pq->buf, pq->len); |
201 } 202 ccb_h->status = 0; 203 switch(response) { 204 case 0: // Command Completed at Target 205 switch(status) { 206 case 0: // Good, all is ok 207 ccb_h->status = CAM_REQ_CMP; 208 break; --- 27 unchanged lines hidden (view full) --- 236 default: 237 if((response >= 0x80) && (response <= 0xFF)) { 238 // Vendor specific ... 239 } 240 case 1: // target failure 241 ccb_h->status = CAM_REQ_CMP_ERR; //CAM_REQ_ABORTED; 242 break; 243 } | 202 } 203 ccb_h->status = 0; 204 switch(response) { 205 case 0: // Command Completed at Target 206 switch(status) { 207 case 0: // Good, all is ok 208 ccb_h->status = CAM_REQ_CMP; 209 break; --- 27 unchanged lines hidden (view full) --- 237 default: 238 if((response >= 0x80) && (response <= 0xFF)) { 239 // Vendor specific ... 240 } 241 case 1: // target failure 242 ccb_h->status = CAM_REQ_CMP_ERR; //CAM_REQ_ABORTED; 243 break; 244 } |
244 debug(5, "ccb_h->status=%x", ccb_h->status); | 245 sdebug(5, "ccb_h->status=%x", ccb_h->status); |
245 | 246 |
246 XPT_DONE(isp, ccb); | 247 XPT_DONE(sp, ccb); |
247} 248 249/* 250 | returns the lowest cmdseq that was not acked 251 */ 252int 253iscsi_requeue(isc_session_t *sp) 254{ 255 pduq_t *pq; 256 u_int i, n, last; 257 258 debug_called(8); | 248} 249 250/* 251 | returns the lowest cmdseq that was not acked 252 */ 253int 254iscsi_requeue(isc_session_t *sp) 255{ 256 pduq_t *pq; 257 u_int i, n, last; 258 259 debug_called(8); |
259 last = -1; 260 i = 0; | 260 i = last = 0; |
261 sp->flags |= ISC_HOLD; 262 while((pq = i_dqueue_hld(sp)) != NULL) { 263 i++; | 261 sp->flags |= ISC_HOLD; 262 while((pq = i_dqueue_hld(sp)) != NULL) { 263 i++; |
264 _scsi_done(sp->isc, 0, 0x28, pq->ccb, NULL); 265 n = ntohl(pq->pdu.ipdu.bhs.CmdSN); 266 if(last > n) 267 last = n; 268 sdebug(2, "last=%x n=%x", last, n); | 264 if(pq->ccb != NULL) { 265 _scsi_done(sp, 0, 0x28, pq->ccb, NULL); 266 n = ntohl(pq->pdu.ipdu.bhs.CmdSN); 267 if(last==0 || (last > n)) 268 last = n; 269 sdebug(2, "last=%x n=%x", last, n); 270 } |
269 pdu_free(sp->isc, pq); 270 } 271 sp->flags &= ~ISC_HOLD; 272 return i? last: sp->sn.cmd; 273} 274 275int 276i_pdu_flush(isc_session_t *sp) --- 34 unchanged lines hidden (view full) --- 311{ 312 pduq_t *pq, *pqtmp; 313 314 debug_called(8); 315 316 TAILQ_FOREACH_SAFE(pq, &sp->hld, pq_link, pqtmp) { 317 sdebug(3, "hld pq=%p", pq); 318 if(pq->ccb) | 271 pdu_free(sp->isc, pq); 272 } 273 sp->flags &= ~ISC_HOLD; 274 return i? last: sp->sn.cmd; 275} 276 277int 278i_pdu_flush(isc_session_t *sp) --- 34 unchanged lines hidden (view full) --- 313{ 314 pduq_t *pq, *pqtmp; 315 316 debug_called(8); 317 318 TAILQ_FOREACH_SAFE(pq, &sp->hld, pq_link, pqtmp) { 319 sdebug(3, "hld pq=%p", pq); 320 if(pq->ccb) |
319 _scsi_done(sp->isc, 1, 0x40, pq->ccb, NULL); | 321 _scsi_done(sp, 1, 0x40, pq->ccb, NULL); |
320 TAILQ_REMOVE(&sp->hld, pq, pq_link); | 322 TAILQ_REMOVE(&sp->hld, pq, pq_link); |
323 if(pq->buf) { 324 free(pq->buf, M_ISCSIBUF); 325 pq->buf = NULL; 326 } |
|
321 pdu_free(sp->isc, pq); 322 } 323 while((pq = i_dqueue_snd(sp, BIT(0)|BIT(1)|BIT(2))) != NULL) { 324 sdebug(3, "pq=%p", pq); 325 if(pq->ccb) | 327 pdu_free(sp->isc, pq); 328 } 329 while((pq = i_dqueue_snd(sp, BIT(0)|BIT(1)|BIT(2))) != NULL) { 330 sdebug(3, "pq=%p", pq); 331 if(pq->ccb) |
326 _scsi_done(sp->isc, 1, 0x40, pq->ccb, NULL); | 332 _scsi_done(sp, 1, 0x40, pq->ccb, NULL); 333 if(pq->buf) { 334 free(pq->buf, M_ISCSIBUF); 335 pq->buf = NULL; 336 } |
327 pdu_free(sp->isc, pq); 328 } 329 330 wakeup(&sp->rsp); 331} 332 333void 334iscsi_done(isc_session_t *sp, pduq_t *opq, pduq_t *pq) 335{ 336 pdu_t *pp = &pq->pdu; 337 scsi_rsp_t *cmd = &pp->ipdu.scsi_rsp; 338 339 debug_called(8); 340 | 337 pdu_free(sp->isc, pq); 338 } 339 340 wakeup(&sp->rsp); 341} 342 343void 344iscsi_done(isc_session_t *sp, pduq_t *opq, pduq_t *pq) 345{ 346 pdu_t *pp = &pq->pdu; 347 scsi_rsp_t *cmd = &pp->ipdu.scsi_rsp; 348 349 debug_called(8); 350 |
341 _scsi_done(sp->isc, cmd->response, cmd->status, opq->ccb, pq); | 351 _scsi_done(sp, cmd->response, cmd->status, opq->ccb, pq); |
342 343 pdu_free(sp->isc, opq); 344} 345 346// see RFC 3720, 10.9.1 page 146 347/* 348 | NOTE: 349 | the call to isc_stop_receiver is a kludge, --- 39 unchanged lines hidden (view full) --- 389iscsi_reject(isc_session_t *sp, pduq_t *opq, pduq_t *pq) 390{ 391 union ccb *ccb = opq->ccb; 392 //reject_t *reject = &pq->pdu.ipdu.reject; 393 394 debug_called(8); 395 //XXX: check RFC 10.17.1 (page 176) 396 ccb->ccb_h.status = CAM_REQ_ABORTED; | 352 353 pdu_free(sp->isc, opq); 354} 355 356// see RFC 3720, 10.9.1 page 146 357/* 358 | NOTE: 359 | the call to isc_stop_receiver is a kludge, --- 39 unchanged lines hidden (view full) --- 399iscsi_reject(isc_session_t *sp, pduq_t *opq, pduq_t *pq) 400{ 401 union ccb *ccb = opq->ccb; 402 //reject_t *reject = &pq->pdu.ipdu.reject; 403 404 debug_called(8); 405 //XXX: check RFC 10.17.1 (page 176) 406 ccb->ccb_h.status = CAM_REQ_ABORTED; |
397 XPT_DONE(sp->isc, ccb); | 407 XPT_DONE(sp, ccb); |
398 399 pdu_free(sp->isc, opq); 400} 401 402/* 403 | deal with lun 404 */ 405static int 406dwl(isc_session_t *sp, int lun, u_char *lp) 407{ | 408 409 pdu_free(sp->isc, opq); 410} 411 412/* 413 | deal with lun 414 */ 415static int 416dwl(isc_session_t *sp, int lun, u_char *lp) 417{ |
408 int i; 409 | |
410 debug_called(8); | 418 debug_called(8); |
411 | 419 sdebug(4, "lun=%d", lun); |
412 /* 413 | mapping LUN to iSCSI LUN 414 | check the SAM-2 specs 415 | hint: maxLUNS is a small number, cam's LUN is 32bits 416 | iSCSI is 64bits, scsi is ? 417 */ 418 // XXX: check if this will pass the endian test 419 if(lun < 256) { --- 4 unchanged lines hidden (view full) --- 424 lp[0] = (1 << 5) | ((lun >> 8) & 0x3f); 425 lp[1] = lun & 0xff; 426 } 427 else { 428 xdebug("lun %d: is unsupported!", lun); 429 return -1; 430 } 431 | 420 /* 421 | mapping LUN to iSCSI LUN 422 | check the SAM-2 specs 423 | hint: maxLUNS is a small number, cam's LUN is 32bits 424 | iSCSI is 64bits, scsi is ? 425 */ 426 // XXX: check if this will pass the endian test 427 if(lun < 256) { --- 4 unchanged lines hidden (view full) --- 432 lp[0] = (1 << 5) | ((lun >> 8) & 0x3f); 433 lp[1] = lun & 0xff; 434 } 435 else { 436 xdebug("lun %d: is unsupported!", lun); 437 return -1; 438 } 439 |
432 for(i = 0; i < sp->target_nluns; i++) 433 if(sp->target_lun[i] == lun) 434 return 0; 435 if(sp->target_nluns < ISCSI_MAX_LUNS) 436 sp->target_lun[sp->target_nluns++] = lun; 437 438 sdebug(3, "nluns=%d lun=%d", sp->target_nluns, lun); 439 | |
440 return 0; 441} 442 443/* 444 | encapsulate the scsi command and 445 */ 446int 447scsi_encap(struct cam_sim *sim, union ccb *ccb) 448{ | 440 return 0; 441} 442 443/* 444 | encapsulate the scsi command and 445 */ 446int 447scsi_encap(struct cam_sim *sim, union ccb *ccb) 448{ |
449 struct isc_softc *isp = (struct isc_softc *)cam_sim_softc(sim); 450 isc_session_t *sp; | 449 isc_session_t *sp = cam_sim_softc(sim); |
451 struct ccb_scsiio *csio = &ccb->csio; 452 struct ccb_hdr *ccb_h = &ccb->ccb_h; 453 pduq_t *pq; 454 scsi_req_t *cmd; 455 456 debug_called(8); 457 458 debug(4, "ccb->sp=%p", ccb_h->spriv_ptr0); 459 sp = ccb_h->spriv_ptr0; 460 | 450 struct ccb_scsiio *csio = &ccb->csio; 451 struct ccb_hdr *ccb_h = &ccb->ccb_h; 452 pduq_t *pq; 453 scsi_req_t *cmd; 454 455 debug_called(8); 456 457 debug(4, "ccb->sp=%p", ccb_h->spriv_ptr0); 458 sp = ccb_h->spriv_ptr0; 459 |
461 if((pq = pdu_alloc(isp, M_NOWAIT)) == NULL) { | 460 if((pq = pdu_alloc(sp->isc, M_NOWAIT)) == NULL) { |
462 debug(2, "ccb->sp=%p", ccb_h->spriv_ptr0); 463 sdebug(1, "pdu_alloc failed sc->npdu_max=%d npdu_alloc=%d", 464 sp->isc->npdu_max, sp->isc->npdu_alloc); 465 while((pq = pdu_alloc(sp->isc, M_NOWAIT)) == NULL) { | 461 debug(2, "ccb->sp=%p", ccb_h->spriv_ptr0); 462 sdebug(1, "pdu_alloc failed sc->npdu_max=%d npdu_alloc=%d", 463 sp->isc->npdu_max, sp->isc->npdu_alloc); 464 while((pq = pdu_alloc(sp->isc, M_NOWAIT)) == NULL) { |
466 sdebug(3, "waiting..."); | 465 sdebug(2, "waiting..."); |
467#if __FreeBSD_version >= 700000 468 pause("isc_encap", 5*hz); 469#else 470 tsleep(sp->isc, 0, "isc_encap", 5*hz); 471#endif 472 } | 466#if __FreeBSD_version >= 700000 467 pause("isc_encap", 5*hz); 468#else 469 tsleep(sp->isc, 0, "isc_encap", 5*hz); 470#endif 471 } |
473#if 0 474 sdebug(3, "freezing"); 475 ccb->ccb_h.status = CAM_REQUEUE_REQ; 476 ic_freeze(sp); 477 return 0; 478#endif | |
479 } | 472 } |
480 481#if 0 482 if((sp->flags & ISC_FFPHASE) == 0) { 483 ccb->ccb_h.status = CAM_DEV_NOT_THERE; // CAM_NO_NEXUS; 484 sdebug(3, "no active session with target %d", ccb_h->target_id); 485 goto bad; 486 } 487#endif | |
488 cmd = &pq->pdu.ipdu.scsi_req; 489 cmd->opcode = ISCSI_SCSI_CMD; 490 cmd->F = 1; 491 /* 492 | map tag option, default is UNTAGGED 493 */ 494 switch(csio->tag_action) { 495 case MSG_SIMPLE_Q_TAG: cmd->attr = iSCSI_TASK_SIMPLE; break; | 473 cmd = &pq->pdu.ipdu.scsi_req; 474 cmd->opcode = ISCSI_SCSI_CMD; 475 cmd->F = 1; 476 /* 477 | map tag option, default is UNTAGGED 478 */ 479 switch(csio->tag_action) { 480 case MSG_SIMPLE_Q_TAG: cmd->attr = iSCSI_TASK_SIMPLE; break; |
496 case MSG_HEAD_OF_Q_TAG: cmd->attr = iSCSI_TASK_ORDER; break; 497 case MSG_ORDERED_Q_TAG: cmd->attr = iSCSI_TASK_HOFQ; break; | 481 case MSG_HEAD_OF_Q_TAG: cmd->attr = iSCSI_TASK_HOFQ; break; 482 case MSG_ORDERED_Q_TAG: cmd->attr = iSCSI_TASK_ORDER; break; |
498 case MSG_ACA_TASK: cmd->attr = iSCSI_TASK_ACA; break; 499 } 500 501 dwl(sp, ccb_h->target_lun, (u_char *)&cmd->lun); 502 503 if((ccb_h->flags & CAM_CDB_POINTER) != 0) { 504 if((ccb_h->flags & CAM_CDB_PHYS) == 0) { 505 if(csio->cdb_len > 16) { --- 21 unchanged lines hidden (view full) --- 527 pq->ccb = ccb; 528 /* 529 | place it in the out queue 530 */ 531 if(isc_qout(sp, pq) == 0) 532 return 1; 533 invalid: 534 ccb->ccb_h.status = CAM_REQ_INVALID; | 483 case MSG_ACA_TASK: cmd->attr = iSCSI_TASK_ACA; break; 484 } 485 486 dwl(sp, ccb_h->target_lun, (u_char *)&cmd->lun); 487 488 if((ccb_h->flags & CAM_CDB_POINTER) != 0) { 489 if((ccb_h->flags & CAM_CDB_PHYS) == 0) { 490 if(csio->cdb_len > 16) { --- 21 unchanged lines hidden (view full) --- 512 pq->ccb = ccb; 513 /* 514 | place it in the out queue 515 */ 516 if(isc_qout(sp, pq) == 0) 517 return 1; 518 invalid: 519 ccb->ccb_h.status = CAM_REQ_INVALID; |
535 pdu_free(isp, pq); | 520 pdu_free(sp->isc, pq); 521 |
536 return 0; 537} 538 539int 540scsi_decap(isc_session_t *sp, pduq_t *opq, pduq_t *pq) 541{ 542 union ccb *ccb = opq->ccb; 543 struct ccb_scsiio *csio = &ccb->csio; --- 24 unchanged lines hidden (view full) --- 568 caddr_t bp = NULL; // = mtod(pq->mp, caddr_t); 569 data_in_t *rcmd = &pq->pdu.ipdu.data_in; 570 571 if(cmd->R) { 572 sdebug(5, "copy to=%p from=%p l1=%d l2=%d mp@%p", 573 csio->data_ptr, bp? mtod(pq->mp, caddr_t): 0, 574 ntohl(cmd->edtlen), pq->pdu.ds_len, pq->mp); 575 if(ntohl(cmd->edtlen) >= pq->pdu.ds_len) { | 522 return 0; 523} 524 525int 526scsi_decap(isc_session_t *sp, pduq_t *opq, pduq_t *pq) 527{ 528 union ccb *ccb = opq->ccb; 529 struct ccb_scsiio *csio = &ccb->csio; --- 24 unchanged lines hidden (view full) --- 554 caddr_t bp = NULL; // = mtod(pq->mp, caddr_t); 555 data_in_t *rcmd = &pq->pdu.ipdu.data_in; 556 557 if(cmd->R) { 558 sdebug(5, "copy to=%p from=%p l1=%d l2=%d mp@%p", 559 csio->data_ptr, bp? mtod(pq->mp, caddr_t): 0, 560 ntohl(cmd->edtlen), pq->pdu.ds_len, pq->mp); 561 if(ntohl(cmd->edtlen) >= pq->pdu.ds_len) { |
576 int offset, len = pq->pdu.ds_len; | 562 int offset, len = pq->pdu.ds_len; |
577 578 if(pq->mp != NULL) { | 563 564 if(pq->mp != NULL) { |
579 caddr_t dp; | 565 caddr_t dp; |
580 | 566 |
581 offset = ntohl(rcmd->bo); 582 dp = csio->data_ptr + offset; 583 i_mbufcopy(pq->mp, dp, len); | 567 offset = ntohl(rcmd->bo); 568 dp = csio->data_ptr + offset; 569 i_mbufcopy(pq->mp, dp, len); 570 } |
584 } | 571 } |
585 } | |
586 else { 587 xdebug("edtlen=%d < ds_len=%d", 588 ntohl(cmd->edtlen), pq->pdu.ds_len); 589 } 590 } 591 if(rcmd->S) { 592 /* 593 | contains also the SCSI Status 594 */ | 572 else { 573 xdebug("edtlen=%d < ds_len=%d", 574 ntohl(cmd->edtlen), pq->pdu.ds_len); 575 } 576 } 577 if(rcmd->S) { 578 /* 579 | contains also the SCSI Status 580 */ |
595 _scsi_done(sp->isc, 0, rcmd->status, opq->ccb, NULL); | 581 _scsi_done(sp, 0, rcmd->status, opq->ccb, NULL); |
596 return 0; 597 } else 598 return 1; 599 } 600 break; 601 } 602 } 603 default: 604 sdebug(3, "opcode=%02x", bhp->opcode); 605 break; 606 } 607 } 608 /* 609 | XXX: error ... 610 */ 611 return 1; 612} | 582 return 0; 583 } else 584 return 1; 585 } 586 break; 587 } 588 } 589 default: 590 sdebug(3, "opcode=%02x", bhp->opcode); 591 break; 592 } 593 } 594 /* 595 | XXX: error ... 596 */ 597 return 1; 598} |