[SCSI] Consolidate REQ_BLOCK_PC handling path (fix ipod panic)
[powerpc.git] / include / scsi / scsi_cmnd.h
index 9957f16..20da282 100644 (file)
@@ -4,6 +4,7 @@
 #include <linux/dma-mapping.h>
 #include <linux/list.h>
 #include <linux/types.h>
+#include <linux/timer.h>
 
 struct request;
 struct scatterlist;
@@ -51,12 +52,16 @@ struct scsi_cmnd {
         * printk's to use ->pid, so that we can kill this field.
         */
        unsigned long serial_number;
+       /*
+        * This is set to jiffies as it was when the command was first
+        * allocated.  It is used to time how long the command has
+        * been outstanding
+        */
+       unsigned long jiffies_at_alloc;
 
        int retries;
        int allowed;
        int timeout_per_command;
-       int timeout_total;
-       int timeout;
 
        unsigned char cmd_len;
        unsigned char old_cmd_len;
@@ -142,9 +147,10 @@ struct scsi_cmnd {
 #define SCSI_STATE_MLQUEUE         0x100b
 
 
-extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, int);
+extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, gfp_t);
 extern void scsi_put_command(struct scsi_cmnd *);
 extern void scsi_io_completion(struct scsi_cmnd *, unsigned int, unsigned int);
 extern void scsi_finish_command(struct scsi_cmnd *cmd);
+extern void scsi_setup_blk_pc_cmnd(struct scsi_cmnd *cmd, int retries);
 
 #endif /* _SCSI_SCSI_CMND_H */