Commit c7ea4b31 authored by Jan Beulich's avatar Jan Beulich Committed by Linus Torvalds

[PATCH] ide-floppy adjustments

Fix a build problem when IDEFLOPPY_DEBUG_BUGS is turned off, and eliminate an
access to memory that is no longer allocated (causing systems to fail booting
when CONFIG_DEBUG_PAGEALLOC is turned on).
Signed-off-by: default avatarJan Beulich <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent ef3daeda
......@@ -661,10 +661,12 @@ static void idefloppy_output_buffers (ide_drive_t *drive, idefloppy_pc_t *pc, un
idefloppy_do_end_request(drive, 1, done >> 9);
if (bcount) {
printk(KERN_ERR "%s: leftover data in idefloppy_output_buffers, bcount == %d\n", drive->name, bcount);
idefloppy_write_zeros(drive, bcount);
static void idefloppy_update_buffers (ide_drive_t *drive, idefloppy_pc_t *pc)
......@@ -1048,6 +1050,9 @@ static ide_startstop_t idefloppy_issue_pc (ide_drive_t *drive, idefloppy_pc_t *p
atapi_bcount_t bcount;
ide_handler_t *pkt_xfer_routine;
#if 0 /* Accessing floppy->pc is not valid here, the previous pc may be gone
and have lived on another thread's stack; that stack may have become
unmapped meanwhile (CONFIG_DEBUG_PAGEALLOC). */
if (floppy->pc->c[0] == IDEFLOPPY_REQUEST_SENSE_CMD &&
......@@ -1055,6 +1060,7 @@ static ide_startstop_t idefloppy_issue_pc (ide_drive_t *drive, idefloppy_pc_t *p
"Two request sense in serial were issued\n");
if (floppy->failed_pc == NULL &&
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment