diff options
Diffstat (limited to 'drivers/ide/ide-floppy.c')
-rw-r--r-- | drivers/ide/ide-floppy.c | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index 317ec62c33d4..d1a79e8e0d69 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -74,7 +74,7 @@ static int ide_floppy_end_request(ide_drive_t *drive, int uptodate, int nsecs) | |||
74 | struct request *rq = drive->hwif->rq; | 74 | struct request *rq = drive->hwif->rq; |
75 | int error; | 75 | int error; |
76 | 76 | ||
77 | ide_debug_log(IDE_DBG_FUNC, "Call %s\n", __func__); | 77 | ide_debug_log(IDE_DBG_FUNC, "enter"); |
78 | 78 | ||
79 | switch (uptodate) { | 79 | switch (uptodate) { |
80 | case 0: | 80 | case 0: |
@@ -121,7 +121,7 @@ static void ide_floppy_callback(ide_drive_t *drive, int dsc) | |||
121 | struct ide_atapi_pc *pc = drive->pc; | 121 | struct ide_atapi_pc *pc = drive->pc; |
122 | int uptodate = pc->error ? 0 : 1; | 122 | int uptodate = pc->error ? 0 : 1; |
123 | 123 | ||
124 | ide_debug_log(IDE_DBG_FUNC, "Call %s\n", __func__); | 124 | ide_debug_log(IDE_DBG_FUNC, "enter"); |
125 | 125 | ||
126 | if (floppy->failed_pc == pc) | 126 | if (floppy->failed_pc == pc) |
127 | floppy->failed_pc = NULL; | 127 | floppy->failed_pc = NULL; |
@@ -140,11 +140,11 @@ static void ide_floppy_callback(ide_drive_t *drive, int dsc) | |||
140 | (u16)get_unaligned((u16 *)&buf[16]) : 0x10000; | 140 | (u16)get_unaligned((u16 *)&buf[16]) : 0x10000; |
141 | 141 | ||
142 | if (floppy->failed_pc) | 142 | if (floppy->failed_pc) |
143 | ide_debug_log(IDE_DBG_PC, "pc = %x, ", | 143 | ide_debug_log(IDE_DBG_PC, "pc = %x", |
144 | floppy->failed_pc->c[0]); | 144 | floppy->failed_pc->c[0]); |
145 | 145 | ||
146 | ide_debug_log(IDE_DBG_SENSE, "sense key = %x, asc = %x," | 146 | ide_debug_log(IDE_DBG_SENSE, "sense key = %x, asc = %x," |
147 | "ascq = %x\n", floppy->sense_key, | 147 | "ascq = %x", floppy->sense_key, |
148 | floppy->asc, floppy->ascq); | 148 | floppy->asc, floppy->ascq); |
149 | } else | 149 | } else |
150 | printk(KERN_ERR PFX "Error in REQUEST SENSE itself - " | 150 | printk(KERN_ERR PFX "Error in REQUEST SENSE itself - " |
@@ -193,7 +193,7 @@ static ide_startstop_t idefloppy_issue_pc(ide_drive_t *drive, | |||
193 | return ide_stopped; | 193 | return ide_stopped; |
194 | } | 194 | } |
195 | 195 | ||
196 | ide_debug_log(IDE_DBG_FUNC, "%s: Retry #%d\n", __func__, pc->retries); | 196 | ide_debug_log(IDE_DBG_FUNC, "retry #%d", pc->retries); |
197 | 197 | ||
198 | pc->retries++; | 198 | pc->retries++; |
199 | 199 | ||
@@ -242,8 +242,7 @@ static void idefloppy_create_rw_cmd(ide_drive_t *drive, | |||
242 | int blocks = rq->nr_sectors / floppy->bs_factor; | 242 | int blocks = rq->nr_sectors / floppy->bs_factor; |
243 | int cmd = rq_data_dir(rq); | 243 | int cmd = rq_data_dir(rq); |
244 | 244 | ||
245 | ide_debug_log(IDE_DBG_FUNC, "%s: block: %d, blocks: %d\n", __func__, | 245 | ide_debug_log(IDE_DBG_FUNC, "block: %d, blocks: %d", block, blocks); |
246 | block, blocks); | ||
247 | 246 | ||
248 | ide_init_pc(pc); | 247 | ide_init_pc(pc); |
249 | pc->c[0] = cmd == READ ? GPCMD_READ_10 : GPCMD_WRITE_10; | 248 | pc->c[0] = cmd == READ ? GPCMD_READ_10 : GPCMD_WRITE_10; |
@@ -287,15 +286,10 @@ static ide_startstop_t ide_floppy_do_request(ide_drive_t *drive, | |||
287 | ide_hwif_t *hwif = drive->hwif; | 286 | ide_hwif_t *hwif = drive->hwif; |
288 | struct ide_atapi_pc *pc; | 287 | struct ide_atapi_pc *pc; |
289 | 288 | ||
290 | ide_debug_log(IDE_DBG_FUNC, "%s: dev: %s, cmd: 0x%x, cmd_type: %x, " | 289 | if (drive->debug_mask & IDE_DBG_RQ) |
291 | "errors: %d\n", | 290 | blk_dump_rq_flags(rq, (rq->rq_disk |
292 | __func__, rq->rq_disk ? rq->rq_disk->disk_name : "?", | 291 | ? rq->rq_disk->disk_name |
293 | rq->cmd[0], rq->cmd_type, rq->errors); | 292 | : "dev?")); |
294 | |||
295 | ide_debug_log(IDE_DBG_FUNC, "%s: sector: %ld, nr_sectors: %ld, " | ||
296 | "current_nr_sectors: %d\n", | ||
297 | __func__, (long)rq->sector, rq->nr_sectors, | ||
298 | rq->current_nr_sectors); | ||
299 | 293 | ||
300 | if (rq->errors >= ERROR_MAX) { | 294 | if (rq->errors >= ERROR_MAX) { |
301 | if (floppy->failed_pc) | 295 | if (floppy->failed_pc) |
@@ -438,8 +432,9 @@ static int ide_floppy_get_capacity(ide_drive_t *drive) | |||
438 | length = be16_to_cpup((__be16 *)&pc.buf[desc_start + 6]); | 432 | length = be16_to_cpup((__be16 *)&pc.buf[desc_start + 6]); |
439 | 433 | ||
440 | ide_debug_log(IDE_DBG_PROBE, "Descriptor %d: %dkB, %d blocks, " | 434 | ide_debug_log(IDE_DBG_PROBE, "Descriptor %d: %dkB, %d blocks, " |
441 | "%d sector size\n", | 435 | "%d sector size", |
442 | i, blocks * length / 1024, blocks, length); | 436 | i, blocks * length / 1024, |
437 | blocks, length); | ||
443 | 438 | ||
444 | if (i) | 439 | if (i) |
445 | continue; | 440 | continue; |
@@ -495,8 +490,8 @@ static int ide_floppy_get_capacity(ide_drive_t *drive) | |||
495 | "in drive\n", drive->name); | 490 | "in drive\n", drive->name); |
496 | break; | 491 | break; |
497 | } | 492 | } |
498 | ide_debug_log(IDE_DBG_PROBE, "Descriptor 0 Code: %d\n", | 493 | ide_debug_log(IDE_DBG_PROBE, "Descriptor 0 Code: %d", |
499 | pc.buf[desc_start + 4] & 0x03); | 494 | pc.buf[desc_start + 4] & 0x03); |
500 | } | 495 | } |
501 | 496 | ||
502 | /* Clik! disk does not support get_flexible_disk_page */ | 497 | /* Clik! disk does not support get_flexible_disk_page */ |