Pull novell-bugzilla-156426 into release branch
[pandora-kernel.git] / drivers / block / cciss_scsi.c
index 2942d32..597c007 100644 (file)
@@ -714,7 +714,7 @@ cciss_scsi_detect(int ctlr)
        ((struct cciss_scsi_adapter_data_t *) 
                hba[ctlr]->scsi_ctlr)->scsi_host = (void *) sh;
        sh->hostdata[0] = (unsigned long) hba[ctlr];
-       sh->irq = hba[ctlr]->intr;
+       sh->irq = hba[ctlr]->intr[SIMPLE_MODE_INT];
        sh->unique_id = sh->irq;
        error = scsi_add_host(sh, &hba[ctlr]->pdev->dev);
        if (error)
@@ -1027,12 +1027,11 @@ cciss_update_non_disk_devices(int cntl_num, int hostno)
        int i;
 
        c = (ctlr_info_t *) hba[cntl_num];      
-       ld_buff = kmalloc(reportlunsize, GFP_KERNEL);
+       ld_buff = kzalloc(reportlunsize, GFP_KERNEL);
        if (ld_buff == NULL) {
                printk(KERN_ERR "cciss: out of memory\n");
                return;
        }
-       memset(ld_buff, 0, reportlunsize);
        inq_buff = kmalloc(OBDR_TAPE_INQ_SIZE, GFP_KERNEL);
         if (inq_buff == NULL) {
                 printk(KERN_ERR "cciss: out of memory\n");
@@ -1316,7 +1315,7 @@ cciss_scsi_queue_command (struct scsi_cmnd *cmd, void (* done)(struct scsi_cmnd
 
        cp->Request.Timeout = 0;
        memset(cp->Request.CDB, 0, sizeof(cp->Request.CDB));
-       if (cmd->cmd_len > sizeof(cp->Request.CDB)) BUG();
+       BUG_ON(cmd->cmd_len > sizeof(cp->Request.CDB));
        cp->Request.CDBLen = cmd->cmd_len;
        memcpy(cp->Request.CDB, cmd->cmnd, cmd->cmd_len);
        cp->Request.Type.Type = TYPE_CMD;