diff options
author | Hannes Reinecke <hare@suse.de> | 2014-06-25 09:27:36 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-07-17 16:07:37 -0400 |
commit | 9cb78c16f5dadefd8dc5ba0ae5a2f26cd59419b3 (patch) | |
tree | 576b86c3ec56dd7176285ec2d27f27ca55f77bc3 /drivers/scsi/qla2xxx/qla_os.c | |
parent | 755f516bbb983915d6cbfb5aa592cc0a5a99fd00 (diff) |
scsi: use 64-bit LUNs
The SCSI standard defines 64-bit values for LUNs, and large arrays
employing large or hierarchical LUN numbers become more and more
common.
So update the linux SCSI stack to use 64-bit LUN numbers.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Christoph Hellwig <hch@infradead.org>
Reviewed-by: Ewan Milne <emilne@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_os.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 5269aee1df3b..b22c75305b44 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -920,7 +920,8 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd) | |||
920 | scsi_qla_host_t *vha = shost_priv(cmd->device->host); | 920 | scsi_qla_host_t *vha = shost_priv(cmd->device->host); |
921 | srb_t *sp; | 921 | srb_t *sp; |
922 | int ret; | 922 | int ret; |
923 | unsigned int id, lun; | 923 | unsigned int id; |
924 | uint64_t lun; | ||
924 | unsigned long flags; | 925 | unsigned long flags; |
925 | int rval, wait = 0; | 926 | int rval, wait = 0; |
926 | struct qla_hw_data *ha = vha->hw; | 927 | struct qla_hw_data *ha = vha->hw; |
@@ -944,7 +945,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd) | |||
944 | } | 945 | } |
945 | 946 | ||
946 | ql_dbg(ql_dbg_taskm, vha, 0x8002, | 947 | ql_dbg(ql_dbg_taskm, vha, 0x8002, |
947 | "Aborting from RISC nexus=%ld:%d:%d sp=%p cmd=%p\n", | 948 | "Aborting from RISC nexus=%ld:%d:%llu sp=%p cmd=%p\n", |
948 | vha->host_no, id, lun, sp, cmd); | 949 | vha->host_no, id, lun, sp, cmd); |
949 | 950 | ||
950 | /* Get a reference to the sp and drop the lock.*/ | 951 | /* Get a reference to the sp and drop the lock.*/ |
@@ -995,7 +996,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd) | |||
995 | } | 996 | } |
996 | 997 | ||
997 | ql_log(ql_log_info, vha, 0x801c, | 998 | ql_log(ql_log_info, vha, 0x801c, |
998 | "Abort command issued nexus=%ld:%d:%d -- %d %x.\n", | 999 | "Abort command issued nexus=%ld:%d:%llu -- %d %x.\n", |
999 | vha->host_no, id, lun, wait, ret); | 1000 | vha->host_no, id, lun, wait, ret); |
1000 | 1001 | ||
1001 | return ret; | 1002 | return ret; |
@@ -1003,7 +1004,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd) | |||
1003 | 1004 | ||
1004 | int | 1005 | int |
1005 | qla2x00_eh_wait_for_pending_commands(scsi_qla_host_t *vha, unsigned int t, | 1006 | qla2x00_eh_wait_for_pending_commands(scsi_qla_host_t *vha, unsigned int t, |
1006 | unsigned int l, enum nexus_wait_type type) | 1007 | uint64_t l, enum nexus_wait_type type) |
1007 | { | 1008 | { |
1008 | int cnt, match, status; | 1009 | int cnt, match, status; |
1009 | unsigned long flags; | 1010 | unsigned long flags; |
@@ -1060,7 +1061,7 @@ static char *reset_errors[] = { | |||
1060 | 1061 | ||
1061 | static int | 1062 | static int |
1062 | __qla2xxx_eh_generic_reset(char *name, enum nexus_wait_type type, | 1063 | __qla2xxx_eh_generic_reset(char *name, enum nexus_wait_type type, |
1063 | struct scsi_cmnd *cmd, int (*do_reset)(struct fc_port *, unsigned int, int)) | 1064 | struct scsi_cmnd *cmd, int (*do_reset)(struct fc_port *, uint64_t, int)) |
1064 | { | 1065 | { |
1065 | scsi_qla_host_t *vha = shost_priv(cmd->device->host); | 1066 | scsi_qla_host_t *vha = shost_priv(cmd->device->host); |
1066 | fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; | 1067 | fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; |
@@ -1075,7 +1076,7 @@ __qla2xxx_eh_generic_reset(char *name, enum nexus_wait_type type, | |||
1075 | return err; | 1076 | return err; |
1076 | 1077 | ||
1077 | ql_log(ql_log_info, vha, 0x8009, | 1078 | ql_log(ql_log_info, vha, 0x8009, |
1078 | "%s RESET ISSUED nexus=%ld:%d:%d cmd=%p.\n", name, vha->host_no, | 1079 | "%s RESET ISSUED nexus=%ld:%d:%llu cmd=%p.\n", name, vha->host_no, |
1079 | cmd->device->id, cmd->device->lun, cmd); | 1080 | cmd->device->id, cmd->device->lun, cmd); |
1080 | 1081 | ||
1081 | err = 0; | 1082 | err = 0; |
@@ -1100,14 +1101,14 @@ __qla2xxx_eh_generic_reset(char *name, enum nexus_wait_type type, | |||
1100 | } | 1101 | } |
1101 | 1102 | ||
1102 | ql_log(ql_log_info, vha, 0x800e, | 1103 | ql_log(ql_log_info, vha, 0x800e, |
1103 | "%s RESET SUCCEEDED nexus:%ld:%d:%d cmd=%p.\n", name, | 1104 | "%s RESET SUCCEEDED nexus:%ld:%d:%llu cmd=%p.\n", name, |
1104 | vha->host_no, cmd->device->id, cmd->device->lun, cmd); | 1105 | vha->host_no, cmd->device->id, cmd->device->lun, cmd); |
1105 | 1106 | ||
1106 | return SUCCESS; | 1107 | return SUCCESS; |
1107 | 1108 | ||
1108 | eh_reset_failed: | 1109 | eh_reset_failed: |
1109 | ql_log(ql_log_info, vha, 0x800f, | 1110 | ql_log(ql_log_info, vha, 0x800f, |
1110 | "%s RESET FAILED: %s nexus=%ld:%d:%d cmd=%p.\n", name, | 1111 | "%s RESET FAILED: %s nexus=%ld:%d:%llu cmd=%p.\n", name, |
1111 | reset_errors[err], vha->host_no, cmd->device->id, cmd->device->lun, | 1112 | reset_errors[err], vha->host_no, cmd->device->id, cmd->device->lun, |
1112 | cmd); | 1113 | cmd); |
1113 | return FAILED; | 1114 | return FAILED; |
@@ -1154,7 +1155,8 @@ qla2xxx_eh_bus_reset(struct scsi_cmnd *cmd) | |||
1154 | scsi_qla_host_t *vha = shost_priv(cmd->device->host); | 1155 | scsi_qla_host_t *vha = shost_priv(cmd->device->host); |
1155 | fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; | 1156 | fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; |
1156 | int ret = FAILED; | 1157 | int ret = FAILED; |
1157 | unsigned int id, lun; | 1158 | unsigned int id; |
1159 | uint64_t lun; | ||
1158 | 1160 | ||
1159 | id = cmd->device->id; | 1161 | id = cmd->device->id; |
1160 | lun = cmd->device->lun; | 1162 | lun = cmd->device->lun; |
@@ -1169,7 +1171,7 @@ qla2xxx_eh_bus_reset(struct scsi_cmnd *cmd) | |||
1169 | ret = FAILED; | 1171 | ret = FAILED; |
1170 | 1172 | ||
1171 | ql_log(ql_log_info, vha, 0x8012, | 1173 | ql_log(ql_log_info, vha, 0x8012, |
1172 | "BUS RESET ISSUED nexus=%ld:%d:%d.\n", vha->host_no, id, lun); | 1174 | "BUS RESET ISSUED nexus=%ld:%d:%llu.\n", vha->host_no, id, lun); |
1173 | 1175 | ||
1174 | if (qla2x00_wait_for_hba_online(vha) != QLA_SUCCESS) { | 1176 | if (qla2x00_wait_for_hba_online(vha) != QLA_SUCCESS) { |
1175 | ql_log(ql_log_fatal, vha, 0x8013, | 1177 | ql_log(ql_log_fatal, vha, 0x8013, |
@@ -1193,7 +1195,7 @@ qla2xxx_eh_bus_reset(struct scsi_cmnd *cmd) | |||
1193 | 1195 | ||
1194 | eh_bus_reset_done: | 1196 | eh_bus_reset_done: |
1195 | ql_log(ql_log_warn, vha, 0x802b, | 1197 | ql_log(ql_log_warn, vha, 0x802b, |
1196 | "BUS RESET %s nexus=%ld:%d:%d.\n", | 1198 | "BUS RESET %s nexus=%ld:%d:%llu.\n", |
1197 | (ret == FAILED) ? "FAILED" : "SUCCEEDED", vha->host_no, id, lun); | 1199 | (ret == FAILED) ? "FAILED" : "SUCCEEDED", vha->host_no, id, lun); |
1198 | 1200 | ||
1199 | return ret; | 1201 | return ret; |
@@ -1220,14 +1222,15 @@ qla2xxx_eh_host_reset(struct scsi_cmnd *cmd) | |||
1220 | scsi_qla_host_t *vha = shost_priv(cmd->device->host); | 1222 | scsi_qla_host_t *vha = shost_priv(cmd->device->host); |
1221 | struct qla_hw_data *ha = vha->hw; | 1223 | struct qla_hw_data *ha = vha->hw; |
1222 | int ret = FAILED; | 1224 | int ret = FAILED; |
1223 | unsigned int id, lun; | 1225 | unsigned int id; |
1226 | uint64_t lun; | ||
1224 | scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); | 1227 | scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); |
1225 | 1228 | ||
1226 | id = cmd->device->id; | 1229 | id = cmd->device->id; |
1227 | lun = cmd->device->lun; | 1230 | lun = cmd->device->lun; |
1228 | 1231 | ||
1229 | ql_log(ql_log_info, vha, 0x8018, | 1232 | ql_log(ql_log_info, vha, 0x8018, |
1230 | "ADAPTER RESET ISSUED nexus=%ld:%d:%d.\n", vha->host_no, id, lun); | 1233 | "ADAPTER RESET ISSUED nexus=%ld:%d:%llu.\n", vha->host_no, id, lun); |
1231 | 1234 | ||
1232 | /* | 1235 | /* |
1233 | * No point in issuing another reset if one is active. Also do not | 1236 | * No point in issuing another reset if one is active. Also do not |
@@ -1273,7 +1276,7 @@ qla2xxx_eh_host_reset(struct scsi_cmnd *cmd) | |||
1273 | 1276 | ||
1274 | eh_host_reset_lock: | 1277 | eh_host_reset_lock: |
1275 | ql_log(ql_log_info, vha, 0x8017, | 1278 | ql_log(ql_log_info, vha, 0x8017, |
1276 | "ADAPTER RESET %s nexus=%ld:%d:%d.\n", | 1279 | "ADAPTER RESET %s nexus=%ld:%d:%llu.\n", |
1277 | (ret == FAILED) ? "FAILED" : "SUCCEEDED", vha->host_no, id, lun); | 1280 | (ret == FAILED) ? "FAILED" : "SUCCEEDED", vha->host_no, id, lun); |
1278 | 1281 | ||
1279 | return ret; | 1282 | return ret; |
@@ -1409,7 +1412,7 @@ static void qla2x00_handle_queue_full(struct scsi_device *sdev, int qdepth) | |||
1409 | return; | 1412 | return; |
1410 | 1413 | ||
1411 | ql_dbg(ql_dbg_io, fcport->vha, 0x3029, | 1414 | ql_dbg(ql_dbg_io, fcport->vha, 0x3029, |
1412 | "Queue depth adjusted-down to %d for nexus=%ld:%d:%d.\n", | 1415 | "Queue depth adjusted-down to %d for nexus=%ld:%d:%llu.\n", |
1413 | sdev->queue_depth, fcport->vha->host_no, sdev->id, sdev->lun); | 1416 | sdev->queue_depth, fcport->vha->host_no, sdev->id, sdev->lun); |
1414 | } | 1417 | } |
1415 | 1418 | ||
@@ -1432,7 +1435,7 @@ static void qla2x00_adjust_sdev_qdepth_up(struct scsi_device *sdev, int qdepth) | |||
1432 | scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, qdepth); | 1435 | scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, qdepth); |
1433 | 1436 | ||
1434 | ql_dbg(ql_dbg_io, vha, 0x302a, | 1437 | ql_dbg(ql_dbg_io, vha, 0x302a, |
1435 | "Queue depth adjusted-up to %d for nexus=%ld:%d:%d.\n", | 1438 | "Queue depth adjusted-up to %d for nexus=%ld:%d:%llu.\n", |
1436 | sdev->queue_depth, fcport->vha->host_no, sdev->id, sdev->lun); | 1439 | sdev->queue_depth, fcport->vha->host_no, sdev->id, sdev->lun); |
1437 | } | 1440 | } |
1438 | 1441 | ||