]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/aic7xxx/aic7xxx_core.c
[SCSI] aic7xx: mitigate HOST_MSG_LOOP invalid SCB ff panic
[linux-2.6-omap-h63xx.git] / drivers / scsi / aic7xxx / aic7xxx_core.c
index 6d2ae641273c9fe56826043fb623761fe1063bb9..64e62ce59c152fbedf5495021d0b7d3a6f9e536e 100644 (file)
@@ -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;