linux/drivers/scsi/device_handler/scsi_dh_hp_sw.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Basic HP/COMPAQ MSA 1000 support. This is only needed if your HW cannot be
 * upgraded.
 *
 * Copyright (C) 2006 Red Hat, Inc.  All rights reserved.
 * Copyright (C) 2006 Mike Christie
 * Copyright (C) 2008 Hannes Reinecke <[email protected]>
 */

#include <linux/slab.h>
#include <linux/module.h>
#include <scsi/scsi.h>
#include <scsi/scsi_dbg.h>
#include <scsi/scsi_eh.h>
#include <scsi/scsi_dh.h>

#define HP_SW_NAME

#define HP_SW_TIMEOUT
#define HP_SW_RETRIES

#define HP_SW_PATH_UNINITIALIZED
#define HP_SW_PATH_ACTIVE
#define HP_SW_PATH_PASSIVE

struct hp_sw_dh_data {};

static int hp_sw_start_stop(struct hp_sw_dh_data *);

/*
 * tur_done - Handle TEST UNIT READY return status
 * @sdev: sdev the command has been sent to
 * @errors: blk error code
 *
 * Returns SCSI_DH_DEV_OFFLINED if the sdev is on the passive path
 */
static int tur_done(struct scsi_device *sdev, struct hp_sw_dh_data *h,
		    struct scsi_sense_hdr *sshdr)
{}

/*
 * hp_sw_tur - Send TEST UNIT READY
 * @sdev: sdev command should be sent to
 *
 * Use the TEST UNIT READY command to determine
 * the path state.
 */
static int hp_sw_tur(struct scsi_device *sdev, struct hp_sw_dh_data *h)
{}

/*
 * hp_sw_start_stop - Send START STOP UNIT command
 * @sdev: sdev command should be sent to
 *
 * Sending START STOP UNIT activates the SP.
 */
static int hp_sw_start_stop(struct hp_sw_dh_data *h)
{}

static blk_status_t hp_sw_prep_fn(struct scsi_device *sdev, struct request *req)
{}

/*
 * hp_sw_activate - Activate a path
 * @sdev: sdev on the path to be activated
 *
 * The HP Active/Passive firmware is pretty simple;
 * the passive path reports NOT READY with sense codes
 * 0x04/0x02; a START STOP UNIT command will then
 * activate the passive path (and deactivate the
 * previously active one).
 */
static int hp_sw_activate(struct scsi_device *sdev,
				activate_complete fn, void *data)
{}

static int hp_sw_bus_attach(struct scsi_device *sdev)
{}

static void hp_sw_bus_detach( struct scsi_device *sdev )
{}

static struct scsi_device_handler hp_sw_dh =;

static int __init hp_sw_init(void)
{}

static void __exit hp_sw_exit(void)
{}

module_init();
module_exit(hp_sw_exit);

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();