diff options
| author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-05-08 13:39:59 +0200 | 
|---|---|---|
| committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-05-08 13:39:59 +0200 | 
| commit | 5e13a0c5ec05d382b488a691dfb8af015b1dea1e (patch) | |
| tree | 7a06dfa1f7661f8908193f2437b32452520221d3 /include/scsi/libsas.h | |
| parent | b615b57a124a4af7b68196bc2fb8acc236041fa2 (diff) | |
| parent | 4f256e8aa3eda15c11c3cec3ec5336e1fc579cbd (diff) | |
| download | olio-linux-3.10-5e13a0c5ec05d382b488a691dfb8af015b1dea1e.tar.xz olio-linux-3.10-5e13a0c5ec05d382b488a691dfb8af015b1dea1e.zip  | |
Merge remote-tracking branch 'airlied/drm-core-next' into drm-intel-next-queued
Backmerge of drm-next to resolve a few ugly conflicts and to get a few
fixes from 3.4-rc6 (which drm-next has already merged). Note that this
merge also restricts the stencil cache lra evict policy workaround to
snb (as it should) - I had to frob the code anyway because the
CM0_MASK_SHIFT define died in the masked bit cleanups.
We need the backmerge to get Paulo Zanoni's infoframe regression fix
for gm45 - further bugfixes from him touch the same area and would
needlessly conflict.
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'include/scsi/libsas.h')
| -rw-r--r-- | include/scsi/libsas.h | 40 | 
1 files changed, 36 insertions, 4 deletions
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 5f5ed1b8b41..f4f1c96dca7 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h @@ -217,11 +217,29 @@ struct domain_device {  	struct kref kref;  }; -struct sas_discovery_event { +struct sas_work { +	struct list_head drain_node;  	struct work_struct work; +}; + +static inline void INIT_SAS_WORK(struct sas_work *sw, void (*fn)(struct work_struct *)) +{ +	INIT_WORK(&sw->work, fn); +	INIT_LIST_HEAD(&sw->drain_node); +} + +struct sas_discovery_event { +	struct sas_work work;  	struct asd_sas_port *port;  }; +static inline struct sas_discovery_event *to_sas_discovery_event(struct work_struct *work) +{ +	struct sas_discovery_event *ev = container_of(work, typeof(*ev), work.work); + +	return ev; +} +  struct sas_discovery {  	struct sas_discovery_event disc_work[DISC_NUM_EVENTS];  	unsigned long    pending; @@ -244,7 +262,7 @@ struct asd_sas_port {  	struct list_head destroy_list;  	enum   sas_linkrate linkrate; -	struct work_struct work; +	struct sas_work work;  /* public: */  	int id; @@ -270,10 +288,17 @@ struct asd_sas_port {  };  struct asd_sas_event { -	struct work_struct work; +	struct sas_work work;  	struct asd_sas_phy *phy;  }; +static inline struct asd_sas_event *to_asd_sas_event(struct work_struct *work) +{ +	struct asd_sas_event *ev = container_of(work, typeof(*ev), work.work); + +	return ev; +} +  /* The phy pretty much is controlled by the LLDD.   * The class only reads those fields.   */ @@ -333,10 +358,17 @@ struct scsi_core {  };  struct sas_ha_event { -	struct work_struct work; +	struct sas_work work;  	struct sas_ha_struct *ha;  }; +static inline struct sas_ha_event *to_sas_ha_event(struct work_struct *work) +{ +	struct sas_ha_event *ev = container_of(work, typeof(*ev), work.work); + +	return ev; +} +  enum sas_ha_state {  	SAS_HA_REGISTERED,  	SAS_HA_DRAINING,  |