| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Basic HP/COMPAQ MSA 1000 support. This is only needed if your HW cannot be |
|---|
| 3 | 4 | * upgraded. |
|---|
| .. | .. |
|---|
| 5 | 6 | * Copyright (C) 2006 Red Hat, Inc. All rights reserved. |
|---|
| 6 | 7 | * Copyright (C) 2006 Mike Christie |
|---|
| 7 | 8 | * Copyright (C) 2008 Hannes Reinecke <hare@suse.de> |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 10 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 11 | | - * the Free Software Foundation; either version 2, or (at your option) |
|---|
| 12 | | - * any later version. |
|---|
| 13 | | - * |
|---|
| 14 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 15 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 16 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 17 | | - * GNU General Public License for more details. |
|---|
| 18 | | - * |
|---|
| 19 | | - * You should have received a copy of the GNU General Public License |
|---|
| 20 | | - * along with this program; see the file COPYING. If not, write to |
|---|
| 21 | | - * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
|---|
| 22 | 9 | */ |
|---|
| 23 | 10 | |
|---|
| 24 | 11 | #include <linux/slab.h> |
|---|
| .. | .. |
|---|
| 73 | 60 | ret = SCSI_DH_OK; |
|---|
| 74 | 61 | break; |
|---|
| 75 | 62 | } |
|---|
| 76 | | - /* Fallthrough */ |
|---|
| 63 | + fallthrough; |
|---|
| 77 | 64 | default: |
|---|
| 78 | 65 | sdev_printk(KERN_WARNING, sdev, |
|---|
| 79 | 66 | "%s: sending tur failed, sense %x/%x/%x\n", |
|---|
| .. | .. |
|---|
| 160 | 147 | rc = SCSI_DH_RETRY; |
|---|
| 161 | 148 | break; |
|---|
| 162 | 149 | } |
|---|
| 163 | | - /* fall through */ |
|---|
| 150 | + fallthrough; |
|---|
| 164 | 151 | default: |
|---|
| 165 | 152 | sdev_printk(KERN_WARNING, sdev, |
|---|
| 166 | 153 | "%s: sending start_stop_unit failed, " |
|---|
| .. | .. |
|---|
| 172 | 159 | return rc; |
|---|
| 173 | 160 | } |
|---|
| 174 | 161 | |
|---|
| 175 | | -static int hp_sw_prep_fn(struct scsi_device *sdev, struct request *req) |
|---|
| 162 | +static blk_status_t hp_sw_prep_fn(struct scsi_device *sdev, struct request *req) |
|---|
| 176 | 163 | { |
|---|
| 177 | 164 | struct hp_sw_dh_data *h = sdev->handler_data; |
|---|
| 178 | | - int ret = BLKPREP_OK; |
|---|
| 179 | 165 | |
|---|
| 180 | 166 | if (h->path_state != HP_SW_PATH_ACTIVE) { |
|---|
| 181 | | - ret = BLKPREP_KILL; |
|---|
| 182 | 167 | req->rq_flags |= RQF_QUIET; |
|---|
| 168 | + return BLK_STS_IOERR; |
|---|
| 183 | 169 | } |
|---|
| 184 | | - return ret; |
|---|
| 185 | 170 | |
|---|
| 171 | + return BLK_STS_OK; |
|---|
| 186 | 172 | } |
|---|
| 187 | 173 | |
|---|
| 188 | 174 | /* |
|---|