]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/s390/scsi/zfcp_aux.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm
[linux-2.6-omap-h63xx.git] / drivers / s390 / scsi / zfcp_aux.c
index 7507067351bd83b0ff00b20d890ae7a4671a5ed2..874b55ed00a3473f44a71227e69c33fa70eba04e 100644 (file)
@@ -559,10 +559,9 @@ zfcp_sg_list_alloc(struct zfcp_sg_list *sg_list, size_t size)
                retval = -ENOMEM;
                goto out;
        }
+       sg_init_table(sg_list->sg, sg_list->count);
 
        for (i = 0, sg = sg_list->sg; i < sg_list->count; i++, sg++) {
-               sg->length = min(size, PAGE_SIZE);
-               sg->offset = 0;
                address = (void *) get_zeroed_page(GFP_KERNEL);
                if (address == NULL) {
                        sg_list->count = i;
@@ -570,7 +569,7 @@ zfcp_sg_list_alloc(struct zfcp_sg_list *sg_list, size_t size)
                        retval = -ENOMEM;
                        goto out;
                }
-               zfcp_address_to_sg(address, sg);
+               zfcp_address_to_sg(address, sg, min(size, PAGE_SIZE));
                size -= sg->length;
        }
 
@@ -845,8 +844,6 @@ zfcp_unit_enqueue(struct zfcp_port *port, fcp_lun_t fcp_lun)
        unit->sysfs_device.release = zfcp_sysfs_unit_release;
        dev_set_drvdata(&unit->sysfs_device, unit);
 
-       init_waitqueue_head(&unit->scsi_scan_wq);
-
        /* mark unit unusable as long as sysfs registration is not complete */
        atomic_set_mask(ZFCP_STATUS_COMMON_REMOVE, &unit->status);
 
@@ -1517,13 +1514,13 @@ zfcp_gid_pn_buffers_alloc(struct zfcp_gid_pn_data **gid_pn, mempool_t *pool)
                 return -ENOMEM;
 
        memset(data, 0, sizeof(*data));
+       sg_init_table(&data->req , 1);
+       sg_init_table(&data->resp , 1);
         data->ct.req = &data->req;
         data->ct.resp = &data->resp;
        data->ct.req_count = data->ct.resp_count = 1;
-       zfcp_address_to_sg(&data->ct_iu_req, &data->req);
-        zfcp_address_to_sg(&data->ct_iu_resp, &data->resp);
-        data->req.length = sizeof(struct ct_iu_gid_pn_req);
-        data->resp.length = sizeof(struct ct_iu_gid_pn_resp);
+       zfcp_address_to_sg(&data->ct_iu_req, &data->req, sizeof(struct ct_iu_gid_pn_req));
+        zfcp_address_to_sg(&data->ct_iu_resp, &data->resp, sizeof(struct ct_iu_gid_pn_resp));
 
        *gid_pn = data;
        return 0;