Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / drivers / scsi / ide-scsi.c
index 94d1de5..39b760a 100644 (file)
@@ -34,6 +34,7 @@
 #define IDESCSI_VERSION "0.92"
 
 #include <linux/module.h>
+#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/string.h>
 #include <linux/kernel.h>
@@ -517,7 +518,7 @@ static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive)
                /* No more interrupts */
                if (test_bit(IDESCSI_LOG_CMD, &scsi->log))
                        printk (KERN_INFO "Packet command completed, %d bytes transferred\n", pc->actually_transferred);
-               local_irq_enable_in_hardirq();
+               local_irq_enable();
                if (status.b.check)
                        rq->errors++;
                idescsi_end_request (drive, 1, 0);
@@ -599,7 +600,8 @@ static ide_startstop_t idescsi_transfer_pc(ide_drive_t *drive)
                                "issuing a packet command\n");
                return ide_do_reset (drive);
        }
-       BUG_ON(HWGROUP(drive)->handler != NULL);
+       if (HWGROUP(drive)->handler != NULL)
+               BUG();
        /* Set the interrupt routine */
        ide_set_handler(drive, &idescsi_pc_intr, get_timeout(pc), idescsi_expiry);
        /* Send the actual packet */
@@ -689,7 +691,8 @@ static ide_startstop_t idescsi_issue_pc (ide_drive_t *drive, idescsi_pc_t *pc)
                set_bit(PC_DMA_OK, &pc->flags);
 
        if (test_bit(IDESCSI_DRQ_INTERRUPT, &scsi->flags)) {
-               BUG_ON(HWGROUP(drive)->handler != NULL);
+               if (HWGROUP(drive)->handler != NULL)
+                       BUG();
                ide_set_handler(drive, &idescsi_transfer_pc,
                                get_timeout(pc), idescsi_expiry);
                /* Issue the packet command */