diff options
author | Christopher Pascoe <pascoe@cvs.openbsd.org> | 2007-04-12 04:41:00 +0000 |
---|---|---|
committer | Christopher Pascoe <pascoe@cvs.openbsd.org> | 2007-04-12 04:41:00 +0000 |
commit | 713b6626e7fa8eb042aa3ed6287f8a4f41dc6ea4 (patch) | |
tree | 98d59d330c288314a399ed520ed73cb576ed76cc /sys/dev/ic | |
parent | b42b8d240cd8a579a3e3740dccf7c74a43c2c738 (diff) |
Oops, a code rearrangement meant that I didn't initialise the failed ccb
pointer for problematic non-NCQ commands.
spotted by and ok dlg@
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/sili.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/ic/sili.c b/sys/dev/ic/sili.c index f0cc325d2ea..0c1b976b758 100644 --- a/sys/dev/ic/sili.c +++ b/sys/dev/ic/sili.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sili.c,v 1.31 2007/04/10 09:08:19 dlg Exp $ */ +/* $OpenBSD: sili.c,v 1.32 2007/04/12 04:40:59 pascoe Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> @@ -237,6 +237,7 @@ sili_port_intr(struct sili_port *sp, int timeout_slot) sili_pwrite(sp, SILI_PREG_IS, SILI_PREG_IS_CMDERR); err_slot = SILI_PREG_PCS_ACTIVE(sili_pread(sp, SILI_PREG_PCS)); err_code = sili_pread(sp, SILI_PREG_CE); + ccb = &sp->sp_ccbs[err_slot]; switch (err_code) { case SILI_PREG_CE_DEVICEERROR: @@ -252,8 +253,11 @@ sili_port_intr(struct sili_port *sp, int timeout_slot) break; /* Extract real NCQ error slot & RFIS from log page. */ - if (!sili_read_ncq_error(sp, &err_slot)) + if (!sili_read_ncq_error(sp, &err_slot)) { + /* got real err_slot */ + ccb = &sp->sp_ccbs[err_slot]; break; + } /* failed to get error or not NCQ */ @@ -282,7 +286,6 @@ sili_port_intr(struct sili_port *sp, int timeout_slot) /* Clear the failed commmand in saved PSS so cmd_done runs. */ pss_saved &= ~(1 << err_slot); - ccb = &sp->sp_ccbs[err_slot]; KASSERT(ccb->ccb_xa.state == ATA_S_ONCHIP); ccb->ccb_xa.state = ATA_S_ERROR; |