aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/s390/block/dasd_devmap.c8
-rw-r--r--drivers/s390/block/dasd_eckd.c20
-rw-r--r--drivers/s390/block/dasd_fba.c4
-rw-r--r--drivers/s390/block/dasd_genhd.c8
-rw-r--r--drivers/s390/block/dasd_ioctl.c2
-rw-r--r--drivers/s390/block/xpram.c63
-rw-r--r--drivers/s390/char/con3215.c2
-rw-r--r--drivers/s390/char/ctrlchar.c2
-rw-r--r--drivers/s390/char/defkeymap.c6
-rw-r--r--drivers/s390/char/fs3270.c12
-rw-r--r--drivers/s390/char/keyboard.c6
-rw-r--r--drivers/s390/char/raw3270.c34
-rw-r--r--drivers/s390/char/raw3270.h2
-rw-r--r--drivers/s390/char/tape_34xx.c6
-rw-r--r--drivers/s390/char/tty3270.c24
-rw-r--r--drivers/s390/char/vmlogrdr.c6
-rw-r--r--drivers/s390/char/vmwatchdog.c2
-rw-r--r--drivers/s390/cio/ccwgroup.c2
-rw-r--r--drivers/s390/cio/chsc.c34
-rw-r--r--drivers/s390/cio/cio.c4
-rw-r--r--drivers/s390/cio/cio.h3
-rw-r--r--drivers/s390/cio/cmf.c4
-rw-r--r--drivers/s390/cio/css.c36
-rw-r--r--drivers/s390/cio/css.h4
-rw-r--r--drivers/s390/cio/device.c14
-rw-r--r--drivers/s390/cio/device_fsm.c85
-rw-r--r--drivers/s390/cio/device_pgid.c122
-rw-r--r--drivers/s390/cio/device_status.c7
-rw-r--r--drivers/s390/cio/qdio.c2
-rw-r--r--drivers/s390/net/iucv.c2
-rw-r--r--drivers/s390/net/qeth_main.c16
-rw-r--r--drivers/s390/net/qeth_sys.c4
-rw-r--r--drivers/s390/net/smsgiucv.c14
-rw-r--r--drivers/s390/s390mach.c10
-rw-r--r--drivers/s390/scsi/zfcp_fsf.c2
-rw-r--r--drivers/s390/scsi/zfcp_scsi.c47
36 files changed, 383 insertions, 236 deletions
diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c
index d7295386821c..7f6fdac74706 100644
--- a/drivers/s390/block/dasd_devmap.c
+++ b/drivers/s390/block/dasd_devmap.c
@@ -394,7 +394,7 @@ dasd_add_busid(char *bus_id, int features)
394 if (!new) 394 if (!new)
395 return ERR_PTR(-ENOMEM); 395 return ERR_PTR(-ENOMEM);
396 spin_lock(&dasd_devmap_lock); 396 spin_lock(&dasd_devmap_lock);
397 devmap = 0; 397 devmap = NULL;
398 hash = dasd_hash_busid(bus_id); 398 hash = dasd_hash_busid(bus_id);
399 list_for_each_entry(tmp, &dasd_hashlists[hash], list) 399 list_for_each_entry(tmp, &dasd_hashlists[hash], list)
400 if (strncmp(tmp->bus_id, bus_id, BUS_ID_SIZE) == 0) { 400 if (strncmp(tmp->bus_id, bus_id, BUS_ID_SIZE) == 0) {
@@ -406,10 +406,10 @@ dasd_add_busid(char *bus_id, int features)
406 new->devindex = dasd_max_devindex++; 406 new->devindex = dasd_max_devindex++;
407 strncpy(new->bus_id, bus_id, BUS_ID_SIZE); 407 strncpy(new->bus_id, bus_id, BUS_ID_SIZE);
408 new->features = features; 408 new->features = features;
409 new->device = 0; 409 new->device = NULL;
410 list_add(&new->list, &dasd_hashlists[hash]); 410 list_add(&new->list, &dasd_hashlists[hash]);
411 devmap = new; 411 devmap = new;
412 new = 0; 412 new = NULL;
413 } 413 }
414 spin_unlock(&dasd_devmap_lock); 414 spin_unlock(&dasd_devmap_lock);
415 kfree(new); 415 kfree(new);
@@ -479,7 +479,7 @@ dasd_device_from_devindex(int devindex)
479 int i; 479 int i;
480 480
481 spin_lock(&dasd_devmap_lock); 481 spin_lock(&dasd_devmap_lock);
482 devmap = 0; 482 devmap = NULL;
483 for (i = 0; (i < 256) && !devmap; i++) 483 for (i = 0; (i < 256) && !devmap; i++)
484 list_for_each_entry(tmp, &dasd_hashlists[i], list) 484 list_for_each_entry(tmp, &dasd_hashlists[i], list)
485 if (tmp->devindex == devindex) { 485 if (tmp->devindex == devindex) {
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c
index 2e655f466743..39c2281371b5 100644
--- a/drivers/s390/block/dasd_eckd.c
+++ b/drivers/s390/block/dasd_eckd.c
@@ -65,16 +65,16 @@ struct dasd_eckd_private {
65/* The ccw bus type uses this table to find devices that it sends to 65/* The ccw bus type uses this table to find devices that it sends to
66 * dasd_eckd_probe */ 66 * dasd_eckd_probe */
67static struct ccw_device_id dasd_eckd_ids[] = { 67static struct ccw_device_id dasd_eckd_ids[] = {
68 { CCW_DEVICE_DEVTYPE (0x3990, 0, 0x3390, 0), driver_info: 0x1}, 68 { CCW_DEVICE_DEVTYPE (0x3990, 0, 0x3390, 0), .driver_info = 0x1},
69 { CCW_DEVICE_DEVTYPE (0x2105, 0, 0x3390, 0), driver_info: 0x2}, 69 { CCW_DEVICE_DEVTYPE (0x2105, 0, 0x3390, 0), .driver_info = 0x2},
70 { CCW_DEVICE_DEVTYPE (0x3880, 0, 0x3390, 0), driver_info: 0x3}, 70 { CCW_DEVICE_DEVTYPE (0x3880, 0, 0x3390, 0), .driver_info = 0x3},
71 { CCW_DEVICE_DEVTYPE (0x3990, 0, 0x3380, 0), driver_info: 0x4}, 71 { CCW_DEVICE_DEVTYPE (0x3990, 0, 0x3380, 0), .driver_info = 0x4},
72 { CCW_DEVICE_DEVTYPE (0x2105, 0, 0x3380, 0), driver_info: 0x5}, 72 { CCW_DEVICE_DEVTYPE (0x2105, 0, 0x3380, 0), .driver_info = 0x5},
73 { CCW_DEVICE_DEVTYPE (0x9343, 0, 0x9345, 0), driver_info: 0x6}, 73 { CCW_DEVICE_DEVTYPE (0x9343, 0, 0x9345, 0), .driver_info = 0x6},
74 { CCW_DEVICE_DEVTYPE (0x2107, 0, 0x3390, 0), driver_info: 0x7}, 74 { CCW_DEVICE_DEVTYPE (0x2107, 0, 0x3390, 0), .driver_info = 0x7},
75 { CCW_DEVICE_DEVTYPE (0x2107, 0, 0x3380, 0), driver_info: 0x8}, 75 { CCW_DEVICE_DEVTYPE (0x2107, 0, 0x3380, 0), .driver_info = 0x8},
76 { CCW_DEVICE_DEVTYPE (0x1750, 0, 0x3390, 0), driver_info: 0x9}, 76 { CCW_DEVICE_DEVTYPE (0x1750, 0, 0x3390, 0), .driver_info = 0x9},
77 { CCW_DEVICE_DEVTYPE (0x1750, 0, 0x3380, 0), driver_info: 0xa}, 77 { CCW_DEVICE_DEVTYPE (0x1750, 0, 0x3380, 0), .driver_info = 0xa},
78 { /* end of list */ }, 78 { /* end of list */ },
79}; 79};
80 80
diff --git a/drivers/s390/block/dasd_fba.c b/drivers/s390/block/dasd_fba.c
index 808434d38526..e85015be109b 100644
--- a/drivers/s390/block/dasd_fba.c
+++ b/drivers/s390/block/dasd_fba.c
@@ -44,8 +44,8 @@ struct dasd_fba_private {
44}; 44};
45 45
46static struct ccw_device_id dasd_fba_ids[] = { 46static struct ccw_device_id dasd_fba_ids[] = {
47 { CCW_DEVICE_DEVTYPE (0x6310, 0, 0x9336, 0), driver_info: 0x1}, 47 { CCW_DEVICE_DEVTYPE (0x6310, 0, 0x9336, 0), .driver_info = 0x1},
48 { CCW_DEVICE_DEVTYPE (0x3880, 0, 0x3370, 0), driver_info: 0x2}, 48 { CCW_DEVICE_DEVTYPE (0x3880, 0, 0x3370, 0), .driver_info = 0x2},
49 { /* end of list */ }, 49 { /* end of list */ },
50}; 50};
51 51
diff --git a/drivers/s390/block/dasd_genhd.c b/drivers/s390/block/dasd_genhd.c
index 12c7d296eaa8..4c272b70f41a 100644
--- a/drivers/s390/block/dasd_genhd.c
+++ b/drivers/s390/block/dasd_genhd.c
@@ -84,9 +84,9 @@ void
84dasd_gendisk_free(struct dasd_device *device) 84dasd_gendisk_free(struct dasd_device *device)
85{ 85{
86 del_gendisk(device->gdp); 86 del_gendisk(device->gdp);
87 device->gdp->queue = 0; 87 device->gdp->queue = NULL;
88 put_disk(device->gdp); 88 put_disk(device->gdp);
89 device->gdp = 0; 89 device->gdp = NULL;
90} 90}
91 91
92/* 92/*
@@ -136,7 +136,7 @@ dasd_destroy_partitions(struct dasd_device * device)
136 * device->bdev to lower the offline open_count limit again. 136 * device->bdev to lower the offline open_count limit again.
137 */ 137 */
138 bdev = device->bdev; 138 bdev = device->bdev;
139 device->bdev = 0; 139 device->bdev = NULL;
140 140
141 /* 141 /*
142 * See fs/partition/check.c:delete_partition 142 * See fs/partition/check.c:delete_partition
@@ -145,7 +145,7 @@ dasd_destroy_partitions(struct dasd_device * device)
145 */ 145 */
146 memset(&bpart, 0, sizeof(struct blkpg_partition)); 146 memset(&bpart, 0, sizeof(struct blkpg_partition));
147 memset(&barg, 0, sizeof(struct blkpg_ioctl_arg)); 147 memset(&barg, 0, sizeof(struct blkpg_ioctl_arg));
148 barg.data = &bpart; 148 barg.data = (void __user *) &bpart;
149 barg.op = BLKPG_DEL_PARTITION; 149 barg.op = BLKPG_DEL_PARTITION;
150 for (bpart.pno = device->gdp->minors - 1; bpart.pno > 0; bpart.pno--) 150 for (bpart.pno = device->gdp->minors - 1; bpart.pno > 0; bpart.pno--)
151 ioctl_by_bdev(bdev, BLKPG, (unsigned long) &barg); 151 ioctl_by_bdev(bdev, BLKPG, (unsigned long) &barg);
diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c
index e97f5316ad2d..8fed3603e9ea 100644
--- a/drivers/s390/block/dasd_ioctl.c
+++ b/drivers/s390/block/dasd_ioctl.c
@@ -345,7 +345,7 @@ dasd_ioctl_set_ro(struct block_device *bdev, void __user *argp)
345 if (bdev != bdev->bd_contains) 345 if (bdev != bdev->bd_contains)
346 // ro setting is not allowed for partitions 346 // ro setting is not allowed for partitions
347 return -EINVAL; 347 return -EINVAL;
348 if (get_user(intval, (int *)argp)) 348 if (get_user(intval, (int __user *)argp))
349 return -EFAULT; 349 return -EFAULT;
350 350
351 set_disk_ro(bdev->bd_disk, intval); 351 set_disk_ro(bdev->bd_disk, intval);
diff --git a/drivers/s390/block/xpram.c b/drivers/s390/block/xpram.c
index 4c1e56b9b98d..4cd879cb9bdd 100644
--- a/drivers/s390/block/xpram.c
+++ b/drivers/s390/block/xpram.c
@@ -71,11 +71,11 @@ static int xpram_devs;
71/* 71/*
72 * Parameter parsing functions. 72 * Parameter parsing functions.
73 */ 73 */
74static int devs = XPRAM_DEVS; 74static int __initdata devs = XPRAM_DEVS;
75static unsigned int sizes[XPRAM_MAX_DEVS]; 75static char __initdata *sizes[XPRAM_MAX_DEVS];
76 76
77module_param(devs, int, 0); 77module_param(devs, int, 0);
78module_param_array(sizes, int, NULL, 0); 78module_param_array(sizes, charp, NULL, 0);
79 79
80MODULE_PARM_DESC(devs, "number of devices (\"partitions\"), " \ 80MODULE_PARM_DESC(devs, "number of devices (\"partitions\"), " \
81 "the default is " __MODULE_STRING(XPRAM_DEVS) "\n"); 81 "the default is " __MODULE_STRING(XPRAM_DEVS) "\n");
@@ -86,59 +86,6 @@ MODULE_PARM_DESC(sizes, "list of device (partition) sizes " \
86 "claimed by explicit sizes\n"); 86 "claimed by explicit sizes\n");
87MODULE_LICENSE("GPL"); 87MODULE_LICENSE("GPL");
88 88
89#ifndef MODULE
90/*
91 * Parses the kernel parameters given in the kernel parameter line.
92 * The expected format is
93 * <number_of_partitions>[","<partition_size>]*
94 * where
95 * devices is a positive integer that initializes xpram_devs
96 * each size is a non-negative integer possibly followed by a
97 * magnitude (k,K,m,M,g,G), the list of sizes initialises
98 * xpram_sizes
99 *
100 * Arguments
101 * str: substring of kernel parameter line that contains xprams
102 * kernel parameters.
103 *
104 * Result 0 on success, -EINVAL else -- only for Version > 2.3
105 *
106 * Side effects
107 * the global variabls devs is set to the value of
108 * <number_of_partitions> and sizes[i] is set to the i-th
109 * partition size (if provided). A parsing error of a value
110 * results in this value being set to -EINVAL.
111 */
112static int __init xpram_setup (char *str)
113{
114 char *cp;
115 int i;
116
117 devs = simple_strtoul(str, &cp, 10);
118 if (cp <= str || devs > XPRAM_MAX_DEVS)
119 return 0;
120 for (i = 0; (i < devs) && (*cp++ == ','); i++) {
121 sizes[i] = simple_strtoul(cp, &cp, 10);
122 if (*cp == 'g' || *cp == 'G') {
123 sizes[i] <<= 20;
124 cp++;
125 } else if (*cp == 'm' || *cp == 'M') {
126 sizes[i] <<= 10;
127 cp++;
128 } else if (*cp == 'k' || *cp == 'K')
129 cp++;
130 while (isspace(*cp)) cp++;
131 }
132 if (*cp == ',' && i >= devs)
133 PRINT_WARN("partition sizes list has too many entries.\n");
134 else if (*cp != 0)
135 PRINT_WARN("ignored '%s' at end of parameter string.\n", cp);
136 return 1;
137}
138
139__setup("xpram_parts=", xpram_setup);
140#endif
141
142/* 89/*
143 * Copy expanded memory page (4kB) into main memory 90 * Copy expanded memory page (4kB) into main memory
144 * Arguments 91 * Arguments
@@ -374,7 +321,9 @@ static int __init xpram_setup_sizes(unsigned long pages)
374 mem_needed = 0; 321 mem_needed = 0;
375 mem_auto_no = 0; 322 mem_auto_no = 0;
376 for (i = 0; i < xpram_devs; i++) { 323 for (i = 0; i < xpram_devs; i++) {
377 xpram_sizes[i] = (sizes[i] + 3) & -4UL; 324 if (sizes[i])
325 xpram_sizes[i] =
326 (memparse(sizes[i], &sizes[i]) + 3) & -4UL;
378 if (xpram_sizes[i]) 327 if (xpram_sizes[i])
379 mem_needed += xpram_sizes[i]; 328 mem_needed += xpram_sizes[i];
380 else 329 else
diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c
index f25c6d116f6f..2fa566fa6da4 100644
--- a/drivers/s390/char/con3215.c
+++ b/drivers/s390/char/con3215.c
@@ -693,7 +693,7 @@ raw3215_probe (struct ccw_device *cdev)
693 GFP_KERNEL|GFP_DMA); 693 GFP_KERNEL|GFP_DMA);
694 if (raw->buffer == NULL) { 694 if (raw->buffer == NULL) {
695 spin_lock(&raw3215_device_lock); 695 spin_lock(&raw3215_device_lock);
696 raw3215[line] = 0; 696 raw3215[line] = NULL;
697 spin_unlock(&raw3215_device_lock); 697 spin_unlock(&raw3215_device_lock);
698 kfree(raw); 698 kfree(raw);
699 return -ENOMEM; 699 return -ENOMEM;
diff --git a/drivers/s390/char/ctrlchar.c b/drivers/s390/char/ctrlchar.c
index 0ea6f36a2527..d83eb6358bac 100644
--- a/drivers/s390/char/ctrlchar.c
+++ b/drivers/s390/char/ctrlchar.c
@@ -23,7 +23,7 @@ ctrlchar_handle_sysrq(void *tty)
23 handle_sysrq(ctrlchar_sysrq_key, NULL, (struct tty_struct *) tty); 23 handle_sysrq(ctrlchar_sysrq_key, NULL, (struct tty_struct *) tty);
24} 24}
25 25
26static DECLARE_WORK(ctrlchar_work, ctrlchar_handle_sysrq, 0); 26static DECLARE_WORK(ctrlchar_work, ctrlchar_handle_sysrq, NULL);
27#endif 27#endif
28 28
29 29
diff --git a/drivers/s390/char/defkeymap.c b/drivers/s390/char/defkeymap.c
index ca15adb140d1..17027d918cf7 100644
--- a/drivers/s390/char/defkeymap.c
+++ b/drivers/s390/char/defkeymap.c
@@ -83,8 +83,8 @@ static u_short shift_ctrl_map[NR_KEYS] = {
83}; 83};
84 84
85ushort *key_maps[MAX_NR_KEYMAPS] = { 85ushort *key_maps[MAX_NR_KEYMAPS] = {
86 plain_map, shift_map, 0, 0, 86 plain_map, shift_map, NULL, NULL,
87 ctrl_map, shift_ctrl_map, 0 87 ctrl_map, shift_ctrl_map, NULL,
88}; 88};
89 89
90unsigned int keymap_count = 4; 90unsigned int keymap_count = 4;
@@ -145,7 +145,7 @@ char *func_table[MAX_NR_FUNC] = {
145 func_buf + 97, 145 func_buf + 97,
146 func_buf + 103, 146 func_buf + 103,
147 func_buf + 109, 147 func_buf + 109,
148 0, 148 NULL,
149}; 149};
150 150
151struct kbdiacr accent_table[MAX_DIACR] = { 151struct kbdiacr accent_table[MAX_DIACR] = {
diff --git a/drivers/s390/char/fs3270.c b/drivers/s390/char/fs3270.c
index 6099c14de429..ef004d089712 100644
--- a/drivers/s390/char/fs3270.c
+++ b/drivers/s390/char/fs3270.c
@@ -236,7 +236,7 @@ fs3270_irq(struct fs3270 *fp, struct raw3270_request *rq, struct irb *irb)
236 * Process reads from fullscreen 3270. 236 * Process reads from fullscreen 3270.
237 */ 237 */
238static ssize_t 238static ssize_t
239fs3270_read(struct file *filp, char *data, size_t count, loff_t *off) 239fs3270_read(struct file *filp, char __user *data, size_t count, loff_t *off)
240{ 240{
241 struct fs3270 *fp; 241 struct fs3270 *fp;
242 struct raw3270_request *rq; 242 struct raw3270_request *rq;
@@ -281,7 +281,7 @@ fs3270_read(struct file *filp, char *data, size_t count, loff_t *off)
281 * Process writes to fullscreen 3270. 281 * Process writes to fullscreen 3270.
282 */ 282 */
283static ssize_t 283static ssize_t
284fs3270_write(struct file *filp, const char *data, size_t count, loff_t *off) 284fs3270_write(struct file *filp, const char __user *data, size_t count, loff_t *off)
285{ 285{
286 struct fs3270 *fp; 286 struct fs3270 *fp;
287 struct raw3270_request *rq; 287 struct raw3270_request *rq;
@@ -338,10 +338,10 @@ fs3270_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
338 fp->write_command = arg; 338 fp->write_command = arg;
339 break; 339 break;
340 case TUBGETI: 340 case TUBGETI:
341 rc = put_user(fp->read_command, (char *) arg); 341 rc = put_user(fp->read_command, (char __user *) arg);
342 break; 342 break;
343 case TUBGETO: 343 case TUBGETO:
344 rc = put_user(fp->write_command,(char *) arg); 344 rc = put_user(fp->write_command,(char __user *) arg);
345 break; 345 break;
346 case TUBGETMOD: 346 case TUBGETMOD:
347 iocb.model = fp->view.model; 347 iocb.model = fp->view.model;
@@ -350,7 +350,7 @@ fs3270_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
350 iocb.pf_cnt = 24; 350 iocb.pf_cnt = 24;
351 iocb.re_cnt = 20; 351 iocb.re_cnt = 20;
352 iocb.map = 0; 352 iocb.map = 0;
353 if (copy_to_user((char *) arg, &iocb, 353 if (copy_to_user((char __user *) arg, &iocb,
354 sizeof(struct raw3270_iocb))) 354 sizeof(struct raw3270_iocb)))
355 rc = -EFAULT; 355 rc = -EFAULT;
356 break; 356 break;
@@ -479,7 +479,7 @@ fs3270_close(struct inode *inode, struct file *filp)
479 struct fs3270 *fp; 479 struct fs3270 *fp;
480 480
481 fp = filp->private_data; 481 fp = filp->private_data;
482 filp->private_data = 0; 482 filp->private_data = NULL;
483 if (fp) { 483 if (fp) {
484 fp->fs_pid = 0; 484 fp->fs_pid = 0;
485 raw3270_reset(&fp->view); 485 raw3270_reset(&fp->view);
diff --git a/drivers/s390/char/keyboard.c b/drivers/s390/char/keyboard.c
index 547ef906ae2c..3be06569180d 100644
--- a/drivers/s390/char/keyboard.c
+++ b/drivers/s390/char/keyboard.c
@@ -103,7 +103,7 @@ out_maps:
103out_kbd: 103out_kbd:
104 kfree(kbd); 104 kfree(kbd);
105out: 105out:
106 return 0; 106 return NULL;
107} 107}
108 108
109void 109void
@@ -304,7 +304,7 @@ kbd_keycode(struct kbd_data *kbd, unsigned int keycode)
304 if (kbd->sysrq) { 304 if (kbd->sysrq) {
305 if (kbd->sysrq == K(KT_LATIN, '-')) { 305 if (kbd->sysrq == K(KT_LATIN, '-')) {
306 kbd->sysrq = 0; 306 kbd->sysrq = 0;
307 handle_sysrq(value, 0, kbd->tty); 307 handle_sysrq(value, NULL, kbd->tty);
308 return; 308 return;
309 } 309 }
310 if (value == '-') { 310 if (value == '-') {
@@ -363,7 +363,7 @@ do_kdsk_ioctl(struct kbd_data *kbd, struct kbentry __user *user_kbe,
363 /* disallocate map */ 363 /* disallocate map */
364 key_map = kbd->key_maps[tmp.kb_table]; 364 key_map = kbd->key_maps[tmp.kb_table];
365 if (key_map) { 365 if (key_map) {
366 kbd->key_maps[tmp.kb_table] = 0; 366 kbd->key_maps[tmp.kb_table] = NULL;
367 kfree(key_map); 367 kfree(key_map);
368 } 368 }
369 break; 369 break;
diff --git a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c
index e95b56f810db..95e285b2e25c 100644
--- a/drivers/s390/char/raw3270.c
+++ b/drivers/s390/char/raw3270.c
@@ -555,7 +555,7 @@ raw3270_start_init(struct raw3270 *rp, struct raw3270_view *view,
555#ifdef CONFIG_TN3270_CONSOLE 555#ifdef CONFIG_TN3270_CONSOLE
556 if (raw3270_registered == 0) { 556 if (raw3270_registered == 0) {
557 spin_lock_irqsave(get_ccwdev_lock(view->dev->cdev), flags); 557 spin_lock_irqsave(get_ccwdev_lock(view->dev->cdev), flags);
558 rq->callback = 0; 558 rq->callback = NULL;
559 rc = __raw3270_start(rp, view, rq); 559 rc = __raw3270_start(rp, view, rq);
560 if (rc == 0) 560 if (rc == 0)
561 while (!raw3270_request_final(rq)) { 561 while (!raw3270_request_final(rq)) {
@@ -719,8 +719,8 @@ raw3270_size_device(struct raw3270 *rp)
719 rc = __raw3270_size_device_vm(rp); 719 rc = __raw3270_size_device_vm(rp);
720 else 720 else
721 rc = __raw3270_size_device(rp); 721 rc = __raw3270_size_device(rp);
722 raw3270_init_view.dev = 0; 722 raw3270_init_view.dev = NULL;
723 rp->view = 0; 723 rp->view = NULL;
724 up(&raw3270_init_sem); 724 up(&raw3270_init_sem);
725 if (rc == 0) { /* Found something. */ 725 if (rc == 0) { /* Found something. */
726 /* Try to find a model. */ 726 /* Try to find a model. */
@@ -761,8 +761,8 @@ raw3270_reset_device(struct raw3270 *rp)
761 rp->view = &raw3270_init_view; 761 rp->view = &raw3270_init_view;
762 raw3270_init_view.dev = rp; 762 raw3270_init_view.dev = rp;
763 rc = raw3270_start_init(rp, &raw3270_init_view, &rp->init_request); 763 rc = raw3270_start_init(rp, &raw3270_init_view, &rp->init_request);
764 raw3270_init_view.dev = 0; 764 raw3270_init_view.dev = NULL;
765 rp->view = 0; 765 rp->view = NULL;
766 up(&raw3270_init_sem); 766 up(&raw3270_init_sem);
767 return rc; 767 return rc;
768} 768}
@@ -934,7 +934,7 @@ raw3270_activate_view(struct raw3270_view *view)
934 else if (!test_bit(RAW3270_FLAGS_READY, &rp->flags)) 934 else if (!test_bit(RAW3270_FLAGS_READY, &rp->flags))
935 rc = -ENODEV; 935 rc = -ENODEV;
936 else { 936 else {
937 oldview = 0; 937 oldview = NULL;
938 if (rp->view) { 938 if (rp->view) {
939 oldview = rp->view; 939 oldview = rp->view;
940 oldview->fn->deactivate(oldview); 940 oldview->fn->deactivate(oldview);
@@ -951,7 +951,7 @@ raw3270_activate_view(struct raw3270_view *view)
951 rp->view = nv; 951 rp->view = nv;
952 if (nv->fn->activate(nv) == 0) 952 if (nv->fn->activate(nv) == 0)
953 break; 953 break;
954 rp->view = 0; 954 rp->view = NULL;
955 } 955 }
956 } 956 }
957 } 957 }
@@ -975,7 +975,7 @@ raw3270_deactivate_view(struct raw3270_view *view)
975 spin_lock_irqsave(get_ccwdev_lock(rp->cdev), flags); 975 spin_lock_irqsave(get_ccwdev_lock(rp->cdev), flags);
976 if (rp->view == view) { 976 if (rp->view == view) {
977 view->fn->deactivate(view); 977 view->fn->deactivate(view);
978 rp->view = 0; 978 rp->view = NULL;
979 /* Move deactivated view to end of list. */ 979 /* Move deactivated view to end of list. */
980 list_del_init(&view->list); 980 list_del_init(&view->list);
981 list_add_tail(&view->list, &rp->view_list); 981 list_add_tail(&view->list, &rp->view_list);
@@ -985,7 +985,7 @@ raw3270_deactivate_view(struct raw3270_view *view)
985 rp->view = view; 985 rp->view = view;
986 if (view->fn->activate(view) == 0) 986 if (view->fn->activate(view) == 0)
987 break; 987 break;
988 rp->view = 0; 988 rp->view = NULL;
989 } 989 }
990 } 990 }
991 } 991 }
@@ -1076,7 +1076,7 @@ raw3270_del_view(struct raw3270_view *view)
1076 spin_lock_irqsave(get_ccwdev_lock(rp->cdev), flags); 1076 spin_lock_irqsave(get_ccwdev_lock(rp->cdev), flags);
1077 if (rp->view == view) { 1077 if (rp->view == view) {
1078 view->fn->deactivate(view); 1078 view->fn->deactivate(view);
1079 rp->view = 0; 1079 rp->view = NULL;
1080 } 1080 }
1081 list_del_init(&view->list); 1081 list_del_init(&view->list);
1082 if (!rp->view && test_bit(RAW3270_FLAGS_READY, &rp->flags)) { 1082 if (!rp->view && test_bit(RAW3270_FLAGS_READY, &rp->flags)) {
@@ -1117,9 +1117,9 @@ raw3270_delete_device(struct raw3270 *rp)
1117 1117
1118 /* Disconnect from ccw_device. */ 1118 /* Disconnect from ccw_device. */
1119 cdev = rp->cdev; 1119 cdev = rp->cdev;
1120 rp->cdev = 0; 1120 rp->cdev = NULL;
1121 cdev->dev.driver_data = 0; 1121 cdev->dev.driver_data = NULL;
1122 cdev->handler = 0; 1122 cdev->handler = NULL;
1123 1123
1124 /* Put ccw_device structure. */ 1124 /* Put ccw_device structure. */
1125 put_device(&cdev->dev); 1125 put_device(&cdev->dev);
@@ -1144,7 +1144,7 @@ raw3270_model_show(struct device *dev, struct device_attribute *attr, char *buf)
1144 return snprintf(buf, PAGE_SIZE, "%i\n", 1144 return snprintf(buf, PAGE_SIZE, "%i\n",
1145 ((struct raw3270 *) dev->driver_data)->model); 1145 ((struct raw3270 *) dev->driver_data)->model);
1146} 1146}
1147static DEVICE_ATTR(model, 0444, raw3270_model_show, 0); 1147static DEVICE_ATTR(model, 0444, raw3270_model_show, NULL);
1148 1148
1149static ssize_t 1149static ssize_t
1150raw3270_rows_show(struct device *dev, struct device_attribute *attr, char *buf) 1150raw3270_rows_show(struct device *dev, struct device_attribute *attr, char *buf)
@@ -1152,7 +1152,7 @@ raw3270_rows_show(struct device *dev, struct device_attribute *attr, char *buf)
1152 return snprintf(buf, PAGE_SIZE, "%i\n", 1152 return snprintf(buf, PAGE_SIZE, "%i\n",
1153 ((struct raw3270 *) dev->driver_data)->rows); 1153 ((struct raw3270 *) dev->driver_data)->rows);
1154} 1154}
1155static DEVICE_ATTR(rows, 0444, raw3270_rows_show, 0); 1155static DEVICE_ATTR(rows, 0444, raw3270_rows_show, NULL);
1156 1156
1157static ssize_t 1157static ssize_t
1158raw3270_columns_show(struct device *dev, struct device_attribute *attr, char *buf) 1158raw3270_columns_show(struct device *dev, struct device_attribute *attr, char *buf)
@@ -1160,7 +1160,7 @@ raw3270_columns_show(struct device *dev, struct device_attribute *attr, char *bu
1160 return snprintf(buf, PAGE_SIZE, "%i\n", 1160 return snprintf(buf, PAGE_SIZE, "%i\n",
1161 ((struct raw3270 *) dev->driver_data)->cols); 1161 ((struct raw3270 *) dev->driver_data)->cols);
1162} 1162}
1163static DEVICE_ATTR(columns, 0444, raw3270_columns_show, 0); 1163static DEVICE_ATTR(columns, 0444, raw3270_columns_show, NULL);
1164 1164
1165static struct attribute * raw3270_attrs[] = { 1165static struct attribute * raw3270_attrs[] = {
1166 &dev_attr_model.attr, 1166 &dev_attr_model.attr,
@@ -1296,7 +1296,7 @@ raw3270_remove (struct ccw_device *cdev)
1296 spin_lock_irqsave(get_ccwdev_lock(cdev), flags); 1296 spin_lock_irqsave(get_ccwdev_lock(cdev), flags);
1297 if (rp->view) { 1297 if (rp->view) {
1298 rp->view->fn->deactivate(rp->view); 1298 rp->view->fn->deactivate(rp->view);
1299 rp->view = 0; 1299 rp->view = NULL;
1300 } 1300 }
1301 while (!list_empty(&rp->view_list)) { 1301 while (!list_empty(&rp->view_list)) {
1302 v = list_entry(rp->view_list.next, struct raw3270_view, list); 1302 v = list_entry(rp->view_list.next, struct raw3270_view, list);
diff --git a/drivers/s390/char/raw3270.h b/drivers/s390/char/raw3270.h
index b635bf8e7775..90beaa80a782 100644
--- a/drivers/s390/char/raw3270.h
+++ b/drivers/s390/char/raw3270.h
@@ -231,7 +231,7 @@ alloc_string(struct list_head *free_list, unsigned long len)
231 INIT_LIST_HEAD(&cs->update); 231 INIT_LIST_HEAD(&cs->update);
232 return cs; 232 return cs;
233 } 233 }
234 return 0; 234 return NULL;
235} 235}
236 236
237static inline unsigned long 237static inline unsigned long
diff --git a/drivers/s390/char/tape_34xx.c b/drivers/s390/char/tape_34xx.c
index 48b4d30a7256..7b95dab913d0 100644
--- a/drivers/s390/char/tape_34xx.c
+++ b/drivers/s390/char/tape_34xx.c
@@ -1309,9 +1309,9 @@ static struct tape_discipline tape_discipline_34xx = {
1309}; 1309};
1310 1310
1311static struct ccw_device_id tape_34xx_ids[] = { 1311static struct ccw_device_id tape_34xx_ids[] = {
1312 { CCW_DEVICE_DEVTYPE(0x3480, 0, 0x3480, 0), driver_info: tape_3480}, 1312 { CCW_DEVICE_DEVTYPE(0x3480, 0, 0x3480, 0), .driver_info = tape_3480},
1313 { CCW_DEVICE_DEVTYPE(0x3490, 0, 0x3490, 0), driver_info: tape_3490}, 1313 { CCW_DEVICE_DEVTYPE(0x3490, 0, 0x3490, 0), .driver_info = tape_3490},
1314 { /* end of list */ } 1314 { /* end of list */ },
1315}; 1315};
1316 1316
1317static int 1317static int
diff --git a/drivers/s390/char/tty3270.c b/drivers/s390/char/tty3270.c
index f496f236b9c0..29718042c6c9 100644
--- a/drivers/s390/char/tty3270.c
+++ b/drivers/s390/char/tty3270.c
@@ -437,7 +437,7 @@ tty3270_rcl_add(struct tty3270 *tp, char *input, int len)
437{ 437{
438 struct string *s; 438 struct string *s;
439 439
440 tp->rcl_walk = 0; 440 tp->rcl_walk = NULL;
441 if (len <= 0) 441 if (len <= 0)
442 return; 442 return;
443 if (tp->rcl_nr >= tp->rcl_max) { 443 if (tp->rcl_nr >= tp->rcl_max) {
@@ -466,12 +466,12 @@ tty3270_rcl_backward(struct kbd_data *kbd)
466 else if (!list_empty(&tp->rcl_lines)) 466 else if (!list_empty(&tp->rcl_lines))
467 tp->rcl_walk = tp->rcl_lines.prev; 467 tp->rcl_walk = tp->rcl_lines.prev;
468 s = tp->rcl_walk ? 468 s = tp->rcl_walk ?
469 list_entry(tp->rcl_walk, struct string, list) : 0; 469 list_entry(tp->rcl_walk, struct string, list) : NULL;
470 if (tp->rcl_walk) { 470 if (tp->rcl_walk) {
471 s = list_entry(tp->rcl_walk, struct string, list); 471 s = list_entry(tp->rcl_walk, struct string, list);
472 tty3270_update_prompt(tp, s->string, s->len); 472 tty3270_update_prompt(tp, s->string, s->len);
473 } else 473 } else
474 tty3270_update_prompt(tp, 0, 0); 474 tty3270_update_prompt(tp, NULL, 0);
475 tty3270_set_timer(tp, 1); 475 tty3270_set_timer(tp, 1);
476 } 476 }
477 spin_unlock_bh(&tp->view.lock); 477 spin_unlock_bh(&tp->view.lock);
@@ -553,7 +553,7 @@ tty3270_read_tasklet(struct raw3270_request *rrq)
553 * has to be emitted to the tty and for 0x6d the screen 553 * has to be emitted to the tty and for 0x6d the screen
554 * needs to be redrawn. 554 * needs to be redrawn.
555 */ 555 */
556 input = 0; 556 input = NULL;
557 len = 0; 557 len = 0;
558 if (tp->input->string[0] == 0x7d) { 558 if (tp->input->string[0] == 0x7d) {
559 /* Enter: write input to tty. */ 559 /* Enter: write input to tty. */
@@ -567,7 +567,7 @@ tty3270_read_tasklet(struct raw3270_request *rrq)
567 tty3270_update_status(tp); 567 tty3270_update_status(tp);
568 } 568 }
569 /* Clear input area. */ 569 /* Clear input area. */
570 tty3270_update_prompt(tp, 0, 0); 570 tty3270_update_prompt(tp, NULL, 0);
571 tty3270_set_timer(tp, 1); 571 tty3270_set_timer(tp, 1);
572 } else if (tp->input->string[0] == 0x6d) { 572 } else if (tp->input->string[0] == 0x6d) {
573 /* Display has been cleared. Redraw. */ 573 /* Display has been cleared. Redraw. */
@@ -808,8 +808,8 @@ tty3270_release(struct raw3270_view *view)
808 tp = (struct tty3270 *) view; 808 tp = (struct tty3270 *) view;
809 tty = tp->tty; 809 tty = tp->tty;
810 if (tty) { 810 if (tty) {
811 tty->driver_data = 0; 811 tty->driver_data = NULL;
812 tp->tty = tp->kbd->tty = 0; 812 tp->tty = tp->kbd->tty = NULL;
813 tty_hangup(tty); 813 tty_hangup(tty);
814 raw3270_put_view(&tp->view); 814 raw3270_put_view(&tp->view);
815 } 815 }
@@ -948,8 +948,8 @@ tty3270_close(struct tty_struct *tty, struct file * filp)
948 return; 948 return;
949 tp = (struct tty3270 *) tty->driver_data; 949 tp = (struct tty3270 *) tty->driver_data;
950 if (tp) { 950 if (tp) {
951 tty->driver_data = 0; 951 tty->driver_data = NULL;
952 tp->tty = tp->kbd->tty = 0; 952 tp->tty = tp->kbd->tty = NULL;
953 raw3270_put_view(&tp->view); 953 raw3270_put_view(&tp->view);
954 } 954 }
955} 955}
@@ -1673,7 +1673,7 @@ tty3270_set_termios(struct tty_struct *tty, struct termios *old)
1673 new = L_ECHO(tty) ? TF_INPUT: TF_INPUTN; 1673 new = L_ECHO(tty) ? TF_INPUT: TF_INPUTN;
1674 if (new != tp->inattr) { 1674 if (new != tp->inattr) {
1675 tp->inattr = new; 1675 tp->inattr = new;
1676 tty3270_update_prompt(tp, 0, 0); 1676 tty3270_update_prompt(tp, NULL, 0);
1677 tty3270_set_timer(tp, 1); 1677 tty3270_set_timer(tp, 1);
1678 } 1678 }
1679 } 1679 }
@@ -1759,7 +1759,7 @@ void
1759tty3270_notifier(int index, int active) 1759tty3270_notifier(int index, int active)
1760{ 1760{
1761 if (active) 1761 if (active)
1762 tty_register_device(tty3270_driver, index, 0); 1762 tty_register_device(tty3270_driver, index, NULL);
1763 else 1763 else
1764 tty_unregister_device(tty3270_driver, index); 1764 tty_unregister_device(tty3270_driver, index);
1765} 1765}
@@ -1818,7 +1818,7 @@ tty3270_exit(void)
1818 1818
1819 raw3270_unregister_notifier(tty3270_notifier); 1819 raw3270_unregister_notifier(tty3270_notifier);
1820 driver = tty3270_driver; 1820 driver = tty3270_driver;
1821 tty3270_driver = 0; 1821 tty3270_driver = NULL;
1822 tty_unregister_driver(driver); 1822 tty_unregister_driver(driver);
1823 tty3270_del_views(); 1823 tty3270_del_views();
1824} 1824}
diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c
index c625b69ebd19..6cb23040954b 100644
--- a/drivers/s390/char/vmlogrdr.c
+++ b/drivers/s390/char/vmlogrdr.c
@@ -86,8 +86,8 @@ struct vmlogrdr_priv_t {
86 */ 86 */
87static int vmlogrdr_open(struct inode *, struct file *); 87static int vmlogrdr_open(struct inode *, struct file *);
88static int vmlogrdr_release(struct inode *, struct file *); 88static int vmlogrdr_release(struct inode *, struct file *);
89static ssize_t vmlogrdr_read (struct file *filp, char *data, size_t count, 89static ssize_t vmlogrdr_read (struct file *filp, char __user *data,
90 loff_t * ppos); 90 size_t count, loff_t * ppos);
91 91
92static struct file_operations vmlogrdr_fops = { 92static struct file_operations vmlogrdr_fops = {
93 .owner = THIS_MODULE, 93 .owner = THIS_MODULE,
@@ -515,7 +515,7 @@ vmlogrdr_receive_data(struct vmlogrdr_priv_t *priv) {
515 515
516 516
517static ssize_t 517static ssize_t
518vmlogrdr_read (struct file *filp, char *data, size_t count, loff_t * ppos) 518vmlogrdr_read(struct file *filp, char __user *data, size_t count, loff_t * ppos)
519{ 519{
520 int rc; 520 int rc;
521 struct vmlogrdr_priv_t * priv = filp->private_data; 521 struct vmlogrdr_priv_t * priv = filp->private_data;
diff --git a/drivers/s390/char/vmwatchdog.c b/drivers/s390/char/vmwatchdog.c
index 5acc0ace3d7d..807320a41fa4 100644
--- a/drivers/s390/char/vmwatchdog.c
+++ b/drivers/s390/char/vmwatchdog.c
@@ -193,7 +193,7 @@ static int vmwdt_ioctl(struct inode *i, struct file *f,
193 return 0; 193 return 0;
194 case WDIOC_GETSTATUS: 194 case WDIOC_GETSTATUS:
195 case WDIOC_GETBOOTSTATUS: 195 case WDIOC_GETBOOTSTATUS:
196 return put_user(0, (int *)arg); 196 return put_user(0, (int __user *)arg);
197 case WDIOC_GETTEMP: 197 case WDIOC_GETTEMP:
198 return -EINVAL; 198 return -EINVAL;
199 case WDIOC_SETOPTIONS: 199 case WDIOC_SETOPTIONS:
diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c
index c7319a07ba35..f26a2ee3aad8 100644
--- a/drivers/s390/cio/ccwgroup.c
+++ b/drivers/s390/cio/ccwgroup.c
@@ -319,7 +319,7 @@ ccwgroup_online_store (struct device *dev, struct device_attribute *attr, const
319 if (!try_module_get(gdrv->owner)) 319 if (!try_module_get(gdrv->owner))
320 return -EINVAL; 320 return -EINVAL;
321 321
322 value = simple_strtoul(buf, 0, 0); 322 value = simple_strtoul(buf, NULL, 0);
323 ret = count; 323 ret = count;
324 if (value == 1) 324 if (value == 1)
325 ccwgroup_set_online(gdev); 325 ccwgroup_set_online(gdev);
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c
index a01f3bba4a7b..61ce3f1d5228 100644
--- a/drivers/s390/cio/chsc.c
+++ b/drivers/s390/cio/chsc.c
@@ -1464,6 +1464,40 @@ chsc_get_chp_desc(struct subchannel *sch, int chp_no)
1464 return desc; 1464 return desc;
1465} 1465}
1466 1466
1467static int reset_channel_path(struct channel_path *chp)
1468{
1469 int cc;
1470
1471 cc = rchp(chp->id);
1472 switch (cc) {
1473 case 0:
1474 return 0;
1475 case 2:
1476 return -EBUSY;
1477 default:
1478 return -ENODEV;
1479 }
1480}
1481
1482static void reset_channel_paths_css(struct channel_subsystem *css)
1483{
1484 int i;
1485
1486 for (i = 0; i <= __MAX_CHPID; i++) {
1487 if (css->chps[i])
1488 reset_channel_path(css->chps[i]);
1489 }
1490}
1491
1492void cio_reset_channel_paths(void)
1493{
1494 int i;
1495
1496 for (i = 0; i <= __MAX_CSSID; i++) {
1497 if (css[i] && css[i]->valid)
1498 reset_channel_paths_css(css[i]);
1499 }
1500}
1467 1501
1468static int __init 1502static int __init
1469chsc_alloc_sei_area(void) 1503chsc_alloc_sei_area(void)
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c
index 6fec90eab00e..89320c1ad825 100644
--- a/drivers/s390/cio/cio.c
+++ b/drivers/s390/cio/cio.c
@@ -519,6 +519,7 @@ cio_validate_subchannel (struct subchannel *sch, struct subchannel_id schid)
519 memset(sch, 0, sizeof(struct subchannel)); 519 memset(sch, 0, sizeof(struct subchannel));
520 520
521 spin_lock_init(&sch->lock); 521 spin_lock_init(&sch->lock);
522 mutex_init(&sch->reg_mutex);
522 523
523 /* Set a name for the subchannel */ 524 /* Set a name for the subchannel */
524 snprintf (sch->dev.bus_id, BUS_ID_SIZE, "0.%x.%04x", schid.ssid, 525 snprintf (sch->dev.bus_id, BUS_ID_SIZE, "0.%x.%04x", schid.ssid,
@@ -797,7 +798,7 @@ struct subchannel *
797cio_get_console_subchannel(void) 798cio_get_console_subchannel(void)
798{ 799{
799 if (!console_subchannel_in_use) 800 if (!console_subchannel_in_use)
800 return 0; 801 return NULL;
801 return &console_subchannel; 802 return &console_subchannel;
802} 803}
803 804
@@ -875,5 +876,6 @@ void
875reipl(unsigned long devno) 876reipl(unsigned long devno)
876{ 877{
877 clear_all_subchannels(); 878 clear_all_subchannels();
879 cio_reset_channel_paths();
878 do_reipl(devno); 880 do_reipl(devno);
879} 881}
diff --git a/drivers/s390/cio/cio.h b/drivers/s390/cio/cio.h
index 0ca987344e07..4541c1af4b66 100644
--- a/drivers/s390/cio/cio.h
+++ b/drivers/s390/cio/cio.h
@@ -2,6 +2,7 @@
2#define S390_CIO_H 2#define S390_CIO_H
3 3
4#include "schid.h" 4#include "schid.h"
5#include <linux/mutex.h>
5 6
6/* 7/*
7 * where we put the ssd info 8 * where we put the ssd info
@@ -87,7 +88,7 @@ struct orb {
87struct subchannel { 88struct subchannel {
88 struct subchannel_id schid; 89 struct subchannel_id schid;
89 spinlock_t lock; /* subchannel lock */ 90 spinlock_t lock; /* subchannel lock */
90 91 struct mutex reg_mutex;
91 enum { 92 enum {
92 SUBCHANNEL_TYPE_IO = 0, 93 SUBCHANNEL_TYPE_IO = 0,
93 SUBCHANNEL_TYPE_CHSC = 1, 94 SUBCHANNEL_TYPE_CHSC = 1,
diff --git a/drivers/s390/cio/cmf.c b/drivers/s390/cio/cmf.c
index 1c3e8e9012b0..0df3af1f08de 100644
--- a/drivers/s390/cio/cmf.c
+++ b/drivers/s390/cio/cmf.c
@@ -1140,7 +1140,7 @@ static struct attribute *cmf_attributes[] = {
1140 &dev_attr_avg_device_disconnect_time.attr, 1140 &dev_attr_avg_device_disconnect_time.attr,
1141 &dev_attr_avg_control_unit_queuing_time.attr, 1141 &dev_attr_avg_control_unit_queuing_time.attr,
1142 &dev_attr_avg_device_active_only_time.attr, 1142 &dev_attr_avg_device_active_only_time.attr,
1143 0, 1143 NULL,
1144}; 1144};
1145 1145
1146static struct attribute_group cmf_attr_group = { 1146static struct attribute_group cmf_attr_group = {
@@ -1160,7 +1160,7 @@ static struct attribute *cmf_attributes_ext[] = {
1160 &dev_attr_avg_device_active_only_time.attr, 1160 &dev_attr_avg_device_active_only_time.attr,
1161 &dev_attr_avg_device_busy_time.attr, 1161 &dev_attr_avg_device_busy_time.attr,
1162 &dev_attr_avg_initial_command_response_time.attr, 1162 &dev_attr_avg_initial_command_response_time.attr,
1163 0, 1163 NULL,
1164}; 1164};
1165 1165
1166static struct attribute_group cmf_attr_group_ext = { 1166static struct attribute_group cmf_attr_group_ext = {
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c
index 1d3be80797f8..13eeea3d547f 100644
--- a/drivers/s390/cio/css.c
+++ b/drivers/s390/cio/css.c
@@ -108,6 +108,24 @@ css_subchannel_release(struct device *dev)
108 108
109extern int css_get_ssd_info(struct subchannel *sch); 109extern int css_get_ssd_info(struct subchannel *sch);
110 110
111
112int css_sch_device_register(struct subchannel *sch)
113{
114 int ret;
115
116 mutex_lock(&sch->reg_mutex);
117 ret = device_register(&sch->dev);
118 mutex_unlock(&sch->reg_mutex);
119 return ret;
120}
121
122void css_sch_device_unregister(struct subchannel *sch)
123{
124 mutex_lock(&sch->reg_mutex);
125 device_unregister(&sch->dev);
126 mutex_unlock(&sch->reg_mutex);
127}
128
111static int 129static int
112css_register_subchannel(struct subchannel *sch) 130css_register_subchannel(struct subchannel *sch)
113{ 131{
@@ -119,7 +137,7 @@ css_register_subchannel(struct subchannel *sch)
119 sch->dev.release = &css_subchannel_release; 137 sch->dev.release = &css_subchannel_release;
120 138
121 /* make it known to the system */ 139 /* make it known to the system */
122 ret = device_register(&sch->dev); 140 ret = css_sch_device_register(sch);
123 if (ret) 141 if (ret)
124 printk (KERN_WARNING "%s: could not register %s\n", 142 printk (KERN_WARNING "%s: could not register %s\n",
125 __func__, sch->dev.bus_id); 143 __func__, sch->dev.bus_id);
@@ -250,7 +268,7 @@ css_evaluate_subchannel(struct subchannel_id schid, int slow)
250 * The device will be killed automatically. 268 * The device will be killed automatically.
251 */ 269 */
252 cio_disable_subchannel(sch); 270 cio_disable_subchannel(sch);
253 device_unregister(&sch->dev); 271 css_sch_device_unregister(sch);
254 /* Reset intparm to zeroes. */ 272 /* Reset intparm to zeroes. */
255 sch->schib.pmcw.intparm = 0; 273 sch->schib.pmcw.intparm = 0;
256 cio_modify(sch); 274 cio_modify(sch);
@@ -264,7 +282,7 @@ css_evaluate_subchannel(struct subchannel_id schid, int slow)
264 * away in any case. 282 * away in any case.
265 */ 283 */
266 if (!disc) { 284 if (!disc) {
267 device_unregister(&sch->dev); 285 css_sch_device_unregister(sch);
268 /* Reset intparm to zeroes. */ 286 /* Reset intparm to zeroes. */
269 sch->schib.pmcw.intparm = 0; 287 sch->schib.pmcw.intparm = 0;
270 cio_modify(sch); 288 cio_modify(sch);
@@ -605,9 +623,13 @@ init_channel_subsystem (void)
605 ret = device_register(&css[i]->device); 623 ret = device_register(&css[i]->device);
606 if (ret) 624 if (ret)
607 goto out_free; 625 goto out_free;
608 if (css_characteristics_avail && css_chsc_characteristics.secm) 626 if (css_characteristics_avail &&
609 device_create_file(&css[i]->device, 627 css_chsc_characteristics.secm) {
610 &dev_attr_cm_enable); 628 ret = device_create_file(&css[i]->device,
629 &dev_attr_cm_enable);
630 if (ret)
631 goto out_device;
632 }
611 } 633 }
612 css_init_done = 1; 634 css_init_done = 1;
613 635
@@ -615,6 +637,8 @@ init_channel_subsystem (void)
615 637
616 for_each_subchannel(__init_channel_subsystem, NULL); 638 for_each_subchannel(__init_channel_subsystem, NULL);
617 return 0; 639 return 0;
640out_device:
641 device_unregister(&css[i]->device);
618out_free: 642out_free:
619 kfree(css[i]); 643 kfree(css[i]);
620out_unregister: 644out_unregister:
diff --git a/drivers/s390/cio/css.h b/drivers/s390/cio/css.h
index e210f89a2449..8aabb4adeb5f 100644
--- a/drivers/s390/cio/css.h
+++ b/drivers/s390/cio/css.h
@@ -100,7 +100,7 @@ struct ccw_device_private {
100 struct qdio_irq *qdio_data; 100 struct qdio_irq *qdio_data;
101 struct irb irb; /* device status */ 101 struct irb irb; /* device status */
102 struct senseid senseid; /* SenseID info */ 102 struct senseid senseid; /* SenseID info */
103 struct pgid pgid; /* path group ID */ 103 struct pgid pgid[8]; /* path group IDs per chpid*/
104 struct ccw1 iccws[2]; /* ccws for SNID/SID/SPGID commands */ 104 struct ccw1 iccws[2]; /* ccws for SNID/SID/SPGID commands */
105 struct work_struct kick_work; 105 struct work_struct kick_work;
106 wait_queue_head_t wait_q; 106 wait_queue_head_t wait_q;
@@ -136,6 +136,8 @@ extern struct bus_type css_bus_type;
136extern struct css_driver io_subchannel_driver; 136extern struct css_driver io_subchannel_driver;
137 137
138extern int css_probe_device(struct subchannel_id); 138extern int css_probe_device(struct subchannel_id);
139extern int css_sch_device_register(struct subchannel *);
140extern void css_sch_device_unregister(struct subchannel *);
139extern struct subchannel * get_subchannel_by_schid(struct subchannel_id); 141extern struct subchannel * get_subchannel_by_schid(struct subchannel_id);
140extern int css_init_done; 142extern int css_init_done;
141extern int for_each_subchannel(int(*fn)(struct subchannel_id, void *), void *); 143extern int for_each_subchannel(int(*fn)(struct subchannel_id, void *), void *);
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
index 67f0de6aed33..585fa04233c3 100644
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -100,7 +100,7 @@ ccw_uevent (struct device *dev, char **envp, int num_envp,
100 if ((buffer_size - length <= 0) || (i >= num_envp)) 100 if ((buffer_size - length <= 0) || (i >= num_envp))
101 return -ENOMEM; 101 return -ENOMEM;
102 102
103 envp[i] = 0; 103 envp[i] = NULL;
104 104
105 return 0; 105 return 0;
106} 106}
@@ -280,7 +280,7 @@ ccw_device_remove_disconnected(struct ccw_device *cdev)
280 * 'throw away device'. 280 * 'throw away device'.
281 */ 281 */
282 sch = to_subchannel(cdev->dev.parent); 282 sch = to_subchannel(cdev->dev.parent);
283 device_unregister(&sch->dev); 283 css_sch_device_unregister(sch);
284 /* Reset intparm to zeroes. */ 284 /* Reset intparm to zeroes. */
285 sch->schib.pmcw.intparm = 0; 285 sch->schib.pmcw.intparm = 0;
286 cio_modify(sch); 286 cio_modify(sch);
@@ -625,7 +625,7 @@ ccw_device_do_unreg_rereg(void *data)
625 other_sch->schib.pmcw.intparm = 0; 625 other_sch->schib.pmcw.intparm = 0;
626 cio_modify(other_sch); 626 cio_modify(other_sch);
627 } 627 }
628 device_unregister(&other_sch->dev); 628 css_sch_device_unregister(other_sch);
629 } 629 }
630 } 630 }
631 /* Update ssd info here. */ 631 /* Update ssd info here. */
@@ -709,7 +709,7 @@ ccw_device_call_sch_unregister(void *data)
709 struct subchannel *sch; 709 struct subchannel *sch;
710 710
711 sch = to_subchannel(cdev->dev.parent); 711 sch = to_subchannel(cdev->dev.parent);
712 device_unregister(&sch->dev); 712 css_sch_device_unregister(sch);
713 /* Reset intparm to zeroes. */ 713 /* Reset intparm to zeroes. */
714 sch->schib.pmcw.intparm = 0; 714 sch->schib.pmcw.intparm = 0;
715 cio_modify(sch); 715 cio_modify(sch);
@@ -1057,7 +1057,7 @@ get_ccwdev_by_busid(struct ccw_driver *cdrv, const char *bus_id)
1057 __ccwdev_check_busid); 1057 __ccwdev_check_busid);
1058 put_driver(drv); 1058 put_driver(drv);
1059 1059
1060 return dev ? to_ccwdev(dev) : 0; 1060 return dev ? to_ccwdev(dev) : NULL;
1061} 1061}
1062 1062
1063/************************** device driver handling ************************/ 1063/************************** device driver handling ************************/
@@ -1082,7 +1082,7 @@ ccw_device_probe (struct device *dev)
1082 ret = cdrv->probe ? cdrv->probe(cdev) : -ENODEV; 1082 ret = cdrv->probe ? cdrv->probe(cdev) : -ENODEV;
1083 1083
1084 if (ret) { 1084 if (ret) {
1085 cdev->drv = 0; 1085 cdev->drv = NULL;
1086 return ret; 1086 return ret;
1087 } 1087 }
1088 1088
@@ -1113,7 +1113,7 @@ ccw_device_remove (struct device *dev)
1113 ret, cdev->dev.bus_id); 1113 ret, cdev->dev.bus_id);
1114 } 1114 }
1115 ccw_device_set_timeout(cdev, 0); 1115 ccw_device_set_timeout(cdev, 0);
1116 cdev->drv = 0; 1116 cdev->drv = NULL;
1117 return 0; 1117 return 0;
1118} 1118}
1119 1119
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c
index cb1af0b6f033..ac6e0c7e43d9 100644
--- a/drivers/s390/cio/device_fsm.c
+++ b/drivers/s390/cio/device_fsm.c
@@ -378,6 +378,56 @@ ccw_device_done(struct ccw_device *cdev, int state)
378 put_device (&cdev->dev); 378 put_device (&cdev->dev);
379} 379}
380 380
381static inline int cmp_pgid(struct pgid *p1, struct pgid *p2)
382{
383 char *c1;
384 char *c2;
385
386 c1 = (char *)p1;
387 c2 = (char *)p2;
388
389 return memcmp(c1 + 1, c2 + 1, sizeof(struct pgid) - 1);
390}
391
392static void __ccw_device_get_common_pgid(struct ccw_device *cdev)
393{
394 int i;
395 int last;
396
397 last = 0;
398 for (i = 0; i < 8; i++) {
399 if (cdev->private->pgid[i].inf.ps.state1 == SNID_STATE1_RESET)
400 /* No PGID yet */
401 continue;
402 if (cdev->private->pgid[last].inf.ps.state1 ==
403 SNID_STATE1_RESET) {
404 /* First non-zero PGID */
405 last = i;
406 continue;
407 }
408 if (cmp_pgid(&cdev->private->pgid[i],
409 &cdev->private->pgid[last]) == 0)
410 /* Non-conflicting PGIDs */
411 continue;
412
413 /* PGID mismatch, can't pathgroup. */
414 CIO_MSG_EVENT(0, "SNID - pgid mismatch for device "
415 "0.%x.%04x, can't pathgroup\n",
416 cdev->private->ssid, cdev->private->devno);
417 cdev->private->options.pgroup = 0;
418 return;
419 }
420 if (cdev->private->pgid[last].inf.ps.state1 ==
421 SNID_STATE1_RESET)
422 /* No previous pgid found */
423 memcpy(&cdev->private->pgid[0], &css[0]->global_pgid,
424 sizeof(struct pgid));
425 else
426 /* Use existing pgid */
427 memcpy(&cdev->private->pgid[0], &cdev->private->pgid[last],
428 sizeof(struct pgid));
429}
430
381/* 431/*
382 * Function called from device_pgid.c after sense path ground has completed. 432 * Function called from device_pgid.c after sense path ground has completed.
383 */ 433 */
@@ -388,24 +438,26 @@ ccw_device_sense_pgid_done(struct ccw_device *cdev, int err)
388 438
389 sch = to_subchannel(cdev->dev.parent); 439 sch = to_subchannel(cdev->dev.parent);
390 switch (err) { 440 switch (err) {
391 case 0: 441 case -EOPNOTSUPP: /* path grouping not supported, use nop instead. */
392 /* Start Path Group verification. */ 442 cdev->private->options.pgroup = 0;
393 sch->vpm = 0; /* Start with no path groups set. */ 443 break;
394 cdev->private->state = DEV_STATE_VERIFY; 444 case 0: /* success */
395 ccw_device_verify_start(cdev); 445 case -EACCES: /* partial success, some paths not operational */
446 /* Check if all pgids are equal or 0. */
447 __ccw_device_get_common_pgid(cdev);
396 break; 448 break;
397 case -ETIME: /* Sense path group id stopped by timeout. */ 449 case -ETIME: /* Sense path group id stopped by timeout. */
398 case -EUSERS: /* device is reserved for someone else. */ 450 case -EUSERS: /* device is reserved for someone else. */
399 ccw_device_done(cdev, DEV_STATE_BOXED); 451 ccw_device_done(cdev, DEV_STATE_BOXED);
400 break; 452 return;
401 case -EOPNOTSUPP: /* path grouping not supported, just set online. */
402 cdev->private->options.pgroup = 0;
403 ccw_device_done(cdev, DEV_STATE_ONLINE);
404 break;
405 default: 453 default:
406 ccw_device_done(cdev, DEV_STATE_NOT_OPER); 454 ccw_device_done(cdev, DEV_STATE_NOT_OPER);
407 break; 455 return;
408 } 456 }
457 /* Start Path Group verification. */
458 sch->vpm = 0; /* Start with no path groups set. */
459 cdev->private->state = DEV_STATE_VERIFY;
460 ccw_device_verify_start(cdev);
409} 461}
410 462
411/* 463/*
@@ -562,8 +614,9 @@ ccw_device_online(struct ccw_device *cdev)
562 } 614 }
563 /* Do we want to do path grouping? */ 615 /* Do we want to do path grouping? */
564 if (!cdev->private->options.pgroup) { 616 if (!cdev->private->options.pgroup) {
565 /* No, set state online immediately. */ 617 /* Start initial path verification. */
566 ccw_device_done(cdev, DEV_STATE_ONLINE); 618 cdev->private->state = DEV_STATE_VERIFY;
619 ccw_device_verify_start(cdev);
567 return 0; 620 return 0;
568 } 621 }
569 /* Do a SensePGID first. */ 622 /* Do a SensePGID first. */
@@ -609,6 +662,7 @@ ccw_device_offline(struct ccw_device *cdev)
609 /* Are we doing path grouping? */ 662 /* Are we doing path grouping? */
610 if (!cdev->private->options.pgroup) { 663 if (!cdev->private->options.pgroup) {
611 /* No, set state offline immediately. */ 664 /* No, set state offline immediately. */
665 sch->vpm = 0;
612 ccw_device_done(cdev, DEV_STATE_OFFLINE); 666 ccw_device_done(cdev, DEV_STATE_OFFLINE);
613 return 0; 667 return 0;
614 } 668 }
@@ -705,8 +759,6 @@ ccw_device_online_verify(struct ccw_device *cdev, enum dev_event dev_event)
705{ 759{
706 struct subchannel *sch; 760 struct subchannel *sch;
707 761
708 if (!cdev->private->options.pgroup)
709 return;
710 if (cdev->private->state == DEV_STATE_W4SENSE) { 762 if (cdev->private->state == DEV_STATE_W4SENSE) {
711 cdev->private->flags.doverify = 1; 763 cdev->private->flags.doverify = 1;
712 return; 764 return;
@@ -995,8 +1047,7 @@ static void
995ccw_device_wait4io_verify(struct ccw_device *cdev, enum dev_event dev_event) 1047ccw_device_wait4io_verify(struct ccw_device *cdev, enum dev_event dev_event)
996{ 1048{
997 /* When the I/O has terminated, we have to start verification. */ 1049 /* When the I/O has terminated, we have to start verification. */
998 if (cdev->private->options.pgroup) 1050 cdev->private->flags.doverify = 1;
999 cdev->private->flags.doverify = 1;
1000} 1051}
1001 1052
1002static void 1053static void
diff --git a/drivers/s390/cio/device_pgid.c b/drivers/s390/cio/device_pgid.c
index 54cb64ed0786..32610fd8868e 100644
--- a/drivers/s390/cio/device_pgid.c
+++ b/drivers/s390/cio/device_pgid.c
@@ -33,12 +33,17 @@ __ccw_device_sense_pgid_start(struct ccw_device *cdev)
33 struct subchannel *sch; 33 struct subchannel *sch;
34 struct ccw1 *ccw; 34 struct ccw1 *ccw;
35 int ret; 35 int ret;
36 int i;
36 37
37 sch = to_subchannel(cdev->dev.parent); 38 sch = to_subchannel(cdev->dev.parent);
39 /* Return if we already checked on all paths. */
40 if (cdev->private->imask == 0)
41 return (sch->lpm == 0) ? -ENODEV : -EACCES;
42 i = 8 - ffs(cdev->private->imask);
43
38 /* Setup sense path group id channel program. */ 44 /* Setup sense path group id channel program. */
39 ccw = cdev->private->iccws; 45 ccw = cdev->private->iccws;
40 ccw->cmd_code = CCW_CMD_SENSE_PGID; 46 ccw->cmd_code = CCW_CMD_SENSE_PGID;
41 ccw->cda = (__u32) __pa (&cdev->private->pgid);
42 ccw->count = sizeof (struct pgid); 47 ccw->count = sizeof (struct pgid);
43 ccw->flags = CCW_FLAG_SLI; 48 ccw->flags = CCW_FLAG_SLI;
44 49
@@ -48,6 +53,7 @@ __ccw_device_sense_pgid_start(struct ccw_device *cdev)
48 ret = -ENODEV; 53 ret = -ENODEV;
49 while (cdev->private->imask != 0) { 54 while (cdev->private->imask != 0) {
50 /* Try every path multiple times. */ 55 /* Try every path multiple times. */
56 ccw->cda = (__u32) __pa (&cdev->private->pgid[i]);
51 if (cdev->private->iretry > 0) { 57 if (cdev->private->iretry > 0) {
52 cdev->private->iretry--; 58 cdev->private->iretry--;
53 ret = cio_start (sch, cdev->private->iccws, 59 ret = cio_start (sch, cdev->private->iccws,
@@ -64,7 +70,9 @@ __ccw_device_sense_pgid_start(struct ccw_device *cdev)
64 } 70 }
65 cdev->private->imask >>= 1; 71 cdev->private->imask >>= 1;
66 cdev->private->iretry = 5; 72 cdev->private->iretry = 5;
73 i++;
67 } 74 }
75
68 return ret; 76 return ret;
69} 77}
70 78
@@ -76,7 +84,7 @@ ccw_device_sense_pgid_start(struct ccw_device *cdev)
76 cdev->private->state = DEV_STATE_SENSE_PGID; 84 cdev->private->state = DEV_STATE_SENSE_PGID;
77 cdev->private->imask = 0x80; 85 cdev->private->imask = 0x80;
78 cdev->private->iretry = 5; 86 cdev->private->iretry = 5;
79 memset (&cdev->private->pgid, 0, sizeof (struct pgid)); 87 memset (&cdev->private->pgid, 0, sizeof (cdev->private->pgid));
80 ret = __ccw_device_sense_pgid_start(cdev); 88 ret = __ccw_device_sense_pgid_start(cdev);
81 if (ret && ret != -EBUSY) 89 if (ret && ret != -EBUSY)
82 ccw_device_sense_pgid_done(cdev, ret); 90 ccw_device_sense_pgid_done(cdev, ret);
@@ -91,6 +99,7 @@ __ccw_device_check_sense_pgid(struct ccw_device *cdev)
91{ 99{
92 struct subchannel *sch; 100 struct subchannel *sch;
93 struct irb *irb; 101 struct irb *irb;
102 int i;
94 103
95 sch = to_subchannel(cdev->dev.parent); 104 sch = to_subchannel(cdev->dev.parent);
96 irb = &cdev->private->irb; 105 irb = &cdev->private->irb;
@@ -124,7 +133,8 @@ __ccw_device_check_sense_pgid(struct ccw_device *cdev)
124 sch->schid.sch_no, sch->orb.lpm); 133 sch->schid.sch_no, sch->orb.lpm);
125 return -EACCES; 134 return -EACCES;
126 } 135 }
127 if (cdev->private->pgid.inf.ps.state2 == SNID_STATE2_RESVD_ELSE) { 136 i = 8 - ffs(cdev->private->imask);
137 if (cdev->private->pgid[i].inf.ps.state2 == SNID_STATE2_RESVD_ELSE) {
128 CIO_MSG_EVENT(2, "SNID - Device %04x on Subchannel 0.%x.%04x " 138 CIO_MSG_EVENT(2, "SNID - Device %04x on Subchannel 0.%x.%04x "
129 "is reserved by someone else\n", 139 "is reserved by someone else\n",
130 cdev->private->devno, sch->schid.ssid, 140 cdev->private->devno, sch->schid.ssid,
@@ -162,12 +172,6 @@ ccw_device_sense_pgid_irq(struct ccw_device *cdev, enum dev_event dev_event)
162 memset(&cdev->private->irb, 0, sizeof(struct irb)); 172 memset(&cdev->private->irb, 0, sizeof(struct irb));
163 switch (ret) { 173 switch (ret) {
164 /* 0, -ETIME, -EOPNOTSUPP, -EAGAIN, -EACCES or -EUSERS */ 174 /* 0, -ETIME, -EOPNOTSUPP, -EAGAIN, -EACCES or -EUSERS */
165 case 0: /* Sense Path Group ID successful. */
166 if (cdev->private->pgid.inf.ps.state1 == SNID_STATE1_RESET)
167 memcpy(&cdev->private->pgid, &css[0]->global_pgid,
168 sizeof(struct pgid));
169 ccw_device_sense_pgid_done(cdev, 0);
170 break;
171 case -EOPNOTSUPP: /* Sense Path Group ID not supported */ 175 case -EOPNOTSUPP: /* Sense Path Group ID not supported */
172 ccw_device_sense_pgid_done(cdev, -EOPNOTSUPP); 176 ccw_device_sense_pgid_done(cdev, -EOPNOTSUPP);
173 break; 177 break;
@@ -176,13 +180,15 @@ ccw_device_sense_pgid_irq(struct ccw_device *cdev, enum dev_event dev_event)
176 break; 180 break;
177 case -EACCES: /* channel is not operational. */ 181 case -EACCES: /* channel is not operational. */
178 sch->lpm &= ~cdev->private->imask; 182 sch->lpm &= ~cdev->private->imask;
183 /* Fall through. */
184 case 0: /* Sense Path Group ID successful. */
179 cdev->private->imask >>= 1; 185 cdev->private->imask >>= 1;
180 cdev->private->iretry = 5; 186 cdev->private->iretry = 5;
181 /* Fall through. */ 187 /* Fall through. */
182 case -EAGAIN: /* Try again. */ 188 case -EAGAIN: /* Try again. */
183 ret = __ccw_device_sense_pgid_start(cdev); 189 ret = __ccw_device_sense_pgid_start(cdev);
184 if (ret != 0 && ret != -EBUSY) 190 if (ret != 0 && ret != -EBUSY)
185 ccw_device_sense_pgid_done(cdev, -ENODEV); 191 ccw_device_sense_pgid_done(cdev, ret);
186 break; 192 break;
187 case -EUSERS: /* device is reserved for someone else. */ 193 case -EUSERS: /* device is reserved for someone else. */
188 ccw_device_sense_pgid_done(cdev, -EUSERS); 194 ccw_device_sense_pgid_done(cdev, -EUSERS);
@@ -203,20 +209,20 @@ __ccw_device_do_pgid(struct ccw_device *cdev, __u8 func)
203 sch = to_subchannel(cdev->dev.parent); 209 sch = to_subchannel(cdev->dev.parent);
204 210
205 /* Setup sense path group id channel program. */ 211 /* Setup sense path group id channel program. */
206 cdev->private->pgid.inf.fc = func; 212 cdev->private->pgid[0].inf.fc = func;
207 ccw = cdev->private->iccws; 213 ccw = cdev->private->iccws;
208 if (!cdev->private->flags.pgid_single) { 214 if (!cdev->private->flags.pgid_single) {
209 cdev->private->pgid.inf.fc |= SPID_FUNC_MULTI_PATH; 215 cdev->private->pgid[0].inf.fc |= SPID_FUNC_MULTI_PATH;
210 ccw->cmd_code = CCW_CMD_SUSPEND_RECONN; 216 ccw->cmd_code = CCW_CMD_SUSPEND_RECONN;
211 ccw->cda = 0; 217 ccw->cda = 0;
212 ccw->count = 0; 218 ccw->count = 0;
213 ccw->flags = CCW_FLAG_SLI | CCW_FLAG_CC; 219 ccw->flags = CCW_FLAG_SLI | CCW_FLAG_CC;
214 ccw++; 220 ccw++;
215 } else 221 } else
216 cdev->private->pgid.inf.fc |= SPID_FUNC_SINGLE_PATH; 222 cdev->private->pgid[0].inf.fc |= SPID_FUNC_SINGLE_PATH;
217 223
218 ccw->cmd_code = CCW_CMD_SET_PGID; 224 ccw->cmd_code = CCW_CMD_SET_PGID;
219 ccw->cda = (__u32) __pa (&cdev->private->pgid); 225 ccw->cda = (__u32) __pa (&cdev->private->pgid[0]);
220 ccw->count = sizeof (struct pgid); 226 ccw->count = sizeof (struct pgid);
221 ccw->flags = CCW_FLAG_SLI; 227 ccw->flags = CCW_FLAG_SLI;
222 228
@@ -244,6 +250,48 @@ __ccw_device_do_pgid(struct ccw_device *cdev, __u8 func)
244} 250}
245 251
246/* 252/*
253 * Helper function to send a nop ccw down a path.
254 */
255static int __ccw_device_do_nop(struct ccw_device *cdev)
256{
257 struct subchannel *sch;
258 struct ccw1 *ccw;
259 int ret;
260
261 sch = to_subchannel(cdev->dev.parent);
262
263 /* Setup nop channel program. */
264 ccw = cdev->private->iccws;
265 ccw->cmd_code = CCW_CMD_NOOP;
266 ccw->cda = 0;
267 ccw->count = 0;
268 ccw->flags = CCW_FLAG_SLI;
269
270 /* Reset device status. */
271 memset(&cdev->private->irb, 0, sizeof(struct irb));
272
273 /* Try multiple times. */
274 ret = -ENODEV;
275 if (cdev->private->iretry > 0) {
276 cdev->private->iretry--;
277 ret = cio_start (sch, cdev->private->iccws,
278 cdev->private->imask);
279 /* ret is 0, -EBUSY, -EACCES or -ENODEV */
280 if ((ret != -EACCES) && (ret != -ENODEV))
281 return ret;
282 }
283 /* nop command failed on this path. Switch it off. */
284 sch->lpm &= ~cdev->private->imask;
285 sch->vpm &= ~cdev->private->imask;
286 CIO_MSG_EVENT(2, "NOP - Device %04x on Subchannel "
287 "0.%x.%04x, lpm %02X, became 'not operational'\n",
288 cdev->private->devno, sch->schid.ssid,
289 sch->schid.sch_no, cdev->private->imask);
290 return ret;
291}
292
293
294/*
247 * Called from interrupt context to check if a valid answer 295 * Called from interrupt context to check if a valid answer
248 * to Set Path Group ID was received. 296 * to Set Path Group ID was received.
249 */ 297 */
@@ -282,6 +330,29 @@ __ccw_device_check_pgid(struct ccw_device *cdev)
282 return 0; 330 return 0;
283} 331}
284 332
333/*
334 * Called from interrupt context to check the path status after a nop has
335 * been send.
336 */
337static int __ccw_device_check_nop(struct ccw_device *cdev)
338{
339 struct subchannel *sch;
340 struct irb *irb;
341
342 sch = to_subchannel(cdev->dev.parent);
343 irb = &cdev->private->irb;
344 if (irb->scsw.fctl & (SCSW_FCTL_HALT_FUNC | SCSW_FCTL_CLEAR_FUNC))
345 return -ETIME;
346 if (irb->scsw.cc == 3) {
347 CIO_MSG_EVENT(2, "NOP - Device %04x on Subchannel 0.%x.%04x,"
348 " lpm %02X, became 'not operational'\n",
349 cdev->private->devno, sch->schid.ssid,
350 sch->schid.sch_no, cdev->private->imask);
351 return -EACCES;
352 }
353 return 0;
354}
355
285static void 356static void
286__ccw_device_verify_start(struct ccw_device *cdev) 357__ccw_device_verify_start(struct ccw_device *cdev)
287{ 358{
@@ -296,9 +367,12 @@ __ccw_device_verify_start(struct ccw_device *cdev)
296 if ((sch->vpm & imask) != (sch->lpm & imask)) 367 if ((sch->vpm & imask) != (sch->lpm & imask))
297 break; 368 break;
298 cdev->private->imask = imask; 369 cdev->private->imask = imask;
299 func = (sch->vpm & imask) ? 370 if (cdev->private->options.pgroup) {
300 SPID_FUNC_RESIGN : SPID_FUNC_ESTABLISH; 371 func = (sch->vpm & imask) ?
301 ret = __ccw_device_do_pgid(cdev, func); 372 SPID_FUNC_RESIGN : SPID_FUNC_ESTABLISH;
373 ret = __ccw_device_do_pgid(cdev, func);
374 } else
375 ret = __ccw_device_do_nop(cdev);
302 if (ret == 0 || ret == -EBUSY) 376 if (ret == 0 || ret == -EBUSY)
303 return; 377 return;
304 cdev->private->iretry = 5; 378 cdev->private->iretry = 5;
@@ -327,7 +401,10 @@ ccw_device_verify_irq(struct ccw_device *cdev, enum dev_event dev_event)
327 if (ccw_device_accumulate_and_sense(cdev, irb) != 0) 401 if (ccw_device_accumulate_and_sense(cdev, irb) != 0)
328 return; 402 return;
329 sch = to_subchannel(cdev->dev.parent); 403 sch = to_subchannel(cdev->dev.parent);
330 ret = __ccw_device_check_pgid(cdev); 404 if (cdev->private->options.pgroup)
405 ret = __ccw_device_check_pgid(cdev);
406 else
407 ret = __ccw_device_check_nop(cdev);
331 memset(&cdev->private->irb, 0, sizeof(struct irb)); 408 memset(&cdev->private->irb, 0, sizeof(struct irb));
332 switch (ret) { 409 switch (ret) {
333 /* 0, -ETIME, -EAGAIN, -EOPNOTSUPP or -EACCES */ 410 /* 0, -ETIME, -EAGAIN, -EOPNOTSUPP or -EACCES */
@@ -345,11 +422,10 @@ ccw_device_verify_irq(struct ccw_device *cdev, enum dev_event dev_event)
345 * One of those strange devices which claim to be able 422 * One of those strange devices which claim to be able
346 * to do multipathing but not for Set Path Group ID. 423 * to do multipathing but not for Set Path Group ID.
347 */ 424 */
348 if (cdev->private->flags.pgid_single) { 425 if (cdev->private->flags.pgid_single)
349 ccw_device_verify_done(cdev, -EOPNOTSUPP); 426 cdev->private->options.pgroup = 0;
350 break; 427 else
351 } 428 cdev->private->flags.pgid_single = 1;
352 cdev->private->flags.pgid_single = 1;
353 /* fall through. */ 429 /* fall through. */
354 case -EAGAIN: /* Try again. */ 430 case -EAGAIN: /* Try again. */
355 __ccw_device_verify_start(cdev); 431 __ccw_device_verify_start(cdev);
diff --git a/drivers/s390/cio/device_status.c b/drivers/s390/cio/device_status.c
index 14bef2c179bf..caf148d5caad 100644
--- a/drivers/s390/cio/device_status.c
+++ b/drivers/s390/cio/device_status.c
@@ -67,8 +67,7 @@ ccw_device_path_notoper(struct ccw_device *cdev)
67 sch->schib.pmcw.pnom); 67 sch->schib.pmcw.pnom);
68 68
69 sch->lpm &= ~sch->schib.pmcw.pnom; 69 sch->lpm &= ~sch->schib.pmcw.pnom;
70 if (cdev->private->options.pgroup) 70 cdev->private->flags.doverify = 1;
71 cdev->private->flags.doverify = 1;
72} 71}
73 72
74/* 73/*
@@ -180,7 +179,7 @@ ccw_device_accumulate_esw(struct ccw_device *cdev, struct irb *irb)
180 cdev_irb->esw.esw0.erw.auth = irb->esw.esw0.erw.auth; 179 cdev_irb->esw.esw0.erw.auth = irb->esw.esw0.erw.auth;
181 /* Copy path verification required flag. */ 180 /* Copy path verification required flag. */
182 cdev_irb->esw.esw0.erw.pvrf = irb->esw.esw0.erw.pvrf; 181 cdev_irb->esw.esw0.erw.pvrf = irb->esw.esw0.erw.pvrf;
183 if (irb->esw.esw0.erw.pvrf && cdev->private->options.pgroup) 182 if (irb->esw.esw0.erw.pvrf)
184 cdev->private->flags.doverify = 1; 183 cdev->private->flags.doverify = 1;
185 /* Copy concurrent sense bit. */ 184 /* Copy concurrent sense bit. */
186 cdev_irb->esw.esw0.erw.cons = irb->esw.esw0.erw.cons; 185 cdev_irb->esw.esw0.erw.cons = irb->esw.esw0.erw.cons;
@@ -354,7 +353,7 @@ ccw_device_accumulate_basic_sense(struct ccw_device *cdev, struct irb *irb)
354 } 353 }
355 /* Check if path verification is required. */ 354 /* Check if path verification is required. */
356 if (ccw_device_accumulate_esw_valid(irb) && 355 if (ccw_device_accumulate_esw_valid(irb) &&
357 irb->esw.esw0.erw.pvrf && cdev->private->options.pgroup) 356 irb->esw.esw0.erw.pvrf)
358 cdev->private->flags.doverify = 1; 357 cdev->private->flags.doverify = 1;
359} 358}
360 359
diff --git a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c
index b70039af70d6..7c93a8798d23 100644
--- a/drivers/s390/cio/qdio.c
+++ b/drivers/s390/cio/qdio.c
@@ -2735,7 +2735,7 @@ qdio_free(struct ccw_device *cdev)
2735 QDIO_DBF_TEXT1(0,trace,dbf_text); 2735 QDIO_DBF_TEXT1(0,trace,dbf_text);
2736 QDIO_DBF_TEXT0(0,setup,dbf_text); 2736 QDIO_DBF_TEXT0(0,setup,dbf_text);
2737 2737
2738 cdev->private->qdio_data = 0; 2738 cdev->private->qdio_data = NULL;
2739 2739
2740 up(&irq_ptr->setting_up_sema); 2740 up(&irq_ptr->setting_up_sema);
2741 2741
diff --git a/drivers/s390/net/iucv.c b/drivers/s390/net/iucv.c
index 189a49275433..0e863df4027a 100644
--- a/drivers/s390/net/iucv.c
+++ b/drivers/s390/net/iucv.c
@@ -692,7 +692,7 @@ iucv_retrieve_buffer (void)
692 iucv_debug(1, "entering"); 692 iucv_debug(1, "entering");
693 if (iucv_cpuid != -1) { 693 if (iucv_cpuid != -1) {
694 smp_call_function_on(iucv_retrieve_buffer_cpuid, 694 smp_call_function_on(iucv_retrieve_buffer_cpuid,
695 0, 0, 1, iucv_cpuid); 695 NULL, 0, 1, iucv_cpuid);
696 /* Release the cpu reserved by iucv_declare_buffer. */ 696 /* Release the cpu reserved by iucv_declare_buffer. */
697 smp_put_cpu(iucv_cpuid); 697 smp_put_cpu(iucv_cpuid);
698 iucv_cpuid = -1; 698 iucv_cpuid = -1;
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c
index 4caced21ac8c..103c41470bd2 100644
--- a/drivers/s390/net/qeth_main.c
+++ b/drivers/s390/net/qeth_main.c
@@ -4804,7 +4804,7 @@ static struct qeth_cmd_buffer *
4804qeth_get_setassparms_cmd(struct qeth_card *, enum qeth_ipa_funcs, 4804qeth_get_setassparms_cmd(struct qeth_card *, enum qeth_ipa_funcs,
4805 __u16, __u16, enum qeth_prot_versions); 4805 __u16, __u16, enum qeth_prot_versions);
4806static int 4806static int
4807qeth_arp_query(struct qeth_card *card, char *udata) 4807qeth_arp_query(struct qeth_card *card, char __user *udata)
4808{ 4808{
4809 struct qeth_cmd_buffer *iob; 4809 struct qeth_cmd_buffer *iob;
4810 struct qeth_arp_query_info qinfo = {0, }; 4810 struct qeth_arp_query_info qinfo = {0, };
@@ -4937,7 +4937,7 @@ qeth_get_adapter_cmd(struct qeth_card *card, __u32 command, __u32 cmdlen)
4937 * function to send SNMP commands to OSA-E card 4937 * function to send SNMP commands to OSA-E card
4938 */ 4938 */
4939static int 4939static int
4940qeth_snmp_command(struct qeth_card *card, char *udata) 4940qeth_snmp_command(struct qeth_card *card, char __user *udata)
4941{ 4941{
4942 struct qeth_cmd_buffer *iob; 4942 struct qeth_cmd_buffer *iob;
4943 struct qeth_ipa_cmd *cmd; 4943 struct qeth_ipa_cmd *cmd;
@@ -7909,9 +7909,9 @@ qeth_set_online(struct ccwgroup_device *gdev)
7909} 7909}
7910 7910
7911static struct ccw_device_id qeth_ids[] = { 7911static struct ccw_device_id qeth_ids[] = {
7912 {CCW_DEVICE(0x1731, 0x01), driver_info:QETH_CARD_TYPE_OSAE}, 7912 {CCW_DEVICE(0x1731, 0x01), .driver_info = QETH_CARD_TYPE_OSAE},
7913 {CCW_DEVICE(0x1731, 0x05), driver_info:QETH_CARD_TYPE_IQD}, 7913 {CCW_DEVICE(0x1731, 0x05), .driver_info = QETH_CARD_TYPE_IQD},
7914 {CCW_DEVICE(0x1731, 0x06), driver_info:QETH_CARD_TYPE_OSN}, 7914 {CCW_DEVICE(0x1731, 0x06), .driver_info = QETH_CARD_TYPE_OSN},
7915 {}, 7915 {},
7916}; 7916};
7917MODULE_DEVICE_TABLE(ccw, qeth_ids); 7917MODULE_DEVICE_TABLE(ccw, qeth_ids);
@@ -8380,7 +8380,7 @@ out:
8380 8380
8381static struct notifier_block qeth_ip_notifier = { 8381static struct notifier_block qeth_ip_notifier = {
8382 qeth_ip_event, 8382 qeth_ip_event,
8383 0 8383 NULL,
8384}; 8384};
8385 8385
8386#ifdef CONFIG_QETH_IPV6 8386#ifdef CONFIG_QETH_IPV6
@@ -8433,7 +8433,7 @@ out:
8433 8433
8434static struct notifier_block qeth_ip6_notifier = { 8434static struct notifier_block qeth_ip6_notifier = {
8435 qeth_ip6_event, 8435 qeth_ip6_event,
8436 0 8436 NULL,
8437}; 8437};
8438#endif 8438#endif
8439 8439
@@ -8460,7 +8460,7 @@ qeth_reboot_event(struct notifier_block *this, unsigned long event, void *ptr)
8460 8460
8461static struct notifier_block qeth_reboot_notifier = { 8461static struct notifier_block qeth_reboot_notifier = {
8462 qeth_reboot_event, 8462 qeth_reboot_event,
8463 0 8463 NULL,
8464}; 8464};
8465 8465
8466static int 8466static int
diff --git a/drivers/s390/net/qeth_sys.c b/drivers/s390/net/qeth_sys.c
index 185a9cfbcbdc..001497bbea16 100644
--- a/drivers/s390/net/qeth_sys.c
+++ b/drivers/s390/net/qeth_sys.c
@@ -1755,7 +1755,7 @@ qeth_driver_group_store(struct device_driver *ddrv, const char *buf,
1755} 1755}
1756 1756
1757 1757
1758static DRIVER_ATTR(group, 0200, 0, qeth_driver_group_store); 1758static DRIVER_ATTR(group, 0200, NULL, qeth_driver_group_store);
1759 1759
1760static ssize_t 1760static ssize_t
1761qeth_driver_notifier_register_store(struct device_driver *ddrv, const char *buf, 1761qeth_driver_notifier_register_store(struct device_driver *ddrv, const char *buf,
@@ -1783,7 +1783,7 @@ qeth_driver_notifier_register_store(struct device_driver *ddrv, const char *buf,
1783 return count; 1783 return count;
1784} 1784}
1785 1785
1786static DRIVER_ATTR(notifier_register, 0200, 0, 1786static DRIVER_ATTR(notifier_register, 0200, NULL,
1787 qeth_driver_notifier_register_store); 1787 qeth_driver_notifier_register_store);
1788 1788
1789int 1789int
diff --git a/drivers/s390/net/smsgiucv.c b/drivers/s390/net/smsgiucv.c
index 72118ee68954..b8179c27ceb6 100644
--- a/drivers/s390/net/smsgiucv.c
+++ b/drivers/s390/net/smsgiucv.c
@@ -66,7 +66,7 @@ smsg_message_pending(iucv_MessagePending *eib, void *pgm_data)
66 return; 66 return;
67 } 67 }
68 rc = iucv_receive(eib->ippathid, eib->ipmsgid, eib->iptrgcls, 68 rc = iucv_receive(eib->ippathid, eib->ipmsgid, eib->iptrgcls,
69 msg, len, 0, 0, 0); 69 msg, len, NULL, NULL, NULL);
70 if (rc == 0) { 70 if (rc == 0) {
71 msg[len] = 0; 71 msg[len] = 0;
72 EBCASC(msg, len); 72 EBCASC(msg, len);
@@ -122,7 +122,7 @@ smsg_unregister_callback(char *prefix, void (*callback)(char *from, char *str))
122 struct smsg_callback *cb, *tmp; 122 struct smsg_callback *cb, *tmp;
123 123
124 spin_lock(&smsg_list_lock); 124 spin_lock(&smsg_list_lock);
125 cb = 0; 125 cb = NULL;
126 list_for_each_entry(tmp, &smsg_list, list) 126 list_for_each_entry(tmp, &smsg_list, list)
127 if (tmp->callback == callback && 127 if (tmp->callback == callback &&
128 strcmp(tmp->prefix, prefix) == 0) { 128 strcmp(tmp->prefix, prefix) == 0) {
@@ -139,7 +139,7 @@ smsg_exit(void)
139{ 139{
140 if (smsg_handle > 0) { 140 if (smsg_handle > 0) {
141 cpcmd("SET SMSG OFF", NULL, 0, NULL); 141 cpcmd("SET SMSG OFF", NULL, 0, NULL);
142 iucv_sever(smsg_pathid, 0); 142 iucv_sever(smsg_pathid, NULL);
143 iucv_unregister_program(smsg_handle); 143 iucv_unregister_program(smsg_handle);
144 driver_unregister(&smsg_driver); 144 driver_unregister(&smsg_driver);
145 } 145 }
@@ -162,19 +162,19 @@ smsg_init(void)
162 return rc; 162 return rc;
163 } 163 }
164 smsg_handle = iucv_register_program("SMSGIUCV ", "*MSG ", 164 smsg_handle = iucv_register_program("SMSGIUCV ", "*MSG ",
165 pgmmask, &smsg_ops, 0); 165 pgmmask, &smsg_ops, NULL);
166 if (!smsg_handle) { 166 if (!smsg_handle) {
167 printk(KERN_ERR "SMSGIUCV: failed to register to iucv"); 167 printk(KERN_ERR "SMSGIUCV: failed to register to iucv");
168 driver_unregister(&smsg_driver); 168 driver_unregister(&smsg_driver);
169 return -EIO; /* better errno ? */ 169 return -EIO; /* better errno ? */
170 } 170 }
171 rc = iucv_connect (&smsg_pathid, 255, 0, "*MSG ", 0, 0, 0, 0, 171 rc = iucv_connect (&smsg_pathid, 255, NULL, "*MSG ", NULL, 0,
172 smsg_handle, 0); 172 NULL, NULL, smsg_handle, NULL);
173 if (rc) { 173 if (rc) {
174 printk(KERN_ERR "SMSGIUCV: failed to connect to *MSG"); 174 printk(KERN_ERR "SMSGIUCV: failed to connect to *MSG");
175 iucv_unregister_program(smsg_handle); 175 iucv_unregister_program(smsg_handle);
176 driver_unregister(&smsg_driver); 176 driver_unregister(&smsg_driver);
177 smsg_handle = 0; 177 smsg_handle = NULL;
178 return -EIO; 178 return -EIO;
179 } 179 }
180 cpcmd("SET SMSG IUCV", NULL, 0, NULL); 180 cpcmd("SET SMSG IUCV", NULL, 0, NULL);
diff --git a/drivers/s390/s390mach.c b/drivers/s390/s390mach.c
index ffb3677e354f..5399c5d99b81 100644
--- a/drivers/s390/s390mach.c
+++ b/drivers/s390/s390mach.c
@@ -111,6 +111,16 @@ repeat:
111 break; 111 break;
112 case CRW_RSC_CPATH: 112 case CRW_RSC_CPATH:
113 pr_debug("source is channel path %02X\n", crw[0].rsid); 113 pr_debug("source is channel path %02X\n", crw[0].rsid);
114 /*
115 * Check for solicited machine checks. These are
116 * created by reset channel path and need not be
117 * reported to the common I/O layer.
118 */
119 if (crw[chain].slct) {
120 DBG(KERN_INFO"solicited machine check for "
121 "channel path %02X\n", crw[0].rsid);
122 break;
123 }
114 switch (crw[0].erc) { 124 switch (crw[0].erc) {
115 case CRW_ERC_IPARM: /* Path has come. */ 125 case CRW_ERC_IPARM: /* Path has come. */
116 ret = chp_process_crw(crw[0].rsid, 1); 126 ret = chp_process_crw(crw[0].rsid, 1);
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
index 6335f9229184..31db2b06faba 100644
--- a/drivers/s390/scsi/zfcp_fsf.c
+++ b/drivers/s390/scsi/zfcp_fsf.c
@@ -2227,7 +2227,7 @@ zfcp_fsf_exchange_port_data(struct zfcp_erp_action *erp_action,
2227 /* setup new FSF request */ 2227 /* setup new FSF request */
2228 retval = zfcp_fsf_req_create(adapter, FSF_QTCB_EXCHANGE_PORT_DATA, 2228 retval = zfcp_fsf_req_create(adapter, FSF_QTCB_EXCHANGE_PORT_DATA,
2229 erp_action ? ZFCP_REQ_AUTO_CLEANUP : 0, 2229 erp_action ? ZFCP_REQ_AUTO_CLEANUP : 0,
2230 0, &lock_flags, &fsf_req); 2230 NULL, &lock_flags, &fsf_req);
2231 if (retval < 0) { 2231 if (retval < 0) {
2232 ZFCP_LOG_INFO("error: Out of resources. Could not create an " 2232 ZFCP_LOG_INFO("error: Out of resources. Could not create an "
2233 "exchange port data request for" 2233 "exchange port data request for"
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c
index 46e14f22ec18..671f4a6a5d18 100644
--- a/drivers/s390/scsi/zfcp_scsi.c
+++ b/drivers/s390/scsi/zfcp_scsi.c
@@ -44,30 +44,29 @@ struct scsi_transport_template *zfcp_transport_template;
44 44
45struct zfcp_data zfcp_data = { 45struct zfcp_data zfcp_data = {
46 .scsi_host_template = { 46 .scsi_host_template = {
47 name: ZFCP_NAME, 47 .name = ZFCP_NAME,
48 proc_name: "zfcp", 48 .proc_name = "zfcp",
49 proc_info: NULL, 49 .proc_info = NULL,
50 detect: NULL, 50 .detect = NULL,
51 slave_alloc: zfcp_scsi_slave_alloc, 51 .slave_alloc = zfcp_scsi_slave_alloc,
52 slave_configure: zfcp_scsi_slave_configure, 52 .slave_configure = zfcp_scsi_slave_configure,
53 slave_destroy: zfcp_scsi_slave_destroy, 53 .slave_destroy = zfcp_scsi_slave_destroy,
54 queuecommand: zfcp_scsi_queuecommand, 54 .queuecommand = zfcp_scsi_queuecommand,
55 eh_abort_handler: zfcp_scsi_eh_abort_handler, 55 .eh_abort_handler = zfcp_scsi_eh_abort_handler,
56 eh_device_reset_handler: zfcp_scsi_eh_device_reset_handler, 56 .eh_device_reset_handler = zfcp_scsi_eh_device_reset_handler,
57 eh_bus_reset_handler: zfcp_scsi_eh_bus_reset_handler, 57 .eh_bus_reset_handler = zfcp_scsi_eh_bus_reset_handler,
58 eh_host_reset_handler: zfcp_scsi_eh_host_reset_handler, 58 .eh_host_reset_handler = zfcp_scsi_eh_host_reset_handler,
59 /* FIXME(openfcp): Tune */ 59 .can_queue = 4096,
60 can_queue: 4096, 60 .this_id = -1,
61 this_id: -1, 61 /*
62 /* 62 * FIXME:
63 * FIXME: 63 * one less? can zfcp_create_sbale cope with it?
64 * one less? can zfcp_create_sbale cope with it? 64 */
65 */ 65 .sg_tablesize = ZFCP_MAX_SBALES_PER_REQ,
66 sg_tablesize: ZFCP_MAX_SBALES_PER_REQ, 66 .cmd_per_lun = 1,
67 cmd_per_lun: 1, 67 .unchecked_isa_dma = 0,
68 unchecked_isa_dma: 0, 68 .use_clustering = 1,
69 use_clustering: 1, 69 .sdev_attrs = zfcp_sysfs_sdev_attrs,
70 sdev_attrs: zfcp_sysfs_sdev_attrs,
71 }, 70 },
72 .driver_version = ZFCP_VERSION, 71 .driver_version = ZFCP_VERSION,
73 /* rest initialised with zeros */ 72 /* rest initialised with zeros */