[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <SN6PR04MB4925A7614D60E58B2E64CBCCFCFF0@SN6PR04MB4925.namprd04.prod.outlook.com>
Date: Wed, 17 Oct 2018 08:33:02 +0000
From: Avri Altman <Avri.Altman@....com>
To: "Bean Huo (beanhuo)" <beanhuo@...ron.com>,
Sayali Lokhande <sayalil@...eaurora.org>,
"subhashj@...eaurora.org" <subhashj@...eaurora.org>,
"cang@...eaurora.org" <cang@...eaurora.org>,
"vivek.gautam@...eaurora.org" <vivek.gautam@...eaurora.org>,
"rnayak@...eaurora.org" <rnayak@...eaurora.org>,
"vinholikatti@...il.com" <vinholikatti@...il.com>,
"jejb@...ux.vnet.ibm.com" <jejb@...ux.vnet.ibm.com>,
"martin.petersen@...cle.com" <martin.petersen@...cle.com>,
"asutoshd@...eaurora.org" <asutoshd@...eaurora.org>,
"evgreen@...omium.org" <evgreen@...omium.org>,
"riteshh@...eaurora.org" <riteshh@...eaurora.org>
CC: "stummala@...eaurora.org" <stummala@...eaurora.org>,
"adrian.hunter@...el.com" <adrian.hunter@...el.com>,
"jlbec@...lplan.org" <jlbec@...lplan.org>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH V15 2/2] scsi: ufs: Add configfs support for UFS
provisioning
Hello Bean,
> >Usage:
> >1) To read current configuration descriptor with index X
> > (where index X can be 0/1/2/3) :
> > cat /config/<device_name>/ufs_config_desc_X
> >
> >2) To write configuration descriptor with index X :
> > echo <config_desc_buf> > /config/<device_name>/ufs_config_desc_X
> >
> >
> I tested on my platform and got these error:
>
> cat /sys/kernel/config/ff3b0000.ufs/ufs_config_desc_0
> 0x90 0x1 0x0 0x1 0x0 0x1 0x7f 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
> 0x1 0x1 0x0 0x3 0x0 0x0 0x0 0x2 0x1 0xc 0x2 0x0 0x0 0x0 0x0 0x0
> 0x1 0x2 0x0 0x3 0x0 0x0 0x0 0x2 0x1 0xc 0x2 0x0 0x0 0x0 0x0 0x0
> 0x1 0x0 0x0 0x3 0x0 0x0 0x0 0x4 0x1 0xc 0x2 0x0 0x0 0x0 0x0 0x0
> 0x1 0x0 0x0 0x0 0x0 0x0 0x1d 0xc7 0x1 0xc 0x2 0x0 0x0 0x0 0x0 0x0
> 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xc 0x0 0x0 0x0 0x0 0x0 0x0
> 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xc 0x0 0x0 0x0 0x0 0x0 0x0
> 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xc 0x0 0x0 0x0 0x0 0x0 0x0
> 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xc 0x0 0x0 0x0 0x0 0x0 0x0
>
> cat /sys/kernel/config/ff3b0000.ufs/ufs_config_desc_1
> [ 63.631734] ufshcd-hisi ff3b0000.ufs: __ufshcd_query_descriptor: opcode
> 0x01 for idn 1 failed, index 1, err = 252
> [ 63.643059] ufshcd-hisi ff3b0000.ufs: __ufshcd_query_descriptor: opcode
> 0x01 for idn 1 failed, index 1, err = 252
> [ 63.653602] ufshcd-hisi ff3b0000.ufs: __ufshcd_query_descriptor: opcode
> 0x01 for idn 1 failed, index 1, err = 252
This actually does not imply an error, just that your device is currently configured
With 4 luns (2 of them are bootluns), as config_desc_0 shows.
config_desc_0 also indicate that there are no other config descriptors -
the 3rd byte of its header is 0x0.
It would be interesting to test however, a write operation with index 0x1 to this device.
The current code is trying to override the config descriptor with the new configuration -
That is, it reads it first, and then re-writes it.
I would expect that this will fail if the you are trying to read descriptor with an index that does not exist.
Thanks,
Avri
> cat /sys/kernel/config/ff3b0000.ufs/ufs_config_desc_2
> [ 77.946097] ufshcd-hisi ff3b0000.ufs: __ufshcd_query_descriptor: opcode
> 0x01 for idn 1 failed, index 2, err = 252
> [ 77.957212] ufshcd-hisi ff3b0000.ufs: __ufshcd_query_descriptor: opcode
> 0x01 for idn 1 failed, index 2, err = 252
> [ 77.968534] ufshcd-hisi ff3b0000.ufs: __ufshcd_query_descriptor: opcode
> 0x01 for idn 1 failed, index 2, err = 252
> cat /sys/kernel/config/ff3b0000.ufs/ufs_config_desc_3
> [ 82.237656] ufshcd-hisi ff3b0000.ufs: __ufshcd_query_descriptor: opcode
> 0x01 for idn 1 failed, index 3, err = 252
> [ 82.248374] ufshcd-hisi ff3b0000.ufs: __ufshcd_query_descriptor: opcode
> 0x01 for idn 1 failed, index 3, err = 252
> [ 82.259117] ufshcd-hisi ff3b0000.ufs: __ufshcd_query_descriptor: opcode
> 0x01 for idn 1 failed, index 3, err = 252
Powered by blists - more mailing lists