forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/drivers/scsi/device_handler/scsi_dh_emc.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Target driver for EMC CLARiiON AX/CX-series hardware.
34 * Based on code from Lars Marowsky-Bree <lmb@suse.de>
....@@ -5,20 +6,6 @@
56 *
67 * Copyright (C) 2006 Red Hat, Inc. All rights reserved.
78 * Copyright (C) 2006 Mike Christie
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.
229 */
2310 #include <linux/slab.h>
2411 #include <linux/module.h>
....@@ -341,17 +328,17 @@
341328 return SCSI_RETURN_NOT_HANDLED;
342329 }
343330
344
-static int clariion_prep_fn(struct scsi_device *sdev, struct request *req)
331
+static blk_status_t clariion_prep_fn(struct scsi_device *sdev,
332
+ struct request *req)
345333 {
346334 struct clariion_dh_data *h = sdev->handler_data;
347
- int ret = BLKPREP_OK;
348335
349336 if (h->lun_state != CLARIION_LUN_OWNED) {
350
- ret = BLKPREP_KILL;
351337 req->rq_flags |= RQF_QUIET;
338
+ return BLK_STS_IOERR;
352339 }
353
- return ret;
354340
341
+ return BLK_STS_OK;
355342 }
356343
357344 static int clariion_std_inquiry(struct scsi_device *sdev,