]> err.no Git - linux-2.6/blobdiff - drivers/scsi/3w-9xxx.c
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
[linux-2.6] / drivers / scsi / 3w-9xxx.c
index fcad9fd739716814c21fa7462228f9f1c0317010..fb14014ee16e190f6688daba25684a19db216082 100644 (file)
@@ -1163,13 +1163,12 @@ static int twa_initialize_device_extension(TW_Device_Extension *tw_dev)
        }
 
        /* Allocate event info space */
-       tw_dev->event_queue[0] = kmalloc(sizeof(TW_Event) * TW_Q_LENGTH, GFP_KERNEL);
+       tw_dev->event_queue[0] = kcalloc(TW_Q_LENGTH, sizeof(TW_Event), GFP_KERNEL);
        if (!tw_dev->event_queue[0]) {
                TW_PRINTK(tw_dev->host, TW_DRIVER, 0x18, "Event info memory allocation failed");
                goto out;
        }
 
-       memset(tw_dev->event_queue[0], 0, sizeof(TW_Event) * TW_Q_LENGTH);
 
        for (i = 0; i < TW_Q_LENGTH; i++) {
                tw_dev->event_queue[i] = (TW_Event *)((unsigned char *)tw_dev->event_queue[0] + (i * sizeof(TW_Event)));
@@ -1991,6 +1990,7 @@ static struct scsi_host_template driver_template = {
        .max_sectors            = TW_MAX_SECTORS,
        .cmd_per_lun            = TW_MAX_CMDS_PER_LUN,
        .use_clustering         = ENABLE_CLUSTERING,
+       .use_sg_chaining        = ENABLE_SG_CHAINING,
        .shost_attrs            = twa_host_attrs,
        .emulated               = 1
 };