[40] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

Generic SCSI & patch77

daemon@ATHENA.MIT.EDU (jered@vorlon.mit.edu)
Mon Jan 30 23:45:14 1995

To: linux-scsi@vger.rutgers.edu
From: jered@vorlon.mit.edu
Date: Tue, 17 Jan 1995 11:52:32 -0500


In patch 1.1.77, after which generic SCSI support has not worked, there
were a number of changes which I do not understand. (Comments in the
patches are needed! :-) )

These seem to be related:
+++ linux/drivers/scsi/sg.c     Thu Jan  5 09:24:45 1995
@@ -116,6 +116,8 @@
    }
   if (!scsi_generics[dev].users)
    scsi_generics[dev].timeout=SG_DEFAULT_TIMEOUT;
+  if (scsi_generics[dev].device->host->hostt->usage_count)
+    (*scsi_generics[dev].device->host->hostt->usage_count)++;
   scsi_generics[dev].users++;
   return 0;
  }
@@ -124,6 +126,8 @@
  {
   int dev=MINOR(inode->i_rdev);
   scsi_generics[dev].users--;
+  if (scsi_generics[dev].device->host->hostt->usage_count)
+    (*scsi_generics[dev].device->host->hostt->usage_count)--;
   scsi_generics[dev].exclude=0;
   wake_up(&scsi_generics[dev].generic_wait);
  }

The next two appear to be correct, checking for proper command size (although
maybe I should change them back and try it out...)

The next, and final, patch seems to be some sort of interface change:
@@ -291,7 +311,8 @@
   printk("do cmd\n");
 #endif
   scsi_do_cmd (SCpnt,(void *) cmnd,
-               (void *) device->buff,amt,sg_command_done,device->timeout,SG_DEF
AULT_RETRIES);
+               (void *) device->buff,device->header.pack_len-size-sizeof(struct
 sg_header),
+              sg_command_done,device->timeout,SG_DEFAULT_RETRIES);
 #ifdef DEBUG
   printk("done cmd\n");
 #endif               

And...that's it. 5 patches total (Assuming the breakage is in sg.c). *sigh*

Jered
jered@mit.edu

home help back first fref pref prev next nref lref last post