From patchwork Wed Nov 25 03:21:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ching Huang X-Patchwork-Id: 7695011 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 420329F443 for ; Wed, 25 Nov 2015 03:21:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 62BF7208D9 for ; Wed, 25 Nov 2015 03:21:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 72172208D8 for ; Wed, 25 Nov 2015 03:21:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932268AbbKYDVa (ORCPT ); Tue, 24 Nov 2015 22:21:30 -0500 Received: from mail-pa0-f53.google.com ([209.85.220.53]:32979 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755006AbbKYDV3 (ORCPT ); Tue, 24 Nov 2015 22:21:29 -0500 Received: by pabfh17 with SMTP id fh17so43763653pab.0 for ; Tue, 24 Nov 2015 19:21:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=areca-com-tw.20150623.gappssmtp.com; s=20150623; h=subject:from:to:cc:content-type:date:message-id:mime-version :content-transfer-encoding; bh=sB7kiGIx22gp39cf3+ixj151KW+l4LoUlRSpf+C8zK8=; b=Thgquixg6sgVHl7Sm1/jBp0CC8bIJpFS+yhJ+TnKgc98NLFgAQgB6oUThoiBSs8ITy e/2rPnXo2DC8vS0bcyQ+SWoca4ReKO+dCNrzo0URpw5N+yBICf/msKSP5mDjXit881Xg Nc+1btHGMe7II5MfA1PGbhY6ZRdvDHCU7fHNwkhWGdSGF6GlyqLJkp832QGgHWscUwPV BXhz8XBMwUHh++ZVI3IV/KD1751EsYbgyuelZ23GZazQEOcQFPOv1JyodNiXpolvNJju dhpSK91xo4qPWFARP65KTNnVMCcmLEoVMsrCXN/iOM8REEaqfL2AhorDP/k4M1lGjYeH L+Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:from:to:cc:content-type:date:message-id :mime-version:content-transfer-encoding; bh=sB7kiGIx22gp39cf3+ixj151KW+l4LoUlRSpf+C8zK8=; b=l/SUgas5Pf2MuBD0drfQDzvimtiW/xIWyWajr0+BhEUW+iHWg7YxL5duz6ih7/DdgI EIqm3upr/CYfb7saWEhXp+SEs8Kfr00YQXhFWC3pfLG9hBlOC8X/slhC/KMsiyUY+CIS 82CR2Cjic2b3C/uPxNiWNQko+q2KOGDOTmTMMmZLXlvo4fpKYd1MpC7iAICaFXrq18J+ zpB8xAHkTsbbKHF145EN0jP+de20lw9jlaXnUhwHS5AQ1veUCeikpXAhkndrZOWi8hms D323OtRlBb8+PipuPzkkMLed+H3VaDkef/OP01V1dm0+uNJp+JZF5NazHrQGnRpv78td tsCA== X-Gm-Message-State: ALoCoQnrG448QF6hMTDFNblDdG3SLD2Ul+3UQ7WwFw1uz5uQDUWSHYDf9K/RzB23Wwvgpe1+xubL X-Received: by 10.98.2.213 with SMTP id 204mr28149584pfc.9.1448421689108; Tue, 24 Nov 2015 19:21:29 -0800 (PST) Received: from [192.168.0.130] (60-248-88-209.HINET-IP.hinet.net. [60.248.88.209]) by smtp.gmail.com with ESMTPSA id 1sm17137202pfo.72.2015.11.24.19.21.26 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Nov 2015 19:21:28 -0800 (PST) Subject: [PATCH v2 1/3] arcmsr: fixed getting wrong configuration data From: Ching Huang To: hch@infradead.org, thenzl@redhat.com, jbottomley@parallels.com, dan.carpenter@oracle.com, agordeev@redhat.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, hare@suse.de Cc: hch@lst.de Date: Wed, 25 Nov 2015 11:21:21 +0800 Message-ID: <1448421681.4698.18.camel@Centos6.3-64> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 (2.28.3-24.el6) Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ching Huang Fixed getting wrong configuration data of adapter type B and type D. Signed-of-by: Ching Huang Reviewed-by: Hannes Reinecke --- -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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(®->message_rwbuffer[1]); + acb->signature = readl(®->message_rwbuffer[0]); /*firm_signature,1,00-03*/ - acb->firm_request_len = readl(®->message_rwbuffer[2]); + acb->firm_request_len = readl(®->message_rwbuffer[1]); /*firm_request_len,1,04-07*/ - acb->firm_numbers_queue = readl(®->message_rwbuffer[3]); + acb->firm_numbers_queue = readl(®->message_rwbuffer[2]); /*firm_numbers_queue,2,08-11*/ - acb->firm_sdram_size = readl(®->message_rwbuffer[4]); + acb->firm_sdram_size = readl(®->message_rwbuffer[3]); /*firm_sdram_size,3,12-15*/ - acb->firm_hd_channels = readl(®->message_rwbuffer[5]); + acb->firm_hd_channels = readl(®->message_rwbuffer[4]); /*firm_ide_channels,4,16-19*/ acb->firm_cfg_version = readl(®->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(®->msgcode_rwbuffer[1]); + acb->signature = readl(®->msgcode_rwbuffer[0]); /*firm_signature,1,00-03*/ - acb->firm_request_len = readl(®->msgcode_rwbuffer[2]); + acb->firm_request_len = readl(®->msgcode_rwbuffer[1]); /*firm_request_len,1,04-07*/ - acb->firm_numbers_queue = readl(®->msgcode_rwbuffer[3]); + acb->firm_numbers_queue = readl(®->msgcode_rwbuffer[2]); /*firm_numbers_queue,2,08-11*/ - acb->firm_sdram_size = readl(®->msgcode_rwbuffer[4]); + acb->firm_sdram_size = readl(®->msgcode_rwbuffer[3]); /*firm_sdram_size,3,12-15*/ - acb->firm_hd_channels = readl(®->msgcode_rwbuffer[5]); + acb->firm_hd_channels = readl(®->msgcode_rwbuffer[4]); /*firm_hd_channels,4,16-19*/ acb->firm_cfg_version = readl(®->msgcode_rwbuffer[25]); pr_notice("Areca RAID Controller%d: Model %s, F/W %s\n",