Commit d9ae6243 authored by Frans Pop's avatar Frans Pop Committed by David S. Miller

ide-cd: Improve "weird block size" error message

Currently the error gets repeated too frequently, for example each
time HAL polls the device when a disc is present. Avoid that by using
printk_once instead of printk.

Also join the error and corrective action messages into a single line.
Signed-off-by: default avatarFrans Pop <elendil@planet.nl>
Acked-by: default avatarBorislav Petkov <petkovbb@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent af054ed0
...@@ -889,10 +889,9 @@ static int cdrom_read_capacity(ide_drive_t *drive, unsigned long *capacity, ...@@ -889,10 +889,9 @@ static int cdrom_read_capacity(ide_drive_t *drive, unsigned long *capacity,
case 4096: case 4096:
break; break;
default: default:
printk(KERN_ERR PFX "%s: weird block size %u\n", printk_once(KERN_ERR PFX "%s: weird block size %u; "
"setting default block size to 2048\n",
drive->name, blocklen); drive->name, blocklen);
printk(KERN_ERR PFX "%s: default to 2kb block size\n",
drive->name);
blocklen = 2048; blocklen = 2048;
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment