Re: [PATCH v3 1/5] arcmsr: fixed getting wrong configuration data

From: Johannes Thumshirn
Date: Wed Nov 25 2015 - 06:59:32 EST


On Wed, 2015-11-25 at 19:36 +0800, Ching Huang wrote:
> From: Ching Huang <ching2048@xxxxxxxxxxxx>
>
> Fixed getting wrong configuration data of adapter type B and type D.
>
> Signed-of-by: Ching Huang <ching2048@xxxxxxxxxxxx>
>
> ---
>
> diff -uprN a/drivers/scsi/arcmsr/arcmsr_hba.c
> b/drivers/scsi/arcmsr/arcmsr_hba.c
> --- a/drivers/scsi/arcmsr/arcmsr_hba.c 2015-11-23 16:25:22.000000000
> +0800
> +++ b/drivers/scsi/arcmsr/arcmsr_hba.c 2015-11-24 11:35:26.000000000
> +0800
> @@ -2694,15 +2694,15 @@ static bool arcmsr_hbaB_get_config(struc
> Â acb->firm_model,
> Â acb->firm_version);
> Â
> - acb->signature = readl(&reg->message_rwbuffer[1]);
> + acb->signature = readl(&reg->message_rwbuffer[0]);
> Â /*firm_signature,1,00-03*/
> - acb->firm_request_len = readl(&reg->message_rwbuffer[2]);
> + acb->firm_request_len = readl(&reg->message_rwbuffer[1]);
> Â /*firm_request_len,1,04-07*/
> - acb->firm_numbers_queue = readl(&reg->message_rwbuffer[3]);
> + acb->firm_numbers_queue = readl(&reg->message_rwbuffer[2]);
> Â /*firm_numbers_queue,2,08-11*/
> - acb->firm_sdram_size = readl(&reg->message_rwbuffer[4]);
> + acb->firm_sdram_size = readl(&reg->message_rwbuffer[3]);
> Â /*firm_sdram_size,3,12-15*/
> - acb->firm_hd_channels = readl(&reg->message_rwbuffer[5]);
> + acb->firm_hd_channels = readl(&reg->message_rwbuffer[4]);
> Â /*firm_ide_channels,4,16-19*/
> Â acb->firm_cfg_version = readl(&reg-
> >message_rwbuffer[25]);ÂÂ/*firm_cfg_version,25,100-103*/
> Â /*firm_ide_channels,4,16-19*/
> @@ -2880,15 +2880,15 @@ static bool arcmsr_hbaD_get_config(struc
> Â iop_device_map++;
> Â count--;
> Â }
> - acb->signature = readl(&reg->msgcode_rwbuffer[1]);
> + acb->signature = readl(&reg->msgcode_rwbuffer[0]);
> Â /*firm_signature,1,00-03*/
> - acb->firm_request_len = readl(&reg->msgcode_rwbuffer[2]);
> + acb->firm_request_len = readl(&reg->msgcode_rwbuffer[1]);
> Â /*firm_request_len,1,04-07*/
> - acb->firm_numbers_queue = readl(&reg->msgcode_rwbuffer[3]);
> + acb->firm_numbers_queue = readl(&reg->msgcode_rwbuffer[2]);
> Â /*firm_numbers_queue,2,08-11*/
> - acb->firm_sdram_size = readl(&reg->msgcode_rwbuffer[4]);
> + acb->firm_sdram_size = readl(&reg->msgcode_rwbuffer[3]);
> Â /*firm_sdram_size,3,12-15*/
> - acb->firm_hd_channels = readl(&reg->msgcode_rwbuffer[5]);
> + acb->firm_hd_channels = readl(&reg->msgcode_rwbuffer[4]);
> Â /*firm_hd_channels,4,16-19*/
> Â acb->firm_cfg_version = readl(&reg->msgcode_rwbuffer[25]);
> Â pr_notice("Areca RAID Controller%d: Model %s, F/W %s\n",
>
>

Reviewed-by: Johannes Thumshirn <jthumshirn@xxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/