diff options
Diffstat (limited to 'drivers/scsi/scsi_ioctl.c')
-rw-r--r-- | drivers/scsi/scsi_ioctl.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_ioctl.c b/drivers/scsi/scsi_ioctl.c index c0be923c6..92f3eef3e 100644 --- a/drivers/scsi/scsi_ioctl.c +++ b/drivers/scsi/scsi_ioctl.c @@ -5,6 +5,7 @@ #include <linux/errno.h> #include <linux/kernel.h> #include <linux/sched.h> +#include <linux/mm.h> #include <linux/string.h> #include "../block/blk.h" @@ -13,7 +14,7 @@ #include "scsi_ioctl.h" #define MAX_RETRIES 5 -#define MAX_TIMEOUT 200 +#define MAX_TIMEOUT 900 #define MAX_BUF 4096 #define max(a,b) (((a) > (b)) ? (a) : (b)) @@ -168,6 +169,7 @@ static int ioctl_command(Scsi_Device *dev, void *buffer) if (buf_needed > MAX_BUF) buf_needed = MAX_BUF; buf = (char *) scsi_malloc(buf_needed); if (!buf) return -ENOMEM; + memset(buf, 0, buf_needed); } else buf = NULL; @@ -309,3 +311,20 @@ int kernel_scsi_ioctl (Scsi_Device *dev, int cmd, void *arg) { set_fs(oldfs); return tmp; } + +/* + * Overrides for Emacs so that we follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-indent-level: 8 + * c-brace-imaginary-offset: 0 + * c-brace-offset: -8 + * c-argdecl-indent: 8 + * c-label-offset: -8 + * c-continued-statement-offset: 8 + * c-continued-brace-offset: 0 + * End: + */ |