aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/libsas.h
diff options
context:
space:
mode:
authorJason Yan <yanaijie@huawei.com>2017-09-06 05:15:04 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2017-09-15 21:32:58 -0400
commit042ebd293b862c491e31aea17b540317a1b9af21 (patch)
tree2a0262b8f9e61a8512069f365950434bc5629eb8 /include/scsi/libsas.h
parent7eccdf005b2f240b9e9f53c72eb19367e21a8cf8 (diff)
scsi: libsas: kill useless ha_event and do some cleanup
The ha_event now has only one event HAE_RESET, and this event does nothing. Kill it and do some cleanup. This is a preparation for enhance libsas hotplug feature in the next patches. Signed-off-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: John Garry <john.garry@huawei.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Christoph Hellwig <hch@lst.de> CC: Johannes Thumshirn <jthumshirn@suse.de> CC: Ewan Milne <emilne@redhat.com> CC: Christoph Hellwig <hch@lst.de> CC: Tomas Henzl <thenzl@redhat.com> CC: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/scsi/libsas.h')
-rw-r--r--include/scsi/libsas.h21
1 files changed, 0 insertions, 21 deletions
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index 6c0dc6155ee7..52b3e863bea8 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -60,11 +60,6 @@ enum sas_phy_type {
60 * so when updating/adding events here, please also 60 * so when updating/adding events here, please also
61 * update the other file too. 61 * update the other file too.
62 */ 62 */
63enum ha_event {
64 HAE_RESET = 0U,
65 HA_NUM_EVENTS = 1,
66};
67
68enum port_event { 63enum port_event {
69 PORTE_BYTES_DMAED = 0U, 64 PORTE_BYTES_DMAED = 0U,
70 PORTE_BROADCAST_RCVD = 1, 65 PORTE_BROADCAST_RCVD = 1,
@@ -362,18 +357,6 @@ struct scsi_core {
362 357
363}; 358};
364 359
365struct sas_ha_event {
366 struct sas_work work;
367 struct sas_ha_struct *ha;
368};
369
370static inline struct sas_ha_event *to_sas_ha_event(struct work_struct *work)
371{
372 struct sas_ha_event *ev = container_of(work, typeof(*ev), work.work);
373
374 return ev;
375}
376
377enum sas_ha_state { 360enum sas_ha_state {
378 SAS_HA_REGISTERED, 361 SAS_HA_REGISTERED,
379 SAS_HA_DRAINING, 362 SAS_HA_DRAINING,
@@ -383,9 +366,6 @@ enum sas_ha_state {
383 366
384struct sas_ha_struct { 367struct sas_ha_struct {
385/* private: */ 368/* private: */
386 struct sas_ha_event ha_events[HA_NUM_EVENTS];
387 unsigned long pending;
388
389 struct list_head defer_q; /* work queued while draining */ 369 struct list_head defer_q; /* work queued while draining */
390 struct mutex drain_mutex; 370 struct mutex drain_mutex;
391 unsigned long state; 371 unsigned long state;
@@ -415,7 +395,6 @@ struct sas_ha_struct {
415 * their siblings when forming wide ports */ 395 * their siblings when forming wide ports */
416 396
417 /* LLDD calls these to notify the class of an event. */ 397 /* LLDD calls these to notify the class of an event. */
418 int (*notify_ha_event)(struct sas_ha_struct *, enum ha_event);
419 int (*notify_port_event)(struct asd_sas_phy *, enum port_event); 398 int (*notify_port_event)(struct asd_sas_phy *, enum port_event);
420 int (*notify_phy_event)(struct asd_sas_phy *, enum phy_event); 399 int (*notify_phy_event)(struct asd_sas_phy *, enum phy_event);
421 400