patch-2.2.16 linux/drivers/scsi/scsi.c

Next file: linux/drivers/scsi/sd.c
Previous file: linux/drivers/scsi/megaraid.c
Back to the patch index
Back to the overall index

diff -urN v2.2.15/linux/drivers/scsi/scsi.c linux/drivers/scsi/scsi.c
@@ -114,7 +114,6 @@
 #define BLIST_MAX5LUN	0x080
 #define BLIST_ISDISK	0x100
 #define BLIST_ISROM	0x200
-#define BLIST_GHOST	0x400
 
 /*
  * Data declarations.
@@ -307,13 +306,7 @@
 {"NEC","PD-1 ODX654P","*", BLIST_FORCELUN | BLIST_SINGLELUN},
 {"MATSHITA","PD-1","*", BLIST_FORCELUN | BLIST_SINGLELUN},
 {"iomega","jaz 1GB","J.86", BLIST_NOTQ | BLIST_NOLUN},
-{"CREATIVE","DVD-RAM RAM","*", BLIST_GHOST},
-{"MATSHITA","PD-2 LF-D100","*", BLIST_GHOST},
-{"AOpen","PD-2 DVD-520S","*", BLIST_GHOST},
-{"HITACHI","GF-1050","*", BLIST_GHOST},        /* Hitachi SCSI DVD-RAM */
 {"TOSHIBA","CDROM","*", BLIST_ISROM},
-{"TOSHIBA","DVD-RAM SD-W1101","*", BLIST_GHOST},
-{"TOSHIBA","DVD-RAM SD-W1111","*", BLIST_GHOST},
 {"MegaRAID", "LD", "*", BLIST_FORCELUN},
 /*
  * Must be at end of list...
@@ -677,8 +670,6 @@
   struct Scsi_Device_Template *sdtpnt;
   Scsi_Device * SDtail, *SDpnt=*SDpnt2;
   int bflags, type=-1;
-  static int ghost_channel=-1, ghost_dev=-1;
-  int org_lun = lun;
 
   SDpnt->host = shpnt;
   SDpnt->id = dev;
@@ -686,12 +677,6 @@
   SDpnt->channel = channel;
   SDpnt->online = TRUE;
 
-  if ((channel == ghost_channel) && (dev == ghost_dev) && (lun == 1)) {
-    SDpnt->lun = 0;
-  } else {
-    ghost_channel = ghost_dev = -1;
-  }
-
   /* Some low level driver could use device->type (DB) */
   SDpnt->type = -1;
 
@@ -804,17 +789,6 @@
     scsi_result[1] |= 0x80;     /* removable */
   }
 
-  if (bflags & BLIST_GHOST) {
-    if ((ghost_channel == channel) && (ghost_dev == dev) && (org_lun == 1)) {
-      lun=1;
-    } else {
-      ghost_channel = channel;
-      ghost_dev = dev;
-      scsi_result[0] = TYPE_MOD;
-      scsi_result[1] |= 0x80;     /* removable */
-    }
-  }
-
   memcpy (SDpnt->vendor, scsi_result + 8, 8);
   memcpy (SDpnt->model, scsi_result + 16, 16);
   memcpy (SDpnt->rev, scsi_result + 32, 4);
@@ -1003,15 +977,6 @@
   }
 
   /*
-   * If this device is Ghosted, scan upto two luns. (It physically only
-   * has one). -- REW
-   */
-  if (bflags & BLIST_GHOST) {
-    *max_dev_lun = 2;
-    return 1;
-  }
-
-  /*
    * REGAL CDC-4X: avoid hang after LUN 4
    */
   if (bflags & BLIST_MAX5LUN) {
@@ -2500,6 +2465,8 @@
              * Nobody is using this device any more.
              * Free all of the command structures.
              */
+	    if (HBA_ptr->hostt->revoke)
+		    HBA_ptr->hostt->revoke(scd);
             for(SCpnt=scd->device_queue; SCpnt; SCpnt = scd->device_queue)
             {
                 scd->device_queue = SCpnt->next;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)