pcmcia: pass FORCED_PULSE parameter in pcmcia_request_configuration()
[safe/jmp/linux-2.6] / drivers / scsi / ncr53c8xx.c
index d892894..d013a2a 100644 (file)
@@ -98,6 +98,7 @@
 #include <linux/delay.h>
 #include <linux/dma-mapping.h>
 #include <linux/errno.h>
+#include <linux/gfp.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
@@ -4170,8 +4171,8 @@ static int ncr_queue_command (struct ncb *np, struct scsi_cmnd *cmd)
        **
        **----------------------------------------------------
        */
-       if (np->settle_time && cmd->timeout_per_command >= HZ) {
-               u_long tlimit = jiffies + cmd->timeout_per_command - HZ;
+       if (np->settle_time && cmd->request->timeout >= HZ) {
+               u_long tlimit = jiffies + cmd->request->timeout - HZ;
                if (time_after(np->settle_time, tlimit))
                        np->settle_time = tlimit;
        }
@@ -5444,7 +5445,7 @@ static void ncr_getsync(struct ncb *np, u_char sfac, u_char *fakp, u_char *scntl
        **      input speed faster than the period.
        */
        kpc = per * clk;
-       while (--div >= 0)
+       while (--div > 0)
                if (kpc >= (div_10M[div] << 2)) break;
 
        /*
@@ -6495,7 +6496,7 @@ static void ncr_int_ma (struct ncb *np)
        **      we force a SIR_NEGO_PROTO interrupt (it is a hack that avoids 
        **      bloat for such a should_not_happen situation).
        **      In all other situation, we reset the BUS.
-       **      Are these assumptions reasonnable ? (Wait and see ...)
+       **      Are these assumptions reasonable ? (Wait and see ...)
        */
 unexpected_phase:
        dsp -= 8;
@@ -8186,7 +8187,7 @@ static void insert_into_waiting_list(struct ncb *np, struct scsi_cmnd *cmd)
        cmd->next_wcmd = NULL;
        if (!(wcmd = np->waiting_list)) np->waiting_list = cmd;
        else {
-               while ((wcmd->next_wcmd) != 0)
+               while (wcmd->next_wcmd)
                        wcmd = (struct scsi_cmnd *) wcmd->next_wcmd;
                wcmd->next_wcmd = (char *) cmd;
        }
@@ -8222,7 +8223,7 @@ static void process_waiting_list(struct ncb *np, int sts)
 #ifdef DEBUG_WAITING_LIST
        if (waiting_list) printk("%s: waiting_list=%lx processing sts=%d\n", ncr_name(np), (u_long) waiting_list, sts);
 #endif
-       while ((wcmd = waiting_list) != 0) {
+       while ((wcmd = waiting_list) != NULL) {
                waiting_list = (struct scsi_cmnd *) wcmd->next_wcmd;
                wcmd->next_wcmd = NULL;
                if (sts == DID_OK) {