patch-2.3.38 linux/drivers/scsi/sr.c

Next file: linux/drivers/sgi/char/graphics.c
Previous file: linux/drivers/scsi/sg.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.37/linux/drivers/scsi/sr.c linux/drivers/scsi/sr.c
@@ -267,7 +267,6 @@
 		/*
 		 * Umm, yeah, right.   Swapping to a cdrom.  Nice try.
 		 */
-		SCpnt = scsi_end_request(SCpnt, 0, SCpnt->request.nr_sectors);
 		return 0;
 	}
 	SCSI_LOG_HLQUEUE(1, printk("Doing sr request, dev = %d, block = %d\n", devm, block));
@@ -276,7 +275,6 @@
 	    !scsi_CDs[dev].device ||
 	    !scsi_CDs[dev].device->online) {
 		SCSI_LOG_HLQUEUE(2, printk("Finishing %ld sectors\n", SCpnt->request.nr_sectors));
-		SCpnt = scsi_end_request(SCpnt, 0, SCpnt->request.nr_sectors);
 		SCSI_LOG_HLQUEUE(2, printk("Retry with 0x%p\n", SCpnt));
 		return 0;
 	}
@@ -286,7 +284,6 @@
 		 * bit has been reset
 		 */
 		/* printk("SCSI disk has been changed. Prohibiting further I/O.\n"); */
-		SCpnt = scsi_end_request(SCpnt, 0, SCpnt->request.nr_sectors);
 		return 0;
 	}
 	/*
@@ -300,14 +297,12 @@
 			printk("sr: can't switch blocksize: in interrupt\n");
 	}
 	if (SCpnt->request.cmd == WRITE) {
-		SCpnt = scsi_end_request(SCpnt, 0, SCpnt->request.nr_sectors);
 		return 0;
 	}
 	if (scsi_CDs[dev].device->sector_size == 1024) {
 		if ((block & 1) || (SCpnt->request.nr_sectors & 1)) {
 			printk("sr.c:Bad 1K block number requested (%d %ld)",
                                block, SCpnt->request.nr_sectors);
-			SCpnt = scsi_end_request(SCpnt, 0, SCpnt->request.nr_sectors);
 			return 0;
 		} else {
 			block = block >> 1;
@@ -318,7 +313,6 @@
 		if ((block & 3) || (SCpnt->request.nr_sectors & 3)) {
 			printk("sr.c:Bad 2K block number requested (%d %ld)",
                                block, SCpnt->request.nr_sectors);
-			SCpnt = scsi_end_request(SCpnt, 0, SCpnt->request.nr_sectors);
 			return 0;
 		} else {
 			block = block >> 2;
@@ -328,7 +322,6 @@
 	switch (SCpnt->request.cmd) {
 	case WRITE:
 		if (!scsi_CDs[dev].device->writeable) {
-			SCpnt = scsi_end_request(SCpnt, 0, SCpnt->request.nr_sectors);
 			return 0;
 		}
 		SCpnt->cmnd[0] = WRITE_10;

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