diff options
author | Borislav Petkov <petkovbb@gmail.com> | 2009-01-02 07:34:47 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 07:46:19 -0400 |
commit | 088b1b88609ce89b6ab19d114cdbec94a44aa22c (patch) | |
tree | 2c4f7769e8b2854bcb028dda99c34fe7de3847ae /drivers/ide/ide-cd.c | |
parent | 70775e9c627d7094189b96d73fffced6dab30b30 (diff) |
ide: improve debugging scheme
and more specifically, push __func__ into debug
macro thus making ide_debug_log() calls shorter and more readable.
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r-- | drivers/ide/ide-cd.c | 124 |
1 files changed, 59 insertions, 65 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 2177cd11664c..d163e6571e09 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -100,8 +100,7 @@ static int cdrom_log_sense(ide_drive_t *drive, struct request *rq, | |||
100 | { | 100 | { |
101 | int log = 0; | 101 | int log = 0; |
102 | 102 | ||
103 | ide_debug_log(IDE_DBG_SENSE, "Call %s, sense_key: 0x%x\n", __func__, | 103 | ide_debug_log(IDE_DBG_SENSE, "sense_key: 0x%x", sense->sense_key); |
104 | sense->sense_key); | ||
105 | 104 | ||
106 | if (!sense || !rq || (rq->cmd_flags & REQ_QUIET)) | 105 | if (!sense || !rq || (rq->cmd_flags & REQ_QUIET)) |
107 | return 0; | 106 | return 0; |
@@ -151,13 +150,12 @@ static void cdrom_analyze_sense_data(ide_drive_t *drive, | |||
151 | unsigned long bio_sectors; | 150 | unsigned long bio_sectors; |
152 | struct cdrom_info *info = drive->driver_data; | 151 | struct cdrom_info *info = drive->driver_data; |
153 | 152 | ||
154 | ide_debug_log(IDE_DBG_SENSE, "Call %s, error_code: 0x%x, " | 153 | ide_debug_log(IDE_DBG_SENSE, "error_code: 0x%x, sense_key: 0x%x", |
155 | "sense_key: 0x%x\n", __func__, sense->error_code, | 154 | sense->error_code, sense->sense_key); |
156 | sense->sense_key); | ||
157 | 155 | ||
158 | if (failed_command) | 156 | if (failed_command) |
159 | ide_debug_log(IDE_DBG_SENSE, "%s: failed cmd: 0x%x\n", | 157 | ide_debug_log(IDE_DBG_SENSE, "failed cmd: 0x%x", |
160 | __func__, failed_command->cmd[0]); | 158 | failed_command->cmd[0]); |
161 | 159 | ||
162 | if (!cdrom_log_sense(drive, failed_command, sense)) | 160 | if (!cdrom_log_sense(drive, failed_command, sense)) |
163 | return; | 161 | return; |
@@ -217,7 +215,7 @@ static void cdrom_queue_request_sense(ide_drive_t *drive, void *sense, | |||
217 | struct cdrom_info *info = drive->driver_data; | 215 | struct cdrom_info *info = drive->driver_data; |
218 | struct request *rq = &info->request_sense_request; | 216 | struct request *rq = &info->request_sense_request; |
219 | 217 | ||
220 | ide_debug_log(IDE_DBG_SENSE, "Call %s\n", __func__); | 218 | ide_debug_log(IDE_DBG_SENSE, "enter"); |
221 | 219 | ||
222 | if (sense == NULL) | 220 | if (sense == NULL) |
223 | sense = &info->sense_data; | 221 | sense = &info->sense_data; |
@@ -239,8 +237,8 @@ static void cdrom_queue_request_sense(ide_drive_t *drive, void *sense, | |||
239 | rq->buffer = (void *) failed_command; | 237 | rq->buffer = (void *) failed_command; |
240 | 238 | ||
241 | if (failed_command) | 239 | if (failed_command) |
242 | ide_debug_log(IDE_DBG_SENSE, "failed_cmd: 0x%x\n", | 240 | ide_debug_log(IDE_DBG_SENSE, "failed_cmd: 0x%x", |
243 | failed_command->cmd[0]); | 241 | failed_command->cmd[0]); |
244 | 242 | ||
245 | drive->hwif->rq = NULL; | 243 | drive->hwif->rq = NULL; |
246 | 244 | ||
@@ -252,9 +250,8 @@ static void cdrom_end_request(ide_drive_t *drive, int uptodate) | |||
252 | struct request *rq = drive->hwif->rq; | 250 | struct request *rq = drive->hwif->rq; |
253 | int nsectors = rq->hard_cur_sectors; | 251 | int nsectors = rq->hard_cur_sectors; |
254 | 252 | ||
255 | ide_debug_log(IDE_DBG_FUNC, "Call %s, cmd: 0x%x, uptodate: 0x%x, " | 253 | ide_debug_log(IDE_DBG_FUNC, "cmd: 0x%x, uptodate: 0x%x, nsectors: %d", |
256 | "nsectors: %d\n", __func__, rq->cmd[0], uptodate, | 254 | rq->cmd[0], uptodate, nsectors); |
257 | nsectors); | ||
258 | 255 | ||
259 | if (blk_sense_request(rq) && uptodate) { | 256 | if (blk_sense_request(rq) && uptodate) { |
260 | /* | 257 | /* |
@@ -295,8 +292,8 @@ static void cdrom_end_request(ide_drive_t *drive, int uptodate) | |||
295 | if (!nsectors) | 292 | if (!nsectors) |
296 | nsectors = 1; | 293 | nsectors = 1; |
297 | 294 | ||
298 | ide_debug_log(IDE_DBG_FUNC, "Exit %s, uptodate: 0x%x, nsectors: %d\n", | 295 | ide_debug_log(IDE_DBG_FUNC, "uptodate: 0x%x, nsectors: %d", |
299 | __func__, uptodate, nsectors); | 296 | uptodate, nsectors); |
300 | 297 | ||
301 | ide_end_request(drive, uptodate, nsectors); | 298 | ide_end_request(drive, uptodate, nsectors); |
302 | } | 299 | } |
@@ -338,9 +335,10 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret) | |||
338 | return 1; | 335 | return 1; |
339 | } | 336 | } |
340 | 337 | ||
341 | ide_debug_log(IDE_DBG_RQ, "%s: stat: 0x%x, good_stat: 0x%x, " | 338 | ide_debug_log(IDE_DBG_RQ, "stat: 0x%x, good_stat: 0x%x, cmd[0]: 0x%x, " |
342 | "rq->cmd[0]: 0x%x, rq->cmd_type: 0x%x, err: 0x%x\n", | 339 | "rq->cmd_type: 0x%x, err: 0x%x", |
343 | __func__, stat, good_stat, rq->cmd[0], rq->cmd_type, err); | 340 | stat, good_stat, rq->cmd[0], rq->cmd_type, |
341 | err); | ||
344 | 342 | ||
345 | if (blk_sense_request(rq)) { | 343 | if (blk_sense_request(rq)) { |
346 | /* | 344 | /* |
@@ -530,8 +528,7 @@ static int ide_cd_check_ireason(ide_drive_t *drive, struct request *rq, | |||
530 | { | 528 | { |
531 | ide_hwif_t *hwif = drive->hwif; | 529 | ide_hwif_t *hwif = drive->hwif; |
532 | 530 | ||
533 | ide_debug_log(IDE_DBG_FUNC, "Call %s, ireason: 0x%x, rw: 0x%x\n", | 531 | ide_debug_log(IDE_DBG_FUNC, "ireason: 0x%x, rw: 0x%x", ireason, rw); |
534 | __func__, ireason, rw); | ||
535 | 532 | ||
536 | /* | 533 | /* |
537 | * ireason == 0: the drive wants to receive data from us | 534 | * ireason == 0: the drive wants to receive data from us |
@@ -572,7 +569,7 @@ static int ide_cd_check_ireason(ide_drive_t *drive, struct request *rq, | |||
572 | */ | 569 | */ |
573 | static int ide_cd_check_transfer_size(ide_drive_t *drive, int len) | 570 | static int ide_cd_check_transfer_size(ide_drive_t *drive, int len) |
574 | { | 571 | { |
575 | ide_debug_log(IDE_DBG_FUNC, "Call %s, len: %d\n", __func__, len); | 572 | ide_debug_log(IDE_DBG_FUNC, "len: %d", len); |
576 | 573 | ||
577 | if ((len % SECTOR_SIZE) == 0) | 574 | if ((len % SECTOR_SIZE) == 0) |
578 | return 0; | 575 | return 0; |
@@ -594,8 +591,7 @@ static int ide_cd_check_transfer_size(ide_drive_t *drive, int len) | |||
594 | static ide_startstop_t ide_cd_prepare_rw_request(ide_drive_t *drive, | 591 | static ide_startstop_t ide_cd_prepare_rw_request(ide_drive_t *drive, |
595 | struct request *rq) | 592 | struct request *rq) |
596 | { | 593 | { |
597 | ide_debug_log(IDE_DBG_RQ, "Call %s: rq->cmd_flags: 0x%x\n", __func__, | 594 | ide_debug_log(IDE_DBG_RQ, "rq->cmd_flags: 0x%x", rq->cmd_flags); |
598 | rq->cmd_flags); | ||
599 | 595 | ||
600 | if (rq_data_dir(rq) == READ) { | 596 | if (rq_data_dir(rq) == READ) { |
601 | unsigned short sectors_per_frame = | 597 | unsigned short sectors_per_frame = |
@@ -639,7 +635,7 @@ static ide_startstop_t ide_cd_prepare_rw_request(ide_drive_t *drive, | |||
639 | static void ide_cd_restore_request(ide_drive_t *drive, struct request *rq) | 635 | static void ide_cd_restore_request(ide_drive_t *drive, struct request *rq) |
640 | { | 636 | { |
641 | 637 | ||
642 | ide_debug_log(IDE_DBG_FUNC, "Call %s\n", __func__); | 638 | ide_debug_log(IDE_DBG_FUNC, "enter"); |
643 | 639 | ||
644 | if (rq->buffer != bio_data(rq->bio)) { | 640 | if (rq->buffer != bio_data(rq->bio)) { |
645 | sector_t n = | 641 | sector_t n = |
@@ -658,8 +654,7 @@ static void ide_cd_restore_request(ide_drive_t *drive, struct request *rq) | |||
658 | 654 | ||
659 | static void ide_cd_request_sense_fixup(ide_drive_t *drive, struct request *rq) | 655 | static void ide_cd_request_sense_fixup(ide_drive_t *drive, struct request *rq) |
660 | { | 656 | { |
661 | ide_debug_log(IDE_DBG_FUNC, "Call %s, rq->cmd[0]: 0x%x\n", | 657 | ide_debug_log(IDE_DBG_FUNC, "rq->cmd[0]: 0x%x", rq->cmd[0]); |
662 | __func__, rq->cmd[0]); | ||
663 | 658 | ||
664 | /* | 659 | /* |
665 | * Some of the trailing request sense fields are optional, | 660 | * Some of the trailing request sense fields are optional, |
@@ -686,9 +681,9 @@ int ide_cd_queue_pc(ide_drive_t *drive, const unsigned char *cmd, | |||
686 | if (!sense) | 681 | if (!sense) |
687 | sense = &local_sense; | 682 | sense = &local_sense; |
688 | 683 | ||
689 | ide_debug_log(IDE_DBG_PC, "Call %s, cmd[0]: 0x%x, write: 0x%x, " | 684 | ide_debug_log(IDE_DBG_PC, "cmd[0]: 0x%x, write: 0x%x, timeout: %d, " |
690 | "timeout: %d, cmd_flags: 0x%x\n", __func__, cmd[0], write, | 685 | "cmd_flags: 0x%x", |
691 | timeout, cmd_flags); | 686 | cmd[0], write, timeout, cmd_flags); |
692 | 687 | ||
693 | /* start of retry loop */ | 688 | /* start of retry loop */ |
694 | do { | 689 | do { |
@@ -772,8 +767,8 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive) | |||
772 | u16 len; | 767 | u16 len; |
773 | u8 ireason; | 768 | u8 ireason; |
774 | 769 | ||
775 | ide_debug_log(IDE_DBG_PC, "Call %s, rq->cmd[0]: 0x%x, write: 0x%x\n", | 770 | ide_debug_log(IDE_DBG_PC, "cmd[0]: 0x%x, write: 0x%x", |
776 | __func__, rq->cmd[0], write); | 771 | rq->cmd[0], write); |
777 | 772 | ||
778 | /* check for errors */ | 773 | /* check for errors */ |
779 | dma = drive->dma; | 774 | dma = drive->dma; |
@@ -810,8 +805,8 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive) | |||
810 | if (thislen > len) | 805 | if (thislen > len) |
811 | thislen = len; | 806 | thislen = len; |
812 | 807 | ||
813 | ide_debug_log(IDE_DBG_PC, "%s: DRQ: stat: 0x%x, thislen: %d\n", | 808 | ide_debug_log(IDE_DBG_PC, "DRQ: stat: 0x%x, thislen: %d", |
814 | __func__, stat, thislen); | 809 | stat, thislen); |
815 | 810 | ||
816 | /* If DRQ is clear, the command has completed. */ | 811 | /* If DRQ is clear, the command has completed. */ |
817 | if ((stat & ATA_DRQ) == 0) { | 812 | if ((stat & ATA_DRQ) == 0) { |
@@ -876,8 +871,9 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive) | |||
876 | xferfunc = hwif->tp_ops->input_data; | 871 | xferfunc = hwif->tp_ops->input_data; |
877 | } | 872 | } |
878 | 873 | ||
879 | ide_debug_log(IDE_DBG_PC, "%s: data transfer, rq->cmd_type: 0x%x, " | 874 | ide_debug_log(IDE_DBG_PC, "data transfer, rq->cmd_type: 0x%x, " |
880 | "ireason: 0x%x\n", __func__, rq->cmd_type, ireason); | 875 | "ireason: 0x%x", |
876 | rq->cmd_type, ireason); | ||
881 | 877 | ||
882 | /* transfer data */ | 878 | /* transfer data */ |
883 | while (thislen > 0) { | 879 | while (thislen > 0) { |
@@ -988,9 +984,9 @@ static ide_startstop_t cdrom_start_rw(ide_drive_t *drive, struct request *rq) | |||
988 | unsigned short sectors_per_frame = | 984 | unsigned short sectors_per_frame = |
989 | queue_hardsect_size(drive->queue) >> SECTOR_BITS; | 985 | queue_hardsect_size(drive->queue) >> SECTOR_BITS; |
990 | 986 | ||
991 | ide_debug_log(IDE_DBG_RQ, "Call %s, rq->cmd[0]: 0x%x, write: 0x%x, " | 987 | ide_debug_log(IDE_DBG_RQ, "rq->cmd[0]: 0x%x, write: 0x%x, " |
992 | "secs_per_frame: %u\n", | 988 | "secs_per_frame: %u", |
993 | __func__, rq->cmd[0], write, sectors_per_frame); | 989 | rq->cmd[0], write, sectors_per_frame); |
994 | 990 | ||
995 | if (write) { | 991 | if (write) { |
996 | /* disk has become write protected */ | 992 | /* disk has become write protected */ |
@@ -1026,9 +1022,8 @@ static ide_startstop_t cdrom_start_rw(ide_drive_t *drive, struct request *rq) | |||
1026 | static void cdrom_do_block_pc(ide_drive_t *drive, struct request *rq) | 1022 | static void cdrom_do_block_pc(ide_drive_t *drive, struct request *rq) |
1027 | { | 1023 | { |
1028 | 1024 | ||
1029 | ide_debug_log(IDE_DBG_PC, "Call %s, rq->cmd[0]: 0x%x, " | 1025 | ide_debug_log(IDE_DBG_PC, "rq->cmd[0]: 0x%x, rq->cmd_type: 0x%x", |
1030 | "rq->cmd_type: 0x%x\n", __func__, rq->cmd[0], | 1026 | rq->cmd[0], rq->cmd_type); |
1031 | rq->cmd_type); | ||
1032 | 1027 | ||
1033 | if (blk_pc_request(rq)) | 1028 | if (blk_pc_request(rq)) |
1034 | rq->cmd_flags |= REQ_QUIET; | 1029 | rq->cmd_flags |= REQ_QUIET; |
@@ -1067,10 +1062,11 @@ static void cdrom_do_block_pc(ide_drive_t *drive, struct request *rq) | |||
1067 | static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq, | 1062 | static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq, |
1068 | sector_t block) | 1063 | sector_t block) |
1069 | { | 1064 | { |
1070 | ide_debug_log(IDE_DBG_RQ, "Call %s, rq->cmd[0]: 0x%x, " | 1065 | ide_debug_log(IDE_DBG_RQ, "cmd: 0x%x, block: %llu", |
1071 | "rq->cmd_type: 0x%x, block: %llu\n", | 1066 | rq->cmd[0], (unsigned long long)block); |
1072 | __func__, rq->cmd[0], rq->cmd_type, | 1067 | |
1073 | (unsigned long long)block); | 1068 | if (drive->debug_mask & IDE_DBG_RQ) |
1069 | blk_dump_rq_flags(rq, "ide_cd_do_request"); | ||
1074 | 1070 | ||
1075 | if (blk_fs_request(rq)) { | 1071 | if (blk_fs_request(rq)) { |
1076 | if (cdrom_start_rw(drive, rq) == ide_stopped) | 1072 | if (cdrom_start_rw(drive, rq) == ide_stopped) |
@@ -1119,7 +1115,7 @@ int cdrom_check_status(ide_drive_t *drive, struct request_sense *sense) | |||
1119 | struct cdrom_device_info *cdi = &info->devinfo; | 1115 | struct cdrom_device_info *cdi = &info->devinfo; |
1120 | unsigned char cmd[BLK_MAX_CDB]; | 1116 | unsigned char cmd[BLK_MAX_CDB]; |
1121 | 1117 | ||
1122 | ide_debug_log(IDE_DBG_FUNC, "Call %s\n", __func__); | 1118 | ide_debug_log(IDE_DBG_FUNC, "enter"); |
1123 | 1119 | ||
1124 | memset(cmd, 0, BLK_MAX_CDB); | 1120 | memset(cmd, 0, BLK_MAX_CDB); |
1125 | cmd[0] = GPCMD_TEST_UNIT_READY; | 1121 | cmd[0] = GPCMD_TEST_UNIT_READY; |
@@ -1147,7 +1143,7 @@ static int cdrom_read_capacity(ide_drive_t *drive, unsigned long *capacity, | |||
1147 | unsigned len = sizeof(capbuf); | 1143 | unsigned len = sizeof(capbuf); |
1148 | u32 blocklen; | 1144 | u32 blocklen; |
1149 | 1145 | ||
1150 | ide_debug_log(IDE_DBG_FUNC, "Call %s\n", __func__); | 1146 | ide_debug_log(IDE_DBG_FUNC, "enter"); |
1151 | 1147 | ||
1152 | memset(cmd, 0, BLK_MAX_CDB); | 1148 | memset(cmd, 0, BLK_MAX_CDB); |
1153 | cmd[0] = GPCMD_READ_CDVD_CAPACITY; | 1149 | cmd[0] = GPCMD_READ_CDVD_CAPACITY; |
@@ -1179,8 +1175,8 @@ static int cdrom_read_capacity(ide_drive_t *drive, unsigned long *capacity, | |||
1179 | *capacity = 1 + be32_to_cpu(capbuf.lba); | 1175 | *capacity = 1 + be32_to_cpu(capbuf.lba); |
1180 | *sectors_per_frame = blocklen >> SECTOR_BITS; | 1176 | *sectors_per_frame = blocklen >> SECTOR_BITS; |
1181 | 1177 | ||
1182 | ide_debug_log(IDE_DBG_PROBE, "%s: cap: %lu, sectors_per_frame: %lu\n", | 1178 | ide_debug_log(IDE_DBG_PROBE, "cap: %lu, sectors_per_frame: %lu", |
1183 | __func__, *capacity, *sectors_per_frame); | 1179 | *capacity, *sectors_per_frame); |
1184 | 1180 | ||
1185 | return 0; | 1181 | return 0; |
1186 | } | 1182 | } |
@@ -1191,7 +1187,7 @@ static int cdrom_read_tocentry(ide_drive_t *drive, int trackno, int msf_flag, | |||
1191 | { | 1187 | { |
1192 | unsigned char cmd[BLK_MAX_CDB]; | 1188 | unsigned char cmd[BLK_MAX_CDB]; |
1193 | 1189 | ||
1194 | ide_debug_log(IDE_DBG_FUNC, "Call %s\n", __func__); | 1190 | ide_debug_log(IDE_DBG_FUNC, "enter"); |
1195 | 1191 | ||
1196 | memset(cmd, 0, BLK_MAX_CDB); | 1192 | memset(cmd, 0, BLK_MAX_CDB); |
1197 | 1193 | ||
@@ -1221,7 +1217,7 @@ int ide_cd_read_toc(ide_drive_t *drive, struct request_sense *sense) | |||
1221 | long last_written; | 1217 | long last_written; |
1222 | unsigned long sectors_per_frame = SECTORS_PER_FRAME; | 1218 | unsigned long sectors_per_frame = SECTORS_PER_FRAME; |
1223 | 1219 | ||
1224 | ide_debug_log(IDE_DBG_FUNC, "Call %s\n", __func__); | 1220 | ide_debug_log(IDE_DBG_FUNC, "enter"); |
1225 | 1221 | ||
1226 | if (toc == NULL) { | 1222 | if (toc == NULL) { |
1227 | /* try to allocate space */ | 1223 | /* try to allocate space */ |
@@ -1383,7 +1379,7 @@ int ide_cdrom_get_capabilities(ide_drive_t *drive, u8 *buf) | |||
1383 | struct packet_command cgc; | 1379 | struct packet_command cgc; |
1384 | int stat, attempts = 3, size = ATAPI_CAPABILITIES_PAGE_SIZE; | 1380 | int stat, attempts = 3, size = ATAPI_CAPABILITIES_PAGE_SIZE; |
1385 | 1381 | ||
1386 | ide_debug_log(IDE_DBG_FUNC, "Call %s\n", __func__); | 1382 | ide_debug_log(IDE_DBG_FUNC, "enter"); |
1387 | 1383 | ||
1388 | if ((drive->atapi_flags & IDE_AFLAG_FULL_CAPS_PAGE) == 0) | 1384 | if ((drive->atapi_flags & IDE_AFLAG_FULL_CAPS_PAGE) == 0) |
1389 | size -= ATAPI_CAPABILITIES_PAGE_PAD_SIZE; | 1385 | size -= ATAPI_CAPABILITIES_PAGE_PAD_SIZE; |
@@ -1403,7 +1399,7 @@ void ide_cdrom_update_speed(ide_drive_t *drive, u8 *buf) | |||
1403 | struct cdrom_info *cd = drive->driver_data; | 1399 | struct cdrom_info *cd = drive->driver_data; |
1404 | u16 curspeed, maxspeed; | 1400 | u16 curspeed, maxspeed; |
1405 | 1401 | ||
1406 | ide_debug_log(IDE_DBG_FUNC, "Call %s\n", __func__); | 1402 | ide_debug_log(IDE_DBG_FUNC, "enter"); |
1407 | 1403 | ||
1408 | if (drive->atapi_flags & IDE_AFLAG_LE_SPEED_FIELDS) { | 1404 | if (drive->atapi_flags & IDE_AFLAG_LE_SPEED_FIELDS) { |
1409 | curspeed = le16_to_cpup((__le16 *)&buf[8 + 14]); | 1405 | curspeed = le16_to_cpup((__le16 *)&buf[8 + 14]); |
@@ -1413,8 +1409,8 @@ void ide_cdrom_update_speed(ide_drive_t *drive, u8 *buf) | |||
1413 | maxspeed = be16_to_cpup((__be16 *)&buf[8 + 8]); | 1409 | maxspeed = be16_to_cpup((__be16 *)&buf[8 + 8]); |
1414 | } | 1410 | } |
1415 | 1411 | ||
1416 | ide_debug_log(IDE_DBG_PROBE, "%s: curspeed: %u, maxspeed: %u\n", | 1412 | ide_debug_log(IDE_DBG_PROBE, "curspeed: %u, maxspeed: %u", |
1417 | __func__, curspeed, maxspeed); | 1413 | curspeed, maxspeed); |
1418 | 1414 | ||
1419 | cd->current_speed = (curspeed + (176/2)) / 176; | 1415 | cd->current_speed = (curspeed + (176/2)) / 176; |
1420 | cd->max_speed = (maxspeed + (176/2)) / 176; | 1416 | cd->max_speed = (maxspeed + (176/2)) / 176; |
@@ -1448,7 +1444,7 @@ static int ide_cdrom_register(ide_drive_t *drive, int nslots) | |||
1448 | struct cdrom_info *info = drive->driver_data; | 1444 | struct cdrom_info *info = drive->driver_data; |
1449 | struct cdrom_device_info *devinfo = &info->devinfo; | 1445 | struct cdrom_device_info *devinfo = &info->devinfo; |
1450 | 1446 | ||
1451 | ide_debug_log(IDE_DBG_PROBE, "Call %s, nslots: %d\n", __func__, nslots); | 1447 | ide_debug_log(IDE_DBG_PROBE, "nslots: %d", nslots); |
1452 | 1448 | ||
1453 | devinfo->ops = &ide_cdrom_dops; | 1449 | devinfo->ops = &ide_cdrom_dops; |
1454 | devinfo->speed = info->current_speed; | 1450 | devinfo->speed = info->current_speed; |
@@ -1471,9 +1467,8 @@ static int ide_cdrom_probe_capabilities(ide_drive_t *drive) | |||
1471 | mechtype_t mechtype; | 1467 | mechtype_t mechtype; |
1472 | int nslots = 1; | 1468 | int nslots = 1; |
1473 | 1469 | ||
1474 | ide_debug_log(IDE_DBG_PROBE, "Call %s, drive->media: 0x%x, " | 1470 | ide_debug_log(IDE_DBG_PROBE, "media: 0x%x, atapi_flags: 0x%lx", |
1475 | "drive->atapi_flags: 0x%lx\n", __func__, drive->media, | 1471 | drive->media, drive->atapi_flags); |
1476 | drive->atapi_flags); | ||
1477 | 1472 | ||
1478 | cdi->mask = (CDC_CD_R | CDC_CD_RW | CDC_DVD | CDC_DVD_R | | 1473 | cdi->mask = (CDC_CD_R | CDC_CD_RW | CDC_DVD | CDC_DVD_R | |
1479 | CDC_DVD_RAM | CDC_SELECT_DISC | CDC_PLAY_AUDIO | | 1474 | CDC_DVD_RAM | CDC_SELECT_DISC | CDC_PLAY_AUDIO | |
@@ -1754,7 +1749,7 @@ static int ide_cdrom_setup(ide_drive_t *drive) | |||
1754 | char *fw_rev = (char *)&id[ATA_ID_FW_REV]; | 1749 | char *fw_rev = (char *)&id[ATA_ID_FW_REV]; |
1755 | int nslots; | 1750 | int nslots; |
1756 | 1751 | ||
1757 | ide_debug_log(IDE_DBG_PROBE, "Call %s\n", __func__); | 1752 | ide_debug_log(IDE_DBG_PROBE, "enter"); |
1758 | 1753 | ||
1759 | blk_queue_prep_rq(drive->queue, ide_cdrom_prep_fn); | 1754 | blk_queue_prep_rq(drive->queue, ide_cdrom_prep_fn); |
1760 | blk_queue_dma_alignment(drive->queue, 31); | 1755 | blk_queue_dma_alignment(drive->queue, 31); |
@@ -1797,7 +1792,7 @@ static void ide_cd_remove(ide_drive_t *drive) | |||
1797 | { | 1792 | { |
1798 | struct cdrom_info *info = drive->driver_data; | 1793 | struct cdrom_info *info = drive->driver_data; |
1799 | 1794 | ||
1800 | ide_debug_log(IDE_DBG_FUNC, "Call %s\n", __func__); | 1795 | ide_debug_log(IDE_DBG_FUNC, "enter"); |
1801 | 1796 | ||
1802 | ide_proc_unregister_driver(drive, info->driver); | 1797 | ide_proc_unregister_driver(drive, info->driver); |
1803 | device_del(&info->dev); | 1798 | device_del(&info->dev); |
@@ -1815,7 +1810,7 @@ static void ide_cd_release(struct device *dev) | |||
1815 | ide_drive_t *drive = info->drive; | 1810 | ide_drive_t *drive = info->drive; |
1816 | struct gendisk *g = info->disk; | 1811 | struct gendisk *g = info->disk; |
1817 | 1812 | ||
1818 | ide_debug_log(IDE_DBG_FUNC, "Call %s\n", __func__); | 1813 | ide_debug_log(IDE_DBG_FUNC, "enter"); |
1819 | 1814 | ||
1820 | kfree(info->toc); | 1815 | kfree(info->toc); |
1821 | if (devinfo->handle == drive) | 1816 | if (devinfo->handle == drive) |
@@ -1974,9 +1969,8 @@ static int ide_cd_probe(ide_drive_t *drive) | |||
1974 | struct gendisk *g; | 1969 | struct gendisk *g; |
1975 | struct request_sense sense; | 1970 | struct request_sense sense; |
1976 | 1971 | ||
1977 | ide_debug_log(IDE_DBG_PROBE, "Call %s, drive->driver_req: %s, " | 1972 | ide_debug_log(IDE_DBG_PROBE, "driver_req: %s, media: 0x%x", |
1978 | "drive->media: 0x%x\n", __func__, drive->driver_req, | 1973 | drive->driver_req, drive->media); |
1979 | drive->media); | ||
1980 | 1974 | ||
1981 | if (!strstr("ide-cdrom", drive->driver_req)) | 1975 | if (!strstr("ide-cdrom", drive->driver_req)) |
1982 | goto failed; | 1976 | goto failed; |