Commit aca794dd authored by Kashyap, Desai's avatar Kashyap, Desai Committed by James Bottomley

[SCSI] mptfusion: Corrected declaration of device_missing_delay

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: default avatarKashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 4d069566
...@@ -601,7 +601,7 @@ typedef struct _MPT_ADAPTER ...@@ -601,7 +601,7 @@ typedef struct _MPT_ADAPTER
u16 nvdata_version_default; u16 nvdata_version_default;
int debug_level; int debug_level;
u8 io_missing_delay; u8 io_missing_delay;
u8 device_missing_delay; u16 device_missing_delay;
SYSIF_REGS __iomem *chip; /* == c8817000 (mmap) */ SYSIF_REGS __iomem *chip; /* == c8817000 (mmap) */
SYSIF_REGS __iomem *pio_chip; /* Programmed IO (downloadboot) */ SYSIF_REGS __iomem *pio_chip; /* Programmed IO (downloadboot) */
u8 bus_type; u8 bus_type;
......
...@@ -2364,7 +2364,7 @@ mptsas_sas_io_unit_pg1(MPT_ADAPTER *ioc) ...@@ -2364,7 +2364,7 @@ mptsas_sas_io_unit_pg1(MPT_ADAPTER *ioc)
SasIOUnitPage1_t *buffer; SasIOUnitPage1_t *buffer;
dma_addr_t dma_handle; dma_addr_t dma_handle;
int error; int error;
u16 device_missing_delay; u8 device_missing_delay;
memset(&hdr, 0, sizeof(ConfigExtendedPageHeader_t)); memset(&hdr, 0, sizeof(ConfigExtendedPageHeader_t));
memset(&cfg, 0, sizeof(CONFIGPARMS)); memset(&cfg, 0, sizeof(CONFIGPARMS));
...@@ -2401,7 +2401,7 @@ mptsas_sas_io_unit_pg1(MPT_ADAPTER *ioc) ...@@ -2401,7 +2401,7 @@ mptsas_sas_io_unit_pg1(MPT_ADAPTER *ioc)
ioc->io_missing_delay = ioc->io_missing_delay =
le16_to_cpu(buffer->IODeviceMissingDelay); 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) ? 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) * 16 :
device_missing_delay & MPI_SAS_IOUNIT1_REPORT_MISSING_TIMEOUT_MASK; device_missing_delay & MPI_SAS_IOUNIT1_REPORT_MISSING_TIMEOUT_MASK;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment