Correct the reporting of the queue full condition so that the XPT layer

can properly throttle tags.

Add diagnostic printfs for firmware result codes that we encounter but
don't know anything about.
This commit is contained in:
Justin T. Gibbs 1998-10-29 17:41:34 +00:00
parent a8bdc29849
commit b4be89561b
2 changed files with 13 additions and 6 deletions
sys/dev/advansys

@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: advansys.c,v 1.3 1998/10/07 03:32:56 gibbs Exp $
* $Id: advansys.c,v 1.4 1998/10/15 23:47:14 gibbs Exp $
*/
/*
* Ported from:
@ -1048,7 +1048,9 @@ adv_done(struct adv_softc *adv, union ccb *ccb, u_int done_stat,
ccb->ccb_h.status = CAM_SEL_TIMEOUT;
break;
default:
/* QHSTA error occurred */
xpt_print_path(ccb->ccb_h.path);
printf("adv_done - queue done without error, "
"unknown host status %x\n", host_stat);
/* XXX Can I get more explicit information here? */
ccb->ccb_h.status = CAM_REQ_CMP_ERR;
break;
@ -1084,6 +1086,9 @@ adv_done(struct adv_softc *adv, union ccb *ccb, u_int done_stat,
ccb->ccb_h.status = CAM_SEL_TIMEOUT;
break;
default:
xpt_print_path(ccb->ccb_h.path);
printf("adv_done - queue done with error, "
"unknown host status %x\n", host_stat);
/* XXX Can I get more explicit information here? */
ccb->ccb_h.status = CAM_REQ_CMP_ERR;
break;
@ -1097,7 +1102,9 @@ adv_done(struct adv_softc *adv, union ccb *ccb, u_int done_stat,
break;
default:
printf("adv_done: Unknown done status 0x%x\n", done_stat);
xpt_print_path(ccb->ccb_h.path);
printf("adv_done - queue done with unknown status %x:%x\n",
done_stat, host_stat);
ccb->ccb_h.status = CAM_REQ_CMP_ERR;
break;
}

@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: advlib.c,v 1.7 1998/10/07 03:32:57 gibbs Exp $
* $Id: advlib.c,v 1.8 1998/10/09 21:40:50 gibbs Exp $
*/
/*
* Ported from:
@ -1031,7 +1031,8 @@ adv_isr_chip_halted(struct adv_softc *adv)
ccb = (union ccb *) adv_read_lram_32(adv, halt_q_addr
+ ADV_SCSIQ_D_CCBPTR);
xpt_freeze_devq(ccb->ccb_h.path, /*count*/1);
ccb->ccb_h.status |= CAM_DEV_QFRZN;
ccb->ccb_h.status |= CAM_DEV_QFRZN|CAM_SCSI_STATUS_ERROR;
ccb->csio.scsi_status = SCSI_STATUS_QUEUE_FULL;
adv_abort_ccb(adv, tid_no, ADV_TIX_TO_LUN(target_ix),
/*ccb*/NULL, CAM_REQUEUE_REQ,
/*queued_only*/TRUE);
@ -1970,7 +1971,6 @@ adv_abort_ccb(struct adv_softc *adv, int target, int lun, union ccb *ccb,
struct adv_ccb_info *cinfo;
scsiq->q_status |= QS_ABORTED;
scsiq->d3.done_stat = QD_ABORTED_BY_HOST;
adv_write_lram_8(adv, q_addr + ADV_SCSIQ_B_STATUS,
scsiq->q_status);
aborted_ccb = (union ccb *)scsiq->d2.ccb_ptr;