aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-cd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r--drivers/ide/ide-cd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 4a19686fcfe9..a9a1bfb14e7c 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -876,9 +876,12 @@ static int cdrom_read_capacity(ide_drive_t *drive, unsigned long *capacity,
876 return stat; 876 return stat;
877 877
878 /* 878 /*
879 * Sanity check the given block size 879 * Sanity check the given block size, in so far as making
880 * sure the sectors_per_frame we give to the caller won't
881 * end up being bogus.
880 */ 882 */
881 blocklen = be32_to_cpu(capbuf.blocklen); 883 blocklen = be32_to_cpu(capbuf.blocklen);
884 blocklen = (blocklen >> SECTOR_BITS) << SECTOR_BITS;
882 switch (blocklen) { 885 switch (blocklen) {
883 case 512: 886 case 512:
884 case 1024: 887 case 1024: