Skip to content

Commit

Permalink
[SCSI] aic7xx: mitigate HOST_MSG_LOOP invalid SCB ff panic
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
James Bottomley authored and James Bottomley committed Feb 18, 2008
1 parent cbccc20 commit 5e2f22d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions drivers/scsi/aic7xxx/aic7xxx_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5e2f22d

Please sign in to comment.