From patchwork Wed Jun 3 19:39:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Carnuccio X-Patchwork-Id: 6540911 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 133549F1CC for ; Wed, 3 Jun 2015 19:39:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 47A48206DD for ; Wed, 3 Jun 2015 19:39:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B2345206D7 for ; Wed, 3 Jun 2015 19:39:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933067AbbFCTjI (ORCPT ); Wed, 3 Jun 2015 15:39:08 -0400 Received: from mx0a-0016ce01.pphosted.com ([67.231.148.157]:33467 "EHLO mx0a-0016ce01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751980AbbFCTjG (ORCPT ); Wed, 3 Jun 2015 15:39:06 -0400 Received: from pps.filterd (m0045602.ppops.net [127.0.0.1]) by mx0a-0016ce01.pphosted.com (8.14.5/8.14.5) with SMTP id t53JaOSr026364 for ; Wed, 3 Jun 2015 12:39:05 -0700 Received: from avcashub1.qlogic.com (avcashub3.qlogic.com [198.70.193.117]) by mx0a-0016ce01.pphosted.com with ESMTP id 1usj1a1fbs-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Wed, 03 Jun 2015 12:39:04 -0700 Received: from AVMB1.qlogic.org ([fe80::b816:e739:5ab3:5221]) by avcashub3.qlogic.org ([::1]) with mapi id 14.03.0235.001; Wed, 3 Jun 2015 12:39:03 -0700 From: Joe Carnuccio To: Meelis Roos , Christoph Hellwig CC: Chad Dupuis , Saurav Kashyap , Christoph Hellwig , "Dept-Eng QLA2xxx Upstream" , "James E.J. Bottomley" , linux-scsi , linux-kernel Subject: RE: bisected regression: qla2xxx endianness on sparc64 Thread-Topic: bisected regression: qla2xxx endianness on sparc64 Thread-Index: AQHQndXDHrfFKPkSlU6ALuACjteL5J2bLXpQ Date: Wed, 3 Jun 2015 19:39:02 +0000 Message-ID: <86A17A977688E04689F40F6B1EC20EC601940E06A9@AVMB1.qlogic.org> References: <20141110141519.GA12347@infradead.org> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: <86A17A977688E04689F40F6B1EC20EC601940E06A9@AVMB1.qlogic.org> x-originating-ip: [10.1.4.10] disclaimer: bypass MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5700 definitions=7820 signatures=670587 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1506030241 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, T_TVD_MIME_EPI, 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 Meelis, Yes, please revert that patch (it should never have deleted the calls to __constant_cpu_to_le16 (those fields are all LE in the HW/nvram)). -Joe -----Original Message----- From: mroos@math.ut.ee [mailto:mroos@math.ut.ee] On Behalf Of Meelis Roos Sent: Wednesday, June 03, 2015 1:21 AM To: Christoph Hellwig Cc: Chad Dupuis; Joe Carnuccio; Saurav Kashyap; Christoph Hellwig; Dept-Eng QLA2xxx Upstream; James E.J. Bottomley; linux-scsi; linux-kernel Subject: Re: bisected regression: qla2xxx endianness on sparc64 On Mon, 10 Nov 2014, Christoph Hellwig wrote: > On Mon, Nov 03, 2014 at 03:09:47PM -0500, Chad Dupuis wrote: > > We should revert that change. What were some of the other failures > > you were seeing? > > Can you please send me the revert ASAP? Since QLogic is still silent on this one, I will send it to you: Revert change that breaks QLA2XXX on big-endian systems, __constant_cpu_to_le16() is still needed. Signed-off-by: Meelis Roos * are valid. */ if (ia64_platform_is("sn2")) { - nv->frame_payload_size = 2048; + nv->frame_payload_size = __constant_cpu_to_le16(2048); if (IS_QLA23XX(ha)) nv->special_options[1] = BIT_7; } @@ -5022,7 +5022,7 @@ qla24xx_nvram_config(scsi_qla_host_t *vha) memset(nv, 0, ha->nvram_size); nv->nvram_version = __constant_cpu_to_le16(ICB_VERSION); nv->version = __constant_cpu_to_le16(ICB_VERSION); - nv->frame_payload_size = 2048; + nv->frame_payload_size = __constant_cpu_to_le16(2048); nv->execution_throttle = __constant_cpu_to_le16(0xFFFF); nv->exchange_count = __constant_cpu_to_le16(0); nv->hard_address = __constant_cpu_to_le16(124); @@ -5969,7 +5969,7 @@ qla81xx_nvram_config(scsi_qla_host_t *vha) memset(nv, 0, ha->nvram_size); nv->nvram_version = __constant_cpu_to_le16(ICB_VERSION); nv->version = __constant_cpu_to_le16(ICB_VERSION); - nv->frame_payload_size = 2048; + nv->frame_payload_size = __constant_cpu_to_le16(2048); nv->execution_throttle = __constant_cpu_to_le16(0xFFFF); nv->exchange_count = __constant_cpu_to_le16(0); nv->port_name[0] = 0x21; --- Meelis Roos (mroos@linux.ee) diff --git a/drivers/scsi/qla2xxx/qla_fw.h b/drivers/scsi/qla2xxx/qla_fw.h index 42bb357..88d3143 100644 --- a/drivers/scsi/qla2xxx/qla_fw.h +++ b/drivers/scsi/qla2xxx/qla_fw.h @@ -91,7 +91,7 @@ struct nvram_24xx { /* Firmware Initialization Control Block. */ uint16_t version; uint16_t reserved_1; - __le16 frame_payload_size; + uint16_t frame_payload_size; uint16_t execution_throttle; uint16_t exchange_count; uint16_t hard_address; diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 285cb20..ed973a1 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -2658,18 +2658,18 @@ qla2x00_nvram_config(scsi_qla_host_t *vha) nv->firmware_options[1] = BIT_7 | BIT_5; nv->add_firmware_options[0] = BIT_5; nv->add_firmware_options[1] = BIT_5 | BIT_4; - nv->frame_payload_size = 2048; + nv->frame_payload_size = __constant_cpu_to_le16(2048); nv->special_options[1] = BIT_7; } else if (IS_QLA2200(ha)) { nv->firmware_options[0] = BIT_2 | BIT_1; nv->firmware_options[1] = BIT_7 | BIT_5; nv->add_firmware_options[0] = BIT_5; nv->add_firmware_options[1] = BIT_5 | BIT_4; - nv->frame_payload_size = 1024; + nv->frame_payload_size = __constant_cpu_to_le16(1024); } else if (IS_QLA2100(ha)) { nv->firmware_options[0] = BIT_3 | BIT_1; nv->firmware_options[1] = BIT_5; - nv->frame_payload_size = 1024; + nv->frame_payload_size = __constant_cpu_to_le16(1024); } nv->max_iocb_allocation = __constant_cpu_to_le16(256); @@ -2705,7 +2705,7 @@ qla2x00_nvram_config(scsi_qla_host_t *vha)