USB: remove CVS keywords
[platform/kernel/linux-starfive.git] / drivers / usb / storage / isd200.c
index 2ae1e86..383abf2 100644 (file)
@@ -1,7 +1,5 @@
 /* Transport & Protocol Driver for In-System Design, Inc. ISD200 ASIC
  *
- * $Id: isd200.c,v 1.16 2002/04/22 03:39:43 mdharm Exp $
- *
  * Current development and maintenance:
  *   (C) 2001-2002 Björn Stenberg (bjorn@haxx.se)
  *
@@ -292,6 +290,7 @@ struct isd200_info {
 
        /* maximum number of LUNs supported */
        unsigned char MaxLUNs;
+       unsigned char cmnd[BLK_MAX_CDB];
        struct scsi_cmnd srb;
        struct scatterlist sg;
 };
@@ -450,6 +449,7 @@ static int isd200_action( struct us_data *us, int action,
 
        memset(&ata, 0, sizeof(ata));
        memset(&srb_dev, 0, sizeof(srb_dev));
+       srb->cmnd = info->cmnd;
        srb->device = &srb_dev;
        ++srb->serial_number;
 
@@ -584,7 +584,7 @@ static void isd200_invoke_transport( struct us_data *us,
        /* if the command gets aborted by the higher layers, we need to
         * short-circuit all other processing
         */
-       if (test_bit(US_FLIDX_TIMED_OUT, &us->flags)) {
+       if (test_bit(US_FLIDX_TIMED_OUT, &us->dflags)) {
                US_DEBUGP("-- command was aborted\n");
                goto Handle_Abort;
        }
@@ -631,7 +631,7 @@ static void isd200_invoke_transport( struct us_data *us,
 
        if (need_auto_sense) {
                result = isd200_read_regs(us);
-               if (test_bit(US_FLIDX_TIMED_OUT, &us->flags)) {
+               if (test_bit(US_FLIDX_TIMED_OUT, &us->dflags)) {
                        US_DEBUGP("-- auto-sense aborted\n");
                        goto Handle_Abort;
                }
@@ -661,7 +661,7 @@ static void isd200_invoke_transport( struct us_data *us,
        srb->result = DID_ABORT << 16;
 
        /* permit the reset transfer to take place */
-       clear_bit(US_FLIDX_ABORTING, &us->flags);
+       clear_bit(US_FLIDX_ABORTING, &us->dflags);
        /* Need reset here */
 }
 
@@ -1230,6 +1230,7 @@ static int isd200_get_inquiry_data( struct us_data *us )
            
                        /* Free driver structure */         
                        us->extra_destructor(info);
+                       kfree(info);
                        us->extra = NULL;
                        us->extra_destructor = NULL;
                }
@@ -1469,6 +1470,7 @@ static void isd200_free_info_ptrs(void *info_)
        if (info) {
                kfree(info->id);
                kfree(info->RegsBuf);
+               kfree(info->srb.sense_buffer);
        }
 }
 
@@ -1494,7 +1496,9 @@ static int isd200_init_info(struct us_data *us)
                                kzalloc(sizeof(struct hd_driveid), GFP_KERNEL);
                info->RegsBuf = (unsigned char *)
                                kmalloc(sizeof(info->ATARegs), GFP_KERNEL);
-               if (!info->id || !info->RegsBuf) {
+               info->srb.sense_buffer =
+                               kmalloc(SCSI_SENSE_BUFFERSIZE, GFP_KERNEL);
+               if (!info->id || !info->RegsBuf || !info->srb.sense_buffer) {
                        isd200_free_info_ptrs(info);
                        kfree(info);
                        retStatus = ISD200_ERROR;