diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 07:46:34 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 07:46:34 -0400 |
commit | 5e2040fd0a97888952b37243b5868872bbe0f6ac (patch) | |
tree | f7fa199f04ddb17bea362be4b2decb7f276ce869 /drivers/ide/ide-floppy.c | |
parent | bfdb0b3beb0618dd03e7aa49e2fd3ac360aef370 (diff) |
ide: move ->failed_pc to ide_drive_t
Move ->failed_pc from struct ide_{disk,tape}_obj to ide_drive_t.
There should be no functional changes caused by this patch.
Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-floppy.c')
-rw-r--r-- | drivers/ide/ide-floppy.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index 6dda0fba017b..f9ad4b3021ee 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -70,7 +70,6 @@ | |||
70 | */ | 70 | */ |
71 | static int ide_floppy_end_request(ide_drive_t *drive, int uptodate, int nsecs) | 71 | static int ide_floppy_end_request(ide_drive_t *drive, int uptodate, int nsecs) |
72 | { | 72 | { |
73 | struct ide_disk_obj *floppy = drive->driver_data; | ||
74 | struct request *rq = drive->hwif->rq; | 73 | struct request *rq = drive->hwif->rq; |
75 | int error; | 74 | int error; |
76 | 75 | ||
@@ -90,7 +89,7 @@ static int ide_floppy_end_request(ide_drive_t *drive, int uptodate, int nsecs) | |||
90 | } | 89 | } |
91 | 90 | ||
92 | if (error) | 91 | if (error) |
93 | floppy->failed_pc = NULL; | 92 | drive->failed_pc = NULL; |
94 | 93 | ||
95 | if (!blk_special_request(rq)) { | 94 | if (!blk_special_request(rq)) { |
96 | /* our real local end request function */ | 95 | /* our real local end request function */ |
@@ -121,8 +120,8 @@ static void ide_floppy_callback(ide_drive_t *drive, int dsc) | |||
121 | 120 | ||
122 | ide_debug_log(IDE_DBG_FUNC, "enter"); | 121 | ide_debug_log(IDE_DBG_FUNC, "enter"); |
123 | 122 | ||
124 | if (floppy->failed_pc == pc) | 123 | if (drive->failed_pc == pc) |
125 | floppy->failed_pc = NULL; | 124 | drive->failed_pc = NULL; |
126 | 125 | ||
127 | if (pc->c[0] == GPCMD_READ_10 || pc->c[0] == GPCMD_WRITE_10 || | 126 | if (pc->c[0] == GPCMD_READ_10 || pc->c[0] == GPCMD_WRITE_10 || |
128 | (pc->rq && blk_pc_request(pc->rq))) | 127 | (pc->rq && blk_pc_request(pc->rq))) |
@@ -137,9 +136,9 @@ static void ide_floppy_callback(ide_drive_t *drive, int dsc) | |||
137 | floppy->progress_indication = buf[15] & 0x80 ? | 136 | floppy->progress_indication = buf[15] & 0x80 ? |
138 | (u16)get_unaligned((u16 *)&buf[16]) : 0x10000; | 137 | (u16)get_unaligned((u16 *)&buf[16]) : 0x10000; |
139 | 138 | ||
140 | if (floppy->failed_pc) | 139 | if (drive->failed_pc) |
141 | ide_debug_log(IDE_DBG_PC, "pc = %x", | 140 | ide_debug_log(IDE_DBG_PC, "pc = %x", |
142 | floppy->failed_pc->c[0]); | 141 | drive->failed_pc->c[0]); |
143 | 142 | ||
144 | ide_debug_log(IDE_DBG_SENSE, "sense key = %x, asc = %x," | 143 | ide_debug_log(IDE_DBG_SENSE, "sense key = %x, asc = %x," |
145 | "ascq = %x", floppy->sense_key, | 144 | "ascq = %x", floppy->sense_key, |
@@ -173,9 +172,9 @@ static ide_startstop_t idefloppy_issue_pc(ide_drive_t *drive, | |||
173 | { | 172 | { |
174 | struct ide_disk_obj *floppy = drive->driver_data; | 173 | struct ide_disk_obj *floppy = drive->driver_data; |
175 | 174 | ||
176 | if (floppy->failed_pc == NULL && | 175 | if (drive->failed_pc == NULL && |
177 | pc->c[0] != GPCMD_REQUEST_SENSE) | 176 | pc->c[0] != GPCMD_REQUEST_SENSE) |
178 | floppy->failed_pc = pc; | 177 | drive->failed_pc = pc; |
179 | 178 | ||
180 | /* Set the current packet command */ | 179 | /* Set the current packet command */ |
181 | drive->pc = pc; | 180 | drive->pc = pc; |
@@ -186,7 +185,7 @@ static ide_startstop_t idefloppy_issue_pc(ide_drive_t *drive, | |||
186 | /* Giving up */ | 185 | /* Giving up */ |
187 | pc->error = IDEFLOPPY_ERROR_GENERAL; | 186 | pc->error = IDEFLOPPY_ERROR_GENERAL; |
188 | 187 | ||
189 | floppy->failed_pc = NULL; | 188 | drive->failed_pc = NULL; |
190 | drive->pc_callback(drive, 0); | 189 | drive->pc_callback(drive, 0); |
191 | return ide_stopped; | 190 | return ide_stopped; |
192 | } | 191 | } |
@@ -290,8 +289,8 @@ static ide_startstop_t ide_floppy_do_request(ide_drive_t *drive, | |||
290 | : "dev?")); | 289 | : "dev?")); |
291 | 290 | ||
292 | if (rq->errors >= ERROR_MAX) { | 291 | if (rq->errors >= ERROR_MAX) { |
293 | if (floppy->failed_pc) | 292 | if (drive->failed_pc) |
294 | ide_floppy_report_error(floppy, floppy->failed_pc); | 293 | ide_floppy_report_error(floppy, drive->failed_pc); |
295 | else | 294 | else |
296 | printk(KERN_ERR PFX "%s: I/O error\n", drive->name); | 295 | printk(KERN_ERR PFX "%s: I/O error\n", drive->name); |
297 | 296 | ||