mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-16 17:23:55 +08:00
mtip32xx: kill atomic argument to mtip_quiesce_io()
All callers now pass in GFP_KERNEL, get rid of the argument. Reviewed-by: Bart Van Assche <Bart.VanAssche@sandisk.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Tested-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
parent
0f6422a2c5
commit
8afdd94c74
@ -1035,14 +1035,12 @@ static bool mtip_pause_ncq(struct mtip_port *port,
|
|||||||
*
|
*
|
||||||
* @port Pointer to port data structure
|
* @port Pointer to port data structure
|
||||||
* @timeout Max duration to wait (ms)
|
* @timeout Max duration to wait (ms)
|
||||||
* @atomic gfp_t flag to indicate blockable context or not
|
|
||||||
*
|
*
|
||||||
* return value
|
* return value
|
||||||
* 0 Success
|
* 0 Success
|
||||||
* -EBUSY Commands still active
|
* -EBUSY Commands still active
|
||||||
*/
|
*/
|
||||||
static int mtip_quiesce_io(struct mtip_port *port, unsigned long timeout,
|
static int mtip_quiesce_io(struct mtip_port *port, unsigned long timeout)
|
||||||
gfp_t atomic)
|
|
||||||
{
|
{
|
||||||
unsigned long to;
|
unsigned long to;
|
||||||
unsigned int n;
|
unsigned int n;
|
||||||
@ -1053,18 +1051,12 @@ static int mtip_quiesce_io(struct mtip_port *port, unsigned long timeout,
|
|||||||
to = jiffies + msecs_to_jiffies(timeout);
|
to = jiffies + msecs_to_jiffies(timeout);
|
||||||
do {
|
do {
|
||||||
if (test_bit(MTIP_PF_SVC_THD_ACTIVE_BIT, &port->flags) &&
|
if (test_bit(MTIP_PF_SVC_THD_ACTIVE_BIT, &port->flags) &&
|
||||||
test_bit(MTIP_PF_ISSUE_CMDS_BIT, &port->flags) &&
|
test_bit(MTIP_PF_ISSUE_CMDS_BIT, &port->flags)) {
|
||||||
atomic == GFP_KERNEL) {
|
|
||||||
msleep(20);
|
msleep(20);
|
||||||
continue; /* svc thd is actively issuing commands */
|
continue; /* svc thd is actively issuing commands */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (atomic == GFP_KERNEL)
|
msleep(100);
|
||||||
msleep(100);
|
|
||||||
else {
|
|
||||||
cpu_relax();
|
|
||||||
udelay(100);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mtip_check_surprise_removal(port->dd->pdev))
|
if (mtip_check_surprise_removal(port->dd->pdev))
|
||||||
goto err_fault;
|
goto err_fault;
|
||||||
@ -1142,8 +1134,7 @@ static int mtip_exec_internal_command(struct mtip_port *port,
|
|||||||
|
|
||||||
if (fis->command != ATA_CMD_STANDBYNOW1) {
|
if (fis->command != ATA_CMD_STANDBYNOW1) {
|
||||||
/* wait for io to complete if non atomic */
|
/* wait for io to complete if non atomic */
|
||||||
if (mtip_quiesce_io(port,
|
if (mtip_quiesce_io(port, MTIP_QUIESCE_IO_TIMEOUT_MS) < 0) {
|
||||||
MTIP_QUIESCE_IO_TIMEOUT_MS, GFP_KERNEL) < 0) {
|
|
||||||
dev_warn(&dd->pdev->dev, "Failed to quiesce IO\n");
|
dev_warn(&dd->pdev->dev, "Failed to quiesce IO\n");
|
||||||
mtip_put_int_command(dd, int_cmd);
|
mtip_put_int_command(dd, int_cmd);
|
||||||
clear_bit(MTIP_PF_IC_ACTIVE_BIT, &port->flags);
|
clear_bit(MTIP_PF_IC_ACTIVE_BIT, &port->flags);
|
||||||
@ -4106,8 +4097,7 @@ static int mtip_block_remove(struct driver_data *dd)
|
|||||||
* Explicitly wait here for IOs to quiesce,
|
* Explicitly wait here for IOs to quiesce,
|
||||||
* as mtip_standby_drive usually won't wait for IOs.
|
* as mtip_standby_drive usually won't wait for IOs.
|
||||||
*/
|
*/
|
||||||
if (!mtip_quiesce_io(dd->port, MTIP_QUIESCE_IO_TIMEOUT_MS,
|
if (!mtip_quiesce_io(dd->port, MTIP_QUIESCE_IO_TIMEOUT_MS))
|
||||||
GFP_KERNEL))
|
|
||||||
mtip_standby_drive(dd);
|
mtip_standby_drive(dd);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user