diff options
author | John Garry <john.garry@huawei.com> | 2018-11-15 05:20:31 -0500 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-11-15 14:37:06 -0500 |
commit | 15ba7806c316ce88d45db7d12d32380f53c01a06 (patch) | |
tree | 37af10a8d6ee1aad4267f1161726306c27a2d89d /drivers/scsi/libsas/sas_expander.c | |
parent | 71a4a9923122091be1167bac9379d5d1cfdb1153 (diff) |
scsi: libsas: Drop SAS_DPRINTK() and revise logs levels
Like sas_printk() did previously, SAS_DPRINTK() offers little value now
that libsas logs already have the "sas" prefix through pr_fmt(fmt). So it
can be dropped.
However, after reviewing some logs in libsas, it is noticed that debug
level is too low in many instances.
So this change drops SAS_DPRINTK() and revises some logs to a more
appropriate level. However many stay at debug level, although some
are significantly promoted.
We add -DDEBUG for compilation so that we keep the debug messages by
default, as before.
All the pre-existing checkpatch errors for spanning messages across
multiple lines are also fixed.
Finally, all other references to printk() [apart from special formatting
in sas_ata.c] are removed and replaced with appropriate pr_xxx().
Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/libsas/sas_expander.c')
-rw-r--r-- | drivers/scsi/libsas/sas_expander.c | 214 |
1 files changed, 100 insertions, 114 deletions
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c index 579304ded008..17eb4185f29d 100644 --- a/drivers/scsi/libsas/sas_expander.c +++ b/drivers/scsi/libsas/sas_expander.c | |||
@@ -99,17 +99,17 @@ static int smp_execute_task_sg(struct domain_device *dev, | |||
99 | 99 | ||
100 | if (res) { | 100 | if (res) { |
101 | del_timer(&task->slow_task->timer); | 101 | del_timer(&task->slow_task->timer); |
102 | SAS_DPRINTK("executing SMP task failed:%d\n", res); | 102 | pr_notice("executing SMP task failed:%d\n", res); |
103 | break; | 103 | break; |
104 | } | 104 | } |
105 | 105 | ||
106 | wait_for_completion(&task->slow_task->completion); | 106 | wait_for_completion(&task->slow_task->completion); |
107 | res = -ECOMM; | 107 | res = -ECOMM; |
108 | if ((task->task_state_flags & SAS_TASK_STATE_ABORTED)) { | 108 | if ((task->task_state_flags & SAS_TASK_STATE_ABORTED)) { |
109 | SAS_DPRINTK("smp task timed out or aborted\n"); | 109 | pr_notice("smp task timed out or aborted\n"); |
110 | i->dft->lldd_abort_task(task); | 110 | i->dft->lldd_abort_task(task); |
111 | if (!(task->task_state_flags & SAS_TASK_STATE_DONE)) { | 111 | if (!(task->task_state_flags & SAS_TASK_STATE_DONE)) { |
112 | SAS_DPRINTK("SMP task aborted and not done\n"); | 112 | pr_notice("SMP task aborted and not done\n"); |
113 | break; | 113 | break; |
114 | } | 114 | } |
115 | } | 115 | } |
@@ -134,11 +134,11 @@ static int smp_execute_task_sg(struct domain_device *dev, | |||
134 | task->task_status.stat == SAS_DEVICE_UNKNOWN) | 134 | task->task_status.stat == SAS_DEVICE_UNKNOWN) |
135 | break; | 135 | break; |
136 | else { | 136 | else { |
137 | SAS_DPRINTK("%s: task to dev %016llx response: 0x%x " | 137 | pr_notice("%s: task to dev %016llx response: 0x%x status 0x%x\n", |
138 | "status 0x%x\n", __func__, | 138 | __func__, |
139 | SAS_ADDR(dev->sas_addr), | 139 | SAS_ADDR(dev->sas_addr), |
140 | task->task_status.resp, | 140 | task->task_status.resp, |
141 | task->task_status.stat); | 141 | task->task_status.stat); |
142 | sas_free_task(task); | 142 | sas_free_task(task); |
143 | task = NULL; | 143 | task = NULL; |
144 | } | 144 | } |
@@ -347,11 +347,11 @@ static void sas_set_ex_phy(struct domain_device *dev, int phy_id, void *rsp) | |||
347 | if (test_bit(SAS_HA_ATA_EH_ACTIVE, &ha->state)) | 347 | if (test_bit(SAS_HA_ATA_EH_ACTIVE, &ha->state)) |
348 | set_bit(DISCE_REVALIDATE_DOMAIN, &dev->port->disc.pending); | 348 | set_bit(DISCE_REVALIDATE_DOMAIN, &dev->port->disc.pending); |
349 | 349 | ||
350 | SAS_DPRINTK("%sex %016llx phy%02d:%c:%X attached: %016llx (%s)\n", | 350 | pr_debug("%sex %016llx phy%02d:%c:%X attached: %016llx (%s)\n", |
351 | test_bit(SAS_HA_ATA_EH_ACTIVE, &ha->state) ? "ata: " : "", | 351 | test_bit(SAS_HA_ATA_EH_ACTIVE, &ha->state) ? "ata: " : "", |
352 | SAS_ADDR(dev->sas_addr), phy->phy_id, | 352 | SAS_ADDR(dev->sas_addr), phy->phy_id, |
353 | sas_route_char(dev, phy), phy->linkrate, | 353 | sas_route_char(dev, phy), phy->linkrate, |
354 | SAS_ADDR(phy->attached_sas_addr), type); | 354 | SAS_ADDR(phy->attached_sas_addr), type); |
355 | } | 355 | } |
356 | 356 | ||
357 | /* check if we have an existing attached ata device on this expander phy */ | 357 | /* check if we have an existing attached ata device on this expander phy */ |
@@ -500,12 +500,12 @@ static int sas_ex_general(struct domain_device *dev) | |||
500 | RG_RESP_SIZE); | 500 | RG_RESP_SIZE); |
501 | 501 | ||
502 | if (res) { | 502 | if (res) { |
503 | SAS_DPRINTK("RG to ex %016llx failed:0x%x\n", | 503 | pr_notice("RG to ex %016llx failed:0x%x\n", |
504 | SAS_ADDR(dev->sas_addr), res); | 504 | SAS_ADDR(dev->sas_addr), res); |
505 | goto out; | 505 | goto out; |
506 | } else if (rg_resp->result != SMP_RESP_FUNC_ACC) { | 506 | } else if (rg_resp->result != SMP_RESP_FUNC_ACC) { |
507 | SAS_DPRINTK("RG:ex %016llx returned SMP result:0x%x\n", | 507 | pr_debug("RG:ex %016llx returned SMP result:0x%x\n", |
508 | SAS_ADDR(dev->sas_addr), rg_resp->result); | 508 | SAS_ADDR(dev->sas_addr), rg_resp->result); |
509 | res = rg_resp->result; | 509 | res = rg_resp->result; |
510 | goto out; | 510 | goto out; |
511 | } | 511 | } |
@@ -513,8 +513,8 @@ static int sas_ex_general(struct domain_device *dev) | |||
513 | ex_assign_report_general(dev, rg_resp); | 513 | ex_assign_report_general(dev, rg_resp); |
514 | 514 | ||
515 | if (dev->ex_dev.configuring) { | 515 | if (dev->ex_dev.configuring) { |
516 | SAS_DPRINTK("RG: ex %llx self-configuring...\n", | 516 | pr_debug("RG: ex %llx self-configuring...\n", |
517 | SAS_ADDR(dev->sas_addr)); | 517 | SAS_ADDR(dev->sas_addr)); |
518 | schedule_timeout_interruptible(5*HZ); | 518 | schedule_timeout_interruptible(5*HZ); |
519 | } else | 519 | } else |
520 | break; | 520 | break; |
@@ -568,12 +568,12 @@ static int sas_ex_manuf_info(struct domain_device *dev) | |||
568 | 568 | ||
569 | res = smp_execute_task(dev, mi_req, MI_REQ_SIZE, mi_resp,MI_RESP_SIZE); | 569 | res = smp_execute_task(dev, mi_req, MI_REQ_SIZE, mi_resp,MI_RESP_SIZE); |
570 | if (res) { | 570 | if (res) { |
571 | SAS_DPRINTK("MI: ex %016llx failed:0x%x\n", | 571 | pr_notice("MI: ex %016llx failed:0x%x\n", |
572 | SAS_ADDR(dev->sas_addr), res); | 572 | SAS_ADDR(dev->sas_addr), res); |
573 | goto out; | 573 | goto out; |
574 | } else if (mi_resp[2] != SMP_RESP_FUNC_ACC) { | 574 | } else if (mi_resp[2] != SMP_RESP_FUNC_ACC) { |
575 | SAS_DPRINTK("MI ex %016llx returned SMP result:0x%x\n", | 575 | pr_debug("MI ex %016llx returned SMP result:0x%x\n", |
576 | SAS_ADDR(dev->sas_addr), mi_resp[2]); | 576 | SAS_ADDR(dev->sas_addr), mi_resp[2]); |
577 | goto out; | 577 | goto out; |
578 | } | 578 | } |
579 | 579 | ||
@@ -836,10 +836,9 @@ static struct domain_device *sas_ex_discover_end_dev( | |||
836 | 836 | ||
837 | res = sas_discover_sata(child); | 837 | res = sas_discover_sata(child); |
838 | if (res) { | 838 | if (res) { |
839 | SAS_DPRINTK("sas_discover_sata() for device %16llx at " | 839 | pr_notice("sas_discover_sata() for device %16llx at %016llx:0x%x returned 0x%x\n", |
840 | "%016llx:0x%x returned 0x%x\n", | 840 | SAS_ADDR(child->sas_addr), |
841 | SAS_ADDR(child->sas_addr), | 841 | SAS_ADDR(parent->sas_addr), phy_id, res); |
842 | SAS_ADDR(parent->sas_addr), phy_id, res); | ||
843 | goto out_list_del; | 842 | goto out_list_del; |
844 | } | 843 | } |
845 | } else | 844 | } else |
@@ -861,16 +860,15 @@ static struct domain_device *sas_ex_discover_end_dev( | |||
861 | 860 | ||
862 | res = sas_discover_end_dev(child); | 861 | res = sas_discover_end_dev(child); |
863 | if (res) { | 862 | if (res) { |
864 | SAS_DPRINTK("sas_discover_end_dev() for device %16llx " | 863 | pr_notice("sas_discover_end_dev() for device %16llx at %016llx:0x%x returned 0x%x\n", |
865 | "at %016llx:0x%x returned 0x%x\n", | 864 | SAS_ADDR(child->sas_addr), |
866 | SAS_ADDR(child->sas_addr), | 865 | SAS_ADDR(parent->sas_addr), phy_id, res); |
867 | SAS_ADDR(parent->sas_addr), phy_id, res); | ||
868 | goto out_list_del; | 866 | goto out_list_del; |
869 | } | 867 | } |
870 | } else { | 868 | } else { |
871 | SAS_DPRINTK("target proto 0x%x at %016llx:0x%x not handled\n", | 869 | pr_notice("target proto 0x%x at %016llx:0x%x not handled\n", |
872 | phy->attached_tproto, SAS_ADDR(parent->sas_addr), | 870 | phy->attached_tproto, SAS_ADDR(parent->sas_addr), |
873 | phy_id); | 871 | phy_id); |
874 | goto out_free; | 872 | goto out_free; |
875 | } | 873 | } |
876 | 874 | ||
@@ -927,11 +925,10 @@ static struct domain_device *sas_ex_discover_expander( | |||
927 | int res; | 925 | int res; |
928 | 926 | ||
929 | if (phy->routing_attr == DIRECT_ROUTING) { | 927 | if (phy->routing_attr == DIRECT_ROUTING) { |
930 | SAS_DPRINTK("ex %016llx:0x%x:D <--> ex %016llx:0x%x is not " | 928 | pr_warn("ex %016llx:0x%x:D <--> ex %016llx:0x%x is not allowed\n", |
931 | "allowed\n", | 929 | SAS_ADDR(parent->sas_addr), phy_id, |
932 | SAS_ADDR(parent->sas_addr), phy_id, | 930 | SAS_ADDR(phy->attached_sas_addr), |
933 | SAS_ADDR(phy->attached_sas_addr), | 931 | phy->attached_phy_id); |
934 | phy->attached_phy_id); | ||
935 | return NULL; | 932 | return NULL; |
936 | } | 933 | } |
937 | child = sas_alloc_device(); | 934 | child = sas_alloc_device(); |
@@ -1038,25 +1035,24 @@ static int sas_ex_discover_dev(struct domain_device *dev, int phy_id) | |||
1038 | ex_phy->attached_dev_type != SAS_FANOUT_EXPANDER_DEVICE && | 1035 | ex_phy->attached_dev_type != SAS_FANOUT_EXPANDER_DEVICE && |
1039 | ex_phy->attached_dev_type != SAS_EDGE_EXPANDER_DEVICE && | 1036 | ex_phy->attached_dev_type != SAS_EDGE_EXPANDER_DEVICE && |
1040 | ex_phy->attached_dev_type != SAS_SATA_PENDING) { | 1037 | ex_phy->attached_dev_type != SAS_SATA_PENDING) { |
1041 | SAS_DPRINTK("unknown device type(0x%x) attached to ex %016llx " | 1038 | pr_warn("unknown device type(0x%x) attached to ex %016llx phy 0x%x\n", |
1042 | "phy 0x%x\n", ex_phy->attached_dev_type, | 1039 | ex_phy->attached_dev_type, |
1043 | SAS_ADDR(dev->sas_addr), | 1040 | SAS_ADDR(dev->sas_addr), |
1044 | phy_id); | 1041 | phy_id); |
1045 | return 0; | 1042 | return 0; |
1046 | } | 1043 | } |
1047 | 1044 | ||
1048 | res = sas_configure_routing(dev, ex_phy->attached_sas_addr); | 1045 | res = sas_configure_routing(dev, ex_phy->attached_sas_addr); |
1049 | if (res) { | 1046 | if (res) { |
1050 | SAS_DPRINTK("configure routing for dev %016llx " | 1047 | pr_notice("configure routing for dev %016llx reported 0x%x. Forgotten\n", |
1051 | "reported 0x%x. Forgotten\n", | 1048 | SAS_ADDR(ex_phy->attached_sas_addr), res); |
1052 | SAS_ADDR(ex_phy->attached_sas_addr), res); | ||
1053 | sas_disable_routing(dev, ex_phy->attached_sas_addr); | 1049 | sas_disable_routing(dev, ex_phy->attached_sas_addr); |
1054 | return res; | 1050 | return res; |
1055 | } | 1051 | } |
1056 | 1052 | ||
1057 | if (sas_ex_join_wide_port(dev, phy_id)) { | 1053 | if (sas_ex_join_wide_port(dev, phy_id)) { |
1058 | SAS_DPRINTK("Attaching ex phy%d to wide port %016llx\n", | 1054 | pr_debug("Attaching ex phy%d to wide port %016llx\n", |
1059 | phy_id, SAS_ADDR(ex_phy->attached_sas_addr)); | 1055 | phy_id, SAS_ADDR(ex_phy->attached_sas_addr)); |
1060 | return res; | 1056 | return res; |
1061 | } | 1057 | } |
1062 | 1058 | ||
@@ -1067,12 +1063,11 @@ static int sas_ex_discover_dev(struct domain_device *dev, int phy_id) | |||
1067 | break; | 1063 | break; |
1068 | case SAS_FANOUT_EXPANDER_DEVICE: | 1064 | case SAS_FANOUT_EXPANDER_DEVICE: |
1069 | if (SAS_ADDR(dev->port->disc.fanout_sas_addr)) { | 1065 | if (SAS_ADDR(dev->port->disc.fanout_sas_addr)) { |
1070 | SAS_DPRINTK("second fanout expander %016llx phy 0x%x " | 1066 | pr_debug("second fanout expander %016llx phy 0x%x attached to ex %016llx phy 0x%x\n", |
1071 | "attached to ex %016llx phy 0x%x\n", | 1067 | SAS_ADDR(ex_phy->attached_sas_addr), |
1072 | SAS_ADDR(ex_phy->attached_sas_addr), | 1068 | ex_phy->attached_phy_id, |
1073 | ex_phy->attached_phy_id, | 1069 | SAS_ADDR(dev->sas_addr), |
1074 | SAS_ADDR(dev->sas_addr), | 1070 | phy_id); |
1075 | phy_id); | ||
1076 | sas_ex_disable_phy(dev, phy_id); | 1071 | sas_ex_disable_phy(dev, phy_id); |
1077 | break; | 1072 | break; |
1078 | } else | 1073 | } else |
@@ -1101,9 +1096,8 @@ static int sas_ex_discover_dev(struct domain_device *dev, int phy_id) | |||
1101 | SAS_ADDR(child->sas_addr)) { | 1096 | SAS_ADDR(child->sas_addr)) { |
1102 | ex->ex_phy[i].phy_state= PHY_DEVICE_DISCOVERED; | 1097 | ex->ex_phy[i].phy_state= PHY_DEVICE_DISCOVERED; |
1103 | if (sas_ex_join_wide_port(dev, i)) | 1098 | if (sas_ex_join_wide_port(dev, i)) |
1104 | SAS_DPRINTK("Attaching ex phy%d to wide port %016llx\n", | 1099 | pr_debug("Attaching ex phy%d to wide port %016llx\n", |
1105 | i, SAS_ADDR(ex->ex_phy[i].attached_sas_addr)); | 1100 | i, SAS_ADDR(ex->ex_phy[i].attached_sas_addr)); |
1106 | |||
1107 | } | 1101 | } |
1108 | } | 1102 | } |
1109 | } | 1103 | } |
@@ -1154,13 +1148,11 @@ static int sas_check_level_subtractive_boundary(struct domain_device *dev) | |||
1154 | if (sas_find_sub_addr(child, s2) && | 1148 | if (sas_find_sub_addr(child, s2) && |
1155 | (SAS_ADDR(sub_addr) != SAS_ADDR(s2))) { | 1149 | (SAS_ADDR(sub_addr) != SAS_ADDR(s2))) { |
1156 | 1150 | ||
1157 | SAS_DPRINTK("ex %016llx->%016llx-?->%016llx " | 1151 | pr_notice("ex %016llx->%016llx-?->%016llx diverges from subtractive boundary %016llx\n", |
1158 | "diverges from subtractive " | 1152 | SAS_ADDR(dev->sas_addr), |
1159 | "boundary %016llx\n", | 1153 | SAS_ADDR(child->sas_addr), |
1160 | SAS_ADDR(dev->sas_addr), | 1154 | SAS_ADDR(s2), |
1161 | SAS_ADDR(child->sas_addr), | 1155 | SAS_ADDR(sub_addr)); |
1162 | SAS_ADDR(s2), | ||
1163 | SAS_ADDR(sub_addr)); | ||
1164 | 1156 | ||
1165 | sas_ex_disable_port(child, s2); | 1157 | sas_ex_disable_port(child, s2); |
1166 | } | 1158 | } |
@@ -1239,12 +1231,10 @@ static int sas_check_ex_subtractive_boundary(struct domain_device *dev) | |||
1239 | else if (SAS_ADDR(sub_sas_addr) != | 1231 | else if (SAS_ADDR(sub_sas_addr) != |
1240 | SAS_ADDR(phy->attached_sas_addr)) { | 1232 | SAS_ADDR(phy->attached_sas_addr)) { |
1241 | 1233 | ||
1242 | SAS_DPRINTK("ex %016llx phy 0x%x " | 1234 | pr_notice("ex %016llx phy 0x%x diverges(%016llx) on subtractive boundary(%016llx). Disabled\n", |
1243 | "diverges(%016llx) on subtractive " | 1235 | SAS_ADDR(dev->sas_addr), i, |
1244 | "boundary(%016llx). Disabled\n", | 1236 | SAS_ADDR(phy->attached_sas_addr), |
1245 | SAS_ADDR(dev->sas_addr), i, | 1237 | SAS_ADDR(sub_sas_addr)); |
1246 | SAS_ADDR(phy->attached_sas_addr), | ||
1247 | SAS_ADDR(sub_sas_addr)); | ||
1248 | sas_ex_disable_phy(dev, i); | 1238 | sas_ex_disable_phy(dev, i); |
1249 | } | 1239 | } |
1250 | } | 1240 | } |
@@ -1284,13 +1274,12 @@ static int sas_check_eeds(struct domain_device *child, | |||
1284 | 1274 | ||
1285 | if (SAS_ADDR(parent->port->disc.fanout_sas_addr) != 0) { | 1275 | if (SAS_ADDR(parent->port->disc.fanout_sas_addr) != 0) { |
1286 | res = -ENODEV; | 1276 | res = -ENODEV; |
1287 | SAS_DPRINTK("edge ex %016llx phy S:0x%x <--> edge ex %016llx " | 1277 | pr_warn("edge ex %016llx phy S:0x%x <--> edge ex %016llx phy S:0x%x, while there is a fanout ex %016llx\n", |
1288 | "phy S:0x%x, while there is a fanout ex %016llx\n", | 1278 | SAS_ADDR(parent->sas_addr), |
1289 | SAS_ADDR(parent->sas_addr), | 1279 | parent_phy->phy_id, |
1290 | parent_phy->phy_id, | 1280 | SAS_ADDR(child->sas_addr), |
1291 | SAS_ADDR(child->sas_addr), | 1281 | child_phy->phy_id, |
1292 | child_phy->phy_id, | 1282 | SAS_ADDR(parent->port->disc.fanout_sas_addr)); |
1293 | SAS_ADDR(parent->port->disc.fanout_sas_addr)); | ||
1294 | } else if (SAS_ADDR(parent->port->disc.eeds_a) == 0) { | 1283 | } else if (SAS_ADDR(parent->port->disc.eeds_a) == 0) { |
1295 | memcpy(parent->port->disc.eeds_a, parent->sas_addr, | 1284 | memcpy(parent->port->disc.eeds_a, parent->sas_addr, |
1296 | SAS_ADDR_SIZE); | 1285 | SAS_ADDR_SIZE); |
@@ -1308,12 +1297,11 @@ static int sas_check_eeds(struct domain_device *child, | |||
1308 | ; | 1297 | ; |
1309 | else { | 1298 | else { |
1310 | res = -ENODEV; | 1299 | res = -ENODEV; |
1311 | SAS_DPRINTK("edge ex %016llx phy 0x%x <--> edge ex %016llx " | 1300 | pr_warn("edge ex %016llx phy 0x%x <--> edge ex %016llx phy 0x%x link forms a third EEDS!\n", |
1312 | "phy 0x%x link forms a third EEDS!\n", | 1301 | SAS_ADDR(parent->sas_addr), |
1313 | SAS_ADDR(parent->sas_addr), | 1302 | parent_phy->phy_id, |
1314 | parent_phy->phy_id, | 1303 | SAS_ADDR(child->sas_addr), |
1315 | SAS_ADDR(child->sas_addr), | 1304 | child_phy->phy_id); |
1316 | child_phy->phy_id); | ||
1317 | } | 1305 | } |
1318 | 1306 | ||
1319 | return res; | 1307 | return res; |
@@ -1427,14 +1415,13 @@ static int sas_configure_present(struct domain_device *dev, int phy_id, | |||
1427 | goto out; | 1415 | goto out; |
1428 | res = rri_resp[2]; | 1416 | res = rri_resp[2]; |
1429 | if (res == SMP_RESP_NO_INDEX) { | 1417 | if (res == SMP_RESP_NO_INDEX) { |
1430 | SAS_DPRINTK("overflow of indexes: dev %016llx " | 1418 | pr_warn("overflow of indexes: dev %016llx phy 0x%x index 0x%x\n", |
1431 | "phy 0x%x index 0x%x\n", | 1419 | SAS_ADDR(dev->sas_addr), phy_id, i); |
1432 | SAS_ADDR(dev->sas_addr), phy_id, i); | ||
1433 | goto out; | 1420 | goto out; |
1434 | } else if (res != SMP_RESP_FUNC_ACC) { | 1421 | } else if (res != SMP_RESP_FUNC_ACC) { |
1435 | SAS_DPRINTK("%s: dev %016llx phy 0x%x index 0x%x " | 1422 | pr_notice("%s: dev %016llx phy 0x%x index 0x%x result 0x%x\n", |
1436 | "result 0x%x\n", __func__, | 1423 | __func__, SAS_ADDR(dev->sas_addr), phy_id, |
1437 | SAS_ADDR(dev->sas_addr), phy_id, i, res); | 1424 | i, res); |
1438 | goto out; | 1425 | goto out; |
1439 | } | 1426 | } |
1440 | if (SAS_ADDR(sas_addr) != 0) { | 1427 | if (SAS_ADDR(sas_addr) != 0) { |
@@ -1498,9 +1485,8 @@ static int sas_configure_set(struct domain_device *dev, int phy_id, | |||
1498 | goto out; | 1485 | goto out; |
1499 | res = cri_resp[2]; | 1486 | res = cri_resp[2]; |
1500 | if (res == SMP_RESP_NO_INDEX) { | 1487 | if (res == SMP_RESP_NO_INDEX) { |
1501 | SAS_DPRINTK("overflow of indexes: dev %016llx phy 0x%x " | 1488 | pr_warn("overflow of indexes: dev %016llx phy 0x%x index 0x%x\n", |
1502 | "index 0x%x\n", | 1489 | SAS_ADDR(dev->sas_addr), phy_id, index); |
1503 | SAS_ADDR(dev->sas_addr), phy_id, index); | ||
1504 | } | 1490 | } |
1505 | out: | 1491 | out: |
1506 | kfree(cri_req); | 1492 | kfree(cri_req); |
@@ -1547,8 +1533,8 @@ static int sas_configure_parent(struct domain_device *parent, | |||
1547 | } | 1533 | } |
1548 | 1534 | ||
1549 | if (ex_parent->conf_route_table == 0) { | 1535 | if (ex_parent->conf_route_table == 0) { |
1550 | SAS_DPRINTK("ex %016llx has self-configuring routing table\n", | 1536 | pr_debug("ex %016llx has self-configuring routing table\n", |
1551 | SAS_ADDR(parent->sas_addr)); | 1537 | SAS_ADDR(parent->sas_addr)); |
1552 | return 0; | 1538 | return 0; |
1553 | } | 1539 | } |
1554 | 1540 | ||
@@ -1609,8 +1595,8 @@ static int sas_discover_expander(struct domain_device *dev) | |||
1609 | 1595 | ||
1610 | res = sas_expander_discover(dev); | 1596 | res = sas_expander_discover(dev); |
1611 | if (res) { | 1597 | if (res) { |
1612 | SAS_DPRINTK("expander %016llx discovery failed(0x%x)\n", | 1598 | pr_warn("expander %016llx discovery failed(0x%x)\n", |
1613 | SAS_ADDR(dev->sas_addr), res); | 1599 | SAS_ADDR(dev->sas_addr), res); |
1614 | goto out_err; | 1600 | goto out_err; |
1615 | } | 1601 | } |
1616 | 1602 | ||
@@ -1854,10 +1840,10 @@ static int sas_find_bcast_dev(struct domain_device *dev, | |||
1854 | if (phy_id != -1) { | 1840 | if (phy_id != -1) { |
1855 | *src_dev = dev; | 1841 | *src_dev = dev; |
1856 | ex->ex_change_count = ex_change_count; | 1842 | ex->ex_change_count = ex_change_count; |
1857 | SAS_DPRINTK("Expander phy change count has changed\n"); | 1843 | pr_info("Expander phy change count has changed\n"); |
1858 | return res; | 1844 | return res; |
1859 | } else | 1845 | } else |
1860 | SAS_DPRINTK("Expander phys DID NOT change\n"); | 1846 | pr_info("Expander phys DID NOT change\n"); |
1861 | } | 1847 | } |
1862 | list_for_each_entry(ch, &ex->children, siblings) { | 1848 | list_for_each_entry(ch, &ex->children, siblings) { |
1863 | if (ch->dev_type == SAS_EDGE_EXPANDER_DEVICE || ch->dev_type == SAS_FANOUT_EXPANDER_DEVICE) { | 1849 | if (ch->dev_type == SAS_EDGE_EXPANDER_DEVICE || ch->dev_type == SAS_FANOUT_EXPANDER_DEVICE) { |
@@ -1967,8 +1953,8 @@ static int sas_discover_new(struct domain_device *dev, int phy_id) | |||
1967 | struct domain_device *child; | 1953 | struct domain_device *child; |
1968 | int res; | 1954 | int res; |
1969 | 1955 | ||
1970 | SAS_DPRINTK("ex %016llx phy%d new device attached\n", | 1956 | pr_debug("ex %016llx phy%d new device attached\n", |
1971 | SAS_ADDR(dev->sas_addr), phy_id); | 1957 | SAS_ADDR(dev->sas_addr), phy_id); |
1972 | res = sas_ex_phy_discover(dev, phy_id); | 1958 | res = sas_ex_phy_discover(dev, phy_id); |
1973 | if (res) | 1959 | if (res) |
1974 | return res; | 1960 | return res; |
@@ -2046,15 +2032,15 @@ static int sas_rediscover_dev(struct domain_device *dev, int phy_id, bool last) | |||
2046 | 2032 | ||
2047 | if (ata_dev && phy->attached_dev_type == SAS_SATA_PENDING) | 2033 | if (ata_dev && phy->attached_dev_type == SAS_SATA_PENDING) |
2048 | action = ", needs recovery"; | 2034 | action = ", needs recovery"; |
2049 | SAS_DPRINTK("ex %016llx phy 0x%x broadcast flutter%s\n", | 2035 | pr_debug("ex %016llx phy 0x%x broadcast flutter%s\n", |
2050 | SAS_ADDR(dev->sas_addr), phy_id, action); | 2036 | SAS_ADDR(dev->sas_addr), phy_id, action); |
2051 | return res; | 2037 | return res; |
2052 | } | 2038 | } |
2053 | 2039 | ||
2054 | /* we always have to delete the old device when we went here */ | 2040 | /* we always have to delete the old device when we went here */ |
2055 | SAS_DPRINTK("ex %016llx phy 0x%x replace %016llx\n", | 2041 | pr_info("ex %016llx phy 0x%x replace %016llx\n", |
2056 | SAS_ADDR(dev->sas_addr), phy_id, | 2042 | SAS_ADDR(dev->sas_addr), phy_id, |
2057 | SAS_ADDR(phy->attached_sas_addr)); | 2043 | SAS_ADDR(phy->attached_sas_addr)); |
2058 | sas_unregister_devs_sas_addr(dev, phy_id, last); | 2044 | sas_unregister_devs_sas_addr(dev, phy_id, last); |
2059 | 2045 | ||
2060 | return sas_discover_new(dev, phy_id); | 2046 | return sas_discover_new(dev, phy_id); |
@@ -2082,8 +2068,8 @@ static int sas_rediscover(struct domain_device *dev, const int phy_id) | |||
2082 | int i; | 2068 | int i; |
2083 | bool last = true; /* is this the last phy of the port */ | 2069 | bool last = true; /* is this the last phy of the port */ |
2084 | 2070 | ||
2085 | SAS_DPRINTK("ex %016llx phy%d originated BROADCAST(CHANGE)\n", | 2071 | pr_debug("ex %016llx phy%d originated BROADCAST(CHANGE)\n", |
2086 | SAS_ADDR(dev->sas_addr), phy_id); | 2072 | SAS_ADDR(dev->sas_addr), phy_id); |
2087 | 2073 | ||
2088 | if (SAS_ADDR(changed_phy->attached_sas_addr) != 0) { | 2074 | if (SAS_ADDR(changed_phy->attached_sas_addr) != 0) { |
2089 | for (i = 0; i < ex->num_phys; i++) { | 2075 | for (i = 0; i < ex->num_phys; i++) { |
@@ -2093,8 +2079,8 @@ static int sas_rediscover(struct domain_device *dev, const int phy_id) | |||
2093 | continue; | 2079 | continue; |
2094 | if (SAS_ADDR(phy->attached_sas_addr) == | 2080 | if (SAS_ADDR(phy->attached_sas_addr) == |
2095 | SAS_ADDR(changed_phy->attached_sas_addr)) { | 2081 | SAS_ADDR(changed_phy->attached_sas_addr)) { |
2096 | SAS_DPRINTK("phy%d part of wide port with " | 2082 | pr_debug("phy%d part of wide port with phy%d\n", |
2097 | "phy%d\n", phy_id, i); | 2083 | phy_id, i); |
2098 | last = false; | 2084 | last = false; |
2099 | break; | 2085 | break; |
2100 | } | 2086 | } |
@@ -2152,23 +2138,23 @@ void sas_smp_handler(struct bsg_job *job, struct Scsi_Host *shost, | |||
2152 | case SAS_FANOUT_EXPANDER_DEVICE: | 2138 | case SAS_FANOUT_EXPANDER_DEVICE: |
2153 | break; | 2139 | break; |
2154 | default: | 2140 | default: |
2155 | printk("%s: can we send a smp request to a device?\n", | 2141 | pr_err("%s: can we send a smp request to a device?\n", |
2156 | __func__); | 2142 | __func__); |
2157 | goto out; | 2143 | goto out; |
2158 | } | 2144 | } |
2159 | 2145 | ||
2160 | dev = sas_find_dev_by_rphy(rphy); | 2146 | dev = sas_find_dev_by_rphy(rphy); |
2161 | if (!dev) { | 2147 | if (!dev) { |
2162 | printk("%s: fail to find a domain_device?\n", __func__); | 2148 | pr_err("%s: fail to find a domain_device?\n", __func__); |
2163 | goto out; | 2149 | goto out; |
2164 | } | 2150 | } |
2165 | 2151 | ||
2166 | /* do we need to support multiple segments? */ | 2152 | /* do we need to support multiple segments? */ |
2167 | if (job->request_payload.sg_cnt > 1 || | 2153 | if (job->request_payload.sg_cnt > 1 || |
2168 | job->reply_payload.sg_cnt > 1) { | 2154 | job->reply_payload.sg_cnt > 1) { |
2169 | printk("%s: multiple segments req %u, rsp %u\n", | 2155 | pr_info("%s: multiple segments req %u, rsp %u\n", |
2170 | __func__, job->request_payload.payload_len, | 2156 | __func__, job->request_payload.payload_len, |
2171 | job->reply_payload.payload_len); | 2157 | job->reply_payload.payload_len); |
2172 | goto out; | 2158 | goto out; |
2173 | } | 2159 | } |
2174 | 2160 | ||