diff options
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/cio/device.c | 2 | ||||
-rw-r--r-- | drivers/s390/cio/device_pgid.c | 2 | ||||
-rw-r--r-- | drivers/s390/cio/device_status.c | 1 | ||||
-rw-r--r-- | drivers/s390/net/lcs.c | 31 | ||||
-rw-r--r-- | drivers/s390/net/lcs.h | 2 | ||||
-rw-r--r-- | drivers/s390/net/qeth.h | 112 | ||||
-rw-r--r-- | drivers/s390/net/qeth_eddp.c | 11 | ||||
-rw-r--r-- | drivers/s390/net/qeth_main.c | 17 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_dbf.c | 76 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_def.h | 13 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_erp.c | 82 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_ext.h | 5 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_fsf.c | 80 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_scsi.c | 15 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_sysfs_adapter.c | 4 |
15 files changed, 201 insertions, 252 deletions
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index 062fb100d94c..afc4e88551ad 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
@@ -359,7 +359,7 @@ ccw_device_set_online(struct ccw_device *cdev) | |||
359 | else | 359 | else |
360 | pr_debug("ccw_device_offline returned %d, device %s\n", | 360 | pr_debug("ccw_device_offline returned %d, device %s\n", |
361 | ret, cdev->dev.bus_id); | 361 | ret, cdev->dev.bus_id); |
362 | return (ret = 0) ? -ENODEV : ret; | 362 | return (ret == 0) ? -ENODEV : ret; |
363 | } | 363 | } |
364 | 364 | ||
365 | static ssize_t | 365 | static ssize_t |
diff --git a/drivers/s390/cio/device_pgid.c b/drivers/s390/cio/device_pgid.c index d2a5b04d7cba..85b1020a1fcc 100644 --- a/drivers/s390/cio/device_pgid.c +++ b/drivers/s390/cio/device_pgid.c | |||
@@ -405,7 +405,7 @@ __ccw_device_disband_start(struct ccw_device *cdev) | |||
405 | cdev->private->iretry = 5; | 405 | cdev->private->iretry = 5; |
406 | cdev->private->imask >>= 1; | 406 | cdev->private->imask >>= 1; |
407 | } | 407 | } |
408 | ccw_device_verify_done(cdev, (sch->lpm != 0) ? 0 : -ENODEV); | 408 | ccw_device_disband_done(cdev, (sch->lpm != 0) ? 0 : -ENODEV); |
409 | } | 409 | } |
410 | 410 | ||
411 | /* | 411 | /* |
diff --git a/drivers/s390/cio/device_status.c b/drivers/s390/cio/device_status.c index dad4dd9887c9..6c762b43f921 100644 --- a/drivers/s390/cio/device_status.c +++ b/drivers/s390/cio/device_status.c | |||
@@ -317,7 +317,6 @@ ccw_device_do_sense(struct ccw_device *cdev, struct irb *irb) | |||
317 | /* | 317 | /* |
318 | * We have ending status but no sense information. Do a basic sense. | 318 | * We have ending status but no sense information. Do a basic sense. |
319 | */ | 319 | */ |
320 | sch = to_subchannel(cdev->dev.parent); | ||
321 | sch->sense_ccw.cmd_code = CCW_CMD_BASIC_SENSE; | 320 | sch->sense_ccw.cmd_code = CCW_CMD_BASIC_SENSE; |
322 | sch->sense_ccw.cda = (__u32) __pa(cdev->private->irb.ecw); | 321 | sch->sense_ccw.cda = (__u32) __pa(cdev->private->irb.ecw); |
323 | sch->sense_ccw.count = SENSE_MAX_COUNT; | 322 | sch->sense_ccw.count = SENSE_MAX_COUNT; |
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c index 6229ba4995ad..9cf88d7201d3 100644 --- a/drivers/s390/net/lcs.c +++ b/drivers/s390/net/lcs.c | |||
@@ -98,9 +98,9 @@ lcs_register_debug_facility(void) | |||
98 | return -ENOMEM; | 98 | return -ENOMEM; |
99 | } | 99 | } |
100 | debug_register_view(lcs_dbf_setup, &debug_hex_ascii_view); | 100 | debug_register_view(lcs_dbf_setup, &debug_hex_ascii_view); |
101 | debug_set_level(lcs_dbf_setup, 4); | 101 | debug_set_level(lcs_dbf_setup, 2); |
102 | debug_register_view(lcs_dbf_trace, &debug_hex_ascii_view); | 102 | debug_register_view(lcs_dbf_trace, &debug_hex_ascii_view); |
103 | debug_set_level(lcs_dbf_trace, 4); | 103 | debug_set_level(lcs_dbf_trace, 2); |
104 | return 0; | 104 | return 0; |
105 | } | 105 | } |
106 | 106 | ||
@@ -1292,9 +1292,8 @@ lcs_set_multicast_list(struct net_device *dev) | |||
1292 | LCS_DBF_TEXT(4, trace, "setmulti"); | 1292 | LCS_DBF_TEXT(4, trace, "setmulti"); |
1293 | card = (struct lcs_card *) dev->priv; | 1293 | card = (struct lcs_card *) dev->priv; |
1294 | 1294 | ||
1295 | if (!lcs_set_thread_start_bit(card, LCS_SET_MC_THREAD)) { | 1295 | if (!lcs_set_thread_start_bit(card, LCS_SET_MC_THREAD)) |
1296 | schedule_work(&card->kernel_thread_starter); | 1296 | schedule_work(&card->kernel_thread_starter); |
1297 | } | ||
1298 | } | 1297 | } |
1299 | 1298 | ||
1300 | #endif /* CONFIG_IP_MULTICAST */ | 1299 | #endif /* CONFIG_IP_MULTICAST */ |
@@ -1459,6 +1458,8 @@ lcs_txbuffer_cb(struct lcs_channel *channel, struct lcs_buffer *buffer) | |||
1459 | lcs_release_buffer(channel, buffer); | 1458 | lcs_release_buffer(channel, buffer); |
1460 | card = (struct lcs_card *) | 1459 | card = (struct lcs_card *) |
1461 | ((char *) channel - offsetof(struct lcs_card, write)); | 1460 | ((char *) channel - offsetof(struct lcs_card, write)); |
1461 | if (netif_queue_stopped(card->dev)) | ||
1462 | netif_wake_queue(card->dev); | ||
1462 | spin_lock(&card->lock); | 1463 | spin_lock(&card->lock); |
1463 | card->tx_emitted--; | 1464 | card->tx_emitted--; |
1464 | if (card->tx_emitted <= 0 && card->tx_buffer != NULL) | 1465 | if (card->tx_emitted <= 0 && card->tx_buffer != NULL) |
@@ -1478,6 +1479,7 @@ __lcs_start_xmit(struct lcs_card *card, struct sk_buff *skb, | |||
1478 | struct net_device *dev) | 1479 | struct net_device *dev) |
1479 | { | 1480 | { |
1480 | struct lcs_header *header; | 1481 | struct lcs_header *header; |
1482 | int rc = 0; | ||
1481 | 1483 | ||
1482 | LCS_DBF_TEXT(5, trace, "hardxmit"); | 1484 | LCS_DBF_TEXT(5, trace, "hardxmit"); |
1483 | if (skb == NULL) { | 1485 | if (skb == NULL) { |
@@ -1492,10 +1494,8 @@ __lcs_start_xmit(struct lcs_card *card, struct sk_buff *skb, | |||
1492 | card->stats.tx_carrier_errors++; | 1494 | card->stats.tx_carrier_errors++; |
1493 | return 0; | 1495 | return 0; |
1494 | } | 1496 | } |
1495 | if (netif_queue_stopped(dev) ) { | 1497 | netif_stop_queue(card->dev); |
1496 | card->stats.tx_dropped++; | 1498 | spin_lock(&card->lock); |
1497 | return -EBUSY; | ||
1498 | } | ||
1499 | if (card->tx_buffer != NULL && | 1499 | if (card->tx_buffer != NULL && |
1500 | card->tx_buffer->count + sizeof(struct lcs_header) + | 1500 | card->tx_buffer->count + sizeof(struct lcs_header) + |
1501 | skb->len + sizeof(u16) > LCS_IOBUFFERSIZE) | 1501 | skb->len + sizeof(u16) > LCS_IOBUFFERSIZE) |
@@ -1506,7 +1506,8 @@ __lcs_start_xmit(struct lcs_card *card, struct sk_buff *skb, | |||
1506 | card->tx_buffer = lcs_get_buffer(&card->write); | 1506 | card->tx_buffer = lcs_get_buffer(&card->write); |
1507 | if (card->tx_buffer == NULL) { | 1507 | if (card->tx_buffer == NULL) { |
1508 | card->stats.tx_dropped++; | 1508 | card->stats.tx_dropped++; |
1509 | return -EBUSY; | 1509 | rc = -EBUSY; |
1510 | goto out; | ||
1510 | } | 1511 | } |
1511 | card->tx_buffer->callback = lcs_txbuffer_cb; | 1512 | card->tx_buffer->callback = lcs_txbuffer_cb; |
1512 | card->tx_buffer->count = 0; | 1513 | card->tx_buffer->count = 0; |
@@ -1518,13 +1519,18 @@ __lcs_start_xmit(struct lcs_card *card, struct sk_buff *skb, | |||
1518 | header->type = card->lan_type; | 1519 | header->type = card->lan_type; |
1519 | header->slot = card->portno; | 1520 | header->slot = card->portno; |
1520 | memcpy(header + 1, skb->data, skb->len); | 1521 | memcpy(header + 1, skb->data, skb->len); |
1522 | spin_unlock(&card->lock); | ||
1521 | card->stats.tx_bytes += skb->len; | 1523 | card->stats.tx_bytes += skb->len; |
1522 | card->stats.tx_packets++; | 1524 | card->stats.tx_packets++; |
1523 | dev_kfree_skb(skb); | 1525 | dev_kfree_skb(skb); |
1524 | if (card->tx_emitted <= 0) | 1526 | netif_wake_queue(card->dev); |
1527 | spin_lock(&card->lock); | ||
1528 | if (card->tx_emitted <= 0 && card->tx_buffer != NULL) | ||
1525 | /* If this is the first tx buffer emit it immediately. */ | 1529 | /* If this is the first tx buffer emit it immediately. */ |
1526 | __lcs_emit_txbuffer(card); | 1530 | __lcs_emit_txbuffer(card); |
1527 | return 0; | 1531 | out: |
1532 | spin_unlock(&card->lock); | ||
1533 | return rc; | ||
1528 | } | 1534 | } |
1529 | 1535 | ||
1530 | static int | 1536 | static int |
@@ -1535,9 +1541,7 @@ lcs_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1535 | 1541 | ||
1536 | LCS_DBF_TEXT(5, trace, "pktxmit"); | 1542 | LCS_DBF_TEXT(5, trace, "pktxmit"); |
1537 | card = (struct lcs_card *) dev->priv; | 1543 | card = (struct lcs_card *) dev->priv; |
1538 | spin_lock(&card->lock); | ||
1539 | rc = __lcs_start_xmit(card, skb, dev); | 1544 | rc = __lcs_start_xmit(card, skb, dev); |
1540 | spin_unlock(&card->lock); | ||
1541 | return rc; | 1545 | return rc; |
1542 | } | 1546 | } |
1543 | 1547 | ||
@@ -2319,7 +2323,6 @@ __init lcs_init_module(void) | |||
2319 | PRINT_ERR("Initialization failed\n"); | 2323 | PRINT_ERR("Initialization failed\n"); |
2320 | return rc; | 2324 | return rc; |
2321 | } | 2325 | } |
2322 | |||
2323 | return 0; | 2326 | return 0; |
2324 | } | 2327 | } |
2325 | 2328 | ||
diff --git a/drivers/s390/net/lcs.h b/drivers/s390/net/lcs.h index 08e60ad43916..2fad5e40c2e4 100644 --- a/drivers/s390/net/lcs.h +++ b/drivers/s390/net/lcs.h | |||
@@ -95,7 +95,7 @@ do { \ | |||
95 | */ | 95 | */ |
96 | #define LCS_ILLEGAL_OFFSET 0xffff | 96 | #define LCS_ILLEGAL_OFFSET 0xffff |
97 | #define LCS_IOBUFFERSIZE 0x5000 | 97 | #define LCS_IOBUFFERSIZE 0x5000 |
98 | #define LCS_NUM_BUFFS 8 /* needs to be power of 2 */ | 98 | #define LCS_NUM_BUFFS 32 /* needs to be power of 2 */ |
99 | #define LCS_MAC_LENGTH 6 | 99 | #define LCS_MAC_LENGTH 6 |
100 | #define LCS_INVALID_PORT_NO -1 | 100 | #define LCS_INVALID_PORT_NO -1 |
101 | #define LCS_LANCMD_TIMEOUT_DEFAULT 5 | 101 | #define LCS_LANCMD_TIMEOUT_DEFAULT 5 |
diff --git a/drivers/s390/net/qeth.h b/drivers/s390/net/qeth.h index 9a064d4727ad..4df0fcd7b10b 100644 --- a/drivers/s390/net/qeth.h +++ b/drivers/s390/net/qeth.h | |||
@@ -1076,16 +1076,6 @@ qeth_get_qdio_q_format(struct qeth_card *card) | |||
1076 | } | 1076 | } |
1077 | 1077 | ||
1078 | static inline int | 1078 | static inline int |
1079 | qeth_isdigit(char * buf) | ||
1080 | { | ||
1081 | while (*buf) { | ||
1082 | if (!isdigit(*buf++)) | ||
1083 | return 0; | ||
1084 | } | ||
1085 | return 1; | ||
1086 | } | ||
1087 | |||
1088 | static inline int | ||
1089 | qeth_isxdigit(char * buf) | 1079 | qeth_isxdigit(char * buf) |
1090 | { | 1080 | { |
1091 | while (*buf) { | 1081 | while (*buf) { |
@@ -1104,33 +1094,17 @@ qeth_ipaddr4_to_string(const __u8 *addr, char *buf) | |||
1104 | static inline int | 1094 | static inline int |
1105 | qeth_string_to_ipaddr4(const char *buf, __u8 *addr) | 1095 | qeth_string_to_ipaddr4(const char *buf, __u8 *addr) |
1106 | { | 1096 | { |
1107 | const char *start, *end; | 1097 | int count = 0, rc = 0; |
1108 | char abuf[4]; | 1098 | int in[4]; |
1109 | char *tmp; | 1099 | |
1110 | int len; | 1100 | rc = sscanf(buf, "%d.%d.%d.%d%n", |
1111 | int i; | 1101 | &in[0], &in[1], &in[2], &in[3], &count); |
1112 | 1102 | if (rc != 4 || count) | |
1113 | start = buf; | 1103 | return -EINVAL; |
1114 | for (i = 0; i < 4; i++) { | 1104 | for (count = 0; count < 4; count++) { |
1115 | if (i == 3) { | 1105 | if (in[count] > 255) |
1116 | end = strchr(start,0xa); | ||
1117 | if (end) | ||
1118 | len = end - start; | ||
1119 | else | ||
1120 | len = strlen(start); | ||
1121 | } | ||
1122 | else { | ||
1123 | end = strchr(start, '.'); | ||
1124 | len = end - start; | ||
1125 | } | ||
1126 | if ((len <= 0) || (len > 3)) | ||
1127 | return -EINVAL; | ||
1128 | memset(abuf, 0, 4); | ||
1129 | strncpy(abuf, start, len); | ||
1130 | if (!qeth_isdigit(abuf)) | ||
1131 | return -EINVAL; | 1106 | return -EINVAL; |
1132 | addr[i] = simple_strtoul(abuf, &tmp, 10); | 1107 | addr[count] = in[count]; |
1133 | start = end + 1; | ||
1134 | } | 1108 | } |
1135 | return 0; | 1109 | return 0; |
1136 | } | 1110 | } |
@@ -1149,36 +1123,44 @@ qeth_ipaddr6_to_string(const __u8 *addr, char *buf) | |||
1149 | static inline int | 1123 | static inline int |
1150 | qeth_string_to_ipaddr6(const char *buf, __u8 *addr) | 1124 | qeth_string_to_ipaddr6(const char *buf, __u8 *addr) |
1151 | { | 1125 | { |
1152 | const char *start, *end; | 1126 | char *end, *start; |
1153 | u16 *tmp_addr; | 1127 | __u16 *in; |
1154 | char abuf[5]; | 1128 | char num[5]; |
1155 | char *tmp; | 1129 | int num2, cnt, out, found, save_cnt; |
1156 | int len; | 1130 | unsigned short in_tmp[8] = {0, }; |
1157 | int i; | 1131 | |
1158 | 1132 | cnt = out = found = save_cnt = num2 = 0; | |
1159 | tmp_addr = (u16 *)addr; | 1133 | end = start = (char *) buf; |
1160 | start = buf; | 1134 | in = (__u16 *) addr; |
1161 | for (i = 0; i < 8; i++) { | 1135 | memset(in, 0, 16); |
1162 | if (i == 7) { | 1136 | while (end) { |
1163 | end = strchr(start,0xa); | 1137 | end = strchr(end,':'); |
1164 | if (end) | 1138 | if (end == NULL) { |
1165 | len = end - start; | 1139 | end = (char *)buf + (strlen(buf)); |
1166 | else | 1140 | out = 1; |
1167 | len = strlen(start); | 1141 | } |
1168 | } | 1142 | if ((end - start)) { |
1169 | else { | 1143 | memset(num, 0, 5); |
1170 | end = strchr(start, ':'); | 1144 | memcpy(num, start, end - start); |
1171 | len = end - start; | 1145 | if (!qeth_isxdigit(num)) |
1146 | return -EINVAL; | ||
1147 | sscanf(start, "%x", &num2); | ||
1148 | if (found) | ||
1149 | in_tmp[save_cnt++] = num2; | ||
1150 | else | ||
1151 | in[cnt++] = num2; | ||
1152 | if (out) | ||
1153 | break; | ||
1154 | } else { | ||
1155 | if (found) | ||
1156 | return -EINVAL; | ||
1157 | found = 1; | ||
1172 | } | 1158 | } |
1173 | if ((len <= 0) || (len > 4)) | 1159 | start = ++end; |
1174 | return -EINVAL; | 1160 | } |
1175 | memset(abuf, 0, 5); | 1161 | cnt = 7; |
1176 | strncpy(abuf, start, len); | 1162 | while (save_cnt) |
1177 | if (!qeth_isxdigit(abuf)) | 1163 | in[cnt--] = in_tmp[--save_cnt]; |
1178 | return -EINVAL; | ||
1179 | tmp_addr[i] = simple_strtoul(abuf, &tmp, 16); | ||
1180 | start = end + 1; | ||
1181 | } | ||
1182 | return 0; | 1164 | return 0; |
1183 | } | 1165 | } |
1184 | 1166 | ||
diff --git a/drivers/s390/net/qeth_eddp.c b/drivers/s390/net/qeth_eddp.c index b02313127780..82cb4af2f0e7 100644 --- a/drivers/s390/net/qeth_eddp.c +++ b/drivers/s390/net/qeth_eddp.c | |||
@@ -59,8 +59,7 @@ qeth_eddp_free_context(struct qeth_eddp_context *ctx) | |||
59 | for (i = 0; i < ctx->num_pages; ++i) | 59 | for (i = 0; i < ctx->num_pages; ++i) |
60 | free_page((unsigned long)ctx->pages[i]); | 60 | free_page((unsigned long)ctx->pages[i]); |
61 | kfree(ctx->pages); | 61 | kfree(ctx->pages); |
62 | if (ctx->elements != NULL) | 62 | kfree(ctx->elements); |
63 | kfree(ctx->elements); | ||
64 | kfree(ctx); | 63 | kfree(ctx); |
65 | } | 64 | } |
66 | 65 | ||
@@ -413,6 +412,13 @@ __qeth_eddp_fill_context_tcp(struct qeth_eddp_context *ctx, | |||
413 | 412 | ||
414 | QETH_DBF_TEXT(trace, 5, "eddpftcp"); | 413 | QETH_DBF_TEXT(trace, 5, "eddpftcp"); |
415 | eddp->skb_offset = sizeof(struct qeth_hdr) + eddp->nhl + eddp->thl; | 414 | eddp->skb_offset = sizeof(struct qeth_hdr) + eddp->nhl + eddp->thl; |
415 | if (eddp->qh.hdr.l2.id == QETH_HEADER_TYPE_LAYER2) { | ||
416 | eddp->skb_offset += sizeof(struct ethhdr); | ||
417 | #ifdef CONFIG_QETH_VLAN | ||
418 | if (eddp->mac.h_proto == __constant_htons(ETH_P_8021Q)) | ||
419 | eddp->skb_offset += VLAN_HLEN; | ||
420 | #endif /* CONFIG_QETH_VLAN */ | ||
421 | } | ||
416 | tcph = eddp->skb->h.th; | 422 | tcph = eddp->skb->h.th; |
417 | while (eddp->skb_offset < eddp->skb->len) { | 423 | while (eddp->skb_offset < eddp->skb->len) { |
418 | data_len = min((int)skb_shinfo(eddp->skb)->tso_size, | 424 | data_len = min((int)skb_shinfo(eddp->skb)->tso_size, |
@@ -483,6 +489,7 @@ qeth_eddp_fill_context_tcp(struct qeth_eddp_context *ctx, | |||
483 | return -ENOMEM; | 489 | return -ENOMEM; |
484 | } | 490 | } |
485 | if (qhdr->hdr.l2.id == QETH_HEADER_TYPE_LAYER2) { | 491 | if (qhdr->hdr.l2.id == QETH_HEADER_TYPE_LAYER2) { |
492 | skb->mac.raw = (skb->data) + sizeof(struct qeth_hdr); | ||
486 | memcpy(&eddp->mac, eth_hdr(skb), ETH_HLEN); | 493 | memcpy(&eddp->mac, eth_hdr(skb), ETH_HLEN); |
487 | #ifdef CONFIG_QETH_VLAN | 494 | #ifdef CONFIG_QETH_VLAN |
488 | if (eddp->mac.h_proto == __constant_htons(ETH_P_8021Q)) { | 495 | if (eddp->mac.h_proto == __constant_htons(ETH_P_8021Q)) { |
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index 410abeada6c4..dba7f7f02e79 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c | |||
@@ -516,7 +516,8 @@ __qeth_set_offline(struct ccwgroup_device *cgdev, int recovery_mode) | |||
516 | QETH_DBF_TEXT(setup, 3, "setoffl"); | 516 | QETH_DBF_TEXT(setup, 3, "setoffl"); |
517 | QETH_DBF_HEX(setup, 3, &card, sizeof(void *)); | 517 | QETH_DBF_HEX(setup, 3, &card, sizeof(void *)); |
518 | 518 | ||
519 | netif_carrier_off(card->dev); | 519 | if (card->dev && netif_carrier_ok(card->dev)) |
520 | netif_carrier_off(card->dev); | ||
520 | recover_flag = card->state; | 521 | recover_flag = card->state; |
521 | if (qeth_stop_card(card, recovery_mode) == -ERESTARTSYS){ | 522 | if (qeth_stop_card(card, recovery_mode) == -ERESTARTSYS){ |
522 | PRINT_WARN("Stopping card %s interrupted by user!\n", | 523 | PRINT_WARN("Stopping card %s interrupted by user!\n", |
@@ -1679,6 +1680,7 @@ qeth_cmd_timeout(unsigned long data) | |||
1679 | spin_unlock_irqrestore(&reply->card->lock, flags); | 1680 | spin_unlock_irqrestore(&reply->card->lock, flags); |
1680 | } | 1681 | } |
1681 | 1682 | ||
1683 | |||
1682 | static struct qeth_ipa_cmd * | 1684 | static struct qeth_ipa_cmd * |
1683 | qeth_check_ipa_data(struct qeth_card *card, struct qeth_cmd_buffer *iob) | 1685 | qeth_check_ipa_data(struct qeth_card *card, struct qeth_cmd_buffer *iob) |
1684 | { | 1686 | { |
@@ -1699,7 +1701,8 @@ qeth_check_ipa_data(struct qeth_card *card, struct qeth_cmd_buffer *iob) | |||
1699 | QETH_CARD_IFNAME(card), | 1701 | QETH_CARD_IFNAME(card), |
1700 | card->info.chpid); | 1702 | card->info.chpid); |
1701 | card->lan_online = 0; | 1703 | card->lan_online = 0; |
1702 | netif_carrier_off(card->dev); | 1704 | if (card->dev && netif_carrier_ok(card->dev)) |
1705 | netif_carrier_off(card->dev); | ||
1703 | return NULL; | 1706 | return NULL; |
1704 | case IPA_CMD_STARTLAN: | 1707 | case IPA_CMD_STARTLAN: |
1705 | PRINT_INFO("Link reestablished on %s " | 1708 | PRINT_INFO("Link reestablished on %s " |
@@ -5562,7 +5565,7 @@ qeth_set_multicast_list(struct net_device *dev) | |||
5562 | if (card->info.type == QETH_CARD_TYPE_OSN) | 5565 | if (card->info.type == QETH_CARD_TYPE_OSN) |
5563 | return ; | 5566 | return ; |
5564 | 5567 | ||
5565 | QETH_DBF_TEXT(trace,3,"setmulti"); | 5568 | QETH_DBF_TEXT(trace, 3, "setmulti"); |
5566 | qeth_delete_mc_addresses(card); | 5569 | qeth_delete_mc_addresses(card); |
5567 | if (card->options.layer2) { | 5570 | if (card->options.layer2) { |
5568 | qeth_layer2_add_multicast(card); | 5571 | qeth_layer2_add_multicast(card); |
@@ -5579,7 +5582,6 @@ out: | |||
5579 | return; | 5582 | return; |
5580 | if (qeth_set_thread_start_bit(card, QETH_SET_PROMISC_MODE_THREAD)==0) | 5583 | if (qeth_set_thread_start_bit(card, QETH_SET_PROMISC_MODE_THREAD)==0) |
5581 | schedule_work(&card->kernel_thread_starter); | 5584 | schedule_work(&card->kernel_thread_starter); |
5582 | |||
5583 | } | 5585 | } |
5584 | 5586 | ||
5585 | static int | 5587 | static int |
@@ -7452,6 +7454,7 @@ qeth_softsetup_card(struct qeth_card *card) | |||
7452 | card->lan_online = 1; | 7454 | card->lan_online = 1; |
7453 | if (card->info.type==QETH_CARD_TYPE_OSN) | 7455 | if (card->info.type==QETH_CARD_TYPE_OSN) |
7454 | goto out; | 7456 | goto out; |
7457 | qeth_set_large_send(card, card->options.large_send); | ||
7455 | if (card->options.layer2) { | 7458 | if (card->options.layer2) { |
7456 | card->dev->features |= | 7459 | card->dev->features |= |
7457 | NETIF_F_HW_VLAN_FILTER | | 7460 | NETIF_F_HW_VLAN_FILTER | |
@@ -7468,12 +7471,6 @@ qeth_softsetup_card(struct qeth_card *card) | |||
7468 | #endif | 7471 | #endif |
7469 | goto out; | 7472 | goto out; |
7470 | } | 7473 | } |
7471 | if ((card->options.large_send == QETH_LARGE_SEND_EDDP) || | ||
7472 | (card->options.large_send == QETH_LARGE_SEND_TSO)) | ||
7473 | card->dev->features |= NETIF_F_TSO | NETIF_F_SG; | ||
7474 | else | ||
7475 | card->dev->features &= ~(NETIF_F_TSO | NETIF_F_SG); | ||
7476 | |||
7477 | if ((rc = qeth_setadapter_parms(card))) | 7474 | if ((rc = qeth_setadapter_parms(card))) |
7478 | QETH_DBF_TEXT_(setup, 2, "2err%d", rc); | 7475 | QETH_DBF_TEXT_(setup, 2, "2err%d", rc); |
7479 | if ((rc = qeth_start_ipassists(card))) | 7476 | if ((rc = qeth_start_ipassists(card))) |
diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c index 4d7d47cf2394..a5f2ba9a8fdb 100644 --- a/drivers/s390/scsi/zfcp_dbf.c +++ b/drivers/s390/scsi/zfcp_dbf.c | |||
@@ -710,10 +710,9 @@ static inline void | |||
710 | _zfcp_scsi_dbf_event_common(const char *tag, const char *tag2, int level, | 710 | _zfcp_scsi_dbf_event_common(const char *tag, const char *tag2, int level, |
711 | struct zfcp_adapter *adapter, | 711 | struct zfcp_adapter *adapter, |
712 | struct scsi_cmnd *scsi_cmnd, | 712 | struct scsi_cmnd *scsi_cmnd, |
713 | struct zfcp_fsf_req *new_fsf_req) | 713 | struct zfcp_fsf_req *fsf_req, |
714 | struct zfcp_fsf_req *old_fsf_req) | ||
714 | { | 715 | { |
715 | struct zfcp_fsf_req *fsf_req = | ||
716 | (struct zfcp_fsf_req *)scsi_cmnd->host_scribble; | ||
717 | struct zfcp_scsi_dbf_record *rec = &adapter->scsi_dbf_buf; | 716 | struct zfcp_scsi_dbf_record *rec = &adapter->scsi_dbf_buf; |
718 | struct zfcp_dbf_dump *dump = (struct zfcp_dbf_dump *)rec; | 717 | struct zfcp_dbf_dump *dump = (struct zfcp_dbf_dump *)rec; |
719 | unsigned long flags; | 718 | unsigned long flags; |
@@ -727,19 +726,20 @@ _zfcp_scsi_dbf_event_common(const char *tag, const char *tag2, int level, | |||
727 | if (offset == 0) { | 726 | if (offset == 0) { |
728 | strncpy(rec->tag, tag, ZFCP_DBF_TAG_SIZE); | 727 | strncpy(rec->tag, tag, ZFCP_DBF_TAG_SIZE); |
729 | strncpy(rec->tag2, tag2, ZFCP_DBF_TAG_SIZE); | 728 | strncpy(rec->tag2, tag2, ZFCP_DBF_TAG_SIZE); |
730 | if (scsi_cmnd->device) { | 729 | if (scsi_cmnd != NULL) { |
731 | rec->scsi_id = scsi_cmnd->device->id; | 730 | if (scsi_cmnd->device) { |
732 | rec->scsi_lun = scsi_cmnd->device->lun; | 731 | rec->scsi_id = scsi_cmnd->device->id; |
732 | rec->scsi_lun = scsi_cmnd->device->lun; | ||
733 | } | ||
734 | rec->scsi_result = scsi_cmnd->result; | ||
735 | rec->scsi_cmnd = (unsigned long)scsi_cmnd; | ||
736 | rec->scsi_serial = scsi_cmnd->serial_number; | ||
737 | memcpy(rec->scsi_opcode, &scsi_cmnd->cmnd, | ||
738 | min((int)scsi_cmnd->cmd_len, | ||
739 | ZFCP_DBF_SCSI_OPCODE)); | ||
740 | rec->scsi_retries = scsi_cmnd->retries; | ||
741 | rec->scsi_allowed = scsi_cmnd->allowed; | ||
733 | } | 742 | } |
734 | rec->scsi_result = scsi_cmnd->result; | ||
735 | rec->scsi_cmnd = (unsigned long)scsi_cmnd; | ||
736 | rec->scsi_serial = scsi_cmnd->serial_number; | ||
737 | memcpy(rec->scsi_opcode, | ||
738 | &scsi_cmnd->cmnd, | ||
739 | min((int)scsi_cmnd->cmd_len, | ||
740 | ZFCP_DBF_SCSI_OPCODE)); | ||
741 | rec->scsi_retries = scsi_cmnd->retries; | ||
742 | rec->scsi_allowed = scsi_cmnd->allowed; | ||
743 | if (fsf_req != NULL) { | 743 | if (fsf_req != NULL) { |
744 | fcp_rsp = (struct fcp_rsp_iu *) | 744 | fcp_rsp = (struct fcp_rsp_iu *) |
745 | &(fsf_req->qtcb->bottom.io.fcp_rsp); | 745 | &(fsf_req->qtcb->bottom.io.fcp_rsp); |
@@ -772,15 +772,8 @@ _zfcp_scsi_dbf_event_common(const char *tag, const char *tag2, int level, | |||
772 | rec->fsf_seqno = fsf_req->seq_no; | 772 | rec->fsf_seqno = fsf_req->seq_no; |
773 | rec->fsf_issued = fsf_req->issued; | 773 | rec->fsf_issued = fsf_req->issued; |
774 | } | 774 | } |
775 | if (new_fsf_req != NULL) { | 775 | rec->type.old_fsf_reqid = |
776 | rec->type.new_fsf_req.fsf_reqid = | 776 | (unsigned long) old_fsf_req; |
777 | (unsigned long) | ||
778 | new_fsf_req; | ||
779 | rec->type.new_fsf_req.fsf_seqno = | ||
780 | new_fsf_req->seq_no; | ||
781 | rec->type.new_fsf_req.fsf_issued = | ||
782 | new_fsf_req->issued; | ||
783 | } | ||
784 | } else { | 777 | } else { |
785 | strncpy(dump->tag, "dump", ZFCP_DBF_TAG_SIZE); | 778 | strncpy(dump->tag, "dump", ZFCP_DBF_TAG_SIZE); |
786 | dump->total_size = buflen; | 779 | dump->total_size = buflen; |
@@ -801,19 +794,21 @@ _zfcp_scsi_dbf_event_common(const char *tag, const char *tag2, int level, | |||
801 | inline void | 794 | inline void |
802 | zfcp_scsi_dbf_event_result(const char *tag, int level, | 795 | zfcp_scsi_dbf_event_result(const char *tag, int level, |
803 | struct zfcp_adapter *adapter, | 796 | struct zfcp_adapter *adapter, |
804 | struct scsi_cmnd *scsi_cmnd) | 797 | struct scsi_cmnd *scsi_cmnd, |
798 | struct zfcp_fsf_req *fsf_req) | ||
805 | { | 799 | { |
806 | _zfcp_scsi_dbf_event_common("rslt", | 800 | _zfcp_scsi_dbf_event_common("rslt", tag, level, |
807 | tag, level, adapter, scsi_cmnd, NULL); | 801 | adapter, scsi_cmnd, fsf_req, NULL); |
808 | } | 802 | } |
809 | 803 | ||
810 | inline void | 804 | inline void |
811 | zfcp_scsi_dbf_event_abort(const char *tag, struct zfcp_adapter *adapter, | 805 | zfcp_scsi_dbf_event_abort(const char *tag, struct zfcp_adapter *adapter, |
812 | struct scsi_cmnd *scsi_cmnd, | 806 | struct scsi_cmnd *scsi_cmnd, |
813 | struct zfcp_fsf_req *new_fsf_req) | 807 | struct zfcp_fsf_req *new_fsf_req, |
808 | struct zfcp_fsf_req *old_fsf_req) | ||
814 | { | 809 | { |
815 | _zfcp_scsi_dbf_event_common("abrt", | 810 | _zfcp_scsi_dbf_event_common("abrt", tag, 1, |
816 | tag, 1, adapter, scsi_cmnd, new_fsf_req); | 811 | adapter, scsi_cmnd, new_fsf_req, old_fsf_req); |
817 | } | 812 | } |
818 | 813 | ||
819 | inline void | 814 | inline void |
@@ -823,7 +818,7 @@ zfcp_scsi_dbf_event_devreset(const char *tag, u8 flag, struct zfcp_unit *unit, | |||
823 | struct zfcp_adapter *adapter = unit->port->adapter; | 818 | struct zfcp_adapter *adapter = unit->port->adapter; |
824 | 819 | ||
825 | _zfcp_scsi_dbf_event_common(flag == FCP_TARGET_RESET ? "trst" : "lrst", | 820 | _zfcp_scsi_dbf_event_common(flag == FCP_TARGET_RESET ? "trst" : "lrst", |
826 | tag, 1, adapter, scsi_cmnd, NULL); | 821 | tag, 1, adapter, scsi_cmnd, NULL, NULL); |
827 | } | 822 | } |
828 | 823 | ||
829 | static int | 824 | static int |
@@ -856,6 +851,10 @@ zfcp_scsi_dbf_view_format(debug_info_t * id, struct debug_view *view, | |||
856 | rec->scsi_retries); | 851 | rec->scsi_retries); |
857 | len += zfcp_dbf_view(out_buf + len, "scsi_allowed", "0x%02x", | 852 | len += zfcp_dbf_view(out_buf + len, "scsi_allowed", "0x%02x", |
858 | rec->scsi_allowed); | 853 | rec->scsi_allowed); |
854 | if (strncmp(rec->tag, "abrt", ZFCP_DBF_TAG_SIZE) == 0) { | ||
855 | len += zfcp_dbf_view(out_buf + len, "old_fsf_reqid", "0x%0Lx", | ||
856 | rec->type.old_fsf_reqid); | ||
857 | } | ||
859 | len += zfcp_dbf_view(out_buf + len, "fsf_reqid", "0x%0Lx", | 858 | len += zfcp_dbf_view(out_buf + len, "fsf_reqid", "0x%0Lx", |
860 | rec->fsf_reqid); | 859 | rec->fsf_reqid); |
861 | len += zfcp_dbf_view(out_buf + len, "fsf_seqno", "0x%08x", | 860 | len += zfcp_dbf_view(out_buf + len, "fsf_seqno", "0x%08x", |
@@ -883,21 +882,6 @@ zfcp_scsi_dbf_view_format(debug_info_t * id, struct debug_view *view, | |||
883 | min((int)rec->type.fcp.sns_info_len, | 882 | min((int)rec->type.fcp.sns_info_len, |
884 | ZFCP_DBF_SCSI_FCP_SNS_INFO), 0, | 883 | ZFCP_DBF_SCSI_FCP_SNS_INFO), 0, |
885 | rec->type.fcp.sns_info_len); | 884 | rec->type.fcp.sns_info_len); |
886 | } else if (strncmp(rec->tag, "abrt", ZFCP_DBF_TAG_SIZE) == 0) { | ||
887 | len += zfcp_dbf_view(out_buf + len, "fsf_reqid_abort", "0x%0Lx", | ||
888 | rec->type.new_fsf_req.fsf_reqid); | ||
889 | len += zfcp_dbf_view(out_buf + len, "fsf_seqno_abort", "0x%08x", | ||
890 | rec->type.new_fsf_req.fsf_seqno); | ||
891 | len += zfcp_dbf_stck(out_buf + len, "fsf_issued", | ||
892 | rec->type.new_fsf_req.fsf_issued); | ||
893 | } else if ((strncmp(rec->tag, "trst", ZFCP_DBF_TAG_SIZE) == 0) || | ||
894 | (strncmp(rec->tag, "lrst", ZFCP_DBF_TAG_SIZE) == 0)) { | ||
895 | len += zfcp_dbf_view(out_buf + len, "fsf_reqid_reset", "0x%0Lx", | ||
896 | rec->type.new_fsf_req.fsf_reqid); | ||
897 | len += zfcp_dbf_view(out_buf + len, "fsf_seqno_reset", "0x%08x", | ||
898 | rec->type.new_fsf_req.fsf_seqno); | ||
899 | len += zfcp_dbf_stck(out_buf + len, "fsf_issued", | ||
900 | rec->type.new_fsf_req.fsf_issued); | ||
901 | } | 885 | } |
902 | 886 | ||
903 | len += sprintf(out_buf + len, "\n"); | 887 | len += sprintf(out_buf + len, "\n"); |
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h index e260d19fa717..7f551d66f47f 100644 --- a/drivers/s390/scsi/zfcp_def.h +++ b/drivers/s390/scsi/zfcp_def.h | |||
@@ -152,11 +152,6 @@ typedef u32 scsi_lun_t; | |||
152 | #define ZFCP_EXCHANGE_CONFIG_DATA_FIRST_SLEEP 100 | 152 | #define ZFCP_EXCHANGE_CONFIG_DATA_FIRST_SLEEP 100 |
153 | #define ZFCP_EXCHANGE_CONFIG_DATA_RETRIES 7 | 153 | #define ZFCP_EXCHANGE_CONFIG_DATA_RETRIES 7 |
154 | 154 | ||
155 | /* Retry 5 times every 2 second, then every minute */ | ||
156 | #define ZFCP_EXCHANGE_PORT_DATA_SHORT_RETRIES 5 | ||
157 | #define ZFCP_EXCHANGE_PORT_DATA_SHORT_SLEEP 200 | ||
158 | #define ZFCP_EXCHANGE_PORT_DATA_LONG_SLEEP 6000 | ||
159 | |||
160 | /* timeout value for "default timer" for fsf requests */ | 155 | /* timeout value for "default timer" for fsf requests */ |
161 | #define ZFCP_FSF_REQUEST_TIMEOUT (60*HZ); | 156 | #define ZFCP_FSF_REQUEST_TIMEOUT (60*HZ); |
162 | 157 | ||
@@ -429,11 +424,7 @@ struct zfcp_scsi_dbf_record { | |||
429 | u32 fsf_seqno; | 424 | u32 fsf_seqno; |
430 | u64 fsf_issued; | 425 | u64 fsf_issued; |
431 | union { | 426 | union { |
432 | struct { | 427 | u64 old_fsf_reqid; |
433 | u64 fsf_reqid; | ||
434 | u32 fsf_seqno; | ||
435 | u64 fsf_issued; | ||
436 | } new_fsf_req; | ||
437 | struct { | 428 | struct { |
438 | u8 rsp_validity; | 429 | u8 rsp_validity; |
439 | u8 rsp_scsi_status; | 430 | u8 rsp_scsi_status; |
@@ -915,8 +906,6 @@ struct zfcp_adapter { | |||
915 | wwn_t peer_wwnn; /* P2P peer WWNN */ | 906 | wwn_t peer_wwnn; /* P2P peer WWNN */ |
916 | wwn_t peer_wwpn; /* P2P peer WWPN */ | 907 | wwn_t peer_wwpn; /* P2P peer WWPN */ |
917 | u32 peer_d_id; /* P2P peer D_ID */ | 908 | u32 peer_d_id; /* P2P peer D_ID */ |
918 | wwn_t physical_wwpn; /* WWPN of physical port */ | ||
919 | u32 physical_s_id; /* local FC port ID */ | ||
920 | struct ccw_device *ccw_device; /* S/390 ccw device */ | 909 | struct ccw_device *ccw_device; /* S/390 ccw device */ |
921 | u8 fc_service_class; | 910 | u8 fc_service_class; |
922 | u32 hydra_version; /* Hydra version */ | 911 | u32 hydra_version; /* Hydra version */ |
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index da947e662031..e3c4bdd29a60 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c | |||
@@ -2246,15 +2246,6 @@ zfcp_erp_adapter_strategy_open_fsf(struct zfcp_erp_action *erp_action) | |||
2246 | { | 2246 | { |
2247 | int retval; | 2247 | int retval; |
2248 | 2248 | ||
2249 | if ((atomic_test_mask(ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED, | ||
2250 | &erp_action->adapter->status)) && | ||
2251 | (erp_action->adapter->adapter_features & | ||
2252 | FSF_FEATURE_HBAAPI_MANAGEMENT)) { | ||
2253 | zfcp_erp_adapter_strategy_open_fsf_xport(erp_action); | ||
2254 | atomic_set(&erp_action->adapter->erp_counter, 0); | ||
2255 | return ZFCP_ERP_FAILED; | ||
2256 | } | ||
2257 | |||
2258 | retval = zfcp_erp_adapter_strategy_open_fsf_xconfig(erp_action); | 2249 | retval = zfcp_erp_adapter_strategy_open_fsf_xconfig(erp_action); |
2259 | if (retval == ZFCP_ERP_FAILED) | 2250 | if (retval == ZFCP_ERP_FAILED) |
2260 | return ZFCP_ERP_FAILED; | 2251 | return ZFCP_ERP_FAILED; |
@@ -2266,13 +2257,6 @@ zfcp_erp_adapter_strategy_open_fsf(struct zfcp_erp_action *erp_action) | |||
2266 | return zfcp_erp_adapter_strategy_open_fsf_statusread(erp_action); | 2257 | return zfcp_erp_adapter_strategy_open_fsf_statusread(erp_action); |
2267 | } | 2258 | } |
2268 | 2259 | ||
2269 | /* | ||
2270 | * function: | ||
2271 | * | ||
2272 | * purpose: | ||
2273 | * | ||
2274 | * returns: | ||
2275 | */ | ||
2276 | static int | 2260 | static int |
2277 | zfcp_erp_adapter_strategy_open_fsf_xconfig(struct zfcp_erp_action *erp_action) | 2261 | zfcp_erp_adapter_strategy_open_fsf_xconfig(struct zfcp_erp_action *erp_action) |
2278 | { | 2262 | { |
@@ -2350,48 +2334,40 @@ static int | |||
2350 | zfcp_erp_adapter_strategy_open_fsf_xport(struct zfcp_erp_action *erp_action) | 2334 | zfcp_erp_adapter_strategy_open_fsf_xport(struct zfcp_erp_action *erp_action) |
2351 | { | 2335 | { |
2352 | int ret; | 2336 | int ret; |
2353 | int retries; | 2337 | struct zfcp_adapter *adapter; |
2354 | int sleep; | ||
2355 | struct zfcp_adapter *adapter = erp_action->adapter; | ||
2356 | 2338 | ||
2339 | adapter = erp_action->adapter; | ||
2357 | atomic_clear_mask(ZFCP_STATUS_ADAPTER_XPORT_OK, &adapter->status); | 2340 | atomic_clear_mask(ZFCP_STATUS_ADAPTER_XPORT_OK, &adapter->status); |
2358 | 2341 | ||
2359 | retries = 0; | 2342 | write_lock(&adapter->erp_lock); |
2360 | do { | 2343 | zfcp_erp_action_to_running(erp_action); |
2361 | write_lock(&adapter->erp_lock); | 2344 | write_unlock(&adapter->erp_lock); |
2362 | zfcp_erp_action_to_running(erp_action); | ||
2363 | write_unlock(&adapter->erp_lock); | ||
2364 | zfcp_erp_timeout_init(erp_action); | ||
2365 | ret = zfcp_fsf_exchange_port_data(erp_action, adapter, NULL); | ||
2366 | if (ret == -EOPNOTSUPP) { | ||
2367 | debug_text_event(adapter->erp_dbf, 3, "a_xport_notsupp"); | ||
2368 | return ZFCP_ERP_SUCCEEDED; | ||
2369 | } else if (ret) { | ||
2370 | debug_text_event(adapter->erp_dbf, 3, "a_xport_failed"); | ||
2371 | return ZFCP_ERP_FAILED; | ||
2372 | } | ||
2373 | debug_text_event(adapter->erp_dbf, 6, "a_xport_ok"); | ||
2374 | 2345 | ||
2375 | down(&adapter->erp_ready_sem); | 2346 | zfcp_erp_timeout_init(erp_action); |
2376 | if (erp_action->status & ZFCP_STATUS_ERP_TIMEDOUT) { | 2347 | ret = zfcp_fsf_exchange_port_data(erp_action, adapter, NULL); |
2377 | ZFCP_LOG_INFO("error: exchange of port data " | 2348 | if (ret == -EOPNOTSUPP) { |
2378 | "for adapter %s timed out\n", | 2349 | debug_text_event(adapter->erp_dbf, 3, "a_xport_notsupp"); |
2379 | zfcp_get_busid_by_adapter(adapter)); | 2350 | return ZFCP_ERP_SUCCEEDED; |
2380 | break; | 2351 | } else if (ret) { |
2381 | } | 2352 | debug_text_event(adapter->erp_dbf, 3, "a_xport_failed"); |
2382 | if (!atomic_test_mask(ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED, | 2353 | return ZFCP_ERP_FAILED; |
2383 | &adapter->status)) | 2354 | } |
2384 | break; | 2355 | debug_text_event(adapter->erp_dbf, 6, "a_xport_ok"); |
2385 | 2356 | ||
2386 | if (retries < ZFCP_EXCHANGE_PORT_DATA_SHORT_RETRIES) { | 2357 | ret = ZFCP_ERP_SUCCEEDED; |
2387 | sleep = ZFCP_EXCHANGE_PORT_DATA_SHORT_SLEEP; | 2358 | down(&adapter->erp_ready_sem); |
2388 | retries++; | 2359 | if (erp_action->status & ZFCP_STATUS_ERP_TIMEDOUT) { |
2389 | } else | 2360 | ZFCP_LOG_INFO("error: exchange port data timed out (adapter " |
2390 | sleep = ZFCP_EXCHANGE_PORT_DATA_LONG_SLEEP; | 2361 | "%s)\n", zfcp_get_busid_by_adapter(adapter)); |
2391 | schedule_timeout(sleep); | 2362 | ret = ZFCP_ERP_FAILED; |
2392 | } while (1); | 2363 | } |
2364 | if (!atomic_test_mask(ZFCP_STATUS_ADAPTER_XPORT_OK, &adapter->status)) { | ||
2365 | ZFCP_LOG_INFO("error: exchange port data failed (adapter " | ||
2366 | "%s\n", zfcp_get_busid_by_adapter(adapter)); | ||
2367 | ret = ZFCP_ERP_FAILED; | ||
2368 | } | ||
2393 | 2369 | ||
2394 | return ZFCP_ERP_SUCCEEDED; | 2370 | return ret; |
2395 | } | 2371 | } |
2396 | 2372 | ||
2397 | /* | 2373 | /* |
@@ -3439,6 +3415,8 @@ zfcp_erp_action_cleanup(int action, struct zfcp_adapter *adapter, | |||
3439 | "(adapter %s, wwpn=0x%016Lx)\n", | 3415 | "(adapter %s, wwpn=0x%016Lx)\n", |
3440 | zfcp_get_busid_by_port(port), | 3416 | zfcp_get_busid_by_port(port), |
3441 | port->wwpn); | 3417 | port->wwpn); |
3418 | else | ||
3419 | scsi_flush_work(adapter->scsi_host); | ||
3442 | } | 3420 | } |
3443 | zfcp_port_put(port); | 3421 | zfcp_port_put(port); |
3444 | break; | 3422 | break; |
diff --git a/drivers/s390/scsi/zfcp_ext.h b/drivers/s390/scsi/zfcp_ext.h index c1ba7cf1b496..700f5402a978 100644 --- a/drivers/s390/scsi/zfcp_ext.h +++ b/drivers/s390/scsi/zfcp_ext.h | |||
@@ -194,9 +194,10 @@ extern void zfcp_san_dbf_event_els_response(struct zfcp_fsf_req *); | |||
194 | extern void zfcp_san_dbf_event_incoming_els(struct zfcp_fsf_req *); | 194 | extern void zfcp_san_dbf_event_incoming_els(struct zfcp_fsf_req *); |
195 | 195 | ||
196 | extern void zfcp_scsi_dbf_event_result(const char *, int, struct zfcp_adapter *, | 196 | extern void zfcp_scsi_dbf_event_result(const char *, int, struct zfcp_adapter *, |
197 | struct scsi_cmnd *); | 197 | struct scsi_cmnd *, |
198 | struct zfcp_fsf_req *); | ||
198 | extern void zfcp_scsi_dbf_event_abort(const char *, struct zfcp_adapter *, | 199 | extern void zfcp_scsi_dbf_event_abort(const char *, struct zfcp_adapter *, |
199 | struct scsi_cmnd *, | 200 | struct scsi_cmnd *, struct zfcp_fsf_req *, |
200 | struct zfcp_fsf_req *); | 201 | struct zfcp_fsf_req *); |
201 | extern void zfcp_scsi_dbf_event_devreset(const char *, u8, struct zfcp_unit *, | 202 | extern void zfcp_scsi_dbf_event_devreset(const char *, u8, struct zfcp_unit *, |
202 | struct scsi_cmnd *); | 203 | struct scsi_cmnd *); |
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 9f0cb3d820c0..662ec571d73b 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c | |||
@@ -388,6 +388,7 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req) | |||
388 | case FSF_PROT_LINK_DOWN: | 388 | case FSF_PROT_LINK_DOWN: |
389 | zfcp_fsf_link_down_info_eval(adapter, | 389 | zfcp_fsf_link_down_info_eval(adapter, |
390 | &prot_status_qual->link_down_info); | 390 | &prot_status_qual->link_down_info); |
391 | zfcp_erp_adapter_reopen(adapter, 0); | ||
391 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 392 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
392 | break; | 393 | break; |
393 | 394 | ||
@@ -558,10 +559,8 @@ zfcp_fsf_link_down_info_eval(struct zfcp_adapter *adapter, | |||
558 | 559 | ||
559 | atomic_set_mask(ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED, &adapter->status); | 560 | atomic_set_mask(ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED, &adapter->status); |
560 | 561 | ||
561 | if (link_down == NULL) { | 562 | if (link_down == NULL) |
562 | zfcp_erp_adapter_reopen(adapter, 0); | 563 | goto out; |
563 | return; | ||
564 | } | ||
565 | 564 | ||
566 | switch (link_down->error_code) { | 565 | switch (link_down->error_code) { |
567 | case FSF_PSQ_LINK_NO_LIGHT: | 566 | case FSF_PSQ_LINK_NO_LIGHT: |
@@ -643,16 +642,8 @@ zfcp_fsf_link_down_info_eval(struct zfcp_adapter *adapter, | |||
643 | link_down->explanation_code, | 642 | link_down->explanation_code, |
644 | link_down->vendor_specific_code); | 643 | link_down->vendor_specific_code); |
645 | 644 | ||
646 | switch (link_down->error_code) { | 645 | out: |
647 | case FSF_PSQ_LINK_NO_LIGHT: | 646 | zfcp_erp_adapter_failed(adapter); |
648 | case FSF_PSQ_LINK_WRAP_PLUG: | ||
649 | case FSF_PSQ_LINK_NO_FCP: | ||
650 | case FSF_PSQ_LINK_FIRMWARE_UPDATE: | ||
651 | zfcp_erp_adapter_reopen(adapter, 0); | ||
652 | break; | ||
653 | default: | ||
654 | zfcp_erp_adapter_failed(adapter); | ||
655 | } | ||
656 | } | 647 | } |
657 | 648 | ||
658 | /* | 649 | /* |
@@ -2304,6 +2295,35 @@ zfcp_fsf_exchange_port_data(struct zfcp_erp_action *erp_action, | |||
2304 | return retval; | 2295 | return retval; |
2305 | } | 2296 | } |
2306 | 2297 | ||
2298 | /** | ||
2299 | * zfcp_fsf_exchange_port_evaluate | ||
2300 | * @fsf_req: fsf_req which belongs to xchg port data request | ||
2301 | * @xchg_ok: specifies if xchg port data was incomplete or complete (0/1) | ||
2302 | */ | ||
2303 | static void | ||
2304 | zfcp_fsf_exchange_port_evaluate(struct zfcp_fsf_req *fsf_req, int xchg_ok) | ||
2305 | { | ||
2306 | struct zfcp_adapter *adapter; | ||
2307 | struct fsf_qtcb *qtcb; | ||
2308 | struct fsf_qtcb_bottom_port *bottom, *data; | ||
2309 | struct Scsi_Host *shost; | ||
2310 | |||
2311 | adapter = fsf_req->adapter; | ||
2312 | qtcb = fsf_req->qtcb; | ||
2313 | bottom = &qtcb->bottom.port; | ||
2314 | shost = adapter->scsi_host; | ||
2315 | |||
2316 | data = (struct fsf_qtcb_bottom_port*) fsf_req->data; | ||
2317 | if (data) | ||
2318 | memcpy(data, bottom, sizeof(struct fsf_qtcb_bottom_port)); | ||
2319 | |||
2320 | if (adapter->connection_features & FSF_FEATURE_NPIV_MODE) | ||
2321 | fc_host_permanent_port_name(shost) = bottom->wwpn; | ||
2322 | else | ||
2323 | fc_host_permanent_port_name(shost) = fc_host_port_name(shost); | ||
2324 | fc_host_maxframe_size(shost) = bottom->maximum_frame_size; | ||
2325 | fc_host_supported_speeds(shost) = bottom->supported_speed; | ||
2326 | } | ||
2307 | 2327 | ||
2308 | /** | 2328 | /** |
2309 | * zfcp_fsf_exchange_port_data_handler - handler for exchange_port_data request | 2329 | * zfcp_fsf_exchange_port_data_handler - handler for exchange_port_data request |
@@ -2312,38 +2332,26 @@ zfcp_fsf_exchange_port_data(struct zfcp_erp_action *erp_action, | |||
2312 | static void | 2332 | static void |
2313 | zfcp_fsf_exchange_port_data_handler(struct zfcp_fsf_req *fsf_req) | 2333 | zfcp_fsf_exchange_port_data_handler(struct zfcp_fsf_req *fsf_req) |
2314 | { | 2334 | { |
2315 | struct zfcp_adapter *adapter = fsf_req->adapter; | 2335 | struct zfcp_adapter *adapter; |
2316 | struct Scsi_Host *shost = adapter->scsi_host; | 2336 | struct fsf_qtcb *qtcb; |
2317 | struct fsf_qtcb *qtcb = fsf_req->qtcb; | 2337 | |
2318 | struct fsf_qtcb_bottom_port *bottom, *data; | 2338 | adapter = fsf_req->adapter; |
2339 | qtcb = fsf_req->qtcb; | ||
2319 | 2340 | ||
2320 | if (fsf_req->status & ZFCP_STATUS_FSFREQ_ERROR) | 2341 | if (fsf_req->status & ZFCP_STATUS_FSFREQ_ERROR) |
2321 | return; | 2342 | return; |
2322 | 2343 | ||
2323 | switch (qtcb->header.fsf_status) { | 2344 | switch (qtcb->header.fsf_status) { |
2324 | case FSF_GOOD: | 2345 | case FSF_GOOD: |
2346 | zfcp_fsf_exchange_port_evaluate(fsf_req, 1); | ||
2325 | atomic_set_mask(ZFCP_STATUS_ADAPTER_XPORT_OK, &adapter->status); | 2347 | atomic_set_mask(ZFCP_STATUS_ADAPTER_XPORT_OK, &adapter->status); |
2326 | |||
2327 | bottom = &qtcb->bottom.port; | ||
2328 | data = (struct fsf_qtcb_bottom_port*) fsf_req->data; | ||
2329 | if (data) | ||
2330 | memcpy(data, bottom, sizeof(struct fsf_qtcb_bottom_port)); | ||
2331 | if (adapter->connection_features & FSF_FEATURE_NPIV_MODE) | ||
2332 | fc_host_permanent_port_name(shost) = bottom->wwpn; | ||
2333 | else | ||
2334 | fc_host_permanent_port_name(shost) = | ||
2335 | fc_host_port_name(shost); | ||
2336 | fc_host_maxframe_size(shost) = bottom->maximum_frame_size; | ||
2337 | fc_host_supported_speeds(shost) = bottom->supported_speed; | ||
2338 | break; | 2348 | break; |
2339 | |||
2340 | case FSF_EXCHANGE_CONFIG_DATA_INCOMPLETE: | 2349 | case FSF_EXCHANGE_CONFIG_DATA_INCOMPLETE: |
2350 | zfcp_fsf_exchange_port_evaluate(fsf_req, 0); | ||
2341 | atomic_set_mask(ZFCP_STATUS_ADAPTER_XPORT_OK, &adapter->status); | 2351 | atomic_set_mask(ZFCP_STATUS_ADAPTER_XPORT_OK, &adapter->status); |
2342 | |||
2343 | zfcp_fsf_link_down_info_eval(adapter, | 2352 | zfcp_fsf_link_down_info_eval(adapter, |
2344 | &qtcb->header.fsf_status_qual.link_down_info); | 2353 | &qtcb->header.fsf_status_qual.link_down_info); |
2345 | break; | 2354 | break; |
2346 | |||
2347 | default: | 2355 | default: |
2348 | debug_text_event(adapter->erp_dbf, 0, "xchg-port-ng"); | 2356 | debug_text_event(adapter->erp_dbf, 0, "xchg-port-ng"); |
2349 | debug_event(adapter->erp_dbf, 0, | 2357 | debug_event(adapter->erp_dbf, 0, |
@@ -4203,11 +4211,11 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req) | |||
4203 | ZFCP_LOG_DEBUG("scpnt->result =0x%x\n", scpnt->result); | 4211 | ZFCP_LOG_DEBUG("scpnt->result =0x%x\n", scpnt->result); |
4204 | 4212 | ||
4205 | if (scpnt->result != 0) | 4213 | if (scpnt->result != 0) |
4206 | zfcp_scsi_dbf_event_result("erro", 3, fsf_req->adapter, scpnt); | 4214 | zfcp_scsi_dbf_event_result("erro", 3, fsf_req->adapter, scpnt, fsf_req); |
4207 | else if (scpnt->retries > 0) | 4215 | else if (scpnt->retries > 0) |
4208 | zfcp_scsi_dbf_event_result("retr", 4, fsf_req->adapter, scpnt); | 4216 | zfcp_scsi_dbf_event_result("retr", 4, fsf_req->adapter, scpnt, fsf_req); |
4209 | else | 4217 | else |
4210 | zfcp_scsi_dbf_event_result("norm", 6, fsf_req->adapter, scpnt); | 4218 | zfcp_scsi_dbf_event_result("norm", 6, fsf_req->adapter, scpnt, fsf_req); |
4211 | 4219 | ||
4212 | /* cleanup pointer (need this especially for abort) */ | 4220 | /* cleanup pointer (need this especially for abort) */ |
4213 | scpnt->host_scribble = NULL; | 4221 | scpnt->host_scribble = NULL; |
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index e0803757c0fa..9f6b4d7a46f3 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c | |||
@@ -242,7 +242,7 @@ zfcp_scsi_command_fail(struct scsi_cmnd *scpnt, int result) | |||
242 | if ((scpnt->device != NULL) && (scpnt->device->host != NULL)) | 242 | if ((scpnt->device != NULL) && (scpnt->device->host != NULL)) |
243 | zfcp_scsi_dbf_event_result("fail", 4, | 243 | zfcp_scsi_dbf_event_result("fail", 4, |
244 | (struct zfcp_adapter*) scpnt->device->host->hostdata[0], | 244 | (struct zfcp_adapter*) scpnt->device->host->hostdata[0], |
245 | scpnt); | 245 | scpnt, NULL); |
246 | /* return directly */ | 246 | /* return directly */ |
247 | scpnt->scsi_done(scpnt); | 247 | scpnt->scsi_done(scpnt); |
248 | } | 248 | } |
@@ -446,7 +446,7 @@ zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt) | |||
446 | old_fsf_req = (struct zfcp_fsf_req *) scpnt->host_scribble; | 446 | old_fsf_req = (struct zfcp_fsf_req *) scpnt->host_scribble; |
447 | if (!old_fsf_req) { | 447 | if (!old_fsf_req) { |
448 | write_unlock_irqrestore(&adapter->abort_lock, flags); | 448 | write_unlock_irqrestore(&adapter->abort_lock, flags); |
449 | zfcp_scsi_dbf_event_abort("lte1", adapter, scpnt, new_fsf_req); | 449 | zfcp_scsi_dbf_event_abort("lte1", adapter, scpnt, NULL, NULL); |
450 | retval = SUCCESS; | 450 | retval = SUCCESS; |
451 | goto out; | 451 | goto out; |
452 | } | 452 | } |
@@ -460,6 +460,8 @@ zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt) | |||
460 | adapter, unit, 0); | 460 | adapter, unit, 0); |
461 | if (!new_fsf_req) { | 461 | if (!new_fsf_req) { |
462 | ZFCP_LOG_INFO("error: initiation of Abort FCP Cmnd failed\n"); | 462 | ZFCP_LOG_INFO("error: initiation of Abort FCP Cmnd failed\n"); |
463 | zfcp_scsi_dbf_event_abort("nres", adapter, scpnt, NULL, | ||
464 | old_fsf_req); | ||
463 | retval = FAILED; | 465 | retval = FAILED; |
464 | goto out; | 466 | goto out; |
465 | } | 467 | } |
@@ -470,13 +472,16 @@ zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt) | |||
470 | 472 | ||
471 | /* status should be valid since signals were not permitted */ | 473 | /* status should be valid since signals were not permitted */ |
472 | if (new_fsf_req->status & ZFCP_STATUS_FSFREQ_ABORTSUCCEEDED) { | 474 | if (new_fsf_req->status & ZFCP_STATUS_FSFREQ_ABORTSUCCEEDED) { |
473 | zfcp_scsi_dbf_event_abort("okay", adapter, scpnt, new_fsf_req); | 475 | zfcp_scsi_dbf_event_abort("okay", adapter, scpnt, new_fsf_req, |
476 | NULL); | ||
474 | retval = SUCCESS; | 477 | retval = SUCCESS; |
475 | } else if (new_fsf_req->status & ZFCP_STATUS_FSFREQ_ABORTNOTNEEDED) { | 478 | } else if (new_fsf_req->status & ZFCP_STATUS_FSFREQ_ABORTNOTNEEDED) { |
476 | zfcp_scsi_dbf_event_abort("lte2", adapter, scpnt, new_fsf_req); | 479 | zfcp_scsi_dbf_event_abort("lte2", adapter, scpnt, new_fsf_req, |
480 | NULL); | ||
477 | retval = SUCCESS; | 481 | retval = SUCCESS; |
478 | } else { | 482 | } else { |
479 | zfcp_scsi_dbf_event_abort("fail", adapter, scpnt, new_fsf_req); | 483 | zfcp_scsi_dbf_event_abort("fail", adapter, scpnt, new_fsf_req, |
484 | NULL); | ||
480 | retval = FAILED; | 485 | retval = FAILED; |
481 | } | 486 | } |
482 | zfcp_fsf_req_free(new_fsf_req); | 487 | zfcp_fsf_req_free(new_fsf_req); |
diff --git a/drivers/s390/scsi/zfcp_sysfs_adapter.c b/drivers/s390/scsi/zfcp_sysfs_adapter.c index dfc07370f412..b29ac25e07f3 100644 --- a/drivers/s390/scsi/zfcp_sysfs_adapter.c +++ b/drivers/s390/scsi/zfcp_sysfs_adapter.c | |||
@@ -55,8 +55,6 @@ ZFCP_DEFINE_ADAPTER_ATTR(status, "0x%08x\n", atomic_read(&adapter->status)); | |||
55 | ZFCP_DEFINE_ADAPTER_ATTR(peer_wwnn, "0x%016llx\n", adapter->peer_wwnn); | 55 | ZFCP_DEFINE_ADAPTER_ATTR(peer_wwnn, "0x%016llx\n", adapter->peer_wwnn); |
56 | ZFCP_DEFINE_ADAPTER_ATTR(peer_wwpn, "0x%016llx\n", adapter->peer_wwpn); | 56 | ZFCP_DEFINE_ADAPTER_ATTR(peer_wwpn, "0x%016llx\n", adapter->peer_wwpn); |
57 | ZFCP_DEFINE_ADAPTER_ATTR(peer_d_id, "0x%06x\n", adapter->peer_d_id); | 57 | ZFCP_DEFINE_ADAPTER_ATTR(peer_d_id, "0x%06x\n", adapter->peer_d_id); |
58 | ZFCP_DEFINE_ADAPTER_ATTR(physical_wwpn, "0x%016llx\n", adapter->physical_wwpn); | ||
59 | ZFCP_DEFINE_ADAPTER_ATTR(physical_s_id, "0x%06x\n", adapter->physical_s_id); | ||
60 | ZFCP_DEFINE_ADAPTER_ATTR(card_version, "0x%04x\n", adapter->hydra_version); | 58 | ZFCP_DEFINE_ADAPTER_ATTR(card_version, "0x%04x\n", adapter->hydra_version); |
61 | ZFCP_DEFINE_ADAPTER_ATTR(lic_version, "0x%08x\n", adapter->fsf_lic_version); | 59 | ZFCP_DEFINE_ADAPTER_ATTR(lic_version, "0x%08x\n", adapter->fsf_lic_version); |
62 | ZFCP_DEFINE_ADAPTER_ATTR(hardware_version, "0x%08x\n", | 60 | ZFCP_DEFINE_ADAPTER_ATTR(hardware_version, "0x%08x\n", |
@@ -241,8 +239,6 @@ static struct attribute *zfcp_adapter_attrs[] = { | |||
241 | &dev_attr_peer_wwnn.attr, | 239 | &dev_attr_peer_wwnn.attr, |
242 | &dev_attr_peer_wwpn.attr, | 240 | &dev_attr_peer_wwpn.attr, |
243 | &dev_attr_peer_d_id.attr, | 241 | &dev_attr_peer_d_id.attr, |
244 | &dev_attr_physical_wwpn.attr, | ||
245 | &dev_attr_physical_s_id.attr, | ||
246 | &dev_attr_card_version.attr, | 242 | &dev_attr_card_version.attr, |
247 | &dev_attr_lic_version.attr, | 243 | &dev_attr_lic_version.attr, |
248 | &dev_attr_status.attr, | 244 | &dev_attr_status.attr, |