diff options
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/block/dasd.c | 5 | ||||
-rw-r--r-- | drivers/s390/char/sclp_cmd.c | 3 | ||||
-rw-r--r-- | drivers/s390/char/tape_block.c | 6 | ||||
-rw-r--r-- | drivers/s390/char/tape_core.c | 8 | ||||
-rw-r--r-- | drivers/s390/cio/device.c | 4 | ||||
-rw-r--r-- | drivers/s390/cio/qdio_debug.c | 19 | ||||
-rw-r--r-- | drivers/s390/cio/qdio_main.c | 1 | ||||
-rw-r--r-- | drivers/s390/kvm/kvm_virtio.c | 4 | ||||
-rw-r--r-- | drivers/s390/net/qeth_core_main.c | 3 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l2_main.c | 27 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l3_main.c | 13 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l3_sys.c | 7 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_aux.c | 3 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_ccw.c | 4 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_dbf.c | 42 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_dbf.h | 8 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_erp.c | 1 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_fsf.c | 23 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_scsi.c | 12 |
19 files changed, 78 insertions, 115 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 4b76fca64a6f..363bd1303d21 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -1746,6 +1746,11 @@ restart: | |||
1746 | goto restart; | 1746 | goto restart; |
1747 | } | 1747 | } |
1748 | 1748 | ||
1749 | /* log sense for fatal error */ | ||
1750 | if (cqr->status == DASD_CQR_FAILED) { | ||
1751 | dasd_log_sense(cqr, &cqr->irb); | ||
1752 | } | ||
1753 | |||
1749 | /* First of all call extended error reporting. */ | 1754 | /* First of all call extended error reporting. */ |
1750 | if (dasd_eer_enabled(base) && | 1755 | if (dasd_eer_enabled(base) && |
1751 | cqr->status == DASD_CQR_FAILED) { | 1756 | cqr->status == DASD_CQR_FAILED) { |
diff --git a/drivers/s390/char/sclp_cmd.c b/drivers/s390/char/sclp_cmd.c index eb5f1b8bc57f..ec9c0bcf66ee 100644 --- a/drivers/s390/char/sclp_cmd.c +++ b/drivers/s390/char/sclp_cmd.c | |||
@@ -324,6 +324,9 @@ static int do_assign_storage(sclp_cmdw_t cmd, u16 rn) | |||
324 | case 0x0120: | 324 | case 0x0120: |
325 | break; | 325 | break; |
326 | default: | 326 | default: |
327 | pr_warning("assign storage failed (cmd=0x%08x, " | ||
328 | "response=0x%04x, rn=0x%04x)\n", cmd, | ||
329 | sccb->header.response_code, rn); | ||
327 | rc = -EIO; | 330 | rc = -EIO; |
328 | break; | 331 | break; |
329 | } | 332 | } |
diff --git a/drivers/s390/char/tape_block.c b/drivers/s390/char/tape_block.c index 023803dbb0c7..ae18baf59f06 100644 --- a/drivers/s390/char/tape_block.c +++ b/drivers/s390/char/tape_block.c | |||
@@ -76,7 +76,7 @@ tapeblock_trigger_requeue(struct tape_device *device) | |||
76 | static void | 76 | static void |
77 | tapeblock_end_request(struct request *req, int error) | 77 | tapeblock_end_request(struct request *req, int error) |
78 | { | 78 | { |
79 | if (__blk_end_request(req, error, blk_rq_bytes(req))) | 79 | if (blk_end_request(req, error, blk_rq_bytes(req))) |
80 | BUG(); | 80 | BUG(); |
81 | } | 81 | } |
82 | 82 | ||
@@ -166,7 +166,7 @@ tapeblock_requeue(struct work_struct *work) { | |||
166 | nr_queued++; | 166 | nr_queued++; |
167 | spin_unlock(get_ccwdev_lock(device->cdev)); | 167 | spin_unlock(get_ccwdev_lock(device->cdev)); |
168 | 168 | ||
169 | spin_lock(&device->blk_data.request_queue_lock); | 169 | spin_lock_irq(&device->blk_data.request_queue_lock); |
170 | while ( | 170 | while ( |
171 | !blk_queue_plugged(queue) && | 171 | !blk_queue_plugged(queue) && |
172 | elv_next_request(queue) && | 172 | elv_next_request(queue) && |
@@ -176,7 +176,9 @@ tapeblock_requeue(struct work_struct *work) { | |||
176 | if (rq_data_dir(req) == WRITE) { | 176 | if (rq_data_dir(req) == WRITE) { |
177 | DBF_EVENT(1, "TBLOCK: Rejecting write request\n"); | 177 | DBF_EVENT(1, "TBLOCK: Rejecting write request\n"); |
178 | blkdev_dequeue_request(req); | 178 | blkdev_dequeue_request(req); |
179 | spin_unlock_irq(&device->blk_data.request_queue_lock); | ||
179 | tapeblock_end_request(req, -EIO); | 180 | tapeblock_end_request(req, -EIO); |
181 | spin_lock_irq(&device->blk_data.request_queue_lock); | ||
180 | continue; | 182 | continue; |
181 | } | 183 | } |
182 | blkdev_dequeue_request(req); | 184 | blkdev_dequeue_request(req); |
diff --git a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c index d7073dbf825c..f9bb51fa7f5b 100644 --- a/drivers/s390/char/tape_core.c +++ b/drivers/s390/char/tape_core.c | |||
@@ -1200,7 +1200,7 @@ tape_open(struct tape_device *device) | |||
1200 | { | 1200 | { |
1201 | int rc; | 1201 | int rc; |
1202 | 1202 | ||
1203 | spin_lock(get_ccwdev_lock(device->cdev)); | 1203 | spin_lock_irq(get_ccwdev_lock(device->cdev)); |
1204 | if (device->tape_state == TS_NOT_OPER) { | 1204 | if (device->tape_state == TS_NOT_OPER) { |
1205 | DBF_EVENT(6, "TAPE:nodev\n"); | 1205 | DBF_EVENT(6, "TAPE:nodev\n"); |
1206 | rc = -ENODEV; | 1206 | rc = -ENODEV; |
@@ -1218,7 +1218,7 @@ tape_open(struct tape_device *device) | |||
1218 | tape_state_set(device, TS_IN_USE); | 1218 | tape_state_set(device, TS_IN_USE); |
1219 | rc = 0; | 1219 | rc = 0; |
1220 | } | 1220 | } |
1221 | spin_unlock(get_ccwdev_lock(device->cdev)); | 1221 | spin_unlock_irq(get_ccwdev_lock(device->cdev)); |
1222 | return rc; | 1222 | return rc; |
1223 | } | 1223 | } |
1224 | 1224 | ||
@@ -1228,11 +1228,11 @@ tape_open(struct tape_device *device) | |||
1228 | int | 1228 | int |
1229 | tape_release(struct tape_device *device) | 1229 | tape_release(struct tape_device *device) |
1230 | { | 1230 | { |
1231 | spin_lock(get_ccwdev_lock(device->cdev)); | 1231 | spin_lock_irq(get_ccwdev_lock(device->cdev)); |
1232 | if (device->tape_state == TS_IN_USE) | 1232 | if (device->tape_state == TS_IN_USE) |
1233 | tape_state_set(device, TS_UNUSED); | 1233 | tape_state_set(device, TS_UNUSED); |
1234 | module_put(device->discipline->owner); | 1234 | module_put(device->discipline->owner); |
1235 | spin_unlock(get_ccwdev_lock(device->cdev)); | 1235 | spin_unlock_irq(get_ccwdev_lock(device->cdev)); |
1236 | return 0; | 1236 | return 0; |
1237 | } | 1237 | } |
1238 | 1238 | ||
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index 4e78c82194b4..4e4008325e28 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
@@ -874,11 +874,15 @@ void ccw_device_move_to_orphanage(struct work_struct *work) | |||
874 | replacing_cdev = get_disc_ccwdev_by_dev_id(&dev_id, cdev); | 874 | replacing_cdev = get_disc_ccwdev_by_dev_id(&dev_id, cdev); |
875 | if (replacing_cdev) { | 875 | if (replacing_cdev) { |
876 | sch_attach_disconnected_device(sch, replacing_cdev); | 876 | sch_attach_disconnected_device(sch, replacing_cdev); |
877 | /* Release reference from get_disc_ccwdev_by_dev_id() */ | ||
878 | put_device(&cdev->dev); | ||
877 | return; | 879 | return; |
878 | } | 880 | } |
879 | replacing_cdev = get_orphaned_ccwdev_by_dev_id(css, &dev_id); | 881 | replacing_cdev = get_orphaned_ccwdev_by_dev_id(css, &dev_id); |
880 | if (replacing_cdev) { | 882 | if (replacing_cdev) { |
881 | sch_attach_orphaned_device(sch, replacing_cdev); | 883 | sch_attach_orphaned_device(sch, replacing_cdev); |
884 | /* Release reference from get_orphaned_ccwdev_by_dev_id() */ | ||
885 | put_device(&cdev->dev); | ||
882 | return; | 886 | return; |
883 | } | 887 | } |
884 | sch_create_and_recog_new_device(sch); | 888 | sch_create_and_recog_new_device(sch); |
diff --git a/drivers/s390/cio/qdio_debug.c b/drivers/s390/cio/qdio_debug.c index b5390821434f..f05590355be8 100644 --- a/drivers/s390/cio/qdio_debug.c +++ b/drivers/s390/cio/qdio_debug.c | |||
@@ -20,6 +20,7 @@ static struct dentry *debugfs_root; | |||
20 | #define MAX_DEBUGFS_QUEUES 32 | 20 | #define MAX_DEBUGFS_QUEUES 32 |
21 | static struct dentry *debugfs_queues[MAX_DEBUGFS_QUEUES] = { NULL }; | 21 | static struct dentry *debugfs_queues[MAX_DEBUGFS_QUEUES] = { NULL }; |
22 | static DEFINE_MUTEX(debugfs_mutex); | 22 | static DEFINE_MUTEX(debugfs_mutex); |
23 | #define QDIO_DEBUGFS_NAME_LEN 40 | ||
23 | 24 | ||
24 | void qdio_allocate_do_dbf(struct qdio_initialize *init_data) | 25 | void qdio_allocate_do_dbf(struct qdio_initialize *init_data) |
25 | { | 26 | { |
@@ -152,17 +153,6 @@ static int qstat_seq_open(struct inode *inode, struct file *filp) | |||
152 | filp->f_path.dentry->d_inode->i_private); | 153 | filp->f_path.dentry->d_inode->i_private); |
153 | } | 154 | } |
154 | 155 | ||
155 | static void get_queue_name(struct qdio_q *q, struct ccw_device *cdev, char *name) | ||
156 | { | ||
157 | memset(name, 0, sizeof(name)); | ||
158 | sprintf(name, "%s", dev_name(&cdev->dev)); | ||
159 | if (q->is_input_q) | ||
160 | sprintf(name + strlen(name), "_input"); | ||
161 | else | ||
162 | sprintf(name + strlen(name), "_output"); | ||
163 | sprintf(name + strlen(name), "_%d", q->nr); | ||
164 | } | ||
165 | |||
166 | static void remove_debugfs_entry(struct qdio_q *q) | 156 | static void remove_debugfs_entry(struct qdio_q *q) |
167 | { | 157 | { |
168 | int i; | 158 | int i; |
@@ -189,14 +179,17 @@ static struct file_operations debugfs_fops = { | |||
189 | static void setup_debugfs_entry(struct qdio_q *q, struct ccw_device *cdev) | 179 | static void setup_debugfs_entry(struct qdio_q *q, struct ccw_device *cdev) |
190 | { | 180 | { |
191 | int i = 0; | 181 | int i = 0; |
192 | char name[40]; | 182 | char name[QDIO_DEBUGFS_NAME_LEN]; |
193 | 183 | ||
194 | while (debugfs_queues[i] != NULL) { | 184 | while (debugfs_queues[i] != NULL) { |
195 | i++; | 185 | i++; |
196 | if (i >= MAX_DEBUGFS_QUEUES) | 186 | if (i >= MAX_DEBUGFS_QUEUES) |
197 | return; | 187 | return; |
198 | } | 188 | } |
199 | get_queue_name(q, cdev, name); | 189 | snprintf(name, QDIO_DEBUGFS_NAME_LEN, "%s_%s_%d", |
190 | dev_name(&cdev->dev), | ||
191 | q->is_input_q ? "input" : "output", | ||
192 | q->nr); | ||
200 | debugfs_queues[i] = debugfs_create_file(name, S_IFREG | S_IRUGO | S_IWUSR, | 193 | debugfs_queues[i] = debugfs_create_file(name, S_IFREG | S_IRUGO | S_IWUSR, |
201 | debugfs_root, q, &debugfs_fops); | 194 | debugfs_root, q, &debugfs_fops); |
202 | } | 195 | } |
diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c index a50682d2a0fa..7c8659151993 100644 --- a/drivers/s390/cio/qdio_main.c +++ b/drivers/s390/cio/qdio_main.c | |||
@@ -1083,7 +1083,6 @@ void qdio_int_handler(struct ccw_device *cdev, unsigned long intparm, | |||
1083 | case -EIO: | 1083 | case -EIO: |
1084 | sprintf(dbf_text, "ierr%4x", irq_ptr->schid.sch_no); | 1084 | sprintf(dbf_text, "ierr%4x", irq_ptr->schid.sch_no); |
1085 | QDIO_DBF_TEXT2(1, setup, dbf_text); | 1085 | QDIO_DBF_TEXT2(1, setup, dbf_text); |
1086 | qdio_int_error(cdev); | ||
1087 | return; | 1086 | return; |
1088 | case -ETIMEDOUT: | 1087 | case -ETIMEDOUT: |
1089 | sprintf(dbf_text, "qtoh%4x", irq_ptr->schid.sch_no); | 1088 | sprintf(dbf_text, "qtoh%4x", irq_ptr->schid.sch_no); |
diff --git a/drivers/s390/kvm/kvm_virtio.c b/drivers/s390/kvm/kvm_virtio.c index ff4a6931bb8e..3d442444c618 100644 --- a/drivers/s390/kvm/kvm_virtio.c +++ b/drivers/s390/kvm/kvm_virtio.c | |||
@@ -322,13 +322,13 @@ static int __init kvm_devices_init(void) | |||
322 | return rc; | 322 | return rc; |
323 | } | 323 | } |
324 | 324 | ||
325 | rc = vmem_add_mapping(PFN_PHYS(max_pfn), PAGE_SIZE); | 325 | rc = vmem_add_mapping(real_memory_size, PAGE_SIZE); |
326 | if (rc) { | 326 | if (rc) { |
327 | s390_root_dev_unregister(kvm_root); | 327 | s390_root_dev_unregister(kvm_root); |
328 | return rc; | 328 | return rc; |
329 | } | 329 | } |
330 | 330 | ||
331 | kvm_devices = (void *) PFN_PHYS(max_pfn); | 331 | kvm_devices = (void *) real_memory_size; |
332 | 332 | ||
333 | ctl_set_bit(0, 9); | 333 | ctl_set_bit(0, 9); |
334 | register_external_interrupt(0x2603, kvm_extint_handler); | 334 | register_external_interrupt(0x2603, kvm_extint_handler); |
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 7de410d5be4a..52d26592c72c 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c | |||
@@ -3025,7 +3025,7 @@ static inline void __qeth_fill_buffer(struct sk_buff *skb, | |||
3025 | struct qdio_buffer *buffer, int is_tso, int *next_element_to_fill, | 3025 | struct qdio_buffer *buffer, int is_tso, int *next_element_to_fill, |
3026 | int offset) | 3026 | int offset) |
3027 | { | 3027 | { |
3028 | int length = skb->len - offset; | 3028 | int length = skb->len; |
3029 | int length_here; | 3029 | int length_here; |
3030 | int element; | 3030 | int element; |
3031 | char *data; | 3031 | char *data; |
@@ -3037,6 +3037,7 @@ static inline void __qeth_fill_buffer(struct sk_buff *skb, | |||
3037 | 3037 | ||
3038 | if (offset >= 0) { | 3038 | if (offset >= 0) { |
3039 | data = skb->data + offset; | 3039 | data = skb->data + offset; |
3040 | length -= offset; | ||
3040 | first_lap = 0; | 3041 | first_lap = 0; |
3041 | } | 3042 | } |
3042 | 3043 | ||
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index 955ba7a31b90..1b1e80336d2c 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c | |||
@@ -373,8 +373,6 @@ static int qeth_l2_stop_card(struct qeth_card *card, int recovery_mode) | |||
373 | QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *)); | 373 | QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *)); |
374 | 374 | ||
375 | qeth_set_allowed_threads(card, 0, 1); | 375 | qeth_set_allowed_threads(card, 0, 1); |
376 | if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)) | ||
377 | return -ERESTARTSYS; | ||
378 | if (card->read.state == CH_STATE_UP && | 376 | if (card->read.state == CH_STATE_UP && |
379 | card->write.state == CH_STATE_UP && | 377 | card->write.state == CH_STATE_UP && |
380 | (card->state == CARD_STATE_UP)) { | 378 | (card->state == CARD_STATE_UP)) { |
@@ -451,12 +449,15 @@ static void qeth_l2_process_inbound_buffer(struct qeth_card *card, | |||
451 | netif_rx(skb); | 449 | netif_rx(skb); |
452 | break; | 450 | break; |
453 | case QETH_HEADER_TYPE_OSN: | 451 | case QETH_HEADER_TYPE_OSN: |
454 | skb_push(skb, sizeof(struct qeth_hdr)); | 452 | if (card->info.type == QETH_CARD_TYPE_OSN) { |
455 | skb_copy_to_linear_data(skb, hdr, | 453 | skb_push(skb, sizeof(struct qeth_hdr)); |
454 | skb_copy_to_linear_data(skb, hdr, | ||
456 | sizeof(struct qeth_hdr)); | 455 | sizeof(struct qeth_hdr)); |
457 | len = skb->len; | 456 | len = skb->len; |
458 | card->osn_info.data_cb(skb); | 457 | card->osn_info.data_cb(skb); |
459 | break; | 458 | break; |
459 | } | ||
460 | /* else unknown */ | ||
460 | default: | 461 | default: |
461 | dev_kfree_skb_any(skb); | 462 | dev_kfree_skb_any(skb); |
462 | QETH_DBF_TEXT(TRACE, 3, "inbunkno"); | 463 | QETH_DBF_TEXT(TRACE, 3, "inbunkno"); |
@@ -975,12 +976,6 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode) | |||
975 | QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *)); | 976 | QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *)); |
976 | 977 | ||
977 | qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1); | 978 | qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1); |
978 | if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)) { | ||
979 | PRINT_WARN("set_online of card %s interrupted by user!\n", | ||
980 | CARD_BUS_ID(card)); | ||
981 | return -ERESTARTSYS; | ||
982 | } | ||
983 | |||
984 | recover_flag = card->state; | 979 | recover_flag = card->state; |
985 | rc = ccw_device_set_online(CARD_RDEV(card)); | 980 | rc = ccw_device_set_online(CARD_RDEV(card)); |
986 | if (rc) { | 981 | if (rc) { |
@@ -1091,11 +1086,7 @@ static int __qeth_l2_set_offline(struct ccwgroup_device *cgdev, | |||
1091 | if (card->dev && netif_carrier_ok(card->dev)) | 1086 | if (card->dev && netif_carrier_ok(card->dev)) |
1092 | netif_carrier_off(card->dev); | 1087 | netif_carrier_off(card->dev); |
1093 | recover_flag = card->state; | 1088 | recover_flag = card->state; |
1094 | if (qeth_l2_stop_card(card, recovery_mode) == -ERESTARTSYS) { | 1089 | qeth_l2_stop_card(card, recovery_mode); |
1095 | PRINT_WARN("Stopping card %s interrupted by user!\n", | ||
1096 | CARD_BUS_ID(card)); | ||
1097 | return -ERESTARTSYS; | ||
1098 | } | ||
1099 | rc = ccw_device_set_offline(CARD_DDEV(card)); | 1090 | rc = ccw_device_set_offline(CARD_DDEV(card)); |
1100 | rc2 = ccw_device_set_offline(CARD_WDEV(card)); | 1091 | rc2 = ccw_device_set_offline(CARD_WDEV(card)); |
1101 | rc3 = ccw_device_set_offline(CARD_RDEV(card)); | 1092 | rc3 = ccw_device_set_offline(CARD_RDEV(card)); |
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index 99547dea44de..ed59fedd5922 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c | |||
@@ -2064,8 +2064,6 @@ static int qeth_l3_stop_card(struct qeth_card *card, int recovery_mode) | |||
2064 | QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *)); | 2064 | QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *)); |
2065 | 2065 | ||
2066 | qeth_set_allowed_threads(card, 0, 1); | 2066 | qeth_set_allowed_threads(card, 0, 1); |
2067 | if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)) | ||
2068 | return -ERESTARTSYS; | ||
2069 | if (card->read.state == CH_STATE_UP && | 2067 | if (card->read.state == CH_STATE_UP && |
2070 | card->write.state == CH_STATE_UP && | 2068 | card->write.state == CH_STATE_UP && |
2071 | (card->state == CARD_STATE_UP)) { | 2069 | (card->state == CARD_STATE_UP)) { |
@@ -3049,11 +3047,6 @@ static int __qeth_l3_set_online(struct ccwgroup_device *gdev, int recovery_mode) | |||
3049 | QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *)); | 3047 | QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *)); |
3050 | 3048 | ||
3051 | qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1); | 3049 | qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1); |
3052 | if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)) { | ||
3053 | PRINT_WARN("set_online of card %s interrupted by user!\n", | ||
3054 | CARD_BUS_ID(card)); | ||
3055 | return -ERESTARTSYS; | ||
3056 | } | ||
3057 | 3050 | ||
3058 | recover_flag = card->state; | 3051 | recover_flag = card->state; |
3059 | rc = ccw_device_set_online(CARD_RDEV(card)); | 3052 | rc = ccw_device_set_online(CARD_RDEV(card)); |
@@ -3170,11 +3163,7 @@ static int __qeth_l3_set_offline(struct ccwgroup_device *cgdev, | |||
3170 | if (card->dev && netif_carrier_ok(card->dev)) | 3163 | if (card->dev && netif_carrier_ok(card->dev)) |
3171 | netif_carrier_off(card->dev); | 3164 | netif_carrier_off(card->dev); |
3172 | recover_flag = card->state; | 3165 | recover_flag = card->state; |
3173 | if (qeth_l3_stop_card(card, recovery_mode) == -ERESTARTSYS) { | 3166 | qeth_l3_stop_card(card, recovery_mode); |
3174 | PRINT_WARN("Stopping card %s interrupted by user!\n", | ||
3175 | CARD_BUS_ID(card)); | ||
3176 | return -ERESTARTSYS; | ||
3177 | } | ||
3178 | rc = ccw_device_set_offline(CARD_DDEV(card)); | 3167 | rc = ccw_device_set_offline(CARD_DDEV(card)); |
3179 | rc2 = ccw_device_set_offline(CARD_WDEV(card)); | 3168 | rc2 = ccw_device_set_offline(CARD_WDEV(card)); |
3180 | rc3 = ccw_device_set_offline(CARD_RDEV(card)); | 3169 | rc3 = ccw_device_set_offline(CARD_RDEV(card)); |
diff --git a/drivers/s390/net/qeth_l3_sys.c b/drivers/s390/net/qeth_l3_sys.c index 210ddb639748..c144b9924d52 100644 --- a/drivers/s390/net/qeth_l3_sys.c +++ b/drivers/s390/net/qeth_l3_sys.c | |||
@@ -121,9 +121,6 @@ static ssize_t qeth_l3_dev_route6_show(struct device *dev, | |||
121 | if (!card) | 121 | if (!card) |
122 | return -EINVAL; | 122 | return -EINVAL; |
123 | 123 | ||
124 | if (!qeth_is_supported(card, IPA_IPV6)) | ||
125 | return sprintf(buf, "%s\n", "n/a"); | ||
126 | |||
127 | return qeth_l3_dev_route_show(card, &card->options.route6, buf); | 124 | return qeth_l3_dev_route_show(card, &card->options.route6, buf); |
128 | } | 125 | } |
129 | 126 | ||
@@ -135,10 +132,6 @@ static ssize_t qeth_l3_dev_route6_store(struct device *dev, | |||
135 | if (!card) | 132 | if (!card) |
136 | return -EINVAL; | 133 | return -EINVAL; |
137 | 134 | ||
138 | if (!qeth_is_supported(card, IPA_IPV6)) { | ||
139 | return -EOPNOTSUPP; | ||
140 | } | ||
141 | |||
142 | return qeth_l3_dev_route_store(card, &card->options.route6, | 135 | return qeth_l3_dev_route_store(card, &card->options.route6, |
143 | QETH_PROT_IPV6, buf, count); | 136 | QETH_PROT_IPV6, buf, count); |
144 | } | 137 | } |
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index 3b56220fb900..3d4e3e3f3fc0 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c | |||
@@ -610,7 +610,8 @@ struct zfcp_port *zfcp_port_enqueue(struct zfcp_adapter *adapter, u64 wwpn, | |||
610 | atomic_set_mask(status | ZFCP_STATUS_COMMON_REMOVE, &port->status); | 610 | atomic_set_mask(status | ZFCP_STATUS_COMMON_REMOVE, &port->status); |
611 | atomic_set(&port->refcount, 0); | 611 | atomic_set(&port->refcount, 0); |
612 | 612 | ||
613 | dev_set_name(&port->sysfs_device, "0x%016llx", wwpn); | 613 | dev_set_name(&port->sysfs_device, "0x%016llx", |
614 | (unsigned long long)wwpn); | ||
614 | port->sysfs_device.parent = &adapter->ccw_device->dev; | 615 | port->sysfs_device.parent = &adapter->ccw_device->dev; |
615 | 616 | ||
616 | port->sysfs_device.release = zfcp_sysfs_port_release; | 617 | port->sysfs_device.release = zfcp_sysfs_port_release; |
diff --git a/drivers/s390/scsi/zfcp_ccw.c b/drivers/s390/scsi/zfcp_ccw.c index b04038c74786..951a8d409d1d 100644 --- a/drivers/s390/scsi/zfcp_ccw.c +++ b/drivers/s390/scsi/zfcp_ccw.c | |||
@@ -116,7 +116,9 @@ static int zfcp_ccw_set_online(struct ccw_device *ccw_device) | |||
116 | zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 85, | 116 | zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 85, |
117 | NULL); | 117 | NULL); |
118 | zfcp_erp_wait(adapter); | 118 | zfcp_erp_wait(adapter); |
119 | goto out; | 119 | up(&zfcp_data.config_sema); |
120 | flush_work(&adapter->scan_work); | ||
121 | return 0; | ||
120 | 122 | ||
121 | out_scsi_register: | 123 | out_scsi_register: |
122 | zfcp_erp_thread_kill(adapter); | 124 | zfcp_erp_thread_kill(adapter); |
diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c index 060f5f2352ec..31012d58cfb7 100644 --- a/drivers/s390/scsi/zfcp_dbf.c +++ b/drivers/s390/scsi/zfcp_dbf.c | |||
@@ -30,7 +30,7 @@ static void zfcp_dbf_hexdump(debug_info_t *dbf, void *to, int to_len, | |||
30 | dump->offset = offset; | 30 | dump->offset = offset; |
31 | dump->size = min(from_len - offset, room); | 31 | dump->size = min(from_len - offset, room); |
32 | memcpy(dump->data, from + offset, dump->size); | 32 | memcpy(dump->data, from + offset, dump->size); |
33 | debug_event(dbf, level, dump, dump->size); | 33 | debug_event(dbf, level, dump, dump->size + sizeof(*dump)); |
34 | } | 34 | } |
35 | } | 35 | } |
36 | 36 | ||
@@ -108,7 +108,7 @@ static int zfcp_dbf_view_header(debug_info_t *id, struct debug_view *view, | |||
108 | t.tv_sec, t.tv_nsec); | 108 | t.tv_sec, t.tv_nsec); |
109 | zfcp_dbf_out(&p, "cpu", "%02i", entry->id.fields.cpuid); | 109 | zfcp_dbf_out(&p, "cpu", "%02i", entry->id.fields.cpuid); |
110 | } else { | 110 | } else { |
111 | zfcp_dbf_outd(&p, NULL, dump->data, dump->size, dump->offset, | 111 | zfcp_dbf_outd(&p, "", dump->data, dump->size, dump->offset, |
112 | dump->total_size); | 112 | dump->total_size); |
113 | if ((dump->offset + dump->size) == dump->total_size) | 113 | if ((dump->offset + dump->size) == dump->total_size) |
114 | p += sprintf(p, "\n"); | 114 | p += sprintf(p, "\n"); |
@@ -366,6 +366,7 @@ static void zfcp_hba_dbf_view_response(char **p, | |||
366 | break; | 366 | break; |
367 | zfcp_dbf_out(p, "scsi_cmnd", "0x%0Lx", r->u.fcp.cmnd); | 367 | zfcp_dbf_out(p, "scsi_cmnd", "0x%0Lx", r->u.fcp.cmnd); |
368 | zfcp_dbf_out(p, "scsi_serial", "0x%016Lx", r->u.fcp.serial); | 368 | zfcp_dbf_out(p, "scsi_serial", "0x%016Lx", r->u.fcp.serial); |
369 | p += sprintf(*p, "\n"); | ||
369 | break; | 370 | break; |
370 | 371 | ||
371 | case FSF_QTCB_OPEN_PORT_WITH_DID: | 372 | case FSF_QTCB_OPEN_PORT_WITH_DID: |
@@ -465,7 +466,8 @@ static int zfcp_hba_dbf_view_format(debug_info_t *id, struct debug_view *view, | |||
465 | else if (strncmp(r->tag, "berr", ZFCP_DBF_TAG_SIZE) == 0) | 466 | else if (strncmp(r->tag, "berr", ZFCP_DBF_TAG_SIZE) == 0) |
466 | zfcp_hba_dbf_view_berr(&p, &r->u.berr); | 467 | zfcp_hba_dbf_view_berr(&p, &r->u.berr); |
467 | 468 | ||
468 | p += sprintf(p, "\n"); | 469 | if (strncmp(r->tag, "resp", ZFCP_DBF_TAG_SIZE) != 0) |
470 | p += sprintf(p, "\n"); | ||
469 | return p - out_buf; | 471 | return p - out_buf; |
470 | } | 472 | } |
471 | 473 | ||
@@ -880,6 +882,7 @@ void zfcp_san_dbf_event_ct_request(struct zfcp_fsf_req *fsf_req) | |||
880 | struct ct_hdr *hdr = sg_virt(ct->req); | 882 | struct ct_hdr *hdr = sg_virt(ct->req); |
881 | struct zfcp_san_dbf_record *r = &adapter->san_dbf_buf; | 883 | struct zfcp_san_dbf_record *r = &adapter->san_dbf_buf; |
882 | struct zfcp_san_dbf_record_ct_request *oct = &r->u.ct_req; | 884 | struct zfcp_san_dbf_record_ct_request *oct = &r->u.ct_req; |
885 | int level = 3; | ||
883 | unsigned long flags; | 886 | unsigned long flags; |
884 | 887 | ||
885 | spin_lock_irqsave(&adapter->san_dbf_lock, flags); | 888 | spin_lock_irqsave(&adapter->san_dbf_lock, flags); |
@@ -896,9 +899,10 @@ void zfcp_san_dbf_event_ct_request(struct zfcp_fsf_req *fsf_req) | |||
896 | oct->options = hdr->options; | 899 | oct->options = hdr->options; |
897 | oct->max_res_size = hdr->max_res_size; | 900 | oct->max_res_size = hdr->max_res_size; |
898 | oct->len = min((int)ct->req->length - (int)sizeof(struct ct_hdr), | 901 | oct->len = min((int)ct->req->length - (int)sizeof(struct ct_hdr), |
899 | ZFCP_DBF_CT_PAYLOAD); | 902 | ZFCP_DBF_SAN_MAX_PAYLOAD); |
900 | memcpy(oct->payload, (void *)hdr + sizeof(struct ct_hdr), oct->len); | 903 | debug_event(adapter->san_dbf, level, r, sizeof(*r)); |
901 | debug_event(adapter->san_dbf, 3, r, sizeof(*r)); | 904 | zfcp_dbf_hexdump(adapter->san_dbf, r, sizeof(*r), level, |
905 | (void *)hdr + sizeof(struct ct_hdr), oct->len); | ||
902 | spin_unlock_irqrestore(&adapter->san_dbf_lock, flags); | 906 | spin_unlock_irqrestore(&adapter->san_dbf_lock, flags); |
903 | } | 907 | } |
904 | 908 | ||
@@ -914,6 +918,7 @@ void zfcp_san_dbf_event_ct_response(struct zfcp_fsf_req *fsf_req) | |||
914 | struct ct_hdr *hdr = sg_virt(ct->resp); | 918 | struct ct_hdr *hdr = sg_virt(ct->resp); |
915 | struct zfcp_san_dbf_record *r = &adapter->san_dbf_buf; | 919 | struct zfcp_san_dbf_record *r = &adapter->san_dbf_buf; |
916 | struct zfcp_san_dbf_record_ct_response *rct = &r->u.ct_resp; | 920 | struct zfcp_san_dbf_record_ct_response *rct = &r->u.ct_resp; |
921 | int level = 3; | ||
917 | unsigned long flags; | 922 | unsigned long flags; |
918 | 923 | ||
919 | spin_lock_irqsave(&adapter->san_dbf_lock, flags); | 924 | spin_lock_irqsave(&adapter->san_dbf_lock, flags); |
@@ -929,9 +934,10 @@ void zfcp_san_dbf_event_ct_response(struct zfcp_fsf_req *fsf_req) | |||
929 | rct->expl = hdr->reason_code_expl; | 934 | rct->expl = hdr->reason_code_expl; |
930 | rct->vendor_unique = hdr->vendor_unique; | 935 | rct->vendor_unique = hdr->vendor_unique; |
931 | rct->len = min((int)ct->resp->length - (int)sizeof(struct ct_hdr), | 936 | rct->len = min((int)ct->resp->length - (int)sizeof(struct ct_hdr), |
932 | ZFCP_DBF_CT_PAYLOAD); | 937 | ZFCP_DBF_SAN_MAX_PAYLOAD); |
933 | memcpy(rct->payload, (void *)hdr + sizeof(struct ct_hdr), rct->len); | 938 | debug_event(adapter->san_dbf, level, r, sizeof(*r)); |
934 | debug_event(adapter->san_dbf, 3, r, sizeof(*r)); | 939 | zfcp_dbf_hexdump(adapter->san_dbf, r, sizeof(*r), level, |
940 | (void *)hdr + sizeof(struct ct_hdr), rct->len); | ||
935 | spin_unlock_irqrestore(&adapter->san_dbf_lock, flags); | 941 | spin_unlock_irqrestore(&adapter->san_dbf_lock, flags); |
936 | } | 942 | } |
937 | 943 | ||
@@ -954,7 +960,7 @@ static void zfcp_san_dbf_event_els(const char *tag, int level, | |||
954 | rec->u.els.ls_code = ls_code; | 960 | rec->u.els.ls_code = ls_code; |
955 | debug_event(adapter->san_dbf, level, rec, sizeof(*rec)); | 961 | debug_event(adapter->san_dbf, level, rec, sizeof(*rec)); |
956 | zfcp_dbf_hexdump(adapter->san_dbf, rec, sizeof(*rec), level, | 962 | zfcp_dbf_hexdump(adapter->san_dbf, rec, sizeof(*rec), level, |
957 | buffer, min(buflen, ZFCP_DBF_ELS_MAX_PAYLOAD)); | 963 | buffer, min(buflen, ZFCP_DBF_SAN_MAX_PAYLOAD)); |
958 | spin_unlock_irqrestore(&adapter->san_dbf_lock, flags); | 964 | spin_unlock_irqrestore(&adapter->san_dbf_lock, flags); |
959 | } | 965 | } |
960 | 966 | ||
@@ -1008,8 +1014,6 @@ static int zfcp_san_dbf_view_format(debug_info_t *id, struct debug_view *view, | |||
1008 | char *out_buf, const char *in_buf) | 1014 | char *out_buf, const char *in_buf) |
1009 | { | 1015 | { |
1010 | struct zfcp_san_dbf_record *r = (struct zfcp_san_dbf_record *)in_buf; | 1016 | struct zfcp_san_dbf_record *r = (struct zfcp_san_dbf_record *)in_buf; |
1011 | char *buffer = NULL; | ||
1012 | int buflen = 0, total = 0; | ||
1013 | char *p = out_buf; | 1017 | char *p = out_buf; |
1014 | 1018 | ||
1015 | if (strncmp(r->tag, "dump", ZFCP_DBF_TAG_SIZE) == 0) | 1019 | if (strncmp(r->tag, "dump", ZFCP_DBF_TAG_SIZE) == 0) |
@@ -1029,9 +1033,6 @@ static int zfcp_san_dbf_view_format(debug_info_t *id, struct debug_view *view, | |||
1029 | zfcp_dbf_out(&p, "gs_subtype", "0x%02x", ct->gs_subtype); | 1033 | zfcp_dbf_out(&p, "gs_subtype", "0x%02x", ct->gs_subtype); |
1030 | zfcp_dbf_out(&p, "options", "0x%02x", ct->options); | 1034 | zfcp_dbf_out(&p, "options", "0x%02x", ct->options); |
1031 | zfcp_dbf_out(&p, "max_res_size", "0x%04x", ct->max_res_size); | 1035 | zfcp_dbf_out(&p, "max_res_size", "0x%04x", ct->max_res_size); |
1032 | total = ct->len; | ||
1033 | buffer = ct->payload; | ||
1034 | buflen = min(total, ZFCP_DBF_CT_PAYLOAD); | ||
1035 | } else if (strncmp(r->tag, "rctc", ZFCP_DBF_TAG_SIZE) == 0) { | 1036 | } else if (strncmp(r->tag, "rctc", ZFCP_DBF_TAG_SIZE) == 0) { |
1036 | struct zfcp_san_dbf_record_ct_response *ct = &r->u.ct_resp; | 1037 | struct zfcp_san_dbf_record_ct_response *ct = &r->u.ct_resp; |
1037 | zfcp_dbf_out(&p, "cmd_rsp_code", "0x%04x", ct->cmd_rsp_code); | 1038 | zfcp_dbf_out(&p, "cmd_rsp_code", "0x%04x", ct->cmd_rsp_code); |
@@ -1039,23 +1040,12 @@ static int zfcp_san_dbf_view_format(debug_info_t *id, struct debug_view *view, | |||
1039 | zfcp_dbf_out(&p, "reason_code", "0x%02x", ct->reason_code); | 1040 | zfcp_dbf_out(&p, "reason_code", "0x%02x", ct->reason_code); |
1040 | zfcp_dbf_out(&p, "reason_code_expl", "0x%02x", ct->expl); | 1041 | zfcp_dbf_out(&p, "reason_code_expl", "0x%02x", ct->expl); |
1041 | zfcp_dbf_out(&p, "vendor_unique", "0x%02x", ct->vendor_unique); | 1042 | zfcp_dbf_out(&p, "vendor_unique", "0x%02x", ct->vendor_unique); |
1042 | total = ct->len; | ||
1043 | buffer = ct->payload; | ||
1044 | buflen = min(total, ZFCP_DBF_CT_PAYLOAD); | ||
1045 | } else if (strncmp(r->tag, "oels", ZFCP_DBF_TAG_SIZE) == 0 || | 1043 | } else if (strncmp(r->tag, "oels", ZFCP_DBF_TAG_SIZE) == 0 || |
1046 | strncmp(r->tag, "rels", ZFCP_DBF_TAG_SIZE) == 0 || | 1044 | strncmp(r->tag, "rels", ZFCP_DBF_TAG_SIZE) == 0 || |
1047 | strncmp(r->tag, "iels", ZFCP_DBF_TAG_SIZE) == 0) { | 1045 | strncmp(r->tag, "iels", ZFCP_DBF_TAG_SIZE) == 0) { |
1048 | struct zfcp_san_dbf_record_els *els = &r->u.els; | 1046 | struct zfcp_san_dbf_record_els *els = &r->u.els; |
1049 | zfcp_dbf_out(&p, "ls_code", "0x%02x", els->ls_code); | 1047 | zfcp_dbf_out(&p, "ls_code", "0x%02x", els->ls_code); |
1050 | total = els->len; | ||
1051 | buffer = els->payload; | ||
1052 | buflen = min(total, ZFCP_DBF_ELS_PAYLOAD); | ||
1053 | } | 1048 | } |
1054 | |||
1055 | zfcp_dbf_outd(&p, "payload", buffer, buflen, 0, total); | ||
1056 | if (buflen == total) | ||
1057 | p += sprintf(p, "\n"); | ||
1058 | |||
1059 | return p - out_buf; | 1049 | return p - out_buf; |
1060 | } | 1050 | } |
1061 | 1051 | ||
diff --git a/drivers/s390/scsi/zfcp_dbf.h b/drivers/s390/scsi/zfcp_dbf.h index e8f450801fea..5d6b2dff855b 100644 --- a/drivers/s390/scsi/zfcp_dbf.h +++ b/drivers/s390/scsi/zfcp_dbf.h | |||
@@ -163,8 +163,6 @@ struct zfcp_san_dbf_record_ct_request { | |||
163 | u8 options; | 163 | u8 options; |
164 | u16 max_res_size; | 164 | u16 max_res_size; |
165 | u32 len; | 165 | u32 len; |
166 | #define ZFCP_DBF_CT_PAYLOAD 24 | ||
167 | u8 payload[ZFCP_DBF_CT_PAYLOAD]; | ||
168 | } __attribute__ ((packed)); | 166 | } __attribute__ ((packed)); |
169 | 167 | ||
170 | struct zfcp_san_dbf_record_ct_response { | 168 | struct zfcp_san_dbf_record_ct_response { |
@@ -174,15 +172,11 @@ struct zfcp_san_dbf_record_ct_response { | |||
174 | u8 expl; | 172 | u8 expl; |
175 | u8 vendor_unique; | 173 | u8 vendor_unique; |
176 | u32 len; | 174 | u32 len; |
177 | u8 payload[ZFCP_DBF_CT_PAYLOAD]; | ||
178 | } __attribute__ ((packed)); | 175 | } __attribute__ ((packed)); |
179 | 176 | ||
180 | struct zfcp_san_dbf_record_els { | 177 | struct zfcp_san_dbf_record_els { |
181 | u8 ls_code; | 178 | u8 ls_code; |
182 | u32 len; | 179 | u32 len; |
183 | #define ZFCP_DBF_ELS_PAYLOAD 32 | ||
184 | #define ZFCP_DBF_ELS_MAX_PAYLOAD 1024 | ||
185 | u8 payload[ZFCP_DBF_ELS_PAYLOAD]; | ||
186 | } __attribute__ ((packed)); | 180 | } __attribute__ ((packed)); |
187 | 181 | ||
188 | struct zfcp_san_dbf_record { | 182 | struct zfcp_san_dbf_record { |
@@ -196,6 +190,8 @@ struct zfcp_san_dbf_record { | |||
196 | struct zfcp_san_dbf_record_ct_response ct_resp; | 190 | struct zfcp_san_dbf_record_ct_response ct_resp; |
197 | struct zfcp_san_dbf_record_els els; | 191 | struct zfcp_san_dbf_record_els els; |
198 | } u; | 192 | } u; |
193 | #define ZFCP_DBF_SAN_MAX_PAYLOAD 1024 | ||
194 | u8 payload[32]; | ||
199 | } __attribute__ ((packed)); | 195 | } __attribute__ ((packed)); |
200 | 196 | ||
201 | struct zfcp_scsi_dbf_record { | 197 | struct zfcp_scsi_dbf_record { |
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index 9040f738ff33..35364f64da7f 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c | |||
@@ -472,6 +472,7 @@ static void zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *act) | |||
472 | ZFCP_STATUS_ERP_TIMEDOUT)) { | 472 | ZFCP_STATUS_ERP_TIMEDOUT)) { |
473 | act->fsf_req->status |= ZFCP_STATUS_FSFREQ_DISMISSED; | 473 | act->fsf_req->status |= ZFCP_STATUS_FSFREQ_DISMISSED; |
474 | zfcp_rec_dbf_event_action(142, act); | 474 | zfcp_rec_dbf_event_action(142, act); |
475 | act->fsf_req->erp_action = NULL; | ||
475 | } | 476 | } |
476 | if (act->status & ZFCP_STATUS_ERP_TIMEDOUT) | 477 | if (act->status & ZFCP_STATUS_ERP_TIMEDOUT) |
477 | zfcp_rec_dbf_event_action(143, act); | 478 | zfcp_rec_dbf_event_action(143, act); |
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 5ae1d497e5ed..d024442ee128 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c | |||
@@ -683,6 +683,7 @@ static struct zfcp_fsf_req *zfcp_fsf_alloc_noqtcb(mempool_t *pool) | |||
683 | if (!req) | 683 | if (!req) |
684 | return NULL; | 684 | return NULL; |
685 | memset(req, 0, sizeof(*req)); | 685 | memset(req, 0, sizeof(*req)); |
686 | req->pool = pool; | ||
686 | return req; | 687 | return req; |
687 | } | 688 | } |
688 | 689 | ||
@@ -769,28 +770,24 @@ static struct zfcp_fsf_req *zfcp_fsf_req_create(struct zfcp_adapter *adapter, | |||
769 | static int zfcp_fsf_req_send(struct zfcp_fsf_req *req) | 770 | static int zfcp_fsf_req_send(struct zfcp_fsf_req *req) |
770 | { | 771 | { |
771 | struct zfcp_adapter *adapter = req->adapter; | 772 | struct zfcp_adapter *adapter = req->adapter; |
772 | struct zfcp_qdio_queue *req_q = &adapter->req_q; | 773 | unsigned long flags; |
773 | int idx; | 774 | int idx; |
774 | 775 | ||
775 | /* put allocated FSF request into hash table */ | 776 | /* put allocated FSF request into hash table */ |
776 | spin_lock(&adapter->req_list_lock); | 777 | spin_lock_irqsave(&adapter->req_list_lock, flags); |
777 | idx = zfcp_reqlist_hash(req->req_id); | 778 | idx = zfcp_reqlist_hash(req->req_id); |
778 | list_add_tail(&req->list, &adapter->req_list[idx]); | 779 | list_add_tail(&req->list, &adapter->req_list[idx]); |
779 | spin_unlock(&adapter->req_list_lock); | 780 | spin_unlock_irqrestore(&adapter->req_list_lock, flags); |
780 | 781 | ||
781 | req->qdio_outb_usage = atomic_read(&req_q->count); | 782 | req->qdio_outb_usage = atomic_read(&adapter->req_q.count); |
782 | req->issued = get_clock(); | 783 | req->issued = get_clock(); |
783 | if (zfcp_qdio_send(req)) { | 784 | if (zfcp_qdio_send(req)) { |
784 | /* Queues are down..... */ | ||
785 | del_timer(&req->timer); | 785 | del_timer(&req->timer); |
786 | spin_lock(&adapter->req_list_lock); | 786 | spin_lock_irqsave(&adapter->req_list_lock, flags); |
787 | zfcp_reqlist_remove(adapter, req); | 787 | /* lookup request again, list might have changed */ |
788 | spin_unlock(&adapter->req_list_lock); | 788 | if (zfcp_reqlist_find_safe(adapter, req)) |
789 | /* undo changes in request queue made for this request */ | 789 | zfcp_reqlist_remove(adapter, req); |
790 | atomic_add(req->sbal_number, &req_q->count); | 790 | spin_unlock_irqrestore(&adapter->req_list_lock, flags); |
791 | req_q->first -= req->sbal_number; | ||
792 | req_q->first += QDIO_MAX_BUFFERS_PER_Q; | ||
793 | req_q->first %= QDIO_MAX_BUFFERS_PER_Q; /* wrap */ | ||
794 | zfcp_erp_adapter_reopen(adapter, 0, 116, req); | 791 | zfcp_erp_adapter_reopen(adapter, 0, 116, req); |
795 | return -EIO; | 792 | return -EIO; |
796 | } | 793 | } |
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index ca8f85f3dad4..e46fd3e9f68f 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c | |||
@@ -24,14 +24,10 @@ char *zfcp_get_fcp_sns_info_ptr(struct fcp_rsp_iu *fcp_rsp_iu) | |||
24 | static void zfcp_scsi_slave_destroy(struct scsi_device *sdpnt) | 24 | static void zfcp_scsi_slave_destroy(struct scsi_device *sdpnt) |
25 | { | 25 | { |
26 | struct zfcp_unit *unit = (struct zfcp_unit *) sdpnt->hostdata; | 26 | struct zfcp_unit *unit = (struct zfcp_unit *) sdpnt->hostdata; |
27 | WARN_ON(!unit); | 27 | atomic_clear_mask(ZFCP_STATUS_UNIT_REGISTERED, &unit->status); |
28 | if (unit) { | 28 | unit->device = NULL; |
29 | atomic_clear_mask(ZFCP_STATUS_UNIT_REGISTERED, &unit->status); | 29 | zfcp_erp_unit_failed(unit, 12, NULL); |
30 | sdpnt->hostdata = NULL; | 30 | zfcp_unit_put(unit); |
31 | unit->device = NULL; | ||
32 | zfcp_erp_unit_failed(unit, 12, NULL); | ||
33 | zfcp_unit_put(unit); | ||
34 | } | ||
35 | } | 31 | } |
36 | 32 | ||
37 | static int zfcp_scsi_slave_configure(struct scsi_device *sdp) | 33 | static int zfcp_scsi_slave_configure(struct scsi_device *sdp) |