diff options
author | Borislav Petkov <petkovbb@googlemail.com> | 2008-10-17 12:09:14 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-17 12:09:14 -0400 |
commit | 71b429ca4d5cb78a889128955a6ab891c5ab2a46 (patch) | |
tree | e6e15215621472699c18488fff2597ec36871ae5 /drivers/ide/ide-cd.c | |
parent | 806f80a6fc203ad0bde84e5a9e94572617d2ae45 (diff) |
ide-cd: debug log enhancements
Add some more verbosity to key function calls in ide-cd debug code. While at it,
delete a superfluous comment.
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r-- | drivers/ide/ide-cd.c | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 32073666b9ca..c36cab5785df 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -340,8 +340,8 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret) | |||
340 | } | 340 | } |
341 | 341 | ||
342 | ide_debug_log(IDE_DBG_RQ, "%s: stat: 0x%x, good_stat: 0x%x, " | 342 | ide_debug_log(IDE_DBG_RQ, "%s: stat: 0x%x, good_stat: 0x%x, " |
343 | "rq->cmd_type: 0x%x, err: 0x%x\n", __func__, stat, | 343 | "rq->cmd[0]: 0x%x, rq->cmd_type: 0x%x, err: 0x%x\n", |
344 | good_stat, rq->cmd_type, err); | 344 | __func__, stat, good_stat, rq->cmd[0], rq->cmd_type, err); |
345 | 345 | ||
346 | if (blk_sense_request(rq)) { | 346 | if (blk_sense_request(rq)) { |
347 | /* | 347 | /* |
@@ -849,7 +849,8 @@ static void ide_cd_restore_request(ide_drive_t *drive, struct request *rq) | |||
849 | static void ide_cd_request_sense_fixup(ide_drive_t *drive, struct request *rq) | 849 | static void ide_cd_request_sense_fixup(ide_drive_t *drive, struct request *rq) |
850 | { | 850 | { |
851 | 851 | ||
852 | ide_debug_log(IDE_DBG_FUNC, "Call %s\n", __func__); | 852 | ide_debug_log(IDE_DBG_FUNC, "Call %s, rq->cmd[0]: 0x%x\n", |
853 | __func__, rq->cmd[0]); | ||
853 | 854 | ||
854 | /* | 855 | /* |
855 | * Some of the trailing request sense fields are optional, | 856 | * Some of the trailing request sense fields are optional, |
@@ -876,7 +877,7 @@ int ide_cd_queue_pc(ide_drive_t *drive, const unsigned char *cmd, | |||
876 | if (!sense) | 877 | if (!sense) |
877 | sense = &local_sense; | 878 | sense = &local_sense; |
878 | 879 | ||
879 | ide_debug_log(IDE_DBG_PC, "Call %s, rq->cmd[0]: 0x%x, write: 0x%x, " | 880 | ide_debug_log(IDE_DBG_PC, "Call %s, cmd[0]: 0x%x, write: 0x%x, " |
880 | "timeout: %d, cmd_flags: 0x%x\n", __func__, cmd[0], write, | 881 | "timeout: %d, cmd_flags: 0x%x\n", __func__, cmd[0], write, |
881 | timeout, cmd_flags); | 882 | timeout, cmd_flags); |
882 | 883 | ||
@@ -1177,8 +1178,9 @@ static ide_startstop_t cdrom_start_rw(ide_drive_t *drive, struct request *rq) | |||
1177 | unsigned short sectors_per_frame = | 1178 | unsigned short sectors_per_frame = |
1178 | queue_hardsect_size(drive->queue) >> SECTOR_BITS; | 1179 | queue_hardsect_size(drive->queue) >> SECTOR_BITS; |
1179 | 1180 | ||
1180 | ide_debug_log(IDE_DBG_RQ, "Call %s, write: 0x%x, secs_per_frame: %u\n", | 1181 | ide_debug_log(IDE_DBG_RQ, "Call %s, rq->cmd[0]: 0x%x, write: 0x%x, " |
1181 | __func__, write, sectors_per_frame); | 1182 | "secs_per_frame: %u\n", |
1183 | __func__, rq->cmd[0], write, sectors_per_frame); | ||
1182 | 1184 | ||
1183 | if (write) { | 1185 | if (write) { |
1184 | /* disk has become write protected */ | 1186 | /* disk has become write protected */ |
@@ -1221,7 +1223,8 @@ static ide_startstop_t cdrom_do_newpc_cont(ide_drive_t *drive) | |||
1221 | static void cdrom_do_block_pc(ide_drive_t *drive, struct request *rq) | 1223 | static void cdrom_do_block_pc(ide_drive_t *drive, struct request *rq) |
1222 | { | 1224 | { |
1223 | 1225 | ||
1224 | ide_debug_log(IDE_DBG_PC, "Call %s, rq->cmd_type: 0x%x\n", __func__, | 1226 | ide_debug_log(IDE_DBG_PC, "Call %s, rq->cmd[0]: 0x%x, " |
1227 | "rq->cmd_type: 0x%x\n", __func__, rq->cmd[0], | ||
1225 | rq->cmd_type); | 1228 | rq->cmd_type); |
1226 | 1229 | ||
1227 | if (blk_pc_request(rq)) | 1230 | if (blk_pc_request(rq)) |
@@ -1257,9 +1260,6 @@ static void cdrom_do_block_pc(ide_drive_t *drive, struct request *rq) | |||
1257 | } | 1260 | } |
1258 | } | 1261 | } |
1259 | 1262 | ||
1260 | /* | ||
1261 | * cdrom driver request routine. | ||
1262 | */ | ||
1263 | static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq, | 1263 | static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq, |
1264 | sector_t block) | 1264 | sector_t block) |
1265 | { | 1265 | { |
@@ -1267,8 +1267,10 @@ static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq, | |||
1267 | ide_handler_t *fn; | 1267 | ide_handler_t *fn; |
1268 | int xferlen; | 1268 | int xferlen; |
1269 | 1269 | ||
1270 | ide_debug_log(IDE_DBG_RQ, "Call %s, rq->cmd_type: 0x%x, block: %llu\n", | 1270 | ide_debug_log(IDE_DBG_RQ, "Call %s, rq->cmd[0]: 0x%x, " |
1271 | __func__, rq->cmd_type, (unsigned long long)block); | 1271 | "rq->cmd_type: 0x%x, block: %llu\n", |
1272 | __func__, rq->cmd[0], rq->cmd_type, | ||
1273 | (unsigned long long)block); | ||
1272 | 1274 | ||
1273 | if (blk_fs_request(rq)) { | 1275 | if (blk_fs_request(rq)) { |
1274 | if (drive->atapi_flags & IDE_AFLAG_SEEKING) { | 1276 | if (drive->atapi_flags & IDE_AFLAG_SEEKING) { |
@@ -1412,6 +1414,10 @@ static int cdrom_read_capacity(ide_drive_t *drive, unsigned long *capacity, | |||
1412 | 1414 | ||
1413 | *capacity = 1 + be32_to_cpu(capbuf.lba); | 1415 | *capacity = 1 + be32_to_cpu(capbuf.lba); |
1414 | *sectors_per_frame = blocklen >> SECTOR_BITS; | 1416 | *sectors_per_frame = blocklen >> SECTOR_BITS; |
1417 | |||
1418 | ide_debug_log(IDE_DBG_PROBE, "%s: cap: %lu, sectors_per_frame: %lu\n", | ||
1419 | __func__, *capacity, *sectors_per_frame); | ||
1420 | |||
1415 | return 0; | 1421 | return 0; |
1416 | } | 1422 | } |
1417 | 1423 | ||
@@ -1643,6 +1649,9 @@ void ide_cdrom_update_speed(ide_drive_t *drive, u8 *buf) | |||
1643 | maxspeed = be16_to_cpup((__be16 *)&buf[8 + 8]); | 1649 | maxspeed = be16_to_cpup((__be16 *)&buf[8 + 8]); |
1644 | } | 1650 | } |
1645 | 1651 | ||
1652 | ide_debug_log(IDE_DBG_PROBE, "%s: curspeed: %u, maxspeed: %u\n", | ||
1653 | __func__, curspeed, maxspeed); | ||
1654 | |||
1646 | cd->current_speed = (curspeed + (176/2)) / 176; | 1655 | cd->current_speed = (curspeed + (176/2)) / 176; |
1647 | cd->max_speed = (maxspeed + (176/2)) / 176; | 1656 | cd->max_speed = (maxspeed + (176/2)) / 176; |
1648 | } | 1657 | } |