aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/libsas.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-11-14 19:23:44 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-11-14 19:23:44 -0500
commit670ffccb2f9183eb6cb32fe92257aea52b3f8a7d (patch)
tree54962412913a69e17cc680c57f3e26f7305d99d2 /include/scsi/libsas.h
parent47f521ba18190e4bfbb65ead3977af5756884427 (diff)
parent341b2aa83368e6f23bf0cc3d04604896337ad7cb (diff)
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI updates from James Bottomley: "This is mostly updates of the usual suspects: lpfc, qla2xxx, hisi_sas, megaraid_sas, pm80xx, mpt3sas, be2iscsi, hpsa. and a host of minor updates. There's no major behaviour change or additions to the core in all of this, so the potential for regressions should be small (biggest potential being in the scsi error handler changes)" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (203 commits) scsi: lpfc: Fix hard lock up NMI in els timeout handling. scsi: mpt3sas: remove a stray KERN_INFO scsi: mpt3sas: cleanup _scsih_pcie_enumeration_event() scsi: aacraid: use timespec64 instead of timeval scsi: scsi_transport_fc: add 64GBIT and 128GBIT port speed definitions scsi: qla2xxx: Suppress a kernel complaint in qla_init_base_qpair() scsi: mpt3sas: fix dma_addr_t casts scsi: be2iscsi: Use kasprintf scsi: storvsc: Avoid excessive host scan on controller change scsi: lpfc: fix kzalloc-simple.cocci warnings scsi: mpt3sas: Update mpt3sas driver version. scsi: mpt3sas: Fix sparse warnings scsi: mpt3sas: Fix nvme drives checking for tlr. scsi: mpt3sas: NVMe drive support for BTDHMAPPING ioctl command and log info scsi: mpt3sas: Add-Task-management-debug-info-for-NVMe-drives. scsi: mpt3sas: scan and add nvme device after controller reset scsi: mpt3sas: Set NVMe device queue depth as 128 scsi: mpt3sas: Handle NVMe PCIe device related events generated from firmware. scsi: mpt3sas: API's to remove nvme drive from sml scsi: mpt3sas: API 's to support NVMe drive addition to SML ...
Diffstat (limited to 'include/scsi/libsas.h')
-rw-r--r--include/scsi/libsas.h56
1 files changed, 16 insertions, 40 deletions
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index 388aaf72b480..0f9cbf96c093 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -60,38 +60,32 @@ 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,
71 PORTE_LINK_RESET_ERR = 2, 66 PORTE_LINK_RESET_ERR,
72 PORTE_TIMER_EVENT = 3, 67 PORTE_TIMER_EVENT,
73 PORTE_HARD_RESET = 4, 68 PORTE_HARD_RESET,
74 PORT_NUM_EVENTS = 5, 69 PORT_NUM_EVENTS,
75}; 70};
76 71
77enum phy_event { 72enum phy_event {
78 PHYE_LOSS_OF_SIGNAL = 0U, 73 PHYE_LOSS_OF_SIGNAL = 0U,
79 PHYE_OOB_DONE = 1, 74 PHYE_OOB_DONE,
80 PHYE_OOB_ERROR = 2, 75 PHYE_OOB_ERROR,
81 PHYE_SPINUP_HOLD = 3, /* hot plug SATA, no COMWAKE sent */ 76 PHYE_SPINUP_HOLD, /* hot plug SATA, no COMWAKE sent */
82 PHYE_RESUME_TIMEOUT = 4, 77 PHYE_RESUME_TIMEOUT,
83 PHY_NUM_EVENTS = 5, 78 PHY_NUM_EVENTS,
84}; 79};
85 80
86enum discover_event { 81enum discover_event {
87 DISCE_DISCOVER_DOMAIN = 0U, 82 DISCE_DISCOVER_DOMAIN = 0U,
88 DISCE_REVALIDATE_DOMAIN = 1, 83 DISCE_REVALIDATE_DOMAIN,
89 DISCE_PORT_GONE = 2, 84 DISCE_PROBE,
90 DISCE_PROBE = 3, 85 DISCE_SUSPEND,
91 DISCE_SUSPEND = 4, 86 DISCE_RESUME,
92 DISCE_RESUME = 5, 87 DISCE_DESTRUCT,
93 DISCE_DESTRUCT = 6, 88 DISC_NUM_EVENTS,
94 DISC_NUM_EVENTS = 7,
95}; 89};
96 90
97/* ---------- Expander Devices ---------- */ 91/* ---------- Expander Devices ---------- */
@@ -261,8 +255,6 @@ struct sas_discovery {
261/* The port struct is Class:RW, driver:RO */ 255/* The port struct is Class:RW, driver:RO */
262struct asd_sas_port { 256struct asd_sas_port {
263/* private: */ 257/* private: */
264 struct completion port_gone_completion;
265
266 struct sas_discovery disc; 258 struct sas_discovery disc;
267 struct domain_device *port_dev; 259 struct domain_device *port_dev;
268 spinlock_t dev_list_lock; 260 spinlock_t dev_list_lock;
@@ -362,18 +354,6 @@ struct scsi_core {
362 354
363}; 355};
364 356
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 { 357enum sas_ha_state {
378 SAS_HA_REGISTERED, 358 SAS_HA_REGISTERED,
379 SAS_HA_DRAINING, 359 SAS_HA_DRAINING,
@@ -383,9 +363,6 @@ enum sas_ha_state {
383 363
384struct sas_ha_struct { 364struct sas_ha_struct {
385/* private: */ 365/* 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 */ 366 struct list_head defer_q; /* work queued while draining */
390 struct mutex drain_mutex; 367 struct mutex drain_mutex;
391 unsigned long state; 368 unsigned long state;
@@ -415,7 +392,6 @@ struct sas_ha_struct {
415 * their siblings when forming wide ports */ 392 * their siblings when forming wide ports */
416 393
417 /* LLDD calls these to notify the class of an event. */ 394 /* 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); 395 int (*notify_port_event)(struct asd_sas_phy *, enum port_event);
420 int (*notify_phy_event)(struct asd_sas_phy *, enum phy_event); 396 int (*notify_phy_event)(struct asd_sas_phy *, enum phy_event);
421 397