]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ide: don't BUG() on unsupported transfer modes
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tue, 13 Nov 2007 21:09:15 +0000 (22:09 +0100)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tue, 13 Nov 2007 21:09:15 +0000 (22:09 +0100)
Fix ide-cris, cs5530, sc1200 and sis5513 host drivers to just return instead
of OOPS-ing for unsupported modes in ->set_dma_mode methods.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/cris/ide-cris.c
drivers/ide/pci/cs5530.c
drivers/ide/pci/sc1200.c
drivers/ide/pci/sis5513.c

index e196aefa2070c2f2c54e79498cfc1dcf5e19e419..7f5bc2ee6c7e554d631ea6c0c1e8f42cc3a66940 100644 (file)
@@ -748,8 +748,7 @@ static void cris_set_dma_mode(ide_drive_t *drive, const u8 speed)
                        hold = ATA_DMA2_HOLD;
                        break;
                default:
-                       BUG();
-                       break;
+                       return;
        }
 
        if (speed >= XFER_UDMA_0)
index 599408952bd4cbae54410f3de2e306eda9c101b4..547690395eee6e3b07bf0c597843ab3a1b0fc106 100644 (file)
@@ -117,8 +117,7 @@ static void cs5530_set_dma_mode(ide_drive_t *drive, const u8 mode)
                case XFER_MW_DMA_1:     timings = 0x00012121; break;
                case XFER_MW_DMA_2:     timings = 0x00002020; break;
                default:
-                       BUG();
-                       break;
+                       return;
        }
        basereg = CS5530_BASEREG(drive->hwif);
        reg = inl(basereg + 4);                 /* get drive0 config register */
index 0a7b3202066d99ee88c78902b4b4b03ee2904151..707d5ff66b0300941429177d1beed7a26905e229 100644 (file)
@@ -186,8 +186,7 @@ static void sc1200_set_dma_mode(ide_drive_t *drive, const u8 mode)
                        }
                        break;
                default:
-                       BUG();
-                       break;
+                       return;
        }
 
        if (unit == 0) {                        /* are we configuring drive0? */
index 6b7bb53acefdc68d1928bd0bd85eb3d0c3e4a5c3..f6e2ab3dd1664d2003986906226a384b5379a5fb 100644 (file)
@@ -356,7 +356,6 @@ static void sis_set_dma_mode(ide_drive_t *drive, const u8 speed)
                        sis_program_timings(drive, speed);
                        break;
                default:
-                       BUG();
                        break;
        }
 }