linux/drivers/staging/rts5208/rtsx.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Driver for Realtek PCI-Express card reader
 *
 * Copyright(c) 2009-2013 Realtek Semiconductor Corp. All rights reserved.
 *
 * Author:
 *   Wei WANG ([email protected])
 *   Micky Ching ([email protected])
 */

#include <linux/blkdev.h>
#include <linux/kthread.h>
#include <linux/sched.h>
#include <linux/workqueue.h>

#include "rtsx.h"
#include "ms.h"
#include "sd.h"
#include "xd.h"

MODULE_DESCRIPTION();
MODULE_LICENSE();

static unsigned int delay_use =;
module_param(delay_use, uint, 0644);
MODULE_PARM_DESC();

static int ss_en;
module_param(ss_en, int, 0644);
MODULE_PARM_DESC();

static int ss_interval =;
module_param(ss_interval, int, 0644);
MODULE_PARM_DESC();

static int auto_delink_en;
module_param(auto_delink_en, int, 0644);
MODULE_PARM_DESC();

static unsigned char aspm_l0s_l1_en;
module_param(aspm_l0s_l1_en, byte, 0644);
MODULE_PARM_DESC();

static int msi_en;
module_param(msi_en, int, 0644);
MODULE_PARM_DESC();

static irqreturn_t rtsx_interrupt(int irq, void *dev_id);

/***********************************************************************
 * Host functions
 ***********************************************************************/

static const char *host_info(struct Scsi_Host *host)
{}

static int slave_alloc(struct scsi_device *sdev)
{}

static int slave_configure(struct scsi_device *sdev)
{}

/***********************************************************************
 * /proc/scsi/ functions
 ***********************************************************************/

/* we use this macro to help us write into the buffer */
#undef SPRINTF
#define SPRINTF(args...)

/* queue a command */
/* This is always called with spin_lock_irq(host->host_lock) held */
static int queuecommand_lck(struct scsi_cmnd *srb)
{}

static DEF_SCSI_QCMD(queuecommand)

/***********************************************************************
 * Error handling functions
 ***********************************************************************/

/* Command timeout and abort */
static int command_abort(struct scsi_cmnd *srb)
{}

/*
 * This invokes the transport reset mechanism to reset the state of the
 * device
 */
static int device_reset(struct scsi_cmnd *srb)
{}

/*
 * this defines our host template, with which we'll allocate hosts
 */

static const struct scsi_host_template rtsx_host_template =;

static int rtsx_acquire_irq(struct rtsx_dev *dev)
{}

/*
 * power management
 */
static int __maybe_unused rtsx_suspend(struct device *dev_d)
{}

static int __maybe_unused rtsx_resume(struct device *dev_d)
{}

static void rtsx_shutdown(struct pci_dev *pci)
{}

static int rtsx_control_thread(void *__dev)
{}

static int rtsx_polling_thread(void *__dev)
{}

/*
 * interrupt handler
 */
static irqreturn_t rtsx_interrupt(int irq, void *dev_id)
{}

/* Release all our dynamic resources */
static void rtsx_release_resources(struct rtsx_dev *dev)
{}

/*
 * First stage of disconnect processing: stop all commands and remove
 * the host
 */
static void quiesce_and_remove_host(struct rtsx_dev *dev)
{}

/* Second stage of disconnect processing: deallocate all resources */
static void release_everything(struct rtsx_dev *dev)
{}

/* Thread to carry out delayed SCSI-device scanning */
static int rtsx_scan_thread(void *__dev)
{}

static void rtsx_init_options(struct rtsx_chip *chip)
{}

static int rtsx_probe(struct pci_dev *pci,
		      const struct pci_device_id *pci_id)
{}

static void rtsx_remove(struct pci_dev *pci)
{}

/* PCI IDs */
static const struct pci_device_id rtsx_ids[] =;

MODULE_DEVICE_TABLE(pci, rtsx_ids);

static SIMPLE_DEV_PM_OPS(rtsx_pm_ops, rtsx_suspend, rtsx_resume);

/* pci_driver definition */
static struct pci_driver rtsx_driver =;

module_pci_driver();