#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/enclosure.h>
#include <asm/unaligned.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_dbg.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_driver.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_transport_sas.h>
unsigned char *page1_types;
static bool ses_page2_supported(struct enclosure_device *edev)
struct ses_device *ses_dev = edev->scratch;
return (ses_dev->page2 != NULL);
static int ses_probe(struct device *dev)
struct scsi_device *sdev = to_scsi_device(dev);
if (sdev->type != TYPE_ENCLOSURE)
sdev_printk(KERN_NOTICE, sdev, "Attached Enclosure device\n");
#define SES_TIMEOUT (30 * HZ)
static void init_device_slot_control(unsigned char *dest_desc,
struct enclosure_component *ecomp,
memcpy(dest_desc, status, 4);
if (ecomp->type == ENCLOSURE_COMPONENT_DEVICE)
static int ses_recv_diag(struct scsi_device *sdev, int page_code,