summaryrefslogtreecommitdiff
path: root/drivers/scsi/hisi_sas/hisi_sas.h
diff options
context:
space:
mode:
authorJohn Garry <john.garry@huawei.com>2017-06-14 23:33:12 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2017-06-19 21:31:25 -0400
commitad6048325c7807818c6c49e485660143d97a622e (patch)
tree66d6f2769e8ff58fde2b98af67fd12d06df5ca8b /drivers/scsi/hisi_sas/hisi_sas.h
parentf64a6988268aae866bb6ce6edb910d454ccef331 (diff)
downloadlwn-ad6048325c7807818c6c49e485660143d97a622e.tar.gz
lwn-ad6048325c7807818c6c49e485660143d97a622e.zip
scsi: hisi_sas: define hisi_sas_device.device_id as int
Currently hisi_sas_device.device_id is a u64. This can create a problem in selecting the queue for a device, in that this code does a 64b division on device id. For some 32b systems, 64b division is slow and the lib reference must be explicitly included. The device id does not need to be 64b in size, so, as a solution, just make as an int. Also, struct hisi_sas_device elements are re-ordered to improve packing efficiency. Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/hisi_sas/hisi_sas.h')
-rw-r--r--drivers/scsi/hisi_sas/hisi_sas.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h
index 4e28f32e90b0..b4e96fa90bc2 100644
--- a/drivers/scsi/hisi_sas/hisi_sas.h
+++ b/drivers/scsi/hisi_sas/hisi_sas.h
@@ -107,15 +107,15 @@ struct hisi_sas_dq {
};
struct hisi_sas_device {
- enum sas_device_type dev_type;
struct hisi_hba *hisi_hba;
struct domain_device *sas_device;
+ struct list_head list;
u64 attached_phy;
- u64 device_id;
atomic64_t running_req;
- struct list_head list;
- u8 dev_status;
+ enum sas_device_type dev_type;
+ int device_id;
int sata_idx;
+ u8 dev_status;
};
struct hisi_sas_slot {