patch-2.2.0-pre1 linux/drivers/scsi/st.c

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

diff -u --recursive --new-file v2.1.132/linux/drivers/scsi/st.c linux/drivers/scsi/st.c
@@ -11,7 +11,7 @@
   Copyright 1992 - 1998 Kai Makisara
 		 email Kai.Makisara@metla.fi
 
-  Last modified: Sun Sep  6 09:34:49 1998 by root@home
+  Last modified: Thu Dec  3 20:27:46 1998 by makisara@home
   Some small formal changes - aeb, 950809
 */
 
@@ -707,7 +707,7 @@
       STp->density = 0;   	/* Clear the erroneous "residue" */
       STp->write_prot = 0;
       STp->block_size = 0;
-      STp->ps[0].drv_file = STp->ps[0].drv_block = 0;
+      STp->ps[0].drv_file = STp->ps[0].drv_block = (-1);
       STp->partition = STp->new_partition = 0;
       STp->door_locked = ST_UNLOCKED;
       STp->in_use = 1;
@@ -785,6 +785,7 @@
 	  !enlarge_buffer(STp->buffer, STp->block_size, STp->restr_dma)) {
 	printk(KERN_NOTICE "st%d: Blocksize %d too large for buffer.\n", dev,
 	       STp->block_size);
+	scsi_release_command(SCpnt);
 	(STp->buffer)->in_use = 0;
 	STp->buffer = NULL;
 	if (scsi_tapes[dev].device->host->hostt->module)
@@ -3414,8 +3415,8 @@
      STps->eof = ST_NOEOF;
      STps->at_sm = 0;
      STps->last_block_valid = FALSE;
-     STps->drv_block = 0;
-     STps->drv_file = 0;
+     STps->drv_block = (-1);
+     STps->drv_file = (-1);
    }
 
    tpnt->current_mode = 0;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov