summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2008-02-12 15:55:48 -0600
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-02-18 08:57:17 -0600
commit5e2f22d39ec29c33bc5a3a558ac545b952aab8b7 (patch)
tree2233a93537c41fb235ee16197e618462605f710e /drivers/scsi/aic7xxx
parentcbccc207128e8bbdb047f6c5fc261acf207749c1 (diff)
downloadlinux-5e2f22d39ec29c33bc5a3a558ac545b952aab8b7.tar.bz2
[SCSI] aic7xx: mitigate HOST_MSG_LOOP invalid SCB ff panic
The panic occurs if we get a MSGIN or MSGOUT for an unidentified SCB (meaning we didn't identify the outstanding command it was for). For MSGIN this is wrong because it could be an unsolicited negotiation MSGIN from the target. Still panic on unsolicited MSGOUT because this would represent a mistake in the negotiation phases. However, we should fix this as well. The specs say we should go to bus free for unexpected msgin. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/aic7xxx')
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_core.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_core.c b/drivers/scsi/aic7xxx/aic7xxx_core.c
index 6d2ae641273c..64e62ce59c15 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_core.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_core.c
@@ -695,15 +695,16 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat)
scb_index = ahc_inb(ahc, SCB_TAG);
scb = ahc_lookup_scb(ahc, scb_index);
if (devinfo.role == ROLE_INITIATOR) {
- if (scb == NULL)
- panic("HOST_MSG_LOOP with "
- "invalid SCB %x\n", scb_index);
+ if (bus_phase == P_MESGOUT) {
+ if (scb == NULL)
+ panic("HOST_MSG_LOOP with "
+ "invalid SCB %x\n",
+ scb_index);
- if (bus_phase == P_MESGOUT)
ahc_setup_initiator_msgout(ahc,
&devinfo,
scb);
- else {
+ } else {
ahc->msg_type =
MSG_TYPE_INITIATOR_MSGIN;
ahc->msgin_index = 0;