]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.14.7/ide-ide-atapi-fix-compile-error-with-defining-macro-debug.patch
Fixes for 5.10
[thirdparty/kernel/stable-queue.git] / releases / 4.14.7 / ide-ide-atapi-fix-compile-error-with-defining-macro-debug.patch
1 From foo@baz Tue Dec 12 10:32:42 CET 2017
2 From: Hongxu Jia <hongxu.jia@windriver.com>
3 Date: Fri, 10 Nov 2017 15:59:17 +0800
4 Subject: ide: ide-atapi: fix compile error with defining macro DEBUG
5
6 From: Hongxu Jia <hongxu.jia@windriver.com>
7
8
9 [ Upstream commit 8dc7a31fbce5e2dbbacd83d910da37105181b054 ]
10
11 Compile ide-atapi failed with defining macro "DEBUG"
12 ...
13 |drivers/ide/ide-atapi.c:285:52: error: 'struct request' has
14 no member named 'cmd'; did you mean 'csd'?
15 | debug_log("%s: rq->cmd[0]: 0x%x\n", __func__, rq->cmd[0]);
16 ...
17
18 Since we split the scsi_request out of struct request, it missed
19 do the same thing on debug_log
20
21 Fixes: 82ed4db499b8 ("block: split scsi_request out of struct request")
22
23 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
24 Signed-off-by: Jens Axboe <axboe@kernel.dk>
25 Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
26 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
27 ---
28 drivers/ide/ide-atapi.c | 6 +++---
29 1 file changed, 3 insertions(+), 3 deletions(-)
30
31 --- a/drivers/ide/ide-atapi.c
32 +++ b/drivers/ide/ide-atapi.c
33 @@ -282,7 +282,7 @@ int ide_cd_expiry(ide_drive_t *drive)
34 struct request *rq = drive->hwif->rq;
35 unsigned long wait = 0;
36
37 - debug_log("%s: rq->cmd[0]: 0x%x\n", __func__, rq->cmd[0]);
38 + debug_log("%s: scsi_req(rq)->cmd[0]: 0x%x\n", __func__, scsi_req(rq)->cmd[0]);
39
40 /*
41 * Some commands are *slow* and normally take a long time to complete.
42 @@ -463,7 +463,7 @@ static ide_startstop_t ide_pc_intr(ide_d
43 return ide_do_reset(drive);
44 }
45
46 - debug_log("[cmd %x]: check condition\n", rq->cmd[0]);
47 + debug_log("[cmd %x]: check condition\n", scsi_req(rq)->cmd[0]);
48
49 /* Retry operation */
50 ide_retry_pc(drive);
51 @@ -531,7 +531,7 @@ static ide_startstop_t ide_pc_intr(ide_d
52 ide_pad_transfer(drive, write, bcount);
53
54 debug_log("[cmd %x] transferred %d bytes, padded %d bytes, resid: %u\n",
55 - rq->cmd[0], done, bcount, scsi_req(rq)->resid_len);
56 + scsi_req(rq)->cmd[0], done, bcount, scsi_req(rq)->resid_len);
57
58 /* And set the interrupt handler again */
59 ide_set_handler(drive, ide_pc_intr, timeout);