Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941575AbcJYGjh (ORCPT ); Tue, 25 Oct 2016 02:39:37 -0400 Received: from mail-cys01nam02on0084.outbound.protection.outlook.com ([104.47.37.84]:20092 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753157AbcJYGje (ORCPT ); Tue, 25 Oct 2016 02:39:34 -0400 X-Greylist: delayed 2034 seconds by postgrey-1.27 at vger.kernel.org; Tue, 25 Oct 2016 02:39:33 EDT Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; free-electrons.com; dkim=none (message not signed) header.d=none;free-electrons.com; dmarc=bestguesspass action=none header.from=xilinx.com; From: Naga Sureshkumar Relli To: Christoph Hellwig , Richard Weinberger CC: "dwmw2@infradead.org" , "computersforpeace@gmail.com" , "dedekind1@gmail.com" , "adrian.hunter@intel.com" , "michal.simek@xilinx.com" , "Punnaiah Choudary Kalluri" , "linux-mtd@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Boris Brezillon Subject: UBIFS LEB properties tree with odd addresses Thread-Topic: UBIFS LEB properties tree with odd addresses Thread-Index: AdIuhYzSHMtf8MMlQH+bJ6F6DdMcjw== Date: Tue, 25 Oct 2016 06:05:32 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.23.95.32] Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-22656.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(7916002)(2980300002)(438002)(199003)(189002)(33656002)(106466001)(4326007)(8676002)(5250100002)(23756003)(2906002)(92566002)(47776003)(81166006)(7846002)(81156014)(5001770100001)(229853001)(5660300001)(50466002)(2900100001)(87936001)(2920100001)(189998001)(626004)(11100500001)(86362001)(63266004)(8746002)(356003)(2930100002)(55846006)(7736002)(50986999)(8936002)(54356999)(7696004)(6116002)(102836003)(3846002)(305945005)(586003)(107986001)(217873001);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR02MB2346;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;PTR:unknown-60-83.xilinx.com;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BL2NAM02FT049;1:T0Qzp2YNlfSzWkJiTTycuFzCm+o/mGy+COHs3ADEfke2ExHuyVOdrGP08CAQqiSkoriMP3sGOCxbilJWnoZ55fiUVjpgpdNhfOHgb6OL4NPu2xDBYwpl0dzsff8EG750unaCzaO/4BPXKksET4XophQuDxQ+Bi5P83tEa+O3pcGdCmcZwKxoZ2dBW82hA+EM5xhXIwZqWu5ZyudtU+ajiiqZWoC1sfP4plGJqT5nbOQR+RTcRxDkMs+TRPuLYOcKPIMh3zR60huWJIrulV2wVIA3QoangwCxcjXqKjnuVYaRid9l1wHdFFw7SouIAo2k0R2obuevdFlBptu/59NDXFfy5AtU8+EKl7bnWUGNto9F3yR6KBIlcRa4DbFDbu1vToDHk4sUEDfliL7Pey/SzB7BwPZdLLdmqXxfZGURP5Chej+abOW/u6JcsizWnyo8BPeCW88vCYD1d0Gvcfgn8IjzvzoO100rP3LjCje+lf0WCWsIxap1rsAx8Ibw0D0sg9KK1Ul/FPgJ3fnfn6YQ8BFHetqf6q1Ed+06ThuFQcAfqNl9fzmgwd0NpIg/HEXpU9qtDIAxJ0b0VhQl4Y3Niae5oq53U6/M2tBD8U94bH+Cgynrnq/U+Y4L/DNfc6ulVp4+FfRG1J0UsBvjkk0iCQ== X-MS-Office365-Filtering-Correlation-Id: c34cfdcf-3fb8-4f92-5668-08d3fc9cf08f X-Microsoft-Exchange-Diagnost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k+BxdTIPemhBk6NUrnIbt6fICrzZw+bXDND5HdBYS5RiZGloqOm6KT9E56UcNH5szUZVqx8gSjinpNLU37G2ALwe/1QbdoZ/VpsMO7xnk35ubq1AmjiY5kSWutO4V9PELamd0UV4ct+dpTe9dtgolvJjzZ4uHq0KCjlLJi1BgCuOJY4M5hO0W0neGUhwIOI8D/pOBIf1yH95R4JgbmY5ML4+hiWSkt/uqGrQ5+np/KTRkNY03N6uOj;20:QhHi5FrHtM161nN/btrDjSQi6Fqw5gqH4s10agBwsyff9QXBLKDUh2iO0AElnDgCDFz9EwYApfN8A10rTHfJPd0idHeq625aDYhEs7HbwhlFsN16D8XxezjXPgXDwAHiv4ZCMn1dOeJwbPcqzizAhDckp2//kRKlQmzxgQqfpGrBieaweHPOI6qlLtAohbJS9+sV4CgP4aDlVuqepO7/wr3y00z6cDygAh0iqFiaQQPrrutUMFfTOIgf1t8X2W4mLzZevtxnFEhuH236qeNX1Bz+LaWjF3jKsRYIu3rT7SB+3xl1M1XkW9ZdLMBSpyocEjW5Sb/TsD7e1SZvM8RpgexJ5qYFXw+Nf15XqIV0tFaOiQcnbWNrlwUD2NLLQYZKhWgtNwUZaU/5Z8jyWSNS/Bk4BNdSdDelh5uELpguabRvo3T37p00Sm9HBxubVaELj9B1u8paqXgYvkL6LIYAYh5qPhGr7Us2MjR1t9XUAn5BTqGe6jHtTc7WGdfKIIiU X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(13023025)(13018025)(13024025)(13015025)(13017025)(8121501046)(5005006)(10201501046)(3002001)(6055026);SRVR:DM5PR02MB2346;BCL:0;PCL:0;RULEID:;SRVR:DM5PR02MB2346; X-Microsoft-Exchange-Diagnostics: 1;DM5PR02MB2346;4:s1RiNzpZVV8HIkPSrxAet21p+FJb6YAGZYTIURdY8f75RpJ+1VacD9sW7augtWYEMKTow0QNQ3ob4EE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o= X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2016 06:05:36.7738 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.83];Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR02MB2346 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id u9P6dgnk019946 Content-Length: 2734 Lines: 60 Hi, We are testing UBIFS (NOR) on Zynq Ultrascale+ MPSoC GQSPI controller driver. Apart from my previous mail thread about UBIFS, i.e along with dma issue I am facing one more Problem related to offsets. Info about GQSPI Controller: This controller can access the flash device in the following modes. 1. Single flash mode 2. Two spi flash memories with separate buses (dual parallel) Single flash mode: it is normal configuration, one controller and one flash memory In dual parallel mode following are the functionalities: 1) Supporting two SPI flash memories operating in parallel. 8 I/O lines. 2) Chip selects and clock are shared to both the flash devices 3) This mode is targeted for faster read/write speed and also doubles the size 4) Commands/data can be transmitted/received from both the devices(mirror), or only upper or only lower flash memory devices. 5) Data arrangement: ??? With stripe (controller configuration) enabled, ??? Even bytes i.e. 0, 2, 4,... are transmitted on Lower Data Bus ??? Odd bytes i.e. 1, 3, 5,.. are transmitted on Upper Data Bus. Kernel version : 4.4.0 Controller limitation: ZynqMP gqspi controller supports only even addresses when two flash devices are connected (dual parallel mode). Issue I am facing: -> Since our controller supports even addresses in dual parallel mode We are seeing issues with ubifs in dual parallel mode and jffs2 is working fine and we observed the following: IN dual parallel mode, the Erase block size was 128KiB whereas single flash mode the Erase block size was 64KiB. In single flash mode, we are getting pnode_sz value as 16 and for dual parallel mode we are getting an odd value 17 And ltab_sz value in single mode as 12 and in dual parallel mode as 11. Because of these odd values, check_lpt_type offset argument is odd address and hence lpt_type error. When I ran the mnt command, I am getting the following error "UBIFS error (ubi0:0 pid 1882): check_lpt_type: invalid type (4) in LPT node type 2" Ran the below commands: a)ubiformat /dev/mtd0 -e 0 -y b)ubiattach -p /dev/mtd0 c)ubimkvol -N data -m /dev/ubi0 d)mount -t ubifs ubi0:data /mnt So for temporary hack we did the following change In fs/ubifs/lpt.c In do_calc_lpt_geom(), added the following +?????? if (c->pnode_sz % 2) +?????????????? c->pnode_sz += 1; +?????? if (c->ltab_sz % 2) +?????????????? c->ltab_sz += 1; Please kindly suggest, I need your inputs, changing the pnode_sz and ltab_sz to even in lpt.c, will it impact on any others? We can do the same change in spi layer (change the address to even) but the above properties won't reflect in ubi layer. Kindly please suggest. If I haven't provided sufficient information, please let me know. Thanks, Naga Sureshkumar Relli