diff options
Diffstat (limited to 'include/scsi')
| -rw-r--r-- | include/scsi/libsas.h | 30 | ||||
| -rw-r--r-- | include/scsi/scsi_cmnd.h | 4 | ||||
| -rw-r--r-- | include/scsi/scsi_host.h | 2 | ||||
| -rw-r--r-- | include/scsi/scsi_proto.h | 1 | ||||
| -rw-r--r-- | include/scsi/scsi_transport_fc.h | 4 | ||||
| -rw-r--r-- | include/scsi/scsi_transport_sas.h | 1 | ||||
| -rw-r--r-- | include/scsi/srp.h | 17 | 
7 files changed, 46 insertions, 13 deletions
| diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 6df6fe0c2198..225ab7783dfd 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h @@ -75,16 +75,15 @@ enum phy_event {  	PHYE_OOB_ERROR,  	PHYE_SPINUP_HOLD,             /* hot plug SATA, no COMWAKE sent */  	PHYE_RESUME_TIMEOUT, +	PHYE_SHUTDOWN,  	PHY_NUM_EVENTS,  };  enum discover_event {  	DISCE_DISCOVER_DOMAIN   = 0U,  	DISCE_REVALIDATE_DOMAIN, -	DISCE_PROBE,  	DISCE_SUSPEND,  	DISCE_RESUME, -	DISCE_DESTRUCT,  	DISC_NUM_EVENTS,  }; @@ -261,6 +260,7 @@ struct asd_sas_port {  	struct list_head dev_list;  	struct list_head disco_list;  	struct list_head destroy_list; +	struct list_head sas_port_del_list;  	enum   sas_linkrate linkrate;  	struct sas_work work; @@ -292,6 +292,7 @@ struct asd_sas_port {  struct asd_sas_event {  	struct sas_work work;  	struct asd_sas_phy *phy; +	int event;  };  static inline struct asd_sas_event *to_asd_sas_event(struct work_struct *work) @@ -301,17 +302,24 @@ static inline struct asd_sas_event *to_asd_sas_event(struct work_struct *work)  	return ev;  } +static inline void INIT_SAS_EVENT(struct asd_sas_event *ev, +		void (*fn)(struct work_struct *), +		struct asd_sas_phy *phy, int event) +{ +	INIT_SAS_WORK(&ev->work, fn); +	ev->phy = phy; +	ev->event = event; +} + +#define SAS_PHY_SHUTDOWN_THRES   1024 +  /* The phy pretty much is controlled by the LLDD.   * The class only reads those fields.   */  struct asd_sas_phy {  /* private: */ -	struct asd_sas_event   port_events[PORT_NUM_EVENTS]; -	struct asd_sas_event   phy_events[PHY_NUM_EVENTS]; - -	unsigned long port_events_pending; -	unsigned long phy_events_pending; - +	atomic_t event_nr; +	int in_shutdown;  	int error;  	int suspended; @@ -380,6 +388,9 @@ struct sas_ha_struct {  	struct device *dev;	  /* should be set */  	struct module *lldd_module; /* should be set */ +	struct workqueue_struct *event_q; +	struct workqueue_struct *disco_q; +  	u8 *sas_addr;		  /* must be set */  	u8 hashed_sas_addr[HASHED_SAS_ADDR_SIZE]; @@ -399,6 +410,8 @@ struct sas_ha_struct {  	struct list_head eh_done_q;  /* complete via scsi_eh_flush_done_q */  	struct list_head eh_ata_q; /* scmds to promote from sas to ata eh */ + +	int event_thres;  };  #define SHOST_TO_SAS_HA(_shost) (*(struct sas_ha_struct **)(_shost)->hostdata) @@ -670,6 +683,7 @@ extern int sas_bios_param(struct scsi_device *,  			  sector_t capacity, int *hsc);  extern struct scsi_transport_template *  sas_domain_attach_transport(struct sas_domain_function_template *); +extern struct device_attribute dev_attr_phy_event_threshold;  int  sas_discover_root_expander(struct domain_device *); diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 7fb57e905526..d8d4a902a88d 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h @@ -58,8 +58,7 @@ struct scsi_pointer {  /* for scmd->flags */  #define SCMD_TAGGED		(1 << 0)  #define SCMD_UNCHECKED_ISA_DMA	(1 << 1) -#define SCMD_ZONE_WRITE_LOCK	(1 << 2) -#define SCMD_INITIALIZED	(1 << 3) +#define SCMD_INITIALIZED	(1 << 2)  /* flags preserved across unprep / reprep */  #define SCMD_PRESERVED_FLAGS	(SCMD_UNCHECKED_ISA_DMA | SCMD_INITIALIZED) @@ -171,7 +170,6 @@ extern void *scsi_kmap_atomic_sg(struct scatterlist *sg, int sg_count,  extern void scsi_kunmap_atomic_sg(void *virt);  extern int scsi_init_io(struct scsi_cmnd *cmd); -extern void scsi_initialize_rq(struct request *rq);  extern int scsi_dma_map(struct scsi_cmnd *cmd);  extern void scsi_dma_unmap(struct scsi_cmnd *cmd); diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index a8b7bf879ced..1a1df0d21ee3 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h @@ -571,6 +571,8 @@ struct Scsi_Host {  		struct blk_mq_tag_set	tag_set;  	}; +	struct rcu_head rcu; +  	atomic_t host_busy;		   /* commands actually active on low-level */  	atomic_t host_blocked; diff --git a/include/scsi/scsi_proto.h b/include/scsi/scsi_proto.h index 1df8efb0ee01..c36860111932 100644 --- a/include/scsi/scsi_proto.h +++ b/include/scsi/scsi_proto.h @@ -236,6 +236,7 @@ struct scsi_varlen_cdb_hdr {  #define UNIT_ATTENTION      0x06  #define DATA_PROTECT        0x07  #define BLANK_CHECK         0x08 +#define VENDOR_SPECIFIC     0x09  #define COPY_ABORTED        0x0a  #define ABORTED_COMMAND     0x0b  #define VOLUME_OVERFLOW     0x0d diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h index 8cf30215c177..15da45dc2a5d 100644 --- a/include/scsi/scsi_transport_fc.h +++ b/include/scsi/scsi_transport_fc.h @@ -139,8 +139,8 @@ enum fc_vport_state {  #define FC_PORTSPEED_50GBIT		0x200  #define FC_PORTSPEED_100GBIT		0x400  #define FC_PORTSPEED_25GBIT		0x800 -#define FC_PORTSPEED_64BIT		0x1000 -#define FC_PORTSPEED_128BIT		0x2000 +#define FC_PORTSPEED_64GBIT		0x1000 +#define FC_PORTSPEED_128GBIT		0x2000  #define FC_PORTSPEED_NOT_NEGOTIATED	(1 << 15) /* Speed not established */  /* diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h index 62895b405933..05ec927a3c72 100644 --- a/include/scsi/scsi_transport_sas.h +++ b/include/scsi/scsi_transport_sas.h @@ -156,6 +156,7 @@ struct sas_port {  	struct mutex		phy_list_mutex;  	struct list_head	phy_list; +	struct list_head	del_list; /* libsas only */  };  #define dev_to_sas_port(d) \ diff --git a/include/scsi/srp.h b/include/scsi/srp.h index 5be834de491a..c16a3c9a4d9b 100644 --- a/include/scsi/srp.h +++ b/include/scsi/srp.h @@ -129,6 +129,23 @@ struct srp_login_req {  	u8	target_port_id[16];  }; +/** + * struct srp_login_req_rdma - RDMA/CM login parameters. + * + * RDMA/CM over InfiniBand can only carry 92 - 36 = 56 bytes of private + * data. The %srp_login_req_rdma structure contains the same information as + * %srp_login_req but with the reserved data removed. + */ +struct srp_login_req_rdma { +	u64	tag; +	__be16	req_buf_fmt; +	u8	req_flags; +	u8	opcode; +	__be32	req_it_iu_len; +	u8	initiator_port_id[16]; +	u8	target_port_id[16]; +}; +  /*   * The SRP spec defines the size of the LOGIN_RSP structure to be 52   * bytes, so it needs to be packed to avoid having it padded to 56 |