]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/s390/scsi/zfcp_aux.c
[SCSI] zfcp: fix: allow more time for adapter initialization
[linux-2.6-omap-h63xx.git] / drivers / s390 / scsi / zfcp_aux.c
index 6a43322ccb0a570a99e9ebe1dfabec475728ca47..6bb4d332b474b08116edc23ae69c3ba4e5bf7343 100644 (file)
@@ -52,19 +52,18 @@ static inline int zfcp_sg_list_copy_from_user(struct zfcp_sg_list *,
 static inline int zfcp_sg_list_copy_to_user(void __user *,
                                            struct zfcp_sg_list *, size_t);
 
-static int zfcp_cfdc_dev_ioctl(struct inode *, struct file *,
-       unsigned int, unsigned long);
+static long zfcp_cfdc_dev_ioctl(struct file *, unsigned int, unsigned long);
 
 #define ZFCP_CFDC_IOC_MAGIC                     0xDD
 #define ZFCP_CFDC_IOC \
        _IOWR(ZFCP_CFDC_IOC_MAGIC, 0, struct zfcp_cfdc_sense_data)
 
-#ifdef CONFIG_COMPAT
-static struct ioctl_trans zfcp_ioctl_trans = {ZFCP_CFDC_IOC, (void*) sys_ioctl};
-#endif
 
 static struct file_operations zfcp_cfdc_fops = {
-       .ioctl = zfcp_cfdc_dev_ioctl
+       .unlocked_ioctl = zfcp_cfdc_dev_ioctl,
+#ifdef CONFIG_COMPAT
+       .compat_ioctl = zfcp_cfdc_dev_ioctl
+#endif
 };
 
 static struct miscdevice zfcp_cfdc_misc = {
@@ -89,20 +88,15 @@ MODULE_DESCRIPTION
     ("FCP (SCSI over Fibre Channel) HBA driver for IBM eServer zSeries");
 MODULE_LICENSE("GPL");
 
-module_param(device, charp, 0);
+module_param(device, charp, 0400);
 MODULE_PARM_DESC(device, "specify initial device");
 
-module_param(loglevel, uint, 0);
+module_param(loglevel, uint, 0400);
 MODULE_PARM_DESC(loglevel,
                 "log levels, 8 nibbles: "
                 "FC ERP QDIO CIO Config FSF SCSI Other, "
                 "levels: 0=none 1=normal 2=devel 3=trace");
 
-#ifdef ZFCP_PRINT_FLAGS
-u32 flags_dump = 0;
-module_param(flags_dump, uint, 0);
-#endif
-
 /****************************************************************/
 /************** Functions without logging ***********************/
 /****************************************************************/
@@ -308,23 +302,16 @@ zfcp_module_init(void)
        if (!zfcp_transport_template)
                return -ENODEV;
 
-       retval = register_ioctl32_conversion(zfcp_ioctl_trans.cmd,
-                                            zfcp_ioctl_trans.handler);
-       if (retval != 0) {
-               ZFCP_LOG_INFO("registration of ioctl32 conversion failed\n");
-               goto out;
-       }
-
        retval = misc_register(&zfcp_cfdc_misc);
        if (retval != 0) {
                ZFCP_LOG_INFO("registration of misc device "
                              "zfcp_cfdc failed\n");
-               goto out_misc_register;
-       } else {
-               ZFCP_LOG_TRACE("major/minor for zfcp_cfdc: %d/%d\n",
-                              ZFCP_CFDC_DEV_MAJOR, zfcp_cfdc_misc.minor);
+               goto out;
        }
 
+       ZFCP_LOG_TRACE("major/minor for zfcp_cfdc: %d/%d\n",
+                      ZFCP_CFDC_DEV_MAJOR, zfcp_cfdc_misc.minor);
+
        /* Initialise proc semaphores */
        sema_init(&zfcp_data.config_sema, 1);
 
@@ -348,8 +335,6 @@ zfcp_module_init(void)
 
  out_ccw_register:
        misc_deregister(&zfcp_cfdc_misc);
- out_misc_register:
-       unregister_ioctl32_conversion(zfcp_ioctl_trans.cmd);
  out:
        return retval;
 }
@@ -370,9 +355,9 @@ zfcp_module_init(void)
  *              -EPERM      - Cannot create or queue FSF request or create SBALs
  *              -ERESTARTSYS- Received signal (is mapped to EAGAIN by VFS)
  */
-static int
-zfcp_cfdc_dev_ioctl(struct inode *inode, struct file *file,
-                    unsigned int command, unsigned long buffer)
+static long
+zfcp_cfdc_dev_ioctl(struct file *file, unsigned int command,
+                   unsigned long buffer)
 {
        struct zfcp_cfdc_sense_data *sense_data, __user *sense_data_user;
        struct zfcp_adapter *adapter = NULL;
@@ -1493,19 +1478,15 @@ zfcp_fsf_incoming_els_rscn(struct zfcp_adapter *adapter,
                fcp_rscn_element++;
                switch (fcp_rscn_element->addr_format) {
                case ZFCP_PORT_ADDRESS:
-                       ZFCP_LOG_FLAGS(1, "ZFCP_PORT_ADDRESS\n");
                        range_mask = ZFCP_PORTS_RANGE_PORT;
                        break;
                case ZFCP_AREA_ADDRESS:
-                       ZFCP_LOG_FLAGS(1, "ZFCP_AREA_ADDRESS\n");
                        range_mask = ZFCP_PORTS_RANGE_AREA;
                        break;
                case ZFCP_DOMAIN_ADDRESS:
-                       ZFCP_LOG_FLAGS(1, "ZFCP_DOMAIN_ADDRESS\n");
                        range_mask = ZFCP_PORTS_RANGE_DOMAIN;
                        break;
                case ZFCP_FABRIC_ADDRESS:
-                       ZFCP_LOG_FLAGS(1, "ZFCP_FABRIC_ADDRESS\n");
                        range_mask = ZFCP_PORTS_RANGE_FABRIC;
                        break;
                default:
@@ -1772,7 +1753,10 @@ static void zfcp_ns_gid_pn_handler(unsigned long data)
        ct_iu_req = zfcp_sg_to_address(ct->req);
        ct_iu_resp = zfcp_sg_to_address(ct->resp);
 
-       if ((ct->status != 0) || zfcp_check_ct_response(&ct_iu_resp->header)) {
+       if (ct->status != 0)
+               goto failed;
+
+       if (zfcp_check_ct_response(&ct_iu_resp->header)) {
                /* FIXME: do we need some specific erp entry points */
                atomic_set_mask(ZFCP_STATUS_PORT_INVALID_WWPN, &port->status);
                goto failed;