Re: [PATCH] 2.6.1-rc2 - MPT Fusion driver 3.00.00 update

From: Arjan van de Ven
Date: Wed Jan 07 2004 - 03:58:19 EST


On Wed, 2004-01-07 at 01:08, Eric Moore wrote:
> +/**************************************************************************
> + * Power Management
> + */
> +#ifdef CONFIG_PM
> +#include <acpi/acpi_drivers.h>
> +
> +/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
> +/*
> + * mptbase_suspend - Fusion MPT base driver suspend routine.
> + *
> + *
> + */
> +static int mptbase_suspend(struct pci_dev *pdev, u32 state)
> +{
> + u32 device_state;
> + MPT_ADAPTER *ioc = pci_get_drvdata(pdev);
> +
> + switch(state)
> + {
> + case ACPI_STATE_S1:

this looks really really wrong. Linux suspend and resume are absolutely
not acpi specific and drivers should not use ACPI specific defines that
also just may mean something different than the linux API means!
> @@ -264,12 +298,14 @@
> mptscsih_io_direction(Scsi_Cmnd *cmd)


why can't you use the scsi layer IO direction function ???
>
> +#ifndef MPTSCSIH_DISABLE_DOMAIN_VALIDATION
> + mpt_dv_deregister(MPTSCSIH_DRIVER);
> +#endif

I would suggest making mpt_dv_deregister() and co a nop in the DISABLE
case, that way you don't need ifdefs all over the driver but just around
the entire functions....

Attachment: signature.asc
Description: This is a digitally signed message part