]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/aic7xxx/aic79xx_osm.c
Pull motherboard into release branch
[linux-2.6-omap-h63xx.git] / drivers / scsi / aic7xxx / aic79xx_osm.c
index 0fbd1ec583400d7a9559e273c0a748563caf17ca..66e4a47bb9ee3fe85d72f6c2e0679d759dbd1fd6 100644 (file)
@@ -782,6 +782,7 @@ ahd_linux_bus_reset(struct scsi_cmnd *cmd)
 {
        struct ahd_softc *ahd;
        int    found;
+       unsigned long flags;
 
        ahd = *(struct ahd_softc **)cmd->device->host->hostdata;
 #ifdef AHD_DEBUG
@@ -789,8 +790,11 @@ ahd_linux_bus_reset(struct scsi_cmnd *cmd)
                printf("%s: Bus reset called for cmd %p\n",
                       ahd_name(ahd), cmd);
 #endif
+       ahd_lock(ahd, &flags);
+
        found = ahd_reset_channel(ahd, scmd_channel(cmd) + 'A',
                                  /*initiate reset*/TRUE);
+       ahd_unlock(ahd, &flags);
 
        if (bootverbose)
                printf("%s: SCSI bus reset delivered. "
@@ -1526,30 +1530,6 @@ ahd_linux_run_command(struct ahd_softc *ahd, struct ahd_linux_device *dev,
        if ((tstate->auto_negotiate & mask) != 0) {
                scb->flags |= SCB_AUTO_NEGOTIATE;
                scb->hscb->control |= MK_MESSAGE;
-               } else if (cmd->cmnd[0] == INQUIRY
-                       && (tinfo->curr.offset != 0
-                        || tinfo->curr.width != MSG_EXT_WDTR_BUS_8_BIT
-                        || tinfo->curr.ppr_options != 0)
-                       && (tinfo->curr.ppr_options & MSG_EXT_PPR_IU_REQ)==0) {
-                       /*
-                        * The SCSI spec requires inquiry
-                        * commands to complete without
-                        * reporting unit attention conditions.
-                        * Because of this, an inquiry command
-                        * that occurs just after a device is
-                        * reset will result in a data phase
-                        * with mismatched negotiated rates.
-                        * The core already forces a renegotiation
-                        * for reset events that are visible to
-                        * our controller or that we initiate,
-                        * but a third party device reset or a
-                        * hot-plug insertion can still cause this
-                        * issue.  Therefore, we force a re-negotiation
-                        * for every inquiry command unless we
-                        * are async.
-                        */
-                       scb->flags |= SCB_NEGOTIATE;
-                       scb->hscb->control |= MK_MESSAGE;
        }
 
        if ((dev->flags & (AHD_DEV_Q_TAGGED|AHD_DEV_Q_BASIC)) != 0) {