diff options
Diffstat (limited to 'drivers/s390/block/dasd_fba.c')
-rw-r--r-- | drivers/s390/block/dasd_fba.c | 49 |
1 files changed, 8 insertions, 41 deletions
diff --git a/drivers/s390/block/dasd_fba.c b/drivers/s390/block/dasd_fba.c index 91145698f8e9..bb7755b9b19d 100644 --- a/drivers/s390/block/dasd_fba.c +++ b/drivers/s390/block/dasd_fba.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * File...........: linux/drivers/s390/block/dasd_fba.c | 2 | * File...........: linux/drivers/s390/block/dasd_fba.c |
3 | * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> | 3 | * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> |
4 | * Bugreports.to..: <Linux390@de.ibm.com> | 4 | * Bugreports.to..: <Linux390@de.ibm.com> |
@@ -56,19 +56,13 @@ static struct ccw_driver dasd_fba_driver; /* see below */ | |||
56 | static int | 56 | static int |
57 | dasd_fba_probe(struct ccw_device *cdev) | 57 | dasd_fba_probe(struct ccw_device *cdev) |
58 | { | 58 | { |
59 | int ret; | 59 | return dasd_generic_probe(cdev, &dasd_fba_discipline); |
60 | |||
61 | ret = dasd_generic_probe (cdev, &dasd_fba_discipline); | ||
62 | if (ret) | ||
63 | return ret; | ||
64 | ccw_device_set_options(cdev, CCWDEV_DO_PATHGROUP); | ||
65 | return 0; | ||
66 | } | 60 | } |
67 | 61 | ||
68 | static int | 62 | static int |
69 | dasd_fba_set_online(struct ccw_device *cdev) | 63 | dasd_fba_set_online(struct ccw_device *cdev) |
70 | { | 64 | { |
71 | return dasd_generic_set_online (cdev, &dasd_fba_discipline); | 65 | return dasd_generic_set_online(cdev, &dasd_fba_discipline); |
72 | } | 66 | } |
73 | 67 | ||
74 | static struct ccw_driver dasd_fba_driver = { | 68 | static struct ccw_driver dasd_fba_driver = { |
@@ -125,13 +119,13 @@ static int | |||
125 | dasd_fba_check_characteristics(struct dasd_device *device) | 119 | dasd_fba_check_characteristics(struct dasd_device *device) |
126 | { | 120 | { |
127 | struct dasd_fba_private *private; | 121 | struct dasd_fba_private *private; |
128 | struct ccw_device *cdev = device->cdev; | 122 | struct ccw_device *cdev = device->cdev; |
129 | void *rdc_data; | 123 | void *rdc_data; |
130 | int rc; | 124 | int rc; |
131 | 125 | ||
132 | private = (struct dasd_fba_private *) device->private; | 126 | private = (struct dasd_fba_private *) device->private; |
133 | if (private == NULL) { | 127 | if (private == NULL) { |
134 | private = kmalloc(sizeof(struct dasd_fba_private), GFP_KERNEL); | 128 | private = kzalloc(sizeof(struct dasd_fba_private), GFP_KERNEL); |
135 | if (private == NULL) { | 129 | if (private == NULL) { |
136 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 130 | DEV_MESSAGE(KERN_WARNING, device, "%s", |
137 | "memory allocation failed for private " | 131 | "memory allocation failed for private " |
@@ -204,7 +198,7 @@ dasd_fba_examine_error(struct dasd_ccw_req * cqr, struct irb * irb) | |||
204 | if (irb->scsw.cstat == 0x00 && | 198 | if (irb->scsw.cstat == 0x00 && |
205 | irb->scsw.dstat == (DEV_STAT_CHN_END | DEV_STAT_DEV_END)) | 199 | irb->scsw.dstat == (DEV_STAT_CHN_END | DEV_STAT_DEV_END)) |
206 | return dasd_era_none; | 200 | return dasd_era_none; |
207 | 201 | ||
208 | cdev = device->cdev; | 202 | cdev = device->cdev; |
209 | switch (cdev->id.dev_type) { | 203 | switch (cdev->id.dev_type) { |
210 | case 0x3370: | 204 | case 0x3370: |
@@ -539,7 +533,7 @@ dasd_fba_dump_sense(struct dasd_device *device, struct dasd_ccw_req * req, | |||
539 | * 8192 bytes (=2 pages). For 64 bit one dasd_mchunkt_t structure has | 533 | * 8192 bytes (=2 pages). For 64 bit one dasd_mchunkt_t structure has |
540 | * 24 bytes, the struct dasd_ccw_req has 136 bytes and each block can use | 534 | * 24 bytes, the struct dasd_ccw_req has 136 bytes and each block can use |
541 | * up to 16 bytes (8 for the ccw and 8 for the idal pointer). In | 535 | * up to 16 bytes (8 for the ccw and 8 for the idal pointer). In |
542 | * addition we have one define extent ccw + 16 bytes of data and a | 536 | * addition we have one define extent ccw + 16 bytes of data and a |
543 | * locate record ccw for each block (stupid devices!) + 16 bytes of data. | 537 | * locate record ccw for each block (stupid devices!) + 16 bytes of data. |
544 | * That makes: | 538 | * That makes: |
545 | * (8192 - 24 - 136 - 8 - 16) / 40 = 200.2 blocks at maximum. | 539 | * (8192 - 24 - 136 - 8 - 16) / 40 = 200.2 blocks at maximum. |
@@ -569,16 +563,8 @@ static struct dasd_discipline dasd_fba_discipline = { | |||
569 | static int __init | 563 | static int __init |
570 | dasd_fba_init(void) | 564 | dasd_fba_init(void) |
571 | { | 565 | { |
572 | int ret; | ||
573 | |||
574 | ASCEBC(dasd_fba_discipline.ebcname, 4); | 566 | ASCEBC(dasd_fba_discipline.ebcname, 4); |
575 | 567 | return ccw_driver_register(&dasd_fba_driver); | |
576 | ret = ccw_driver_register(&dasd_fba_driver); | ||
577 | if (ret) | ||
578 | return ret; | ||
579 | |||
580 | dasd_generic_auto_online(&dasd_fba_driver); | ||
581 | return 0; | ||
582 | } | 568 | } |
583 | 569 | ||
584 | static void __exit | 570 | static void __exit |
@@ -589,22 +575,3 @@ dasd_fba_cleanup(void) | |||
589 | 575 | ||
590 | module_init(dasd_fba_init); | 576 | module_init(dasd_fba_init); |
591 | module_exit(dasd_fba_cleanup); | 577 | module_exit(dasd_fba_cleanup); |
592 | |||
593 | /* | ||
594 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
595 | * Emacs will notice this stuff at the end of the file and automatically | ||
596 | * adjust the settings for this buffer only. This must remain at the end | ||
597 | * of the file. | ||
598 | * --------------------------------------------------------------------------- | ||
599 | * Local variables: | ||
600 | * c-indent-level: 4 | ||
601 | * c-brace-imaginary-offset: 0 | ||
602 | * c-brace-offset: -4 | ||
603 | * c-argdecl-indent: 4 | ||
604 | * c-label-offset: -4 | ||
605 | * c-continued-statement-offset: 4 | ||
606 | * c-continued-brace-offset: 0 | ||
607 | * indent-tabs-mode: 1 | ||
608 | * tab-width: 8 | ||
609 | * End: | ||
610 | */ | ||