small patch for ide-floppy driver

Paul Mackerras (paulus@cs.anu.edu.au)
Thu, 15 Oct 1998 10:45:55 +1000


The ide-floppy driver in the standard kernel sources will hang on boot
on my powermac G3 with an ATAPI ZIP drive. The following patch fixes
that. The first section of the patch is just cosmetic, it fixes a
printk that was missing a \n at the end. The second section adds a
line to idefloppy_create_read_capacity_cmd to make it set
pc->request_transfer. The other idefloppy_create_*_cmd procedures for
commands which transfer data all set pc->request_transfer, so I
suspect it was just an oversight.

Paul.

--- linux/drivers/block/ide-floppy.c Sun Oct 4 22:18:49 1998
+++ linux-pmac/drivers/block/ide-floppy.c Mon Oct 5 22:18:44 1998
@@ -868,7 +868,7 @@

if (status.b.check || test_bit (PC_DMA_ERROR, &pc->flags)) { /* Error detected */
#if IDEFLOPPY_DEBUG_LOG
- printk (KERN_INFO "ide-floppy: %s: I/O error, ",drive->name);
+ printk (KERN_INFO "ide-floppy: %s: I/O error\n",drive->name);
#endif /* IDEFLOPPY_DEBUG_LOG */
rq->errors++;
if (pc->c[0] == IDEFLOPPY_REQUEST_SENSE_CMD) {
@@ -1057,6 +1057,7 @@
pc->c[0] = IDEFLOPPY_READ_CAPACITY_CMD;
pc->c[7] = 255;
pc->c[8] = 255;
+ pc->request_transfer = 255;
}

/*

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/