fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / scsi / megaraid / megaraid_mbox.c
index cd982c8..7bac86d 100644 (file)
@@ -120,7 +120,7 @@ static void megaraid_mbox_prepare_pthru(adapter_t *, scb_t *,
 static void megaraid_mbox_prepare_epthru(adapter_t *, scb_t *,
                struct scsi_cmnd *);
 
-static irqreturn_t megaraid_isr(int, void *, struct pt_regs *);
+static irqreturn_t megaraid_isr(int, void *);
 
 static void megaraid_mbox_dpc(unsigned long);
 
@@ -330,6 +330,21 @@ static struct device_attribute *megaraid_sdev_attrs[] = {
        NULL,
 };
 
+/**
+ * megaraid_change_queue_depth - Change the device's queue depth
+ * @sdev:      scsi device struct
+ * @qdepth:    depth to set
+ *
+ * Return value:
+ *     actual depth set
+ **/
+static int megaraid_change_queue_depth(struct scsi_device *sdev, int qdepth)
+{
+       if (qdepth > MBOX_MAX_SCSI_CMDS)
+               qdepth = MBOX_MAX_SCSI_CMDS;
+       scsi_adjust_queue_depth(sdev, 0, qdepth);
+       return sdev->queue_depth;
+}
 
 /*
  * Scsi host template for megaraid unified driver
@@ -343,6 +358,7 @@ static struct scsi_host_template megaraid_template_g = {
        .eh_device_reset_handler        = megaraid_reset_handler,
        .eh_bus_reset_handler           = megaraid_reset_handler,
        .eh_host_reset_handler          = megaraid_reset_handler,
+       .change_queue_depth             = megaraid_change_queue_depth,
        .use_clustering                 = ENABLE_CLUSTERING,
        .sdev_attrs                     = megaraid_sdev_attrs,
        .shost_attrs                    = megaraid_shost_attrs,
@@ -868,7 +884,7 @@ megaraid_init_mbox(adapter_t *adapter)
 
        if (((magic64 == HBA_SIGNATURE_64_BIT) &&
                ((adapter->pdev->subsystem_device !=
-               PCI_SUBSYS_ID_MEGARAID_SATA_150_6) ||
+               PCI_SUBSYS_ID_MEGARAID_SATA_150_6) &&
                (adapter->pdev->subsystem_device !=
                PCI_SUBSYS_ID_MEGARAID_SATA_150_4))) ||
                (adapter->pdev->vendor == PCI_VENDOR_ID_LSI_LOGIC &&
@@ -2215,7 +2231,7 @@ megaraid_ack_sequence(adapter_t *adapter)
  * Interrupt service routine for memory-mapped mailbox controllers.
  */
 static irqreturn_t
-megaraid_isr(int irq, void *devp, struct pt_regs *regs)
+megaraid_isr(int irq, void *devp)
 {
        adapter_t       *adapter = devp;
        int             handled;