aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Walls <awalls@md.metrocast.net>2010-12-11 10:31:45 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-12-29 05:17:09 -0500
commitfa98447f09641adeeaf02b94133649f03b74d159 (patch)
tree16475f6d407f1c9802b126138a471605f30100a8
parent0a58d713062fb49952b9b082514a48a0c83b269d (diff)
[media] ivtv, cx18: Make ioremap failure messages more useful for users
The error messages these drivers emitted for ioremap() failures were misleading and not helpful for users. Reworded those messages to help the user take action to resolve vmalloc address space exhaustion. Signed-off-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/cx18/cx18-driver.c9
-rw-r--r--drivers/media/video/ivtv/ivtv-driver.c28
2 files changed, 29 insertions, 8 deletions
diff --git a/drivers/media/video/cx18/cx18-driver.c b/drivers/media/video/cx18/cx18-driver.c
index 98ac2e935743..676e5bef89eb 100644
--- a/drivers/media/video/cx18/cx18-driver.c
+++ b/drivers/media/video/cx18/cx18-driver.c
@@ -925,8 +925,13 @@ static int __devinit cx18_probe(struct pci_dev *pci_dev,
925 cx->enc_mem = ioremap_nocache(cx->base_addr + CX18_MEM_OFFSET, 925 cx->enc_mem = ioremap_nocache(cx->base_addr + CX18_MEM_OFFSET,
926 CX18_MEM_SIZE); 926 CX18_MEM_SIZE);
927 if (!cx->enc_mem) { 927 if (!cx->enc_mem) {
928 CX18_ERR("ioremap failed, perhaps increasing __VMALLOC_RESERVE in page.h\n"); 928 CX18_ERR("ioremap failed. Can't get a window into CX23418 "
929 CX18_ERR("or disabling CONFIG_HIGHMEM4G into the kernel would help\n"); 929 "memory and register space\n");
930 CX18_ERR("Each capture card with a CX23418 needs 64 MB of "
931 "vmalloc address space for the window\n");
932 CX18_ERR("Check the output of 'grep Vmalloc /proc/meminfo'\n");
933 CX18_ERR("Use the vmalloc= kernel command line option to set "
934 "VmallocTotal to a larger value\n");
930 retval = -ENOMEM; 935 retval = -ENOMEM;
931 goto free_mem; 936 goto free_mem;
932 } 937 }
diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c
index e421d15b0f5c..39946420b301 100644
--- a/drivers/media/video/ivtv/ivtv-driver.c
+++ b/drivers/media/video/ivtv/ivtv-driver.c
@@ -1029,8 +1029,13 @@ static int __devinit ivtv_probe(struct pci_dev *pdev,
1029 itv->enc_mem = ioremap_nocache(itv->base_addr + IVTV_ENCODER_OFFSET, 1029 itv->enc_mem = ioremap_nocache(itv->base_addr + IVTV_ENCODER_OFFSET,
1030 IVTV_ENCODER_SIZE); 1030 IVTV_ENCODER_SIZE);
1031 if (!itv->enc_mem) { 1031 if (!itv->enc_mem) {
1032 IVTV_ERR("ioremap failed, perhaps increasing __VMALLOC_RESERVE in page.h\n"); 1032 IVTV_ERR("ioremap failed. Can't get a window into CX23415/6 "
1033 IVTV_ERR("or disabling CONFIG_HIGHMEM4G into the kernel would help\n"); 1033 "encoder memory\n");
1034 IVTV_ERR("Each capture card with a CX23415/6 needs 8 MB of "
1035 "vmalloc address space for this window\n");
1036 IVTV_ERR("Check the output of 'grep Vmalloc /proc/meminfo'\n");
1037 IVTV_ERR("Use the vmalloc= kernel command line option to set "
1038 "VmallocTotal to a larger value\n");
1034 retval = -ENOMEM; 1039 retval = -ENOMEM;
1035 goto free_mem; 1040 goto free_mem;
1036 } 1041 }
@@ -1041,8 +1046,14 @@ static int __devinit ivtv_probe(struct pci_dev *pdev,
1041 itv->dec_mem = ioremap_nocache(itv->base_addr + IVTV_DECODER_OFFSET, 1046 itv->dec_mem = ioremap_nocache(itv->base_addr + IVTV_DECODER_OFFSET,
1042 IVTV_DECODER_SIZE); 1047 IVTV_DECODER_SIZE);
1043 if (!itv->dec_mem) { 1048 if (!itv->dec_mem) {
1044 IVTV_ERR("ioremap failed, perhaps increasing __VMALLOC_RESERVE in page.h\n"); 1049 IVTV_ERR("ioremap failed. Can't get a window into "
1045 IVTV_ERR("or disabling CONFIG_HIGHMEM4G into the kernel would help\n"); 1050 "CX23415 decoder memory\n");
1051 IVTV_ERR("Each capture card with a CX23415 needs 8 MB "
1052 "of vmalloc address space for this window\n");
1053 IVTV_ERR("Check the output of 'grep Vmalloc "
1054 "/proc/meminfo'\n");
1055 IVTV_ERR("Use the vmalloc= kernel command line option "
1056 "to set VmallocTotal to a larger value\n");
1046 retval = -ENOMEM; 1057 retval = -ENOMEM;
1047 goto free_mem; 1058 goto free_mem;
1048 } 1059 }
@@ -1057,8 +1068,13 @@ static int __devinit ivtv_probe(struct pci_dev *pdev,
1057 itv->reg_mem = 1068 itv->reg_mem =
1058 ioremap_nocache(itv->base_addr + IVTV_REG_OFFSET, IVTV_REG_SIZE); 1069 ioremap_nocache(itv->base_addr + IVTV_REG_OFFSET, IVTV_REG_SIZE);
1059 if (!itv->reg_mem) { 1070 if (!itv->reg_mem) {
1060 IVTV_ERR("ioremap failed, perhaps increasing __VMALLOC_RESERVE in page.h\n"); 1071 IVTV_ERR("ioremap failed. Can't get a window into CX23415/6 "
1061 IVTV_ERR("or disabling CONFIG_HIGHMEM4G into the kernel would help\n"); 1072 "register space\n");
1073 IVTV_ERR("Each capture card with a CX23415/6 needs 64 kB of "
1074 "vmalloc address space for this window\n");
1075 IVTV_ERR("Check the output of 'grep Vmalloc /proc/meminfo'\n");
1076 IVTV_ERR("Use the vmalloc= kernel command line option to set "
1077 "VmallocTotal to a larger value\n");
1062 retval = -ENOMEM; 1078 retval = -ENOMEM;
1063 goto free_io; 1079 goto free_io;
1064 } 1080 }