Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 2 | #include <linux/kernel.h> |
Tejun Heo | 5a0e3ad | 2010-03-24 17:04:11 +0900 | [diff] [blame] | 3 | #include <linux/gfp.h> |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 4 | #include <linux/ide.h> |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 5 | |
| 6 | int generic_ide_suspend(struct device *dev, pm_message_t mesg) |
| 7 | { |
Miklos Szeredi | 9974e43 | 2012-08-21 17:20:30 +0200 | [diff] [blame] | 8 | ide_drive_t *drive = to_ide_device(dev); |
Greg Kroah-Hartman | fcb5207 | 2009-04-30 14:43:31 -0700 | [diff] [blame] | 9 | ide_drive_t *pair = ide_get_pair_dev(drive); |
Bartlomiej Zolnierkiewicz | 898ec22 | 2009-01-06 17:20:52 +0100 | [diff] [blame] | 10 | ide_hwif_t *hwif = drive->hwif; |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 11 | struct request *rq; |
Christoph Hellwig | a7928c1 | 2015-04-17 22:37:20 +0200 | [diff] [blame] | 12 | struct ide_pm_state rqpm; |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 13 | int ret; |
| 14 | |
Bartlomiej Zolnierkiewicz | 2bf427b | 2009-06-29 19:20:42 -0700 | [diff] [blame] | 15 | if (ide_port_acpi(hwif)) { |
| 16 | /* call ACPI _GTM only once */ |
| 17 | if ((drive->dn & 1) == 0 || pair == NULL) |
| 18 | ide_acpi_get_timing(hwif); |
| 19 | } |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 20 | |
| 21 | memset(&rqpm, 0, sizeof(rqpm)); |
Christoph Hellwig | ff005a0 | 2018-05-09 09:54:05 +0200 | [diff] [blame] | 22 | rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, 0); |
Christoph Hellwig | 2f5a8e80 | 2017-01-31 16:57:30 +0100 | [diff] [blame] | 23 | ide_req(rq)->type = ATA_PRIV_PM_SUSPEND; |
Christoph Hellwig | 22ce0a7 | 2018-11-10 09:30:49 +0100 | [diff] [blame] | 24 | ide_req(rq)->special = &rqpm; |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 25 | rqpm.pm_step = IDE_PM_START_SUSPEND; |
| 26 | if (mesg.event == PM_EVENT_PRETHAW) |
| 27 | mesg.event = PM_EVENT_FREEZE; |
| 28 | rqpm.pm_state = mesg.event; |
| 29 | |
Christoph Hellwig | b7819b9 | 2017-04-20 16:02:55 +0200 | [diff] [blame] | 30 | blk_execute_rq(drive->queue, NULL, rq, 0); |
Christoph Hellwig | 17d5363 | 2017-04-20 16:03:01 +0200 | [diff] [blame] | 31 | ret = scsi_req(rq)->result ? -EIO : 0; |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 32 | blk_put_request(rq); |
| 33 | |
Bartlomiej Zolnierkiewicz | 2bf427b | 2009-06-29 19:20:42 -0700 | [diff] [blame] | 34 | if (ret == 0 && ide_port_acpi(hwif)) { |
| 35 | /* call ACPI _PS3 only after both devices are suspended */ |
| 36 | if ((drive->dn & 1) || pair == NULL) |
| 37 | ide_acpi_set_state(hwif, 0); |
| 38 | } |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 39 | |
| 40 | return ret; |
| 41 | } |
| 42 | |
Christoph Hellwig | a7928c1 | 2015-04-17 22:37:20 +0200 | [diff] [blame] | 43 | static int ide_pm_execute_rq(struct request *rq) |
| 44 | { |
| 45 | struct request_queue *q = rq->q; |
Christoph Hellwig | a7928c1 | 2015-04-17 22:37:20 +0200 | [diff] [blame] | 46 | |
Christoph Hellwig | a7928c1 | 2015-04-17 22:37:20 +0200 | [diff] [blame] | 47 | if (unlikely(blk_queue_dying(q))) { |
Christoph Hellwig | e806402 | 2016-10-20 15:12:13 +0200 | [diff] [blame] | 48 | rq->rq_flags |= RQF_QUIET; |
Christoph Hellwig | 17d5363 | 2017-04-20 16:03:01 +0200 | [diff] [blame] | 49 | scsi_req(rq)->result = -ENXIO; |
Jens Axboe | 6003352 | 2018-10-26 09:53:52 -0600 | [diff] [blame] | 50 | blk_mq_end_request(rq, BLK_STS_OK); |
Christoph Hellwig | a7928c1 | 2015-04-17 22:37:20 +0200 | [diff] [blame] | 51 | return -ENXIO; |
| 52 | } |
Jens Axboe | 6003352 | 2018-10-26 09:53:52 -0600 | [diff] [blame] | 53 | blk_execute_rq(q, NULL, rq, true); |
Christoph Hellwig | a7928c1 | 2015-04-17 22:37:20 +0200 | [diff] [blame] | 54 | |
Christoph Hellwig | 17d5363 | 2017-04-20 16:03:01 +0200 | [diff] [blame] | 55 | return scsi_req(rq)->result ? -EIO : 0; |
Christoph Hellwig | a7928c1 | 2015-04-17 22:37:20 +0200 | [diff] [blame] | 56 | } |
| 57 | |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 58 | int generic_ide_resume(struct device *dev) |
| 59 | { |
Miklos Szeredi | 9974e43 | 2012-08-21 17:20:30 +0200 | [diff] [blame] | 60 | ide_drive_t *drive = to_ide_device(dev); |
Greg Kroah-Hartman | fcb5207 | 2009-04-30 14:43:31 -0700 | [diff] [blame] | 61 | ide_drive_t *pair = ide_get_pair_dev(drive); |
Bartlomiej Zolnierkiewicz | 898ec22 | 2009-01-06 17:20:52 +0100 | [diff] [blame] | 62 | ide_hwif_t *hwif = drive->hwif; |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 63 | struct request *rq; |
Christoph Hellwig | a7928c1 | 2015-04-17 22:37:20 +0200 | [diff] [blame] | 64 | struct ide_pm_state rqpm; |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 65 | int err; |
| 66 | |
Jens Axboe | 6003352 | 2018-10-26 09:53:52 -0600 | [diff] [blame] | 67 | blk_mq_start_stopped_hw_queues(drive->queue, true); |
| 68 | |
Bartlomiej Zolnierkiewicz | 2bf427b | 2009-06-29 19:20:42 -0700 | [diff] [blame] | 69 | if (ide_port_acpi(hwif)) { |
| 70 | /* call ACPI _PS0 / _STM only once */ |
| 71 | if ((drive->dn & 1) == 0 || pair == NULL) { |
| 72 | ide_acpi_set_state(hwif, 1); |
| 73 | ide_acpi_push_timing(hwif); |
| 74 | } |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 75 | |
Bartlomiej Zolnierkiewicz | 2bf427b | 2009-06-29 19:20:42 -0700 | [diff] [blame] | 76 | ide_acpi_exec_tfs(drive); |
| 77 | } |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 78 | |
| 79 | memset(&rqpm, 0, sizeof(rqpm)); |
Christoph Hellwig | ff005a0 | 2018-05-09 09:54:05 +0200 | [diff] [blame] | 80 | rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, BLK_MQ_REQ_PREEMPT); |
Christoph Hellwig | 2f5a8e80 | 2017-01-31 16:57:30 +0100 | [diff] [blame] | 81 | ide_req(rq)->type = ATA_PRIV_PM_RESUME; |
Christoph Hellwig | 22ce0a7 | 2018-11-10 09:30:49 +0100 | [diff] [blame] | 82 | ide_req(rq)->special = &rqpm; |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 83 | rqpm.pm_step = IDE_PM_START_RESUME; |
| 84 | rqpm.pm_state = PM_EVENT_ON; |
| 85 | |
Christoph Hellwig | a7928c1 | 2015-04-17 22:37:20 +0200 | [diff] [blame] | 86 | err = ide_pm_execute_rq(rq); |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 87 | blk_put_request(rq); |
| 88 | |
| 89 | if (err == 0 && dev->driver) { |
Bartlomiej Zolnierkiewicz | 7f3c868 | 2009-01-06 17:20:53 +0100 | [diff] [blame] | 90 | struct ide_driver *drv = to_ide_driver(dev->driver); |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 91 | |
| 92 | if (drv->resume) |
| 93 | drv->resume(drive); |
| 94 | } |
| 95 | |
| 96 | return err; |
| 97 | } |
| 98 | |
| 99 | void ide_complete_power_step(ide_drive_t *drive, struct request *rq) |
| 100 | { |
Christoph Hellwig | 22ce0a7 | 2018-11-10 09:30:49 +0100 | [diff] [blame] | 101 | struct ide_pm_state *pm = ide_req(rq)->special; |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 102 | |
| 103 | #ifdef DEBUG_PM |
| 104 | printk(KERN_INFO "%s: complete_power_step(step: %d)\n", |
| 105 | drive->name, pm->pm_step); |
| 106 | #endif |
| 107 | if (drive->media != ide_disk) |
| 108 | return; |
| 109 | |
| 110 | switch (pm->pm_step) { |
| 111 | case IDE_PM_FLUSH_CACHE: /* Suspend step 1 (flush cache) */ |
| 112 | if (pm->pm_state == PM_EVENT_FREEZE) |
| 113 | pm->pm_step = IDE_PM_COMPLETED; |
| 114 | else |
| 115 | pm->pm_step = IDE_PM_STANDBY; |
| 116 | break; |
| 117 | case IDE_PM_STANDBY: /* Suspend step 2 (standby) */ |
| 118 | pm->pm_step = IDE_PM_COMPLETED; |
| 119 | break; |
| 120 | case IDE_PM_RESTORE_PIO: /* Resume step 1 (restore PIO) */ |
| 121 | pm->pm_step = IDE_PM_IDLE; |
| 122 | break; |
| 123 | case IDE_PM_IDLE: /* Resume step 2 (idle)*/ |
| 124 | pm->pm_step = IDE_PM_RESTORE_DMA; |
| 125 | break; |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request *rq) |
| 130 | { |
Christoph Hellwig | 22ce0a7 | 2018-11-10 09:30:49 +0100 | [diff] [blame] | 131 | struct ide_pm_state *pm = ide_req(rq)->special; |
Tejun Heo | fc38b52 | 2009-04-19 07:00:43 +0900 | [diff] [blame] | 132 | struct ide_cmd cmd = { }; |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 133 | |
| 134 | switch (pm->pm_step) { |
| 135 | case IDE_PM_FLUSH_CACHE: /* Suspend step 1 (flush cache) */ |
| 136 | if (drive->media != ide_disk) |
| 137 | break; |
| 138 | /* Not supported? Switch to next step now. */ |
| 139 | if (ata_id_flush_enabled(drive->id) == 0 || |
| 140 | (drive->dev_flags & IDE_DFLAG_WCACHE) == 0) { |
| 141 | ide_complete_power_step(drive, rq); |
| 142 | return ide_stopped; |
| 143 | } |
| 144 | if (ata_id_flush_ext_enabled(drive->id)) |
Tejun Heo | fc38b52 | 2009-04-19 07:00:43 +0900 | [diff] [blame] | 145 | cmd.tf.command = ATA_CMD_FLUSH_EXT; |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 146 | else |
Tejun Heo | fc38b52 | 2009-04-19 07:00:43 +0900 | [diff] [blame] | 147 | cmd.tf.command = ATA_CMD_FLUSH; |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 148 | goto out_do_tf; |
| 149 | case IDE_PM_STANDBY: /* Suspend step 2 (standby) */ |
Tejun Heo | fc38b52 | 2009-04-19 07:00:43 +0900 | [diff] [blame] | 150 | cmd.tf.command = ATA_CMD_STANDBYNOW1; |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 151 | goto out_do_tf; |
| 152 | case IDE_PM_RESTORE_PIO: /* Resume step 1 (restore PIO) */ |
| 153 | ide_set_max_pio(drive); |
| 154 | /* |
| 155 | * skip IDE_PM_IDLE for ATAPI devices |
| 156 | */ |
| 157 | if (drive->media != ide_disk) |
| 158 | pm->pm_step = IDE_PM_RESTORE_DMA; |
| 159 | else |
| 160 | ide_complete_power_step(drive, rq); |
| 161 | return ide_stopped; |
| 162 | case IDE_PM_IDLE: /* Resume step 2 (idle) */ |
Tejun Heo | fc38b52 | 2009-04-19 07:00:43 +0900 | [diff] [blame] | 163 | cmd.tf.command = ATA_CMD_IDLEIMMEDIATE; |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 164 | goto out_do_tf; |
| 165 | case IDE_PM_RESTORE_DMA: /* Resume step 3 (restore DMA) */ |
| 166 | /* |
| 167 | * Right now, all we do is call ide_set_dma(drive), |
| 168 | * we could be smarter and check for current xfer_speed |
| 169 | * in struct drive etc... |
| 170 | */ |
| 171 | if (drive->hwif->dma_ops == NULL) |
| 172 | break; |
| 173 | /* |
| 174 | * TODO: respect IDE_DFLAG_USING_DMA |
| 175 | */ |
| 176 | ide_set_dma(drive); |
| 177 | break; |
| 178 | } |
| 179 | |
| 180 | pm->pm_step = IDE_PM_COMPLETED; |
Bartlomiej Zolnierkiewicz | 22aa4b3 | 2009-03-27 12:46:37 +0100 | [diff] [blame] | 181 | |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 182 | return ide_stopped; |
| 183 | |
| 184 | out_do_tf: |
Tejun Heo | fc38b52 | 2009-04-19 07:00:43 +0900 | [diff] [blame] | 185 | cmd.valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE; |
| 186 | cmd.valid.in.tf = IDE_VALID_IN_TF | IDE_VALID_DEVICE; |
| 187 | cmd.protocol = ATA_PROT_NODATA; |
Bartlomiej Zolnierkiewicz | 22aa4b3 | 2009-03-27 12:46:37 +0100 | [diff] [blame] | 188 | |
Tejun Heo | fc38b52 | 2009-04-19 07:00:43 +0900 | [diff] [blame] | 189 | return do_rw_taskfile(drive, &cmd); |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 190 | } |
| 191 | |
| 192 | /** |
Bartlomiej Zolnierkiewicz | 3616b65 | 2009-03-27 12:46:29 +0100 | [diff] [blame] | 193 | * ide_complete_pm_rq - end the current Power Management request |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 194 | * @drive: target drive |
| 195 | * @rq: request |
| 196 | * |
| 197 | * This function cleans up the current PM request and stops the queue |
| 198 | * if necessary. |
| 199 | */ |
Bartlomiej Zolnierkiewicz | 3616b65 | 2009-03-27 12:46:29 +0100 | [diff] [blame] | 200 | void ide_complete_pm_rq(ide_drive_t *drive, struct request *rq) |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 201 | { |
| 202 | struct request_queue *q = drive->queue; |
Christoph Hellwig | 22ce0a7 | 2018-11-10 09:30:49 +0100 | [diff] [blame] | 203 | struct ide_pm_state *pm = ide_req(rq)->special; |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 204 | |
Bartlomiej Zolnierkiewicz | 3616b65 | 2009-03-27 12:46:29 +0100 | [diff] [blame] | 205 | ide_complete_power_step(drive, rq); |
| 206 | if (pm->pm_step != IDE_PM_COMPLETED) |
| 207 | return; |
| 208 | |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 209 | #ifdef DEBUG_PM |
| 210 | printk("%s: completing PM request, %s\n", drive->name, |
Christoph Hellwig | 2f5a8e80 | 2017-01-31 16:57:30 +0100 | [diff] [blame] | 211 | (ide_req(rq)->type == ATA_PRIV_PM_SUSPEND) ? "suspend" : "resume"); |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 212 | #endif |
Christoph Hellwig | 2f5a8e80 | 2017-01-31 16:57:30 +0100 | [diff] [blame] | 213 | if (ide_req(rq)->type == ATA_PRIV_PM_SUSPEND) |
Jens Axboe | 6003352 | 2018-10-26 09:53:52 -0600 | [diff] [blame] | 214 | blk_mq_stop_hw_queues(q); |
Bartlomiej Zolnierkiewicz | 2ea5521 | 2009-01-14 19:19:04 +0100 | [diff] [blame] | 215 | else |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 216 | drive->dev_flags &= ~IDE_DFLAG_BLOCKED; |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 217 | |
Bartlomiej Zolnierkiewicz | b65fac3 | 2009-01-06 17:20:50 +0100 | [diff] [blame] | 218 | drive->hwif->rq = NULL; |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 219 | |
Jens Axboe | 6003352 | 2018-10-26 09:53:52 -0600 | [diff] [blame] | 220 | blk_mq_end_request(rq, BLK_STS_OK); |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 221 | } |
| 222 | |
| 223 | void ide_check_pm_state(ide_drive_t *drive, struct request *rq) |
| 224 | { |
Christoph Hellwig | 22ce0a7 | 2018-11-10 09:30:49 +0100 | [diff] [blame] | 225 | struct ide_pm_state *pm = ide_req(rq)->special; |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 226 | |
Christoph Hellwig | aebf526 | 2017-01-31 16:57:31 +0100 | [diff] [blame] | 227 | if (blk_rq_is_private(rq) && |
Christoph Hellwig | 2f5a8e80 | 2017-01-31 16:57:30 +0100 | [diff] [blame] | 228 | ide_req(rq)->type == ATA_PRIV_PM_SUSPEND && |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 229 | pm->pm_step == IDE_PM_START_SUSPEND) |
| 230 | /* Mark drive blocked when starting the suspend sequence. */ |
| 231 | drive->dev_flags |= IDE_DFLAG_BLOCKED; |
Christoph Hellwig | aebf526 | 2017-01-31 16:57:31 +0100 | [diff] [blame] | 232 | else if (blk_rq_is_private(rq) && |
Christoph Hellwig | 2f5a8e80 | 2017-01-31 16:57:30 +0100 | [diff] [blame] | 233 | ide_req(rq)->type == ATA_PRIV_PM_RESUME && |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 234 | pm->pm_step == IDE_PM_START_RESUME) { |
| 235 | /* |
| 236 | * The first thing we do on wakeup is to wait for BSY bit to |
| 237 | * go away (with a looong timeout) as a drive on this hwif may |
| 238 | * just be POSTing itself. |
| 239 | * We do that before even selecting as the "other" device on |
| 240 | * the bus may be broken enough to walk on our toes at this |
| 241 | * point. |
| 242 | */ |
| 243 | ide_hwif_t *hwif = drive->hwif; |
Sergei Shtylyov | fdd88f0 | 2009-03-31 20:15:33 +0200 | [diff] [blame] | 244 | const struct ide_tp_ops *tp_ops = hwif->tp_ops; |
Bartlomiej Zolnierkiewicz | 2ea5521 | 2009-01-14 19:19:04 +0100 | [diff] [blame] | 245 | struct request_queue *q = drive->queue; |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 246 | int rc; |
| 247 | #ifdef DEBUG_PM |
| 248 | printk("%s: Wakeup request inited, waiting for !BSY...\n", drive->name); |
| 249 | #endif |
| 250 | rc = ide_wait_not_busy(hwif, 35000); |
| 251 | if (rc) |
| 252 | printk(KERN_WARNING "%s: bus not ready on wakeup\n", drive->name); |
Sergei Shtylyov | fdd88f0 | 2009-03-31 20:15:33 +0200 | [diff] [blame] | 253 | tp_ops->dev_select(drive); |
| 254 | tp_ops->write_devctl(hwif, ATA_DEVCTL_OBS); |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 255 | rc = ide_wait_not_busy(hwif, 100000); |
| 256 | if (rc) |
| 257 | printk(KERN_WARNING "%s: drive not ready on wakeup\n", drive->name); |
Bartlomiej Zolnierkiewicz | 2ea5521 | 2009-01-14 19:19:04 +0100 | [diff] [blame] | 258 | |
Jens Axboe | 6003352 | 2018-10-26 09:53:52 -0600 | [diff] [blame] | 259 | blk_mq_start_hw_queues(q); |
Bartlomiej Zolnierkiewicz | e2984c6 | 2008-12-29 20:27:37 +0100 | [diff] [blame] | 260 | } |
| 261 | } |