ACPI: thinkpad-acpi: don't misdetect in get_thinkpad_model_data() on -ENOMEM
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / include / scsi / scsi_dh.h
blob3ad2303d1a166ec69efb9350e63d8ec77444c565
1 /*
2 * Header file for SCSI device handler infrastruture.
4 * Modified version of patches posted by Mike Christie <michaelc@cs.wisc.edu>
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 * Copyright IBM Corporation, 2007
21 * Authors:
22 * Chandra Seetharaman <sekharan@us.ibm.com>
23 * Mike Anderson <andmike@linux.vnet.ibm.com>
26 #include <scsi/scsi_device.h>
28 enum {
29 SCSI_DH_OK = 0,
31 * device errors
33 SCSI_DH_DEV_FAILED, /* generic device error */
34 SCSI_DH_DEV_TEMP_BUSY,
35 SCSI_DH_DEVICE_MAX, /* max device blkerr definition */
38 * transport errors
40 SCSI_DH_NOTCONN = SCSI_DH_DEVICE_MAX + 1,
41 SCSI_DH_CONN_FAILURE,
42 SCSI_DH_TRANSPORT_MAX, /* max transport blkerr definition */
45 * driver and generic errors
47 SCSI_DH_IO = SCSI_DH_TRANSPORT_MAX + 1, /* generic error */
48 SCSI_DH_INVALID_IO,
49 SCSI_DH_RETRY, /* retry the req, but not immediately */
50 SCSI_DH_IMM_RETRY, /* immediately retry the req */
51 SCSI_DH_TIMED_OUT,
52 SCSI_DH_RES_TEMP_UNAVAIL,
53 SCSI_DH_DEV_OFFLINED,
54 SCSI_DH_NOSYS,
55 SCSI_DH_DRIVER_MAX,
57 #if defined(CONFIG_SCSI_DH) || defined(CONFIG_SCSI_DH_MODULE)
58 extern int scsi_dh_activate(struct request_queue *);
59 extern int scsi_dh_handler_exist(const char *);
60 #else
61 static inline int scsi_dh_activate(struct request_queue *req)
63 return 0;
65 static inline int scsi_dh_handler_exist(const char *name)
67 return 0;
69 #endif