]> err.no Git - linux-2.6/blobdiff - drivers/scsi/a100u2w.c
BUG_ON on kernel misbehavior on A100U2W driver
[linux-2.6] / drivers / scsi / a100u2w.c
index 1dd0fcfe1d7056812dfa603f4ba675b24a9e4daa..f5051f4301d78515f9cec1cf29331ff10db9e1cb 100644 (file)
@@ -401,6 +401,7 @@ static u8 orc_load_firmware(struct orc_host * host)
 
        /* Copy the code from the BIOS to the SRAM */
 
+       udelay(500);    /* Required on Sun Ultra 5 ... 350 -> failures */
        bios_addr = (u16) le32_to_cpu(data32);  /* FW code locate at BIOS address + ? */
        for (i = 0, data32_ptr = (u8 *) & data32;       /* Download the code    */
             i < 0x1000;        /* Firmware code size = 4K      */
@@ -865,6 +866,7 @@ static void inia100_build_scb(struct orc_host * host, struct orc_scb * scb, stru
 
        count_sg = scsi_dma_map(cmd);
        BUG_ON(count_sg < 0);
+       BUG_ON(count_sg > TOTAL_SG_ENTRY);
 
        /* Build the scatter gather lists */
        if (count_sg) {