]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/st.h
es1968: fix sleep-while-holding-lock bug
[linux-2.6-omap-h63xx.git] / drivers / scsi / st.h
index 05a5cae126ec06e8c75c632821f8a6d8548236eb..5931726fcf93c8f6cd3df2235a4748af1a8b49ca 100644 (file)
@@ -3,6 +3,7 @@
 #define _ST_H
 
 #include <linux/completion.h>
+#include <linux/mutex.h>
 #include <linux/kref.h>
 #include <scsi/scsi_cmnd.h>
 
@@ -98,7 +99,7 @@ struct st_partstat {
 struct scsi_tape {
        struct scsi_driver *driver;
        struct scsi_device *device;
-       struct semaphore lock;  /* For serialization */
+       struct mutex lock;      /* For serialization */
        struct completion wait; /* For SCSI commands */
        struct st_buffer *buffer;
 
@@ -117,7 +118,8 @@ struct scsi_tape {
        unsigned char cln_sense_value;
        unsigned char cln_sense_mask;
        unsigned char use_pf;                   /* Set Page Format bit in all mode selects? */
-       unsigned char try_dio;                  /* try direct i/o? */
+       unsigned char try_dio;                  /* try direct i/o in general? */
+       unsigned char try_dio_now;              /* try direct i/o before next close? */
        unsigned char c_algo;                   /* compression algorithm */
        unsigned char pos_unknown;                      /* after reset position unknown */
        int tape_type;
@@ -162,7 +164,6 @@ struct scsi_tape {
        int nbr_requests;
        int nbr_dio;
        int nbr_pages;
-       int nbr_combinable;
        unsigned char last_cmnd[6];
        unsigned char last_sense[16];
 #endif