[SCSI] mptfusion: Corrected declaration of device_missing_delay
authorKashyap, Desai <kashyap.desai@lsi.com>
Thu, 17 Jun 2010 09:09:25 +0000 (14:39 +0530)
committerJames Bottomley <James.Bottomley@suse.de>
Tue, 27 Jul 2010 17:02:28 +0000 (12:02 -0500)
device missing delay is 8 bit value in io unit pg1. Making correct variable
declaration for device_missing_delay.

The driver is storing the calculated device missing delay in IOC structure
as a u8 instead of a u16. It needs to be a u16 if the delay is > 255.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/message/fusion/mptbase.h
drivers/message/fusion/mptsas.c

index b613eb3d4706b011fc90284b03bc7a4e9ee50d10..453bcb7d6b5e8f09ea64e6db6fd1837749d844ca 100644 (file)
@@ -601,7 +601,7 @@ typedef struct _MPT_ADAPTER
        u16                      nvdata_version_default;
        int                      debug_level;
        u8                       io_missing_delay;
-       u                      device_missing_delay;
+       u16                      device_missing_delay;
        SYSIF_REGS __iomem      *chip;          /* == c8817000 (mmap) */
        SYSIF_REGS __iomem      *pio_chip;      /* Programmed IO (downloadboot) */
        u8                       bus_type;
index ac000e83db0e08fcda1249ebb171e8d8978fb2bd..1caf03ea855777c7b5f3f3e39a49e901936e98ec 100644 (file)
@@ -2364,7 +2364,7 @@ mptsas_sas_io_unit_pg1(MPT_ADAPTER *ioc)
        SasIOUnitPage1_t *buffer;
        dma_addr_t dma_handle;
        int error;
-       u16 device_missing_delay;
+       u8 device_missing_delay;
 
        memset(&hdr, 0, sizeof(ConfigExtendedPageHeader_t));
        memset(&cfg, 0, sizeof(CONFIGPARMS));
@@ -2401,7 +2401,7 @@ mptsas_sas_io_unit_pg1(MPT_ADAPTER *ioc)
 
        ioc->io_missing_delay  =
            le16_to_cpu(buffer->IODeviceMissingDelay);
-       device_missing_delay = le16_to_cpu(buffer->ReportDeviceMissingDelay);
+       device_missing_delay = buffer->ReportDeviceMissingDelay;
        ioc->device_missing_delay = (device_missing_delay & MPI_SAS_IOUNIT1_REPORT_MISSING_UNIT_16) ?
            (device_missing_delay & MPI_SAS_IOUNIT1_REPORT_MISSING_TIMEOUT_MASK) * 16 :
            device_missing_delay & MPI_SAS_IOUNIT1_REPORT_MISSING_TIMEOUT_MASK;