newcommand->request_id__lunl =
                        cpu_to_le16(TW_REQ_LUN_IN(TW_LUN_OUT(newcommand->request_id__lunl), request_id));
                if (length) {
-                       newcommand->sg_list[0].address = TW_CPU_TO_SGL(dma_handle + sizeof(TW_Ioctl_Buf_Apache) - 1);
+                       newcommand->sg_list[0].address = TW_CPU_TO_SGL(dma_handle + sizeof(TW_Ioctl_Buf_Apache));
                        newcommand->sg_list[0].length = TW_CPU_TO_SGL(length);
                }
                newcommand->sgl_entries__lunh =
                if (TW_SGL_OUT(oldcommand->opcode__sgloffset)) {
                        /* Load the sg list */
                        sgl = (TW_SG_Entry_ISO *)((u32 *)oldcommand+oldcommand->size - (sizeof(TW_SG_Entry_ISO)/4) + pae + (sizeof(dma_addr_t) > 4 ? 1 : 0));
-                       sgl->address = TW_CPU_TO_SGL(dma_handle + sizeof(TW_Ioctl_Buf_Apache) - 1);
+                       sgl->address = TW_CPU_TO_SGL(dma_handle + sizeof(TW_Ioctl_Buf_Apache));
                        sgl->length = TW_CPU_TO_SGL(length);
                        oldcommand->size += pae;
                        oldcommand->size += sizeof(dma_addr_t) > 4 ? 1 : 0;
        data_buffer_length_adjusted = (driver_command.buffer_length + 511) & ~511;
 
        /* Now allocate ioctl buf memory */
-       cpu_addr = dma_alloc_coherent(&tw_dev->tw_pci_dev->dev, data_buffer_length_adjusted+sizeof(TW_Ioctl_Buf_Apache) - 1, &dma_handle, GFP_KERNEL);
+       cpu_addr = dma_alloc_coherent(&tw_dev->tw_pci_dev->dev, data_buffer_length_adjusted + sizeof(TW_Ioctl_Buf_Apache), &dma_handle, GFP_KERNEL);
        if (!cpu_addr) {
                retval = -ENOMEM;
                goto out2;
        tw_ioctl = (TW_Ioctl_Buf_Apache *)cpu_addr;
 
        /* Now copy down the entire ioctl */
-       if (copy_from_user(tw_ioctl, argp, driver_command.buffer_length + sizeof(TW_Ioctl_Buf_Apache) - 1))
+       if (copy_from_user(tw_ioctl, argp, driver_command.buffer_length + sizeof(TW_Ioctl_Buf_Apache)))
                goto out3;
 
        /* See which ioctl we are doing */
        }
 
        /* Now copy the entire response to userspace */
-       if (copy_to_user(argp, tw_ioctl, sizeof(TW_Ioctl_Buf_Apache) + driver_command.buffer_length - 1) == 0)
+       if (copy_to_user(argp, tw_ioctl, sizeof(TW_Ioctl_Buf_Apache) + driver_command.buffer_length) == 0)
                retval = 0;
 out3:
        /* Now free ioctl buf memory */
-       dma_free_coherent(&tw_dev->tw_pci_dev->dev, data_buffer_length_adjusted+sizeof(TW_Ioctl_Buf_Apache) - 1, cpu_addr, dma_handle);
+       dma_free_coherent(&tw_dev->tw_pci_dev->dev, data_buffer_length_adjusted + sizeof(TW_Ioctl_Buf_Apache), cpu_addr, dma_handle);
 out2:
        mutex_unlock(&tw_dev->ioctl_lock);
 out: