diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 11:19:15 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 11:19:15 -0400 |
| commit | 4cba84b5d61af81f1f329f4d05170427a9819c39 (patch) | |
| tree | aa6f917cd82ff524dc27b2c628ac6d4b88b0fcf6 /drivers | |
| parent | 7d939fbdfee49e5c06bd27214d25f726fb87a25a (diff) | |
| parent | ca68305bf3c76c4a7cd1c77d5423219f39164df8 (diff) | |
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: (36 commits)
[S390] Remove code duplication from monreader / dcssblk.
[S390] kernel: show last breaking-event-address on oops
[S390] lowcore: Change type of lowcores softirq_pending to __u32.
[S390] zcrypt: Comments and kernel-doc cleanup
[S390] uaccess: Always access the correct address space.
[S390] Fix a lot of sparse warnings.
[S390] Convert s390 to GENERIC_CLOCKEVENTS.
[S390] genirq/clockevents: move irq affinity prototypes/inlines to interrupt.h
[S390] Convert monitor calls to function calls.
[S390] qdio (new feature): enhancing info-retrieval from QDIO-adapters
[S390] replace remaining __FUNCTION__ occurrences
[S390] remove redundant display of free swap space in show_mem()
[S390] qdio: remove outdated developerworks link.
[S390] Add debug_register_mode() function to debug feature API
[S390] crypto: use more descriptive function names for init/exit routines.
[S390] switch sched_clock to store-clock-extended.
[S390] zcrypt: add support for large random numbers
[S390] hw_random: allow rng_dev_read() to return hardware errors.
[S390] Vertical cpu management.
[S390] cpu topology support for s390.
...
Diffstat (limited to 'drivers')
46 files changed, 1050 insertions, 707 deletions
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c index 84cdf9025737..349b6edc5794 100644 --- a/drivers/char/hw_random/core.c +++ b/drivers/char/hw_random/core.c | |||
| @@ -116,6 +116,10 @@ static ssize_t rng_dev_read(struct file *filp, char __user *buf, | |||
| 116 | err = -EAGAIN; | 116 | err = -EAGAIN; |
| 117 | if (!bytes_read && (filp->f_flags & O_NONBLOCK)) | 117 | if (!bytes_read && (filp->f_flags & O_NONBLOCK)) |
| 118 | goto out; | 118 | goto out; |
| 119 | if (bytes_read < 0) { | ||
| 120 | err = bytes_read; | ||
| 121 | goto out; | ||
| 122 | } | ||
| 119 | 123 | ||
| 120 | err = -EFAULT; | 124 | err = -EFAULT; |
| 121 | while (bytes_read && size) { | 125 | while (bytes_read && size) { |
diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig index 6b658d84d521..6d2f0c8d419a 100644 --- a/drivers/crypto/Kconfig +++ b/drivers/crypto/Kconfig | |||
| @@ -64,6 +64,7 @@ config ZCRYPT | |||
| 64 | tristate "Support for PCI-attached cryptographic adapters" | 64 | tristate "Support for PCI-attached cryptographic adapters" |
| 65 | depends on S390 | 65 | depends on S390 |
| 66 | select ZCRYPT_MONOLITHIC if ZCRYPT="y" | 66 | select ZCRYPT_MONOLITHIC if ZCRYPT="y" |
| 67 | select HW_RANDOM | ||
| 67 | help | 68 | help |
| 68 | Select this option if you want to use a PCI-attached cryptographic | 69 | Select this option if you want to use a PCI-attached cryptographic |
| 69 | adapter like: | 70 | adapter like: |
diff --git a/drivers/s390/block/Kconfig b/drivers/s390/block/Kconfig index e879b212cf43..07883197f474 100644 --- a/drivers/s390/block/Kconfig +++ b/drivers/s390/block/Kconfig | |||
| @@ -20,6 +20,7 @@ config DCSSBLK | |||
| 20 | config DASD | 20 | config DASD |
| 21 | tristate "Support for DASD devices" | 21 | tristate "Support for DASD devices" |
| 22 | depends on CCW && BLOCK | 22 | depends on CCW && BLOCK |
| 23 | select IOSCHED_DEADLINE | ||
| 23 | help | 24 | help |
| 24 | Enable this option if you want to access DASDs directly utilizing | 25 | Enable this option if you want to access DASDs directly utilizing |
| 25 | S/390s channel subsystem commands. This is necessary for running | 26 | S/390s channel subsystem commands. This is necessary for running |
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index ccf46c96adb4..ac6d4d3218b3 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
| @@ -980,12 +980,12 @@ void dasd_int_handler(struct ccw_device *cdev, unsigned long intparm, | |||
| 980 | break; | 980 | break; |
| 981 | case -ETIMEDOUT: | 981 | case -ETIMEDOUT: |
| 982 | printk(KERN_WARNING"%s(%s): request timed out\n", | 982 | printk(KERN_WARNING"%s(%s): request timed out\n", |
| 983 | __FUNCTION__, cdev->dev.bus_id); | 983 | __func__, cdev->dev.bus_id); |
| 984 | //FIXME - dasd uses own timeout interface... | 984 | //FIXME - dasd uses own timeout interface... |
| 985 | break; | 985 | break; |
| 986 | default: | 986 | default: |
| 987 | printk(KERN_WARNING"%s(%s): unknown error %ld\n", | 987 | printk(KERN_WARNING"%s(%s): unknown error %ld\n", |
| 988 | __FUNCTION__, cdev->dev.bus_id, PTR_ERR(irb)); | 988 | __func__, cdev->dev.bus_id, PTR_ERR(irb)); |
| 989 | } | 989 | } |
| 990 | return; | 990 | return; |
| 991 | } | 991 | } |
| @@ -1956,6 +1956,7 @@ static int dasd_alloc_queue(struct dasd_block *block) | |||
| 1956 | block->request_queue->queuedata = block; | 1956 | block->request_queue->queuedata = block; |
| 1957 | 1957 | ||
| 1958 | elevator_exit(block->request_queue->elevator); | 1958 | elevator_exit(block->request_queue->elevator); |
| 1959 | block->request_queue->elevator = NULL; | ||
| 1959 | rc = elevator_init(block->request_queue, "deadline"); | 1960 | rc = elevator_init(block->request_queue, "deadline"); |
| 1960 | if (rc) { | 1961 | if (rc) { |
| 1961 | blk_cleanup_queue(block->request_queue); | 1962 | blk_cleanup_queue(block->request_queue); |
| @@ -2298,9 +2299,8 @@ int dasd_generic_set_offline(struct ccw_device *cdev) | |||
| 2298 | * in the other openers. | 2299 | * in the other openers. |
| 2299 | */ | 2300 | */ |
| 2300 | if (device->block) { | 2301 | if (device->block) { |
| 2301 | struct dasd_block *block = device->block; | 2302 | max_count = device->block->bdev ? 0 : -1; |
| 2302 | max_count = block->bdev ? 0 : -1; | 2303 | open_count = atomic_read(&device->block->open_count); |
| 2303 | open_count = (int) atomic_read(&block->open_count); | ||
| 2304 | if (open_count > max_count) { | 2304 | if (open_count > max_count) { |
| 2305 | if (open_count > 0) | 2305 | if (open_count > 0) |
| 2306 | printk(KERN_WARNING "Can't offline dasd " | 2306 | printk(KERN_WARNING "Can't offline dasd " |
diff --git a/drivers/s390/block/dasd_3990_erp.c b/drivers/s390/block/dasd_3990_erp.c index b19db20a0bef..e6700df52df4 100644 --- a/drivers/s390/block/dasd_3990_erp.c +++ b/drivers/s390/block/dasd_3990_erp.c | |||
| @@ -1996,6 +1996,36 @@ dasd_3990_erp_compound(struct dasd_ccw_req * erp, char *sense) | |||
| 1996 | } /* end dasd_3990_erp_compound */ | 1996 | } /* end dasd_3990_erp_compound */ |
| 1997 | 1997 | ||
| 1998 | /* | 1998 | /* |
| 1999 | *DASD_3990_ERP_HANDLE_SIM | ||
| 2000 | * | ||
| 2001 | *DESCRIPTION | ||
| 2002 | * inspects the SIM SENSE data and starts an appropriate action | ||
| 2003 | * | ||
| 2004 | * PARAMETER | ||
| 2005 | * sense sense data of the actual error | ||
| 2006 | * | ||
| 2007 | * RETURN VALUES | ||
| 2008 | * none | ||
| 2009 | */ | ||
| 2010 | void | ||
| 2011 | dasd_3990_erp_handle_sim(struct dasd_device *device, char *sense) | ||
| 2012 | { | ||
| 2013 | /* print message according to log or message to operator mode */ | ||
| 2014 | if ((sense[24] & DASD_SIM_MSG_TO_OP) || (sense[1] & 0x10)) { | ||
| 2015 | |||
| 2016 | /* print SIM SRC from RefCode */ | ||
| 2017 | DEV_MESSAGE(KERN_ERR, device, "SIM - SRC: " | ||
| 2018 | "%02x%02x%02x%02x", sense[22], | ||
| 2019 | sense[23], sense[11], sense[12]); | ||
| 2020 | } else if (sense[24] & DASD_SIM_LOG) { | ||
| 2021 | /* print SIM SRC Refcode */ | ||
| 2022 | DEV_MESSAGE(KERN_WARNING, device, "SIM - SRC: " | ||
| 2023 | "%02x%02x%02x%02x", sense[22], | ||
| 2024 | sense[23], sense[11], sense[12]); | ||
| 2025 | } | ||
| 2026 | } | ||
| 2027 | |||
| 2028 | /* | ||
| 1999 | * DASD_3990_ERP_INSPECT_32 | 2029 | * DASD_3990_ERP_INSPECT_32 |
| 2000 | * | 2030 | * |
| 2001 | * DESCRIPTION | 2031 | * DESCRIPTION |
| @@ -2018,6 +2048,10 @@ dasd_3990_erp_inspect_32(struct dasd_ccw_req * erp, char *sense) | |||
| 2018 | 2048 | ||
| 2019 | erp->function = dasd_3990_erp_inspect_32; | 2049 | erp->function = dasd_3990_erp_inspect_32; |
| 2020 | 2050 | ||
| 2051 | /* check for SIM sense data */ | ||
| 2052 | if ((sense[6] & DASD_SIM_SENSE) == DASD_SIM_SENSE) | ||
| 2053 | dasd_3990_erp_handle_sim(device, sense); | ||
| 2054 | |||
| 2021 | if (sense[25] & DASD_SENSE_BIT_0) { | 2055 | if (sense[25] & DASD_SENSE_BIT_0) { |
| 2022 | 2056 | ||
| 2023 | /* compound program action codes (byte25 bit 0 == '1') */ | 2057 | /* compound program action codes (byte25 bit 0 == '1') */ |
diff --git a/drivers/s390/block/dasd_alias.c b/drivers/s390/block/dasd_alias.c index 3a40bee9d358..2d8df0b30538 100644 --- a/drivers/s390/block/dasd_alias.c +++ b/drivers/s390/block/dasd_alias.c | |||
| @@ -745,6 +745,19 @@ static void flush_all_alias_devices_on_lcu(struct alias_lcu *lcu) | |||
| 745 | spin_unlock_irqrestore(&lcu->lock, flags); | 745 | spin_unlock_irqrestore(&lcu->lock, flags); |
| 746 | } | 746 | } |
| 747 | 747 | ||
| 748 | static void __stop_device_on_lcu(struct dasd_device *device, | ||
| 749 | struct dasd_device *pos) | ||
| 750 | { | ||
| 751 | /* If pos == device then device is already locked! */ | ||
| 752 | if (pos == device) { | ||
| 753 | pos->stopped |= DASD_STOPPED_SU; | ||
| 754 | return; | ||
| 755 | } | ||
| 756 | spin_lock(get_ccwdev_lock(pos->cdev)); | ||
| 757 | pos->stopped |= DASD_STOPPED_SU; | ||
| 758 | spin_unlock(get_ccwdev_lock(pos->cdev)); | ||
| 759 | } | ||
| 760 | |||
| 748 | /* | 761 | /* |
| 749 | * This function is called in interrupt context, so the | 762 | * This function is called in interrupt context, so the |
| 750 | * cdev lock for device is already locked! | 763 | * cdev lock for device is already locked! |
| @@ -755,35 +768,15 @@ static void _stop_all_devices_on_lcu(struct alias_lcu *lcu, | |||
| 755 | struct alias_pav_group *pavgroup; | 768 | struct alias_pav_group *pavgroup; |
| 756 | struct dasd_device *pos; | 769 | struct dasd_device *pos; |
| 757 | 770 | ||
| 758 | list_for_each_entry(pos, &lcu->active_devices, alias_list) { | 771 | list_for_each_entry(pos, &lcu->active_devices, alias_list) |
| 759 | if (pos != device) | 772 | __stop_device_on_lcu(device, pos); |
| 760 | spin_lock(get_ccwdev_lock(pos->cdev)); | 773 | list_for_each_entry(pos, &lcu->inactive_devices, alias_list) |
| 761 | pos->stopped |= DASD_STOPPED_SU; | 774 | __stop_device_on_lcu(device, pos); |
| 762 | if (pos != device) | ||
| 763 | spin_unlock(get_ccwdev_lock(pos->cdev)); | ||
| 764 | } | ||
| 765 | list_for_each_entry(pos, &lcu->inactive_devices, alias_list) { | ||
| 766 | if (pos != device) | ||
| 767 | spin_lock(get_ccwdev_lock(pos->cdev)); | ||
| 768 | pos->stopped |= DASD_STOPPED_SU; | ||
| 769 | if (pos != device) | ||
| 770 | spin_unlock(get_ccwdev_lock(pos->cdev)); | ||
| 771 | } | ||
| 772 | list_for_each_entry(pavgroup, &lcu->grouplist, group) { | 775 | list_for_each_entry(pavgroup, &lcu->grouplist, group) { |
| 773 | list_for_each_entry(pos, &pavgroup->baselist, alias_list) { | 776 | list_for_each_entry(pos, &pavgroup->baselist, alias_list) |
| 774 | if (pos != device) | 777 | __stop_device_on_lcu(device, pos); |
| 775 | spin_lock(get_ccwdev_lock(pos->cdev)); | 778 | list_for_each_entry(pos, &pavgroup->aliaslist, alias_list) |
| 776 | pos->stopped |= DASD_STOPPED_SU; | 779 | __stop_device_on_lcu(device, pos); |
| 777 | if (pos != device) | ||
| 778 | spin_unlock(get_ccwdev_lock(pos->cdev)); | ||
| 779 | } | ||
| 780 | list_for_each_entry(pos, &pavgroup->aliaslist, alias_list) { | ||
| 781 | if (pos != device) | ||
| 782 | spin_lock(get_ccwdev_lock(pos->cdev)); | ||
| 783 | pos->stopped |= DASD_STOPPED_SU; | ||
| 784 | if (pos != device) | ||
| 785 | spin_unlock(get_ccwdev_lock(pos->cdev)); | ||
| 786 | } | ||
| 787 | } | 780 | } |
| 788 | } | 781 | } |
| 789 | 782 | ||
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index 61f16937c1e0..a0edae091b5e 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c | |||
| @@ -1415,6 +1415,13 @@ static void dasd_eckd_handle_unsolicited_interrupt(struct dasd_device *device, | |||
| 1415 | return; | 1415 | return; |
| 1416 | } | 1416 | } |
| 1417 | 1417 | ||
| 1418 | |||
| 1419 | /* service information message SIM */ | ||
| 1420 | if ((irb->ecw[6] & DASD_SIM_SENSE) == DASD_SIM_SENSE) { | ||
| 1421 | dasd_3990_erp_handle_sim(device, irb->ecw); | ||
| 1422 | return; | ||
| 1423 | } | ||
| 1424 | |||
| 1418 | /* just report other unsolicited interrupts */ | 1425 | /* just report other unsolicited interrupts */ |
| 1419 | DEV_MESSAGE(KERN_DEBUG, device, "%s", | 1426 | DEV_MESSAGE(KERN_DEBUG, device, "%s", |
| 1420 | "unsolicited interrupt received"); | 1427 | "unsolicited interrupt received"); |
diff --git a/drivers/s390/block/dasd_fba.c b/drivers/s390/block/dasd_fba.c index d13ea05089a7..116611583df8 100644 --- a/drivers/s390/block/dasd_fba.c +++ b/drivers/s390/block/dasd_fba.c | |||
| @@ -125,7 +125,8 @@ dasd_fba_check_characteristics(struct dasd_device *device) | |||
| 125 | 125 | ||
| 126 | private = (struct dasd_fba_private *) device->private; | 126 | private = (struct dasd_fba_private *) device->private; |
| 127 | if (private == NULL) { | 127 | if (private == NULL) { |
| 128 | private = kzalloc(sizeof(struct dasd_fba_private), GFP_KERNEL); | 128 | private = kzalloc(sizeof(struct dasd_fba_private), |
| 129 | GFP_KERNEL | GFP_DMA); | ||
| 129 | if (private == NULL) { | 130 | if (private == NULL) { |
| 130 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 131 | DEV_MESSAGE(KERN_WARNING, device, "%s", |
| 131 | "memory allocation failed for private " | 132 | "memory allocation failed for private " |
diff --git a/drivers/s390/block/dasd_int.h b/drivers/s390/block/dasd_int.h index 44b2984dfbee..6c624bf44617 100644 --- a/drivers/s390/block/dasd_int.h +++ b/drivers/s390/block/dasd_int.h | |||
| @@ -72,6 +72,11 @@ struct dasd_block; | |||
| 72 | #define DASD_SENSE_BIT_2 0x20 | 72 | #define DASD_SENSE_BIT_2 0x20 |
| 73 | #define DASD_SENSE_BIT_3 0x10 | 73 | #define DASD_SENSE_BIT_3 0x10 |
| 74 | 74 | ||
| 75 | /* BIT DEFINITIONS FOR SIM SENSE */ | ||
| 76 | #define DASD_SIM_SENSE 0x0F | ||
| 77 | #define DASD_SIM_MSG_TO_OP 0x03 | ||
| 78 | #define DASD_SIM_LOG 0x0C | ||
| 79 | |||
| 75 | /* | 80 | /* |
| 76 | * SECTION: MACROs for klogd and s390 debug feature (dbf) | 81 | * SECTION: MACROs for klogd and s390 debug feature (dbf) |
| 77 | */ | 82 | */ |
| @@ -621,6 +626,7 @@ void dasd_log_sense(struct dasd_ccw_req *, struct irb *); | |||
| 621 | 626 | ||
| 622 | /* externals in dasd_3990_erp.c */ | 627 | /* externals in dasd_3990_erp.c */ |
| 623 | struct dasd_ccw_req *dasd_3990_erp_action(struct dasd_ccw_req *); | 628 | struct dasd_ccw_req *dasd_3990_erp_action(struct dasd_ccw_req *); |
| 629 | void dasd_3990_erp_handle_sim(struct dasd_device *, char *); | ||
| 624 | 630 | ||
| 625 | /* externals in dasd_eer.c */ | 631 | /* externals in dasd_eer.c */ |
| 626 | #ifdef CONFIG_DASD_EER | 632 | #ifdef CONFIG_DASD_EER |
diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c index e6c94dbfdeaa..04787eab1016 100644 --- a/drivers/s390/block/dcssblk.c +++ b/drivers/s390/block/dcssblk.c | |||
| @@ -142,57 +142,6 @@ dcssblk_get_device_by_name(char *name) | |||
| 142 | return NULL; | 142 | return NULL; |
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | /* | ||
| 146 | * print appropriate error message for segment_load()/segment_type() | ||
| 147 | * return code | ||
| 148 | */ | ||
| 149 | static void | ||
| 150 | dcssblk_segment_warn(int rc, char* seg_name) | ||
| 151 | { | ||
| 152 | switch (rc) { | ||
| 153 | case -ENOENT: | ||
| 154 | PRINT_WARN("cannot load/query segment %s, does not exist\n", | ||
| 155 | seg_name); | ||
| 156 | break; | ||
| 157 | case -ENOSYS: | ||
| 158 | PRINT_WARN("cannot load/query segment %s, not running on VM\n", | ||
| 159 | seg_name); | ||
| 160 | break; | ||
| 161 | case -EIO: | ||
| 162 | PRINT_WARN("cannot load/query segment %s, hardware error\n", | ||
| 163 | seg_name); | ||
| 164 | break; | ||
| 165 | case -ENOTSUPP: | ||
| 166 | PRINT_WARN("cannot load/query segment %s, is a multi-part " | ||
| 167 | "segment\n", seg_name); | ||
| 168 | break; | ||
| 169 | case -ENOSPC: | ||
| 170 | PRINT_WARN("cannot load/query segment %s, overlaps with " | ||
| 171 | "storage\n", seg_name); | ||
| 172 | break; | ||
| 173 | case -EBUSY: | ||
| 174 | PRINT_WARN("cannot load/query segment %s, overlaps with " | ||
| 175 | "already loaded dcss\n", seg_name); | ||
| 176 | break; | ||
| 177 | case -EPERM: | ||
| 178 | PRINT_WARN("cannot load/query segment %s, already loaded in " | ||
| 179 | "incompatible mode\n", seg_name); | ||
| 180 | break; | ||
| 181 | case -ENOMEM: | ||
| 182 | PRINT_WARN("cannot load/query segment %s, out of memory\n", | ||
| 183 | seg_name); | ||
| 184 | break; | ||
| 185 | case -ERANGE: | ||
| 186 | PRINT_WARN("cannot load/query segment %s, exceeds kernel " | ||
| 187 | "mapping range\n", seg_name); | ||
| 188 | break; | ||
| 189 | default: | ||
| 190 | PRINT_WARN("cannot load/query segment %s, return value %i\n", | ||
| 191 | seg_name, rc); | ||
| 192 | break; | ||
| 193 | } | ||
| 194 | } | ||
| 195 | |||
| 196 | static void dcssblk_unregister_callback(struct device *dev) | 145 | static void dcssblk_unregister_callback(struct device *dev) |
| 197 | { | 146 | { |
| 198 | device_unregister(dev); | 147 | device_unregister(dev); |
| @@ -423,7 +372,7 @@ dcssblk_add_store(struct device *dev, struct device_attribute *attr, const char | |||
| 423 | rc = segment_load(local_buf, SEGMENT_SHARED, | 372 | rc = segment_load(local_buf, SEGMENT_SHARED, |
| 424 | &dev_info->start, &dev_info->end); | 373 | &dev_info->start, &dev_info->end); |
| 425 | if (rc < 0) { | 374 | if (rc < 0) { |
| 426 | dcssblk_segment_warn(rc, dev_info->segment_name); | 375 | segment_warning(rc, dev_info->segment_name); |
| 427 | goto dealloc_gendisk; | 376 | goto dealloc_gendisk; |
| 428 | } | 377 | } |
| 429 | seg_byte_size = (dev_info->end - dev_info->start + 1); | 378 | seg_byte_size = (dev_info->end - dev_info->start + 1); |
diff --git a/drivers/s390/char/monreader.c b/drivers/s390/char/monreader.c index 67009bfa093e..1e1f50655bbf 100644 --- a/drivers/s390/char/monreader.c +++ b/drivers/s390/char/monreader.c | |||
| @@ -111,56 +111,6 @@ static void dcss_mkname(char *ascii_name, char *ebcdic_name) | |||
| 111 | ASCEBC(ebcdic_name, 8); | 111 | ASCEBC(ebcdic_name, 8); |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | /* | ||
| 115 | * print appropriate error message for segment_load()/segment_type() | ||
| 116 | * return code | ||
| 117 | */ | ||
| 118 | static void mon_segment_warn(int rc, char* seg_name) | ||
| 119 | { | ||
| 120 | switch (rc) { | ||
| 121 | case -ENOENT: | ||
| 122 | P_WARNING("cannot load/query segment %s, does not exist\n", | ||
| 123 | seg_name); | ||
| 124 | break; | ||
| 125 | case -ENOSYS: | ||
| 126 | P_WARNING("cannot load/query segment %s, not running on VM\n", | ||
| 127 | seg_name); | ||
| 128 | break; | ||
| 129 | case -EIO: | ||
| 130 | P_WARNING("cannot load/query segment %s, hardware error\n", | ||
| 131 | seg_name); | ||
| 132 | break; | ||
| 133 | case -ENOTSUPP: | ||
| 134 | P_WARNING("cannot load/query segment %s, is a multi-part " | ||
| 135 | "segment\n", seg_name); | ||
| 136 | break; | ||
| 137 | case -ENOSPC: | ||
| 138 | P_WARNING("cannot load/query segment %s, overlaps with " | ||
| 139 | "storage\n", seg_name); | ||
| 140 | break; | ||
| 141 | case -EBUSY: | ||
| 142 | P_WARNING("cannot load/query segment %s, overlaps with " | ||
| 143 | "already loaded dcss\n", seg_name); | ||
| 144 | break; | ||
| 145 | case -EPERM: | ||
| 146 | P_WARNING("cannot load/query segment %s, already loaded in " | ||
| 147 | "incompatible mode\n", seg_name); | ||
| 148 | break; | ||
| 149 | case -ENOMEM: | ||
| 150 | P_WARNING("cannot load/query segment %s, out of memory\n", | ||
| 151 | seg_name); | ||
| 152 | break; | ||
| 153 | case -ERANGE: | ||
| 154 | P_WARNING("cannot load/query segment %s, exceeds kernel " | ||
| 155 | "mapping range\n", seg_name); | ||
| 156 | break; | ||
| 157 | default: | ||
| 158 | P_WARNING("cannot load/query segment %s, return value %i\n", | ||
| 159 | seg_name, rc); | ||
| 160 | break; | ||
| 161 | } | ||
| 162 | } | ||
| 163 | |||
| 164 | static inline unsigned long mon_mca_start(struct mon_msg *monmsg) | 114 | static inline unsigned long mon_mca_start(struct mon_msg *monmsg) |
| 165 | { | 115 | { |
| 166 | return *(u32 *) &monmsg->msg.rmmsg; | 116 | return *(u32 *) &monmsg->msg.rmmsg; |
| @@ -585,7 +535,7 @@ static int __init mon_init(void) | |||
| 585 | 535 | ||
| 586 | rc = segment_type(mon_dcss_name); | 536 | rc = segment_type(mon_dcss_name); |
| 587 | if (rc < 0) { | 537 | if (rc < 0) { |
| 588 | mon_segment_warn(rc, mon_dcss_name); | 538 | segment_warning(rc, mon_dcss_name); |
| 589 | goto out_iucv; | 539 | goto out_iucv; |
| 590 | } | 540 | } |
| 591 | if (rc != SEG_TYPE_SC) { | 541 | if (rc != SEG_TYPE_SC) { |
| @@ -598,7 +548,7 @@ static int __init mon_init(void) | |||
| 598 | rc = segment_load(mon_dcss_name, SEGMENT_SHARED, | 548 | rc = segment_load(mon_dcss_name, SEGMENT_SHARED, |
| 599 | &mon_dcss_start, &mon_dcss_end); | 549 | &mon_dcss_start, &mon_dcss_end); |
| 600 | if (rc < 0) { | 550 | if (rc < 0) { |
| 601 | mon_segment_warn(rc, mon_dcss_name); | 551 | segment_warning(rc, mon_dcss_name); |
| 602 | rc = -EINVAL; | 552 | rc = -EINVAL; |
| 603 | goto out_iucv; | 553 | goto out_iucv; |
| 604 | } | 554 | } |
diff --git a/drivers/s390/char/sclp_tty.c b/drivers/s390/char/sclp_tty.c index 2e616e33891d..e3b3d390b4a3 100644 --- a/drivers/s390/char/sclp_tty.c +++ b/drivers/s390/char/sclp_tty.c | |||
| @@ -332,7 +332,7 @@ sclp_tty_write_string(const unsigned char *str, int count) | |||
| 332 | if (sclp_ttybuf == NULL) { | 332 | if (sclp_ttybuf == NULL) { |
| 333 | while (list_empty(&sclp_tty_pages)) { | 333 | while (list_empty(&sclp_tty_pages)) { |
| 334 | spin_unlock_irqrestore(&sclp_tty_lock, flags); | 334 | spin_unlock_irqrestore(&sclp_tty_lock, flags); |
| 335 | if (in_atomic()) | 335 | if (in_interrupt()) |
| 336 | sclp_sync_wait(); | 336 | sclp_sync_wait(); |
| 337 | else | 337 | else |
| 338 | wait_event(sclp_tty_waitq, | 338 | wait_event(sclp_tty_waitq, |
diff --git a/drivers/s390/char/sclp_vt220.c b/drivers/s390/char/sclp_vt220.c index f7b258dfd52c..ed507594e62b 100644 --- a/drivers/s390/char/sclp_vt220.c +++ b/drivers/s390/char/sclp_vt220.c | |||
| @@ -383,7 +383,7 @@ sclp_vt220_timeout(unsigned long data) | |||
| 383 | */ | 383 | */ |
| 384 | static int | 384 | static int |
| 385 | __sclp_vt220_write(const unsigned char *buf, int count, int do_schedule, | 385 | __sclp_vt220_write(const unsigned char *buf, int count, int do_schedule, |
| 386 | int convertlf) | 386 | int convertlf, int may_schedule) |
| 387 | { | 387 | { |
| 388 | unsigned long flags; | 388 | unsigned long flags; |
| 389 | void *page; | 389 | void *page; |
| @@ -398,9 +398,8 @@ __sclp_vt220_write(const unsigned char *buf, int count, int do_schedule, | |||
| 398 | /* Create a sclp output buffer if none exists yet */ | 398 | /* Create a sclp output buffer if none exists yet */ |
| 399 | if (sclp_vt220_current_request == NULL) { | 399 | if (sclp_vt220_current_request == NULL) { |
| 400 | while (list_empty(&sclp_vt220_empty)) { | 400 | while (list_empty(&sclp_vt220_empty)) { |
| 401 | spin_unlock_irqrestore(&sclp_vt220_lock, | 401 | spin_unlock_irqrestore(&sclp_vt220_lock, flags); |
| 402 | flags); | 402 | if (in_interrupt() || !may_schedule) |
| 403 | if (in_atomic()) | ||
| 404 | sclp_sync_wait(); | 403 | sclp_sync_wait(); |
| 405 | else | 404 | else |
| 406 | wait_event(sclp_vt220_waitq, | 405 | wait_event(sclp_vt220_waitq, |
| @@ -450,7 +449,7 @@ __sclp_vt220_write(const unsigned char *buf, int count, int do_schedule, | |||
| 450 | static int | 449 | static int |
| 451 | sclp_vt220_write(struct tty_struct *tty, const unsigned char *buf, int count) | 450 | sclp_vt220_write(struct tty_struct *tty, const unsigned char *buf, int count) |
| 452 | { | 451 | { |
| 453 | return __sclp_vt220_write(buf, count, 1, 0); | 452 | return __sclp_vt220_write(buf, count, 1, 0, 1); |
| 454 | } | 453 | } |
| 455 | 454 | ||
| 456 | #define SCLP_VT220_SESSION_ENDED 0x01 | 455 | #define SCLP_VT220_SESSION_ENDED 0x01 |
| @@ -529,7 +528,7 @@ sclp_vt220_close(struct tty_struct *tty, struct file *filp) | |||
| 529 | static void | 528 | static void |
| 530 | sclp_vt220_put_char(struct tty_struct *tty, unsigned char ch) | 529 | sclp_vt220_put_char(struct tty_struct *tty, unsigned char ch) |
| 531 | { | 530 | { |
| 532 | __sclp_vt220_write(&ch, 1, 0, 0); | 531 | __sclp_vt220_write(&ch, 1, 0, 0, 1); |
| 533 | } | 532 | } |
| 534 | 533 | ||
| 535 | /* | 534 | /* |
| @@ -746,7 +745,7 @@ __initcall(sclp_vt220_tty_init); | |||
| 746 | static void | 745 | static void |
| 747 | sclp_vt220_con_write(struct console *con, const char *buf, unsigned int count) | 746 | sclp_vt220_con_write(struct console *con, const char *buf, unsigned int count) |
| 748 | { | 747 | { |
| 749 | __sclp_vt220_write((const unsigned char *) buf, count, 1, 1); | 748 | __sclp_vt220_write((const unsigned char *) buf, count, 1, 1, 0); |
| 750 | } | 749 | } |
| 751 | 750 | ||
| 752 | static struct tty_driver * | 751 | static struct tty_driver * |
diff --git a/drivers/s390/char/tape_34xx.c b/drivers/s390/char/tape_34xx.c index 5b47e9cce75f..874adf365e46 100644 --- a/drivers/s390/char/tape_34xx.c +++ b/drivers/s390/char/tape_34xx.c | |||
| @@ -394,7 +394,7 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request, | |||
| 394 | return tape_34xx_erp_failed(request, -ENOSPC); | 394 | return tape_34xx_erp_failed(request, -ENOSPC); |
| 395 | default: | 395 | default: |
| 396 | PRINT_ERR("Invalid op in %s:%i\n", | 396 | PRINT_ERR("Invalid op in %s:%i\n", |
| 397 | __FUNCTION__, __LINE__); | 397 | __func__, __LINE__); |
| 398 | return tape_34xx_erp_failed(request, 0); | 398 | return tape_34xx_erp_failed(request, 0); |
| 399 | } | 399 | } |
| 400 | } | 400 | } |
diff --git a/drivers/s390/char/tape_char.c b/drivers/s390/char/tape_char.c index b830a8cbef78..ebe84067bae9 100644 --- a/drivers/s390/char/tape_char.c +++ b/drivers/s390/char/tape_char.c | |||
| @@ -83,9 +83,9 @@ tapechar_setup_device(struct tape_device * device) | |||
| 83 | void | 83 | void |
| 84 | tapechar_cleanup_device(struct tape_device *device) | 84 | tapechar_cleanup_device(struct tape_device *device) |
| 85 | { | 85 | { |
| 86 | unregister_tape_dev(device->rt); | 86 | unregister_tape_dev(&device->cdev->dev, device->rt); |
| 87 | device->rt = NULL; | 87 | device->rt = NULL; |
| 88 | unregister_tape_dev(device->nt); | 88 | unregister_tape_dev(&device->cdev->dev, device->nt); |
| 89 | device->nt = NULL; | 89 | device->nt = NULL; |
| 90 | } | 90 | } |
| 91 | 91 | ||
diff --git a/drivers/s390/char/tape_class.c b/drivers/s390/char/tape_class.c index aa7f166f4034..6dfdb7c17981 100644 --- a/drivers/s390/char/tape_class.c +++ b/drivers/s390/char/tape_class.c | |||
| @@ -99,11 +99,10 @@ fail_with_tcd: | |||
| 99 | } | 99 | } |
| 100 | EXPORT_SYMBOL(register_tape_dev); | 100 | EXPORT_SYMBOL(register_tape_dev); |
| 101 | 101 | ||
| 102 | void unregister_tape_dev(struct tape_class_device *tcd) | 102 | void unregister_tape_dev(struct device *device, struct tape_class_device *tcd) |
| 103 | { | 103 | { |
| 104 | if (tcd != NULL && !IS_ERR(tcd)) { | 104 | if (tcd != NULL && !IS_ERR(tcd)) { |
| 105 | sysfs_remove_link(&tcd->class_device->kobj, | 105 | sysfs_remove_link(&device->kobj, tcd->mode_name); |
| 106 | tcd->mode_name); | ||
| 107 | device_destroy(tape_class, tcd->char_device->dev); | 106 | device_destroy(tape_class, tcd->char_device->dev); |
| 108 | cdev_del(tcd->char_device); | 107 | cdev_del(tcd->char_device); |
| 109 | kfree(tcd); | 108 | kfree(tcd); |
diff --git a/drivers/s390/char/tape_class.h b/drivers/s390/char/tape_class.h index e2b5ac918acf..707b7f48c232 100644 --- a/drivers/s390/char/tape_class.h +++ b/drivers/s390/char/tape_class.h | |||
| @@ -56,6 +56,6 @@ struct tape_class_device *register_tape_dev( | |||
| 56 | char * device_name, | 56 | char * device_name, |
| 57 | char * node_name | 57 | char * node_name |
| 58 | ); | 58 | ); |
| 59 | void unregister_tape_dev(struct tape_class_device *tcd); | 59 | void unregister_tape_dev(struct device *device, struct tape_class_device *tcd); |
| 60 | 60 | ||
| 61 | #endif /* __TAPE_CLASS_H__ */ | 61 | #endif /* __TAPE_CLASS_H__ */ |
diff --git a/drivers/s390/char/vmur.c b/drivers/s390/char/vmur.c index 7689b500a104..83ae9a852f00 100644 --- a/drivers/s390/char/vmur.c +++ b/drivers/s390/char/vmur.c | |||
| @@ -100,7 +100,8 @@ static struct urdev *urdev_alloc(struct ccw_device *cdev) | |||
| 100 | urd->reclen = cdev->id.driver_info; | 100 | urd->reclen = cdev->id.driver_info; |
| 101 | ccw_device_get_id(cdev, &urd->dev_id); | 101 | ccw_device_get_id(cdev, &urd->dev_id); |
| 102 | mutex_init(&urd->io_mutex); | 102 | mutex_init(&urd->io_mutex); |
| 103 | mutex_init(&urd->open_mutex); | 103 | init_waitqueue_head(&urd->wait); |
| 104 | spin_lock_init(&urd->open_lock); | ||
| 104 | atomic_set(&urd->ref_count, 1); | 105 | atomic_set(&urd->ref_count, 1); |
| 105 | urd->cdev = cdev; | 106 | urd->cdev = cdev; |
| 106 | get_device(&cdev->dev); | 107 | get_device(&cdev->dev); |
| @@ -678,17 +679,21 @@ static int ur_open(struct inode *inode, struct file *file) | |||
| 678 | if (!urd) | 679 | if (!urd) |
| 679 | return -ENXIO; | 680 | return -ENXIO; |
| 680 | 681 | ||
| 681 | if (file->f_flags & O_NONBLOCK) { | 682 | spin_lock(&urd->open_lock); |
| 682 | if (!mutex_trylock(&urd->open_mutex)) { | 683 | while (urd->open_flag) { |
| 684 | spin_unlock(&urd->open_lock); | ||
| 685 | if (file->f_flags & O_NONBLOCK) { | ||
| 683 | rc = -EBUSY; | 686 | rc = -EBUSY; |
| 684 | goto fail_put; | 687 | goto fail_put; |
| 685 | } | 688 | } |
| 686 | } else { | 689 | if (wait_event_interruptible(urd->wait, urd->open_flag == 0)) { |
| 687 | if (mutex_lock_interruptible(&urd->open_mutex)) { | ||
| 688 | rc = -ERESTARTSYS; | 690 | rc = -ERESTARTSYS; |
| 689 | goto fail_put; | 691 | goto fail_put; |
| 690 | } | 692 | } |
| 693 | spin_lock(&urd->open_lock); | ||
| 691 | } | 694 | } |
| 695 | urd->open_flag++; | ||
| 696 | spin_unlock(&urd->open_lock); | ||
| 692 | 697 | ||
| 693 | TRACE("ur_open\n"); | 698 | TRACE("ur_open\n"); |
| 694 | 699 | ||
| @@ -720,7 +725,9 @@ static int ur_open(struct inode *inode, struct file *file) | |||
| 720 | fail_urfile_free: | 725 | fail_urfile_free: |
| 721 | urfile_free(urf); | 726 | urfile_free(urf); |
| 722 | fail_unlock: | 727 | fail_unlock: |
| 723 | mutex_unlock(&urd->open_mutex); | 728 | spin_lock(&urd->open_lock); |
| 729 | urd->open_flag--; | ||
| 730 | spin_unlock(&urd->open_lock); | ||
| 724 | fail_put: | 731 | fail_put: |
| 725 | urdev_put(urd); | 732 | urdev_put(urd); |
| 726 | return rc; | 733 | return rc; |
| @@ -731,7 +738,10 @@ static int ur_release(struct inode *inode, struct file *file) | |||
| 731 | struct urfile *urf = file->private_data; | 738 | struct urfile *urf = file->private_data; |
| 732 | 739 | ||
| 733 | TRACE("ur_release\n"); | 740 | TRACE("ur_release\n"); |
| 734 | mutex_unlock(&urf->urd->open_mutex); | 741 | spin_lock(&urf->urd->open_lock); |
| 742 | urf->urd->open_flag--; | ||
| 743 | spin_unlock(&urf->urd->open_lock); | ||
| 744 | wake_up_interruptible(&urf->urd->wait); | ||
| 735 | urdev_put(urf->urd); | 745 | urdev_put(urf->urd); |
| 736 | urfile_free(urf); | 746 | urfile_free(urf); |
| 737 | return 0; | 747 | return 0; |
diff --git a/drivers/s390/char/vmur.h b/drivers/s390/char/vmur.h index fa959644735a..fa320ad4593d 100644 --- a/drivers/s390/char/vmur.h +++ b/drivers/s390/char/vmur.h | |||
| @@ -62,7 +62,6 @@ struct file_control_block { | |||
| 62 | struct urdev { | 62 | struct urdev { |
| 63 | struct ccw_device *cdev; /* Backpointer to ccw device */ | 63 | struct ccw_device *cdev; /* Backpointer to ccw device */ |
| 64 | struct mutex io_mutex; /* Serialises device IO */ | 64 | struct mutex io_mutex; /* Serialises device IO */ |
| 65 | struct mutex open_mutex; /* Serialises access to device */ | ||
| 66 | struct completion *io_done; /* do_ur_io waits; irq completes */ | 65 | struct completion *io_done; /* do_ur_io waits; irq completes */ |
| 67 | struct device *device; | 66 | struct device *device; |
| 68 | struct cdev *char_device; | 67 | struct cdev *char_device; |
| @@ -71,6 +70,9 @@ struct urdev { | |||
| 71 | int class; /* VM device class */ | 70 | int class; /* VM device class */ |
| 72 | int io_request_rc; /* return code from I/O request */ | 71 | int io_request_rc; /* return code from I/O request */ |
| 73 | atomic_t ref_count; /* reference counter */ | 72 | atomic_t ref_count; /* reference counter */ |
| 73 | wait_queue_head_t wait; /* wait queue to serialize open */ | ||
| 74 | int open_flag; /* "urdev is open" flag */ | ||
| 75 | spinlock_t open_lock; /* serialize critical sections */ | ||
| 74 | }; | 76 | }; |
| 75 | 77 | ||
| 76 | /* | 78 | /* |
diff --git a/drivers/s390/char/vmwatchdog.c b/drivers/s390/char/vmwatchdog.c index 6f40facb1c4d..19f8389291b6 100644 --- a/drivers/s390/char/vmwatchdog.c +++ b/drivers/s390/char/vmwatchdog.c | |||
| @@ -96,7 +96,7 @@ static int vmwdt_keepalive(void) | |||
| 96 | 96 | ||
| 97 | if (ret) { | 97 | if (ret) { |
| 98 | printk(KERN_WARNING "%s: problem setting interval %d, " | 98 | printk(KERN_WARNING "%s: problem setting interval %d, " |
| 99 | "cmd %s\n", __FUNCTION__, vmwdt_interval, | 99 | "cmd %s\n", __func__, vmwdt_interval, |
| 100 | vmwdt_cmd); | 100 | vmwdt_cmd); |
| 101 | } | 101 | } |
| 102 | return ret; | 102 | return ret; |
| @@ -107,7 +107,7 @@ static int vmwdt_disable(void) | |||
| 107 | int ret = __diag288(wdt_cancel, 0, "", 0); | 107 | int ret = __diag288(wdt_cancel, 0, "", 0); |
| 108 | if (ret) { | 108 | if (ret) { |
| 109 | printk(KERN_WARNING "%s: problem disabling watchdog\n", | 109 | printk(KERN_WARNING "%s: problem disabling watchdog\n", |
| 110 | __FUNCTION__); | 110 | __func__); |
| 111 | } | 111 | } |
| 112 | return ret; | 112 | return ret; |
| 113 | } | 113 | } |
diff --git a/drivers/s390/char/zcore.c b/drivers/s390/char/zcore.c index f523501e6e6c..bbbd14e9d48f 100644 --- a/drivers/s390/char/zcore.c +++ b/drivers/s390/char/zcore.c | |||
| @@ -224,7 +224,7 @@ static int __init init_cpu_info(enum arch_id arch) | |||
| 224 | 224 | ||
| 225 | sa = kmalloc(sizeof(*sa), GFP_KERNEL); | 225 | sa = kmalloc(sizeof(*sa), GFP_KERNEL); |
| 226 | if (!sa) { | 226 | if (!sa) { |
| 227 | ERROR_MSG("kmalloc failed: %s: %i\n",__FUNCTION__, __LINE__); | 227 | ERROR_MSG("kmalloc failed: %s: %i\n",__func__, __LINE__); |
| 228 | return -ENOMEM; | 228 | return -ENOMEM; |
| 229 | } | 229 | } |
| 230 | if (memcpy_hsa_kernel(sa, sys_info.sa_base, sys_info.sa_size) < 0) { | 230 | if (memcpy_hsa_kernel(sa, sys_info.sa_base, sys_info.sa_size) < 0) { |
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c index 007aaeb4f532..5de86908b0d0 100644 --- a/drivers/s390/cio/chsc.c +++ b/drivers/s390/cio/chsc.c | |||
| @@ -217,6 +217,8 @@ void chsc_chp_offline(struct chp_id chpid) | |||
| 217 | 217 | ||
| 218 | if (chp_get_status(chpid) <= 0) | 218 | if (chp_get_status(chpid) <= 0) |
| 219 | return; | 219 | return; |
| 220 | /* Wait until previous actions have settled. */ | ||
| 221 | css_wait_for_slow_path(); | ||
| 220 | for_each_subchannel_staged(s390_subchannel_remove_chpid, NULL, &chpid); | 222 | for_each_subchannel_staged(s390_subchannel_remove_chpid, NULL, &chpid); |
| 221 | } | 223 | } |
| 222 | 224 | ||
| @@ -303,7 +305,8 @@ static void s390_process_res_acc (struct res_acc_data *res_data) | |||
| 303 | sprintf(dbf_txt, "fla%x", res_data->fla); | 305 | sprintf(dbf_txt, "fla%x", res_data->fla); |
| 304 | CIO_TRACE_EVENT( 2, dbf_txt); | 306 | CIO_TRACE_EVENT( 2, dbf_txt); |
| 305 | } | 307 | } |
| 306 | 308 | /* Wait until previous actions have settled. */ | |
| 309 | css_wait_for_slow_path(); | ||
| 307 | /* | 310 | /* |
| 308 | * I/O resources may have become accessible. | 311 | * I/O resources may have become accessible. |
| 309 | * Scan through all subchannels that may be concerned and | 312 | * Scan through all subchannels that may be concerned and |
| @@ -561,9 +564,12 @@ void chsc_chp_online(struct chp_id chpid) | |||
| 561 | sprintf(dbf_txt, "cadd%x.%02x", chpid.cssid, chpid.id); | 564 | sprintf(dbf_txt, "cadd%x.%02x", chpid.cssid, chpid.id); |
| 562 | CIO_TRACE_EVENT(2, dbf_txt); | 565 | CIO_TRACE_EVENT(2, dbf_txt); |
| 563 | 566 | ||
| 564 | if (chp_get_status(chpid) != 0) | 567 | if (chp_get_status(chpid) != 0) { |
| 568 | /* Wait until previous actions have settled. */ | ||
| 569 | css_wait_for_slow_path(); | ||
| 565 | for_each_subchannel_staged(__chp_add, __chp_add_new_sch, | 570 | for_each_subchannel_staged(__chp_add, __chp_add_new_sch, |
| 566 | &chpid); | 571 | &chpid); |
| 572 | } | ||
| 567 | } | 573 | } |
| 568 | 574 | ||
| 569 | static void __s390_subchannel_vary_chpid(struct subchannel *sch, | 575 | static void __s390_subchannel_vary_chpid(struct subchannel *sch, |
| @@ -650,6 +656,8 @@ __s390_vary_chpid_on(struct subchannel_id schid, void *data) | |||
| 650 | */ | 656 | */ |
| 651 | int chsc_chp_vary(struct chp_id chpid, int on) | 657 | int chsc_chp_vary(struct chp_id chpid, int on) |
| 652 | { | 658 | { |
| 659 | /* Wait until previous actions have settled. */ | ||
| 660 | css_wait_for_slow_path(); | ||
| 653 | /* | 661 | /* |
| 654 | * Redo PathVerification on the devices the chpid connects to | 662 | * Redo PathVerification on the devices the chpid connects to |
| 655 | */ | 663 | */ |
| @@ -758,7 +766,6 @@ chsc_secm(struct channel_subsystem *css, int enable) | |||
| 758 | if (!secm_area) | 766 | if (!secm_area) |
| 759 | return -ENOMEM; | 767 | return -ENOMEM; |
| 760 | 768 | ||
| 761 | mutex_lock(&css->mutex); | ||
| 762 | if (enable && !css->cm_enabled) { | 769 | if (enable && !css->cm_enabled) { |
| 763 | css->cub_addr1 = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); | 770 | css->cub_addr1 = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); |
| 764 | css->cub_addr2 = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); | 771 | css->cub_addr2 = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); |
| @@ -766,7 +773,6 @@ chsc_secm(struct channel_subsystem *css, int enable) | |||
| 766 | free_page((unsigned long)css->cub_addr1); | 773 | free_page((unsigned long)css->cub_addr1); |
| 767 | free_page((unsigned long)css->cub_addr2); | 774 | free_page((unsigned long)css->cub_addr2); |
| 768 | free_page((unsigned long)secm_area); | 775 | free_page((unsigned long)secm_area); |
| 769 | mutex_unlock(&css->mutex); | ||
| 770 | return -ENOMEM; | 776 | return -ENOMEM; |
| 771 | } | 777 | } |
| 772 | } | 778 | } |
| @@ -787,7 +793,6 @@ chsc_secm(struct channel_subsystem *css, int enable) | |||
| 787 | free_page((unsigned long)css->cub_addr1); | 793 | free_page((unsigned long)css->cub_addr1); |
| 788 | free_page((unsigned long)css->cub_addr2); | 794 | free_page((unsigned long)css->cub_addr2); |
| 789 | } | 795 | } |
| 790 | mutex_unlock(&css->mutex); | ||
| 791 | free_page((unsigned long)secm_area); | 796 | free_page((unsigned long)secm_area); |
| 792 | return ret; | 797 | return ret; |
| 793 | } | 798 | } |
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index 60590a12d529..23ffcc4768a7 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #include <asm/ipl.h> | 24 | #include <asm/ipl.h> |
| 25 | #include <asm/chpid.h> | 25 | #include <asm/chpid.h> |
| 26 | #include <asm/airq.h> | 26 | #include <asm/airq.h> |
| 27 | #include <asm/cpu.h> | ||
| 27 | #include "cio.h" | 28 | #include "cio.h" |
| 28 | #include "css.h" | 29 | #include "css.h" |
| 29 | #include "chsc.h" | 30 | #include "chsc.h" |
| @@ -649,13 +650,10 @@ do_IRQ (struct pt_regs *regs) | |||
| 649 | 650 | ||
| 650 | old_regs = set_irq_regs(regs); | 651 | old_regs = set_irq_regs(regs); |
| 651 | irq_enter(); | 652 | irq_enter(); |
| 652 | asm volatile ("mc 0,0"); | 653 | s390_idle_check(); |
| 653 | if (S390_lowcore.int_clock >= S390_lowcore.jiffy_timer) | 654 | if (S390_lowcore.int_clock >= S390_lowcore.clock_comparator) |
| 654 | /** | 655 | /* Serve timer interrupts first. */ |
| 655 | * Make sure that the i/o interrupt did not "overtake" | 656 | clock_comparator_work(); |
| 656 | * the last HZ timer interrupt. | ||
| 657 | */ | ||
| 658 | account_ticks(S390_lowcore.int_clock); | ||
| 659 | /* | 657 | /* |
| 660 | * Get interrupt information from lowcore | 658 | * Get interrupt information from lowcore |
| 661 | */ | 659 | */ |
| @@ -672,10 +670,14 @@ do_IRQ (struct pt_regs *regs) | |||
| 672 | continue; | 670 | continue; |
| 673 | } | 671 | } |
| 674 | sch = (struct subchannel *)(unsigned long)tpi_info->intparm; | 672 | sch = (struct subchannel *)(unsigned long)tpi_info->intparm; |
| 675 | if (sch) | 673 | if (!sch) { |
| 676 | spin_lock(sch->lock); | 674 | /* Clear pending interrupt condition. */ |
| 675 | tsch(tpi_info->schid, irb); | ||
| 676 | continue; | ||
| 677 | } | ||
| 678 | spin_lock(sch->lock); | ||
| 677 | /* Store interrupt response block to lowcore. */ | 679 | /* Store interrupt response block to lowcore. */ |
| 678 | if (tsch (tpi_info->schid, irb) == 0 && sch) { | 680 | if (tsch(tpi_info->schid, irb) == 0) { |
| 679 | /* Keep subchannel information word up to date. */ | 681 | /* Keep subchannel information word up to date. */ |
| 680 | memcpy (&sch->schib.scsw, &irb->scsw, | 682 | memcpy (&sch->schib.scsw, &irb->scsw, |
| 681 | sizeof (irb->scsw)); | 683 | sizeof (irb->scsw)); |
| @@ -683,8 +685,7 @@ do_IRQ (struct pt_regs *regs) | |||
| 683 | if (sch->driver && sch->driver->irq) | 685 | if (sch->driver && sch->driver->irq) |
| 684 | sch->driver->irq(sch); | 686 | sch->driver->irq(sch); |
| 685 | } | 687 | } |
| 686 | if (sch) | 688 | spin_unlock(sch->lock); |
| 687 | spin_unlock(sch->lock); | ||
| 688 | /* | 689 | /* |
| 689 | * Are more interrupts pending? | 690 | * Are more interrupts pending? |
| 690 | * If so, the tpi instruction will update the lowcore | 691 | * If so, the tpi instruction will update the lowcore |
| @@ -710,8 +711,9 @@ void *cio_get_console_priv(void) | |||
| 710 | /* | 711 | /* |
| 711 | * busy wait for the next interrupt on the console | 712 | * busy wait for the next interrupt on the console |
| 712 | */ | 713 | */ |
| 713 | void | 714 | void wait_cons_dev(void) |
| 714 | wait_cons_dev (void) | 715 | __releases(console_subchannel.lock) |
| 716 | __acquires(console_subchannel.lock) | ||
| 715 | { | 717 | { |
| 716 | unsigned long cr6 __attribute__ ((aligned (8))); | 718 | unsigned long cr6 __attribute__ ((aligned (8))); |
| 717 | unsigned long save_cr6 __attribute__ ((aligned (8))); | 719 | unsigned long save_cr6 __attribute__ ((aligned (8))); |
diff --git a/drivers/s390/cio/cio.h b/drivers/s390/cio/cio.h index 52afa4c784de..08f2235c5a6f 100644 --- a/drivers/s390/cio/cio.h +++ b/drivers/s390/cio/cio.h | |||
| @@ -100,6 +100,7 @@ extern int cio_modify (struct subchannel *); | |||
| 100 | 100 | ||
| 101 | int cio_create_sch_lock(struct subchannel *); | 101 | int cio_create_sch_lock(struct subchannel *); |
| 102 | void do_adapter_IO(void); | 102 | void do_adapter_IO(void); |
| 103 | void do_IRQ(struct pt_regs *); | ||
| 103 | 104 | ||
| 104 | /* Use with care. */ | 105 | /* Use with care. */ |
| 105 | #ifdef CONFIG_CCW_CONSOLE | 106 | #ifdef CONFIG_CCW_CONSOLE |
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index 3b45bbe6cce0..c1afab5f72d6 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c | |||
| @@ -533,6 +533,12 @@ void css_schedule_eval_all(void) | |||
| 533 | spin_unlock_irqrestore(&slow_subchannel_lock, flags); | 533 | spin_unlock_irqrestore(&slow_subchannel_lock, flags); |
| 534 | } | 534 | } |
| 535 | 535 | ||
| 536 | void css_wait_for_slow_path(void) | ||
| 537 | { | ||
| 538 | flush_workqueue(ccw_device_notify_work); | ||
| 539 | flush_workqueue(slow_path_wq); | ||
| 540 | } | ||
| 541 | |||
| 536 | /* Reprobe subchannel if unregistered. */ | 542 | /* Reprobe subchannel if unregistered. */ |
| 537 | static int reprobe_subchannel(struct subchannel_id schid, void *data) | 543 | static int reprobe_subchannel(struct subchannel_id schid, void *data) |
| 538 | { | 544 | { |
| @@ -683,10 +689,14 @@ css_cm_enable_show(struct device *dev, struct device_attribute *attr, | |||
| 683 | char *buf) | 689 | char *buf) |
| 684 | { | 690 | { |
| 685 | struct channel_subsystem *css = to_css(dev); | 691 | struct channel_subsystem *css = to_css(dev); |
| 692 | int ret; | ||
| 686 | 693 | ||
| 687 | if (!css) | 694 | if (!css) |
| 688 | return 0; | 695 | return 0; |
| 689 | return sprintf(buf, "%x\n", css->cm_enabled); | 696 | mutex_lock(&css->mutex); |
| 697 | ret = sprintf(buf, "%x\n", css->cm_enabled); | ||
| 698 | mutex_unlock(&css->mutex); | ||
| 699 | return ret; | ||
| 690 | } | 700 | } |
| 691 | 701 | ||
| 692 | static ssize_t | 702 | static ssize_t |
| @@ -696,6 +706,7 @@ css_cm_enable_store(struct device *dev, struct device_attribute *attr, | |||
| 696 | struct channel_subsystem *css = to_css(dev); | 706 | struct channel_subsystem *css = to_css(dev); |
| 697 | int ret; | 707 | int ret; |
| 698 | 708 | ||
| 709 | mutex_lock(&css->mutex); | ||
| 699 | switch (buf[0]) { | 710 | switch (buf[0]) { |
| 700 | case '0': | 711 | case '0': |
| 701 | ret = css->cm_enabled ? chsc_secm(css, 0) : 0; | 712 | ret = css->cm_enabled ? chsc_secm(css, 0) : 0; |
| @@ -706,6 +717,7 @@ css_cm_enable_store(struct device *dev, struct device_attribute *attr, | |||
| 706 | default: | 717 | default: |
| 707 | ret = -EINVAL; | 718 | ret = -EINVAL; |
| 708 | } | 719 | } |
| 720 | mutex_unlock(&css->mutex); | ||
| 709 | return ret < 0 ? ret : count; | 721 | return ret < 0 ? ret : count; |
| 710 | } | 722 | } |
| 711 | 723 | ||
| @@ -752,9 +764,11 @@ static int css_reboot_event(struct notifier_block *this, | |||
| 752 | struct channel_subsystem *css; | 764 | struct channel_subsystem *css; |
| 753 | 765 | ||
| 754 | css = channel_subsystems[i]; | 766 | css = channel_subsystems[i]; |
| 767 | mutex_lock(&css->mutex); | ||
| 755 | if (css->cm_enabled) | 768 | if (css->cm_enabled) |
| 756 | if (chsc_secm(css, 0)) | 769 | if (chsc_secm(css, 0)) |
| 757 | ret = NOTIFY_BAD; | 770 | ret = NOTIFY_BAD; |
| 771 | mutex_unlock(&css->mutex); | ||
| 758 | } | 772 | } |
| 759 | 773 | ||
| 760 | return ret; | 774 | return ret; |
diff --git a/drivers/s390/cio/css.h b/drivers/s390/cio/css.h index b70554523552..e1913518f354 100644 --- a/drivers/s390/cio/css.h +++ b/drivers/s390/cio/css.h | |||
| @@ -144,6 +144,7 @@ struct schib; | |||
| 144 | int css_sch_is_valid(struct schib *); | 144 | int css_sch_is_valid(struct schib *); |
| 145 | 145 | ||
| 146 | extern struct workqueue_struct *slow_path_wq; | 146 | extern struct workqueue_struct *slow_path_wq; |
| 147 | void css_wait_for_slow_path(void); | ||
| 147 | 148 | ||
| 148 | extern struct attribute_group *subch_attr_groups[]; | 149 | extern struct attribute_group *subch_attr_groups[]; |
| 149 | #endif | 150 | #endif |
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index fec004f62bcf..e0c7adb8958e 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
| @@ -577,7 +577,6 @@ static DEVICE_ATTR(devtype, 0444, devtype_show, NULL); | |||
| 577 | static DEVICE_ATTR(cutype, 0444, cutype_show, NULL); | 577 | static DEVICE_ATTR(cutype, 0444, cutype_show, NULL); |
| 578 | static DEVICE_ATTR(modalias, 0444, modalias_show, NULL); | 578 | static DEVICE_ATTR(modalias, 0444, modalias_show, NULL); |
| 579 | static DEVICE_ATTR(online, 0644, online_show, online_store); | 579 | static DEVICE_ATTR(online, 0644, online_show, online_store); |
| 580 | extern struct device_attribute dev_attr_cmb_enable; | ||
| 581 | static DEVICE_ATTR(availability, 0444, available_show, NULL); | 580 | static DEVICE_ATTR(availability, 0444, available_show, NULL); |
| 582 | 581 | ||
| 583 | static struct attribute * subch_attrs[] = { | 582 | static struct attribute * subch_attrs[] = { |
diff --git a/drivers/s390/cio/device.h b/drivers/s390/cio/device.h index d40a2ffaa000..cb08092be39f 100644 --- a/drivers/s390/cio/device.h +++ b/drivers/s390/cio/device.h | |||
| @@ -127,4 +127,5 @@ extern struct bus_type ccw_bus_type; | |||
| 127 | void retry_set_schib(struct ccw_device *cdev); | 127 | void retry_set_schib(struct ccw_device *cdev); |
| 128 | void cmf_retry_copy_block(struct ccw_device *); | 128 | void cmf_retry_copy_block(struct ccw_device *); |
| 129 | int cmf_reenable(struct ccw_device *); | 129 | int cmf_reenable(struct ccw_device *); |
| 130 | extern struct device_attribute dev_attr_cmb_enable; | ||
| 130 | #endif | 131 | #endif |
diff --git a/drivers/s390/cio/device_ops.c b/drivers/s390/cio/device_ops.c index 49b58eb0fab8..a1718a0aa539 100644 --- a/drivers/s390/cio/device_ops.c +++ b/drivers/s390/cio/device_ops.c | |||
| @@ -193,8 +193,15 @@ int ccw_device_start_key(struct ccw_device *cdev, struct ccw1 *cpa, | |||
| 193 | return -EACCES; | 193 | return -EACCES; |
| 194 | } | 194 | } |
| 195 | ret = cio_start_key (sch, cpa, lpm, key); | 195 | ret = cio_start_key (sch, cpa, lpm, key); |
| 196 | if (ret == 0) | 196 | switch (ret) { |
| 197 | case 0: | ||
| 197 | cdev->private->intparm = intparm; | 198 | cdev->private->intparm = intparm; |
| 199 | break; | ||
| 200 | case -EACCES: | ||
| 201 | case -ENODEV: | ||
| 202 | dev_fsm_event(cdev, DEV_EVENT_VERIFY); | ||
| 203 | break; | ||
| 204 | } | ||
| 198 | return ret; | 205 | return ret; |
| 199 | } | 206 | } |
| 200 | 207 | ||
diff --git a/drivers/s390/cio/device_status.c b/drivers/s390/cio/device_status.c index ebe0848cfe33..4a38993000f2 100644 --- a/drivers/s390/cio/device_status.c +++ b/drivers/s390/cio/device_status.c | |||
| @@ -62,7 +62,7 @@ ccw_device_path_notoper(struct ccw_device *cdev) | |||
| 62 | stsch (sch->schid, &sch->schib); | 62 | stsch (sch->schid, &sch->schib); |
| 63 | 63 | ||
| 64 | CIO_MSG_EVENT(0, "%s(0.%x.%04x) - path(s) %02x are " | 64 | CIO_MSG_EVENT(0, "%s(0.%x.%04x) - path(s) %02x are " |
| 65 | "not operational \n", __FUNCTION__, | 65 | "not operational \n", __func__, |
| 66 | sch->schid.ssid, sch->schid.sch_no, | 66 | sch->schid.ssid, sch->schid.sch_no, |
| 67 | sch->schib.pmcw.pnom); | 67 | sch->schib.pmcw.pnom); |
| 68 | 68 | ||
| @@ -312,6 +312,7 @@ ccw_device_do_sense(struct ccw_device *cdev, struct irb *irb) | |||
| 312 | { | 312 | { |
| 313 | struct subchannel *sch; | 313 | struct subchannel *sch; |
| 314 | struct ccw1 *sense_ccw; | 314 | struct ccw1 *sense_ccw; |
| 315 | int rc; | ||
| 315 | 316 | ||
| 316 | sch = to_subchannel(cdev->dev.parent); | 317 | sch = to_subchannel(cdev->dev.parent); |
| 317 | 318 | ||
| @@ -337,7 +338,10 @@ ccw_device_do_sense(struct ccw_device *cdev, struct irb *irb) | |||
| 337 | /* Reset internal retry indication. */ | 338 | /* Reset internal retry indication. */ |
| 338 | cdev->private->flags.intretry = 0; | 339 | cdev->private->flags.intretry = 0; |
| 339 | 340 | ||
| 340 | return cio_start(sch, sense_ccw, 0xff); | 341 | rc = cio_start(sch, sense_ccw, 0xff); |
| 342 | if (rc == -ENODEV || rc == -EACCES) | ||
| 343 | dev_fsm_event(cdev, DEV_EVENT_VERIFY); | ||
| 344 | return rc; | ||
| 341 | } | 345 | } |
| 342 | 346 | ||
| 343 | /* | 347 | /* |
diff --git a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c index 2b5bfb7c69e5..c359386708e9 100644 --- a/drivers/s390/cio/qdio.c +++ b/drivers/s390/cio/qdio.c | |||
| @@ -1399,7 +1399,7 @@ __tiqdio_inbound_processing(struct qdio_q *q, int spare_ind_was_set) | |||
| 1399 | * q->dev_st_chg_ind is the indicator, be it shared or not. | 1399 | * q->dev_st_chg_ind is the indicator, be it shared or not. |
| 1400 | * only clear it, if indicator is non-shared | 1400 | * only clear it, if indicator is non-shared |
| 1401 | */ | 1401 | */ |
| 1402 | if (!spare_ind_was_set) | 1402 | if (q->dev_st_chg_ind != &spare_indicator) |
| 1403 | tiqdio_clear_summary_bit((__u32*)q->dev_st_chg_ind); | 1403 | tiqdio_clear_summary_bit((__u32*)q->dev_st_chg_ind); |
| 1404 | 1404 | ||
| 1405 | if (q->hydra_gives_outbound_pcis) { | 1405 | if (q->hydra_gives_outbound_pcis) { |
| @@ -2217,9 +2217,78 @@ qdio_synchronize(struct ccw_device *cdev, unsigned int flags, | |||
| 2217 | return cc; | 2217 | return cc; |
| 2218 | } | 2218 | } |
| 2219 | 2219 | ||
| 2220 | static int | ||
| 2221 | qdio_get_ssqd_information(struct subchannel_id *schid, | ||
| 2222 | struct qdio_chsc_ssqd **ssqd_area) | ||
| 2223 | { | ||
| 2224 | int result; | ||
| 2225 | |||
| 2226 | QDIO_DBF_TEXT0(0, setup, "getssqd"); | ||
| 2227 | *ssqd_area = mempool_alloc(qdio_mempool_scssc, GFP_ATOMIC); | ||
| 2228 | if (!ssqd_area) { | ||
| 2229 | QDIO_PRINT_WARN("Could not get memory for chsc on sch x%x.\n", | ||
| 2230 | schid->sch_no); | ||
| 2231 | return -ENOMEM; | ||
| 2232 | } | ||
| 2233 | |||
| 2234 | (*ssqd_area)->request = (struct chsc_header) { | ||
| 2235 | .length = 0x0010, | ||
| 2236 | .code = 0x0024, | ||
| 2237 | }; | ||
| 2238 | (*ssqd_area)->first_sch = schid->sch_no; | ||
| 2239 | (*ssqd_area)->last_sch = schid->sch_no; | ||
| 2240 | (*ssqd_area)->ssid = schid->ssid; | ||
| 2241 | result = chsc(*ssqd_area); | ||
| 2242 | |||
| 2243 | if (result) { | ||
| 2244 | QDIO_PRINT_WARN("CHSC returned cc %i on sch 0.%x.%x.\n", | ||
| 2245 | result, schid->ssid, schid->sch_no); | ||
| 2246 | goto out; | ||
| 2247 | } | ||
| 2248 | |||
| 2249 | if ((*ssqd_area)->response.code != QDIO_CHSC_RESPONSE_CODE_OK) { | ||
| 2250 | QDIO_PRINT_WARN("CHSC response is 0x%x on sch 0.%x.%x.\n", | ||
| 2251 | (*ssqd_area)->response.code, | ||
| 2252 | schid->ssid, schid->sch_no); | ||
| 2253 | goto out; | ||
| 2254 | } | ||
| 2255 | if (!((*ssqd_area)->flags & CHSC_FLAG_QDIO_CAPABILITY) || | ||
| 2256 | !((*ssqd_area)->flags & CHSC_FLAG_VALIDITY) || | ||
| 2257 | ((*ssqd_area)->sch != schid->sch_no)) { | ||
| 2258 | QDIO_PRINT_WARN("huh? problems checking out sch 0.%x.%x... " \ | ||
| 2259 | "using all SIGAs.\n", | ||
| 2260 | schid->ssid, schid->sch_no); | ||
| 2261 | goto out; | ||
| 2262 | } | ||
| 2263 | return 0; | ||
| 2264 | out: | ||
| 2265 | return -EINVAL; | ||
| 2266 | } | ||
| 2267 | |||
| 2268 | int | ||
| 2269 | qdio_get_ssqd_pct(struct ccw_device *cdev) | ||
| 2270 | { | ||
| 2271 | struct qdio_chsc_ssqd *ssqd_area; | ||
| 2272 | struct subchannel_id schid; | ||
| 2273 | char dbf_text[15]; | ||
| 2274 | int rc; | ||
| 2275 | int pct = 0; | ||
| 2276 | |||
| 2277 | QDIO_DBF_TEXT0(0, setup, "getpct"); | ||
| 2278 | schid = ccw_device_get_subchannel_id(cdev); | ||
| 2279 | rc = qdio_get_ssqd_information(&schid, &ssqd_area); | ||
| 2280 | if (!rc) | ||
| 2281 | pct = (int)ssqd_area->pct; | ||
| 2282 | if (rc != -ENOMEM) | ||
| 2283 | mempool_free(ssqd_area, qdio_mempool_scssc); | ||
| 2284 | sprintf(dbf_text, "pct: %d", pct); | ||
| 2285 | QDIO_DBF_TEXT2(0, setup, dbf_text); | ||
| 2286 | return pct; | ||
| 2287 | } | ||
| 2288 | EXPORT_SYMBOL(qdio_get_ssqd_pct); | ||
| 2289 | |||
| 2220 | static void | 2290 | static void |
| 2221 | qdio_check_subchannel_qebsm(struct qdio_irq *irq_ptr, unsigned char qdioac, | 2291 | qdio_check_subchannel_qebsm(struct qdio_irq *irq_ptr, unsigned long token) |
| 2222 | unsigned long token) | ||
| 2223 | { | 2292 | { |
| 2224 | struct qdio_q *q; | 2293 | struct qdio_q *q; |
| 2225 | int i; | 2294 | int i; |
| @@ -2227,7 +2296,7 @@ qdio_check_subchannel_qebsm(struct qdio_irq *irq_ptr, unsigned char qdioac, | |||
| 2227 | char dbf_text[15]; | 2296 | char dbf_text[15]; |
| 2228 | 2297 | ||
| 2229 | /*check if QEBSM is disabled */ | 2298 | /*check if QEBSM is disabled */ |
| 2230 | if (!(irq_ptr->is_qebsm) || !(qdioac & 0x01)) { | 2299 | if (!(irq_ptr->is_qebsm) || !(irq_ptr->qdioac & 0x01)) { |
| 2231 | irq_ptr->is_qebsm = 0; | 2300 | irq_ptr->is_qebsm = 0; |
| 2232 | irq_ptr->sch_token = 0; | 2301 | irq_ptr->sch_token = 0; |
| 2233 | irq_ptr->qib.rflags &= ~QIB_RFLAGS_ENABLE_QEBSM; | 2302 | irq_ptr->qib.rflags &= ~QIB_RFLAGS_ENABLE_QEBSM; |
| @@ -2256,102 +2325,27 @@ qdio_check_subchannel_qebsm(struct qdio_irq *irq_ptr, unsigned char qdioac, | |||
| 2256 | } | 2325 | } |
| 2257 | 2326 | ||
| 2258 | static void | 2327 | static void |
| 2259 | qdio_get_ssqd_information(struct qdio_irq *irq_ptr) | 2328 | qdio_get_ssqd_siga(struct qdio_irq *irq_ptr) |
| 2260 | { | 2329 | { |
| 2261 | int result; | 2330 | int rc; |
| 2262 | unsigned char qdioac; | 2331 | struct qdio_chsc_ssqd *ssqd_area; |
| 2263 | struct { | ||
| 2264 | struct chsc_header request; | ||
| 2265 | u16 reserved1:10; | ||
| 2266 | u16 ssid:2; | ||
| 2267 | u16 fmt:4; | ||
| 2268 | u16 first_sch; | ||
| 2269 | u16 reserved2; | ||
| 2270 | u16 last_sch; | ||
| 2271 | u32 reserved3; | ||
| 2272 | struct chsc_header response; | ||
| 2273 | u32 reserved4; | ||
| 2274 | u8 flags; | ||
| 2275 | u8 reserved5; | ||
| 2276 | u16 sch; | ||
| 2277 | u8 qfmt; | ||
| 2278 | u8 parm; | ||
| 2279 | u8 qdioac1; | ||
| 2280 | u8 sch_class; | ||
| 2281 | u8 reserved7; | ||
| 2282 | u8 icnt; | ||
| 2283 | u8 reserved8; | ||
| 2284 | u8 ocnt; | ||
| 2285 | u8 reserved9; | ||
| 2286 | u8 mbccnt; | ||
| 2287 | u16 qdioac2; | ||
| 2288 | u64 sch_token; | ||
| 2289 | } *ssqd_area; | ||
| 2290 | 2332 | ||
| 2291 | QDIO_DBF_TEXT0(0,setup,"getssqd"); | 2333 | QDIO_DBF_TEXT0(0,setup,"getssqd"); |
| 2292 | qdioac = 0; | 2334 | irq_ptr->qdioac = 0; |
| 2293 | ssqd_area = mempool_alloc(qdio_mempool_scssc, GFP_ATOMIC); | 2335 | rc = qdio_get_ssqd_information(&irq_ptr->schid, &ssqd_area); |
| 2294 | if (!ssqd_area) { | 2336 | if (rc) { |
| 2295 | QDIO_PRINT_WARN("Could not get memory for chsc. Using all " \ | 2337 | QDIO_PRINT_WARN("using all SIGAs for sch x%x.n", |
| 2296 | "SIGAs for sch x%x.\n", irq_ptr->schid.sch_no); | 2338 | irq_ptr->schid.sch_no); |
| 2297 | irq_ptr->qdioac = CHSC_FLAG_SIGA_INPUT_NECESSARY | | 2339 | irq_ptr->qdioac = CHSC_FLAG_SIGA_INPUT_NECESSARY | |
| 2298 | CHSC_FLAG_SIGA_OUTPUT_NECESSARY | | 2340 | CHSC_FLAG_SIGA_OUTPUT_NECESSARY | |
| 2299 | CHSC_FLAG_SIGA_SYNC_NECESSARY; /* all flags set */ | 2341 | CHSC_FLAG_SIGA_SYNC_NECESSARY; /* all flags set */ |
| 2300 | irq_ptr->is_qebsm = 0; | 2342 | irq_ptr->is_qebsm = 0; |
| 2301 | irq_ptr->sch_token = 0; | 2343 | } else |
| 2302 | irq_ptr->qib.rflags &= ~QIB_RFLAGS_ENABLE_QEBSM; | 2344 | irq_ptr->qdioac = ssqd_area->qdioac1; |
| 2303 | return; | ||
| 2304 | } | ||
| 2305 | |||
| 2306 | ssqd_area->request = (struct chsc_header) { | ||
| 2307 | .length = 0x0010, | ||
| 2308 | .code = 0x0024, | ||
| 2309 | }; | ||
| 2310 | ssqd_area->first_sch = irq_ptr->schid.sch_no; | ||
| 2311 | ssqd_area->last_sch = irq_ptr->schid.sch_no; | ||
| 2312 | ssqd_area->ssid = irq_ptr->schid.ssid; | ||
| 2313 | result = chsc(ssqd_area); | ||
| 2314 | |||
| 2315 | if (result) { | ||
| 2316 | QDIO_PRINT_WARN("CHSC returned cc %i. Using all " \ | ||
| 2317 | "SIGAs for sch 0.%x.%x.\n", result, | ||
| 2318 | irq_ptr->schid.ssid, irq_ptr->schid.sch_no); | ||
| 2319 | qdioac = CHSC_FLAG_SIGA_INPUT_NECESSARY | | ||
| 2320 | CHSC_FLAG_SIGA_OUTPUT_NECESSARY | | ||
| 2321 | CHSC_FLAG_SIGA_SYNC_NECESSARY; /* all flags set */ | ||
| 2322 | irq_ptr->is_qebsm = 0; | ||
| 2323 | goto out; | ||
| 2324 | } | ||
| 2325 | 2345 | ||
| 2326 | if (ssqd_area->response.code != QDIO_CHSC_RESPONSE_CODE_OK) { | 2346 | qdio_check_subchannel_qebsm(irq_ptr, ssqd_area->sch_token); |
| 2327 | QDIO_PRINT_WARN("response upon checking SIGA needs " \ | 2347 | if (rc != -ENOMEM) |
| 2328 | "is 0x%x. Using all SIGAs for sch 0.%x.%x.\n", | 2348 | mempool_free(ssqd_area, qdio_mempool_scssc); |
| 2329 | ssqd_area->response.code, | ||
| 2330 | irq_ptr->schid.ssid, irq_ptr->schid.sch_no); | ||
| 2331 | qdioac = CHSC_FLAG_SIGA_INPUT_NECESSARY | | ||
| 2332 | CHSC_FLAG_SIGA_OUTPUT_NECESSARY | | ||
| 2333 | CHSC_FLAG_SIGA_SYNC_NECESSARY; /* all flags set */ | ||
| 2334 | irq_ptr->is_qebsm = 0; | ||
| 2335 | goto out; | ||
| 2336 | } | ||
| 2337 | if (!(ssqd_area->flags & CHSC_FLAG_QDIO_CAPABILITY) || | ||
| 2338 | !(ssqd_area->flags & CHSC_FLAG_VALIDITY) || | ||
| 2339 | (ssqd_area->sch != irq_ptr->schid.sch_no)) { | ||
| 2340 | QDIO_PRINT_WARN("huh? problems checking out sch 0.%x.%x... " \ | ||
| 2341 | "using all SIGAs.\n", | ||
| 2342 | irq_ptr->schid.ssid, irq_ptr->schid.sch_no); | ||
| 2343 | qdioac = CHSC_FLAG_SIGA_INPUT_NECESSARY | | ||
| 2344 | CHSC_FLAG_SIGA_OUTPUT_NECESSARY | | ||
| 2345 | CHSC_FLAG_SIGA_SYNC_NECESSARY; /* worst case */ | ||
| 2346 | irq_ptr->is_qebsm = 0; | ||
| 2347 | goto out; | ||
| 2348 | } | ||
| 2349 | qdioac = ssqd_area->qdioac1; | ||
| 2350 | out: | ||
| 2351 | qdio_check_subchannel_qebsm(irq_ptr, qdioac, | ||
| 2352 | ssqd_area->sch_token); | ||
| 2353 | mempool_free(ssqd_area, qdio_mempool_scssc); | ||
| 2354 | irq_ptr->qdioac = qdioac; | ||
| 2355 | } | 2349 | } |
| 2356 | 2350 | ||
| 2357 | static unsigned int | 2351 | static unsigned int |
| @@ -3227,7 +3221,7 @@ qdio_establish(struct qdio_initialize *init_data) | |||
| 3227 | return -EIO; | 3221 | return -EIO; |
| 3228 | } | 3222 | } |
| 3229 | 3223 | ||
| 3230 | qdio_get_ssqd_information(irq_ptr); | 3224 | qdio_get_ssqd_siga(irq_ptr); |
| 3231 | /* if this gets set once, we're running under VM and can omit SVSes */ | 3225 | /* if this gets set once, we're running under VM and can omit SVSes */ |
| 3232 | if (irq_ptr->qdioac&CHSC_FLAG_SIGA_SYNC_NECESSARY) | 3226 | if (irq_ptr->qdioac&CHSC_FLAG_SIGA_SYNC_NECESSARY) |
| 3233 | omit_svs=1; | 3227 | omit_svs=1; |
diff --git a/drivers/s390/cio/qdio.h b/drivers/s390/cio/qdio.h index da8a272fd75b..c3df6b2c38b7 100644 --- a/drivers/s390/cio/qdio.h +++ b/drivers/s390/cio/qdio.h | |||
| @@ -406,6 +406,34 @@ do_clear_global_summary(void) | |||
| 406 | #define CHSC_FLAG_SIGA_SYNC_DONE_ON_THININTS 0x08 | 406 | #define CHSC_FLAG_SIGA_SYNC_DONE_ON_THININTS 0x08 |
| 407 | #define CHSC_FLAG_SIGA_SYNC_DONE_ON_OUTB_PCIS 0x04 | 407 | #define CHSC_FLAG_SIGA_SYNC_DONE_ON_OUTB_PCIS 0x04 |
| 408 | 408 | ||
| 409 | struct qdio_chsc_ssqd { | ||
| 410 | struct chsc_header request; | ||
| 411 | u16 reserved1:10; | ||
| 412 | u16 ssid:2; | ||
| 413 | u16 fmt:4; | ||
| 414 | u16 first_sch; | ||
| 415 | u16 reserved2; | ||
| 416 | u16 last_sch; | ||
| 417 | u32 reserved3; | ||
| 418 | struct chsc_header response; | ||
| 419 | u32 reserved4; | ||
| 420 | u8 flags; | ||
| 421 | u8 reserved5; | ||
| 422 | u16 sch; | ||
| 423 | u8 qfmt; | ||
| 424 | u8 parm; | ||
| 425 | u8 qdioac1; | ||
| 426 | u8 sch_class; | ||
| 427 | u8 pct; | ||
| 428 | u8 icnt; | ||
| 429 | u8 reserved7; | ||
| 430 | u8 ocnt; | ||
| 431 | u8 reserved8; | ||
| 432 | u8 mbccnt; | ||
| 433 | u16 qdioac2; | ||
| 434 | u64 sch_token; | ||
| 435 | }; | ||
| 436 | |||
| 409 | struct qdio_perf_stats { | 437 | struct qdio_perf_stats { |
| 410 | #ifdef CONFIG_64BIT | 438 | #ifdef CONFIG_64BIT |
| 411 | atomic64_t tl_runs; | 439 | atomic64_t tl_runs; |
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index 7b0b81901297..a1ab3e3efd11 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c | |||
| @@ -45,7 +45,7 @@ static int ap_poll_thread_start(void); | |||
| 45 | static void ap_poll_thread_stop(void); | 45 | static void ap_poll_thread_stop(void); |
| 46 | static void ap_request_timeout(unsigned long); | 46 | static void ap_request_timeout(unsigned long); |
| 47 | 47 | ||
| 48 | /** | 48 | /* |
| 49 | * Module description. | 49 | * Module description. |
| 50 | */ | 50 | */ |
| 51 | MODULE_AUTHOR("IBM Corporation"); | 51 | MODULE_AUTHOR("IBM Corporation"); |
| @@ -53,7 +53,7 @@ MODULE_DESCRIPTION("Adjunct Processor Bus driver, " | |||
| 53 | "Copyright 2006 IBM Corporation"); | 53 | "Copyright 2006 IBM Corporation"); |
| 54 | MODULE_LICENSE("GPL"); | 54 | MODULE_LICENSE("GPL"); |
| 55 | 55 | ||
| 56 | /** | 56 | /* |
| 57 | * Module parameter | 57 | * Module parameter |
| 58 | */ | 58 | */ |
| 59 | int ap_domain_index = -1; /* Adjunct Processor Domain Index */ | 59 | int ap_domain_index = -1; /* Adjunct Processor Domain Index */ |
| @@ -69,7 +69,7 @@ static struct device *ap_root_device = NULL; | |||
| 69 | static DEFINE_SPINLOCK(ap_device_lock); | 69 | static DEFINE_SPINLOCK(ap_device_lock); |
| 70 | static LIST_HEAD(ap_device_list); | 70 | static LIST_HEAD(ap_device_list); |
| 71 | 71 | ||
| 72 | /** | 72 | /* |
| 73 | * Workqueue & timer for bus rescan. | 73 | * Workqueue & timer for bus rescan. |
| 74 | */ | 74 | */ |
| 75 | static struct workqueue_struct *ap_work_queue; | 75 | static struct workqueue_struct *ap_work_queue; |
| @@ -77,7 +77,7 @@ static struct timer_list ap_config_timer; | |||
| 77 | static int ap_config_time = AP_CONFIG_TIME; | 77 | static int ap_config_time = AP_CONFIG_TIME; |
| 78 | static DECLARE_WORK(ap_config_work, ap_scan_bus); | 78 | static DECLARE_WORK(ap_config_work, ap_scan_bus); |
| 79 | 79 | ||
| 80 | /** | 80 | /* |
| 81 | * Tasklet & timer for AP request polling. | 81 | * Tasklet & timer for AP request polling. |
| 82 | */ | 82 | */ |
| 83 | static struct timer_list ap_poll_timer = TIMER_INITIALIZER(ap_poll_timeout,0,0); | 83 | static struct timer_list ap_poll_timer = TIMER_INITIALIZER(ap_poll_timeout,0,0); |
| @@ -88,9 +88,9 @@ static struct task_struct *ap_poll_kthread = NULL; | |||
| 88 | static DEFINE_MUTEX(ap_poll_thread_mutex); | 88 | static DEFINE_MUTEX(ap_poll_thread_mutex); |
| 89 | 89 | ||
| 90 | /** | 90 | /** |
| 91 | * Test if ap instructions are available. | 91 | * ap_intructions_available() - Test if AP instructions are available. |
| 92 | * | 92 | * |
| 93 | * Returns 0 if the ap instructions are installed. | 93 | * Returns 0 if the AP instructions are installed. |
| 94 | */ | 94 | */ |
| 95 | static inline int ap_instructions_available(void) | 95 | static inline int ap_instructions_available(void) |
| 96 | { | 96 | { |
| @@ -108,12 +108,12 @@ static inline int ap_instructions_available(void) | |||
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | /** | 110 | /** |
| 111 | * Test adjunct processor queue. | 111 | * ap_test_queue(): Test adjunct processor queue. |
| 112 | * @qid: the ap queue number | 112 | * @qid: The AP queue number |
| 113 | * @queue_depth: pointer to queue depth value | 113 | * @queue_depth: Pointer to queue depth value |
| 114 | * @device_type: pointer to device type value | 114 | * @device_type: Pointer to device type value |
| 115 | * | 115 | * |
| 116 | * Returns ap queue status structure. | 116 | * Returns AP queue status structure. |
| 117 | */ | 117 | */ |
| 118 | static inline struct ap_queue_status | 118 | static inline struct ap_queue_status |
| 119 | ap_test_queue(ap_qid_t qid, int *queue_depth, int *device_type) | 119 | ap_test_queue(ap_qid_t qid, int *queue_depth, int *device_type) |
| @@ -130,10 +130,10 @@ ap_test_queue(ap_qid_t qid, int *queue_depth, int *device_type) | |||
| 130 | } | 130 | } |
| 131 | 131 | ||
| 132 | /** | 132 | /** |
| 133 | * Reset adjunct processor queue. | 133 | * ap_reset_queue(): Reset adjunct processor queue. |
| 134 | * @qid: the ap queue number | 134 | * @qid: The AP queue number |
| 135 | * | 135 | * |
| 136 | * Returns ap queue status structure. | 136 | * Returns AP queue status structure. |
| 137 | */ | 137 | */ |
| 138 | static inline struct ap_queue_status ap_reset_queue(ap_qid_t qid) | 138 | static inline struct ap_queue_status ap_reset_queue(ap_qid_t qid) |
| 139 | { | 139 | { |
| @@ -148,16 +148,14 @@ static inline struct ap_queue_status ap_reset_queue(ap_qid_t qid) | |||
| 148 | } | 148 | } |
| 149 | 149 | ||
| 150 | /** | 150 | /** |
| 151 | * Send message to adjunct processor queue. | 151 | * __ap_send(): Send message to adjunct processor queue. |
| 152 | * @qid: the ap queue number | 152 | * @qid: The AP queue number |
| 153 | * @psmid: the program supplied message identifier | 153 | * @psmid: The program supplied message identifier |
| 154 | * @msg: the message text | 154 | * @msg: The message text |
| 155 | * @length: the message length | 155 | * @length: The message length |
| 156 | * | ||
| 157 | * Returns ap queue status structure. | ||
| 158 | * | 156 | * |
| 157 | * Returns AP queue status structure. | ||
| 159 | * Condition code 1 on NQAP can't happen because the L bit is 1. | 158 | * Condition code 1 on NQAP can't happen because the L bit is 1. |
| 160 | * | ||
| 161 | * Condition code 2 on NQAP also means the send is incomplete, | 159 | * Condition code 2 on NQAP also means the send is incomplete, |
| 162 | * because a segment boundary was reached. The NQAP is repeated. | 160 | * because a segment boundary was reached. The NQAP is repeated. |
| 163 | */ | 161 | */ |
| @@ -198,23 +196,20 @@ int ap_send(ap_qid_t qid, unsigned long long psmid, void *msg, size_t length) | |||
| 198 | } | 196 | } |
| 199 | EXPORT_SYMBOL(ap_send); | 197 | EXPORT_SYMBOL(ap_send); |
| 200 | 198 | ||
| 201 | /* | 199 | /** |
| 202 | * Receive message from adjunct processor queue. | 200 | * __ap_recv(): Receive message from adjunct processor queue. |
| 203 | * @qid: the ap queue number | 201 | * @qid: The AP queue number |
| 204 | * @psmid: pointer to program supplied message identifier | 202 | * @psmid: Pointer to program supplied message identifier |
| 205 | * @msg: the message text | 203 | * @msg: The message text |
| 206 | * @length: the message length | 204 | * @length: The message length |
| 207 | * | ||
| 208 | * Returns ap queue status structure. | ||
| 209 | * | 205 | * |
| 206 | * Returns AP queue status structure. | ||
| 210 | * Condition code 1 on DQAP means the receive has taken place | 207 | * Condition code 1 on DQAP means the receive has taken place |
| 211 | * but only partially. The response is incomplete, hence the | 208 | * but only partially. The response is incomplete, hence the |
| 212 | * DQAP is repeated. | 209 | * DQAP is repeated. |
| 213 | * | ||
| 214 | * Condition code 2 on DQAP also means the receive is incomplete, | 210 | * Condition code 2 on DQAP also means the receive is incomplete, |
| 215 | * this time because a segment boundary was reached. Again, the | 211 | * this time because a segment boundary was reached. Again, the |
| 216 | * DQAP is repeated. | 212 | * DQAP is repeated. |
| 217 | * | ||
| 218 | * Note that gpr2 is used by the DQAP instruction to keep track of | 213 | * Note that gpr2 is used by the DQAP instruction to keep track of |
| 219 | * any 'residual' length, in case the instruction gets interrupted. | 214 | * any 'residual' length, in case the instruction gets interrupted. |
| 220 | * Hence it gets zeroed before the instruction. | 215 | * Hence it gets zeroed before the instruction. |
| @@ -263,11 +258,12 @@ int ap_recv(ap_qid_t qid, unsigned long long *psmid, void *msg, size_t length) | |||
| 263 | EXPORT_SYMBOL(ap_recv); | 258 | EXPORT_SYMBOL(ap_recv); |
| 264 | 259 | ||
| 265 | /** | 260 | /** |
| 266 | * Check if an AP queue is available. The test is repeated for | 261 | * ap_query_queue(): Check if an AP queue is available. |
| 267 | * AP_MAX_RESET times. | 262 | * @qid: The AP queue number |
| 268 | * @qid: the ap queue number | 263 | * @queue_depth: Pointer to queue depth value |
| 269 | * @queue_depth: pointer to queue depth value | 264 | * @device_type: Pointer to device type value |
| 270 | * @device_type: pointer to device type value | 265 | * |
| 266 | * The test is repeated for AP_MAX_RESET times. | ||
| 271 | */ | 267 | */ |
| 272 | static int ap_query_queue(ap_qid_t qid, int *queue_depth, int *device_type) | 268 | static int ap_query_queue(ap_qid_t qid, int *queue_depth, int *device_type) |
| 273 | { | 269 | { |
| @@ -308,8 +304,10 @@ static int ap_query_queue(ap_qid_t qid, int *queue_depth, int *device_type) | |||
| 308 | } | 304 | } |
| 309 | 305 | ||
| 310 | /** | 306 | /** |
| 307 | * ap_init_queue(): Reset an AP queue. | ||
| 308 | * @qid: The AP queue number | ||
| 309 | * | ||
| 311 | * Reset an AP queue and wait for it to become available again. | 310 | * Reset an AP queue and wait for it to become available again. |
| 312 | * @qid: the ap queue number | ||
| 313 | */ | 311 | */ |
| 314 | static int ap_init_queue(ap_qid_t qid) | 312 | static int ap_init_queue(ap_qid_t qid) |
| 315 | { | 313 | { |
| @@ -346,7 +344,10 @@ static int ap_init_queue(ap_qid_t qid) | |||
| 346 | } | 344 | } |
| 347 | 345 | ||
| 348 | /** | 346 | /** |
| 349 | * Arm request timeout if a AP device was idle and a new request is submitted. | 347 | * ap_increase_queue_count(): Arm request timeout. |
| 348 | * @ap_dev: Pointer to an AP device. | ||
| 349 | * | ||
| 350 | * Arm request timeout if an AP device was idle and a new request is submitted. | ||
| 350 | */ | 351 | */ |
| 351 | static void ap_increase_queue_count(struct ap_device *ap_dev) | 352 | static void ap_increase_queue_count(struct ap_device *ap_dev) |
| 352 | { | 353 | { |
| @@ -360,7 +361,10 @@ static void ap_increase_queue_count(struct ap_device *ap_dev) | |||
| 360 | } | 361 | } |
| 361 | 362 | ||
| 362 | /** | 363 | /** |
| 363 | * AP device is still alive, re-schedule request timeout if there are still | 364 | * ap_decrease_queue_count(): Decrease queue count. |
| 365 | * @ap_dev: Pointer to an AP device. | ||
| 366 | * | ||
| 367 | * If AP device is still alive, re-schedule request timeout if there are still | ||
| 364 | * pending requests. | 368 | * pending requests. |
| 365 | */ | 369 | */ |
| 366 | static void ap_decrease_queue_count(struct ap_device *ap_dev) | 370 | static void ap_decrease_queue_count(struct ap_device *ap_dev) |
| @@ -371,7 +375,7 @@ static void ap_decrease_queue_count(struct ap_device *ap_dev) | |||
| 371 | if (ap_dev->queue_count > 0) | 375 | if (ap_dev->queue_count > 0) |
| 372 | mod_timer(&ap_dev->timeout, jiffies + timeout); | 376 | mod_timer(&ap_dev->timeout, jiffies + timeout); |
| 373 | else | 377 | else |
| 374 | /** | 378 | /* |
| 375 | * The timeout timer should to be disabled now - since | 379 | * The timeout timer should to be disabled now - since |
| 376 | * del_timer_sync() is very expensive, we just tell via the | 380 | * del_timer_sync() is very expensive, we just tell via the |
| 377 | * reset flag to ignore the pending timeout timer. | 381 | * reset flag to ignore the pending timeout timer. |
| @@ -379,7 +383,7 @@ static void ap_decrease_queue_count(struct ap_device *ap_dev) | |||
| 379 | ap_dev->reset = AP_RESET_IGNORE; | 383 | ap_dev->reset = AP_RESET_IGNORE; |
| 380 | } | 384 | } |
| 381 | 385 | ||
| 382 | /** | 386 | /* |
| 383 | * AP device related attributes. | 387 | * AP device related attributes. |
| 384 | */ | 388 | */ |
| 385 | static ssize_t ap_hwtype_show(struct device *dev, | 389 | static ssize_t ap_hwtype_show(struct device *dev, |
| @@ -433,6 +437,10 @@ static struct attribute_group ap_dev_attr_group = { | |||
| 433 | }; | 437 | }; |
| 434 | 438 | ||
| 435 | /** | 439 | /** |
| 440 | * ap_bus_match() | ||
| 441 | * @dev: Pointer to device | ||
| 442 | * @drv: Pointer to device_driver | ||
| 443 | * | ||
| 436 | * AP bus driver registration/unregistration. | 444 | * AP bus driver registration/unregistration. |
| 437 | */ | 445 | */ |
| 438 | static int ap_bus_match(struct device *dev, struct device_driver *drv) | 446 | static int ap_bus_match(struct device *dev, struct device_driver *drv) |
| @@ -441,7 +449,7 @@ static int ap_bus_match(struct device *dev, struct device_driver *drv) | |||
| 441 | struct ap_driver *ap_drv = to_ap_drv(drv); | 449 | struct ap_driver *ap_drv = to_ap_drv(drv); |
| 442 | struct ap_device_id *id; | 450 | struct ap_device_id *id; |
| 443 | 451 | ||
| 444 | /** | 452 | /* |
| 445 | * Compare device type of the device with the list of | 453 | * Compare device type of the device with the list of |
| 446 | * supported types of the device_driver. | 454 | * supported types of the device_driver. |
| 447 | */ | 455 | */ |
| @@ -455,8 +463,12 @@ static int ap_bus_match(struct device *dev, struct device_driver *drv) | |||
| 455 | } | 463 | } |
| 456 | 464 | ||
| 457 | /** | 465 | /** |
| 458 | * uevent function for AP devices. It sets up a single environment | 466 | * ap_uevent(): Uevent function for AP devices. |
| 459 | * variable DEV_TYPE which contains the hardware device type. | 467 | * @dev: Pointer to device |
| 468 | * @env: Pointer to kobj_uevent_env | ||
| 469 | * | ||
| 470 | * It sets up a single environment variable DEV_TYPE which contains the | ||
| 471 | * hardware device type. | ||
| 460 | */ | 472 | */ |
| 461 | static int ap_uevent (struct device *dev, struct kobj_uevent_env *env) | 473 | static int ap_uevent (struct device *dev, struct kobj_uevent_env *env) |
| 462 | { | 474 | { |
| @@ -500,8 +512,10 @@ static int ap_device_probe(struct device *dev) | |||
| 500 | } | 512 | } |
| 501 | 513 | ||
| 502 | /** | 514 | /** |
| 515 | * __ap_flush_queue(): Flush requests. | ||
| 516 | * @ap_dev: Pointer to the AP device | ||
| 517 | * | ||
| 503 | * Flush all requests from the request/pending queue of an AP device. | 518 | * Flush all requests from the request/pending queue of an AP device. |
| 504 | * @ap_dev: pointer to the AP device. | ||
| 505 | */ | 519 | */ |
| 506 | static void __ap_flush_queue(struct ap_device *ap_dev) | 520 | static void __ap_flush_queue(struct ap_device *ap_dev) |
| 507 | { | 521 | { |
| @@ -565,7 +579,7 @@ void ap_driver_unregister(struct ap_driver *ap_drv) | |||
| 565 | } | 579 | } |
| 566 | EXPORT_SYMBOL(ap_driver_unregister); | 580 | EXPORT_SYMBOL(ap_driver_unregister); |
| 567 | 581 | ||
| 568 | /** | 582 | /* |
| 569 | * AP bus attributes. | 583 | * AP bus attributes. |
| 570 | */ | 584 | */ |
| 571 | static ssize_t ap_domain_show(struct bus_type *bus, char *buf) | 585 | static ssize_t ap_domain_show(struct bus_type *bus, char *buf) |
| @@ -630,14 +644,16 @@ static struct bus_attribute *const ap_bus_attrs[] = { | |||
| 630 | }; | 644 | }; |
| 631 | 645 | ||
| 632 | /** | 646 | /** |
| 633 | * Pick one of the 16 ap domains. | 647 | * ap_select_domain(): Select an AP domain. |
| 648 | * | ||
| 649 | * Pick one of the 16 AP domains. | ||
| 634 | */ | 650 | */ |
| 635 | static int ap_select_domain(void) | 651 | static int ap_select_domain(void) |
| 636 | { | 652 | { |
| 637 | int queue_depth, device_type, count, max_count, best_domain; | 653 | int queue_depth, device_type, count, max_count, best_domain; |
| 638 | int rc, i, j; | 654 | int rc, i, j; |
| 639 | 655 | ||
| 640 | /** | 656 | /* |
| 641 | * We want to use a single domain. Either the one specified with | 657 | * We want to use a single domain. Either the one specified with |
| 642 | * the "domain=" parameter or the domain with the maximum number | 658 | * the "domain=" parameter or the domain with the maximum number |
| 643 | * of devices. | 659 | * of devices. |
| @@ -669,8 +685,10 @@ static int ap_select_domain(void) | |||
| 669 | } | 685 | } |
| 670 | 686 | ||
| 671 | /** | 687 | /** |
| 672 | * Find the device type if query queue returned a device type of 0. | 688 | * ap_probe_device_type(): Find the device type of an AP. |
| 673 | * @ap_dev: pointer to the AP device. | 689 | * @ap_dev: pointer to the AP device. |
| 690 | * | ||
| 691 | * Find the device type if query queue returned a device type of 0. | ||
| 674 | */ | 692 | */ |
| 675 | static int ap_probe_device_type(struct ap_device *ap_dev) | 693 | static int ap_probe_device_type(struct ap_device *ap_dev) |
| 676 | { | 694 | { |
| @@ -764,7 +782,11 @@ out: | |||
| 764 | } | 782 | } |
| 765 | 783 | ||
| 766 | /** | 784 | /** |
| 767 | * Scan the ap bus for new devices. | 785 | * __ap_scan_bus(): Scan the AP bus. |
| 786 | * @dev: Pointer to device | ||
| 787 | * @data: Pointer to data | ||
| 788 | * | ||
| 789 | * Scan the AP bus for new devices. | ||
| 768 | */ | 790 | */ |
| 769 | static int __ap_scan_bus(struct device *dev, void *data) | 791 | static int __ap_scan_bus(struct device *dev, void *data) |
| 770 | { | 792 | { |
| @@ -867,6 +889,8 @@ ap_config_timeout(unsigned long ptr) | |||
| 867 | } | 889 | } |
| 868 | 890 | ||
| 869 | /** | 891 | /** |
| 892 | * ap_schedule_poll_timer(): Schedule poll timer. | ||
| 893 | * | ||
| 870 | * Set up the timer to run the poll tasklet | 894 | * Set up the timer to run the poll tasklet |
| 871 | */ | 895 | */ |
| 872 | static inline void ap_schedule_poll_timer(void) | 896 | static inline void ap_schedule_poll_timer(void) |
| @@ -877,10 +901,11 @@ static inline void ap_schedule_poll_timer(void) | |||
| 877 | } | 901 | } |
| 878 | 902 | ||
| 879 | /** | 903 | /** |
| 880 | * Receive pending reply messages from an AP device. | 904 | * ap_poll_read(): Receive pending reply messages from an AP device. |
| 881 | * @ap_dev: pointer to the AP device | 905 | * @ap_dev: pointer to the AP device |
| 882 | * @flags: pointer to control flags, bit 2^0 is set if another poll is | 906 | * @flags: pointer to control flags, bit 2^0 is set if another poll is |
| 883 | * required, bit 2^1 is set if the poll timer needs to get armed | 907 | * required, bit 2^1 is set if the poll timer needs to get armed |
| 908 | * | ||
| 884 | * Returns 0 if the device is still present, -ENODEV if not. | 909 | * Returns 0 if the device is still present, -ENODEV if not. |
| 885 | */ | 910 | */ |
| 886 | static int ap_poll_read(struct ap_device *ap_dev, unsigned long *flags) | 911 | static int ap_poll_read(struct ap_device *ap_dev, unsigned long *flags) |
| @@ -925,10 +950,11 @@ static int ap_poll_read(struct ap_device *ap_dev, unsigned long *flags) | |||
| 925 | } | 950 | } |
| 926 | 951 | ||
| 927 | /** | 952 | /** |
| 928 | * Send messages from the request queue to an AP device. | 953 | * ap_poll_write(): Send messages from the request queue to an AP device. |
| 929 | * @ap_dev: pointer to the AP device | 954 | * @ap_dev: pointer to the AP device |
| 930 | * @flags: pointer to control flags, bit 2^0 is set if another poll is | 955 | * @flags: pointer to control flags, bit 2^0 is set if another poll is |
| 931 | * required, bit 2^1 is set if the poll timer needs to get armed | 956 | * required, bit 2^1 is set if the poll timer needs to get armed |
| 957 | * | ||
| 932 | * Returns 0 if the device is still present, -ENODEV if not. | 958 | * Returns 0 if the device is still present, -ENODEV if not. |
| 933 | */ | 959 | */ |
| 934 | static int ap_poll_write(struct ap_device *ap_dev, unsigned long *flags) | 960 | static int ap_poll_write(struct ap_device *ap_dev, unsigned long *flags) |
| @@ -968,11 +994,13 @@ static int ap_poll_write(struct ap_device *ap_dev, unsigned long *flags) | |||
| 968 | } | 994 | } |
| 969 | 995 | ||
| 970 | /** | 996 | /** |
| 971 | * Poll AP device for pending replies and send new messages. If either | 997 | * ap_poll_queue(): Poll AP device for pending replies and send new messages. |
| 972 | * ap_poll_read or ap_poll_write returns -ENODEV unregister the device. | ||
| 973 | * @ap_dev: pointer to the bus device | 998 | * @ap_dev: pointer to the bus device |
| 974 | * @flags: pointer to control flags, bit 2^0 is set if another poll is | 999 | * @flags: pointer to control flags, bit 2^0 is set if another poll is |
| 975 | * required, bit 2^1 is set if the poll timer needs to get armed | 1000 | * required, bit 2^1 is set if the poll timer needs to get armed |
| 1001 | * | ||
| 1002 | * Poll AP device for pending replies and send new messages. If either | ||
| 1003 | * ap_poll_read or ap_poll_write returns -ENODEV unregister the device. | ||
| 976 | * Returns 0. | 1004 | * Returns 0. |
| 977 | */ | 1005 | */ |
| 978 | static inline int ap_poll_queue(struct ap_device *ap_dev, unsigned long *flags) | 1006 | static inline int ap_poll_queue(struct ap_device *ap_dev, unsigned long *flags) |
| @@ -986,9 +1014,11 @@ static inline int ap_poll_queue(struct ap_device *ap_dev, unsigned long *flags) | |||
| 986 | } | 1014 | } |
| 987 | 1015 | ||
| 988 | /** | 1016 | /** |
| 989 | * Queue a message to a device. | 1017 | * __ap_queue_message(): Queue a message to a device. |
| 990 | * @ap_dev: pointer to the AP device | 1018 | * @ap_dev: pointer to the AP device |
| 991 | * @ap_msg: the message to be queued | 1019 | * @ap_msg: the message to be queued |
| 1020 | * | ||
| 1021 | * Queue a message to a device. Returns 0 if successful. | ||
| 992 | */ | 1022 | */ |
| 993 | static int __ap_queue_message(struct ap_device *ap_dev, struct ap_message *ap_msg) | 1023 | static int __ap_queue_message(struct ap_device *ap_dev, struct ap_message *ap_msg) |
| 994 | { | 1024 | { |
| @@ -1055,12 +1085,14 @@ void ap_queue_message(struct ap_device *ap_dev, struct ap_message *ap_msg) | |||
| 1055 | EXPORT_SYMBOL(ap_queue_message); | 1085 | EXPORT_SYMBOL(ap_queue_message); |
| 1056 | 1086 | ||
| 1057 | /** | 1087 | /** |
| 1088 | * ap_cancel_message(): Cancel a crypto request. | ||
| 1089 | * @ap_dev: The AP device that has the message queued | ||
| 1090 | * @ap_msg: The message that is to be removed | ||
| 1091 | * | ||
| 1058 | * Cancel a crypto request. This is done by removing the request | 1092 | * Cancel a crypto request. This is done by removing the request |
| 1059 | * from the devive pendingq or requestq queue. Note that the | 1093 | * from the device pending or request queue. Note that the |
| 1060 | * request stays on the AP queue. When it finishes the message | 1094 | * request stays on the AP queue. When it finishes the message |
| 1061 | * reply will be discarded because the psmid can't be found. | 1095 | * reply will be discarded because the psmid can't be found. |
| 1062 | * @ap_dev: AP device that has the message queued | ||
| 1063 | * @ap_msg: the message that is to be removed | ||
| 1064 | */ | 1096 | */ |
| 1065 | void ap_cancel_message(struct ap_device *ap_dev, struct ap_message *ap_msg) | 1097 | void ap_cancel_message(struct ap_device *ap_dev, struct ap_message *ap_msg) |
| 1066 | { | 1098 | { |
| @@ -1082,7 +1114,10 @@ void ap_cancel_message(struct ap_device *ap_dev, struct ap_message *ap_msg) | |||
| 1082 | EXPORT_SYMBOL(ap_cancel_message); | 1114 | EXPORT_SYMBOL(ap_cancel_message); |
| 1083 | 1115 | ||
| 1084 | /** | 1116 | /** |
| 1085 | * AP receive polling for finished AP requests | 1117 | * ap_poll_timeout(): AP receive polling for finished AP requests. |
| 1118 | * @unused: Unused variable. | ||
| 1119 | * | ||
| 1120 | * Schedules the AP tasklet. | ||
| 1086 | */ | 1121 | */ |
| 1087 | static void ap_poll_timeout(unsigned long unused) | 1122 | static void ap_poll_timeout(unsigned long unused) |
| 1088 | { | 1123 | { |
| @@ -1090,6 +1125,9 @@ static void ap_poll_timeout(unsigned long unused) | |||
| 1090 | } | 1125 | } |
| 1091 | 1126 | ||
| 1092 | /** | 1127 | /** |
| 1128 | * ap_reset(): Reset a not responding AP device. | ||
| 1129 | * @ap_dev: Pointer to the AP device | ||
| 1130 | * | ||
| 1093 | * Reset a not responding AP device and move all requests from the | 1131 | * Reset a not responding AP device and move all requests from the |
| 1094 | * pending queue to the request queue. | 1132 | * pending queue to the request queue. |
| 1095 | */ | 1133 | */ |
| @@ -1108,11 +1146,6 @@ static void ap_reset(struct ap_device *ap_dev) | |||
| 1108 | ap_dev->unregistered = 1; | 1146 | ap_dev->unregistered = 1; |
| 1109 | } | 1147 | } |
| 1110 | 1148 | ||
| 1111 | /** | ||
| 1112 | * Poll all AP devices on the bus in a round robin fashion. Continue | ||
| 1113 | * polling until bit 2^0 of the control flags is not set. If bit 2^1 | ||
| 1114 | * of the control flags has been set arm the poll timer. | ||
| 1115 | */ | ||
| 1116 | static int __ap_poll_all(struct ap_device *ap_dev, unsigned long *flags) | 1149 | static int __ap_poll_all(struct ap_device *ap_dev, unsigned long *flags) |
| 1117 | { | 1150 | { |
| 1118 | spin_lock(&ap_dev->lock); | 1151 | spin_lock(&ap_dev->lock); |
| @@ -1126,6 +1159,14 @@ static int __ap_poll_all(struct ap_device *ap_dev, unsigned long *flags) | |||
| 1126 | return 0; | 1159 | return 0; |
| 1127 | } | 1160 | } |
| 1128 | 1161 | ||
| 1162 | /** | ||
| 1163 | * ap_poll_all(): Poll all AP devices. | ||
| 1164 | * @dummy: Unused variable | ||
| 1165 | * | ||
| 1166 | * Poll all AP devices on the bus in a round robin fashion. Continue | ||
| 1167 | * polling until bit 2^0 of the control flags is not set. If bit 2^1 | ||
| 1168 | * of the control flags has been set arm the poll timer. | ||
| 1169 | */ | ||
| 1129 | static void ap_poll_all(unsigned long dummy) | 1170 | static void ap_poll_all(unsigned long dummy) |
| 1130 | { | 1171 | { |
| 1131 | unsigned long flags; | 1172 | unsigned long flags; |
| @@ -1144,6 +1185,9 @@ static void ap_poll_all(unsigned long dummy) | |||
| 1144 | } | 1185 | } |
| 1145 | 1186 | ||
| 1146 | /** | 1187 | /** |
| 1188 | * ap_poll_thread(): Thread that polls for finished requests. | ||
| 1189 | * @data: Unused pointer | ||
| 1190 | * | ||
| 1147 | * AP bus poll thread. The purpose of this thread is to poll for | 1191 | * AP bus poll thread. The purpose of this thread is to poll for |
| 1148 | * finished requests in a loop if there is a "free" cpu - that is | 1192 | * finished requests in a loop if there is a "free" cpu - that is |
| 1149 | * a cpu that doesn't have anything better to do. The polling stops | 1193 | * a cpu that doesn't have anything better to do. The polling stops |
| @@ -1213,7 +1257,10 @@ static void ap_poll_thread_stop(void) | |||
| 1213 | } | 1257 | } |
| 1214 | 1258 | ||
| 1215 | /** | 1259 | /** |
| 1216 | * Handling of request timeouts | 1260 | * ap_request_timeout(): Handling of request timeouts |
| 1261 | * @data: Holds the AP device. | ||
| 1262 | * | ||
| 1263 | * Handles request timeouts. | ||
| 1217 | */ | 1264 | */ |
| 1218 | static void ap_request_timeout(unsigned long data) | 1265 | static void ap_request_timeout(unsigned long data) |
| 1219 | { | 1266 | { |
| @@ -1246,7 +1293,9 @@ static struct reset_call ap_reset_call = { | |||
| 1246 | }; | 1293 | }; |
| 1247 | 1294 | ||
| 1248 | /** | 1295 | /** |
| 1249 | * The module initialization code. | 1296 | * ap_module_init(): The module initialization code. |
| 1297 | * | ||
| 1298 | * Initializes the module. | ||
| 1250 | */ | 1299 | */ |
| 1251 | int __init ap_module_init(void) | 1300 | int __init ap_module_init(void) |
| 1252 | { | 1301 | { |
| @@ -1288,7 +1337,7 @@ int __init ap_module_init(void) | |||
| 1288 | if (ap_select_domain() == 0) | 1337 | if (ap_select_domain() == 0) |
| 1289 | ap_scan_bus(NULL); | 1338 | ap_scan_bus(NULL); |
| 1290 | 1339 | ||
| 1291 | /* Setup the ap bus rescan timer. */ | 1340 | /* Setup the AP bus rescan timer. */ |
| 1292 | init_timer(&ap_config_timer); | 1341 | init_timer(&ap_config_timer); |
| 1293 | ap_config_timer.function = ap_config_timeout; | 1342 | ap_config_timer.function = ap_config_timeout; |
| 1294 | ap_config_timer.data = 0; | 1343 | ap_config_timer.data = 0; |
| @@ -1325,7 +1374,9 @@ static int __ap_match_all(struct device *dev, void *data) | |||
| 1325 | } | 1374 | } |
| 1326 | 1375 | ||
| 1327 | /** | 1376 | /** |
| 1328 | * The module termination code | 1377 | * ap_modules_exit(): The module termination code |
| 1378 | * | ||
| 1379 | * Terminates the module. | ||
| 1329 | */ | 1380 | */ |
| 1330 | void ap_module_exit(void) | 1381 | void ap_module_exit(void) |
| 1331 | { | 1382 | { |
diff --git a/drivers/s390/crypto/ap_bus.h b/drivers/s390/crypto/ap_bus.h index 87c2d6442875..c1e1200c43fc 100644 --- a/drivers/s390/crypto/ap_bus.h +++ b/drivers/s390/crypto/ap_bus.h | |||
| @@ -50,6 +50,15 @@ typedef unsigned int ap_qid_t; | |||
| 50 | #define AP_QID_QUEUE(_qid) ((_qid) & 15) | 50 | #define AP_QID_QUEUE(_qid) ((_qid) & 15) |
| 51 | 51 | ||
| 52 | /** | 52 | /** |
| 53 | * structy ap_queue_status - Holds the AP queue status. | ||
| 54 | * @queue_empty: Shows if queue is empty | ||
| 55 | * @replies_waiting: Waiting replies | ||
| 56 | * @queue_full: Is 1 if the queue is full | ||
| 57 | * @pad: A 4 bit pad | ||
| 58 | * @int_enabled: Shows if interrupts are enabled for the AP | ||
| 59 | * @response_conde: Holds the 8 bit response code | ||
| 60 | * @pad2: A 16 bit pad | ||
| 61 | * | ||
| 53 | * The ap queue status word is returned by all three AP functions | 62 | * The ap queue status word is returned by all three AP functions |
| 54 | * (PQAP, NQAP and DQAP). There's a set of flags in the first | 63 | * (PQAP, NQAP and DQAP). There's a set of flags in the first |
| 55 | * byte, followed by a 1 byte response code. | 64 | * byte, followed by a 1 byte response code. |
| @@ -75,7 +84,7 @@ struct ap_queue_status { | |||
| 75 | #define AP_RESPONSE_NO_FIRST_PART 0x13 | 84 | #define AP_RESPONSE_NO_FIRST_PART 0x13 |
| 76 | #define AP_RESPONSE_MESSAGE_TOO_BIG 0x15 | 85 | #define AP_RESPONSE_MESSAGE_TOO_BIG 0x15 |
| 77 | 86 | ||
| 78 | /** | 87 | /* |
| 79 | * Known device types | 88 | * Known device types |
| 80 | */ | 89 | */ |
| 81 | #define AP_DEVICE_TYPE_PCICC 3 | 90 | #define AP_DEVICE_TYPE_PCICC 3 |
| @@ -84,7 +93,7 @@ struct ap_queue_status { | |||
| 84 | #define AP_DEVICE_TYPE_CEX2A 6 | 93 | #define AP_DEVICE_TYPE_CEX2A 6 |
| 85 | #define AP_DEVICE_TYPE_CEX2C 7 | 94 | #define AP_DEVICE_TYPE_CEX2C 7 |
| 86 | 95 | ||
| 87 | /** | 96 | /* |
| 88 | * AP reset flag states | 97 | * AP reset flag states |
| 89 | */ | 98 | */ |
| 90 | #define AP_RESET_IGNORE 0 /* request timeout will be ignored */ | 99 | #define AP_RESET_IGNORE 0 /* request timeout will be ignored */ |
| @@ -152,7 +161,7 @@ struct ap_message { | |||
| 152 | .dev_type=(dt), \ | 161 | .dev_type=(dt), \ |
| 153 | .match_flags=AP_DEVICE_ID_MATCH_DEVICE_TYPE, | 162 | .match_flags=AP_DEVICE_ID_MATCH_DEVICE_TYPE, |
| 154 | 163 | ||
| 155 | /** | 164 | /* |
| 156 | * Note: don't use ap_send/ap_recv after using ap_queue_message | 165 | * Note: don't use ap_send/ap_recv after using ap_queue_message |
| 157 | * for the first time. Otherwise the ap message queue will get | 166 | * for the first time. Otherwise the ap message queue will get |
| 158 | * confused. | 167 | * confused. |
diff --git a/drivers/s390/crypto/zcrypt_api.c b/drivers/s390/crypto/zcrypt_api.c index e3625a47a596..4d36e805a234 100644 --- a/drivers/s390/crypto/zcrypt_api.c +++ b/drivers/s390/crypto/zcrypt_api.c | |||
| @@ -36,10 +36,11 @@ | |||
| 36 | #include <linux/compat.h> | 36 | #include <linux/compat.h> |
| 37 | #include <asm/atomic.h> | 37 | #include <asm/atomic.h> |
| 38 | #include <asm/uaccess.h> | 38 | #include <asm/uaccess.h> |
| 39 | #include <linux/hw_random.h> | ||
| 39 | 40 | ||
| 40 | #include "zcrypt_api.h" | 41 | #include "zcrypt_api.h" |
| 41 | 42 | ||
| 42 | /** | 43 | /* |
| 43 | * Module description. | 44 | * Module description. |
| 44 | */ | 45 | */ |
| 45 | MODULE_AUTHOR("IBM Corporation"); | 46 | MODULE_AUTHOR("IBM Corporation"); |
| @@ -52,7 +53,10 @@ static LIST_HEAD(zcrypt_device_list); | |||
| 52 | static int zcrypt_device_count = 0; | 53 | static int zcrypt_device_count = 0; |
| 53 | static atomic_t zcrypt_open_count = ATOMIC_INIT(0); | 54 | static atomic_t zcrypt_open_count = ATOMIC_INIT(0); |
| 54 | 55 | ||
| 55 | /** | 56 | static int zcrypt_rng_device_add(void); |
| 57 | static void zcrypt_rng_device_remove(void); | ||
| 58 | |||
| 59 | /* | ||
| 56 | * Device attributes common for all crypto devices. | 60 | * Device attributes common for all crypto devices. |
| 57 | */ | 61 | */ |
| 58 | static ssize_t zcrypt_type_show(struct device *dev, | 62 | static ssize_t zcrypt_type_show(struct device *dev, |
| @@ -99,6 +103,9 @@ static struct attribute_group zcrypt_device_attr_group = { | |||
| 99 | }; | 103 | }; |
| 100 | 104 | ||
| 101 | /** | 105 | /** |
| 106 | * __zcrypt_increase_preference(): Increase preference of a crypto device. | ||
| 107 | * @zdev: Pointer the crypto device | ||
| 108 | * | ||
| 102 | * Move the device towards the head of the device list. | 109 | * Move the device towards the head of the device list. |
| 103 | * Need to be called while holding the zcrypt device list lock. | 110 | * Need to be called while holding the zcrypt device list lock. |
| 104 | * Note: cards with speed_rating of 0 are kept at the end of the list. | 111 | * Note: cards with speed_rating of 0 are kept at the end of the list. |
| @@ -125,6 +132,9 @@ static void __zcrypt_increase_preference(struct zcrypt_device *zdev) | |||
| 125 | } | 132 | } |
| 126 | 133 | ||
| 127 | /** | 134 | /** |
| 135 | * __zcrypt_decrease_preference(): Decrease preference of a crypto device. | ||
| 136 | * @zdev: Pointer to a crypto device. | ||
| 137 | * | ||
| 128 | * Move the device towards the tail of the device list. | 138 | * Move the device towards the tail of the device list. |
| 129 | * Need to be called while holding the zcrypt device list lock. | 139 | * Need to be called while holding the zcrypt device list lock. |
| 130 | * Note: cards with speed_rating of 0 are kept at the end of the list. | 140 | * Note: cards with speed_rating of 0 are kept at the end of the list. |
| @@ -198,7 +208,10 @@ void zcrypt_device_free(struct zcrypt_device *zdev) | |||
| 198 | EXPORT_SYMBOL(zcrypt_device_free); | 208 | EXPORT_SYMBOL(zcrypt_device_free); |
| 199 | 209 | ||
| 200 | /** | 210 | /** |
| 201 | * Register a crypto device. | 211 | * zcrypt_device_register() - Register a crypto device. |
| 212 | * @zdev: Pointer to a crypto device | ||
| 213 | * | ||
| 214 | * Register a crypto device. Returns 0 if successful. | ||
| 202 | */ | 215 | */ |
| 203 | int zcrypt_device_register(struct zcrypt_device *zdev) | 216 | int zcrypt_device_register(struct zcrypt_device *zdev) |
| 204 | { | 217 | { |
| @@ -216,16 +229,37 @@ int zcrypt_device_register(struct zcrypt_device *zdev) | |||
| 216 | __zcrypt_increase_preference(zdev); | 229 | __zcrypt_increase_preference(zdev); |
| 217 | zcrypt_device_count++; | 230 | zcrypt_device_count++; |
| 218 | spin_unlock_bh(&zcrypt_device_lock); | 231 | spin_unlock_bh(&zcrypt_device_lock); |
| 232 | if (zdev->ops->rng) { | ||
| 233 | rc = zcrypt_rng_device_add(); | ||
| 234 | if (rc) | ||
| 235 | goto out_unregister; | ||
| 236 | } | ||
| 237 | return 0; | ||
| 238 | |||
| 239 | out_unregister: | ||
| 240 | spin_lock_bh(&zcrypt_device_lock); | ||
| 241 | zcrypt_device_count--; | ||
| 242 | list_del_init(&zdev->list); | ||
| 243 | spin_unlock_bh(&zcrypt_device_lock); | ||
| 244 | sysfs_remove_group(&zdev->ap_dev->device.kobj, | ||
| 245 | &zcrypt_device_attr_group); | ||
| 246 | put_device(&zdev->ap_dev->device); | ||
| 247 | zcrypt_device_put(zdev); | ||
| 219 | out: | 248 | out: |
| 220 | return rc; | 249 | return rc; |
| 221 | } | 250 | } |
| 222 | EXPORT_SYMBOL(zcrypt_device_register); | 251 | EXPORT_SYMBOL(zcrypt_device_register); |
| 223 | 252 | ||
| 224 | /** | 253 | /** |
| 254 | * zcrypt_device_unregister(): Unregister a crypto device. | ||
| 255 | * @zdev: Pointer to crypto device | ||
| 256 | * | ||
| 225 | * Unregister a crypto device. | 257 | * Unregister a crypto device. |
| 226 | */ | 258 | */ |
| 227 | void zcrypt_device_unregister(struct zcrypt_device *zdev) | 259 | void zcrypt_device_unregister(struct zcrypt_device *zdev) |
| 228 | { | 260 | { |
| 261 | if (zdev->ops->rng) | ||
| 262 | zcrypt_rng_device_remove(); | ||
| 229 | spin_lock_bh(&zcrypt_device_lock); | 263 | spin_lock_bh(&zcrypt_device_lock); |
| 230 | zcrypt_device_count--; | 264 | zcrypt_device_count--; |
| 231 | list_del_init(&zdev->list); | 265 | list_del_init(&zdev->list); |
| @@ -238,7 +272,9 @@ void zcrypt_device_unregister(struct zcrypt_device *zdev) | |||
| 238 | EXPORT_SYMBOL(zcrypt_device_unregister); | 272 | EXPORT_SYMBOL(zcrypt_device_unregister); |
| 239 | 273 | ||
| 240 | /** | 274 | /** |
| 241 | * zcrypt_read is not be supported beyond zcrypt 1.3.1 | 275 | * zcrypt_read (): Not supported beyond zcrypt 1.3.1. |
| 276 | * | ||
| 277 | * This function is not supported beyond zcrypt 1.3.1. | ||
| 242 | */ | 278 | */ |
| 243 | static ssize_t zcrypt_read(struct file *filp, char __user *buf, | 279 | static ssize_t zcrypt_read(struct file *filp, char __user *buf, |
| 244 | size_t count, loff_t *f_pos) | 280 | size_t count, loff_t *f_pos) |
| @@ -247,6 +283,8 @@ static ssize_t zcrypt_read(struct file *filp, char __user *buf, | |||
| 247 | } | 283 | } |
| 248 | 284 | ||
| 249 | /** | 285 | /** |
| 286 | * zcrypt_write(): Not allowed. | ||
| 287 | * | ||
| 250 | * Write is is not allowed | 288 | * Write is is not allowed |
| 251 | */ | 289 | */ |
| 252 | static ssize_t zcrypt_write(struct file *filp, const char __user *buf, | 290 | static ssize_t zcrypt_write(struct file *filp, const char __user *buf, |
| @@ -256,7 +294,9 @@ static ssize_t zcrypt_write(struct file *filp, const char __user *buf, | |||
| 256 | } | 294 | } |
| 257 | 295 | ||
| 258 | /** | 296 | /** |
| 259 | * Device open/close functions to count number of users. | 297 | * zcrypt_open(): Count number of users. |
| 298 | * | ||
| 299 | * Device open function to count number of users. | ||
| 260 | */ | 300 | */ |
| 261 | static int zcrypt_open(struct inode *inode, struct file *filp) | 301 | static int zcrypt_open(struct inode *inode, struct file *filp) |
| 262 | { | 302 | { |
| @@ -264,13 +304,18 @@ static int zcrypt_open(struct inode *inode, struct file *filp) | |||
| 264 | return 0; | 304 | return 0; |
| 265 | } | 305 | } |
| 266 | 306 | ||
| 307 | /** | ||
| 308 | * zcrypt_release(): Count number of users. | ||
| 309 | * | ||
| 310 | * Device close function to count number of users. | ||
| 311 | */ | ||
| 267 | static int zcrypt_release(struct inode *inode, struct file *filp) | 312 | static int zcrypt_release(struct inode *inode, struct file *filp) |
| 268 | { | 313 | { |
| 269 | atomic_dec(&zcrypt_open_count); | 314 | atomic_dec(&zcrypt_open_count); |
| 270 | return 0; | 315 | return 0; |
| 271 | } | 316 | } |
| 272 | 317 | ||
| 273 | /** | 318 | /* |
| 274 | * zcrypt ioctls. | 319 | * zcrypt ioctls. |
| 275 | */ | 320 | */ |
| 276 | static long zcrypt_rsa_modexpo(struct ica_rsa_modexpo *mex) | 321 | static long zcrypt_rsa_modexpo(struct ica_rsa_modexpo *mex) |
| @@ -280,7 +325,7 @@ static long zcrypt_rsa_modexpo(struct ica_rsa_modexpo *mex) | |||
| 280 | 325 | ||
| 281 | if (mex->outputdatalength < mex->inputdatalength) | 326 | if (mex->outputdatalength < mex->inputdatalength) |
| 282 | return -EINVAL; | 327 | return -EINVAL; |
| 283 | /** | 328 | /* |
| 284 | * As long as outputdatalength is big enough, we can set the | 329 | * As long as outputdatalength is big enough, we can set the |
| 285 | * outputdatalength equal to the inputdatalength, since that is the | 330 | * outputdatalength equal to the inputdatalength, since that is the |
| 286 | * number of bytes we will copy in any case | 331 | * number of bytes we will copy in any case |
| @@ -326,7 +371,7 @@ static long zcrypt_rsa_crt(struct ica_rsa_modexpo_crt *crt) | |||
| 326 | if (crt->outputdatalength < crt->inputdatalength || | 371 | if (crt->outputdatalength < crt->inputdatalength || |
| 327 | (crt->inputdatalength & 1)) | 372 | (crt->inputdatalength & 1)) |
| 328 | return -EINVAL; | 373 | return -EINVAL; |
| 329 | /** | 374 | /* |
| 330 | * As long as outputdatalength is big enough, we can set the | 375 | * As long as outputdatalength is big enough, we can set the |
| 331 | * outputdatalength equal to the inputdatalength, since that is the | 376 | * outputdatalength equal to the inputdatalength, since that is the |
| 332 | * number of bytes we will copy in any case | 377 | * number of bytes we will copy in any case |
| @@ -343,7 +388,7 @@ static long zcrypt_rsa_crt(struct ica_rsa_modexpo_crt *crt) | |||
| 343 | zdev->max_mod_size < crt->inputdatalength) | 388 | zdev->max_mod_size < crt->inputdatalength) |
| 344 | continue; | 389 | continue; |
| 345 | if (zdev->short_crt && crt->inputdatalength > 240) { | 390 | if (zdev->short_crt && crt->inputdatalength > 240) { |
| 346 | /** | 391 | /* |
| 347 | * Check inputdata for leading zeros for cards | 392 | * Check inputdata for leading zeros for cards |
| 348 | * that can't handle np_prime, bp_key, or | 393 | * that can't handle np_prime, bp_key, or |
| 349 | * u_mult_inv > 128 bytes. | 394 | * u_mult_inv > 128 bytes. |
| @@ -359,7 +404,7 @@ static long zcrypt_rsa_crt(struct ica_rsa_modexpo_crt *crt) | |||
| 359 | copy_from_user(&z3, crt->u_mult_inv, len)) | 404 | copy_from_user(&z3, crt->u_mult_inv, len)) |
| 360 | return -EFAULT; | 405 | return -EFAULT; |
| 361 | copied = 1; | 406 | copied = 1; |
| 362 | /** | 407 | /* |
| 363 | * We have to restart device lookup - | 408 | * We have to restart device lookup - |
| 364 | * the device list may have changed by now. | 409 | * the device list may have changed by now. |
| 365 | */ | 410 | */ |
| @@ -427,6 +472,37 @@ static long zcrypt_send_cprb(struct ica_xcRB *xcRB) | |||
| 427 | return -ENODEV; | 472 | return -ENODEV; |
| 428 | } | 473 | } |
| 429 | 474 | ||
| 475 | static long zcrypt_rng(char *buffer) | ||
| 476 | { | ||
| 477 | struct zcrypt_device *zdev; | ||
| 478 | int rc; | ||
| 479 | |||
| 480 | spin_lock_bh(&zcrypt_device_lock); | ||
| 481 | list_for_each_entry(zdev, &zcrypt_device_list, list) { | ||
| 482 | if (!zdev->online || !zdev->ops->rng) | ||
| 483 | continue; | ||
| 484 | zcrypt_device_get(zdev); | ||
| 485 | get_device(&zdev->ap_dev->device); | ||
| 486 | zdev->request_count++; | ||
| 487 | __zcrypt_decrease_preference(zdev); | ||
| 488 | if (try_module_get(zdev->ap_dev->drv->driver.owner)) { | ||
| 489 | spin_unlock_bh(&zcrypt_device_lock); | ||
| 490 | rc = zdev->ops->rng(zdev, buffer); | ||
| 491 | spin_lock_bh(&zcrypt_device_lock); | ||
| 492 | module_put(zdev->ap_dev->drv->driver.owner); | ||
| 493 | } else | ||
| 494 | rc = -EAGAIN; | ||
| 495 | zdev->request_count--; | ||
| 496 | __zcrypt_increase_preference(zdev); | ||
| 497 | put_device(&zdev->ap_dev->device); | ||
| 498 | zcrypt_device_put(zdev); | ||
| 499 | spin_unlock_bh(&zcrypt_device_lock); | ||
| 500 | return rc; | ||
| 501 | } | ||
| 502 | spin_unlock_bh(&zcrypt_device_lock); | ||
| 503 | return -ENODEV; | ||
| 504 | } | ||
| 505 | |||
| 430 | static void zcrypt_status_mask(char status[AP_DEVICES]) | 506 | static void zcrypt_status_mask(char status[AP_DEVICES]) |
| 431 | { | 507 | { |
| 432 | struct zcrypt_device *zdev; | 508 | struct zcrypt_device *zdev; |
| @@ -514,6 +590,8 @@ static int zcrypt_count_type(int type) | |||
| 514 | } | 590 | } |
| 515 | 591 | ||
| 516 | /** | 592 | /** |
| 593 | * zcrypt_ica_status(): Old, depracted combi status call. | ||
| 594 | * | ||
| 517 | * Old, deprecated combi status call. | 595 | * Old, deprecated combi status call. |
| 518 | */ | 596 | */ |
| 519 | static long zcrypt_ica_status(struct file *filp, unsigned long arg) | 597 | static long zcrypt_ica_status(struct file *filp, unsigned long arg) |
| @@ -615,7 +693,7 @@ static long zcrypt_unlocked_ioctl(struct file *filp, unsigned int cmd, | |||
| 615 | (int __user *) arg); | 693 | (int __user *) arg); |
| 616 | case Z90STAT_DOMAIN_INDEX: | 694 | case Z90STAT_DOMAIN_INDEX: |
| 617 | return put_user(ap_domain_index, (int __user *) arg); | 695 | return put_user(ap_domain_index, (int __user *) arg); |
| 618 | /** | 696 | /* |
| 619 | * Deprecated ioctls. Don't add another device count ioctl, | 697 | * Deprecated ioctls. Don't add another device count ioctl, |
| 620 | * you can count them yourself in the user space with the | 698 | * you can count them yourself in the user space with the |
| 621 | * output of the Z90STAT_STATUS_MASK ioctl. | 699 | * output of the Z90STAT_STATUS_MASK ioctl. |
| @@ -653,7 +731,7 @@ static long zcrypt_unlocked_ioctl(struct file *filp, unsigned int cmd, | |||
| 653 | } | 731 | } |
| 654 | 732 | ||
| 655 | #ifdef CONFIG_COMPAT | 733 | #ifdef CONFIG_COMPAT |
| 656 | /** | 734 | /* |
| 657 | * ioctl32 conversion routines | 735 | * ioctl32 conversion routines |
| 658 | */ | 736 | */ |
| 659 | struct compat_ica_rsa_modexpo { | 737 | struct compat_ica_rsa_modexpo { |
| @@ -804,7 +882,7 @@ static long zcrypt_compat_ioctl(struct file *filp, unsigned int cmd, | |||
| 804 | } | 882 | } |
| 805 | #endif | 883 | #endif |
| 806 | 884 | ||
| 807 | /** | 885 | /* |
| 808 | * Misc device file operations. | 886 | * Misc device file operations. |
| 809 | */ | 887 | */ |
| 810 | static const struct file_operations zcrypt_fops = { | 888 | static const struct file_operations zcrypt_fops = { |
| @@ -819,7 +897,7 @@ static const struct file_operations zcrypt_fops = { | |||
| 819 | .release = zcrypt_release | 897 | .release = zcrypt_release |
| 820 | }; | 898 | }; |
| 821 | 899 | ||
| 822 | /** | 900 | /* |
| 823 | * Misc device. | 901 | * Misc device. |
| 824 | */ | 902 | */ |
| 825 | static struct miscdevice zcrypt_misc_device = { | 903 | static struct miscdevice zcrypt_misc_device = { |
| @@ -828,7 +906,7 @@ static struct miscdevice zcrypt_misc_device = { | |||
| 828 | .fops = &zcrypt_fops, | 906 | .fops = &zcrypt_fops, |
| 829 | }; | 907 | }; |
| 830 | 908 | ||
| 831 | /** | 909 | /* |
| 832 | * Deprecated /proc entry support. | 910 | * Deprecated /proc entry support. |
| 833 | */ | 911 | */ |
| 834 | static struct proc_dir_entry *zcrypt_entry; | 912 | static struct proc_dir_entry *zcrypt_entry; |
| @@ -1022,7 +1100,7 @@ static int zcrypt_status_write(struct file *file, const char __user *buffer, | |||
| 1022 | } | 1100 | } |
| 1023 | 1101 | ||
| 1024 | for (j = 0; j < 64 && *ptr; ptr++) { | 1102 | for (j = 0; j < 64 && *ptr; ptr++) { |
| 1025 | /** | 1103 | /* |
| 1026 | * '0' for no device, '1' for PCICA, '2' for PCICC, | 1104 | * '0' for no device, '1' for PCICA, '2' for PCICC, |
| 1027 | * '3' for PCIXCC_MCL2, '4' for PCIXCC_MCL3, | 1105 | * '3' for PCIXCC_MCL2, '4' for PCIXCC_MCL3, |
| 1028 | * '5' for CEX2C and '6' for CEX2A' | 1106 | * '5' for CEX2C and '6' for CEX2A' |
| @@ -1041,7 +1119,76 @@ out: | |||
| 1041 | return count; | 1119 | return count; |
| 1042 | } | 1120 | } |
| 1043 | 1121 | ||
| 1122 | static int zcrypt_rng_device_count; | ||
| 1123 | static u32 *zcrypt_rng_buffer; | ||
| 1124 | static int zcrypt_rng_buffer_index; | ||
| 1125 | static DEFINE_MUTEX(zcrypt_rng_mutex); | ||
| 1126 | |||
| 1127 | static int zcrypt_rng_data_read(struct hwrng *rng, u32 *data) | ||
| 1128 | { | ||
| 1129 | int rc; | ||
| 1130 | |||
| 1131 | /* | ||
| 1132 | * We don't need locking here because the RNG API guarantees serialized | ||
| 1133 | * read method calls. | ||
| 1134 | */ | ||
| 1135 | if (zcrypt_rng_buffer_index == 0) { | ||
| 1136 | rc = zcrypt_rng((char *) zcrypt_rng_buffer); | ||
| 1137 | if (rc < 0) | ||
| 1138 | return -EIO; | ||
| 1139 | zcrypt_rng_buffer_index = rc / sizeof *data; | ||
| 1140 | } | ||
| 1141 | *data = zcrypt_rng_buffer[--zcrypt_rng_buffer_index]; | ||
| 1142 | return sizeof *data; | ||
| 1143 | } | ||
| 1144 | |||
| 1145 | static struct hwrng zcrypt_rng_dev = { | ||
| 1146 | .name = "zcrypt", | ||
| 1147 | .data_read = zcrypt_rng_data_read, | ||
| 1148 | }; | ||
| 1149 | |||
| 1150 | static int zcrypt_rng_device_add(void) | ||
| 1151 | { | ||
| 1152 | int rc = 0; | ||
| 1153 | |||
| 1154 | mutex_lock(&zcrypt_rng_mutex); | ||
| 1155 | if (zcrypt_rng_device_count == 0) { | ||
| 1156 | zcrypt_rng_buffer = (u32 *) get_zeroed_page(GFP_KERNEL); | ||
| 1157 | if (!zcrypt_rng_buffer) { | ||
| 1158 | rc = -ENOMEM; | ||
| 1159 | goto out; | ||
| 1160 | } | ||
| 1161 | zcrypt_rng_buffer_index = 0; | ||
| 1162 | rc = hwrng_register(&zcrypt_rng_dev); | ||
| 1163 | if (rc) | ||
| 1164 | goto out_free; | ||
| 1165 | zcrypt_rng_device_count = 1; | ||
| 1166 | } else | ||
| 1167 | zcrypt_rng_device_count++; | ||
| 1168 | mutex_unlock(&zcrypt_rng_mutex); | ||
| 1169 | return 0; | ||
| 1170 | |||
| 1171 | out_free: | ||
| 1172 | free_page((unsigned long) zcrypt_rng_buffer); | ||
| 1173 | out: | ||
| 1174 | mutex_unlock(&zcrypt_rng_mutex); | ||
| 1175 | return rc; | ||
| 1176 | } | ||
| 1177 | |||
| 1178 | static void zcrypt_rng_device_remove(void) | ||
| 1179 | { | ||
| 1180 | mutex_lock(&zcrypt_rng_mutex); | ||
| 1181 | zcrypt_rng_device_count--; | ||
| 1182 | if (zcrypt_rng_device_count == 0) { | ||
| 1183 | hwrng_unregister(&zcrypt_rng_dev); | ||
| 1184 | free_page((unsigned long) zcrypt_rng_buffer); | ||
| 1185 | } | ||
| 1186 | mutex_unlock(&zcrypt_rng_mutex); | ||
| 1187 | } | ||
| 1188 | |||
| 1044 | /** | 1189 | /** |
| 1190 | * zcrypt_api_init(): Module initialization. | ||
| 1191 | * | ||
| 1045 | * The module initialization code. | 1192 | * The module initialization code. |
| 1046 | */ | 1193 | */ |
| 1047 | int __init zcrypt_api_init(void) | 1194 | int __init zcrypt_api_init(void) |
| @@ -1076,6 +1223,8 @@ out: | |||
| 1076 | } | 1223 | } |
| 1077 | 1224 | ||
| 1078 | /** | 1225 | /** |
| 1226 | * zcrypt_api_exit(): Module termination. | ||
| 1227 | * | ||
| 1079 | * The module termination code. | 1228 | * The module termination code. |
| 1080 | */ | 1229 | */ |
| 1081 | void zcrypt_api_exit(void) | 1230 | void zcrypt_api_exit(void) |
diff --git a/drivers/s390/crypto/zcrypt_api.h b/drivers/s390/crypto/zcrypt_api.h index de4877ee618f..5c6e222b2ac4 100644 --- a/drivers/s390/crypto/zcrypt_api.h +++ b/drivers/s390/crypto/zcrypt_api.h | |||
| @@ -43,17 +43,17 @@ | |||
| 43 | #define DEV_NAME "zcrypt" | 43 | #define DEV_NAME "zcrypt" |
| 44 | 44 | ||
| 45 | #define PRINTK(fmt, args...) \ | 45 | #define PRINTK(fmt, args...) \ |
| 46 | printk(KERN_DEBUG DEV_NAME ": %s -> " fmt, __FUNCTION__ , ## args) | 46 | printk(KERN_DEBUG DEV_NAME ": %s -> " fmt, __func__ , ## args) |
| 47 | #define PRINTKN(fmt, args...) \ | 47 | #define PRINTKN(fmt, args...) \ |
| 48 | printk(KERN_DEBUG DEV_NAME ": " fmt, ## args) | 48 | printk(KERN_DEBUG DEV_NAME ": " fmt, ## args) |
| 49 | #define PRINTKW(fmt, args...) \ | 49 | #define PRINTKW(fmt, args...) \ |
| 50 | printk(KERN_WARNING DEV_NAME ": %s -> " fmt, __FUNCTION__ , ## args) | 50 | printk(KERN_WARNING DEV_NAME ": %s -> " fmt, __func__ , ## args) |
| 51 | #define PRINTKC(fmt, args...) \ | 51 | #define PRINTKC(fmt, args...) \ |
| 52 | printk(KERN_CRIT DEV_NAME ": %s -> " fmt, __FUNCTION__ , ## args) | 52 | printk(KERN_CRIT DEV_NAME ": %s -> " fmt, __func__ , ## args) |
| 53 | 53 | ||
| 54 | #ifdef ZCRYPT_DEBUG | 54 | #ifdef ZCRYPT_DEBUG |
| 55 | #define PDEBUG(fmt, args...) \ | 55 | #define PDEBUG(fmt, args...) \ |
| 56 | printk(KERN_DEBUG DEV_NAME ": %s -> " fmt, __FUNCTION__ , ## args) | 56 | printk(KERN_DEBUG DEV_NAME ": %s -> " fmt, __func__ , ## args) |
| 57 | #else | 57 | #else |
| 58 | #define PDEBUG(fmt, args...) do {} while (0) | 58 | #define PDEBUG(fmt, args...) do {} while (0) |
| 59 | #endif | 59 | #endif |
| @@ -100,6 +100,13 @@ struct ica_z90_status { | |||
| 100 | #define ZCRYPT_CEX2C 5 | 100 | #define ZCRYPT_CEX2C 5 |
| 101 | #define ZCRYPT_CEX2A 6 | 101 | #define ZCRYPT_CEX2A 6 |
| 102 | 102 | ||
| 103 | /** | ||
| 104 | * Large random numbers are pulled in 4096 byte chunks from the crypto cards | ||
| 105 | * and stored in a page. Be carefull when increasing this buffer due to size | ||
| 106 | * limitations for AP requests. | ||
| 107 | */ | ||
| 108 | #define ZCRYPT_RNG_BUFFER_SIZE 4096 | ||
| 109 | |||
| 103 | struct zcrypt_device; | 110 | struct zcrypt_device; |
| 104 | 111 | ||
| 105 | struct zcrypt_ops { | 112 | struct zcrypt_ops { |
| @@ -107,6 +114,7 @@ struct zcrypt_ops { | |||
| 107 | long (*rsa_modexpo_crt)(struct zcrypt_device *, | 114 | long (*rsa_modexpo_crt)(struct zcrypt_device *, |
| 108 | struct ica_rsa_modexpo_crt *); | 115 | struct ica_rsa_modexpo_crt *); |
| 109 | long (*send_cprb)(struct zcrypt_device *, struct ica_xcRB *); | 116 | long (*send_cprb)(struct zcrypt_device *, struct ica_xcRB *); |
| 117 | long (*rng)(struct zcrypt_device *, char *); | ||
| 110 | }; | 118 | }; |
| 111 | 119 | ||
| 112 | struct zcrypt_device { | 120 | struct zcrypt_device { |
diff --git a/drivers/s390/crypto/zcrypt_cca_key.h b/drivers/s390/crypto/zcrypt_cca_key.h index 8dbcf0eef3e5..ed82f2f59b17 100644 --- a/drivers/s390/crypto/zcrypt_cca_key.h +++ b/drivers/s390/crypto/zcrypt_cca_key.h | |||
| @@ -174,7 +174,7 @@ static inline int zcrypt_type6_mex_key_de(struct ica_rsa_modexpo *mex, | |||
| 174 | key->pvtMeHdr = static_pvt_me_hdr; | 174 | key->pvtMeHdr = static_pvt_me_hdr; |
| 175 | key->pvtMeSec = static_pvt_me_sec; | 175 | key->pvtMeSec = static_pvt_me_sec; |
| 176 | key->pubMeSec = static_pub_me_sec; | 176 | key->pubMeSec = static_pub_me_sec; |
| 177 | /** | 177 | /* |
| 178 | * In a private key, the modulus doesn't appear in the public | 178 | * In a private key, the modulus doesn't appear in the public |
| 179 | * section. So, an arbitrary public exponent of 0x010001 will be | 179 | * section. So, an arbitrary public exponent of 0x010001 will be |
| 180 | * used. | 180 | * used. |
| @@ -338,7 +338,7 @@ static inline int zcrypt_type6_crt_key(struct ica_rsa_modexpo_crt *crt, | |||
| 338 | pub = (struct cca_public_sec *)(key->key_parts + key_len); | 338 | pub = (struct cca_public_sec *)(key->key_parts + key_len); |
| 339 | *pub = static_cca_pub_sec; | 339 | *pub = static_cca_pub_sec; |
| 340 | pub->modulus_bit_len = 8 * crt->inputdatalength; | 340 | pub->modulus_bit_len = 8 * crt->inputdatalength; |
| 341 | /** | 341 | /* |
| 342 | * In a private key, the modulus doesn't appear in the public | 342 | * In a private key, the modulus doesn't appear in the public |
| 343 | * section. So, an arbitrary public exponent of 0x010001 will be | 343 | * section. So, an arbitrary public exponent of 0x010001 will be |
| 344 | * used. | 344 | * used. |
diff --git a/drivers/s390/crypto/zcrypt_error.h b/drivers/s390/crypto/zcrypt_error.h index 2cb616ba8bec..3e27fe77d207 100644 --- a/drivers/s390/crypto/zcrypt_error.h +++ b/drivers/s390/crypto/zcrypt_error.h | |||
| @@ -108,7 +108,7 @@ static inline int convert_error(struct zcrypt_device *zdev, | |||
| 108 | return -EINVAL; | 108 | return -EINVAL; |
| 109 | case REP82_ERROR_MESSAGE_TYPE: | 109 | case REP82_ERROR_MESSAGE_TYPE: |
| 110 | // REP88_ERROR_MESSAGE_TYPE // '20' CEX2A | 110 | // REP88_ERROR_MESSAGE_TYPE // '20' CEX2A |
| 111 | /** | 111 | /* |
| 112 | * To sent a message of the wrong type is a bug in the | 112 | * To sent a message of the wrong type is a bug in the |
| 113 | * device driver. Warn about it, disable the device | 113 | * device driver. Warn about it, disable the device |
| 114 | * and then repeat the request. | 114 | * and then repeat the request. |
diff --git a/drivers/s390/crypto/zcrypt_pcicc.c b/drivers/s390/crypto/zcrypt_pcicc.c index d6d59bf9ac38..17ea56ce1c11 100644 --- a/drivers/s390/crypto/zcrypt_pcicc.c +++ b/drivers/s390/crypto/zcrypt_pcicc.c | |||
| @@ -42,7 +42,7 @@ | |||
| 42 | #define PCICC_MAX_MOD_SIZE_OLD 128 /* 1024 bits */ | 42 | #define PCICC_MAX_MOD_SIZE_OLD 128 /* 1024 bits */ |
| 43 | #define PCICC_MAX_MOD_SIZE 256 /* 2048 bits */ | 43 | #define PCICC_MAX_MOD_SIZE 256 /* 2048 bits */ |
| 44 | 44 | ||
| 45 | /** | 45 | /* |
| 46 | * PCICC cards need a speed rating of 0. This keeps them at the end of | 46 | * PCICC cards need a speed rating of 0. This keeps them at the end of |
| 47 | * the zcrypt device list (see zcrypt_api.c). PCICC cards are only | 47 | * the zcrypt device list (see zcrypt_api.c). PCICC cards are only |
| 48 | * used if no other cards are present because they are slow and can only | 48 | * used if no other cards are present because they are slow and can only |
| @@ -388,7 +388,7 @@ static int convert_type86(struct zcrypt_device *zdev, | |||
| 388 | reply_len = le16_to_cpu(msg->length) - 2; | 388 | reply_len = le16_to_cpu(msg->length) - 2; |
| 389 | if (reply_len > outputdatalength) | 389 | if (reply_len > outputdatalength) |
| 390 | return -EINVAL; | 390 | return -EINVAL; |
| 391 | /** | 391 | /* |
| 392 | * For all encipher requests, the length of the ciphertext (reply_len) | 392 | * For all encipher requests, the length of the ciphertext (reply_len) |
| 393 | * will always equal the modulus length. For MEX decipher requests | 393 | * will always equal the modulus length. For MEX decipher requests |
| 394 | * the output needs to get padded. Minimum pad size is 10. | 394 | * the output needs to get padded. Minimum pad size is 10. |
diff --git a/drivers/s390/crypto/zcrypt_pcixcc.c b/drivers/s390/crypto/zcrypt_pcixcc.c index 70b9ddc8cf9d..0bc9b3188e64 100644 --- a/drivers/s390/crypto/zcrypt_pcixcc.c +++ b/drivers/s390/crypto/zcrypt_pcixcc.c | |||
| @@ -356,6 +356,55 @@ static int XCRB_msg_to_type6CPRB_msgX(struct zcrypt_device *zdev, | |||
| 356 | } | 356 | } |
| 357 | 357 | ||
| 358 | /** | 358 | /** |
| 359 | * Prepare a type6 CPRB message for random number generation | ||
| 360 | * | ||
| 361 | * @ap_dev: AP device pointer | ||
| 362 | * @ap_msg: pointer to AP message | ||
| 363 | */ | ||
| 364 | static void rng_type6CPRB_msgX(struct ap_device *ap_dev, | ||
| 365 | struct ap_message *ap_msg, | ||
| 366 | unsigned random_number_length) | ||
| 367 | { | ||
| 368 | struct { | ||
| 369 | struct type6_hdr hdr; | ||
| 370 | struct CPRBX cprbx; | ||
| 371 | char function_code[2]; | ||
| 372 | short int rule_length; | ||
| 373 | char rule[8]; | ||
| 374 | short int verb_length; | ||
| 375 | short int key_length; | ||
| 376 | } __attribute__((packed)) *msg = ap_msg->message; | ||
| 377 | static struct type6_hdr static_type6_hdrX = { | ||
| 378 | .type = 0x06, | ||
| 379 | .offset1 = 0x00000058, | ||
| 380 | .agent_id = {'C', 'A'}, | ||
| 381 | .function_code = {'R', 'L'}, | ||
| 382 | .ToCardLen1 = sizeof *msg - sizeof(msg->hdr), | ||
| 383 | .FromCardLen1 = sizeof *msg - sizeof(msg->hdr), | ||
| 384 | }; | ||
| 385 | static struct CPRBX static_cprbx = { | ||
| 386 | .cprb_len = 0x00dc, | ||
| 387 | .cprb_ver_id = 0x02, | ||
| 388 | .func_id = {0x54, 0x32}, | ||
| 389 | .req_parml = sizeof *msg - sizeof(msg->hdr) - | ||
| 390 | sizeof(msg->cprbx), | ||
| 391 | .rpl_msgbl = sizeof *msg - sizeof(msg->hdr), | ||
| 392 | }; | ||
| 393 | |||
| 394 | msg->hdr = static_type6_hdrX; | ||
| 395 | msg->hdr.FromCardLen2 = random_number_length, | ||
| 396 | msg->cprbx = static_cprbx; | ||
| 397 | msg->cprbx.rpl_datal = random_number_length, | ||
| 398 | msg->cprbx.domain = AP_QID_QUEUE(ap_dev->qid); | ||
| 399 | memcpy(msg->function_code, msg->hdr.function_code, 0x02); | ||
| 400 | msg->rule_length = 0x0a; | ||
| 401 | memcpy(msg->rule, "RANDOM ", 8); | ||
| 402 | msg->verb_length = 0x02; | ||
| 403 | msg->key_length = 0x02; | ||
| 404 | ap_msg->length = sizeof *msg; | ||
| 405 | } | ||
| 406 | |||
| 407 | /** | ||
| 359 | * Copy results from a type 86 ICA reply message back to user space. | 408 | * Copy results from a type 86 ICA reply message back to user space. |
| 360 | * | 409 | * |
| 361 | * @zdev: crypto device pointer | 410 | * @zdev: crypto device pointer |
| @@ -452,7 +501,7 @@ static int convert_type86_ica(struct zcrypt_device *zdev, | |||
| 452 | reply_len = msg->length - 2; | 501 | reply_len = msg->length - 2; |
| 453 | if (reply_len > outputdatalength) | 502 | if (reply_len > outputdatalength) |
| 454 | return -EINVAL; | 503 | return -EINVAL; |
| 455 | /** | 504 | /* |
| 456 | * For all encipher requests, the length of the ciphertext (reply_len) | 505 | * For all encipher requests, the length of the ciphertext (reply_len) |
| 457 | * will always equal the modulus length. For MEX decipher requests | 506 | * will always equal the modulus length. For MEX decipher requests |
| 458 | * the output needs to get padded. Minimum pad size is 10. | 507 | * the output needs to get padded. Minimum pad size is 10. |
| @@ -509,6 +558,26 @@ static int convert_type86_xcrb(struct zcrypt_device *zdev, | |||
| 509 | return 0; | 558 | return 0; |
| 510 | } | 559 | } |
| 511 | 560 | ||
| 561 | static int convert_type86_rng(struct zcrypt_device *zdev, | ||
| 562 | struct ap_message *reply, | ||
| 563 | char *buffer) | ||
| 564 | { | ||
| 565 | struct { | ||
| 566 | struct type86_hdr hdr; | ||
| 567 | struct type86_fmt2_ext fmt2; | ||
| 568 | struct CPRBX cprbx; | ||
| 569 | } __attribute__((packed)) *msg = reply->message; | ||
| 570 | char *data = reply->message; | ||
| 571 | |||
| 572 | if (msg->cprbx.ccp_rtcode != 0 || msg->cprbx.ccp_rscode != 0) { | ||
| 573 | PDEBUG("RNG response error on PCIXCC/CEX2C rc=%hu/rs=%hu\n", | ||
| 574 | rc, rs); | ||
| 575 | return -EINVAL; | ||
| 576 | } | ||
| 577 | memcpy(buffer, data + msg->fmt2.offset2, msg->fmt2.count2); | ||
| 578 | return msg->fmt2.count2; | ||
| 579 | } | ||
| 580 | |||
| 512 | static int convert_response_ica(struct zcrypt_device *zdev, | 581 | static int convert_response_ica(struct zcrypt_device *zdev, |
| 513 | struct ap_message *reply, | 582 | struct ap_message *reply, |
| 514 | char __user *outputdata, | 583 | char __user *outputdata, |
| @@ -567,6 +636,31 @@ static int convert_response_xcrb(struct zcrypt_device *zdev, | |||
| 567 | } | 636 | } |
| 568 | } | 637 | } |
| 569 | 638 | ||
| 639 | static int convert_response_rng(struct zcrypt_device *zdev, | ||
| 640 | struct ap_message *reply, | ||
| 641 | char *data) | ||
| 642 | { | ||
| 643 | struct type86x_reply *msg = reply->message; | ||
| 644 | |||
| 645 | switch (msg->hdr.type) { | ||
| 646 | case TYPE82_RSP_CODE: | ||
| 647 | case TYPE88_RSP_CODE: | ||
| 648 | return -EINVAL; | ||
| 649 | case TYPE86_RSP_CODE: | ||
| 650 | if (msg->hdr.reply_code) | ||
| 651 | return -EINVAL; | ||
| 652 | if (msg->cprbx.cprb_ver_id == 0x02) | ||
| 653 | return convert_type86_rng(zdev, reply, data); | ||
| 654 | /* no break, incorrect cprb version is an unknown response */ | ||
| 655 | default: /* Unknown response type, this should NEVER EVER happen */ | ||
| 656 | PRINTK("Unrecognized Message Header: %08x%08x\n", | ||
| 657 | *(unsigned int *) reply->message, | ||
| 658 | *(unsigned int *) (reply->message+4)); | ||
| 659 | zdev->online = 0; | ||
| 660 | return -EAGAIN; /* repeat the request on a different device. */ | ||
| 661 | } | ||
| 662 | } | ||
| 663 | |||
| 570 | /** | 664 | /** |
| 571 | * This function is called from the AP bus code after a crypto request | 665 | * This function is called from the AP bus code after a crypto request |
| 572 | * "msg" has finished with the reply message "reply". | 666 | * "msg" has finished with the reply message "reply". |
| @@ -736,6 +830,42 @@ out_free: | |||
| 736 | } | 830 | } |
| 737 | 831 | ||
| 738 | /** | 832 | /** |
| 833 | * The request distributor calls this function if it picked the PCIXCC/CEX2C | ||
| 834 | * device to generate random data. | ||
| 835 | * @zdev: pointer to zcrypt_device structure that identifies the | ||
| 836 | * PCIXCC/CEX2C device to the request distributor | ||
| 837 | * @buffer: pointer to a memory page to return random data | ||
| 838 | */ | ||
| 839 | |||
| 840 | static long zcrypt_pcixcc_rng(struct zcrypt_device *zdev, | ||
| 841 | char *buffer) | ||
| 842 | { | ||
| 843 | struct ap_message ap_msg; | ||
| 844 | struct response_type resp_type = { | ||
| 845 | .type = PCIXCC_RESPONSE_TYPE_XCRB, | ||
| 846 | }; | ||
| 847 | int rc; | ||
| 848 | |||
| 849 | ap_msg.message = kmalloc(PCIXCC_MAX_XCRB_MESSAGE_SIZE, GFP_KERNEL); | ||
| 850 | if (!ap_msg.message) | ||
| 851 | return -ENOMEM; | ||
| 852 | ap_msg.psmid = (((unsigned long long) current->pid) << 32) + | ||
| 853 | atomic_inc_return(&zcrypt_step); | ||
| 854 | ap_msg.private = &resp_type; | ||
| 855 | rng_type6CPRB_msgX(zdev->ap_dev, &ap_msg, ZCRYPT_RNG_BUFFER_SIZE); | ||
| 856 | init_completion(&resp_type.work); | ||
| 857 | ap_queue_message(zdev->ap_dev, &ap_msg); | ||
| 858 | rc = wait_for_completion_interruptible(&resp_type.work); | ||
| 859 | if (rc == 0) | ||
| 860 | rc = convert_response_rng(zdev, &ap_msg, buffer); | ||
| 861 | else | ||
| 862 | /* Signal pending. */ | ||
| 863 | ap_cancel_message(zdev->ap_dev, &ap_msg); | ||
| 864 | kfree(ap_msg.message); | ||
| 865 | return rc; | ||
| 866 | } | ||
| 867 | |||
| 868 | /** | ||
| 739 | * The crypto operations for a PCIXCC/CEX2C card. | 869 | * The crypto operations for a PCIXCC/CEX2C card. |
| 740 | */ | 870 | */ |
| 741 | static struct zcrypt_ops zcrypt_pcixcc_ops = { | 871 | static struct zcrypt_ops zcrypt_pcixcc_ops = { |
| @@ -744,6 +874,13 @@ static struct zcrypt_ops zcrypt_pcixcc_ops = { | |||
| 744 | .send_cprb = zcrypt_pcixcc_send_cprb, | 874 | .send_cprb = zcrypt_pcixcc_send_cprb, |
| 745 | }; | 875 | }; |
| 746 | 876 | ||
| 877 | static struct zcrypt_ops zcrypt_pcixcc_with_rng_ops = { | ||
| 878 | .rsa_modexpo = zcrypt_pcixcc_modexpo, | ||
| 879 | .rsa_modexpo_crt = zcrypt_pcixcc_modexpo_crt, | ||
| 880 | .send_cprb = zcrypt_pcixcc_send_cprb, | ||
| 881 | .rng = zcrypt_pcixcc_rng, | ||
| 882 | }; | ||
| 883 | |||
| 747 | /** | 884 | /** |
| 748 | * Micro-code detection function. Its sends a message to a pcixcc card | 885 | * Micro-code detection function. Its sends a message to a pcixcc card |
| 749 | * to find out the microcode level. | 886 | * to find out the microcode level. |
| @@ -859,6 +996,58 @@ out_free: | |||
| 859 | } | 996 | } |
| 860 | 997 | ||
| 861 | /** | 998 | /** |
| 999 | * Large random number detection function. Its sends a message to a pcixcc | ||
| 1000 | * card to find out if large random numbers are supported. | ||
| 1001 | * @ap_dev: pointer to the AP device. | ||
| 1002 | * | ||
| 1003 | * Returns 1 if large random numbers are supported, 0 if not and < 0 on error. | ||
| 1004 | */ | ||
| 1005 | static int zcrypt_pcixcc_rng_supported(struct ap_device *ap_dev) | ||
| 1006 | { | ||
| 1007 | struct ap_message ap_msg; | ||
| 1008 | unsigned long long psmid; | ||
| 1009 | struct { | ||
| 1010 | struct type86_hdr hdr; | ||
| 1011 | struct type86_fmt2_ext fmt2; | ||
| 1012 | struct CPRBX cprbx; | ||
| 1013 | } __attribute__((packed)) *reply; | ||
| 1014 | int rc, i; | ||
| 1015 | |||
| 1016 | ap_msg.message = (void *) get_zeroed_page(GFP_KERNEL); | ||
| 1017 | if (!ap_msg.message) | ||
| 1018 | return -ENOMEM; | ||
| 1019 | |||
| 1020 | rng_type6CPRB_msgX(ap_dev, &ap_msg, 4); | ||
| 1021 | rc = ap_send(ap_dev->qid, 0x0102030405060708ULL, ap_msg.message, | ||
| 1022 | ap_msg.length); | ||
| 1023 | if (rc) | ||
| 1024 | goto out_free; | ||
| 1025 | |||
| 1026 | /* Wait for the test message to complete. */ | ||
| 1027 | for (i = 0; i < 2 * HZ; i++) { | ||
| 1028 | msleep(1000 / HZ); | ||
| 1029 | rc = ap_recv(ap_dev->qid, &psmid, ap_msg.message, 4096); | ||
| 1030 | if (rc == 0 && psmid == 0x0102030405060708ULL) | ||
| 1031 | break; | ||
| 1032 | } | ||
| 1033 | |||
| 1034 | if (i >= 2 * HZ) { | ||
| 1035 | /* Got no answer. */ | ||
| 1036 | rc = -ENODEV; | ||
| 1037 | goto out_free; | ||
| 1038 | } | ||
| 1039 | |||
| 1040 | reply = ap_msg.message; | ||
| 1041 | if (reply->cprbx.ccp_rtcode == 0 && reply->cprbx.ccp_rscode == 0) | ||
| 1042 | rc = 1; | ||
| 1043 | else | ||
| 1044 | rc = 0; | ||
| 1045 | out_free: | ||
| 1046 | free_page((unsigned long) ap_msg.message); | ||
| 1047 | return rc; | ||
| 1048 | } | ||
| 1049 | |||
| 1050 | /** | ||
| 862 | * Probe function for PCIXCC/CEX2C cards. It always accepts the AP device | 1051 | * Probe function for PCIXCC/CEX2C cards. It always accepts the AP device |
| 863 | * since the bus_match already checked the hardware type. The PCIXCC | 1052 | * since the bus_match already checked the hardware type. The PCIXCC |
| 864 | * cards come in two flavours: micro code level 2 and micro code level 3. | 1053 | * cards come in two flavours: micro code level 2 and micro code level 3. |
| @@ -874,7 +1063,6 @@ static int zcrypt_pcixcc_probe(struct ap_device *ap_dev) | |||
| 874 | if (!zdev) | 1063 | if (!zdev) |
| 875 | return -ENOMEM; | 1064 | return -ENOMEM; |
| 876 | zdev->ap_dev = ap_dev; | 1065 | zdev->ap_dev = ap_dev; |
| 877 | zdev->ops = &zcrypt_pcixcc_ops; | ||
| 878 | zdev->online = 1; | 1066 | zdev->online = 1; |
| 879 | if (ap_dev->device_type == AP_DEVICE_TYPE_PCIXCC) { | 1067 | if (ap_dev->device_type == AP_DEVICE_TYPE_PCIXCC) { |
| 880 | rc = zcrypt_pcixcc_mcl(ap_dev); | 1068 | rc = zcrypt_pcixcc_mcl(ap_dev); |
| @@ -901,6 +1089,15 @@ static int zcrypt_pcixcc_probe(struct ap_device *ap_dev) | |||
| 901 | zdev->min_mod_size = PCIXCC_MIN_MOD_SIZE; | 1089 | zdev->min_mod_size = PCIXCC_MIN_MOD_SIZE; |
| 902 | zdev->max_mod_size = PCIXCC_MAX_MOD_SIZE; | 1090 | zdev->max_mod_size = PCIXCC_MAX_MOD_SIZE; |
| 903 | } | 1091 | } |
| 1092 | rc = zcrypt_pcixcc_rng_supported(ap_dev); | ||
| 1093 | if (rc < 0) { | ||
| 1094 | zcrypt_device_free(zdev); | ||
| 1095 | return rc; | ||
| 1096 | } | ||
| 1097 | if (rc) | ||
| 1098 | zdev->ops = &zcrypt_pcixcc_with_rng_ops; | ||
| 1099 | else | ||
| 1100 | zdev->ops = &zcrypt_pcixcc_ops; | ||
| 904 | ap_dev->reply = &zdev->reply; | 1101 | ap_dev->reply = &zdev->reply; |
| 905 | ap_dev->private = zdev; | 1102 | ap_dev->private = zdev; |
| 906 | rc = zcrypt_device_register(zdev); | 1103 | rc = zcrypt_device_register(zdev); |
diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c index d8a5c229c5a7..04a1d7bf678c 100644 --- a/drivers/s390/net/claw.c +++ b/drivers/s390/net/claw.c | |||
| @@ -299,7 +299,7 @@ claw_probe(struct ccwgroup_device *cgdev) | |||
| 299 | struct claw_privbk *privptr=NULL; | 299 | struct claw_privbk *privptr=NULL; |
| 300 | 300 | ||
| 301 | #ifdef FUNCTRACE | 301 | #ifdef FUNCTRACE |
| 302 | printk(KERN_INFO "%s Enter\n",__FUNCTION__); | 302 | printk(KERN_INFO "%s Enter\n",__func__); |
| 303 | #endif | 303 | #endif |
| 304 | CLAW_DBF_TEXT(2,setup,"probe"); | 304 | CLAW_DBF_TEXT(2,setup,"probe"); |
| 305 | if (!get_device(&cgdev->dev)) | 305 | if (!get_device(&cgdev->dev)) |
| @@ -313,7 +313,7 @@ claw_probe(struct ccwgroup_device *cgdev) | |||
| 313 | probe_error(cgdev); | 313 | probe_error(cgdev); |
| 314 | put_device(&cgdev->dev); | 314 | put_device(&cgdev->dev); |
| 315 | printk(KERN_WARNING "Out of memory %s %s Exit Line %d \n", | 315 | printk(KERN_WARNING "Out of memory %s %s Exit Line %d \n", |
| 316 | cgdev->cdev[0]->dev.bus_id,__FUNCTION__,__LINE__); | 316 | cgdev->cdev[0]->dev.bus_id,__func__,__LINE__); |
| 317 | CLAW_DBF_TEXT_(2,setup,"probex%d",-ENOMEM); | 317 | CLAW_DBF_TEXT_(2,setup,"probex%d",-ENOMEM); |
| 318 | return -ENOMEM; | 318 | return -ENOMEM; |
| 319 | } | 319 | } |
| @@ -323,7 +323,7 @@ claw_probe(struct ccwgroup_device *cgdev) | |||
| 323 | probe_error(cgdev); | 323 | probe_error(cgdev); |
| 324 | put_device(&cgdev->dev); | 324 | put_device(&cgdev->dev); |
| 325 | printk(KERN_WARNING "Out of memory %s %s Exit Line %d \n", | 325 | printk(KERN_WARNING "Out of memory %s %s Exit Line %d \n", |
| 326 | cgdev->cdev[0]->dev.bus_id,__FUNCTION__,__LINE__); | 326 | cgdev->cdev[0]->dev.bus_id,__func__,__LINE__); |
| 327 | CLAW_DBF_TEXT_(2,setup,"probex%d",-ENOMEM); | 327 | CLAW_DBF_TEXT_(2,setup,"probex%d",-ENOMEM); |
| 328 | return -ENOMEM; | 328 | return -ENOMEM; |
| 329 | } | 329 | } |
| @@ -340,7 +340,7 @@ claw_probe(struct ccwgroup_device *cgdev) | |||
| 340 | probe_error(cgdev); | 340 | probe_error(cgdev); |
| 341 | put_device(&cgdev->dev); | 341 | put_device(&cgdev->dev); |
| 342 | printk(KERN_WARNING "add_files failed %s %s Exit Line %d \n", | 342 | printk(KERN_WARNING "add_files failed %s %s Exit Line %d \n", |
| 343 | cgdev->cdev[0]->dev.bus_id,__FUNCTION__,__LINE__); | 343 | cgdev->cdev[0]->dev.bus_id,__func__,__LINE__); |
| 344 | CLAW_DBF_TEXT_(2,setup,"probex%d",rc); | 344 | CLAW_DBF_TEXT_(2,setup,"probex%d",rc); |
| 345 | return rc; | 345 | return rc; |
| 346 | } | 346 | } |
| @@ -351,7 +351,7 @@ claw_probe(struct ccwgroup_device *cgdev) | |||
| 351 | cgdev->dev.driver_data = privptr; | 351 | cgdev->dev.driver_data = privptr; |
| 352 | #ifdef FUNCTRACE | 352 | #ifdef FUNCTRACE |
| 353 | printk(KERN_INFO "claw:%s exit on line %d, " | 353 | printk(KERN_INFO "claw:%s exit on line %d, " |
| 354 | "rc = 0\n",__FUNCTION__,__LINE__); | 354 | "rc = 0\n",__func__,__LINE__); |
| 355 | #endif | 355 | #endif |
| 356 | CLAW_DBF_TEXT(2,setup,"prbext 0"); | 356 | CLAW_DBF_TEXT(2,setup,"prbext 0"); |
| 357 | 357 | ||
| @@ -371,7 +371,7 @@ claw_tx(struct sk_buff *skb, struct net_device *dev) | |||
| 371 | struct chbk *p_ch; | 371 | struct chbk *p_ch; |
| 372 | 372 | ||
| 373 | #ifdef FUNCTRACE | 373 | #ifdef FUNCTRACE |
| 374 | printk(KERN_INFO "%s:%s enter\n",dev->name,__FUNCTION__); | 374 | printk(KERN_INFO "%s:%s enter\n",dev->name,__func__); |
| 375 | #endif | 375 | #endif |
| 376 | CLAW_DBF_TEXT(4,trace,"claw_tx"); | 376 | CLAW_DBF_TEXT(4,trace,"claw_tx"); |
| 377 | p_ch=&privptr->channel[WRITE]; | 377 | p_ch=&privptr->channel[WRITE]; |
| @@ -381,7 +381,7 @@ claw_tx(struct sk_buff *skb, struct net_device *dev) | |||
| 381 | privptr->stats.tx_dropped++; | 381 | privptr->stats.tx_dropped++; |
| 382 | #ifdef FUNCTRACE | 382 | #ifdef FUNCTRACE |
| 383 | printk(KERN_INFO "%s: %s() exit on line %d, rc = EIO\n", | 383 | printk(KERN_INFO "%s: %s() exit on line %d, rc = EIO\n", |
| 384 | dev->name,__FUNCTION__, __LINE__); | 384 | dev->name,__func__, __LINE__); |
| 385 | #endif | 385 | #endif |
| 386 | CLAW_DBF_TEXT_(2,trace,"clawtx%d",-EIO); | 386 | CLAW_DBF_TEXT_(2,trace,"clawtx%d",-EIO); |
| 387 | return -EIO; | 387 | return -EIO; |
| @@ -398,7 +398,7 @@ claw_tx(struct sk_buff *skb, struct net_device *dev) | |||
| 398 | spin_unlock_irqrestore(get_ccwdev_lock(p_ch->cdev), saveflags); | 398 | spin_unlock_irqrestore(get_ccwdev_lock(p_ch->cdev), saveflags); |
| 399 | #ifdef FUNCTRACE | 399 | #ifdef FUNCTRACE |
| 400 | printk(KERN_INFO "%s:%s exit on line %d, rc = %d\n", | 400 | printk(KERN_INFO "%s:%s exit on line %d, rc = %d\n", |
| 401 | dev->name, __FUNCTION__, __LINE__, rc); | 401 | dev->name, __func__, __LINE__, rc); |
| 402 | #endif | 402 | #endif |
| 403 | CLAW_DBF_TEXT_(4,trace,"clawtx%d",rc); | 403 | CLAW_DBF_TEXT_(4,trace,"clawtx%d",rc); |
| 404 | return rc; | 404 | return rc; |
| @@ -460,7 +460,7 @@ claw_pack_skb(struct claw_privbk *privptr) | |||
| 460 | #ifdef IOTRACE | 460 | #ifdef IOTRACE |
| 461 | printk(KERN_INFO "%s: %s() Packed %d len %d\n", | 461 | printk(KERN_INFO "%s: %s() Packed %d len %d\n", |
| 462 | p_env->ndev->name, | 462 | p_env->ndev->name, |
| 463 | __FUNCTION__,pkt_cnt,new_skb->len); | 463 | __func__,pkt_cnt,new_skb->len); |
| 464 | #endif | 464 | #endif |
| 465 | } | 465 | } |
| 466 | CLAW_DBF_TEXT(4,trace,"PackSKBx"); | 466 | CLAW_DBF_TEXT(4,trace,"PackSKBx"); |
| @@ -478,7 +478,7 @@ claw_change_mtu(struct net_device *dev, int new_mtu) | |||
| 478 | struct claw_privbk *privptr=dev->priv; | 478 | struct claw_privbk *privptr=dev->priv; |
| 479 | int buff_size; | 479 | int buff_size; |
| 480 | #ifdef FUNCTRACE | 480 | #ifdef FUNCTRACE |
| 481 | printk(KERN_INFO "%s:%s Enter \n",dev->name,__FUNCTION__); | 481 | printk(KERN_INFO "%s:%s Enter \n",dev->name,__func__); |
| 482 | #endif | 482 | #endif |
| 483 | #ifdef DEBUGMSG | 483 | #ifdef DEBUGMSG |
| 484 | printk(KERN_INFO "variable dev =\n"); | 484 | printk(KERN_INFO "variable dev =\n"); |
| @@ -491,14 +491,14 @@ claw_change_mtu(struct net_device *dev, int new_mtu) | |||
| 491 | #ifdef FUNCTRACE | 491 | #ifdef FUNCTRACE |
| 492 | printk(KERN_INFO "%s:%s Exit on line %d, rc=EINVAL\n", | 492 | printk(KERN_INFO "%s:%s Exit on line %d, rc=EINVAL\n", |
| 493 | dev->name, | 493 | dev->name, |
| 494 | __FUNCTION__, __LINE__); | 494 | __func__, __LINE__); |
| 495 | #endif | 495 | #endif |
| 496 | return -EINVAL; | 496 | return -EINVAL; |
| 497 | } | 497 | } |
| 498 | dev->mtu = new_mtu; | 498 | dev->mtu = new_mtu; |
| 499 | #ifdef FUNCTRACE | 499 | #ifdef FUNCTRACE |
| 500 | printk(KERN_INFO "%s:%s Exit on line %d\n",dev->name, | 500 | printk(KERN_INFO "%s:%s Exit on line %d\n",dev->name, |
| 501 | __FUNCTION__, __LINE__); | 501 | __func__, __LINE__); |
| 502 | #endif | 502 | #endif |
| 503 | return 0; | 503 | return 0; |
| 504 | } /* end of claw_change_mtu */ | 504 | } /* end of claw_change_mtu */ |
| @@ -522,7 +522,7 @@ claw_open(struct net_device *dev) | |||
| 522 | struct ccwbk *p_buf; | 522 | struct ccwbk *p_buf; |
| 523 | 523 | ||
| 524 | #ifdef FUNCTRACE | 524 | #ifdef FUNCTRACE |
| 525 | printk(KERN_INFO "%s:%s Enter \n",dev->name,__FUNCTION__); | 525 | printk(KERN_INFO "%s:%s Enter \n",dev->name,__func__); |
| 526 | #endif | 526 | #endif |
| 527 | CLAW_DBF_TEXT(4,trace,"open"); | 527 | CLAW_DBF_TEXT(4,trace,"open"); |
| 528 | if (!dev || (dev->name[0] == 0x00)) { | 528 | if (!dev || (dev->name[0] == 0x00)) { |
| @@ -537,7 +537,7 @@ claw_open(struct net_device *dev) | |||
| 537 | if (rc) { | 537 | if (rc) { |
| 538 | printk(KERN_INFO "%s:%s Exit on line %d, rc=ENOMEM\n", | 538 | printk(KERN_INFO "%s:%s Exit on line %d, rc=ENOMEM\n", |
| 539 | dev->name, | 539 | dev->name, |
| 540 | __FUNCTION__, __LINE__); | 540 | __func__, __LINE__); |
| 541 | CLAW_DBF_TEXT(2,trace,"openmem"); | 541 | CLAW_DBF_TEXT(2,trace,"openmem"); |
| 542 | return -ENOMEM; | 542 | return -ENOMEM; |
| 543 | } | 543 | } |
| @@ -661,7 +661,7 @@ claw_open(struct net_device *dev) | |||
| 661 | claw_clear_busy(dev); | 661 | claw_clear_busy(dev); |
| 662 | #ifdef FUNCTRACE | 662 | #ifdef FUNCTRACE |
| 663 | printk(KERN_INFO "%s:%s Exit on line %d, rc=EIO\n", | 663 | printk(KERN_INFO "%s:%s Exit on line %d, rc=EIO\n", |
| 664 | dev->name,__FUNCTION__,__LINE__); | 664 | dev->name,__func__,__LINE__); |
| 665 | #endif | 665 | #endif |
| 666 | CLAW_DBF_TEXT(2,trace,"open EIO"); | 666 | CLAW_DBF_TEXT(2,trace,"open EIO"); |
| 667 | return -EIO; | 667 | return -EIO; |
| @@ -673,7 +673,7 @@ claw_open(struct net_device *dev) | |||
| 673 | 673 | ||
| 674 | #ifdef FUNCTRACE | 674 | #ifdef FUNCTRACE |
| 675 | printk(KERN_INFO "%s:%s Exit on line %d, rc=0\n", | 675 | printk(KERN_INFO "%s:%s Exit on line %d, rc=0\n", |
| 676 | dev->name,__FUNCTION__,__LINE__); | 676 | dev->name,__func__,__LINE__); |
| 677 | #endif | 677 | #endif |
| 678 | CLAW_DBF_TEXT(4,trace,"openok"); | 678 | CLAW_DBF_TEXT(4,trace,"openok"); |
| 679 | return 0; | 679 | return 0; |
| @@ -696,7 +696,7 @@ claw_irq_handler(struct ccw_device *cdev, | |||
| 696 | 696 | ||
| 697 | 697 | ||
| 698 | #ifdef FUNCTRACE | 698 | #ifdef FUNCTRACE |
| 699 | printk(KERN_INFO "%s enter \n",__FUNCTION__); | 699 | printk(KERN_INFO "%s enter \n",__func__); |
| 700 | #endif | 700 | #endif |
| 701 | CLAW_DBF_TEXT(4,trace,"clawirq"); | 701 | CLAW_DBF_TEXT(4,trace,"clawirq"); |
| 702 | /* Bypass all 'unsolicited interrupts' */ | 702 | /* Bypass all 'unsolicited interrupts' */ |
| @@ -706,7 +706,7 @@ claw_irq_handler(struct ccw_device *cdev, | |||
| 706 | cdev->dev.bus_id,irb->scsw.cstat, irb->scsw.dstat); | 706 | cdev->dev.bus_id,irb->scsw.cstat, irb->scsw.dstat); |
| 707 | #ifdef FUNCTRACE | 707 | #ifdef FUNCTRACE |
| 708 | printk(KERN_INFO "claw: %s() " | 708 | printk(KERN_INFO "claw: %s() " |
| 709 | "exit on line %d\n",__FUNCTION__,__LINE__); | 709 | "exit on line %d\n",__func__,__LINE__); |
| 710 | #endif | 710 | #endif |
| 711 | CLAW_DBF_TEXT(2,trace,"badirq"); | 711 | CLAW_DBF_TEXT(2,trace,"badirq"); |
| 712 | return; | 712 | return; |
| @@ -752,7 +752,7 @@ claw_irq_handler(struct ccw_device *cdev, | |||
| 752 | #endif | 752 | #endif |
| 753 | #ifdef FUNCTRACE | 753 | #ifdef FUNCTRACE |
| 754 | printk(KERN_INFO "%s:%s Exit on line %d\n", | 754 | printk(KERN_INFO "%s:%s Exit on line %d\n", |
| 755 | dev->name,__FUNCTION__,__LINE__); | 755 | dev->name,__func__,__LINE__); |
| 756 | #endif | 756 | #endif |
| 757 | CLAW_DBF_TEXT(2,trace,"chanchk"); | 757 | CLAW_DBF_TEXT(2,trace,"chanchk"); |
| 758 | /* return; */ | 758 | /* return; */ |
| @@ -777,7 +777,7 @@ claw_irq_handler(struct ccw_device *cdev, | |||
| 777 | (SCSW_STCTL_ALERT_STATUS | SCSW_STCTL_STATUS_PEND)))) { | 777 | (SCSW_STCTL_ALERT_STATUS | SCSW_STCTL_STATUS_PEND)))) { |
| 778 | #ifdef FUNCTRACE | 778 | #ifdef FUNCTRACE |
| 779 | printk(KERN_INFO "%s:%s Exit on line %d\n", | 779 | printk(KERN_INFO "%s:%s Exit on line %d\n", |
| 780 | dev->name,__FUNCTION__,__LINE__); | 780 | dev->name,__func__,__LINE__); |
| 781 | #endif | 781 | #endif |
| 782 | return; | 782 | return; |
| 783 | } | 783 | } |
| @@ -788,7 +788,7 @@ claw_irq_handler(struct ccw_device *cdev, | |||
| 788 | #endif | 788 | #endif |
| 789 | #ifdef FUNCTRACE | 789 | #ifdef FUNCTRACE |
| 790 | printk(KERN_INFO "%s:%s Exit on line %d\n", | 790 | printk(KERN_INFO "%s:%s Exit on line %d\n", |
| 791 | dev->name,__FUNCTION__,__LINE__); | 791 | dev->name,__func__,__LINE__); |
| 792 | #endif | 792 | #endif |
| 793 | CLAW_DBF_TEXT(4,trace,"stop"); | 793 | CLAW_DBF_TEXT(4,trace,"stop"); |
| 794 | return; | 794 | return; |
| @@ -804,7 +804,7 @@ claw_irq_handler(struct ccw_device *cdev, | |||
| 804 | (SCSW_STCTL_ALERT_STATUS | SCSW_STCTL_STATUS_PEND)))) { | 804 | (SCSW_STCTL_ALERT_STATUS | SCSW_STCTL_STATUS_PEND)))) { |
| 805 | #ifdef FUNCTRACE | 805 | #ifdef FUNCTRACE |
| 806 | printk(KERN_INFO "%s:%s Exit on line %d\n", | 806 | printk(KERN_INFO "%s:%s Exit on line %d\n", |
| 807 | dev->name,__FUNCTION__,__LINE__); | 807 | dev->name,__func__,__LINE__); |
| 808 | #endif | 808 | #endif |
| 809 | CLAW_DBF_TEXT(4,trace,"haltio"); | 809 | CLAW_DBF_TEXT(4,trace,"haltio"); |
| 810 | return; | 810 | return; |
| @@ -838,7 +838,7 @@ claw_irq_handler(struct ccw_device *cdev, | |||
| 838 | #endif | 838 | #endif |
| 839 | #ifdef FUNCTRACE | 839 | #ifdef FUNCTRACE |
| 840 | printk(KERN_INFO "%s:%s Exit on line %d\n", | 840 | printk(KERN_INFO "%s:%s Exit on line %d\n", |
| 841 | dev->name,__FUNCTION__,__LINE__); | 841 | dev->name,__func__,__LINE__); |
| 842 | #endif | 842 | #endif |
| 843 | CLAW_DBF_TEXT(4,trace,"haltio"); | 843 | CLAW_DBF_TEXT(4,trace,"haltio"); |
| 844 | return; | 844 | return; |
| @@ -858,7 +858,7 @@ claw_irq_handler(struct ccw_device *cdev, | |||
| 858 | } | 858 | } |
| 859 | #ifdef FUNCTRACE | 859 | #ifdef FUNCTRACE |
| 860 | printk(KERN_INFO "%s:%s Exit on line %d\n", | 860 | printk(KERN_INFO "%s:%s Exit on line %d\n", |
| 861 | dev->name,__FUNCTION__,__LINE__); | 861 | dev->name,__func__,__LINE__); |
| 862 | #endif | 862 | #endif |
| 863 | CLAW_DBF_TEXT(4,trace,"notrdy"); | 863 | CLAW_DBF_TEXT(4,trace,"notrdy"); |
| 864 | return; | 864 | return; |
| @@ -874,7 +874,7 @@ claw_irq_handler(struct ccw_device *cdev, | |||
| 874 | } | 874 | } |
| 875 | #ifdef FUNCTRACE | 875 | #ifdef FUNCTRACE |
| 876 | printk(KERN_INFO "%s:%s Exit on line %d\n", | 876 | printk(KERN_INFO "%s:%s Exit on line %d\n", |
| 877 | dev->name,__FUNCTION__,__LINE__); | 877 | dev->name,__func__,__LINE__); |
| 878 | #endif | 878 | #endif |
| 879 | CLAW_DBF_TEXT(4,trace,"PCI_read"); | 879 | CLAW_DBF_TEXT(4,trace,"PCI_read"); |
| 880 | return; | 880 | return; |
| @@ -885,7 +885,7 @@ claw_irq_handler(struct ccw_device *cdev, | |||
| 885 | (SCSW_STCTL_ALERT_STATUS | SCSW_STCTL_STATUS_PEND)))) { | 885 | (SCSW_STCTL_ALERT_STATUS | SCSW_STCTL_STATUS_PEND)))) { |
| 886 | #ifdef FUNCTRACE | 886 | #ifdef FUNCTRACE |
| 887 | printk(KERN_INFO "%s:%s Exit on line %d\n", | 887 | printk(KERN_INFO "%s:%s Exit on line %d\n", |
| 888 | dev->name,__FUNCTION__,__LINE__); | 888 | dev->name,__func__,__LINE__); |
| 889 | #endif | 889 | #endif |
| 890 | CLAW_DBF_TEXT(4,trace,"SPend_rd"); | 890 | CLAW_DBF_TEXT(4,trace,"SPend_rd"); |
| 891 | return; | 891 | return; |
| @@ -906,7 +906,7 @@ claw_irq_handler(struct ccw_device *cdev, | |||
| 906 | #endif | 906 | #endif |
| 907 | #ifdef FUNCTRACE | 907 | #ifdef FUNCTRACE |
| 908 | printk(KERN_INFO "%s:%s Exit on line %d\n", | 908 | printk(KERN_INFO "%s:%s Exit on line %d\n", |
| 909 | dev->name,__FUNCTION__,__LINE__); | 909 | dev->name,__func__,__LINE__); |
| 910 | #endif | 910 | #endif |
| 911 | CLAW_DBF_TEXT(4,trace,"RdIRQXit"); | 911 | CLAW_DBF_TEXT(4,trace,"RdIRQXit"); |
| 912 | return; | 912 | return; |
| @@ -929,7 +929,7 @@ claw_irq_handler(struct ccw_device *cdev, | |||
| 929 | } | 929 | } |
| 930 | #ifdef FUNCTRACE | 930 | #ifdef FUNCTRACE |
| 931 | printk(KERN_INFO "%s:%s Exit on line %d\n", | 931 | printk(KERN_INFO "%s:%s Exit on line %d\n", |
| 932 | dev->name,__FUNCTION__,__LINE__); | 932 | dev->name,__func__,__LINE__); |
| 933 | #endif | 933 | #endif |
| 934 | CLAW_DBF_TEXT(4,trace,"rstrtwrt"); | 934 | CLAW_DBF_TEXT(4,trace,"rstrtwrt"); |
| 935 | return; | 935 | return; |
| @@ -946,7 +946,7 @@ claw_irq_handler(struct ccw_device *cdev, | |||
| 946 | (SCSW_STCTL_ALERT_STATUS | SCSW_STCTL_STATUS_PEND)))) { | 946 | (SCSW_STCTL_ALERT_STATUS | SCSW_STCTL_STATUS_PEND)))) { |
| 947 | #ifdef FUNCTRACE | 947 | #ifdef FUNCTRACE |
| 948 | printk(KERN_INFO "%s:%s Exit on line %d\n", | 948 | printk(KERN_INFO "%s:%s Exit on line %d\n", |
| 949 | dev->name,__FUNCTION__,__LINE__); | 949 | dev->name,__func__,__LINE__); |
| 950 | #endif | 950 | #endif |
| 951 | CLAW_DBF_TEXT(4,trace,"writeUE"); | 951 | CLAW_DBF_TEXT(4,trace,"writeUE"); |
| 952 | return; | 952 | return; |
| @@ -969,7 +969,7 @@ claw_irq_handler(struct ccw_device *cdev, | |||
| 969 | #endif | 969 | #endif |
| 970 | #ifdef FUNCTRACE | 970 | #ifdef FUNCTRACE |
| 971 | printk(KERN_INFO "%s:%s Exit on line %d\n", | 971 | printk(KERN_INFO "%s:%s Exit on line %d\n", |
| 972 | dev->name,__FUNCTION__,__LINE__); | 972 | dev->name,__func__,__LINE__); |
| 973 | #endif | 973 | #endif |
| 974 | CLAW_DBF_TEXT(4,trace,"StWtExit"); | 974 | CLAW_DBF_TEXT(4,trace,"StWtExit"); |
| 975 | return; | 975 | return; |
| @@ -978,7 +978,7 @@ claw_irq_handler(struct ccw_device *cdev, | |||
| 978 | "state=%d\n",dev->name,p_ch->claw_state); | 978 | "state=%d\n",dev->name,p_ch->claw_state); |
| 979 | #ifdef FUNCTRACE | 979 | #ifdef FUNCTRACE |
| 980 | printk(KERN_INFO "%s:%s Exit on line %d\n", | 980 | printk(KERN_INFO "%s:%s Exit on line %d\n", |
| 981 | dev->name,__FUNCTION__,__LINE__); | 981 | dev->name,__func__,__LINE__); |
| 982 | #endif | 982 | #endif |
| 983 | CLAW_DBF_TEXT(2,trace,"badIRQ"); | 983 | CLAW_DBF_TEXT(2,trace,"badIRQ"); |
| 984 | return; | 984 | return; |
| @@ -1001,7 +1001,7 @@ claw_irq_tasklet ( unsigned long data ) | |||
| 1001 | p_ch = (struct chbk *) data; | 1001 | p_ch = (struct chbk *) data; |
| 1002 | dev = (struct net_device *)p_ch->ndev; | 1002 | dev = (struct net_device *)p_ch->ndev; |
| 1003 | #ifdef FUNCTRACE | 1003 | #ifdef FUNCTRACE |
| 1004 | printk(KERN_INFO "%s:%s Enter \n",dev->name,__FUNCTION__); | 1004 | printk(KERN_INFO "%s:%s Enter \n",dev->name,__func__); |
| 1005 | #endif | 1005 | #endif |
| 1006 | #ifdef DEBUGMSG | 1006 | #ifdef DEBUGMSG |
| 1007 | printk(KERN_INFO "%s: variable p_ch =\n",dev->name); | 1007 | printk(KERN_INFO "%s: variable p_ch =\n",dev->name); |
| @@ -1021,7 +1021,7 @@ claw_irq_tasklet ( unsigned long data ) | |||
| 1021 | CLAW_DBF_TEXT(4,trace,"TskletXt"); | 1021 | CLAW_DBF_TEXT(4,trace,"TskletXt"); |
| 1022 | #ifdef FUNCTRACE | 1022 | #ifdef FUNCTRACE |
| 1023 | printk(KERN_INFO "%s:%s Exit on line %d\n", | 1023 | printk(KERN_INFO "%s:%s Exit on line %d\n", |
| 1024 | dev->name,__FUNCTION__,__LINE__); | 1024 | dev->name,__func__,__LINE__); |
| 1025 | #endif | 1025 | #endif |
| 1026 | return; | 1026 | return; |
| 1027 | } /* end of claw_irq_bh */ | 1027 | } /* end of claw_irq_bh */ |
| @@ -1048,7 +1048,7 @@ claw_release(struct net_device *dev) | |||
| 1048 | if (!privptr) | 1048 | if (!privptr) |
| 1049 | return 0; | 1049 | return 0; |
| 1050 | #ifdef FUNCTRACE | 1050 | #ifdef FUNCTRACE |
| 1051 | printk(KERN_INFO "%s:%s Enter \n",dev->name,__FUNCTION__); | 1051 | printk(KERN_INFO "%s:%s Enter \n",dev->name,__func__); |
| 1052 | #endif | 1052 | #endif |
| 1053 | CLAW_DBF_TEXT(4,trace,"release"); | 1053 | CLAW_DBF_TEXT(4,trace,"release"); |
| 1054 | #ifdef DEBUGMSG | 1054 | #ifdef DEBUGMSG |
| @@ -1090,7 +1090,7 @@ claw_release(struct net_device *dev) | |||
| 1090 | if(privptr->buffs_alloc != 1) { | 1090 | if(privptr->buffs_alloc != 1) { |
| 1091 | #ifdef FUNCTRACE | 1091 | #ifdef FUNCTRACE |
| 1092 | printk(KERN_INFO "%s:%s Exit on line %d\n", | 1092 | printk(KERN_INFO "%s:%s Exit on line %d\n", |
| 1093 | dev->name,__FUNCTION__,__LINE__); | 1093 | dev->name,__func__,__LINE__); |
| 1094 | #endif | 1094 | #endif |
| 1095 | CLAW_DBF_TEXT(4,trace,"none2fre"); | 1095 | CLAW_DBF_TEXT(4,trace,"none2fre"); |
| 1096 | return 0; | 1096 | return 0; |
| @@ -1171,7 +1171,7 @@ claw_release(struct net_device *dev) | |||
| 1171 | } | 1171 | } |
| 1172 | #ifdef FUNCTRACE | 1172 | #ifdef FUNCTRACE |
| 1173 | printk(KERN_INFO "%s:%s Exit on line %d\n", | 1173 | printk(KERN_INFO "%s:%s Exit on line %d\n", |
| 1174 | dev->name,__FUNCTION__,__LINE__); | 1174 | dev->name,__func__,__LINE__); |
| 1175 | #endif | 1175 | #endif |
| 1176 | CLAW_DBF_TEXT(4,trace,"rlsexit"); | 1176 | CLAW_DBF_TEXT(4,trace,"rlsexit"); |
| 1177 | return 0; | 1177 | return 0; |
| @@ -1192,7 +1192,7 @@ claw_write_retry ( struct chbk *p_ch ) | |||
| 1192 | 1192 | ||
| 1193 | 1193 | ||
| 1194 | #ifdef FUNCTRACE | 1194 | #ifdef FUNCTRACE |
| 1195 | printk(KERN_INFO "%s:%s Enter\n",dev->name,__FUNCTION__); | 1195 | printk(KERN_INFO "%s:%s Enter\n",dev->name,__func__); |
| 1196 | printk(KERN_INFO "claw: variable p_ch =\n"); | 1196 | printk(KERN_INFO "claw: variable p_ch =\n"); |
| 1197 | dumpit((char *) p_ch, sizeof(struct chbk)); | 1197 | dumpit((char *) p_ch, sizeof(struct chbk)); |
| 1198 | #endif | 1198 | #endif |
| @@ -1200,20 +1200,20 @@ claw_write_retry ( struct chbk *p_ch ) | |||
| 1200 | if (p_ch->claw_state == CLAW_STOP) { | 1200 | if (p_ch->claw_state == CLAW_STOP) { |
| 1201 | #ifdef FUNCTRACE | 1201 | #ifdef FUNCTRACE |
| 1202 | printk(KERN_INFO "%s:%s Exit on line %d\n", | 1202 | printk(KERN_INFO "%s:%s Exit on line %d\n", |
| 1203 | dev->name,__FUNCTION__,__LINE__); | 1203 | dev->name,__func__,__LINE__); |
| 1204 | #endif | 1204 | #endif |
| 1205 | return; | 1205 | return; |
| 1206 | } | 1206 | } |
| 1207 | #ifdef DEBUGMSG | 1207 | #ifdef DEBUGMSG |
| 1208 | printk( KERN_INFO "%s:%s state-%02x\n" , | 1208 | printk( KERN_INFO "%s:%s state-%02x\n" , |
| 1209 | dev->name, | 1209 | dev->name, |
| 1210 | __FUNCTION__, | 1210 | __func__, |
| 1211 | p_ch->claw_state); | 1211 | p_ch->claw_state); |
| 1212 | #endif | 1212 | #endif |
| 1213 | claw_strt_out_IO( dev ); | 1213 | claw_strt_out_IO( dev ); |
| 1214 | #ifdef FUNCTRACE | 1214 | #ifdef FUNCTRACE |
| 1215 | printk(KERN_INFO "%s:%s Exit on line %d\n", | 1215 | printk(KERN_INFO "%s:%s Exit on line %d\n", |
| 1216 | dev->name,__FUNCTION__,__LINE__); | 1216 | dev->name,__func__,__LINE__); |
| 1217 | #endif | 1217 | #endif |
| 1218 | CLAW_DBF_TEXT(4,trace,"rtry_xit"); | 1218 | CLAW_DBF_TEXT(4,trace,"rtry_xit"); |
| 1219 | return; | 1219 | return; |
| @@ -1235,7 +1235,7 @@ claw_write_next ( struct chbk * p_ch ) | |||
| 1235 | int rc; | 1235 | int rc; |
| 1236 | 1236 | ||
| 1237 | #ifdef FUNCTRACE | 1237 | #ifdef FUNCTRACE |
| 1238 | printk(KERN_INFO "%s:%s Enter \n",p_ch->ndev->name,__FUNCTION__); | 1238 | printk(KERN_INFO "%s:%s Enter \n",p_ch->ndev->name,__func__); |
| 1239 | printk(KERN_INFO "%s: variable p_ch =\n",p_ch->ndev->name); | 1239 | printk(KERN_INFO "%s: variable p_ch =\n",p_ch->ndev->name); |
| 1240 | dumpit((char *) p_ch, sizeof(struct chbk)); | 1240 | dumpit((char *) p_ch, sizeof(struct chbk)); |
| 1241 | #endif | 1241 | #endif |
| @@ -1262,7 +1262,7 @@ claw_write_next ( struct chbk * p_ch ) | |||
| 1262 | 1262 | ||
| 1263 | #ifdef FUNCTRACE | 1263 | #ifdef FUNCTRACE |
| 1264 | printk(KERN_INFO "%s:%s Exit on line %d\n", | 1264 | printk(KERN_INFO "%s:%s Exit on line %d\n", |
| 1265 | dev->name,__FUNCTION__,__LINE__); | 1265 | dev->name,__func__,__LINE__); |
| 1266 | #endif | 1266 | #endif |
| 1267 | return; | 1267 | return; |
| 1268 | } /* end of claw_write_next */ | 1268 | } /* end of claw_write_next */ |
| @@ -1276,7 +1276,7 @@ static void | |||
| 1276 | claw_timer ( struct chbk * p_ch ) | 1276 | claw_timer ( struct chbk * p_ch ) |
| 1277 | { | 1277 | { |
| 1278 | #ifdef FUNCTRACE | 1278 | #ifdef FUNCTRACE |
| 1279 | printk(KERN_INFO "%s:%s Entry\n",p_ch->ndev->name,__FUNCTION__); | 1279 | printk(KERN_INFO "%s:%s Entry\n",p_ch->ndev->name,__func__); |
| 1280 | printk(KERN_INFO "%s: variable p_ch =\n",p_ch->ndev->name); | 1280 | printk(KERN_INFO "%s: variable p_ch =\n",p_ch->ndev->name); |
| 1281 | dumpit((char *) p_ch, sizeof(struct chbk)); | 1281 | dumpit((char *) p_ch, sizeof(struct chbk)); |
| 1282 | #endif | 1282 | #endif |
| @@ -1285,7 +1285,7 @@ claw_timer ( struct chbk * p_ch ) | |||
| 1285 | wake_up(&p_ch->wait); | 1285 | wake_up(&p_ch->wait); |
| 1286 | #ifdef FUNCTRACE | 1286 | #ifdef FUNCTRACE |
| 1287 | printk(KERN_INFO "%s:%s Exit on line %d\n", | 1287 | printk(KERN_INFO "%s:%s Exit on line %d\n", |
| 1288 | p_ch->ndev->name,__FUNCTION__,__LINE__); | 1288 | p_ch->ndev->name,__func__,__LINE__); |
| 1289 | #endif | 1289 | #endif |
| 1290 | return; | 1290 | return; |
| 1291 | } /* end of claw_timer */ | 1291 | } /* end of claw_timer */ |
| @@ -1312,7 +1312,7 @@ pages_to_order_of_mag(int num_of_pages) | |||
| 1312 | int order_of_mag=1; /* assume 2 pages */ | 1312 | int order_of_mag=1; /* assume 2 pages */ |
| 1313 | int nump=2; | 1313 | int nump=2; |
| 1314 | #ifdef FUNCTRACE | 1314 | #ifdef FUNCTRACE |
| 1315 | printk(KERN_INFO "%s Enter pages = %d \n",__FUNCTION__,num_of_pages); | 1315 | printk(KERN_INFO "%s Enter pages = %d \n",__func__,num_of_pages); |
| 1316 | #endif | 1316 | #endif |
| 1317 | CLAW_DBF_TEXT_(5,trace,"pages%d",num_of_pages); | 1317 | CLAW_DBF_TEXT_(5,trace,"pages%d",num_of_pages); |
| 1318 | if (num_of_pages == 1) {return 0; } /* magnitude of 0 = 1 page */ | 1318 | if (num_of_pages == 1) {return 0; } /* magnitude of 0 = 1 page */ |
| @@ -1327,7 +1327,7 @@ pages_to_order_of_mag(int num_of_pages) | |||
| 1327 | if (order_of_mag > 9) { order_of_mag = 9; } /* I know it's paranoid */ | 1327 | if (order_of_mag > 9) { order_of_mag = 9; } /* I know it's paranoid */ |
| 1328 | #ifdef FUNCTRACE | 1328 | #ifdef FUNCTRACE |
| 1329 | printk(KERN_INFO "%s Exit on line %d, order = %d\n", | 1329 | printk(KERN_INFO "%s Exit on line %d, order = %d\n", |
| 1330 | __FUNCTION__,__LINE__, order_of_mag); | 1330 | __func__,__LINE__, order_of_mag); |
| 1331 | #endif | 1331 | #endif |
| 1332 | CLAW_DBF_TEXT_(5,trace,"mag%d",order_of_mag); | 1332 | CLAW_DBF_TEXT_(5,trace,"mag%d",order_of_mag); |
| 1333 | return order_of_mag; | 1333 | return order_of_mag; |
| @@ -1349,7 +1349,7 @@ add_claw_reads(struct net_device *dev, struct ccwbk* p_first, | |||
| 1349 | struct ccwbk* p_buf; | 1349 | struct ccwbk* p_buf; |
| 1350 | #endif | 1350 | #endif |
| 1351 | #ifdef FUNCTRACE | 1351 | #ifdef FUNCTRACE |
| 1352 | printk(KERN_INFO "%s:%s Enter \n",dev->name,__FUNCTION__); | 1352 | printk(KERN_INFO "%s:%s Enter \n",dev->name,__func__); |
| 1353 | #endif | 1353 | #endif |
| 1354 | #ifdef DEBUGMSG | 1354 | #ifdef DEBUGMSG |
| 1355 | printk(KERN_INFO "dev\n"); | 1355 | printk(KERN_INFO "dev\n"); |
| @@ -1369,7 +1369,7 @@ add_claw_reads(struct net_device *dev, struct ccwbk* p_first, | |||
| 1369 | if ( p_first==NULL) { | 1369 | if ( p_first==NULL) { |
| 1370 | #ifdef FUNCTRACE | 1370 | #ifdef FUNCTRACE |
| 1371 | printk(KERN_INFO "%s:%s Exit on line %d\n", | 1371 | printk(KERN_INFO "%s:%s Exit on line %d\n", |
| 1372 | dev->name,__FUNCTION__,__LINE__); | 1372 | dev->name,__func__,__LINE__); |
| 1373 | #endif | 1373 | #endif |
| 1374 | CLAW_DBF_TEXT(4,trace,"addexit"); | 1374 | CLAW_DBF_TEXT(4,trace,"addexit"); |
| 1375 | return 0; | 1375 | return 0; |
| @@ -1400,9 +1400,9 @@ add_claw_reads(struct net_device *dev, struct ccwbk* p_first, | |||
| 1400 | if ( privptr-> p_read_active_first ==NULL ) { | 1400 | if ( privptr-> p_read_active_first ==NULL ) { |
| 1401 | #ifdef DEBUGMSG | 1401 | #ifdef DEBUGMSG |
| 1402 | printk(KERN_INFO "%s:%s p_read_active_first == NULL \n", | 1402 | printk(KERN_INFO "%s:%s p_read_active_first == NULL \n", |
| 1403 | dev->name,__FUNCTION__); | 1403 | dev->name,__func__); |
| 1404 | printk(KERN_INFO "%s:%s Read active first/last changed \n", | 1404 | printk(KERN_INFO "%s:%s Read active first/last changed \n", |
| 1405 | dev->name,__FUNCTION__); | 1405 | dev->name,__func__); |
| 1406 | #endif | 1406 | #endif |
| 1407 | privptr-> p_read_active_first= p_first; /* set new first */ | 1407 | privptr-> p_read_active_first= p_first; /* set new first */ |
| 1408 | privptr-> p_read_active_last = p_last; /* set new last */ | 1408 | privptr-> p_read_active_last = p_last; /* set new last */ |
| @@ -1411,7 +1411,7 @@ add_claw_reads(struct net_device *dev, struct ccwbk* p_first, | |||
| 1411 | 1411 | ||
| 1412 | #ifdef DEBUGMSG | 1412 | #ifdef DEBUGMSG |
| 1413 | printk(KERN_INFO "%s:%s Read in progress \n", | 1413 | printk(KERN_INFO "%s:%s Read in progress \n", |
| 1414 | dev->name,__FUNCTION__); | 1414 | dev->name,__func__); |
| 1415 | #endif | 1415 | #endif |
| 1416 | /* set up TIC ccw */ | 1416 | /* set up TIC ccw */ |
| 1417 | temp_ccw.cda= (__u32)__pa(&p_first->read); | 1417 | temp_ccw.cda= (__u32)__pa(&p_first->read); |
| @@ -1450,15 +1450,15 @@ add_claw_reads(struct net_device *dev, struct ccwbk* p_first, | |||
| 1450 | privptr->p_read_active_last=p_last; | 1450 | privptr->p_read_active_last=p_last; |
| 1451 | } /* end of if ( privptr-> p_read_active_first ==NULL) */ | 1451 | } /* end of if ( privptr-> p_read_active_first ==NULL) */ |
| 1452 | #ifdef IOTRACE | 1452 | #ifdef IOTRACE |
| 1453 | printk(KERN_INFO "%s:%s dump p_last CCW BK \n",dev->name,__FUNCTION__); | 1453 | printk(KERN_INFO "%s:%s dump p_last CCW BK \n",dev->name,__func__); |
| 1454 | dumpit((char *)p_last, sizeof(struct ccwbk)); | 1454 | dumpit((char *)p_last, sizeof(struct ccwbk)); |
| 1455 | printk(KERN_INFO "%s:%s dump p_end CCW BK \n",dev->name,__FUNCTION__); | 1455 | printk(KERN_INFO "%s:%s dump p_end CCW BK \n",dev->name,__func__); |
| 1456 | dumpit((char *)p_end, sizeof(struct endccw)); | 1456 | dumpit((char *)p_end, sizeof(struct endccw)); |
| 1457 | 1457 | ||
| 1458 | printk(KERN_INFO "%s:%s dump p_first CCW BK \n",dev->name,__FUNCTION__); | 1458 | printk(KERN_INFO "%s:%s dump p_first CCW BK \n",dev->name,__func__); |
| 1459 | dumpit((char *)p_first, sizeof(struct ccwbk)); | 1459 | dumpit((char *)p_first, sizeof(struct ccwbk)); |
| 1460 | printk(KERN_INFO "%s:%s Dump Active CCW chain \n", | 1460 | printk(KERN_INFO "%s:%s Dump Active CCW chain \n", |
| 1461 | dev->name,__FUNCTION__); | 1461 | dev->name,__func__); |
| 1462 | p_buf=privptr->p_read_active_first; | 1462 | p_buf=privptr->p_read_active_first; |
| 1463 | while (p_buf!=NULL) { | 1463 | while (p_buf!=NULL) { |
| 1464 | dumpit((char *)p_buf, sizeof(struct ccwbk)); | 1464 | dumpit((char *)p_buf, sizeof(struct ccwbk)); |
| @@ -1467,7 +1467,7 @@ add_claw_reads(struct net_device *dev, struct ccwbk* p_first, | |||
| 1467 | #endif | 1467 | #endif |
| 1468 | #ifdef FUNCTRACE | 1468 | #ifdef FUNCTRACE |
| 1469 | printk(KERN_INFO "%s:%s Exit on line %d\n", | 1469 | printk(KERN_INFO "%s:%s Exit on line %d\n", |
| 1470 | dev->name,__FUNCTION__,__LINE__); | 1470 | dev->name,__func__,__LINE__); |
| 1471 | #endif | 1471 | #endif |
| 1472 | CLAW_DBF_TEXT(4,trace,"addexit"); | 1472 | CLAW_DBF_TEXT(4,trace,"addexit"); |
| 1473 | return 0; | 1473 | return 0; |
| @@ -1483,7 +1483,7 @@ ccw_check_return_code(struct ccw_device *cdev, int return_code) | |||
| 1483 | { | 1483 | { |
| 1484 | #ifdef FUNCTRACE | 1484 | #ifdef FUNCTRACE |
| 1485 | printk(KERN_INFO "%s: %s() > enter \n", | 1485 | printk(KERN_INFO "%s: %s() > enter \n", |
| 1486 | cdev->dev.bus_id,__FUNCTION__); | 1486 | cdev->dev.bus_id,__func__); |
| 1487 | #endif | 1487 | #endif |
| 1488 | CLAW_DBF_TEXT(4,trace,"ccwret"); | 1488 | CLAW_DBF_TEXT(4,trace,"ccwret"); |
| 1489 | #ifdef DEBUGMSG | 1489 | #ifdef DEBUGMSG |
| @@ -1516,7 +1516,7 @@ ccw_check_return_code(struct ccw_device *cdev, int return_code) | |||
| 1516 | } | 1516 | } |
| 1517 | #ifdef FUNCTRACE | 1517 | #ifdef FUNCTRACE |
| 1518 | printk(KERN_INFO "%s: %s() > exit on line %d\n", | 1518 | printk(KERN_INFO "%s: %s() > exit on line %d\n", |
| 1519 | cdev->dev.bus_id,__FUNCTION__,__LINE__); | 1519 | cdev->dev.bus_id,__func__,__LINE__); |
| 1520 | #endif | 1520 | #endif |
| 1521 | CLAW_DBF_TEXT(4,trace,"ccwret"); | 1521 | CLAW_DBF_TEXT(4,trace,"ccwret"); |
| 1522 | } /* end of ccw_check_return_code */ | 1522 | } /* end of ccw_check_return_code */ |
| @@ -1531,7 +1531,7 @@ ccw_check_unit_check(struct chbk * p_ch, unsigned char sense ) | |||
| 1531 | struct net_device *dev = p_ch->ndev; | 1531 | struct net_device *dev = p_ch->ndev; |
| 1532 | 1532 | ||
| 1533 | #ifdef FUNCTRACE | 1533 | #ifdef FUNCTRACE |
| 1534 | printk(KERN_INFO "%s: %s() > enter\n",dev->name,__FUNCTION__); | 1534 | printk(KERN_INFO "%s: %s() > enter\n",dev->name,__func__); |
| 1535 | #endif | 1535 | #endif |
| 1536 | #ifdef DEBUGMSG | 1536 | #ifdef DEBUGMSG |
| 1537 | printk(KERN_INFO "%s: variable dev =\n",dev->name); | 1537 | printk(KERN_INFO "%s: variable dev =\n",dev->name); |
| @@ -1578,7 +1578,7 @@ ccw_check_unit_check(struct chbk * p_ch, unsigned char sense ) | |||
| 1578 | 1578 | ||
| 1579 | #ifdef FUNCTRACE | 1579 | #ifdef FUNCTRACE |
| 1580 | printk(KERN_INFO "%s: %s() exit on line %d\n", | 1580 | printk(KERN_INFO "%s: %s() exit on line %d\n", |
| 1581 | dev->name,__FUNCTION__,__LINE__); | 1581 | dev->name,__func__,__LINE__); |
| 1582 | #endif | 1582 | #endif |
| 1583 | } /* end of ccw_check_unit_check */ | 1583 | } /* end of ccw_check_unit_check */ |
| 1584 | 1584 | ||
| @@ -1706,7 +1706,7 @@ find_link(struct net_device *dev, char *host_name, char *ws_name ) | |||
| 1706 | int rc=0; | 1706 | int rc=0; |
| 1707 | 1707 | ||
| 1708 | #ifdef FUNCTRACE | 1708 | #ifdef FUNCTRACE |
| 1709 | printk(KERN_INFO "%s:%s > enter \n",dev->name,__FUNCTION__); | 1709 | printk(KERN_INFO "%s:%s > enter \n",dev->name,__func__); |
| 1710 | #endif | 1710 | #endif |
| 1711 | CLAW_DBF_TEXT(2,setup,"findlink"); | 1711 | CLAW_DBF_TEXT(2,setup,"findlink"); |
| 1712 | #ifdef DEBUGMSG | 1712 | #ifdef DEBUGMSG |
| @@ -1739,7 +1739,7 @@ find_link(struct net_device *dev, char *host_name, char *ws_name ) | |||
| 1739 | 1739 | ||
| 1740 | #ifdef FUNCTRACE | 1740 | #ifdef FUNCTRACE |
| 1741 | printk(KERN_INFO "%s:%s Exit on line %d\n", | 1741 | printk(KERN_INFO "%s:%s Exit on line %d\n", |
| 1742 | dev->name,__FUNCTION__,__LINE__); | 1742 | dev->name,__func__,__LINE__); |
| 1743 | #endif | 1743 | #endif |
| 1744 | return 0; | 1744 | return 0; |
| 1745 | } /* end of find_link */ | 1745 | } /* end of find_link */ |
| @@ -1773,7 +1773,7 @@ claw_hw_tx(struct sk_buff *skb, struct net_device *dev, long linkid) | |||
| 1773 | struct ccwbk *p_buf; | 1773 | struct ccwbk *p_buf; |
| 1774 | #endif | 1774 | #endif |
| 1775 | #ifdef FUNCTRACE | 1775 | #ifdef FUNCTRACE |
| 1776 | printk(KERN_INFO "%s: %s() > enter\n",dev->name,__FUNCTION__); | 1776 | printk(KERN_INFO "%s: %s() > enter\n",dev->name,__func__); |
| 1777 | #endif | 1777 | #endif |
| 1778 | CLAW_DBF_TEXT(4,trace,"hw_tx"); | 1778 | CLAW_DBF_TEXT(4,trace,"hw_tx"); |
| 1779 | #ifdef DEBUGMSG | 1779 | #ifdef DEBUGMSG |
| @@ -1787,7 +1787,7 @@ claw_hw_tx(struct sk_buff *skb, struct net_device *dev, long linkid) | |||
| 1787 | p_ch=(struct chbk *)&privptr->channel[WRITE]; | 1787 | p_ch=(struct chbk *)&privptr->channel[WRITE]; |
| 1788 | p_env =privptr->p_env; | 1788 | p_env =privptr->p_env; |
| 1789 | #ifdef IOTRACE | 1789 | #ifdef IOTRACE |
| 1790 | printk(KERN_INFO "%s: %s() dump sk_buff \n",dev->name,__FUNCTION__); | 1790 | printk(KERN_INFO "%s: %s() dump sk_buff \n",dev->name,__func__); |
| 1791 | dumpit((char *)skb ,sizeof(struct sk_buff)); | 1791 | dumpit((char *)skb ,sizeof(struct sk_buff)); |
| 1792 | #endif | 1792 | #endif |
| 1793 | claw_free_wrt_buf(dev); /* Clean up free chain if posible */ | 1793 | claw_free_wrt_buf(dev); /* Clean up free chain if posible */ |
| @@ -1877,7 +1877,7 @@ claw_hw_tx(struct sk_buff *skb, struct net_device *dev, long linkid) | |||
| 1877 | while (len_of_data > 0) { | 1877 | while (len_of_data > 0) { |
| 1878 | #ifdef DEBUGMSG | 1878 | #ifdef DEBUGMSG |
| 1879 | printk(KERN_INFO "%s: %s() length-of-data is %ld \n", | 1879 | printk(KERN_INFO "%s: %s() length-of-data is %ld \n", |
| 1880 | dev->name ,__FUNCTION__,len_of_data); | 1880 | dev->name ,__func__,len_of_data); |
| 1881 | dumpit((char *)pDataAddress ,64); | 1881 | dumpit((char *)pDataAddress ,64); |
| 1882 | #endif | 1882 | #endif |
| 1883 | p_this_ccw=privptr->p_write_free_chain; /* get a block */ | 1883 | p_this_ccw=privptr->p_write_free_chain; /* get a block */ |
| @@ -1913,7 +1913,7 @@ claw_hw_tx(struct sk_buff *skb, struct net_device *dev, long linkid) | |||
| 1913 | p_last_ccw=p_this_ccw; /* save new last block */ | 1913 | p_last_ccw=p_this_ccw; /* save new last block */ |
| 1914 | #ifdef IOTRACE | 1914 | #ifdef IOTRACE |
| 1915 | printk(KERN_INFO "%s: %s() > CCW and Buffer %ld bytes long \n", | 1915 | printk(KERN_INFO "%s: %s() > CCW and Buffer %ld bytes long \n", |
| 1916 | dev->name,__FUNCTION__,bytesInThisBuffer); | 1916 | dev->name,__func__,bytesInThisBuffer); |
| 1917 | dumpit((char *)p_this_ccw, sizeof(struct ccwbk)); | 1917 | dumpit((char *)p_this_ccw, sizeof(struct ccwbk)); |
| 1918 | dumpit((char *)p_this_ccw->p_buffer, 64); | 1918 | dumpit((char *)p_this_ccw->p_buffer, 64); |
| 1919 | #endif | 1919 | #endif |
| @@ -1998,7 +1998,7 @@ claw_hw_tx(struct sk_buff *skb, struct net_device *dev, long linkid) | |||
| 1998 | 1998 | ||
| 1999 | #ifdef IOTRACE | 1999 | #ifdef IOTRACE |
| 2000 | printk(KERN_INFO "%s: %s() > Dump Active CCW chain \n", | 2000 | printk(KERN_INFO "%s: %s() > Dump Active CCW chain \n", |
| 2001 | dev->name,__FUNCTION__); | 2001 | dev->name,__func__); |
| 2002 | p_buf=privptr->p_write_active_first; | 2002 | p_buf=privptr->p_write_active_first; |
| 2003 | while (p_buf!=NULL) { | 2003 | while (p_buf!=NULL) { |
| 2004 | dumpit((char *)p_buf, sizeof(struct ccwbk)); | 2004 | dumpit((char *)p_buf, sizeof(struct ccwbk)); |
| @@ -2018,7 +2018,7 @@ claw_hw_tx(struct sk_buff *skb, struct net_device *dev, long linkid) | |||
| 2018 | /* if write free count is zero , set NOBUFFER */ | 2018 | /* if write free count is zero , set NOBUFFER */ |
| 2019 | #ifdef DEBUGMSG | 2019 | #ifdef DEBUGMSG |
| 2020 | printk(KERN_INFO "%s: %s() > free_count is %d\n", | 2020 | printk(KERN_INFO "%s: %s() > free_count is %d\n", |
| 2021 | dev->name,__FUNCTION__, | 2021 | dev->name,__func__, |
| 2022 | (int) privptr->write_free_count ); | 2022 | (int) privptr->write_free_count ); |
| 2023 | #endif | 2023 | #endif |
| 2024 | if (privptr->write_free_count==0) { | 2024 | if (privptr->write_free_count==0) { |
| @@ -2029,7 +2029,7 @@ Done2: | |||
| 2029 | Done: | 2029 | Done: |
| 2030 | #ifdef FUNCTRACE | 2030 | #ifdef FUNCTRACE |
| 2031 | printk(KERN_INFO "%s: %s() > exit on line %d, rc = %d \n", | 2031 | printk(KERN_INFO "%s: %s() > exit on line %d, rc = %d \n", |
| 2032 | dev->name,__FUNCTION__,__LINE__, rc); | 2032 | dev->name,__func__,__LINE__, rc); |
| 2033 | #endif | 2033 | #endif |
| 2034 | return(rc); | 2034 | return(rc); |
| 2035 | } /* end of claw_hw_tx */ | 2035 | } /* end of claw_hw_tx */ |
| @@ -2063,7 +2063,7 @@ init_ccw_bk(struct net_device *dev) | |||
| 2063 | addr_t real_TIC_address; | 2063 | addr_t real_TIC_address; |
| 2064 | int i,j; | 2064 | int i,j; |
| 2065 | #ifdef FUNCTRACE | 2065 | #ifdef FUNCTRACE |
| 2066 | printk(KERN_INFO "%s: %s() enter \n",dev->name,__FUNCTION__); | 2066 | printk(KERN_INFO "%s: %s() enter \n",dev->name,__func__); |
| 2067 | #endif | 2067 | #endif |
| 2068 | CLAW_DBF_TEXT(4,trace,"init_ccw"); | 2068 | CLAW_DBF_TEXT(4,trace,"init_ccw"); |
| 2069 | #ifdef DEBUGMSG | 2069 | #ifdef DEBUGMSG |
| @@ -2097,15 +2097,15 @@ init_ccw_bk(struct net_device *dev) | |||
| 2097 | #ifdef DEBUGMSG | 2097 | #ifdef DEBUGMSG |
| 2098 | printk(KERN_INFO "%s: %s() " | 2098 | printk(KERN_INFO "%s: %s() " |
| 2099 | "ccw_blocks_required=%d\n", | 2099 | "ccw_blocks_required=%d\n", |
| 2100 | dev->name,__FUNCTION__, | 2100 | dev->name,__func__, |
| 2101 | ccw_blocks_required); | 2101 | ccw_blocks_required); |
| 2102 | printk(KERN_INFO "%s: %s() " | 2102 | printk(KERN_INFO "%s: %s() " |
| 2103 | "PAGE_SIZE=0x%x\n", | 2103 | "PAGE_SIZE=0x%x\n", |
| 2104 | dev->name,__FUNCTION__, | 2104 | dev->name,__func__, |
| 2105 | (unsigned int)PAGE_SIZE); | 2105 | (unsigned int)PAGE_SIZE); |
| 2106 | printk(KERN_INFO "%s: %s() > " | 2106 | printk(KERN_INFO "%s: %s() > " |
| 2107 | "PAGE_MASK=0x%x\n", | 2107 | "PAGE_MASK=0x%x\n", |
| 2108 | dev->name,__FUNCTION__, | 2108 | dev->name,__func__, |
| 2109 | (unsigned int)PAGE_MASK); | 2109 | (unsigned int)PAGE_MASK); |
| 2110 | #endif | 2110 | #endif |
| 2111 | /* | 2111 | /* |
| @@ -2117,10 +2117,10 @@ init_ccw_bk(struct net_device *dev) | |||
| 2117 | 2117 | ||
| 2118 | #ifdef DEBUGMSG | 2118 | #ifdef DEBUGMSG |
| 2119 | printk(KERN_INFO "%s: %s() > ccw_blocks_perpage=%d\n", | 2119 | printk(KERN_INFO "%s: %s() > ccw_blocks_perpage=%d\n", |
| 2120 | dev->name,__FUNCTION__, | 2120 | dev->name,__func__, |
| 2121 | ccw_blocks_perpage); | 2121 | ccw_blocks_perpage); |
| 2122 | printk(KERN_INFO "%s: %s() > ccw_pages_required=%d\n", | 2122 | printk(KERN_INFO "%s: %s() > ccw_pages_required=%d\n", |
| 2123 | dev->name,__FUNCTION__, | 2123 | dev->name,__func__, |
| 2124 | ccw_pages_required); | 2124 | ccw_pages_required); |
| 2125 | #endif | 2125 | #endif |
| 2126 | /* | 2126 | /* |
| @@ -2156,29 +2156,29 @@ init_ccw_bk(struct net_device *dev) | |||
| 2156 | #ifdef DEBUGMSG | 2156 | #ifdef DEBUGMSG |
| 2157 | if (privptr->p_env->read_size < PAGE_SIZE) { | 2157 | if (privptr->p_env->read_size < PAGE_SIZE) { |
| 2158 | printk(KERN_INFO "%s: %s() reads_perpage=%d\n", | 2158 | printk(KERN_INFO "%s: %s() reads_perpage=%d\n", |
| 2159 | dev->name,__FUNCTION__, | 2159 | dev->name,__func__, |
| 2160 | claw_reads_perpage); | 2160 | claw_reads_perpage); |
| 2161 | } | 2161 | } |
| 2162 | else { | 2162 | else { |
| 2163 | printk(KERN_INFO "%s: %s() pages_perread=%d\n", | 2163 | printk(KERN_INFO "%s: %s() pages_perread=%d\n", |
| 2164 | dev->name,__FUNCTION__, | 2164 | dev->name,__func__, |
| 2165 | privptr->p_buff_pages_perread); | 2165 | privptr->p_buff_pages_perread); |
| 2166 | } | 2166 | } |
| 2167 | printk(KERN_INFO "%s: %s() read_pages=%d\n", | 2167 | printk(KERN_INFO "%s: %s() read_pages=%d\n", |
| 2168 | dev->name,__FUNCTION__, | 2168 | dev->name,__func__, |
| 2169 | claw_read_pages); | 2169 | claw_read_pages); |
| 2170 | if (privptr->p_env->write_size < PAGE_SIZE) { | 2170 | if (privptr->p_env->write_size < PAGE_SIZE) { |
| 2171 | printk(KERN_INFO "%s: %s() writes_perpage=%d\n", | 2171 | printk(KERN_INFO "%s: %s() writes_perpage=%d\n", |
| 2172 | dev->name,__FUNCTION__, | 2172 | dev->name,__func__, |
| 2173 | claw_writes_perpage); | 2173 | claw_writes_perpage); |
| 2174 | } | 2174 | } |
| 2175 | else { | 2175 | else { |
| 2176 | printk(KERN_INFO "%s: %s() pages_perwrite=%d\n", | 2176 | printk(KERN_INFO "%s: %s() pages_perwrite=%d\n", |
| 2177 | dev->name,__FUNCTION__, | 2177 | dev->name,__func__, |
| 2178 | privptr->p_buff_pages_perwrite); | 2178 | privptr->p_buff_pages_perwrite); |
| 2179 | } | 2179 | } |
| 2180 | printk(KERN_INFO "%s: %s() write_pages=%d\n", | 2180 | printk(KERN_INFO "%s: %s() write_pages=%d\n", |
| 2181 | dev->name,__FUNCTION__, | 2181 | dev->name,__func__, |
| 2182 | claw_write_pages); | 2182 | claw_write_pages); |
| 2183 | #endif | 2183 | #endif |
| 2184 | 2184 | ||
| @@ -2194,12 +2194,12 @@ init_ccw_bk(struct net_device *dev) | |||
| 2194 | printk(KERN_INFO "%s: %s() " | 2194 | printk(KERN_INFO "%s: %s() " |
| 2195 | "__get_free_pages for CCWs failed : " | 2195 | "__get_free_pages for CCWs failed : " |
| 2196 | "pages is %d\n", | 2196 | "pages is %d\n", |
| 2197 | dev->name,__FUNCTION__, | 2197 | dev->name,__func__, |
| 2198 | ccw_pages_required ); | 2198 | ccw_pages_required ); |
| 2199 | #ifdef FUNCTRACE | 2199 | #ifdef FUNCTRACE |
| 2200 | printk(KERN_INFO "%s: %s() > " | 2200 | printk(KERN_INFO "%s: %s() > " |
| 2201 | "exit on line %d, rc = ENOMEM\n", | 2201 | "exit on line %d, rc = ENOMEM\n", |
| 2202 | dev->name,__FUNCTION__, | 2202 | dev->name,__func__, |
| 2203 | __LINE__); | 2203 | __LINE__); |
| 2204 | #endif | 2204 | #endif |
| 2205 | return -ENOMEM; | 2205 | return -ENOMEM; |
| @@ -2218,7 +2218,7 @@ init_ccw_bk(struct net_device *dev) | |||
| 2218 | /* Initialize ending CCW block */ | 2218 | /* Initialize ending CCW block */ |
| 2219 | #ifdef DEBUGMSG | 2219 | #ifdef DEBUGMSG |
| 2220 | printk(KERN_INFO "%s: %s() begin initialize ending CCW blocks\n", | 2220 | printk(KERN_INFO "%s: %s() begin initialize ending CCW blocks\n", |
| 2221 | dev->name,__FUNCTION__); | 2221 | dev->name,__func__); |
| 2222 | #endif | 2222 | #endif |
| 2223 | 2223 | ||
| 2224 | p_endccw=privptr->p_end_ccw; | 2224 | p_endccw=privptr->p_end_ccw; |
| @@ -2276,7 +2276,7 @@ init_ccw_bk(struct net_device *dev) | |||
| 2276 | 2276 | ||
| 2277 | #ifdef IOTRACE | 2277 | #ifdef IOTRACE |
| 2278 | printk(KERN_INFO "%s: %s() dump claw ending CCW BK \n", | 2278 | printk(KERN_INFO "%s: %s() dump claw ending CCW BK \n", |
| 2279 | dev->name,__FUNCTION__); | 2279 | dev->name,__func__); |
| 2280 | dumpit((char *)p_endccw, sizeof(struct endccw)); | 2280 | dumpit((char *)p_endccw, sizeof(struct endccw)); |
| 2281 | #endif | 2281 | #endif |
| 2282 | 2282 | ||
| @@ -2287,7 +2287,7 @@ init_ccw_bk(struct net_device *dev) | |||
| 2287 | 2287 | ||
| 2288 | #ifdef DEBUGMSG | 2288 | #ifdef DEBUGMSG |
| 2289 | printk(KERN_INFO "%s: %s() Begin build a chain of CCW buffer \n", | 2289 | printk(KERN_INFO "%s: %s() Begin build a chain of CCW buffer \n", |
| 2290 | dev->name,__FUNCTION__); | 2290 | dev->name,__func__); |
| 2291 | #endif | 2291 | #endif |
| 2292 | p_buff=privptr->p_buff_ccw; | 2292 | p_buff=privptr->p_buff_ccw; |
| 2293 | 2293 | ||
| @@ -2306,7 +2306,7 @@ init_ccw_bk(struct net_device *dev) | |||
| 2306 | #ifdef DEBUGMSG | 2306 | #ifdef DEBUGMSG |
| 2307 | printk(KERN_INFO "%s: %s() " | 2307 | printk(KERN_INFO "%s: %s() " |
| 2308 | "End build a chain of CCW buffer \n", | 2308 | "End build a chain of CCW buffer \n", |
| 2309 | dev->name,__FUNCTION__); | 2309 | dev->name,__func__); |
| 2310 | p_buf=p_free_chain; | 2310 | p_buf=p_free_chain; |
| 2311 | while (p_buf!=NULL) { | 2311 | while (p_buf!=NULL) { |
| 2312 | dumpit((char *)p_buf, sizeof(struct ccwbk)); | 2312 | dumpit((char *)p_buf, sizeof(struct ccwbk)); |
| @@ -2321,7 +2321,7 @@ init_ccw_bk(struct net_device *dev) | |||
| 2321 | #ifdef DEBUGMSG | 2321 | #ifdef DEBUGMSG |
| 2322 | printk(KERN_INFO "%s: %s() " | 2322 | printk(KERN_INFO "%s: %s() " |
| 2323 | "Begin initialize ClawSignalBlock \n", | 2323 | "Begin initialize ClawSignalBlock \n", |
| 2324 | dev->name,__FUNCTION__); | 2324 | dev->name,__func__); |
| 2325 | #endif | 2325 | #endif |
| 2326 | if (privptr->p_claw_signal_blk==NULL) { | 2326 | if (privptr->p_claw_signal_blk==NULL) { |
| 2327 | privptr->p_claw_signal_blk=p_free_chain; | 2327 | privptr->p_claw_signal_blk=p_free_chain; |
| @@ -2334,7 +2334,7 @@ init_ccw_bk(struct net_device *dev) | |||
| 2334 | #ifdef DEBUGMSG | 2334 | #ifdef DEBUGMSG |
| 2335 | printk(KERN_INFO "%s: %s() > End initialize " | 2335 | printk(KERN_INFO "%s: %s() > End initialize " |
| 2336 | "ClawSignalBlock\n", | 2336 | "ClawSignalBlock\n", |
| 2337 | dev->name,__FUNCTION__); | 2337 | dev->name,__func__); |
| 2338 | dumpit((char *)privptr->p_claw_signal_blk, sizeof(struct ccwbk)); | 2338 | dumpit((char *)privptr->p_claw_signal_blk, sizeof(struct ccwbk)); |
| 2339 | #endif | 2339 | #endif |
| 2340 | 2340 | ||
| @@ -2349,14 +2349,14 @@ init_ccw_bk(struct net_device *dev) | |||
| 2349 | if (privptr->p_buff_write==NULL) { | 2349 | if (privptr->p_buff_write==NULL) { |
| 2350 | printk(KERN_INFO "%s: %s() __get_free_pages for write" | 2350 | printk(KERN_INFO "%s: %s() __get_free_pages for write" |
| 2351 | " bufs failed : get is for %d pages\n", | 2351 | " bufs failed : get is for %d pages\n", |
| 2352 | dev->name,__FUNCTION__,claw_write_pages ); | 2352 | dev->name,__func__,claw_write_pages ); |
| 2353 | free_pages((unsigned long)privptr->p_buff_ccw, | 2353 | free_pages((unsigned long)privptr->p_buff_ccw, |
| 2354 | (int)pages_to_order_of_mag(privptr->p_buff_ccw_num)); | 2354 | (int)pages_to_order_of_mag(privptr->p_buff_ccw_num)); |
| 2355 | privptr->p_buff_ccw=NULL; | 2355 | privptr->p_buff_ccw=NULL; |
| 2356 | #ifdef FUNCTRACE | 2356 | #ifdef FUNCTRACE |
| 2357 | printk(KERN_INFO "%s: %s() > exit on line %d," | 2357 | printk(KERN_INFO "%s: %s() > exit on line %d," |
| 2358 | "rc = ENOMEM\n", | 2358 | "rc = ENOMEM\n", |
| 2359 | dev->name,__FUNCTION__,__LINE__); | 2359 | dev->name,__func__,__LINE__); |
| 2360 | #endif | 2360 | #endif |
| 2361 | return -ENOMEM; | 2361 | return -ENOMEM; |
| 2362 | } | 2362 | } |
| @@ -2369,7 +2369,7 @@ init_ccw_bk(struct net_device *dev) | |||
| 2369 | ccw_pages_required * PAGE_SIZE); | 2369 | ccw_pages_required * PAGE_SIZE); |
| 2370 | #ifdef DEBUGMSG | 2370 | #ifdef DEBUGMSG |
| 2371 | printk(KERN_INFO "%s: %s() Begin build claw write free " | 2371 | printk(KERN_INFO "%s: %s() Begin build claw write free " |
| 2372 | "chain \n",dev->name,__FUNCTION__); | 2372 | "chain \n",dev->name,__func__); |
| 2373 | #endif | 2373 | #endif |
| 2374 | privptr->p_write_free_chain=NULL; | 2374 | privptr->p_write_free_chain=NULL; |
| 2375 | 2375 | ||
| @@ -2409,14 +2409,14 @@ init_ccw_bk(struct net_device *dev) | |||
| 2409 | #ifdef IOTRACE | 2409 | #ifdef IOTRACE |
| 2410 | printk(KERN_INFO "%s:%s __get_free_pages " | 2410 | printk(KERN_INFO "%s:%s __get_free_pages " |
| 2411 | "for writes buf: get for %d pages\n", | 2411 | "for writes buf: get for %d pages\n", |
| 2412 | dev->name,__FUNCTION__, | 2412 | dev->name,__func__, |
| 2413 | privptr->p_buff_pages_perwrite); | 2413 | privptr->p_buff_pages_perwrite); |
| 2414 | #endif | 2414 | #endif |
| 2415 | if (p_buff==NULL) { | 2415 | if (p_buff==NULL) { |
| 2416 | printk(KERN_INFO "%s:%s __get_free_pages " | 2416 | printk(KERN_INFO "%s:%s __get_free_pages " |
| 2417 | "for writes buf failed : get is for %d pages\n", | 2417 | "for writes buf failed : get is for %d pages\n", |
| 2418 | dev->name, | 2418 | dev->name, |
| 2419 | __FUNCTION__, | 2419 | __func__, |
| 2420 | privptr->p_buff_pages_perwrite ); | 2420 | privptr->p_buff_pages_perwrite ); |
| 2421 | free_pages((unsigned long)privptr->p_buff_ccw, | 2421 | free_pages((unsigned long)privptr->p_buff_ccw, |
| 2422 | (int)pages_to_order_of_mag( | 2422 | (int)pages_to_order_of_mag( |
| @@ -2433,7 +2433,7 @@ init_ccw_bk(struct net_device *dev) | |||
| 2433 | #ifdef FUNCTRACE | 2433 | #ifdef FUNCTRACE |
| 2434 | printk(KERN_INFO "%s: %s exit on line %d, rc = ENOMEM\n", | 2434 | printk(KERN_INFO "%s: %s exit on line %d, rc = ENOMEM\n", |
| 2435 | dev->name, | 2435 | dev->name, |
| 2436 | __FUNCTION__, | 2436 | __func__, |
| 2437 | __LINE__); | 2437 | __LINE__); |
| 2438 | #endif | 2438 | #endif |
| 2439 | return -ENOMEM; | 2439 | return -ENOMEM; |
| @@ -2466,7 +2466,7 @@ init_ccw_bk(struct net_device *dev) | |||
| 2466 | 2466 | ||
| 2467 | #ifdef DEBUGMSG | 2467 | #ifdef DEBUGMSG |
| 2468 | printk(KERN_INFO "%s:%s End build claw write free chain \n", | 2468 | printk(KERN_INFO "%s:%s End build claw write free chain \n", |
| 2469 | dev->name,__FUNCTION__); | 2469 | dev->name,__func__); |
| 2470 | p_buf=privptr->p_write_free_chain; | 2470 | p_buf=privptr->p_write_free_chain; |
| 2471 | while (p_buf!=NULL) { | 2471 | while (p_buf!=NULL) { |
| 2472 | dumpit((char *)p_buf, sizeof(struct ccwbk)); | 2472 | dumpit((char *)p_buf, sizeof(struct ccwbk)); |
| @@ -2485,7 +2485,7 @@ init_ccw_bk(struct net_device *dev) | |||
| 2485 | printk(KERN_INFO "%s: %s() " | 2485 | printk(KERN_INFO "%s: %s() " |
| 2486 | "__get_free_pages for read buf failed : " | 2486 | "__get_free_pages for read buf failed : " |
| 2487 | "get is for %d pages\n", | 2487 | "get is for %d pages\n", |
| 2488 | dev->name,__FUNCTION__,claw_read_pages ); | 2488 | dev->name,__func__,claw_read_pages ); |
| 2489 | free_pages((unsigned long)privptr->p_buff_ccw, | 2489 | free_pages((unsigned long)privptr->p_buff_ccw, |
| 2490 | (int)pages_to_order_of_mag( | 2490 | (int)pages_to_order_of_mag( |
| 2491 | privptr->p_buff_ccw_num)); | 2491 | privptr->p_buff_ccw_num)); |
| @@ -2497,7 +2497,7 @@ init_ccw_bk(struct net_device *dev) | |||
| 2497 | privptr->p_buff_write=NULL; | 2497 | privptr->p_buff_write=NULL; |
| 2498 | #ifdef FUNCTRACE | 2498 | #ifdef FUNCTRACE |
| 2499 | printk(KERN_INFO "%s: %s() > exit on line %d, rc =" | 2499 | printk(KERN_INFO "%s: %s() > exit on line %d, rc =" |
| 2500 | " ENOMEM\n",dev->name,__FUNCTION__,__LINE__); | 2500 | " ENOMEM\n",dev->name,__func__,__LINE__); |
| 2501 | #endif | 2501 | #endif |
| 2502 | return -ENOMEM; | 2502 | return -ENOMEM; |
| 2503 | } | 2503 | } |
| @@ -2509,7 +2509,7 @@ init_ccw_bk(struct net_device *dev) | |||
| 2509 | */ | 2509 | */ |
| 2510 | #ifdef DEBUGMSG | 2510 | #ifdef DEBUGMSG |
| 2511 | printk(KERN_INFO "%s: %s() Begin build claw read free chain \n", | 2511 | printk(KERN_INFO "%s: %s() Begin build claw read free chain \n", |
| 2512 | dev->name,__FUNCTION__); | 2512 | dev->name,__func__); |
| 2513 | #endif | 2513 | #endif |
| 2514 | p_buff=privptr->p_buff_read; | 2514 | p_buff=privptr->p_buff_read; |
| 2515 | for (i=0 ; i< privptr->p_env->read_buffers ; i++) { | 2515 | for (i=0 ; i< privptr->p_env->read_buffers ; i++) { |
| @@ -2590,7 +2590,7 @@ init_ccw_bk(struct net_device *dev) | |||
| 2590 | 2590 | ||
| 2591 | #ifdef DEBUGMSG | 2591 | #ifdef DEBUGMSG |
| 2592 | printk(KERN_INFO "%s: %s() Begin build claw read free chain \n", | 2592 | printk(KERN_INFO "%s: %s() Begin build claw read free chain \n", |
| 2593 | dev->name,__FUNCTION__); | 2593 | dev->name,__func__); |
| 2594 | #endif | 2594 | #endif |
| 2595 | for (i=0 ; i< privptr->p_env->read_buffers ; i++) { | 2595 | for (i=0 ; i< privptr->p_env->read_buffers ; i++) { |
| 2596 | p_buff = (void *)__get_free_pages(__GFP_DMA, | 2596 | p_buff = (void *)__get_free_pages(__GFP_DMA, |
| @@ -2598,7 +2598,7 @@ init_ccw_bk(struct net_device *dev) | |||
| 2598 | if (p_buff==NULL) { | 2598 | if (p_buff==NULL) { |
| 2599 | printk(KERN_INFO "%s: %s() __get_free_pages for read " | 2599 | printk(KERN_INFO "%s: %s() __get_free_pages for read " |
| 2600 | "buf failed : get is for %d pages\n", | 2600 | "buf failed : get is for %d pages\n", |
| 2601 | dev->name,__FUNCTION__, | 2601 | dev->name,__func__, |
| 2602 | privptr->p_buff_pages_perread ); | 2602 | privptr->p_buff_pages_perread ); |
| 2603 | free_pages((unsigned long)privptr->p_buff_ccw, | 2603 | free_pages((unsigned long)privptr->p_buff_ccw, |
| 2604 | (int)pages_to_order_of_mag(privptr->p_buff_ccw_num)); | 2604 | (int)pages_to_order_of_mag(privptr->p_buff_ccw_num)); |
| @@ -2622,7 +2622,7 @@ init_ccw_bk(struct net_device *dev) | |||
| 2622 | privptr->p_buff_write=NULL; | 2622 | privptr->p_buff_write=NULL; |
| 2623 | #ifdef FUNCTRACE | 2623 | #ifdef FUNCTRACE |
| 2624 | printk(KERN_INFO "%s: %s() exit on line %d, rc = ENOMEM\n", | 2624 | printk(KERN_INFO "%s: %s() exit on line %d, rc = ENOMEM\n", |
| 2625 | dev->name,__FUNCTION__, | 2625 | dev->name,__func__, |
| 2626 | __LINE__); | 2626 | __LINE__); |
| 2627 | #endif | 2627 | #endif |
| 2628 | return -ENOMEM; | 2628 | return -ENOMEM; |
| @@ -2695,7 +2695,7 @@ init_ccw_bk(struct net_device *dev) | |||
| 2695 | } /* pBuffread = NULL */ | 2695 | } /* pBuffread = NULL */ |
| 2696 | #ifdef DEBUGMSG | 2696 | #ifdef DEBUGMSG |
| 2697 | printk(KERN_INFO "%s: %s() > End build claw read free chain \n", | 2697 | printk(KERN_INFO "%s: %s() > End build claw read free chain \n", |
| 2698 | dev->name,__FUNCTION__); | 2698 | dev->name,__func__); |
| 2699 | p_buf=p_first_CCWB; | 2699 | p_buf=p_first_CCWB; |
| 2700 | while (p_buf!=NULL) { | 2700 | while (p_buf!=NULL) { |
| 2701 | dumpit((char *)p_buf, sizeof(struct ccwbk)); | 2701 | dumpit((char *)p_buf, sizeof(struct ccwbk)); |
| @@ -2707,7 +2707,7 @@ init_ccw_bk(struct net_device *dev) | |||
| 2707 | privptr->buffs_alloc = 1; | 2707 | privptr->buffs_alloc = 1; |
| 2708 | #ifdef FUNCTRACE | 2708 | #ifdef FUNCTRACE |
| 2709 | printk(KERN_INFO "%s: %s() exit on line %d\n", | 2709 | printk(KERN_INFO "%s: %s() exit on line %d\n", |
| 2710 | dev->name,__FUNCTION__,__LINE__); | 2710 | dev->name,__func__,__LINE__); |
| 2711 | #endif | 2711 | #endif |
| 2712 | return 0; | 2712 | return 0; |
| 2713 | } /* end of init_ccw_bk */ | 2713 | } /* end of init_ccw_bk */ |
| @@ -2723,11 +2723,11 @@ probe_error( struct ccwgroup_device *cgdev) | |||
| 2723 | { | 2723 | { |
| 2724 | struct claw_privbk *privptr; | 2724 | struct claw_privbk *privptr; |
| 2725 | #ifdef FUNCTRACE | 2725 | #ifdef FUNCTRACE |
| 2726 | printk(KERN_INFO "%s enter \n",__FUNCTION__); | 2726 | printk(KERN_INFO "%s enter \n",__func__); |
| 2727 | #endif | 2727 | #endif |
| 2728 | CLAW_DBF_TEXT(4,trace,"proberr"); | 2728 | CLAW_DBF_TEXT(4,trace,"proberr"); |
| 2729 | #ifdef DEBUGMSG | 2729 | #ifdef DEBUGMSG |
| 2730 | printk(KERN_INFO "%s variable cgdev =\n",__FUNCTION__); | 2730 | printk(KERN_INFO "%s variable cgdev =\n",__func__); |
| 2731 | dumpit((char *) cgdev, sizeof(struct ccwgroup_device)); | 2731 | dumpit((char *) cgdev, sizeof(struct ccwgroup_device)); |
| 2732 | #endif | 2732 | #endif |
| 2733 | privptr=(struct claw_privbk *)cgdev->dev.driver_data; | 2733 | privptr=(struct claw_privbk *)cgdev->dev.driver_data; |
| @@ -2741,7 +2741,7 @@ probe_error( struct ccwgroup_device *cgdev) | |||
| 2741 | } | 2741 | } |
| 2742 | #ifdef FUNCTRACE | 2742 | #ifdef FUNCTRACE |
| 2743 | printk(KERN_INFO "%s > exit on line %d\n", | 2743 | printk(KERN_INFO "%s > exit on line %d\n", |
| 2744 | __FUNCTION__,__LINE__); | 2744 | __func__,__LINE__); |
| 2745 | #endif | 2745 | #endif |
| 2746 | 2746 | ||
| 2747 | return; | 2747 | return; |
| @@ -2772,7 +2772,7 @@ claw_process_control( struct net_device *dev, struct ccwbk * p_ccw) | |||
| 2772 | struct chbk *p_ch = NULL; | 2772 | struct chbk *p_ch = NULL; |
| 2773 | #ifdef FUNCTRACE | 2773 | #ifdef FUNCTRACE |
| 2774 | printk(KERN_INFO "%s: %s() > enter \n", | 2774 | printk(KERN_INFO "%s: %s() > enter \n", |
| 2775 | dev->name,__FUNCTION__); | 2775 | dev->name,__func__); |
| 2776 | #endif | 2776 | #endif |
| 2777 | CLAW_DBF_TEXT(2,setup,"clw_cntl"); | 2777 | CLAW_DBF_TEXT(2,setup,"clw_cntl"); |
| 2778 | #ifdef DEBUGMSG | 2778 | #ifdef DEBUGMSG |
| @@ -2794,7 +2794,7 @@ claw_process_control( struct net_device *dev, struct ccwbk * p_ccw) | |||
| 2794 | #ifdef FUNCTRACE | 2794 | #ifdef FUNCTRACE |
| 2795 | printk(KERN_INFO "%s: %s() > " | 2795 | printk(KERN_INFO "%s: %s() > " |
| 2796 | "exit on line %d, rc=0\n", | 2796 | "exit on line %d, rc=0\n", |
| 2797 | dev->name,__FUNCTION__,__LINE__); | 2797 | dev->name,__func__,__LINE__); |
| 2798 | #endif | 2798 | #endif |
| 2799 | return 0; | 2799 | return 0; |
| 2800 | } | 2800 | } |
| @@ -3057,7 +3057,7 @@ claw_process_control( struct net_device *dev, struct ccwbk * p_ccw) | |||
| 3057 | 3057 | ||
| 3058 | #ifdef FUNCTRACE | 3058 | #ifdef FUNCTRACE |
| 3059 | printk(KERN_INFO "%s: %s() exit on line %d, rc = 0\n", | 3059 | printk(KERN_INFO "%s: %s() exit on line %d, rc = 0\n", |
| 3060 | dev->name,__FUNCTION__,__LINE__); | 3060 | dev->name,__func__,__LINE__); |
| 3061 | #endif | 3061 | #endif |
| 3062 | 3062 | ||
| 3063 | return 0; | 3063 | return 0; |
| @@ -3080,7 +3080,7 @@ claw_send_control(struct net_device *dev, __u8 type, __u8 link, | |||
| 3080 | struct sk_buff *skb; | 3080 | struct sk_buff *skb; |
| 3081 | 3081 | ||
| 3082 | #ifdef FUNCTRACE | 3082 | #ifdef FUNCTRACE |
| 3083 | printk(KERN_INFO "%s:%s > enter \n",dev->name,__FUNCTION__); | 3083 | printk(KERN_INFO "%s:%s > enter \n",dev->name,__func__); |
| 3084 | #endif | 3084 | #endif |
| 3085 | CLAW_DBF_TEXT(2,setup,"sndcntl"); | 3085 | CLAW_DBF_TEXT(2,setup,"sndcntl"); |
| 3086 | #ifdef DEBUGMSG | 3086 | #ifdef DEBUGMSG |
| @@ -3143,10 +3143,10 @@ claw_send_control(struct net_device *dev, __u8 type, __u8 link, | |||
| 3143 | skb = dev_alloc_skb(sizeof(struct clawctl)); | 3143 | skb = dev_alloc_skb(sizeof(struct clawctl)); |
| 3144 | if (!skb) { | 3144 | if (!skb) { |
| 3145 | printk( "%s:%s low on mem, returning...\n", | 3145 | printk( "%s:%s low on mem, returning...\n", |
| 3146 | dev->name,__FUNCTION__); | 3146 | dev->name,__func__); |
| 3147 | #ifdef DEBUG | 3147 | #ifdef DEBUG |
| 3148 | printk(KERN_INFO "%s:%s Exit, rc = ENOMEM\n", | 3148 | printk(KERN_INFO "%s:%s Exit, rc = ENOMEM\n", |
| 3149 | dev->name,__FUNCTION__); | 3149 | dev->name,__func__); |
| 3150 | #endif | 3150 | #endif |
| 3151 | return -ENOMEM; | 3151 | return -ENOMEM; |
| 3152 | } | 3152 | } |
| @@ -3162,7 +3162,7 @@ claw_send_control(struct net_device *dev, __u8 type, __u8 link, | |||
| 3162 | claw_hw_tx(skb, dev, 0); | 3162 | claw_hw_tx(skb, dev, 0); |
| 3163 | #ifdef FUNCTRACE | 3163 | #ifdef FUNCTRACE |
| 3164 | printk(KERN_INFO "%s:%s Exit on line %d\n", | 3164 | printk(KERN_INFO "%s:%s Exit on line %d\n", |
| 3165 | dev->name,__FUNCTION__,__LINE__); | 3165 | dev->name,__func__,__LINE__); |
| 3166 | #endif | 3166 | #endif |
| 3167 | 3167 | ||
| 3168 | return 0; | 3168 | return 0; |
| @@ -3180,7 +3180,7 @@ claw_snd_conn_req(struct net_device *dev, __u8 link) | |||
| 3180 | struct clawctl *p_ctl; | 3180 | struct clawctl *p_ctl; |
| 3181 | 3181 | ||
| 3182 | #ifdef FUNCTRACE | 3182 | #ifdef FUNCTRACE |
| 3183 | printk(KERN_INFO "%s:%s Enter \n",dev->name,__FUNCTION__); | 3183 | printk(KERN_INFO "%s:%s Enter \n",dev->name,__func__); |
| 3184 | #endif | 3184 | #endif |
| 3185 | CLAW_DBF_TEXT(2,setup,"snd_conn"); | 3185 | CLAW_DBF_TEXT(2,setup,"snd_conn"); |
| 3186 | #ifdef DEBUGMSG | 3186 | #ifdef DEBUGMSG |
| @@ -3193,7 +3193,7 @@ claw_snd_conn_req(struct net_device *dev, __u8 link) | |||
| 3193 | if ( privptr->system_validate_comp==0x00 ) { | 3193 | if ( privptr->system_validate_comp==0x00 ) { |
| 3194 | #ifdef FUNCTRACE | 3194 | #ifdef FUNCTRACE |
| 3195 | printk(KERN_INFO "%s:%s Exit on line %d, rc = 1\n", | 3195 | printk(KERN_INFO "%s:%s Exit on line %d, rc = 1\n", |
| 3196 | dev->name,__FUNCTION__,__LINE__); | 3196 | dev->name,__func__,__LINE__); |
| 3197 | #endif | 3197 | #endif |
| 3198 | return rc; | 3198 | return rc; |
| 3199 | } | 3199 | } |
| @@ -3209,7 +3209,7 @@ claw_snd_conn_req(struct net_device *dev, __u8 link) | |||
| 3209 | HOST_APPL_NAME, privptr->p_env->api_type); | 3209 | HOST_APPL_NAME, privptr->p_env->api_type); |
| 3210 | #ifdef FUNCTRACE | 3210 | #ifdef FUNCTRACE |
| 3211 | printk(KERN_INFO "%s:%s Exit on line %d, rc = %d\n", | 3211 | printk(KERN_INFO "%s:%s Exit on line %d, rc = %d\n", |
| 3212 | dev->name,__FUNCTION__,__LINE__, rc); | 3212 | dev->name,__func__,__LINE__, rc); |
| 3213 | #endif | 3213 | #endif |
| 3214 | return rc; | 3214 | return rc; |
| 3215 | 3215 | ||
| @@ -3228,7 +3228,7 @@ claw_snd_disc(struct net_device *dev, struct clawctl * p_ctl) | |||
| 3228 | struct conncmd * p_connect; | 3228 | struct conncmd * p_connect; |
| 3229 | 3229 | ||
| 3230 | #ifdef FUNCTRACE | 3230 | #ifdef FUNCTRACE |
| 3231 | printk(KERN_INFO "%s:%s Enter\n",dev->name,__FUNCTION__); | 3231 | printk(KERN_INFO "%s:%s Enter\n",dev->name,__func__); |
| 3232 | #endif | 3232 | #endif |
| 3233 | CLAW_DBF_TEXT(2,setup,"snd_dsc"); | 3233 | CLAW_DBF_TEXT(2,setup,"snd_dsc"); |
| 3234 | #ifdef DEBUGMSG | 3234 | #ifdef DEBUGMSG |
| @@ -3244,7 +3244,7 @@ claw_snd_disc(struct net_device *dev, struct clawctl * p_ctl) | |||
| 3244 | p_connect->host_name, p_connect->WS_name); | 3244 | p_connect->host_name, p_connect->WS_name); |
| 3245 | #ifdef FUNCTRACE | 3245 | #ifdef FUNCTRACE |
| 3246 | printk(KERN_INFO "%s:%s Exit on line %d, rc = %d\n", | 3246 | printk(KERN_INFO "%s:%s Exit on line %d, rc = %d\n", |
| 3247 | dev->name,__FUNCTION__, __LINE__, rc); | 3247 | dev->name,__func__, __LINE__, rc); |
| 3248 | #endif | 3248 | #endif |
| 3249 | return rc; | 3249 | return rc; |
| 3250 | } /* end of claw_snd_disc */ | 3250 | } /* end of claw_snd_disc */ |
| @@ -3265,7 +3265,7 @@ claw_snd_sys_validate_rsp(struct net_device *dev, | |||
| 3265 | 3265 | ||
| 3266 | #ifdef FUNCTRACE | 3266 | #ifdef FUNCTRACE |
| 3267 | printk(KERN_INFO "%s:%s Enter\n", | 3267 | printk(KERN_INFO "%s:%s Enter\n", |
| 3268 | dev->name,__FUNCTION__); | 3268 | dev->name,__func__); |
| 3269 | #endif | 3269 | #endif |
| 3270 | CLAW_DBF_TEXT(2,setup,"chkresp"); | 3270 | CLAW_DBF_TEXT(2,setup,"chkresp"); |
| 3271 | #ifdef DEBUGMSG | 3271 | #ifdef DEBUGMSG |
| @@ -3285,7 +3285,7 @@ claw_snd_sys_validate_rsp(struct net_device *dev, | |||
| 3285 | p_env->adapter_name ); | 3285 | p_env->adapter_name ); |
| 3286 | #ifdef FUNCTRACE | 3286 | #ifdef FUNCTRACE |
| 3287 | printk(KERN_INFO "%s:%s Exit on line %d, rc = %d\n", | 3287 | printk(KERN_INFO "%s:%s Exit on line %d, rc = %d\n", |
| 3288 | dev->name,__FUNCTION__,__LINE__, rc); | 3288 | dev->name,__func__,__LINE__, rc); |
| 3289 | #endif | 3289 | #endif |
| 3290 | return rc; | 3290 | return rc; |
| 3291 | } /* end of claw_snd_sys_validate_rsp */ | 3291 | } /* end of claw_snd_sys_validate_rsp */ |
| @@ -3301,7 +3301,7 @@ claw_strt_conn_req(struct net_device *dev ) | |||
| 3301 | int rc; | 3301 | int rc; |
| 3302 | 3302 | ||
| 3303 | #ifdef FUNCTRACE | 3303 | #ifdef FUNCTRACE |
| 3304 | printk(KERN_INFO "%s:%s Enter\n",dev->name,__FUNCTION__); | 3304 | printk(KERN_INFO "%s:%s Enter\n",dev->name,__func__); |
| 3305 | #endif | 3305 | #endif |
| 3306 | CLAW_DBF_TEXT(2,setup,"conn_req"); | 3306 | CLAW_DBF_TEXT(2,setup,"conn_req"); |
| 3307 | #ifdef DEBUGMSG | 3307 | #ifdef DEBUGMSG |
| @@ -3311,7 +3311,7 @@ claw_strt_conn_req(struct net_device *dev ) | |||
| 3311 | rc=claw_snd_conn_req(dev, 1); | 3311 | rc=claw_snd_conn_req(dev, 1); |
| 3312 | #ifdef FUNCTRACE | 3312 | #ifdef FUNCTRACE |
| 3313 | printk(KERN_INFO "%s:%s Exit on line %d, rc = %d\n", | 3313 | printk(KERN_INFO "%s:%s Exit on line %d, rc = %d\n", |
| 3314 | dev->name,__FUNCTION__,__LINE__, rc); | 3314 | dev->name,__func__,__LINE__, rc); |
| 3315 | #endif | 3315 | #endif |
| 3316 | return rc; | 3316 | return rc; |
| 3317 | } /* end of claw_strt_conn_req */ | 3317 | } /* end of claw_strt_conn_req */ |
| @@ -3327,13 +3327,13 @@ net_device_stats *claw_stats(struct net_device *dev) | |||
| 3327 | { | 3327 | { |
| 3328 | struct claw_privbk *privptr; | 3328 | struct claw_privbk *privptr; |
| 3329 | #ifdef FUNCTRACE | 3329 | #ifdef FUNCTRACE |
| 3330 | printk(KERN_INFO "%s:%s Enter\n",dev->name,__FUNCTION__); | 3330 | printk(KERN_INFO "%s:%s Enter\n",dev->name,__func__); |
| 3331 | #endif | 3331 | #endif |
| 3332 | CLAW_DBF_TEXT(4,trace,"stats"); | 3332 | CLAW_DBF_TEXT(4,trace,"stats"); |
| 3333 | privptr = dev->priv; | 3333 | privptr = dev->priv; |
| 3334 | #ifdef FUNCTRACE | 3334 | #ifdef FUNCTRACE |
| 3335 | printk(KERN_INFO "%s:%s Exit on line %d\n", | 3335 | printk(KERN_INFO "%s:%s Exit on line %d\n", |
| 3336 | dev->name,__FUNCTION__,__LINE__); | 3336 | dev->name,__func__,__LINE__); |
| 3337 | #endif | 3337 | #endif |
| 3338 | return &privptr->stats; | 3338 | return &privptr->stats; |
| 3339 | } /* end of claw_stats */ | 3339 | } /* end of claw_stats */ |
| @@ -3366,7 +3366,7 @@ unpack_read(struct net_device *dev ) | |||
| 3366 | int p=0; | 3366 | int p=0; |
| 3367 | 3367 | ||
| 3368 | #ifdef FUNCTRACE | 3368 | #ifdef FUNCTRACE |
| 3369 | printk(KERN_INFO "%s:%s enter \n",dev->name,__FUNCTION__); | 3369 | printk(KERN_INFO "%s:%s enter \n",dev->name,__func__); |
| 3370 | #endif | 3370 | #endif |
| 3371 | CLAW_DBF_TEXT(4,trace,"unpkread"); | 3371 | CLAW_DBF_TEXT(4,trace,"unpkread"); |
| 3372 | p_first_ccw=NULL; | 3372 | p_first_ccw=NULL; |
| @@ -3408,7 +3408,7 @@ unpack_read(struct net_device *dev ) | |||
| 3408 | if ((p_this_ccw->header.opcode & MORE_to_COME_FLAG)!=0) { | 3408 | if ((p_this_ccw->header.opcode & MORE_to_COME_FLAG)!=0) { |
| 3409 | #ifdef DEBUGMSG | 3409 | #ifdef DEBUGMSG |
| 3410 | printk(KERN_INFO "%s: %s > More_to_come is ON\n", | 3410 | printk(KERN_INFO "%s: %s > More_to_come is ON\n", |
| 3411 | dev->name,__FUNCTION__); | 3411 | dev->name,__func__); |
| 3412 | #endif | 3412 | #endif |
| 3413 | mtc_this_frm=1; | 3413 | mtc_this_frm=1; |
| 3414 | if (p_this_ccw->header.length!= | 3414 | if (p_this_ccw->header.length!= |
| @@ -3435,7 +3435,7 @@ unpack_read(struct net_device *dev ) | |||
| 3435 | #ifdef DEBUGMSG | 3435 | #ifdef DEBUGMSG |
| 3436 | printk(KERN_INFO "%s:%s goto next " | 3436 | printk(KERN_INFO "%s:%s goto next " |
| 3437 | "frame from MoretoComeSkip \n", | 3437 | "frame from MoretoComeSkip \n", |
| 3438 | dev->name,__FUNCTION__); | 3438 | dev->name,__func__); |
| 3439 | #endif | 3439 | #endif |
| 3440 | goto NextFrame; | 3440 | goto NextFrame; |
| 3441 | } | 3441 | } |
| @@ -3445,7 +3445,7 @@ unpack_read(struct net_device *dev ) | |||
| 3445 | #ifdef DEBUGMSG | 3445 | #ifdef DEBUGMSG |
| 3446 | printk(KERN_INFO "%s:%s goto next " | 3446 | printk(KERN_INFO "%s:%s goto next " |
| 3447 | "frame from claw_process_control \n", | 3447 | "frame from claw_process_control \n", |
| 3448 | dev->name,__FUNCTION__); | 3448 | dev->name,__func__); |
| 3449 | #endif | 3449 | #endif |
| 3450 | CLAW_DBF_TEXT(4,trace,"UnpkCntl"); | 3450 | CLAW_DBF_TEXT(4,trace,"UnpkCntl"); |
| 3451 | goto NextFrame; | 3451 | goto NextFrame; |
| @@ -3468,7 +3468,7 @@ unpack_next: | |||
| 3468 | if (privptr->mtc_logical_link<0) { | 3468 | if (privptr->mtc_logical_link<0) { |
| 3469 | #ifdef DEBUGMSG | 3469 | #ifdef DEBUGMSG |
| 3470 | printk(KERN_INFO "%s: %s mtc_logical_link < 0 \n", | 3470 | printk(KERN_INFO "%s: %s mtc_logical_link < 0 \n", |
| 3471 | dev->name,__FUNCTION__); | 3471 | dev->name,__func__); |
| 3472 | #endif | 3472 | #endif |
| 3473 | 3473 | ||
| 3474 | /* | 3474 | /* |
| @@ -3487,7 +3487,7 @@ unpack_next: | |||
| 3487 | printk(KERN_INFO "%s: %s > goto next " | 3487 | printk(KERN_INFO "%s: %s > goto next " |
| 3488 | "frame from MoretoComeSkip \n", | 3488 | "frame from MoretoComeSkip \n", |
| 3489 | dev->name, | 3489 | dev->name, |
| 3490 | __FUNCTION__); | 3490 | __func__); |
| 3491 | printk(KERN_INFO " bytes_to_mov %d > (MAX_ENVELOPE_" | 3491 | printk(KERN_INFO " bytes_to_mov %d > (MAX_ENVELOPE_" |
| 3492 | "SIZE-privptr->mtc_offset %d)\n", | 3492 | "SIZE-privptr->mtc_offset %d)\n", |
| 3493 | bytes_to_mov,(MAX_ENVELOPE_SIZE- privptr->mtc_offset)); | 3493 | bytes_to_mov,(MAX_ENVELOPE_SIZE- privptr->mtc_offset)); |
| @@ -3505,13 +3505,13 @@ unpack_next: | |||
| 3505 | } | 3505 | } |
| 3506 | #ifdef DEBUGMSG | 3506 | #ifdef DEBUGMSG |
| 3507 | printk(KERN_INFO "%s: %s() received data \n", | 3507 | printk(KERN_INFO "%s: %s() received data \n", |
| 3508 | dev->name,__FUNCTION__); | 3508 | dev->name,__func__); |
| 3509 | if (p_env->packing == DO_PACKED) | 3509 | if (p_env->packing == DO_PACKED) |
| 3510 | dumpit((char *)p_packd+sizeof(struct clawph),32); | 3510 | dumpit((char *)p_packd+sizeof(struct clawph),32); |
| 3511 | else | 3511 | else |
| 3512 | dumpit((char *)p_this_ccw->p_buffer, 32); | 3512 | dumpit((char *)p_this_ccw->p_buffer, 32); |
| 3513 | printk(KERN_INFO "%s: %s() bytelength %d \n", | 3513 | printk(KERN_INFO "%s: %s() bytelength %d \n", |
| 3514 | dev->name,__FUNCTION__,bytes_to_mov); | 3514 | dev->name,__func__,bytes_to_mov); |
| 3515 | #endif | 3515 | #endif |
| 3516 | if (mtc_this_frm==0) { | 3516 | if (mtc_this_frm==0) { |
| 3517 | len_of_data=privptr->mtc_offset+bytes_to_mov; | 3517 | len_of_data=privptr->mtc_offset+bytes_to_mov; |
| @@ -3530,13 +3530,13 @@ unpack_next: | |||
| 3530 | #ifdef DEBUGMSG | 3530 | #ifdef DEBUGMSG |
| 3531 | printk(KERN_INFO "%s: %s() netif_" | 3531 | printk(KERN_INFO "%s: %s() netif_" |
| 3532 | "rx(skb) completed \n", | 3532 | "rx(skb) completed \n", |
| 3533 | dev->name,__FUNCTION__); | 3533 | dev->name,__func__); |
| 3534 | #endif | 3534 | #endif |
| 3535 | } | 3535 | } |
| 3536 | else { | 3536 | else { |
| 3537 | privptr->stats.rx_dropped++; | 3537 | privptr->stats.rx_dropped++; |
| 3538 | printk(KERN_WARNING "%s: %s() low on memory\n", | 3538 | printk(KERN_WARNING "%s: %s() low on memory\n", |
| 3539 | dev->name,__FUNCTION__); | 3539 | dev->name,__func__); |
| 3540 | } | 3540 | } |
| 3541 | privptr->mtc_offset=0; | 3541 | privptr->mtc_offset=0; |
| 3542 | privptr->mtc_logical_link=-1; | 3542 | privptr->mtc_logical_link=-1; |
| @@ -3575,10 +3575,10 @@ NextFrame: | |||
| 3575 | 3575 | ||
| 3576 | #ifdef IOTRACE | 3576 | #ifdef IOTRACE |
| 3577 | printk(KERN_INFO "%s:%s processed frame is %d \n", | 3577 | printk(KERN_INFO "%s:%s processed frame is %d \n", |
| 3578 | dev->name,__FUNCTION__,i); | 3578 | dev->name,__func__,i); |
| 3579 | printk(KERN_INFO "%s:%s F:%lx L:%lx\n", | 3579 | printk(KERN_INFO "%s:%s F:%lx L:%lx\n", |
| 3580 | dev->name, | 3580 | dev->name, |
| 3581 | __FUNCTION__, | 3581 | __func__, |
| 3582 | (unsigned long)p_first_ccw, | 3582 | (unsigned long)p_first_ccw, |
| 3583 | (unsigned long)p_last_ccw); | 3583 | (unsigned long)p_last_ccw); |
| 3584 | #endif | 3584 | #endif |
| @@ -3588,7 +3588,7 @@ NextFrame: | |||
| 3588 | claw_strt_read(dev, LOCK_YES); | 3588 | claw_strt_read(dev, LOCK_YES); |
| 3589 | #ifdef FUNCTRACE | 3589 | #ifdef FUNCTRACE |
| 3590 | printk(KERN_INFO "%s: %s exit on line %d\n", | 3590 | printk(KERN_INFO "%s: %s exit on line %d\n", |
| 3591 | dev->name, __FUNCTION__, __LINE__); | 3591 | dev->name, __func__, __LINE__); |
| 3592 | #endif | 3592 | #endif |
| 3593 | return; | 3593 | return; |
| 3594 | } /* end of unpack_read */ | 3594 | } /* end of unpack_read */ |
| @@ -3610,7 +3610,7 @@ claw_strt_read (struct net_device *dev, int lock ) | |||
| 3610 | p_ch=&privptr->channel[READ]; | 3610 | p_ch=&privptr->channel[READ]; |
| 3611 | 3611 | ||
| 3612 | #ifdef FUNCTRACE | 3612 | #ifdef FUNCTRACE |
| 3613 | printk(KERN_INFO "%s:%s Enter \n",dev->name,__FUNCTION__); | 3613 | printk(KERN_INFO "%s:%s Enter \n",dev->name,__func__); |
| 3614 | printk(KERN_INFO "%s: variable lock = %d, dev =\n",dev->name, lock); | 3614 | printk(KERN_INFO "%s: variable lock = %d, dev =\n",dev->name, lock); |
| 3615 | dumpit((char *) dev, sizeof(struct net_device)); | 3615 | dumpit((char *) dev, sizeof(struct net_device)); |
| 3616 | #endif | 3616 | #endif |
| @@ -3626,7 +3626,7 @@ claw_strt_read (struct net_device *dev, int lock ) | |||
| 3626 | } | 3626 | } |
| 3627 | #ifdef DEBUGMSG | 3627 | #ifdef DEBUGMSG |
| 3628 | printk(KERN_INFO "%s:%s state-%02x\n" , | 3628 | printk(KERN_INFO "%s:%s state-%02x\n" , |
| 3629 | dev->name,__FUNCTION__, p_ch->claw_state); | 3629 | dev->name,__func__, p_ch->claw_state); |
| 3630 | #endif | 3630 | #endif |
| 3631 | if (lock==LOCK_YES) { | 3631 | if (lock==LOCK_YES) { |
| 3632 | spin_lock_irqsave(get_ccwdev_lock(p_ch->cdev), saveflags); | 3632 | spin_lock_irqsave(get_ccwdev_lock(p_ch->cdev), saveflags); |
| @@ -3634,7 +3634,7 @@ claw_strt_read (struct net_device *dev, int lock ) | |||
| 3634 | if (test_and_set_bit(0, (void *)&p_ch->IO_active) == 0) { | 3634 | if (test_and_set_bit(0, (void *)&p_ch->IO_active) == 0) { |
| 3635 | #ifdef DEBUGMSG | 3635 | #ifdef DEBUGMSG |
| 3636 | printk(KERN_INFO "%s: HOT READ started in %s\n" , | 3636 | printk(KERN_INFO "%s: HOT READ started in %s\n" , |
| 3637 | dev->name,__FUNCTION__); | 3637 | dev->name,__func__); |
| 3638 | p_clawh=(struct clawh *)privptr->p_claw_signal_blk; | 3638 | p_clawh=(struct clawh *)privptr->p_claw_signal_blk; |
| 3639 | dumpit((char *)&p_clawh->flag , 1); | 3639 | dumpit((char *)&p_clawh->flag , 1); |
| 3640 | #endif | 3640 | #endif |
| @@ -3650,7 +3650,7 @@ claw_strt_read (struct net_device *dev, int lock ) | |||
| 3650 | else { | 3650 | else { |
| 3651 | #ifdef DEBUGMSG | 3651 | #ifdef DEBUGMSG |
| 3652 | printk(KERN_INFO "%s: No READ started by %s() In progress\n" , | 3652 | printk(KERN_INFO "%s: No READ started by %s() In progress\n" , |
| 3653 | dev->name,__FUNCTION__); | 3653 | dev->name,__func__); |
| 3654 | #endif | 3654 | #endif |
| 3655 | CLAW_DBF_TEXT(2,trace,"ReadAct"); | 3655 | CLAW_DBF_TEXT(2,trace,"ReadAct"); |
| 3656 | } | 3656 | } |
| @@ -3660,7 +3660,7 @@ claw_strt_read (struct net_device *dev, int lock ) | |||
| 3660 | } | 3660 | } |
| 3661 | #ifdef FUNCTRACE | 3661 | #ifdef FUNCTRACE |
| 3662 | printk(KERN_INFO "%s:%s Exit on line %d\n", | 3662 | printk(KERN_INFO "%s:%s Exit on line %d\n", |
| 3663 | dev->name,__FUNCTION__,__LINE__); | 3663 | dev->name,__func__,__LINE__); |
| 3664 | #endif | 3664 | #endif |
| 3665 | CLAW_DBF_TEXT(4,trace,"StRdExit"); | 3665 | CLAW_DBF_TEXT(4,trace,"StRdExit"); |
| 3666 | return; | 3666 | return; |
| @@ -3681,7 +3681,7 @@ claw_strt_out_IO( struct net_device *dev ) | |||
| 3681 | struct ccwbk *p_first_ccw; | 3681 | struct ccwbk *p_first_ccw; |
| 3682 | 3682 | ||
| 3683 | #ifdef FUNCTRACE | 3683 | #ifdef FUNCTRACE |
| 3684 | printk(KERN_INFO "%s:%s Enter\n",dev->name,__FUNCTION__); | 3684 | printk(KERN_INFO "%s:%s Enter\n",dev->name,__func__); |
| 3685 | #endif | 3685 | #endif |
| 3686 | if (!dev) { | 3686 | if (!dev) { |
| 3687 | return; | 3687 | return; |
| @@ -3691,7 +3691,7 @@ claw_strt_out_IO( struct net_device *dev ) | |||
| 3691 | 3691 | ||
| 3692 | #ifdef DEBUGMSG | 3692 | #ifdef DEBUGMSG |
| 3693 | printk(KERN_INFO "%s:%s state-%02x\n" , | 3693 | printk(KERN_INFO "%s:%s state-%02x\n" , |
| 3694 | dev->name,__FUNCTION__,p_ch->claw_state); | 3694 | dev->name,__func__,p_ch->claw_state); |
| 3695 | #endif | 3695 | #endif |
| 3696 | CLAW_DBF_TEXT(4,trace,"strt_io"); | 3696 | CLAW_DBF_TEXT(4,trace,"strt_io"); |
| 3697 | p_first_ccw=privptr->p_write_active_first; | 3697 | p_first_ccw=privptr->p_write_active_first; |
| @@ -3701,14 +3701,14 @@ claw_strt_out_IO( struct net_device *dev ) | |||
| 3701 | if (p_first_ccw == NULL) { | 3701 | if (p_first_ccw == NULL) { |
| 3702 | #ifdef FUNCTRACE | 3702 | #ifdef FUNCTRACE |
| 3703 | printk(KERN_INFO "%s:%s Exit on line %d\n", | 3703 | printk(KERN_INFO "%s:%s Exit on line %d\n", |
| 3704 | dev->name,__FUNCTION__,__LINE__); | 3704 | dev->name,__func__,__LINE__); |
| 3705 | #endif | 3705 | #endif |
| 3706 | return; | 3706 | return; |
| 3707 | } | 3707 | } |
| 3708 | if (test_and_set_bit(0, (void *)&p_ch->IO_active) == 0) { | 3708 | if (test_and_set_bit(0, (void *)&p_ch->IO_active) == 0) { |
| 3709 | parm = (unsigned long) p_ch; | 3709 | parm = (unsigned long) p_ch; |
| 3710 | #ifdef DEBUGMSG | 3710 | #ifdef DEBUGMSG |
| 3711 | printk(KERN_INFO "%s:%s do_io \n" ,dev->name,__FUNCTION__); | 3711 | printk(KERN_INFO "%s:%s do_io \n" ,dev->name,__func__); |
| 3712 | dumpit((char *)p_first_ccw, sizeof(struct ccwbk)); | 3712 | dumpit((char *)p_first_ccw, sizeof(struct ccwbk)); |
| 3713 | #endif | 3713 | #endif |
| 3714 | CLAW_DBF_TEXT(2,trace,"StWrtIO"); | 3714 | CLAW_DBF_TEXT(2,trace,"StWrtIO"); |
| @@ -3721,7 +3721,7 @@ claw_strt_out_IO( struct net_device *dev ) | |||
| 3721 | dev->trans_start = jiffies; | 3721 | dev->trans_start = jiffies; |
| 3722 | #ifdef FUNCTRACE | 3722 | #ifdef FUNCTRACE |
| 3723 | printk(KERN_INFO "%s:%s Exit on line %d\n", | 3723 | printk(KERN_INFO "%s:%s Exit on line %d\n", |
| 3724 | dev->name,__FUNCTION__,__LINE__); | 3724 | dev->name,__func__,__LINE__); |
| 3725 | #endif | 3725 | #endif |
| 3726 | 3726 | ||
| 3727 | return; | 3727 | return; |
| @@ -3745,7 +3745,7 @@ claw_free_wrt_buf( struct net_device *dev ) | |||
| 3745 | struct ccwbk*p_buf; | 3745 | struct ccwbk*p_buf; |
| 3746 | #endif | 3746 | #endif |
| 3747 | #ifdef FUNCTRACE | 3747 | #ifdef FUNCTRACE |
| 3748 | printk(KERN_INFO "%s:%s Enter\n",dev->name,__FUNCTION__); | 3748 | printk(KERN_INFO "%s:%s Enter\n",dev->name,__func__); |
| 3749 | printk(KERN_INFO "%s: free count = %d variable dev =\n", | 3749 | printk(KERN_INFO "%s: free count = %d variable dev =\n", |
| 3750 | dev->name,privptr->write_free_count); | 3750 | dev->name,privptr->write_free_count); |
| 3751 | #endif | 3751 | #endif |
| @@ -3798,7 +3798,7 @@ claw_free_wrt_buf( struct net_device *dev ) | |||
| 3798 | privptr->p_write_active_last=NULL; | 3798 | privptr->p_write_active_last=NULL; |
| 3799 | #ifdef DEBUGMSG | 3799 | #ifdef DEBUGMSG |
| 3800 | printk(KERN_INFO "%s:%s p_write_" | 3800 | printk(KERN_INFO "%s:%s p_write_" |
| 3801 | "active_first==NULL\n",dev->name,__FUNCTION__); | 3801 | "active_first==NULL\n",dev->name,__func__); |
| 3802 | #endif | 3802 | #endif |
| 3803 | } | 3803 | } |
| 3804 | #ifdef IOTRACE | 3804 | #ifdef IOTRACE |
| @@ -3819,7 +3819,7 @@ claw_free_wrt_buf( struct net_device *dev ) | |||
| 3819 | CLAW_DBF_TEXT_(4,trace,"FWC=%d",privptr->write_free_count); | 3819 | CLAW_DBF_TEXT_(4,trace,"FWC=%d",privptr->write_free_count); |
| 3820 | #ifdef FUNCTRACE | 3820 | #ifdef FUNCTRACE |
| 3821 | printk(KERN_INFO "%s:%s Exit on line %d free_count =%d\n", | 3821 | printk(KERN_INFO "%s:%s Exit on line %d free_count =%d\n", |
| 3822 | dev->name,__FUNCTION__, __LINE__,privptr->write_free_count); | 3822 | dev->name,__func__, __LINE__,privptr->write_free_count); |
| 3823 | #endif | 3823 | #endif |
| 3824 | return; | 3824 | return; |
| 3825 | } | 3825 | } |
| @@ -3833,7 +3833,7 @@ claw_free_netdevice(struct net_device * dev, int free_dev) | |||
| 3833 | { | 3833 | { |
| 3834 | struct claw_privbk *privptr; | 3834 | struct claw_privbk *privptr; |
| 3835 | #ifdef FUNCTRACE | 3835 | #ifdef FUNCTRACE |
| 3836 | printk(KERN_INFO "%s:%s Enter\n",dev->name,__FUNCTION__); | 3836 | printk(KERN_INFO "%s:%s Enter\n",dev->name,__func__); |
| 3837 | #endif | 3837 | #endif |
| 3838 | CLAW_DBF_TEXT(2,setup,"free_dev"); | 3838 | CLAW_DBF_TEXT(2,setup,"free_dev"); |
| 3839 | 3839 | ||
| @@ -3854,7 +3854,7 @@ claw_free_netdevice(struct net_device * dev, int free_dev) | |||
| 3854 | #endif | 3854 | #endif |
| 3855 | CLAW_DBF_TEXT(2,setup,"feee_ok"); | 3855 | CLAW_DBF_TEXT(2,setup,"feee_ok"); |
| 3856 | #ifdef FUNCTRACE | 3856 | #ifdef FUNCTRACE |
| 3857 | printk(KERN_INFO "%s:%s Exit\n",dev->name,__FUNCTION__); | 3857 | printk(KERN_INFO "%s:%s Exit\n",dev->name,__func__); |
| 3858 | #endif | 3858 | #endif |
| 3859 | } | 3859 | } |
| 3860 | 3860 | ||
| @@ -3867,13 +3867,13 @@ static void | |||
| 3867 | claw_init_netdevice(struct net_device * dev) | 3867 | claw_init_netdevice(struct net_device * dev) |
| 3868 | { | 3868 | { |
| 3869 | #ifdef FUNCTRACE | 3869 | #ifdef FUNCTRACE |
| 3870 | printk(KERN_INFO "%s:%s Enter\n",dev->name,__FUNCTION__); | 3870 | printk(KERN_INFO "%s:%s Enter\n",dev->name,__func__); |
| 3871 | #endif | 3871 | #endif |
| 3872 | CLAW_DBF_TEXT(2,setup,"init_dev"); | 3872 | CLAW_DBF_TEXT(2,setup,"init_dev"); |
| 3873 | CLAW_DBF_TEXT_(2,setup,"%s",dev->name); | 3873 | CLAW_DBF_TEXT_(2,setup,"%s",dev->name); |
| 3874 | if (!dev) { | 3874 | if (!dev) { |
| 3875 | printk(KERN_WARNING "claw:%s BAD Device exit line %d\n", | 3875 | printk(KERN_WARNING "claw:%s BAD Device exit line %d\n", |
| 3876 | __FUNCTION__,__LINE__); | 3876 | __func__,__LINE__); |
| 3877 | CLAW_DBF_TEXT(2,setup,"baddev"); | 3877 | CLAW_DBF_TEXT(2,setup,"baddev"); |
| 3878 | return; | 3878 | return; |
| 3879 | } | 3879 | } |
| @@ -3889,7 +3889,7 @@ claw_init_netdevice(struct net_device * dev) | |||
| 3889 | dev->tx_queue_len = 1300; | 3889 | dev->tx_queue_len = 1300; |
| 3890 | dev->flags = IFF_POINTOPOINT | IFF_NOARP; | 3890 | dev->flags = IFF_POINTOPOINT | IFF_NOARP; |
| 3891 | #ifdef FUNCTRACE | 3891 | #ifdef FUNCTRACE |
| 3892 | printk(KERN_INFO "%s:%s Exit\n",dev->name,__FUNCTION__); | 3892 | printk(KERN_INFO "%s:%s Exit\n",dev->name,__func__); |
| 3893 | #endif | 3893 | #endif |
| 3894 | CLAW_DBF_TEXT(2,setup,"initok"); | 3894 | CLAW_DBF_TEXT(2,setup,"initok"); |
| 3895 | return; | 3895 | return; |
| @@ -3909,7 +3909,7 @@ add_channel(struct ccw_device *cdev,int i,struct claw_privbk *privptr) | |||
| 3909 | struct ccw_dev_id dev_id; | 3909 | struct ccw_dev_id dev_id; |
| 3910 | 3910 | ||
| 3911 | #ifdef FUNCTRACE | 3911 | #ifdef FUNCTRACE |
| 3912 | printk(KERN_INFO "%s:%s Enter\n",cdev->dev.bus_id,__FUNCTION__); | 3912 | printk(KERN_INFO "%s:%s Enter\n",cdev->dev.bus_id,__func__); |
| 3913 | #endif | 3913 | #endif |
| 3914 | CLAW_DBF_TEXT_(2,setup,"%s",cdev->dev.bus_id); | 3914 | CLAW_DBF_TEXT_(2,setup,"%s",cdev->dev.bus_id); |
| 3915 | privptr->channel[i].flag = i+1; /* Read is 1 Write is 2 */ | 3915 | privptr->channel[i].flag = i+1; /* Read is 1 Write is 2 */ |
| @@ -3920,16 +3920,16 @@ add_channel(struct ccw_device *cdev,int i,struct claw_privbk *privptr) | |||
| 3920 | p_ch->devno = dev_id.devno; | 3920 | p_ch->devno = dev_id.devno; |
| 3921 | if ((p_ch->irb = kzalloc(sizeof (struct irb),GFP_KERNEL)) == NULL) { | 3921 | if ((p_ch->irb = kzalloc(sizeof (struct irb),GFP_KERNEL)) == NULL) { |
| 3922 | printk(KERN_WARNING "%s Out of memory in %s for irb\n", | 3922 | printk(KERN_WARNING "%s Out of memory in %s for irb\n", |
| 3923 | p_ch->id,__FUNCTION__); | 3923 | p_ch->id,__func__); |
| 3924 | #ifdef FUNCTRACE | 3924 | #ifdef FUNCTRACE |
| 3925 | printk(KERN_INFO "%s:%s Exit on line %d\n", | 3925 | printk(KERN_INFO "%s:%s Exit on line %d\n", |
| 3926 | p_ch->id,__FUNCTION__,__LINE__); | 3926 | p_ch->id,__func__,__LINE__); |
| 3927 | #endif | 3927 | #endif |
| 3928 | return -ENOMEM; | 3928 | return -ENOMEM; |
| 3929 | } | 3929 | } |
| 3930 | #ifdef FUNCTRACE | 3930 | #ifdef FUNCTRACE |
| 3931 | printk(KERN_INFO "%s:%s Exit on line %d\n", | 3931 | printk(KERN_INFO "%s:%s Exit on line %d\n", |
| 3932 | cdev->dev.bus_id,__FUNCTION__,__LINE__); | 3932 | cdev->dev.bus_id,__func__,__LINE__); |
| 3933 | #endif | 3933 | #endif |
| 3934 | return 0; | 3934 | return 0; |
| 3935 | } | 3935 | } |
| @@ -3952,7 +3952,7 @@ claw_new_device(struct ccwgroup_device *cgdev) | |||
| 3952 | int ret; | 3952 | int ret; |
| 3953 | struct ccw_dev_id dev_id; | 3953 | struct ccw_dev_id dev_id; |
| 3954 | 3954 | ||
| 3955 | pr_debug("%s() called\n", __FUNCTION__); | 3955 | pr_debug("%s() called\n", __func__); |
| 3956 | printk(KERN_INFO "claw: add for %s\n",cgdev->cdev[READ]->dev.bus_id); | 3956 | printk(KERN_INFO "claw: add for %s\n",cgdev->cdev[READ]->dev.bus_id); |
| 3957 | CLAW_DBF_TEXT(2,setup,"new_dev"); | 3957 | CLAW_DBF_TEXT(2,setup,"new_dev"); |
| 3958 | privptr = cgdev->dev.driver_data; | 3958 | privptr = cgdev->dev.driver_data; |
| @@ -3990,7 +3990,7 @@ claw_new_device(struct ccwgroup_device *cgdev) | |||
| 3990 | } | 3990 | } |
| 3991 | dev = alloc_netdev(0,"claw%d",claw_init_netdevice); | 3991 | dev = alloc_netdev(0,"claw%d",claw_init_netdevice); |
| 3992 | if (!dev) { | 3992 | if (!dev) { |
| 3993 | printk(KERN_WARNING "%s:alloc_netdev failed\n",__FUNCTION__); | 3993 | printk(KERN_WARNING "%s:alloc_netdev failed\n",__func__); |
| 3994 | goto out; | 3994 | goto out; |
| 3995 | } | 3995 | } |
| 3996 | dev->priv = privptr; | 3996 | dev->priv = privptr; |
| @@ -4065,7 +4065,7 @@ claw_shutdown_device(struct ccwgroup_device *cgdev) | |||
| 4065 | struct net_device *ndev; | 4065 | struct net_device *ndev; |
| 4066 | int ret; | 4066 | int ret; |
| 4067 | 4067 | ||
| 4068 | pr_debug("%s() called\n", __FUNCTION__); | 4068 | pr_debug("%s() called\n", __func__); |
| 4069 | CLAW_DBF_TEXT_(2,setup,"%s",cgdev->dev.bus_id); | 4069 | CLAW_DBF_TEXT_(2,setup,"%s",cgdev->dev.bus_id); |
| 4070 | priv = cgdev->dev.driver_data; | 4070 | priv = cgdev->dev.driver_data; |
| 4071 | if (!priv) | 4071 | if (!priv) |
| @@ -4095,15 +4095,15 @@ claw_remove_device(struct ccwgroup_device *cgdev) | |||
| 4095 | { | 4095 | { |
| 4096 | struct claw_privbk *priv; | 4096 | struct claw_privbk *priv; |
| 4097 | 4097 | ||
| 4098 | pr_debug("%s() called\n", __FUNCTION__); | 4098 | pr_debug("%s() called\n", __func__); |
| 4099 | CLAW_DBF_TEXT_(2,setup,"%s",cgdev->dev.bus_id); | 4099 | CLAW_DBF_TEXT_(2,setup,"%s",cgdev->dev.bus_id); |
| 4100 | priv = cgdev->dev.driver_data; | 4100 | priv = cgdev->dev.driver_data; |
| 4101 | if (!priv) { | 4101 | if (!priv) { |
| 4102 | printk(KERN_WARNING "claw: %s() no Priv exiting\n",__FUNCTION__); | 4102 | printk(KERN_WARNING "claw: %s() no Priv exiting\n",__func__); |
| 4103 | return; | 4103 | return; |
| 4104 | } | 4104 | } |
| 4105 | printk(KERN_INFO "claw: %s() called %s will be removed.\n", | 4105 | printk(KERN_INFO "claw: %s() called %s will be removed.\n", |
| 4106 | __FUNCTION__,cgdev->cdev[0]->dev.bus_id); | 4106 | __func__,cgdev->cdev[0]->dev.bus_id); |
| 4107 | if (cgdev->state == CCWGROUP_ONLINE) | 4107 | if (cgdev->state == CCWGROUP_ONLINE) |
| 4108 | claw_shutdown_device(cgdev); | 4108 | claw_shutdown_device(cgdev); |
| 4109 | claw_remove_files(&cgdev->dev); | 4109 | claw_remove_files(&cgdev->dev); |
| @@ -4346,7 +4346,7 @@ static struct attribute_group claw_attr_group = { | |||
| 4346 | static int | 4346 | static int |
| 4347 | claw_add_files(struct device *dev) | 4347 | claw_add_files(struct device *dev) |
| 4348 | { | 4348 | { |
| 4349 | pr_debug("%s() called\n", __FUNCTION__); | 4349 | pr_debug("%s() called\n", __func__); |
| 4350 | CLAW_DBF_TEXT(2,setup,"add_file"); | 4350 | CLAW_DBF_TEXT(2,setup,"add_file"); |
| 4351 | return sysfs_create_group(&dev->kobj, &claw_attr_group); | 4351 | return sysfs_create_group(&dev->kobj, &claw_attr_group); |
| 4352 | } | 4352 | } |
| @@ -4354,7 +4354,7 @@ claw_add_files(struct device *dev) | |||
| 4354 | static void | 4354 | static void |
| 4355 | claw_remove_files(struct device *dev) | 4355 | claw_remove_files(struct device *dev) |
| 4356 | { | 4356 | { |
| 4357 | pr_debug("%s() called\n", __FUNCTION__); | 4357 | pr_debug("%s() called\n", __func__); |
| 4358 | CLAW_DBF_TEXT(2,setup,"rem_file"); | 4358 | CLAW_DBF_TEXT(2,setup,"rem_file"); |
| 4359 | sysfs_remove_group(&dev->kobj, &claw_attr_group); | 4359 | sysfs_remove_group(&dev->kobj, &claw_attr_group); |
| 4360 | } | 4360 | } |
| @@ -4385,12 +4385,12 @@ claw_init(void) | |||
| 4385 | printk(KERN_INFO "claw: starting driver\n"); | 4385 | printk(KERN_INFO "claw: starting driver\n"); |
| 4386 | 4386 | ||
| 4387 | #ifdef FUNCTRACE | 4387 | #ifdef FUNCTRACE |
| 4388 | printk(KERN_INFO "claw: %s() enter \n",__FUNCTION__); | 4388 | printk(KERN_INFO "claw: %s() enter \n",__func__); |
| 4389 | #endif | 4389 | #endif |
| 4390 | ret = claw_register_debug_facility(); | 4390 | ret = claw_register_debug_facility(); |
| 4391 | if (ret) { | 4391 | if (ret) { |
| 4392 | printk(KERN_WARNING "claw: %s() debug_register failed %d\n", | 4392 | printk(KERN_WARNING "claw: %s() debug_register failed %d\n", |
| 4393 | __FUNCTION__,ret); | 4393 | __func__,ret); |
| 4394 | return ret; | 4394 | return ret; |
| 4395 | } | 4395 | } |
| 4396 | CLAW_DBF_TEXT(2,setup,"init_mod"); | 4396 | CLAW_DBF_TEXT(2,setup,"init_mod"); |
| @@ -4398,10 +4398,10 @@ claw_init(void) | |||
| 4398 | if (ret) { | 4398 | if (ret) { |
| 4399 | claw_unregister_debug_facility(); | 4399 | claw_unregister_debug_facility(); |
| 4400 | printk(KERN_WARNING "claw; %s() cu3088 register failed %d\n", | 4400 | printk(KERN_WARNING "claw; %s() cu3088 register failed %d\n", |
| 4401 | __FUNCTION__,ret); | 4401 | __func__,ret); |
| 4402 | } | 4402 | } |
| 4403 | #ifdef FUNCTRACE | 4403 | #ifdef FUNCTRACE |
| 4404 | printk(KERN_INFO "claw: %s() exit \n",__FUNCTION__); | 4404 | printk(KERN_INFO "claw: %s() exit \n",__func__); |
| 4405 | #endif | 4405 | #endif |
| 4406 | return ret; | 4406 | return ret; |
| 4407 | } | 4407 | } |
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c index 874a19994489..8f876f6ab367 100644 --- a/drivers/s390/net/netiucv.c +++ b/drivers/s390/net/netiucv.c | |||
| @@ -670,7 +670,7 @@ static void conn_action_rx(fsm_instance *fi, int event, void *arg) | |||
| 670 | struct netiucv_priv *privptr = netdev_priv(conn->netdev); | 670 | struct netiucv_priv *privptr = netdev_priv(conn->netdev); |
| 671 | int rc; | 671 | int rc; |
| 672 | 672 | ||
| 673 | IUCV_DBF_TEXT(trace, 4, __FUNCTION__); | 673 | IUCV_DBF_TEXT(trace, 4, __func__); |
| 674 | 674 | ||
| 675 | if (!conn->netdev) { | 675 | if (!conn->netdev) { |
| 676 | iucv_message_reject(conn->path, msg); | 676 | iucv_message_reject(conn->path, msg); |
| @@ -718,7 +718,7 @@ static void conn_action_txdone(fsm_instance *fi, int event, void *arg) | |||
| 718 | struct ll_header header; | 718 | struct ll_header header; |
| 719 | int rc; | 719 | int rc; |
| 720 | 720 | ||
| 721 | IUCV_DBF_TEXT(trace, 4, __FUNCTION__); | 721 | IUCV_DBF_TEXT(trace, 4, __func__); |
| 722 | 722 | ||
| 723 | if (conn && conn->netdev) | 723 | if (conn && conn->netdev) |
| 724 | privptr = netdev_priv(conn->netdev); | 724 | privptr = netdev_priv(conn->netdev); |
| @@ -799,7 +799,7 @@ static void conn_action_connaccept(fsm_instance *fi, int event, void *arg) | |||
| 799 | struct netiucv_priv *privptr = netdev_priv(netdev); | 799 | struct netiucv_priv *privptr = netdev_priv(netdev); |
| 800 | int rc; | 800 | int rc; |
| 801 | 801 | ||
| 802 | IUCV_DBF_TEXT(trace, 3, __FUNCTION__); | 802 | IUCV_DBF_TEXT(trace, 3, __func__); |
| 803 | 803 | ||
| 804 | conn->path = path; | 804 | conn->path = path; |
| 805 | path->msglim = NETIUCV_QUEUELEN_DEFAULT; | 805 | path->msglim = NETIUCV_QUEUELEN_DEFAULT; |
| @@ -821,7 +821,7 @@ static void conn_action_connreject(fsm_instance *fi, int event, void *arg) | |||
| 821 | struct iucv_event *ev = arg; | 821 | struct iucv_event *ev = arg; |
| 822 | struct iucv_path *path = ev->data; | 822 | struct iucv_path *path = ev->data; |
| 823 | 823 | ||
| 824 | IUCV_DBF_TEXT(trace, 3, __FUNCTION__); | 824 | IUCV_DBF_TEXT(trace, 3, __func__); |
| 825 | iucv_path_sever(path, NULL); | 825 | iucv_path_sever(path, NULL); |
| 826 | } | 826 | } |
| 827 | 827 | ||
| @@ -831,7 +831,7 @@ static void conn_action_connack(fsm_instance *fi, int event, void *arg) | |||
| 831 | struct net_device *netdev = conn->netdev; | 831 | struct net_device *netdev = conn->netdev; |
| 832 | struct netiucv_priv *privptr = netdev_priv(netdev); | 832 | struct netiucv_priv *privptr = netdev_priv(netdev); |
| 833 | 833 | ||
| 834 | IUCV_DBF_TEXT(trace, 3, __FUNCTION__); | 834 | IUCV_DBF_TEXT(trace, 3, __func__); |
| 835 | fsm_deltimer(&conn->timer); | 835 | fsm_deltimer(&conn->timer); |
| 836 | fsm_newstate(fi, CONN_STATE_IDLE); | 836 | fsm_newstate(fi, CONN_STATE_IDLE); |
| 837 | netdev->tx_queue_len = conn->path->msglim; | 837 | netdev->tx_queue_len = conn->path->msglim; |
| @@ -842,7 +842,7 @@ static void conn_action_conntimsev(fsm_instance *fi, int event, void *arg) | |||
| 842 | { | 842 | { |
| 843 | struct iucv_connection *conn = arg; | 843 | struct iucv_connection *conn = arg; |
| 844 | 844 | ||
| 845 | IUCV_DBF_TEXT(trace, 3, __FUNCTION__); | 845 | IUCV_DBF_TEXT(trace, 3, __func__); |
| 846 | fsm_deltimer(&conn->timer); | 846 | fsm_deltimer(&conn->timer); |
| 847 | iucv_path_sever(conn->path, NULL); | 847 | iucv_path_sever(conn->path, NULL); |
| 848 | fsm_newstate(fi, CONN_STATE_STARTWAIT); | 848 | fsm_newstate(fi, CONN_STATE_STARTWAIT); |
| @@ -854,7 +854,7 @@ static void conn_action_connsever(fsm_instance *fi, int event, void *arg) | |||
| 854 | struct net_device *netdev = conn->netdev; | 854 | struct net_device *netdev = conn->netdev; |
| 855 | struct netiucv_priv *privptr = netdev_priv(netdev); | 855 | struct netiucv_priv *privptr = netdev_priv(netdev); |
| 856 | 856 | ||
| 857 | IUCV_DBF_TEXT(trace, 3, __FUNCTION__); | 857 | IUCV_DBF_TEXT(trace, 3, __func__); |
| 858 | 858 | ||
| 859 | fsm_deltimer(&conn->timer); | 859 | fsm_deltimer(&conn->timer); |
| 860 | iucv_path_sever(conn->path, NULL); | 860 | iucv_path_sever(conn->path, NULL); |
| @@ -870,7 +870,7 @@ static void conn_action_start(fsm_instance *fi, int event, void *arg) | |||
| 870 | struct iucv_connection *conn = arg; | 870 | struct iucv_connection *conn = arg; |
| 871 | int rc; | 871 | int rc; |
| 872 | 872 | ||
| 873 | IUCV_DBF_TEXT(trace, 3, __FUNCTION__); | 873 | IUCV_DBF_TEXT(trace, 3, __func__); |
| 874 | 874 | ||
| 875 | fsm_newstate(fi, CONN_STATE_STARTWAIT); | 875 | fsm_newstate(fi, CONN_STATE_STARTWAIT); |
| 876 | PRINT_DEBUG("%s('%s'): connecting ...\n", | 876 | PRINT_DEBUG("%s('%s'): connecting ...\n", |
| @@ -948,7 +948,7 @@ static void conn_action_stop(fsm_instance *fi, int event, void *arg) | |||
| 948 | struct net_device *netdev = conn->netdev; | 948 | struct net_device *netdev = conn->netdev; |
| 949 | struct netiucv_priv *privptr = netdev_priv(netdev); | 949 | struct netiucv_priv *privptr = netdev_priv(netdev); |
| 950 | 950 | ||
| 951 | IUCV_DBF_TEXT(trace, 3, __FUNCTION__); | 951 | IUCV_DBF_TEXT(trace, 3, __func__); |
| 952 | 952 | ||
| 953 | fsm_deltimer(&conn->timer); | 953 | fsm_deltimer(&conn->timer); |
| 954 | fsm_newstate(fi, CONN_STATE_STOPPED); | 954 | fsm_newstate(fi, CONN_STATE_STOPPED); |
| @@ -1024,7 +1024,7 @@ static void dev_action_start(fsm_instance *fi, int event, void *arg) | |||
| 1024 | struct net_device *dev = arg; | 1024 | struct net_device *dev = arg; |
| 1025 | struct netiucv_priv *privptr = netdev_priv(dev); | 1025 | struct netiucv_priv *privptr = netdev_priv(dev); |
| 1026 | 1026 | ||
| 1027 | IUCV_DBF_TEXT(trace, 3, __FUNCTION__); | 1027 | IUCV_DBF_TEXT(trace, 3, __func__); |
| 1028 | 1028 | ||
| 1029 | fsm_newstate(fi, DEV_STATE_STARTWAIT); | 1029 | fsm_newstate(fi, DEV_STATE_STARTWAIT); |
| 1030 | fsm_event(privptr->conn->fsm, CONN_EVENT_START, privptr->conn); | 1030 | fsm_event(privptr->conn->fsm, CONN_EVENT_START, privptr->conn); |
| @@ -1044,7 +1044,7 @@ dev_action_stop(fsm_instance *fi, int event, void *arg) | |||
| 1044 | struct netiucv_priv *privptr = netdev_priv(dev); | 1044 | struct netiucv_priv *privptr = netdev_priv(dev); |
| 1045 | struct iucv_event ev; | 1045 | struct iucv_event ev; |
| 1046 | 1046 | ||
| 1047 | IUCV_DBF_TEXT(trace, 3, __FUNCTION__); | 1047 | IUCV_DBF_TEXT(trace, 3, __func__); |
| 1048 | 1048 | ||
| 1049 | ev.conn = privptr->conn; | 1049 | ev.conn = privptr->conn; |
| 1050 | 1050 | ||
| @@ -1066,7 +1066,7 @@ dev_action_connup(fsm_instance *fi, int event, void *arg) | |||
| 1066 | struct net_device *dev = arg; | 1066 | struct net_device *dev = arg; |
| 1067 | struct netiucv_priv *privptr = netdev_priv(dev); | 1067 | struct netiucv_priv *privptr = netdev_priv(dev); |
| 1068 | 1068 | ||
| 1069 | IUCV_DBF_TEXT(trace, 3, __FUNCTION__); | 1069 | IUCV_DBF_TEXT(trace, 3, __func__); |
| 1070 | 1070 | ||
| 1071 | switch (fsm_getstate(fi)) { | 1071 | switch (fsm_getstate(fi)) { |
| 1072 | case DEV_STATE_STARTWAIT: | 1072 | case DEV_STATE_STARTWAIT: |
| @@ -1097,7 +1097,7 @@ dev_action_connup(fsm_instance *fi, int event, void *arg) | |||
| 1097 | static void | 1097 | static void |
| 1098 | dev_action_conndown(fsm_instance *fi, int event, void *arg) | 1098 | dev_action_conndown(fsm_instance *fi, int event, void *arg) |
| 1099 | { | 1099 | { |
| 1100 | IUCV_DBF_TEXT(trace, 3, __FUNCTION__); | 1100 | IUCV_DBF_TEXT(trace, 3, __func__); |
| 1101 | 1101 | ||
| 1102 | switch (fsm_getstate(fi)) { | 1102 | switch (fsm_getstate(fi)) { |
| 1103 | case DEV_STATE_RUNNING: | 1103 | case DEV_STATE_RUNNING: |
| @@ -1288,7 +1288,7 @@ static int netiucv_tx(struct sk_buff *skb, struct net_device *dev) | |||
| 1288 | struct netiucv_priv *privptr = netdev_priv(dev); | 1288 | struct netiucv_priv *privptr = netdev_priv(dev); |
| 1289 | int rc; | 1289 | int rc; |
| 1290 | 1290 | ||
| 1291 | IUCV_DBF_TEXT(trace, 4, __FUNCTION__); | 1291 | IUCV_DBF_TEXT(trace, 4, __func__); |
| 1292 | /** | 1292 | /** |
| 1293 | * Some sanity checks ... | 1293 | * Some sanity checks ... |
| 1294 | */ | 1294 | */ |
| @@ -1344,7 +1344,7 @@ static struct net_device_stats *netiucv_stats (struct net_device * dev) | |||
| 1344 | { | 1344 | { |
| 1345 | struct netiucv_priv *priv = netdev_priv(dev); | 1345 | struct netiucv_priv *priv = netdev_priv(dev); |
| 1346 | 1346 | ||
| 1347 | IUCV_DBF_TEXT(trace, 5, __FUNCTION__); | 1347 | IUCV_DBF_TEXT(trace, 5, __func__); |
| 1348 | return &priv->stats; | 1348 | return &priv->stats; |
| 1349 | } | 1349 | } |
| 1350 | 1350 | ||
| @@ -1360,7 +1360,7 @@ static struct net_device_stats *netiucv_stats (struct net_device * dev) | |||
| 1360 | */ | 1360 | */ |
| 1361 | static int netiucv_change_mtu(struct net_device * dev, int new_mtu) | 1361 | static int netiucv_change_mtu(struct net_device * dev, int new_mtu) |
| 1362 | { | 1362 | { |
| 1363 | IUCV_DBF_TEXT(trace, 3, __FUNCTION__); | 1363 | IUCV_DBF_TEXT(trace, 3, __func__); |
| 1364 | if (new_mtu < 576 || new_mtu > NETIUCV_MTU_MAX) { | 1364 | if (new_mtu < 576 || new_mtu > NETIUCV_MTU_MAX) { |
| 1365 | IUCV_DBF_TEXT(setup, 2, "given MTU out of valid range\n"); | 1365 | IUCV_DBF_TEXT(setup, 2, "given MTU out of valid range\n"); |
| 1366 | return -EINVAL; | 1366 | return -EINVAL; |
| @@ -1378,7 +1378,7 @@ static ssize_t user_show(struct device *dev, struct device_attribute *attr, | |||
| 1378 | { | 1378 | { |
| 1379 | struct netiucv_priv *priv = dev->driver_data; | 1379 | struct netiucv_priv *priv = dev->driver_data; |
| 1380 | 1380 | ||
| 1381 | IUCV_DBF_TEXT(trace, 5, __FUNCTION__); | 1381 | IUCV_DBF_TEXT(trace, 5, __func__); |
| 1382 | return sprintf(buf, "%s\n", netiucv_printname(priv->conn->userid)); | 1382 | return sprintf(buf, "%s\n", netiucv_printname(priv->conn->userid)); |
| 1383 | } | 1383 | } |
| 1384 | 1384 | ||
| @@ -1393,7 +1393,7 @@ static ssize_t user_write(struct device *dev, struct device_attribute *attr, | |||
| 1393 | int i; | 1393 | int i; |
| 1394 | struct iucv_connection *cp; | 1394 | struct iucv_connection *cp; |
| 1395 | 1395 | ||
| 1396 | IUCV_DBF_TEXT(trace, 3, __FUNCTION__); | 1396 | IUCV_DBF_TEXT(trace, 3, __func__); |
| 1397 | if (count > 9) { | 1397 | if (count > 9) { |
| 1398 | PRINT_WARN("netiucv: username too long (%d)!\n", (int) count); | 1398 | PRINT_WARN("netiucv: username too long (%d)!\n", (int) count); |
| 1399 | IUCV_DBF_TEXT_(setup, 2, | 1399 | IUCV_DBF_TEXT_(setup, 2, |
| @@ -1449,7 +1449,7 @@ static ssize_t buffer_show (struct device *dev, struct device_attribute *attr, | |||
| 1449 | char *buf) | 1449 | char *buf) |
| 1450 | { struct netiucv_priv *priv = dev->driver_data; | 1450 | { struct netiucv_priv *priv = dev->driver_data; |
| 1451 | 1451 | ||
| 1452 | IUCV_DBF_TEXT(trace, 5, __FUNCTION__); | 1452 | IUCV_DBF_TEXT(trace, 5, __func__); |
| 1453 | return sprintf(buf, "%d\n", priv->conn->max_buffsize); | 1453 | return sprintf(buf, "%d\n", priv->conn->max_buffsize); |
| 1454 | } | 1454 | } |
| 1455 | 1455 | ||
| @@ -1461,7 +1461,7 @@ static ssize_t buffer_write (struct device *dev, struct device_attribute *attr, | |||
| 1461 | char *e; | 1461 | char *e; |
| 1462 | int bs1; | 1462 | int bs1; |
| 1463 | 1463 | ||
| 1464 | IUCV_DBF_TEXT(trace, 3, __FUNCTION__); | 1464 | IUCV_DBF_TEXT(trace, 3, __func__); |
| 1465 | if (count >= 39) | 1465 | if (count >= 39) |
| 1466 | return -EINVAL; | 1466 | return -EINVAL; |
| 1467 | 1467 | ||
| @@ -1513,7 +1513,7 @@ static ssize_t dev_fsm_show (struct device *dev, struct device_attribute *attr, | |||
| 1513 | { | 1513 | { |
| 1514 | struct netiucv_priv *priv = dev->driver_data; | 1514 | struct netiucv_priv *priv = dev->driver_data; |
| 1515 | 1515 | ||
| 1516 | IUCV_DBF_TEXT(trace, 5, __FUNCTION__); | 1516 | IUCV_DBF_TEXT(trace, 5, __func__); |
| 1517 | return sprintf(buf, "%s\n", fsm_getstate_str(priv->fsm)); | 1517 | return sprintf(buf, "%s\n", fsm_getstate_str(priv->fsm)); |
| 1518 | } | 1518 | } |
| 1519 | 1519 | ||
| @@ -1524,7 +1524,7 @@ static ssize_t conn_fsm_show (struct device *dev, | |||
| 1524 | { | 1524 | { |
| 1525 | struct netiucv_priv *priv = dev->driver_data; | 1525 | struct netiucv_priv *priv = dev->driver_data; |
| 1526 | 1526 | ||
| 1527 | IUCV_DBF_TEXT(trace, 5, __FUNCTION__); | 1527 | IUCV_DBF_TEXT(trace, 5, __func__); |
| 1528 | return sprintf(buf, "%s\n", fsm_getstate_str(priv->conn->fsm)); | 1528 | return sprintf(buf, "%s\n", fsm_getstate_str(priv->conn->fsm)); |
| 1529 | } | 1529 | } |
| 1530 | 1530 | ||
| @@ -1535,7 +1535,7 @@ static ssize_t maxmulti_show (struct device *dev, | |||
| 1535 | { | 1535 | { |
| 1536 | struct netiucv_priv *priv = dev->driver_data; | 1536 | struct netiucv_priv *priv = dev->driver_data; |
| 1537 | 1537 | ||
| 1538 | IUCV_DBF_TEXT(trace, 5, __FUNCTION__); | 1538 | IUCV_DBF_TEXT(trace, 5, __func__); |
| 1539 | return sprintf(buf, "%ld\n", priv->conn->prof.maxmulti); | 1539 | return sprintf(buf, "%ld\n", priv->conn->prof.maxmulti); |
| 1540 | } | 1540 | } |
| 1541 | 1541 | ||
| @@ -1545,7 +1545,7 @@ static ssize_t maxmulti_write (struct device *dev, | |||
| 1545 | { | 1545 | { |
| 1546 | struct netiucv_priv *priv = dev->driver_data; | 1546 | struct netiucv_priv *priv = dev->driver_data; |
| 1547 | 1547 | ||
| 1548 | IUCV_DBF_TEXT(trace, 4, __FUNCTION__); | 1548 | IUCV_DBF_TEXT(trace, 4, __func__); |
| 1549 | priv->conn->prof.maxmulti = 0; | 1549 | priv->conn->prof.maxmulti = 0; |
| 1550 | return count; | 1550 | return count; |
| 1551 | } | 1551 | } |
| @@ -1557,7 +1557,7 @@ static ssize_t maxcq_show (struct device *dev, struct device_attribute *attr, | |||
| 1557 | { | 1557 | { |
| 1558 | struct netiucv_priv *priv = dev->driver_data; | 1558 | struct netiucv_priv *priv = dev->driver_data; |
| 1559 | 1559 | ||
| 1560 | IUCV_DBF_TEXT(trace, 5, __FUNCTION__); | 1560 | IUCV_DBF_TEXT(trace, 5, __func__); |
| 1561 | return sprintf(buf, "%ld\n", priv->conn->prof.maxcqueue); | 1561 | return sprintf(buf, "%ld\n", priv->conn->prof.maxcqueue); |
| 1562 | } | 1562 | } |
| 1563 | 1563 | ||
| @@ -1566,7 +1566,7 @@ static ssize_t maxcq_write (struct device *dev, struct device_attribute *attr, | |||
| 1566 | { | 1566 | { |
| 1567 | struct netiucv_priv *priv = dev->driver_data; | 1567 | struct netiucv_priv *priv = dev->driver_data; |
| 1568 | 1568 | ||
| 1569 | IUCV_DBF_TEXT(trace, 4, __FUNCTION__); | 1569 | IUCV_DBF_TEXT(trace, 4, __func__); |
| 1570 | priv->conn->prof.maxcqueue = 0; | 1570 | priv->conn->prof.maxcqueue = 0; |
| 1571 | return count; | 1571 | return count; |
| 1572 | } | 1572 | } |
| @@ -1578,7 +1578,7 @@ static ssize_t sdoio_show (struct device *dev, struct device_attribute *attr, | |||
| 1578 | { | 1578 | { |
| 1579 | struct netiucv_priv *priv = dev->driver_data; | 1579 | struct netiucv_priv *priv = dev->driver_data; |
| 1580 | 1580 | ||
| 1581 | IUCV_DBF_TEXT(trace, 5, __FUNCTION__); | 1581 | IUCV_DBF_TEXT(trace, 5, __func__); |
| 1582 | return sprintf(buf, "%ld\n", priv->conn->prof.doios_single); | 1582 | return sprintf(buf, "%ld\n", priv->conn->prof.doios_single); |
| 1583 | } | 1583 | } |
| 1584 | 1584 | ||
| @@ -1587,7 +1587,7 @@ static ssize_t sdoio_write (struct device *dev, struct device_attribute *attr, | |||
| 1587 | { | 1587 | { |
| 1588 | struct netiucv_priv *priv = dev->driver_data; | 1588 | struct netiucv_priv *priv = dev->driver_data; |
| 1589 | 1589 | ||
| 1590 | IUCV_DBF_TEXT(trace, 4, __FUNCTION__); | 1590 | IUCV_DBF_TEXT(trace, 4, __func__); |
| 1591 | priv->conn->prof.doios_single = 0; | 1591 | priv->conn->prof.doios_single = 0; |
| 1592 | return count; | 1592 | return count; |
| 1593 | } | 1593 | } |
| @@ -1599,7 +1599,7 @@ static ssize_t mdoio_show (struct device *dev, struct device_attribute *attr, | |||
| 1599 | { | 1599 | { |
| 1600 | struct netiucv_priv *priv = dev->driver_data; | 1600 | struct netiucv_priv *priv = dev->driver_data; |
| 1601 | 1601 | ||
| 1602 | IUCV_DBF_TEXT(trace, 5, __FUNCTION__); | 1602 | IUCV_DBF_TEXT(trace, 5, __func__); |
| 1603 | return sprintf(buf, "%ld\n", priv->conn->prof.doios_multi); | 1603 | return sprintf(buf, "%ld\n", priv->conn->prof.doios_multi); |
| 1604 | } | 1604 | } |
| 1605 | 1605 | ||
| @@ -1608,7 +1608,7 @@ static ssize_t mdoio_write (struct device *dev, struct device_attribute *attr, | |||
| 1608 | { | 1608 | { |
| 1609 | struct netiucv_priv *priv = dev->driver_data; | 1609 | struct netiucv_priv *priv = dev->driver_data; |
| 1610 | 1610 | ||
| 1611 | IUCV_DBF_TEXT(trace, 5, __FUNCTION__); | 1611 | IUCV_DBF_TEXT(trace, 5, __func__); |
| 1612 | priv->conn->prof.doios_multi = 0; | 1612 | priv->conn->prof.doios_multi = 0; |
| 1613 | return count; | 1613 | return count; |
| 1614 | } | 1614 | } |
| @@ -1620,7 +1620,7 @@ static ssize_t txlen_show (struct device *dev, struct device_attribute *attr, | |||
| 1620 | { | 1620 | { |
| 1621 | struct netiucv_priv *priv = dev->driver_data; | 1621 | struct netiucv_priv *priv = dev->driver_data; |
| 1622 | 1622 | ||
| 1623 | IUCV_DBF_TEXT(trace, 5, __FUNCTION__); | 1623 | IUCV_DBF_TEXT(trace, 5, __func__); |
| 1624 | return sprintf(buf, "%ld\n", priv->conn->prof.txlen); | 1624 | return sprintf(buf, "%ld\n", priv->conn->prof.txlen); |
| 1625 | } | 1625 | } |
| 1626 | 1626 | ||
| @@ -1629,7 +1629,7 @@ static ssize_t txlen_write (struct device *dev, struct device_attribute *attr, | |||
| 1629 | { | 1629 | { |
| 1630 | struct netiucv_priv *priv = dev->driver_data; | 1630 | struct netiucv_priv *priv = dev->driver_data; |
| 1631 | 1631 | ||
| 1632 | IUCV_DBF_TEXT(trace, 4, __FUNCTION__); | 1632 | IUCV_DBF_TEXT(trace, 4, __func__); |
| 1633 | priv->conn->prof.txlen = 0; | 1633 | priv->conn->prof.txlen = 0; |
| 1634 | return count; | 1634 | return count; |
| 1635 | } | 1635 | } |
| @@ -1641,7 +1641,7 @@ static ssize_t txtime_show (struct device *dev, struct device_attribute *attr, | |||
| 1641 | { | 1641 | { |
| 1642 | struct netiucv_priv *priv = dev->driver_data; | 1642 | struct netiucv_priv *priv = dev->driver_data; |
| 1643 | 1643 | ||
| 1644 | IUCV_DBF_TEXT(trace, 5, __FUNCTION__); | 1644 | IUCV_DBF_TEXT(trace, 5, __func__); |
| 1645 | return sprintf(buf, "%ld\n", priv->conn->prof.tx_time); | 1645 | return sprintf(buf, "%ld\n", priv->conn->prof.tx_time); |
| 1646 | } | 1646 | } |
| 1647 | 1647 | ||
| @@ -1650,7 +1650,7 @@ static ssize_t txtime_write (struct device *dev, struct device_attribute *attr, | |||
| 1650 | { | 1650 | { |
| 1651 | struct netiucv_priv *priv = dev->driver_data; | 1651 | struct netiucv_priv *priv = dev->driver_data; |
| 1652 | 1652 | ||
| 1653 | IUCV_DBF_TEXT(trace, 4, __FUNCTION__); | 1653 | IUCV_DBF_TEXT(trace, 4, __func__); |
| 1654 | priv->conn->prof.tx_time = 0; | 1654 | priv->conn->prof.tx_time = 0; |
| 1655 | return count; | 1655 | return count; |
| 1656 | } | 1656 | } |
| @@ -1662,7 +1662,7 @@ static ssize_t txpend_show (struct device *dev, struct device_attribute *attr, | |||
| 1662 | { | 1662 | { |
| 1663 | struct netiucv_priv *priv = dev->driver_data; | 1663 | struct netiucv_priv *priv = dev->driver_data; |
| 1664 | 1664 | ||
| 1665 | IUCV_DBF_TEXT(trace, 5, __FUNCTION__); | 1665 | IUCV_DBF_TEXT(trace, 5, __func__); |
| 1666 | return sprintf(buf, "%ld\n", priv->conn->prof.tx_pending); | 1666 | return sprintf(buf, "%ld\n", priv->conn->prof.tx_pending); |
| 1667 | } | 1667 | } |
| 1668 | 1668 | ||
| @@ -1671,7 +1671,7 @@ static ssize_t txpend_write (struct device *dev, struct device_attribute *attr, | |||
| 1671 | { | 1671 | { |
| 1672 | struct netiucv_priv *priv = dev->driver_data; | 1672 | struct netiucv_priv *priv = dev->driver_data; |
| 1673 | 1673 | ||
| 1674 | IUCV_DBF_TEXT(trace, 4, __FUNCTION__); | 1674 | IUCV_DBF_TEXT(trace, 4, __func__); |
| 1675 | priv->conn->prof.tx_pending = 0; | 1675 | priv->conn->prof.tx_pending = 0; |
| 1676 | return count; | 1676 | return count; |
| 1677 | } | 1677 | } |
| @@ -1683,7 +1683,7 @@ static ssize_t txmpnd_show (struct device *dev, struct device_attribute *attr, | |||
| 1683 | { | 1683 | { |
| 1684 | struct netiucv_priv *priv = dev->driver_data; | 1684 | struct netiucv_priv *priv = dev->driver_data; |
| 1685 | 1685 | ||
| 1686 | IUCV_DBF_TEXT(trace, 5, __FUNCTION__); | 1686 | IUCV_DBF_TEXT(trace, 5, __func__); |
| 1687 | return sprintf(buf, "%ld\n", priv->conn->prof.tx_max_pending); | 1687 | return sprintf(buf, "%ld\n", priv->conn->prof.tx_max_pending); |
| 1688 | } | 1688 | } |
| 1689 | 1689 | ||
| @@ -1692,7 +1692,7 @@ static ssize_t txmpnd_write (struct device *dev, struct device_attribute *attr, | |||
| 1692 | { | 1692 | { |
| 1693 | struct netiucv_priv *priv = dev->driver_data; | 1693 | struct netiucv_priv *priv = dev->driver_data; |
| 1694 | 1694 | ||
| 1695 | IUCV_DBF_TEXT(trace, 4, __FUNCTION__); | 1695 | IUCV_DBF_TEXT(trace, 4, __func__); |
| 1696 | priv->conn->prof.tx_max_pending = 0; | 1696 | priv->conn->prof.tx_max_pending = 0; |
| 1697 | return count; | 1697 | return count; |
| 1698 | } | 1698 | } |
| @@ -1732,7 +1732,7 @@ static int netiucv_add_files(struct device *dev) | |||
| 1732 | { | 1732 | { |
| 1733 | int ret; | 1733 | int ret; |
| 1734 | 1734 | ||
| 1735 | IUCV_DBF_TEXT(trace, 3, __FUNCTION__); | 1735 | IUCV_DBF_TEXT(trace, 3, __func__); |
| 1736 | ret = sysfs_create_group(&dev->kobj, &netiucv_attr_group); | 1736 | ret = sysfs_create_group(&dev->kobj, &netiucv_attr_group); |
| 1737 | if (ret) | 1737 | if (ret) |
| 1738 | return ret; | 1738 | return ret; |
| @@ -1744,7 +1744,7 @@ static int netiucv_add_files(struct device *dev) | |||
| 1744 | 1744 | ||
| 1745 | static void netiucv_remove_files(struct device *dev) | 1745 | static void netiucv_remove_files(struct device *dev) |
| 1746 | { | 1746 | { |
| 1747 | IUCV_DBF_TEXT(trace, 3, __FUNCTION__); | 1747 | IUCV_DBF_TEXT(trace, 3, __func__); |
| 1748 | sysfs_remove_group(&dev->kobj, &netiucv_stat_attr_group); | 1748 | sysfs_remove_group(&dev->kobj, &netiucv_stat_attr_group); |
| 1749 | sysfs_remove_group(&dev->kobj, &netiucv_attr_group); | 1749 | sysfs_remove_group(&dev->kobj, &netiucv_attr_group); |
| 1750 | } | 1750 | } |
| @@ -1756,7 +1756,7 @@ static int netiucv_register_device(struct net_device *ndev) | |||
| 1756 | int ret; | 1756 | int ret; |
| 1757 | 1757 | ||
| 1758 | 1758 | ||
| 1759 | IUCV_DBF_TEXT(trace, 3, __FUNCTION__); | 1759 | IUCV_DBF_TEXT(trace, 3, __func__); |
| 1760 | 1760 | ||
| 1761 | if (dev) { | 1761 | if (dev) { |
| 1762 | snprintf(dev->bus_id, BUS_ID_SIZE, "net%s", ndev->name); | 1762 | snprintf(dev->bus_id, BUS_ID_SIZE, "net%s", ndev->name); |
| @@ -1792,7 +1792,7 @@ out_unreg: | |||
| 1792 | 1792 | ||
| 1793 | static void netiucv_unregister_device(struct device *dev) | 1793 | static void netiucv_unregister_device(struct device *dev) |
| 1794 | { | 1794 | { |
| 1795 | IUCV_DBF_TEXT(trace, 3, __FUNCTION__); | 1795 | IUCV_DBF_TEXT(trace, 3, __func__); |
| 1796 | netiucv_remove_files(dev); | 1796 | netiucv_remove_files(dev); |
| 1797 | device_unregister(dev); | 1797 | device_unregister(dev); |
| 1798 | } | 1798 | } |
| @@ -1857,7 +1857,7 @@ out: | |||
| 1857 | */ | 1857 | */ |
| 1858 | static void netiucv_remove_connection(struct iucv_connection *conn) | 1858 | static void netiucv_remove_connection(struct iucv_connection *conn) |
| 1859 | { | 1859 | { |
| 1860 | IUCV_DBF_TEXT(trace, 3, __FUNCTION__); | 1860 | IUCV_DBF_TEXT(trace, 3, __func__); |
| 1861 | write_lock_bh(&iucv_connection_rwlock); | 1861 | write_lock_bh(&iucv_connection_rwlock); |
| 1862 | list_del_init(&conn->list); | 1862 | list_del_init(&conn->list); |
| 1863 | write_unlock_bh(&iucv_connection_rwlock); | 1863 | write_unlock_bh(&iucv_connection_rwlock); |
| @@ -1881,7 +1881,7 @@ static void netiucv_free_netdevice(struct net_device *dev) | |||
| 1881 | { | 1881 | { |
| 1882 | struct netiucv_priv *privptr = netdev_priv(dev); | 1882 | struct netiucv_priv *privptr = netdev_priv(dev); |
| 1883 | 1883 | ||
| 1884 | IUCV_DBF_TEXT(trace, 3, __FUNCTION__); | 1884 | IUCV_DBF_TEXT(trace, 3, __func__); |
| 1885 | 1885 | ||
| 1886 | if (!dev) | 1886 | if (!dev) |
| 1887 | return; | 1887 | return; |
| @@ -1963,7 +1963,7 @@ static ssize_t conn_write(struct device_driver *drv, | |||
| 1963 | struct netiucv_priv *priv; | 1963 | struct netiucv_priv *priv; |
| 1964 | struct iucv_connection *cp; | 1964 | struct iucv_connection *cp; |
| 1965 | 1965 | ||
| 1966 | IUCV_DBF_TEXT(trace, 3, __FUNCTION__); | 1966 | IUCV_DBF_TEXT(trace, 3, __func__); |
| 1967 | if (count>9) { | 1967 | if (count>9) { |
| 1968 | PRINT_WARN("netiucv: username too long (%d)!\n", (int)count); | 1968 | PRINT_WARN("netiucv: username too long (%d)!\n", (int)count); |
| 1969 | IUCV_DBF_TEXT(setup, 2, "conn_write: too long\n"); | 1969 | IUCV_DBF_TEXT(setup, 2, "conn_write: too long\n"); |
| @@ -2048,7 +2048,7 @@ static ssize_t remove_write (struct device_driver *drv, | |||
| 2048 | const char *p; | 2048 | const char *p; |
| 2049 | int i; | 2049 | int i; |
| 2050 | 2050 | ||
| 2051 | IUCV_DBF_TEXT(trace, 3, __FUNCTION__); | 2051 | IUCV_DBF_TEXT(trace, 3, __func__); |
| 2052 | 2052 | ||
| 2053 | if (count >= IFNAMSIZ) | 2053 | if (count >= IFNAMSIZ) |
| 2054 | count = IFNAMSIZ - 1;; | 2054 | count = IFNAMSIZ - 1;; |
| @@ -2116,7 +2116,7 @@ static void __exit netiucv_exit(void) | |||
| 2116 | struct netiucv_priv *priv; | 2116 | struct netiucv_priv *priv; |
| 2117 | struct device *dev; | 2117 | struct device *dev; |
| 2118 | 2118 | ||
| 2119 | IUCV_DBF_TEXT(trace, 3, __FUNCTION__); | 2119 | IUCV_DBF_TEXT(trace, 3, __func__); |
| 2120 | while (!list_empty(&iucv_connection_list)) { | 2120 | while (!list_empty(&iucv_connection_list)) { |
| 2121 | cp = list_entry(iucv_connection_list.next, | 2121 | cp = list_entry(iucv_connection_list.next, |
| 2122 | struct iucv_connection, list); | 2122 | struct iucv_connection, list); |
| @@ -2146,8 +2146,7 @@ static int __init netiucv_init(void) | |||
| 2146 | rc = iucv_register(&netiucv_handler, 1); | 2146 | rc = iucv_register(&netiucv_handler, 1); |
| 2147 | if (rc) | 2147 | if (rc) |
| 2148 | goto out_dbf; | 2148 | goto out_dbf; |
| 2149 | IUCV_DBF_TEXT(trace, 3, __FUNCTION__); | 2149 | IUCV_DBF_TEXT(trace, 3, __func__); |
| 2150 | netiucv_driver.groups = netiucv_drv_attr_groups; | ||
| 2151 | rc = driver_register(&netiucv_driver); | 2150 | rc = driver_register(&netiucv_driver); |
| 2152 | if (rc) { | 2151 | if (rc) { |
| 2153 | PRINT_ERR("NETIUCV: failed to register driver.\n"); | 2152 | PRINT_ERR("NETIUCV: failed to register driver.\n"); |
diff --git a/drivers/s390/s390mach.c b/drivers/s390/s390mach.c index 644a06eba828..4d4b54277c43 100644 --- a/drivers/s390/s390mach.c +++ b/drivers/s390/s390mach.c | |||
| @@ -59,15 +59,15 @@ repeat: | |||
| 59 | 59 | ||
| 60 | printk(KERN_WARNING"%s: Code does not support more " | 60 | printk(KERN_WARNING"%s: Code does not support more " |
| 61 | "than two chained crws; please report to " | 61 | "than two chained crws; please report to " |
| 62 | "linux390@de.ibm.com!\n", __FUNCTION__); | 62 | "linux390@de.ibm.com!\n", __func__); |
| 63 | ccode = stcrw(&tmp_crw); | 63 | ccode = stcrw(&tmp_crw); |
| 64 | printk(KERN_WARNING"%s: crw reports slct=%d, oflw=%d, " | 64 | printk(KERN_WARNING"%s: crw reports slct=%d, oflw=%d, " |
| 65 | "chn=%d, rsc=%X, anc=%d, erc=%X, rsid=%X\n", | 65 | "chn=%d, rsc=%X, anc=%d, erc=%X, rsid=%X\n", |
| 66 | __FUNCTION__, tmp_crw.slct, tmp_crw.oflw, | 66 | __func__, tmp_crw.slct, tmp_crw.oflw, |
| 67 | tmp_crw.chn, tmp_crw.rsc, tmp_crw.anc, | 67 | tmp_crw.chn, tmp_crw.rsc, tmp_crw.anc, |
| 68 | tmp_crw.erc, tmp_crw.rsid); | 68 | tmp_crw.erc, tmp_crw.rsid); |
| 69 | printk(KERN_WARNING"%s: This was crw number %x in the " | 69 | printk(KERN_WARNING"%s: This was crw number %x in the " |
| 70 | "chain\n", __FUNCTION__, chain); | 70 | "chain\n", __func__, chain); |
| 71 | if (ccode != 0) | 71 | if (ccode != 0) |
| 72 | break; | 72 | break; |
| 73 | chain = tmp_crw.chn ? chain + 1 : 0; | 73 | chain = tmp_crw.chn ? chain + 1 : 0; |
| @@ -83,7 +83,7 @@ repeat: | |||
| 83 | crw[chain].rsid); | 83 | crw[chain].rsid); |
| 84 | /* Check for overflows. */ | 84 | /* Check for overflows. */ |
| 85 | if (crw[chain].oflw) { | 85 | if (crw[chain].oflw) { |
| 86 | pr_debug("%s: crw overflow detected!\n", __FUNCTION__); | 86 | pr_debug("%s: crw overflow detected!\n", __func__); |
| 87 | css_schedule_eval_all(); | 87 | css_schedule_eval_all(); |
| 88 | chain = 0; | 88 | chain = 0; |
| 89 | continue; | 89 | continue; |
diff --git a/drivers/s390/s390mach.h b/drivers/s390/s390mach.h index d3ca4281a494..ca681f9b67fc 100644 --- a/drivers/s390/s390mach.h +++ b/drivers/s390/s390mach.h | |||
| @@ -105,4 +105,8 @@ static inline int stcrw(struct crw *pcrw ) | |||
| 105 | #define ED_ETR_SYNC 12 /* External damage ETR sync check */ | 105 | #define ED_ETR_SYNC 12 /* External damage ETR sync check */ |
| 106 | #define ED_ETR_SWITCH 13 /* External damage ETR switch to local */ | 106 | #define ED_ETR_SWITCH 13 /* External damage ETR switch to local */ |
| 107 | 107 | ||
| 108 | struct pt_regs; | ||
| 109 | |||
| 110 | void s390_handle_mcck(void); | ||
| 111 | void s390_do_machine_check(struct pt_regs *regs); | ||
| 108 | #endif /* __s390mach */ | 112 | #endif /* __s390mach */ |
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h index 9e9f6c1e4e5d..45a7cd98c140 100644 --- a/drivers/s390/scsi/zfcp_def.h +++ b/drivers/s390/scsi/zfcp_def.h | |||
| @@ -539,7 +539,7 @@ struct zfcp_rc_entry { | |||
| 539 | 539 | ||
| 540 | /* logging routine for zfcp */ | 540 | /* logging routine for zfcp */ |
| 541 | #define _ZFCP_LOG(fmt, args...) \ | 541 | #define _ZFCP_LOG(fmt, args...) \ |
| 542 | printk(KERN_ERR ZFCP_NAME": %s(%d): " fmt, __FUNCTION__, \ | 542 | printk(KERN_ERR ZFCP_NAME": %s(%d): " fmt, __func__, \ |
| 543 | __LINE__ , ##args) | 543 | __LINE__ , ##args) |
| 544 | 544 | ||
| 545 | #define ZFCP_LOG(level, fmt, args...) \ | 545 | #define ZFCP_LOG(level, fmt, args...) \ |
diff --git a/drivers/s390/sysinfo.c b/drivers/s390/sysinfo.c index 291ff6235fe2..c3e4ab07b9cc 100644 --- a/drivers/s390/sysinfo.c +++ b/drivers/s390/sysinfo.c | |||
| @@ -11,111 +11,13 @@ | |||
| 11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
| 12 | #include <linux/delay.h> | 12 | #include <linux/delay.h> |
| 13 | #include <asm/ebcdic.h> | 13 | #include <asm/ebcdic.h> |
| 14 | #include <asm/sysinfo.h> | ||
| 14 | 15 | ||
| 15 | /* Sigh, math-emu. Don't ask. */ | 16 | /* Sigh, math-emu. Don't ask. */ |
| 16 | #include <asm/sfp-util.h> | 17 | #include <asm/sfp-util.h> |
| 17 | #include <math-emu/soft-fp.h> | 18 | #include <math-emu/soft-fp.h> |
| 18 | #include <math-emu/single.h> | 19 | #include <math-emu/single.h> |
| 19 | 20 | ||
| 20 | struct sysinfo_1_1_1 { | ||
| 21 | char reserved_0[32]; | ||
| 22 | char manufacturer[16]; | ||
| 23 | char type[4]; | ||
| 24 | char reserved_1[12]; | ||
| 25 | char model_capacity[16]; | ||
| 26 | char sequence[16]; | ||
| 27 | char plant[4]; | ||
| 28 | char model[16]; | ||
| 29 | }; | ||
| 30 | |||
| 31 | struct sysinfo_1_2_1 { | ||
| 32 | char reserved_0[80]; | ||
| 33 | char sequence[16]; | ||
| 34 | char plant[4]; | ||
| 35 | char reserved_1[2]; | ||
| 36 | unsigned short cpu_address; | ||
| 37 | }; | ||
| 38 | |||
| 39 | struct sysinfo_1_2_2 { | ||
| 40 | char format; | ||
| 41 | char reserved_0[1]; | ||
| 42 | unsigned short acc_offset; | ||
| 43 | char reserved_1[24]; | ||
| 44 | unsigned int secondary_capability; | ||
| 45 | unsigned int capability; | ||
| 46 | unsigned short cpus_total; | ||
| 47 | unsigned short cpus_configured; | ||
| 48 | unsigned short cpus_standby; | ||
| 49 | unsigned short cpus_reserved; | ||
| 50 | unsigned short adjustment[0]; | ||
| 51 | }; | ||
| 52 | |||
| 53 | struct sysinfo_1_2_2_extension { | ||
| 54 | unsigned int alt_capability; | ||
| 55 | unsigned short alt_adjustment[0]; | ||
| 56 | }; | ||
| 57 | |||
| 58 | struct sysinfo_2_2_1 { | ||
| 59 | char reserved_0[80]; | ||
| 60 | char sequence[16]; | ||
| 61 | char plant[4]; | ||
| 62 | unsigned short cpu_id; | ||
| 63 | unsigned short cpu_address; | ||
| 64 | }; | ||
| 65 | |||
| 66 | struct sysinfo_2_2_2 { | ||
| 67 | char reserved_0[32]; | ||
| 68 | unsigned short lpar_number; | ||
| 69 | char reserved_1; | ||
| 70 | unsigned char characteristics; | ||
| 71 | unsigned short cpus_total; | ||
| 72 | unsigned short cpus_configured; | ||
| 73 | unsigned short cpus_standby; | ||
| 74 | unsigned short cpus_reserved; | ||
| 75 | char name[8]; | ||
| 76 | unsigned int caf; | ||
| 77 | char reserved_2[16]; | ||
| 78 | unsigned short cpus_dedicated; | ||
| 79 | unsigned short cpus_shared; | ||
| 80 | }; | ||
| 81 | |||
| 82 | #define LPAR_CHAR_DEDICATED (1 << 7) | ||
| 83 | #define LPAR_CHAR_SHARED (1 << 6) | ||
| 84 | #define LPAR_CHAR_LIMITED (1 << 5) | ||
| 85 | |||
| 86 | struct sysinfo_3_2_2 { | ||
| 87 | char reserved_0[31]; | ||
| 88 | unsigned char count; | ||
| 89 | struct { | ||
| 90 | char reserved_0[4]; | ||
| 91 | unsigned short cpus_total; | ||
| 92 | unsigned short cpus_configured; | ||
| 93 | unsigned short cpus_standby; | ||
| 94 | unsigned short cpus_reserved; | ||
| 95 | char name[8]; | ||
| 96 | unsigned int caf; | ||
| 97 | char cpi[16]; | ||
| 98 | char reserved_1[24]; | ||
| 99 | |||
| 100 | } vm[8]; | ||
| 101 | }; | ||
| 102 | |||
| 103 | static inline int stsi(void *sysinfo, int fc, int sel1, int sel2) | ||
| 104 | { | ||
| 105 | register int r0 asm("0") = (fc << 28) | sel1; | ||
| 106 | register int r1 asm("1") = sel2; | ||
| 107 | |||
| 108 | asm volatile( | ||
| 109 | " stsi 0(%2)\n" | ||
| 110 | "0: jz 2f\n" | ||
| 111 | "1: lhi %0,%3\n" | ||
| 112 | "2:\n" | ||
| 113 | EX_TABLE(0b,1b) | ||
| 114 | : "+d" (r0) : "d" (r1), "a" (sysinfo), "K" (-ENOSYS) | ||
| 115 | : "cc", "memory" ); | ||
| 116 | return r0; | ||
| 117 | } | ||
| 118 | |||
| 119 | static inline int stsi_0(void) | 21 | static inline int stsi_0(void) |
| 120 | { | 22 | { |
| 121 | int rc = stsi (NULL, 0, 0, 0); | 23 | int rc = stsi (NULL, 0, 0, 0); |
| @@ -133,6 +35,8 @@ static int stsi_1_1_1(struct sysinfo_1_1_1 *info, char *page, int len) | |||
| 133 | EBCASC(info->sequence, sizeof(info->sequence)); | 35 | EBCASC(info->sequence, sizeof(info->sequence)); |
| 134 | EBCASC(info->plant, sizeof(info->plant)); | 36 | EBCASC(info->plant, sizeof(info->plant)); |
| 135 | EBCASC(info->model_capacity, sizeof(info->model_capacity)); | 37 | EBCASC(info->model_capacity, sizeof(info->model_capacity)); |
| 38 | EBCASC(info->model_perm_cap, sizeof(info->model_perm_cap)); | ||
| 39 | EBCASC(info->model_temp_cap, sizeof(info->model_temp_cap)); | ||
| 136 | len += sprintf(page + len, "Manufacturer: %-16.16s\n", | 40 | len += sprintf(page + len, "Manufacturer: %-16.16s\n", |
| 137 | info->manufacturer); | 41 | info->manufacturer); |
| 138 | len += sprintf(page + len, "Type: %-4.4s\n", | 42 | len += sprintf(page + len, "Type: %-4.4s\n", |
| @@ -155,8 +59,18 @@ static int stsi_1_1_1(struct sysinfo_1_1_1 *info, char *page, int len) | |||
| 155 | info->sequence); | 59 | info->sequence); |
| 156 | len += sprintf(page + len, "Plant: %-4.4s\n", | 60 | len += sprintf(page + len, "Plant: %-4.4s\n", |
| 157 | info->plant); | 61 | info->plant); |
| 158 | len += sprintf(page + len, "Model Capacity: %-16.16s\n", | 62 | len += sprintf(page + len, "Model Capacity: %-16.16s %08u\n", |
| 159 | info->model_capacity); | 63 | info->model_capacity, *(u32 *) info->model_cap_rating); |
| 64 | if (info->model_perm_cap[0] != '\0') | ||
| 65 | len += sprintf(page + len, | ||
| 66 | "Model Perm. Capacity: %-16.16s %08u\n", | ||
| 67 | info->model_perm_cap, | ||
| 68 | *(u32 *) info->model_perm_cap_rating); | ||
| 69 | if (info->model_temp_cap[0] != '\0') | ||
| 70 | len += sprintf(page + len, | ||
| 71 | "Model Temp. Capacity: %-16.16s %08u\n", | ||
| 72 | info->model_temp_cap, | ||
| 73 | *(u32 *) info->model_temp_cap_rating); | ||
| 160 | return len; | 74 | return len; |
| 161 | } | 75 | } |
| 162 | 76 | ||
