aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/libsas.h
diff options
context:
space:
mode:
authorJohn Garry <john.garry@huawei.com>2019-01-04 11:01:26 -0500
committerMartin K. Petersen <martin.petersen@oracle.com>2019-01-11 22:14:24 -0500
commitff525b6e2d3011d5a1ef08d8b3f4f745c7245412 (patch)
tree2aec4f068933ff1489f298d96e1ac6a1c82f03b0 /include/scsi/libsas.h
parent50b812755e9766fa0a1a28533f4d11a34a5b813e (diff)
scsi: libsas: Fix some indentation in libsas.h
Currently much indentation in this file is done with whitespaces instead of tabs, which can make reading difficult, so fix this up. Some other little minor tidy-up is done, but this file still has many other checkpatch warnings (generally linelength > 80 or function arguments have no identifier names). All libsas code can be audited for checkpatch issues later. Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/scsi/libsas.h')
-rw-r--r--include/scsi/libsas.h56
1 files changed, 27 insertions, 29 deletions
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index 3de3b10da19a..857086cf7ebf 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -52,8 +52,8 @@ enum sas_phy_role {
52}; 52};
53 53
54enum sas_phy_type { 54enum sas_phy_type {
55 PHY_TYPE_PHYSICAL, 55 PHY_TYPE_PHYSICAL,
56 PHY_TYPE_VIRTUAL 56 PHY_TYPE_VIRTUAL
57}; 57};
58 58
59/* The events are mnemonically described in sas_dump.c 59/* The events are mnemonically described in sas_dump.c
@@ -91,7 +91,7 @@ enum discover_event {
91 91
92#define to_dom_device(_obj) container_of(_obj, struct domain_device, dev_obj) 92#define to_dom_device(_obj) container_of(_obj, struct domain_device, dev_obj)
93#define to_dev_attr(_attr) container_of(_attr, struct domain_dev_attribute,\ 93#define to_dev_attr(_attr) container_of(_attr, struct domain_dev_attribute,\
94 attr) 94 attr)
95 95
96enum routing_attribute { 96enum routing_attribute {
97 DIRECT_ROUTING, 97 DIRECT_ROUTING,
@@ -184,37 +184,37 @@ struct domain_device {
184 spinlock_t done_lock; 184 spinlock_t done_lock;
185 enum sas_device_type dev_type; 185 enum sas_device_type dev_type;
186 186
187 enum sas_linkrate linkrate; 187 enum sas_linkrate linkrate;
188 enum sas_linkrate min_linkrate; 188 enum sas_linkrate min_linkrate;
189 enum sas_linkrate max_linkrate; 189 enum sas_linkrate max_linkrate;
190 190
191 int pathways; 191 int pathways;
192 192
193 struct domain_device *parent; 193 struct domain_device *parent;
194 struct list_head siblings; /* devices on the same level */ 194 struct list_head siblings; /* devices on the same level */
195 struct asd_sas_port *port; /* shortcut to root of the tree */ 195 struct asd_sas_port *port; /* shortcut to root of the tree */
196 struct sas_phy *phy; 196 struct sas_phy *phy;
197 197
198 struct list_head dev_list_node; 198 struct list_head dev_list_node;
199 struct list_head disco_list_node; /* awaiting probe or destruct */ 199 struct list_head disco_list_node; /* awaiting probe or destruct */
200 200
201 enum sas_protocol iproto; 201 enum sas_protocol iproto;
202 enum sas_protocol tproto; 202 enum sas_protocol tproto;
203 203
204 struct sas_rphy *rphy; 204 struct sas_rphy *rphy;
205 205
206 u8 sas_addr[SAS_ADDR_SIZE]; 206 u8 sas_addr[SAS_ADDR_SIZE];
207 u8 hashed_sas_addr[HASHED_SAS_ADDR_SIZE]; 207 u8 hashed_sas_addr[HASHED_SAS_ADDR_SIZE];
208 208
209 u8 frame_rcvd[32]; 209 u8 frame_rcvd[32];
210 210
211 union { 211 union {
212 struct expander_device ex_dev; 212 struct expander_device ex_dev;
213 struct sata_device sata_dev; /* STP & directly attached */ 213 struct sata_device sata_dev; /* STP & directly attached */
214 struct ssp_device ssp_dev; 214 struct ssp_device ssp_dev;
215 }; 215 };
216 216
217 void *lldd_dev; 217 void *lldd_dev;
218 unsigned long state; 218 unsigned long state;
219 struct kref kref; 219 struct kref kref;
220}; 220};
@@ -512,10 +512,10 @@ enum exec_status {
512 512
513/* When a task finishes with a response, the LLDD examines the 513/* When a task finishes with a response, the LLDD examines the
514 * response: 514 * response:
515 * - For an ATA task task_status_struct::stat is set to 515 * - For an ATA task task_status_struct::stat is set to
516 * SAS_PROTO_RESPONSE, and the task_status_struct::buf is set to the 516 * SAS_PROTO_RESPONSE, and the task_status_struct::buf is set to the
517 * contents of struct ata_task_resp. 517 * contents of struct ata_task_resp.
518 * - For SSP tasks, if no data is present or status/TMF response 518 * - For SSP tasks, if no data is present or status/TMF response
519 * is valid, task_status_struct::stat is set. If data is present 519 * is valid, task_status_struct::stat is set. If data is present
520 * (SENSE data), the LLDD copies up to SAS_STATUS_BUF_SIZE, sets 520 * (SENSE data), the LLDD copies up to SAS_STATUS_BUF_SIZE, sets
521 * task_status_struct::buf_valid_size, and task_status_struct::stat is 521 * task_status_struct::buf_valid_size, and task_status_struct::stat is
@@ -671,15 +671,13 @@ extern void sas_prep_resume_ha(struct sas_ha_struct *sas_ha);
671extern void sas_resume_ha(struct sas_ha_struct *sas_ha); 671extern void sas_resume_ha(struct sas_ha_struct *sas_ha);
672extern void sas_suspend_ha(struct sas_ha_struct *sas_ha); 672extern void sas_suspend_ha(struct sas_ha_struct *sas_ha);
673 673
674int sas_set_phy_speed(struct sas_phy *phy, 674int sas_set_phy_speed(struct sas_phy *phy, struct sas_phy_linkrates *rates);
675 struct sas_phy_linkrates *rates);
676int sas_phy_reset(struct sas_phy *phy, int hard_reset); 675int sas_phy_reset(struct sas_phy *phy, int hard_reset);
677extern int sas_queuecommand(struct Scsi_Host * ,struct scsi_cmnd *); 676extern int sas_queuecommand(struct Scsi_Host *, struct scsi_cmnd *);
678extern int sas_target_alloc(struct scsi_target *); 677extern int sas_target_alloc(struct scsi_target *);
679extern int sas_slave_configure(struct scsi_device *); 678extern int sas_slave_configure(struct scsi_device *);
680extern int sas_change_queue_depth(struct scsi_device *, int new_depth); 679extern int sas_change_queue_depth(struct scsi_device *, int new_depth);
681extern int sas_bios_param(struct scsi_device *, 680extern int sas_bios_param(struct scsi_device *, struct block_device *,
682 struct block_device *,
683 sector_t capacity, int *hsc); 681 sector_t capacity, int *hsc);
684extern struct scsi_transport_template * 682extern struct scsi_transport_template *
685sas_domain_attach_transport(struct sas_domain_function_template *); 683sas_domain_attach_transport(struct sas_domain_function_template *);