Re: [PATCH v14 6/9] added support for DesignWare Controller

2016-04-13 Thread Akinobu Mita
Hi Joao, 2016-04-13 21:57 GMT+09:00 Joao Pinto <joao.pi...@synopsys.com>: > > Hi Akinobu, > > On 4/13/2016 1:19 PM, Akinobu Mita wrote: >> Hi Joao, >> >> 2016-04-13 18:04 GMT+09:00 Joao Pinto <joao.pi...@synopsys.com>: >> >>> diff --gi

Re: [PATCH v14 6/9] added support for DesignWare Controller

2016-04-13 Thread Akinobu Mita
Hi Joao, 2016-04-13 18:04 GMT+09:00 Joao Pinto : > diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h > index e3931d0..c780d14 100644 > --- a/drivers/scsi/ufs/ufshcd.h > +++ b/drivers/scsi/ufs/ufshcd.h > @@ -263,6 +263,7 @@ struct ufs_pwr_mode_info { >

Re: [PATCH v7 3/3] add support for DWC UFS Host Controller

2016-02-13 Thread Akinobu Mita
Hi Joao, 2016-02-11 21:13 GMT+09:00 Joao Pinto : > +static int ufshcd_dwc_connection_setup(struct ufs_hba *hba) > +{ > + int ret = 0; > + > + /* Local side Configuration */ > + ret = ufshcd_dme_set(hba, UIC_ARG_MIB(T_CONNECTIONSTATE), 0); > + if

Re: [PATCH 2/2] add support for DWC UFS Host Controller

2016-02-09 Thread Akinobu Mita
Hi Joao, 2016-02-09 4:07 GMT+09:00 Joao Pinto : > diff --git a/drivers/scsi/ufs/ufshcd-dwc.c b/drivers/scsi/ufs/ufshcd-dwc.c > new file mode 100644 > index 000..b12b1a8 > --- /dev/null > +++ b/drivers/scsi/ufs/ufshcd-dwc.c > @@ -0,0 +1,768 @@ > +/* > + * UFS Host

Re: [PATCH] add driver for DesignWare UFS Host Controller

2016-01-28 Thread Akinobu Mita
Hi Joao, 2016-01-28 2:04 GMT+09:00 Joao Pinto : > - NOP_OUT is failing with OCS = 0x7 > > The OCS value is calculated in ufshcd_get_tr_ocs() in ufshcd.c. > I made a dump of the UTRD pointer where we can check the status = 7 ([2]). > > UTRD at: 7007c3e0 > @

Re: [PATCH v3 05/15] scsi: ufs: increase fDeviceInit query response timeout

2015-10-26 Thread Akinobu Mita
2015-10-25 22:38 GMT+09:00 : >> 2015-09-02 19:13 GMT+09:00 Yaniv Gardi : >>> fDeviceInit query response time for some devices is too long that >>> default >>> query request timeout of 100ms may not be enough. Experiments show that >>> fDeviceInit

Re: [PATCH v3 13/15] scsi: ufs: add missing memory barriers

2015-10-26 Thread Akinobu Mita
2015-10-25 23:40 GMT+09:00 : >> 2015-09-02 19:13 GMT+09:00 Yaniv Gardi : >>> Performing several writes to UFS host controller registers has >>> no gurrantee of ordering, so we must make sure register writes >>> to setup request list base address etc.

Re: [PATCH v3 05/15] scsi: ufs: increase fDeviceInit query response timeout

2015-10-23 Thread Akinobu Mita
2015-09-02 19:13 GMT+09:00 Yaniv Gardi : > fDeviceInit query response time for some devices is too long that default > query request timeout of 100ms may not be enough. Experiments show that > fDeviceInit response sometimes takes 500ms so to be on safer side this > change

Re: [PATCH v3 13/15] scsi: ufs: add missing memory barriers

2015-10-22 Thread Akinobu Mita
2015-09-02 19:13 GMT+09:00 Yaniv Gardi : > Performing several writes to UFS host controller registers has > no gurrantee of ordering, so we must make sure register writes > to setup request list base address etc. are performed before the > run/stop register is enabled. > In

Re: [PATCH v3 12/15] scsi: ufs: reduce the interrupts for power mode change requests

2015-10-22 Thread Akinobu Mita
2015-10-21 23:57 GMT+09:00 Akinobu Mita <akinobu.m...@gmail.com>: > 2015-09-02 19:13 GMT+09:00 Yaniv Gardi <yga...@codeaurora.org>: >> DME commands such as Hibern8 enter/exit and gear switch generate 2 >> completion interrupts, one for confirmation that command is

Re: [PATCH v3 03/15] scsi: ufs: verify command tag validity

2015-10-21 Thread Akinobu Mita
2015-09-02 19:13 GMT+09:00 Yaniv Gardi : > A race condition appear to exist between request completion when > scsi_done() is called to end the request and set the tag back to > -1 (at blk_queue_end_tag() scsi_end_request), and scsi layer error > handling which aborts the

Re: [PATCH v3 12/15] scsi: ufs: reduce the interrupts for power mode change requests

2015-10-21 Thread Akinobu Mita
2015-09-02 19:13 GMT+09:00 Yaniv Gardi : > DME commands such as Hibern8 enter/exit and gear switch generate 2 > completion interrupts, one for confirmation that command is received > by local UniPro and 2nd one is the final confirmation after communication > with remote

Re: [PATCH v3 07/15] scsi: ufs: set REQUEST_SENSE command size to 18 bytes

2015-10-21 Thread Akinobu Mita
2015-09-02 19:13 GMT+09:00 Yaniv Gardi : > According to UFS device specification REQUEST_SENSE command can > only report back up to 18 bytes of data. > > Signed-off-by: Gilad Broner > Signed-off-by: Yaniv Gardi > > --- >

Re: [PATCH v3 09/15] scsi: ufs: add retries for hibern8 enter

2015-10-21 Thread Akinobu Mita
2015-09-02 19:13 GMT+09:00 Yaniv Gardi : > If hibern8 enter command fails then UFS link state may be unknown which > may result into timeout of all the commands issued after failure. > > This change does 2 things (for pre-defined number of retry counts) after > hibern8 enter

Re: [PATCH v1 07/17] scsi: ufs: separate device and host quirks

2015-10-21 Thread Akinobu Mita
2015-09-13 23:52 GMT+09:00 Yaniv Gardi : > diff --git a/drivers/scsi/ufs/ufs_quirks.c b/drivers/scsi/ufs/ufs_quirks.c > new file mode 100644 > index 000..b649bbf > --- /dev/null > +++ b/drivers/scsi/ufs/ufs_quirks.c > @@ -0,0 +1,101 @@ > +/* > + * Copyright (c)

Re: [PATCH v1 01/17] scsi: ufs-qcom: add number of lanes per direction

2015-10-21 Thread Akinobu Mita
2015-09-13 23:52 GMT+09:00 Yaniv Gardi : > diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c > index 1c37a7d..9638553 100644 > --- a/drivers/scsi/ufs/ufshcd.c > +++ b/drivers/scsi/ufs/ufshcd.c > @@ -40,6 +40,7 @@ > #include > #include > > +#include >

Re: [PATCH v1 12/17] scsi: ufs: add retry for query descriptors

2015-10-21 Thread Akinobu Mita
2015-09-13 23:52 GMT+09:00 Yaniv Gardi : > Query commands have 100ms timeout and it may timeout if they are > issued in parallel to ongoing read/write SCSI commands, this change > adds the retry (max: 10) in case command timeouts. > > Signed-off-by: Subhash Jadavani

Re: [PATCH v1 06/17] scsi :ufs: verify hba controller hce reg value

2015-10-21 Thread Akinobu Mita
2015-09-13 23:52 GMT+09:00 Yaniv Gardi : > Sometimes due to hw issues it takes some time to the > host controller register to update. In order to verify the register > has updated, a polling is done until its value is set. > > In addition the functions ufshcd_hba_stop() and

Re: [PATCH v1 08/17] scsi: ufs: split broken LCC quirk

2015-10-21 Thread Akinobu Mita
2015-09-13 23:52 GMT+09:00 Yaniv Gardi : > Currently when UFSHCD_BROKEN_LCC quirk is defined, LCC is getting > disabled on both host and device side but there could be a need > where we don't want to disable the LCC on both side hence this change > splits the quirk in 2

Re: [PATCH v1 02/17] scsi: ufs: add option to change default UFS power management level

2015-10-21 Thread Akinobu Mita
2015-09-13 23:52 GMT+09:00 Yaniv Gardi : > UFS device and link can be put in multiple different low power modes > hence UFS driver supports multiple different low power modes. > By default UFS driver selects the default (optimal) low power mode > (which gives moderate power

Re: [PATCH v1 14/17] scsi: ufs: tune UniPro parameters to optimize hibern8 exit time

2015-10-21 Thread Akinobu Mita
2015-09-13 23:52 GMT+09:00 Yaniv Gardi : > Optimal values of local UniPro parameters like PA_Hibern8Time & > PA_TActivate can help reduce the hibern8 exit latency. If both host and > device supports UniPro ver1.6 or later, these parameters will be > automatically tuned

Re: [PATCH v1 16/17] scsi: ufs: add delay before putting UFS rails in low power modes

2015-10-21 Thread Akinobu Mita
2015-09-13 23:52 GMT+09:00 Yaniv Gardi : > We put the UFS device in sleep state & UFS link in hibern8 state during > runtime suspaned. After this we put all the UFS rails in low power > modes immediately but it seems some devices may still draw more than > sleep current from

Re: [PATCH v2 0/8] Fix error message and present UFS variant

2015-08-24 Thread Akinobu Mita
outstanding issues I reported for v1 and v2 are fixed in this version of series. So please feel free to add: Reviewed-by: Akinobu Mita akinobu.m...@gmail.com I still think that we should introduce print_hex_dump_io() or something simpler for dumping __iomem pointer instead of casting 'void __force

Re: [PATCH v2 7/8] scsi: ufs-qcom: add debug prints for test bus

2015-08-21 Thread Akinobu Mita
2015-08-20 22:59 GMT+09:00 Yaniv Gardi yga...@codeaurora.org: +static bool ufs_qcom_testbus_cfg_is_ok(struct ufs_qcom_host *host) +{ + if (host-testbus.select_major = TSTBUS_MAX) { + dev_err(host-hba-dev, + %s: UFS_CFG1[TEST_BUS_SEL} may not equal

Re: [PATCH v2 6/8] scsi: ufs: make the UFS variant a platform device

2015-08-20 Thread Akinobu Mita
2015-08-20 22:59 GMT+09:00 Yaniv Gardi yga...@codeaurora.org: @@ -1036,7 +1037,7 @@ void ufs_qcom_clk_scale_notify(struct ufs_hba *hba) * The variant operations configure the necessary controller and PHY * handshake during initialization. */ -static const struct ufs_hba_variant_ops

Re: [PATCH v2 7/8] scsi: ufs-qcom: add debug prints for test bus

2015-08-20 Thread Akinobu Mita
2015-08-20 22:59 GMT+09:00 Yaniv Gardi yga...@codeaurora.org: @@ -30,6 +48,14 @@ static void ufs_qcom_get_speed_mode(struct ufs_pa_layer_attr *p, char *result); static int ufs_qcom_get_bus_vote(struct ufs_qcom_host *host, const char *speed_mode); static int

Re: [PATCH v1 6/8] scsi: ufs: make the UFS variant a platform device

2015-08-19 Thread Akinobu Mita
2015-08-16 19:14 GMT+09:00 Yaniv Gardi yga...@codeaurora.org: +/** + * ufs_qcom_remove - set driver_data of the device to NULL + * @pdev: pointer to platform device handle + * + * Always return 0 + */ +static int ufs_qcom_remove(struct platform_device *pdev) +{ + struct ufs_hba *hba

Re: [PATCH v1 5/8] scsi: ufs: creates wrapper functions for vops

2015-08-19 Thread Akinobu Mita
2015-08-16 19:14 GMT+09:00 Yaniv Gardi yga...@codeaurora.org: In order to simplify the code a set of wrapper functions is created to test and call each of the variant operations. Signed-off-by: Yaniv Gardi yga...@codeaurora.org --- drivers/scsi/ufs/ufs-qcom.c | 3 +-

Re: [PATCH v1 8/8] scsi: ufs-qcom: add QUniPro hardware support and power optimizations

2015-08-19 Thread Akinobu Mita
2015-08-16 19:14 GMT+09:00 Yaniv Gardi yga...@codeaurora.org: @@ -1208,6 +1510,7 @@ static struct ufs_hba_variant_ops ufs_hba_qcom_vops = { .resume = ufs_qcom_resume, .dbg_register_dump = ufs_qcom_dump_dbg_regs, }; +EXPORT_SYMBOL(ufs_hba_qcom_vops); As I

Re: [PATCH v1 8/8] scsi: ufs-qcom: add QUniPro hardware support and power optimizations

2015-08-18 Thread Akinobu Mita
Hi Yaniv, 2015-08-16 19:14 GMT+09:00 Yaniv Gardi yga...@codeaurora.org: @@ -708,17 +713,18 @@ static inline u32 ufshcd_vops_get_ufs_hci_version(struct ufs_hba *hba) return ufshcd_readl(hba, REG_UFS_VERSION); } -static inline void ufshcd_vops_clk_scale_notify(struct ufs_hba *hba)

[PATCH v2 6/6] scsi: ufs: fix module reference for scsi host

2015-08-01 Thread Akinobu Mita
be unloaded. This fixes it by preparing scsi host template which is initialized at module_init() for each ufs glue driver. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Vinayak Holikatti vinholika...@gmail.com Cc: Dolev Raviv dra...@codeaurora.org Cc: Sujit Reddy Thumma sthu

[PATCH v2 5/6] scsi: ufs: fix unloading module while runtime suspended

2015-08-01 Thread Akinobu Mita
, this acquires shost-scan_mutex lock instead of scsi_device_get() to work around the problem. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Vinayak Holikatti vinholika...@gmail.com Cc: James E.J. Bottomley jbottom...@odin.com Cc: Christoph Hellwig h...@lst.de Cc: Dolev Raviv dra

[PATCH v2 3/6] scsi: ufs: fix unbalanced power.disable_depth after reloading driver

2015-08-01 Thread Akinobu Mita
PM status to 'suspended' on driver remove as it was set to 'active' during driver probe. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Vinayak Holikatti vinholika...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Christoph Hellwig h...@lst.de Cc: Dolev Raviv dra

[PATCH v2 0/6] scsi: ufs: fix several issues caused by driver reloading

2015-08-01 Thread Akinobu Mita
already freed hostdata - Fix unloading module while runtime suspended - Fix module reference for scsi host Akinobu Mita (6): scsi: ufs: avoid using hostdata after scsi_host_put() scsi: ufs: fix unbalanced power.usage_count after reloading driver scsi: ufs: fix unbalanced power.disable_depth

[PATCH v2 2/6] scsi: ufs: fix unbalanced power.usage_count after reloading driver

2015-08-01 Thread Akinobu Mita
On driver removal, pm_runtime_get_sync() is called, but pm_runtime_put_*() is missed. So once the driver is reloaded, the device's power.usage_count is unbalanced and the idle callback for the device will never be called. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Vinayak Holikatti

[PATCH v2 4/6] scsi: ufs: prevent IRQ handler accessing already freed hostdata

2015-08-01 Thread Akinobu Mita
that it will be unregistered automatically on driver remove, but the hostdata has already been freed at this time. This fixes it by explicitly registering/unregistering IRQ handler on driver probe/remove. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Vinayak Holikatti vinholika...@gmail.com Cc: James

[PATCH v2 1/6] scsi: ufs: avoid using hostdata after scsi_host_put()

2015-08-01 Thread Akinobu Mita
The hostdata array, which is denoted by 'hba' in ufs driver, should not be accessed after calling scsi_host_put(). Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Vinayak Holikatti vinholika...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Christoph Hellwig h...@lst.de Cc

Re: [PATCH v3 4/4] scsi: ufs: probe and init of variant driver from the platform device

2015-06-08 Thread Akinobu Mita
2015-06-08 1:27 GMT+09:00 Yaniv Gardi yga...@codeaurora.org: static int ufshcd_pltfrm_remove(struct platform_device *pdev) { struct ufs_hba *hba = platform_get_drvdata(pdev); + struct device_node *node = pdev-dev.of_node; + struct device_node *ufs_variant_node; +

Re: [PATCH v2 4/4] scsi: ufs: probe and init of variant driver from the platform device

2015-06-08 Thread Akinobu Mita
2015-06-08 0:32 GMT+09:00 yga...@codeaurora.org: 1) If ufshcd-pltfrm driver is loaded before ufs-qcom, (what actually happens always), then the calling to of_platform_populate() which is added, guarantees that ufs-qcom probe will be called and finish, before ufshcd_pltfrm probe continues.

Re: [PATCH v2 4/4] scsi: ufs: probe and init of variant driver from the platform device

2015-06-05 Thread Akinobu Mita
2015-06-05 5:53 GMT+09:00 yga...@codeaurora.org: Hi Yaniv, 2015-06-03 18:37 GMT+09:00 Yaniv Gardi yga...@codeaurora.org: @@ -321,7 +313,22 @@ static int ufshcd_pltfrm_probe(struct platform_device *pdev) goto out; } - hba-vops = get_variant_ops(pdev-dev); +

Re: [PATCH v2 4/4] scsi: ufs: probe and init of variant driver from the platform device

2015-06-04 Thread Akinobu Mita
Hi Yaniv, 2015-06-03 18:37 GMT+09:00 Yaniv Gardi yga...@codeaurora.org: @@ -321,7 +313,22 @@ static int ufshcd_pltfrm_probe(struct platform_device *pdev) goto out; } - hba-vops = get_variant_ops(pdev-dev); + err = of_platform_populate(node, NULL, NULL,

[PATCH v6 0/4] scsi: ufs ums-* esp_scsi: fix module reference counting

2015-05-04 Thread Akinobu Mita
-by: and Reviewed-by: tags that have been received are deleted. * v3: - Add fix for ESP SCSI drivers * v2: - Pass correct module reference to usb_stor_probe1() instead of touching all ums-* drivers, suggested by Alan Stern Akinobu Mita (4): scsi: add ability to adjust module reference for scsi host

[PATCH v4 1/4] target: Fix inconsistent address passed to kunmap_atomic() in sbc_dif_copy_prot()

2015-05-01 Thread Akinobu Mita
In sbc_dif_copy_prot(), the addresses passed to kunmap_atomic() are inconsistent with the addresses which are mapped by kmap_atomic(). That could be problematic if an SG element has its length larger than PAGE_SIZE as kunmap_atomic() will attempt to unmap different page. Signed-off-by: Akinobu

Re: [PATCH 3/3] scsi: proper state checking and module refcount handling in scsi_device_get

2015-04-28 Thread Akinobu Mita
-- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html From a305a5284cac23adbf7f86b3014cc2e6325c7b88 Mon Sep 17 00:00:00 2001 From: Akinobu Mita akinobu.m

Re: [PATCH] ufs: Reinstate NULL pointer checks for regulators

2015-04-28 Thread Akinobu Mita
the general coding convention of the implementation. Fixes: 7b16a07c3293 (ufs: Rename of regulator_set_optimum_mode) Reported-by: Akinobu Mita akinobu.m...@gmail.com Signed-off-by: Bjorn Andersson bjorn.anders...@sonymobile.com Tested-by: Akinobu Mita akinobu.m...@gmail.com This patch still

Re: [PATCH] scatterlist: enable sg chaining for all architectures

2015-04-28 Thread Akinobu Mita
2015-04-29 7:16 GMT+09:00 James Bottomley james.bottom...@hansenpartnership.com: On Tue, 2015-04-28 at 14:27 -0700, Andrew Morton wrote: On Sat, 25 Apr 2015 23:56:16 +0900 Akinobu Mita akinobu.m...@gmail.com wrote: Some architectures enable sg chaining option while others do

Re: [PATCH v3 1/5] target: ensure se_cmd-t_prot_sg is allocated when required

2015-04-27 Thread Akinobu Mita
2015-04-26 18:44 GMT+09:00 Sagi Grimberg sa...@dev.mellanox.co.il: @@ -2181,6 +2182,12 @@ static inline void transport_reset_sgl_orig(struct se_cmd *cmd) static inline void transport_free_pages(struct se_cmd *cmd) { +if (!(cmd-se_cmd_flags SCF_PASSTHROUGH_PROT_SG_TO_MEM_NOALLOC)) {

Re: [PATCH v3 5/5] target/file: enable WRITE SAME when protection info is enabled

2015-04-27 Thread Akinobu Mita
2015-04-26 18:58 GMT+09:00 Sagi Grimberg sa...@dev.mellanox.co.il: On 4/25/2015 5:33 PM, Akinobu Mita wrote: Now we can generate correct PI for WRITE SAME command, so it is unnecessary to disallow WRITE SAME when protection info is enabled. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com

Re: [PATCH v3 3/5] target: handle odd SG mapping for data transfer memory

2015-04-27 Thread Akinobu Mita
2015-04-26 19:07 GMT+09:00 Sagi Grimberg sa...@dev.mellanox.co.il: On 4/25/2015 5:33 PM, Akinobu Mita wrote: sbc_dif_generate() and sbc_dif_verify() currently assume that each SG element for data transfer memory doesn't straddle the block size boundary. However, when using SG_IO ioctl, we

Re: [PATCH v3 4/5] target: Fix sbc_dif_generate() and sbc_dif_verify() for WRITE SAME

2015-04-27 Thread Akinobu Mita
2015-04-26 18:53 GMT+09:00 Sagi Grimberg sa...@dev.mellanox.co.il: On 4/25/2015 5:33 PM, Akinobu Mita wrote: For WRITE SAME, data transfer memory only contains a single block but protection information is required for all blocks that are written by the command. This makes sbc_dif_generate

[PATCH v3 4/5] target: Fix sbc_dif_generate() and sbc_dif_verify() for WRITE SAME

2015-04-25 Thread Akinobu Mita
For WRITE SAME, data transfer memory only contains a single block but protection information is required for all blocks that are written by the command. This makes sbc_dif_generate() and sbc_dif_verify() work for WRITE_SAME. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Nicholas

[PATCH v3 3/5] target: handle odd SG mapping for data transfer memory

2015-04-25 Thread Akinobu Mita
correctly, this change inverts the outer loop to iterate data transfer memory and the inner loop to iterate protection information and enables to calculate CRC for a block which straddles multiple SG elements. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Tim Chen tim.c.c

[PATCH v3 1/5] target: ensure se_cmd-t_prot_sg is allocated when required

2015-04-25 Thread Akinobu Mita
-allocated protection information by scsi mid-layer. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Nicholas Bellinger n...@linux-iscsi.org Cc: Sagi Grimberg sa...@mellanox.com Cc: Martin K. Petersen martin.peter...@oracle.com Cc: Christoph Hellwig h...@lst.de Cc: James E.J. Bottomley james.bottom

[PATCH v3 5/5] target/file: enable WRITE SAME when protection info is enabled

2015-04-25 Thread Akinobu Mita
Now we can generate correct PI for WRITE SAME command, so it is unnecessary to disallow WRITE SAME when protection info is enabled. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Nicholas Bellinger n...@linux-iscsi.org Cc: Sagi Grimberg sa...@mellanox.com Cc: Martin K. Petersen

[PATCH] scatterlist: enable sg chaining for all architectures

2015-04-25 Thread Akinobu Mita
a special handling for some architectures. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Arnd Bergmann a...@arndb.de Cc: linux-a...@vger.kernel.org Cc: James E.J. Bottomley jbottom...@odin.com Cc: Christoph Hellwig h...@lst.de Cc: linux-scsi@vger.kernel.org Cc: Nicholas A. Bellinger n

[PATCH v2 2/4] target: Abandon odd SG mapping for data transfer memory

2015-04-21 Thread Akinobu Mita
and makes those functions return failure to stop continuing the operation. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Nicholas Bellinger n...@linux-iscsi.org Cc: Sagi Grimberg sa...@mellanox.com Cc: Martin K. Petersen martin.peter...@oracle.com Cc: Christoph Hellwig h...@lst.de Cc: James E.J

[PATCH v2 4/4] target/file: enable WRITE SAME when protection info is enabled

2015-04-21 Thread Akinobu Mita
Now we can generate correct PI for WRITE SAME command, so it is unnecessary to disallow WRITE SAME when protection info is enabled. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Nicholas Bellinger n...@linux-iscsi.org Cc: Sagi Grimberg sa...@mellanox.com Cc: Martin K. Petersen

[PATCH v2 3/4] target: Fix sbc_dif_generate() and sbc_dif_verify() for WRITE SAME

2015-04-21 Thread Akinobu Mita
For WRITE SAME, data transfer memory only contains a single block but protection information is required for all blocks that are written by the command. This makes sbc_dif_generate() and sbc_dif_verify() work for WRITE_SAME. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Nicholas

[PATCH v2 1/4] target: ensure se_cmd-t_prot_sg is allocated when required

2015-04-21 Thread Akinobu Mita
-allocated protection information by scsi mid-layer. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Nicholas Bellinger n...@linux-iscsi.org Cc: Sagi Grimberg sa...@mellanox.com Cc: Martin K. Petersen martin.peter...@oracle.com Cc: Christoph Hellwig h...@lst.de Cc: James E.J. Bottomley james.bottom

[PATCH v2 0/4] target: Fix several problems related to T10-PI support

2015-04-21 Thread Akinobu Mita
sbc_dif_verify() for WRITE_SAME command - Fix inverted rw argument for fd_do_rw() - Perform DIF verify before write for WRITE_SAME Akinobu Mita (4): target: ensure se_cmd-t_prot_sg is allocated when required target: Abandon odd SG mapping for data transfer memory target: Fix sbc_dif_generate

Re: [PATCH 4/4] target/file: enable WRITE SAME when protection info is enabled

2015-04-21 Thread Akinobu Mita
2015-04-21 8:36 GMT+09:00 Akinobu Mita akinobu.m...@gmail.com: Now we can generate correct PI for WRITE SAME command, so it is unnecessary to disallow WRITE SAME when protection info is enabled. I noticed that this patch has multiple problems. @@ -381,11 +381,6 @@ fd_execute_write_same(struct

[PATCH 1/4] target: ensure se_cmd-t_prot_sg is allocated when required

2015-04-20 Thread Akinobu Mita
-allocated protection information by scsi mid-layer. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Nicholas Bellinger n...@linux-iscsi.org Cc: Sagi Grimberg sa...@mellanox.com Cc: Martin K. Petersen martin.peter...@oracle.com Cc: Christoph Hellwig h...@lst.de Cc: James E.J. Bottomley james.bottom

[PATCH 0/4] target: Fix several problems related to T10-PI support

2015-04-20 Thread Akinobu Mita
This patchset aims to fix several problems related to T10-PI support. These patches can be applied on top of Sagi's [v1] Simlify dif_verify routines and fixup fileio protection information code patchset. Akinobu Mita (4): target: ensure se_cmd-t_prot_sg is allocated when required target

[PATCH 2/4] target: Abandon odd SG mapping for data transfer memory

2015-04-20 Thread Akinobu Mita
and makes those functions return failure to stop continuing the operation. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Nicholas Bellinger n...@linux-iscsi.org Cc: Sagi Grimberg sa...@mellanox.com Cc: Martin K. Petersen martin.peter...@oracle.com Cc: Christoph Hellwig h...@lst.de Cc: James E.J

[PATCH 4/4] target/file: enable WRITE SAME when protection info is enabled

2015-04-20 Thread Akinobu Mita
Now we can generate correct PI for WRITE SAME command, so it is unnecessary to disallow WRITE SAME when protection info is enabled. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Nicholas Bellinger n...@linux-iscsi.org Cc: Sagi Grimberg sa...@mellanox.com Cc: Martin K. Petersen

[PATCH 3/4] target: Fix sbc_dif_generate() for WRITE SAME

2015-04-20 Thread Akinobu Mita
For WRITE SAME, data transfer memory only contains a single block but protection information is required for all blocks that are written by the command. This makes sbc_dif_generate() work for WRITE_SAME. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Nicholas Bellinger n...@linux

Re: [RFC] Simlify dif_verify routines and fixup fileio protection information code.

2015-04-16 Thread Akinobu Mita
2015-04-16 17:52 GMT+09:00 Sagi Grimberg sa...@dev.mellanox.co.il: On 4/15/2015 7:10 PM, Martin K. Petersen wrote: Sagi == Sagi Grimberg sa...@dev.mellanox.co.il writes: By the commit 436f4a0a (loopback: Add fabric_prot_type attribute support), When WRITE_SAME command with WRPROTECT=0 is

Re: [RFC] Simlify dif_verify routines and fixup fileio protection information code.

2015-04-15 Thread Akinobu Mita
2015-04-15 19:07 GMT+09:00 Sagi Grimberg sa...@dev.mellanox.co.il: On 4/15/2015 2:52 AM, Akinobu Mita wrote: Looks good... I'll test with these patches and check if the problems I met disappear. Thanks Akinobu, Waiting to hear your verdict before sending a formal patchset. I hit

Re: [PATCH 2/5] ufs: Rename of regulator_set_optimum_mode

2015-04-14 Thread Akinobu Mita
2015-02-12 12:35 GMT+09:00 Bjorn Andersson bjorn.anders...@sonymobile.com: The function regulator_set_optimum_mode() is changing name to regulator_set_load(), so update the code accordingly. Also cleaned up ufshcd_config_vreg_load() while touching the code. Signed-off-by: Bjorn Andersson

Re: [RFC] Simlify dif_verify routines and fixup fileio protection information code.

2015-04-14 Thread Akinobu Mita
2015-04-14 2:19 GMT+09:00 Sagi Grimberg sa...@mellanox.com: Hey All, This set follows the patchset from Akinobu Mita that addresses DIF bounce buffer sgl construction. Instead of trying to fix these bugs, this removes it altogether and work with cmd-t_prot_sg directly. The first patch

Re: [RFC] Simlify dif_verify routines and fixup fileio protection information code.

2015-04-14 Thread Akinobu Mita
2015-04-15 2:20 GMT+09:00 Sagi Grimberg sa...@dev.mellanox.co.il: On 4/14/2015 3:17 PM, Akinobu Mita wrote: 2015-04-14 2:19 GMT+09:00 Sagi Grimberg sa...@mellanox.com: Hey All, This set follows the patchset from Akinobu Mita that addresses DIF bounce buffer sgl construction. Instead

Re: [PATCH -next v3] target/rd: Don't pass imcomplete scatterlist entries to sbc_dif_verify_*

2015-04-13 Thread Akinobu Mita
2015-04-13 13:59 GMT+09:00 Nicholas A. Bellinger n...@linux-iscsi.org: On Sat, 2015-04-11 at 13:17 +0900, Akinobu Mita wrote: The scatterlist for protection information which is passed to sbc_dif_verify_read() or sbc_dif_verify_write() requires that neighboring scatterlist entries

[PATCH 1/3] target/file: Fix BUG() when CONFIG_DEBUG_SG=y and DIF protection enabled

2015-04-13 Thread Akinobu Mita
to sg_set_buf(). sg_set_buf() uses virt_to_page() to convert virtual address to struct page, but it doesn't work with vmalloc address. vmalloc_to_page() should be used instead. As prot_buf isn't usually too large, so fix it by allocating prot_buf by kmalloc instead of vmalloc. Signed-off-by: Akinobu

[PATCH -next v3] target/rd: Don't pass imcomplete scatterlist entries to sbc_dif_verify_*

2015-04-10 Thread Akinobu Mita
time. For the architectures which don't support sg chaining (i.e. !CONFIG_ARCH_HAS_SG_CHAIN), fix it by allocating temporary scatterlist if needed. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Nicholas Bellinger n...@linux-iscsi.org Cc: Sagi Grimberg sa...@dev.mellanox.co.il Cc: Martin K

Re: [PATCH v2 2/2] target/rd: Don't pass imcomplete scatterlist entries to sbc_dif_verify_*

2015-04-08 Thread Akinobu Mita
2015-04-08 14:13 GMT+09:00 Nicholas A. Bellinger n...@linux-iscsi.org: On Sun, 2015-04-05 at 23:59 +0900, Akinobu Mita wrote: The scatterlist for protection information which is passed to sbc_dif_verify_read() or sbc_dif_verify_write() requires that neighboring scatterlist entries

Re: [PATCH v2 1/2] target/rd: reduce code duplication in rd_execute_rw()

2015-04-06 Thread Akinobu Mita
2015-04-06 16:43 GMT+09:00 Sagi Grimberg sa...@dev.mellanox.co.il: On 4/5/2015 5:59 PM, Akinobu Mita wrote: Factor out code duplication in rd_execute_rw() into a helper function rd_do_prot_rw(). This change is required to minimize the forthcoming fix in rd_do_prot_rw(). Signed-off

Re: [PATCH 2/2] target/rd: Don't pass imcomplete scatterlist entries to sbc_dif_verify_*

2015-04-05 Thread Akinobu Mita
2015-04-05 19:10 GMT+09:00 Sagi Grimberg sa...@dev.mellanox.co.il: On 4/4/2015 3:24 PM, Akinobu Mita wrote: The scatterlist for protection information which is passed to sbc_dif_verify_read() or sbc_dif_verify_write() requires that neighboring scatterlist entries are contiguous or chained so

[PATCH v2 2/2] target/rd: Don't pass imcomplete scatterlist entries to sbc_dif_verify_*

2015-04-05 Thread Akinobu Mita
-by: Akinobu Mita akinobu.m...@gmail.com Cc: Nicholas Bellinger n...@linux-iscsi.org Cc: Sagi Grimberg sa...@dev.mellanox.co.il Cc: Martin K. Petersen martin.peter...@oracle.com Cc: Christoph Hellwig h...@lst.de Cc: James E.J. Bottomley james.bottom...@hansenpartnership.com Cc: target-de...@vger.kernel.org

[PATCH v2 1/2] target/rd: reduce code duplication in rd_execute_rw()

2015-04-05 Thread Akinobu Mita
Factor out code duplication in rd_execute_rw() into a helper function rd_do_prot_rw(). This change is required to minimize the forthcoming fix in rd_do_prot_rw(). Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Nicholas Bellinger n...@linux-iscsi.org Cc: Sagi Grimberg sa

Re: [PATCH 1/2] target/rd: reduce code duplication in rd_execute_rw()

2015-04-05 Thread Akinobu Mita
2015-04-05 19:01 GMT+09:00 Sagi Grimberg sa...@dev.mellanox.co.il: On 4/4/2015 3:24 PM, Akinobu Mita wrote: Factor out code duplication in rd_execute_rw() into a helper function rd_do_prot_rw(). This change is required to minimize the forthcoming fix in rd_do_prot_rw(). Signed-off

[PATCH 2/2] target/rd: Don't pass imcomplete scatterlist entries to sbc_dif_verify_*

2015-04-04 Thread Akinobu Mita
-by: Akinobu Mita akinobu.m...@gmail.com Cc: Nicholas Bellinger n...@linux-iscsi.org Cc: Asias He as...@redhat.com Cc: Martin K. Petersen martin.peter...@oracle.com Cc: Christoph Hellwig h...@lst.de Cc: James E.J. Bottomley james.bottom...@hansenpartnership.com Cc: target-de...@vger.kernel.org Cc: linux

[PATCH 1/2] target/rd: reduce code duplication in rd_execute_rw()

2015-04-04 Thread Akinobu Mita
Factor out code duplication in rd_execute_rw() into a helper function rd_do_prot_rw(). This change is required to minimize the forthcoming fix in rd_do_prot_rw(). Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Nicholas Bellinger n...@linux-iscsi.org Cc: Asias He as...@redhat.com Cc

[PATCH 0/3] scsi: ufs: fix several issues caused by driver reloading

2015-03-27 Thread Akinobu Mita
This patch set addresses several issues caused by driver reloading in ufs driver, although the first patch also fixes error path in driver probe. Akinobu Mita (3): scsi: ufs: avoid using hostdata after scsi_host_put() scsi: ufs: fix unbalanced power.usage_count after reloading driver scsi

[PATCH 1/3] scsi: ufs: avoid using hostdata after scsi_host_put()

2015-03-27 Thread Akinobu Mita
The hostdata array, which is denoted by 'hba' in ufs driver, should not be accessed after calling scsi_host_put(). Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Vinayak Holikatti vinholika...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Christoph Hellwig h...@lst.de Cc

[PATCH 3/3] scsi: ufs: fix unbalanced power.disable_depth after reloading driver

2015-03-27 Thread Akinobu Mita
PM status to 'suspended' on driver remove as it was set to 'active' during driver probe. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Vinayak Holikatti vinholika...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Christoph Hellwig h...@lst.de Cc: Dolev Raviv dra

[PATCH 2/3] scsi: ufs: fix unbalanced power.usage_count after reloading driver

2015-03-27 Thread Akinobu Mita
On driver removal, pm_runtime_get_sync() is called, but pm_runtime_put_sync() is missed. So once the driver is reloaded, the device's power.usage_count is unbalanced and the idle callback for the device will never be called. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Vinayak

[PATCH] hpsa: cleanup bitops usage

2015-03-13 Thread Akinobu Mita
Remove unnecessary adjustment for bit number and address of bitmask, and use BITS_TO_LONGS macro to calculate bitmap size. This change just simplifies the code a bit. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Don Brace don.br...@pmcs.com Cc: iss_storage...@hp.com Cc: storage

Re: [PATCH v6 1/3] scsi: ufs: add ioctl interface for query request

2015-03-12 Thread Akinobu Mita
2015-03-12 21:27 GMT+09:00 Gilad Broner gbro...@codeaurora.org: From: Dolev Raviv dra...@codeaurora.org This patch exposes the ioctl interface for UFS driver via SCSI device ioctl interface. As of now UFS driver would provide the ioctl for query interface to connected UFS device.

Re: [PATCH v4 4/4] scsi: ufs: inject errors to verify error handling

2015-03-10 Thread Akinobu Mita
2015-03-10 19:20 GMT+09:00 Gilad Broner gbro...@codeaurora.org: +static bool inject_cmd_hang_tr(struct ufs_hba *hba) +{ + int tag; + + tag = find_first_bit(hba-outstanding_reqs, hba-nutrs); + if (tag == hba-nutrs) + return 0; + + __clear_bit(tag,

Re: [PATCH v4 4/4] scsi: ufs: inject errors to verify error handling

2015-03-04 Thread Akinobu Mita
2015-03-02 23:56 GMT+09:00 Gilad Broner gbro...@codeaurora.org: From: Sujit Reddy Thumma sthu...@codeaurora.org Use fault-injection framework to simulate error conditions in the controller and verify error handling mechanisms implemented in UFS host controller driver. This is used only

[PATCH v5 1/4] scsi: add ability to adjust module reference for scsi host

2015-02-28 Thread Akinobu Mita
though it instead of struct scsi_host_template. This allows the actual LLDDs adjust module reference. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Reviewed-by: Hannes Reinecke h...@suse.de Cc: Vinayak Holikatti vinholika...@gmail.com Cc: Dolev Raviv dra...@codeaurora.org Cc: Sujit Reddy

[PATCH v5 4/4] scsi: esp_scsi: adjust module reference for scsi host

2015-02-28 Thread Akinobu Mita
these drivers always can be unloaded. This fixes it by passing correct module reference to newly introduced scsi_esp_host_alloc() so that .module field in struct Scsi_Host can be adjusted. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Acked-by: David S. Miller da...@davemloft.net Acked

[PATCH v5 0/4] scsi: ufs ums-* esp_scsi: fix module reference counting

2015-02-28 Thread Akinobu Mita
for ESP SCSI drivers * v2: - Pass correct module reference to usb_stor_probe1() instead of touching all ums-* drivers, suggested by Alan Stern Akinobu Mita (4): scsi: add ability to adjust module reference for scsi host scsi: ufs: adjust module reference for scsi host usb: storage: adjust

[PATCH v5 3/4] usb: storage: adjust module reference for scsi host

2015-02-28 Thread Akinobu Mita
module reference to usb_stor_probe1() so that .module field in struct Scsi_Host can be adjusted. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Acked-by: Alan Stern st...@rowland.harvard.edu Cc: Matthew Dharm mdharm-...@one-eyed-alien.net Cc: Greg Kroah-Hartman gre...@linuxfoundation.org Cc: Alan

[PATCH v5 2/4] scsi: ufs: adjust module reference for scsi host

2015-02-28 Thread Akinobu Mita
be unloaded. This fixes it by adjusting module reference after scsi host allocation. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Vinayak Holikatti vinholika...@gmail.com Cc: Dolev Raviv dra...@codeaurora.org Cc: Sujit Reddy Thumma sthu...@codeaurora.org Cc: Subhash Jadavani subha

Re: [PATCH v3 2/4] scsi: ufs: add debugfs for ufs

2015-02-24 Thread Akinobu Mita
2015-02-23 17:08 GMT+09:00 Gilad Broner gbro...@codeaurora.org: From: Lee Susman lsus...@codeaurora.org Adding debugfs capability for ufshcd. debugfs attributes introduced in this patch: - View driver/controller runtime data - Command tag statistics for performance analisis - Dump

Re: [PATCH v2 2/4] scsi: ufs: add debugfs for ufs

2015-02-12 Thread Akinobu Mita
2015-02-10 22:58 GMT+09:00 Gilad Broner gbro...@codeaurora.org: @@ -5760,6 +5963,8 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq) async_schedule(ufshcd_async_scan, hba); + UFSDBG_ADD_DEBUGFS(hba); + return 0;

[PATCH v2 1/2] ata: ahci_platform: fix owner module reference mismatch for scsi host

2015-01-28 Thread Akinobu Mita
the scsi_host_template from libahci_platform to all leaf drivers. The scsi_host_template is passed through a new argument of ahci_platform_init_host(). Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Hans de Goede hdego...@redhat.com Cc: Tejun Heo t...@kernel.org Cc: Christoph Hellwig h...@lst.de Cc: James

[PATCH v2 2/2] ata: pata_platform: fix owner module reference mismatch for scsi host

2015-01-28 Thread Akinobu Mita
the scsi_host_template to pata_of_platform driver. The scsi_host_template is passed through a new argument of __pata_platform_probe(). Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Hans de Goede hdego...@redhat.com Cc: Tejun Heo t...@kernel.org Cc: Christoph Hellwig h...@lst.de Cc: James E.J

[PATCH 1/2] ata: ahci_platform: fix owner module reference mismatch for scsi host

2015-01-26 Thread Akinobu Mita
the scsi_host_template from libahci_platform to all leaf drivers. The scsi_host_template is passed through a new argument of ahci_platform_init_host(). Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Hans de Goede hdego...@redhat.com Cc: Tejun Heo t...@kernel.org Cc: Christoph Hellwig h...@lst.de Cc: James

  1   2   3   >