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

2015-04-25 Thread Akinobu Mita
or use pre-allocated protection information by scsi mid-layer. Signed-off-by: Akinobu Mita Cc: Nicholas Bellinger Cc: Sagi Grimberg Cc: "Martin K. Petersen" Cc: Christoph Hellwig Cc: "James E.J. Bottomley" Cc: target-de...@vger.kernel.org Cc: linux-scsi@vger.kernel.org --- * No

[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 Cc: Nicholas Bellinger Cc: Sagi Grimberg Cc: "Martin K. Petersen" Cc: Christoph Hellwig Cc: "James E.J. Bottomley&

[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 Cc: Nicholas Bellinger Cc: Sagi Grimberg

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

2015-04-25 Thread Akinobu Mita
such cases 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 Cc: Tim Chen Cc: Herbert Xu Cc: "David

[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 Cc: Arnd Bergmann Cc: linux-a...@vger.kernel.org Cc: "James E.J. Bottomley" Cc: Christoph Hellwig Cc: linux-scsi@vger.kernel.org Cc: Nicholas A. Bellinger Cc: target-de...@vger.kernel.org --- arch/a

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 : >>> @@ -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 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 : > 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. >> >

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 : > 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

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 : > 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. >> >> Ho

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 : > On Tue, 2015-04-28 at 14:27 -0700, Andrew Morton wrote: >> On Sat, 25 Apr 2015 23:56:16 +0900 Akinobu Mita >> wrote: >> >> > Some architectures enable sg chaining option while others do not. >> > >> &g

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

2015-04-28 Thread Akinobu Mita
gt; general coding convention of the implementation. > > Fixes: 7b16a07c3293 ("ufs: Rename of regulator_set_optimum_mode") > Reported-by: Akinobu Mita > Signed-off-by: Bjorn Andersson Tested-by: Akinobu Mita This patch still isn't picked up by scsi tree nor regulator tree. J

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

2015-04-28 Thread Akinobu Mita
L(scsi_device_get); > > -- > 1.9.1 > > -- > 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

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

2015-04-30 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

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

2015-05-04 Thread Akinobu Mita
ed-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

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 : > @@ -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, &pdev->dev);

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 : >> Hi Yaniv, >> >> 2015-06-03 18:37 GMT+09:00 Yaniv Gardi : >>> @@ -321,7 +313,22 @@ static int ufshcd_pltfrm_probe(struct >>> platform_device *pdev) >>> goto out; >>> } >>> >>> - hba->vops = get_variant_ops(&pdev->dev); >>> + err = o

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 : > 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. I'm worrying the c

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 : > 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; > + struct platfor

[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 Cc: Vinayak Holikatti Cc: "James E.J. Bottomley" Cc: Christoph Hellwig Cc: Dolev Raviv Cc: Sujit Reddy Thumma Cc: Subhash

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

2015-08-01 Thread Akinobu Mita
e device's runtime PM status to 'suspended' on driver remove as it was set to 'active' during driver probe. Signed-off-by: Akinobu Mita Cc: Vinayak Holikatti Cc: "James E.J. Bottomley" Cc: Christoph Hellwig Cc: Dolev Raviv Cc: Sujit Reddy Thumma Cc: Maya Er

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

2015-08-01 Thread Akinobu Mita
ssing 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_

[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 Cc: Vinayak Holikatti Cc: "

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

2015-08-01 Thread Akinobu Mita
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 Cc: Vinayak Holikatti Cc: "James E.J. Bottomley" Cc: Christoph H

[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 Cc: Vinayak Holikatti Cc: Dolev Raviv Cc: Sujit Reddy Thumma Cc: Subhash Jadavani Cc: Christoph Hellwig Cc: "James E.J. Bottomley"

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

2015-08-01 Thread Akinobu Mita
avoid manual delete of UFS device W-LUN, this acquires shost->scan_mutex lock instead of scsi_device_get() to work around the problem. Signed-off-by: Akinobu Mita Cc: Vinayak Holikatti Cc: "James E.J. Bottomley" Cc: Christoph Hellwig Cc: Dolev Raviv Cc: Sujit Reddy Thumma Cc: Akinobu

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 : > @@ -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) > +static inline

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 : > 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 > > --- > drivers/scsi/ufs/ufs-qcom.c | 3 +- > drivers/scsi/ufs/ufshcd.c | 104 > +

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 : > @@ -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 said in the view

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 : > +/** > + * 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 = platform_

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 : > @@ -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 ufs_qcom_set_bus_vote(struct ufs_

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 : > @@ -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 ufs_hba_qcom_vops = {

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

2015-08-21 Thread Akinobu Mita
2015-08-22 7:23 GMT+09:00 : >> 2015-08-20 22:59 GMT+09:00 Yaniv Gardi : >>> @@ -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); >>> sta

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 : > +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 0x%05X\n", > +

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

2015-08-24 Thread Akinobu Mita
ed 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 I still think that we should introduce print_hex_dump_io() or something simpler for dumping __iomem pointer instead of casting 'void __force *'. B

Re: [PATCH V3 10/16] scsi: ufs: add UFS power management support

2014-09-10 Thread Akinobu Mita
2014-09-10 20:54 GMT+09:00 Dolev Raviv : > +static inline void ufshcd_enable_irq(struct ufs_hba *hba) > +{ > + if (!hba->is_irq_enabled) { > + enable_irq(hba->irq); > + hba->is_irq_enabled = true; > + } > +} > + > +static inline void ufshcd_disable_irq(struct

Re: [PATCH V3 09/16] scsi: ufs: introduce well known logical unit in ufs

2014-09-11 Thread Akinobu Mita
2014-09-10 20:54 GMT+09:00 Dolev Raviv : > +static void ufshcd_set_queue_depth(struct scsi_device *sdev) > +{ > + int ret = 0; > + u8 lun_qdepth; > + struct ufs_hba *hba; > + > + hba = shost_priv(sdev->host); > + > + lun_qdepth = hba->nutrs; > + ret = ufshcd_read

Re: [PATCH V3 11/16] scsi: ufs: refactor configuring power mode

2014-09-11 Thread Akinobu Mita
2014-09-10 20:54 GMT+09:00 Dolev Raviv : > +static int ufshcd_config_pwr_mode(struct ufs_hba *hba, > + struct ufs_pa_layer_attr *desired_pwr_mode) > +{ > + struct ufs_pa_layer_attr final_params = { 0 }; > + int ret; > + > + if (hba->vops->pwr_change_notify) If hba->

Re: [PATCH V3 09/16] scsi: ufs: introduce well known logical unit in ufs

2014-09-15 Thread Akinobu Mita
2014-09-15 19:39 GMT+09:00 Dolev Raviv : > >> 2014-09-10 20:54 GMT+09:00 Dolev Raviv : >>> +static void ufshcd_set_queue_depth(struct scsi_device *sdev) >>> +{ >>> + int ret = 0; >>> + u8 lun_qdepth; >>> + struct ufs_hba *hba; >>> + >>> + hba = shost_priv(sdev->host); >>> +

Re: [PATCH V3 10/16] scsi: ufs: add UFS power management support

2014-09-16 Thread Akinobu Mita
2014-09-10 20:54 GMT+09:00 Dolev Raviv : > +static int ufshcd_config_vreg_load(struct device *dev, struct ufs_vreg *vreg, > + int ua) > +{ > + int ret = 0; > + struct regulator *reg = vreg->reg; > + const char *name = vreg->name; > + > + BUG_

Re: [PATCH V5 11/17] scsi: ufs: add UFS power management support

2014-09-24 Thread Akinobu Mita
2014-09-25 0:14 GMT+09:00 Dolev Raviv : > +int ufshcd_uic_pwr_ctrl(struct ufs_hba *hba, struct uic_command *cmd) > { > - struct uic_command uic_cmd = {0}; > - struct completion pwr_done; > + struct completion uic_async_done; > unsigned long flags; > u8 status; >

Re: [PATCH V6 10/18] scsi: ufs: manually add well known logical units

2014-10-03 Thread Akinobu Mita
2014-09-25 21:32 GMT+09:00 Dolev Raviv : > +static int ufshcd_scsi_add_wlus(struct ufs_hba *hba) > +{ > + int ret = 0; > + > + hba->sdev_ufs_device = __scsi_add_device(hba->host, 0, 0, > + ufshcd_upiu_wlun_to_scsi_wlun(UFS_UPIU_UFS_DEVICE_WLUN), > NULL); > + if (IS

Re: [PATCH/RESEND V6 13/18] scsi: ufs: refactor configuring power mode

2014-10-03 Thread Akinobu Mita
2014-09-25 21:32 GMT+09:00 Dolev Raviv : > +int ufshcd_change_power_mode(struct ufs_hba *hba, > +struct ufs_pa_layer_attr *pwr_mode) > +{ > + int ret; > + > + /* if already configured to the requested pwr_mode */ > + if (pwr_mode->gear_rx == hba->pwr_i

[PATCH -next] scsi: ufs: fix configuring power mode after UIC link down

2014-10-05 Thread Akinobu Mita
gned-off-by: Akinobu Mita Cc: Vinayak Holikatti Cc: Santosh Y Cc: Dolev Raviv Cc: Subhash Jadavani Cc: Yaniv Gardi Cc: Christoph Hellwig Cc: "James E.J. Bottomley" Cc: linux-scsi@vger.kernel.org --- drivers/scsi/ufs/ufshcd.c | 22 +- drivers/scsi/ufs/ufsh

Re: [PATCH V6 10/18] scsi: ufs: manually add well known logical units

2014-10-05 Thread Akinobu Mita
2014-10-04 1:35 GMT+09:00 Christoph Hellwig : > On Sat, Oct 04, 2014 at 01:16:16AM +0900, Akinobu Mita wrote: >> These __scsi_add_device() calls for W-LUs increase the module reference >> count of ufshcd.ko by three. But no one calls scsi_device_put() for >> these W-LUs, s

Re: [PATCH -next] scsi: ufs: fix configuring power mode after UIC link down

2014-10-06 Thread Akinobu Mita
Hi Subhash, 2014-10-06 7:38 GMT+09:00 Subhash Jadavani : > Hi Akinobu, > > Thanks for the patch. After you reported the issue, I was looking through > our driver to make sure that why this issue was not catched and in fact it's > already have a fix internally and it was yet to be send upstream. >

[PATCH -next] scsi: ufs: fix reference counting of W-LUs

2014-10-07 Thread Akinobu Mita
UFS Device W-LU) from manual delete, increment the reference count while requesting device power mode setting. The rest of W-LUs (hba->sdev_boot and hba->sdev_rpmb) are not directly used from driver, so these references in struct ufs_hba are removed. Signed-off-by: Akinobu Mita Cc: Vinayak Holi

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 { > * @suspend: called during

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 : > > Hi Akinobu, > > On 4/13/2016 1:19 PM, Akinobu Mita wrote: >> 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 >&g

[PATCH v2 0/5] scsi_debug: bug fixes and cleanups for data integrity support

2013-05-19 Thread Akinobu Mita
grity support on highmem machine" into two separate patches. - Add new cleanup patch "reduce duplication between prot_verify_read and prot_verify_write". Cc: "James E.J. Bottomley" Cc: Douglas Gilbert Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.

[PATCH v2 1/5] scsi_debug: fix invalid address passed to kunmap_atomic()

2013-05-19 Thread Akinobu Mita
ap_atomic(). Signed-off-by: Akinobu Mita Cc: "James E.J. Bottomley" Cc: Douglas Gilbert Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Acked-by: Douglas Gilbert --- * New patch from v2 - Splitted from the patch "fix data integrity support on highmem machine

[PATCH v2 2/5] scsi_debug: fix incorrectly nested kmap_atomic()

2013-05-19 Thread Akinobu Mita
s strictly nested. Signed-off-by: Akinobu Mita Cc: "James E.J. Bottomley" Cc: Douglas Gilbert Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Acked-by: Douglas Gilbert --- * New patch from v2 - Splitted from the patch "fix data integrity support on highmem machine

[PATCH v2 3/5] scsi_debug: fix NULL pointer dereference with parameters dif=0 dix=1

2013-05-19 Thread Akinobu Mita
dif_storep available if parameter dix is not zero instead of checking if parameter dif is not zero. Signed-off-by: Akinobu Mita Cc: "James E.J. Bottomley" Cc: Douglas Gilbert Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Acked-by: Douglas Gilbert Acked-by:

[PATCH v2 4/5] scsi_debug: simplify offset calculation for dif_storep

2013-05-19 Thread Akinobu Mita
struct sd_dif_tuple. Signed-off-by: Akinobu Mita Cc: "James E.J. Bottomley" Cc: Douglas Gilbert Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Acked-by: Douglas Gilbert --- * No changes from v1 drivers/scsi/scsi_debug.c | 18 +++--- 1 file changed,

[PATCH v2 5/5] scsi_debug: reduce duplication between prot_verify_read and prot_verify_write

2013-05-19 Thread Akinobu Mita
In order to reduce code duplication between prot_verify_read() and prot_verify_write(), this moves common code into the new functions. Signed-off-by: Akinobu Mita Cc: "James E.J. Bottomley" Cc: Douglas Gilbert Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org ---

[PATCH v3 0/6] scsi_debug: bug fixes and cleanups for data integrity support

2013-05-26 Thread Akinobu Mita
on highmem machine" into two separate patches. - Add new cleanup patch "reduce duplication between prot_verify_read and prot_verify_write". Cc: "James E.J. Bottomley" Cc: Douglas Gilbert Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org A

[PATCH v3 1/6] scsi_debug: fix invalid address passed to kunmap_atomic()

2013-05-26 Thread Akinobu Mita
27;daddr' in the loop and offsetting it by the loop counter on demand. Signed-off-by: Akinobu Mita Cc: "James E.J. Bottomley" Cc: Douglas Gilbert Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org --- * Change from v2 - It was not very clear that incrementing 'd

[PATCH v3 2/6] scsi_debug: fix incorrectly nested kmap_atomic()

2013-05-26 Thread Akinobu Mita
s strictly nested. Signed-off-by: Akinobu Mita Cc: "James E.J. Bottomley" Cc: Douglas Gilbert Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Acked-by: Douglas Gilbert --- * No changes from v2 drivers/scsi/scsi_debug.c | 7 +++ 1 file changed, 3 insertions(+)

[PATCH v3 3/6] scsi_debug: fix NULL pointer dereference with parameters dif=0 dix=1

2013-05-26 Thread Akinobu Mita
dif_storep available if parameter dix is not zero instead of checking if parameter dif is not zero. Signed-off-by: Akinobu Mita Cc: "James E.J. Bottomley" Cc: Douglas Gilbert Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Acked-by: Douglas Gilbert Acked-by:

[PATCH v3 4/6] scsi_debug: invalidate protection info for unmapped region

2013-05-26 Thread Akinobu Mita
pattern. Signed-off-by: Akinobu Mita Cc: "James E.J. Bottomley" Cc: Douglas Gilbert Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org --- * New patch from v3 drivers/scsi/scsi_debug.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/scsi/scsi_de

[PATCH v3 5/6] scsi_debug: simplify offset calculation for dif_storep

2013-05-26 Thread Akinobu Mita
struct sd_dif_tuple. Signed-off-by: Akinobu Mita Cc: "James E.J. Bottomley" Cc: Douglas Gilbert Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Acked-by: Douglas Gilbert --- * No changes from v1 drivers/scsi/scsi_debug.c | 18 +++--- 1 file changed,

[PATCH v3 6/6] scsi_debug: reduce duplication between prot_verify_read and prot_verify_write

2013-05-26 Thread Akinobu Mita
In order to reduce code duplication between prot_verify_read() and prot_verify_write(), this moves common code into the new functions. Signed-off-by: Akinobu Mita Cc: "James E.J. Bottomley" Cc: Douglas Gilbert Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org -

[PATCH] ufshcd-pltfrm: add missing empty slot in ufs_of_match[]

2013-05-26 Thread Akinobu Mita
of_match_table member in struct device_driver must be terminated by empty slot as a sentinel. Signed-off-by: Akinobu Mita Cc: Vinayak Holikatti Cc: Santosh Y Cc: "James E.J. Bottomley" Cc: linux-scsi@vger.kernel.org --- drivers/scsi/ufs/ufshcd-pltfrm.c | 1 + 1 file changed, 1

Re: [PATCH v3 0/6] scsi_debug: bug fixes and cleanups for data integrity support

2013-06-01 Thread Akinobu Mita
2013/5/29 Martin K. Petersen : > I have some patches pending as part of my next DIF/DIX update that makes > some of these things more palatable at the block/SCSI level. Akinobu > voiced interest in finishing the scsi_debug work on top of my code. Yes. I'm interested in that work. Before I start

[PATCH] [SCSI] ufs: fix register address in UIC error interrupt handling

2013-06-01 Thread Akinobu Mita
REG_UIC_ERROR_CODE_DATA_LINK_LAYER. Signed-off-by: Akinobu Mita Cc: Vinayak Holikatti Cc: Santosh Y Cc: "James E.J. Bottomley" Cc: linux-scsi@vger.kernel.org --- drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/dr

[PATCH 3/3] scsi_debug: fix do_device_access() with wrap around range

2013-06-06 Thread Akinobu Mita
can't copy correctly. This fixes it by using sg_pcopy_{from,to}_buffer() that can copy from/to the middle of SG list. Signed-off-by: Akinobu Mita Cc: "James E.J. Bottomley" Cc: Douglas Gilbert Cc: linux-scsi@vger.kernel.org --- drivers/scsi/scsi_debug.c | 43 +

[PATCH 0/3] introduce sg_pcopy_from_buffer() and sg_pcopy_to_buffer()

2013-06-06 Thread Akinobu Mita
list before copying. The main reason for introducing these functions is to fix a problem in scsi_debug module. And there is a local function in crypto/talitos module, which can be replaced by sg_pcopy_to_buffer(). Akinobu Mita (3): lib/scatterlist: introduce sg_pcopy_from_buffer() and

[PATCH 1/3] lib/scatterlist: introduce sg_pcopy_from_buffer() and sg_pcopy_to_buffer()

2013-06-06 Thread Akinobu Mita
The only difference between sg_pcopy_{from,to}_buffer() and sg_copy_{from,to}_buffer() is an additional argument that specifies the number of bytes to skip the SG list before copying. Signed-off-by: Akinobu Mita Cc: Tejun Heo Cc: Imre Deak Cc: Herbert Xu Cc: "David S. Miller" Cc:

Re: [PATCH 1/3] lib/scatterlist: introduce sg_pcopy_from_buffer() and sg_pcopy_to_buffer()

2013-06-08 Thread Akinobu Mita
2013/6/6 Imre Deak : > Looks ok to me, perhaps adding the seek functionality to the mapping > iterator would make things more generic and the mapping iterator more > resemble the page iterator. So we'd have a new sg_miter_start_offset and > call it here something like: > > sg_miter_start_offset(&mi

Re: [PATCH 1/3] lib/scatterlist: introduce sg_pcopy_from_buffer() and sg_pcopy_to_buffer()

2013-06-08 Thread Akinobu Mita
2013/6/7 Tejun Heo : > Hello, > > On Thu, Jun 06, 2013 at 09:52:56PM +0900, Akinobu Mita wrote: >> +static bool sg_miter_get_next_page(struct sg_mapping_iter *miter) >> +{ >> + if (!miter->__remaining) { >> + struct scatterlist *sg; >

Re: [PATCH v3 0/6] scsi_debug: bug fixes and cleanups for data integrity support

2013-06-08 Thread Akinobu Mita
2013/6/7 Martin K. Petersen : >>>>>> "Akinobu" == Akinobu Mita writes: > > Akinobu> So Martin and Douglas, can I have your ACKs on this patch > Akinobu> series for now? > > Only concern is the one I mentioned before: You're mapping and

[PATCH 2/2] [SCSI] ufs: fix DMA mask setting

2013-06-09 Thread Akinobu Mita
pointer. Signed-off-by: Akinobu Mita Cc: Vinayak Holikatti Cc: Santosh Y Cc: "James E.J. Bottomley" Cc: linux-scsi@vger.kernel.org --- drivers/scsi/ufs/ufshcd-pci.c | 26 -- drivers/scsi/ufs/ufshcd.c | 25 + 2 files changed, 25 insert

[PATCH 1/2] [SCSI] ufshcd-pltfrm: remove unnecessary dma_set_coherent_mask() call

2013-06-09 Thread Akinobu Mita
Changing the device coherent dma mask to the value that currently set has no effect. Signed-off-by: Akinobu Mita Cc: Vinayak Holikatti Cc: Santosh Y Cc: "James E.J. Bottomley" Cc: linux-scsi@vger.kernel.org --- drivers/scsi/ufs/ufshcd-pltfrm.c | 7 --- 1 file changed, 7

[PATCH v2 0/4] introduce sg_pcopy_from_buffer() and sg_pcopy_to_buffer()

2013-06-18 Thread Akinobu Mita
the patch "introduce sg_pcopy_from_buffer() and sg_pcopy_to_buffer()" - Add function comment for internal function sg_miter_seek() - Simplify the assignment of sdb->resid in fill_from_dev_buffer() in scsi_debug Akinobu Mita (4): lib/scatterlist: factor out sg_miter_get_nex

[PATCH v2 1/4] lib/scatterlist: factor out sg_miter_get_next_page() from sg_miter_next()

2013-06-18 Thread Akinobu Mita
This function is used to proceed page iterator to the next page if necessary, and will be used to implement the variants of sg_copy_{from,to}_buffer() later. Signed-off-by: Akinobu Mita Cc: Tejun Heo Cc: Imre Deak Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-cry...@vger.ker

[PATCH v2 2/4] lib/scatterlist: introduce sg_pcopy_from_buffer() and sg_pcopy_to_buffer()

2013-06-18 Thread Akinobu Mita
The only difference between sg_pcopy_{from,to}_buffer() and sg_copy_{from,to}_buffer() is an additional argument that specifies the number of bytes to skip the SG list before copying. Signed-off-by: Akinobu Mita Cc: Tejun Heo Cc: Imre Deak Cc: Herbert Xu Cc: "David S. Miller" Cc:

[PATCH v2 4/4] scsi_debug: fix do_device_access() with wrap around range

2013-06-18 Thread Akinobu Mita
necessary to take care to decrease sdb->resid if fill_from_dev_buffer() is called more than once. Signed-off-by: Akinobu Mita Cc: "James E.J. Bottomley" Cc: Douglas Gilbert Cc: linux-scsi@vger.kernel.org --- * Change from v2 - Simplify the assignment of sdb->resid in fil

Re: [PATCH v2 2/4] lib/scatterlist: introduce sg_pcopy_from_buffer() and sg_pcopy_to_buffer()

2013-06-19 Thread Akinobu Mita
2013/6/18 Tejun Heo : > On Tue, Jun 18, 2013 at 10:31:32PM +0900, Akinobu Mita wrote: >> /** >> + * sg_miter_seek - reposition mapping iterator >> + * @miter: sg mapping iter to be seeked >> + * @offset: number of bytes to plus the current location >> + * >

[PATCH v3 0/4] introduce sg_pcopy_from_buffer() and sg_pcopy_to_buffer()

2013-06-23 Thread Akinobu Mita
mplify the assignment of sdb->resid in fill_from_dev_buffer() in scsi_debug Akinobu Mita (4): lib/scatterlist: factor out sg_miter_get_next_page() from sg_miter_next() lib/scatterlist: introduce sg_pcopy_from_buffer() and sg_pcopy_to_buffer() crypto: talitos: use sg_pcopy_to_buffer()

[PATCH v3 2/4] lib/scatterlist: introduce sg_pcopy_from_buffer() and sg_pcopy_to_buffer()

2013-06-23 Thread Akinobu Mita
The only difference between sg_pcopy_{from,to}_buffer() and sg_copy_{from,to}_buffer() is an additional argument that specifies the number of bytes to skip the SG list before copying. Signed-off-by: Akinobu Mita Cc: Tejun Heo Cc: Imre Deak Cc: Herbert Xu Cc: "David S. Miller" Cc:

[PATCH v3 4/4] scsi_debug: fix do_device_access() with wrap around range

2013-06-23 Thread Akinobu Mita
necessary to take care to decrease sdb->resid if fill_from_dev_buffer() is called more than once. Signed-off-by: Akinobu Mita Cc: "James E.J. Bottomley" Cc: Douglas Gilbert Cc: linux-scsi@vger.kernel.org --- * No change from v2 drivers/scsi/scsi_debug.c | 48 +++

[PATCH v3 1/4] lib/scatterlist: factor out sg_miter_get_next_page() from sg_miter_next()

2013-06-23 Thread Akinobu Mita
This function is used to proceed page iterator to the next page if necessary, and will be used to implement the variants of sg_copy_{from,to}_buffer() later. Signed-off-by: Akinobu Mita Acked-by: Tejun Heo Cc: Tejun Heo Cc: Imre Deak Cc: Herbert Xu Cc: "David S. Miller" Cc:

Re: [PATCH 10/10] ufs: fix DMA mask setting

2013-06-28 Thread Akinobu Mita
2013/6/29 James Bottomley : > On Wed, 2013-06-26 at 22:39 +0530, Santosh Y wrote: >> index 19618c6..431ddb2 100644 >> --- a/drivers/scsi/ufs/ufshcd.c >> +++ b/drivers/scsi/ufs/ufshcd.c >> @@ -1711,6 +1711,25 @@ void ufshcd_remove(struct ufs_hba *hba) >> EXPORT_SYMBOL_GPL(ufshcd_remove); >> >> /**

[PATCH v4 0/6] scsi_debug: bug fixes and cleanups for data integrity support

2013-06-29 Thread Akinobu Mita
cation between prot_verify_read and prot_verify_write". Cc: "James E.J. Bottomley" Cc: Douglas Gilbert Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Akinobu Mita (6): scsi_debug: fix invalid address passed to kunmap_atomic() scsi_debug: fix incorrectly nested k

[PATCH v4 5/6] scsi_debug: simplify offset calculation for dif_storep

2013-06-29 Thread Akinobu Mita
struct sd_dif_tuple. Signed-off-by: Akinobu Mita Acked-by: Douglas Gilbert Acked-by: "Martin K. Petersen" Cc: "James E.J. Bottomley" Cc: Douglas Gilbert Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org --- drivers/scsi/scsi_debug.c | 18 +++---

[PATCH v4 6/6] scsi_debug: reduce duplication between prot_verify_read and prot_verify_write

2013-06-29 Thread Akinobu Mita
In order to reduce code duplication between prot_verify_read() and prot_verify_write(), this moves common code into the new functions. Signed-off-by: Akinobu Mita Acked-by: Douglas Gilbert Acked-by: "Martin K. Petersen" Cc: "James E.J. Bottomley" Cc: Douglas Gilbert Cc:

[PATCH v4 1/6] scsi_debug: fix invalid address passed to kunmap_atomic()

2013-06-29 Thread Akinobu Mita
27;daddr' in the loop and offsetting it by the loop counter on demand. Signed-off-by: Akinobu Mita Acked-by: Douglas Gilbert Acked-by: "Martin K. Petersen" Cc: "James E.J. Bottomley" Cc: Douglas Gilbert Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.o

[PATCH v4 3/6] scsi_debug: fix NULL pointer dereference with parameters dif=0 dix=1

2013-06-29 Thread Akinobu Mita
dif_storep available if parameter dix is not zero instead of checking if parameter dif is not zero. Signed-off-by: Akinobu Mita Acked-by: Douglas Gilbert Acked-by: "Martin K. Petersen" Cc: "James E.J. Bottomley" Cc: Douglas Gilbert Cc: "Martin K. Petersen"

[PATCH v4 4/6] scsi_debug: invalidate protection info for unmapped region

2013-06-29 Thread Akinobu Mita
pattern. Signed-off-by: Akinobu Mita Acked-by: Douglas Gilbert Acked-by: "Martin K. Petersen" Cc: "James E.J. Bottomley" Cc: Douglas Gilbert Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org --- drivers/scsi/scsi_debug.c | 5 + 1 file changed, 5 inser

[PATCH v4 2/6] scsi_debug: fix incorrectly nested kmap_atomic()

2013-06-29 Thread Akinobu Mita
s strictly nested. Signed-off-by: Akinobu Mita Acked-by: Douglas Gilbert Acked-by: "Martin K. Petersen" Cc: "James E.J. Bottomley" Cc: Douglas Gilbert Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org --- drivers/scsi/scsi_debug.c | 7 +++ 1 file change

[PATCH 2/2] ufs: don't stop controller before scsi_remove_host()

2013-07-08 Thread Akinobu Mita
scsi_remove_host() sends SYNCHRONIZE CACHE commands for write cache enabled scsi disk devices. So stopping controller working shouldn't be done before scsi_remove_host(). Signed-off-by: Akinobu Mita Cc: Vinayak Holikatti Cc: Santosh Y Cc: "James E.J. Bottomley" Cc: linux-scsi@

[PATCH 1/2] ufshcd-pci: release ioremapped region during removing driver

2013-07-08 Thread Akinobu Mita
hcd-pltfrm to use devres functions, but it didn't convert ufshcd-pci. Therefore, the change causes ufshcd-pci driver not to iounmap UFSHCI register region during removing driver. This fixes it by converting ufshcd-pci to use devres functions. Signed-off-by: Akinobu Mita Cc: Seungwon Je

[PATCH 3/4] scsi_debug: fix WRITE_SAME with virtual_gb > 0

2013-07-15 Thread Akinobu Mita
is corresponding to a given LBA in fake_storep. Signed-off-by: Akinobu Mita Cc: "James E.J. Bottomley" Cc: Douglas Gilbert Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org --- drivers/scsi/scsi_debug.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-

[PATCH 0/4] scsi_debug: fix bugs with certain module parameters

2013-07-15 Thread Akinobu Mita
This patch set includes bug fixes with certain module parameters of scsi_debug. First one fixes bug with num_parts > 0. Others fix logical block provisioning support with unmap_alignment != 0 and with virtual_gb > 0. Akinobu Mita (4): scsi_debug: fix endianness bug in sdebug_build

[PATCH 1/4] scsi_debug: fix endianness bug in sdebug_build_parts()

2013-07-15 Thread Akinobu Mita
With module parameter num_parts > 0, partition table is built on the ramdisk storage when loading the driver. Unfortunately, there is an endianness bug in sdebug_build_parts(). So the partition table is not correctly initialized on big-endian systems. Signed-off-by: Akinobu Mita Cc: "J

[PATCH 4/4] scsi_debug: fix out of range access by Get_LBA_status with virtual_gb > 0

2013-07-15 Thread Akinobu Mita
ned-off-by: Akinobu Mita Cc: "James E.J. Bottomley" Cc: Douglas Gilbert Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org --- drivers/scsi/scsi_debug.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_debug.c b/drivers/

[PATCH 2/4] scsi_debug: fix logical block provisioning support when unmap_alignment != 0

2013-07-15 Thread Akinobu Mita
nmap_granularity=3) The problem is in map_index_to_lba(), which should return the first LBA which is corresponding to a given index of provisioning map (map_storep). Signed-off-by: Akinobu Mita Cc: "James E.J. Bottomley" Cc: Douglas Gilbert Cc: "Martin K. Petersen" Cc: l

Re: [PATCH v2] [SCSI] scsi_debug: silence GCC warning

2013-07-16 Thread Akinobu Mita
2013/7/16 Paul Bolle : > Building scsi_debug.o triggers a GCC warning: > drivers/scsi/scsi_debug.c: In function ‘dif_verify’: > drivers/scsi/scsi_debug.c:1755:3: warning: ‘csum’ may be used > uninitialized in this function [-Wmaybe-uninitialized] > > This is a false positive. But if we tra

Re: [PATCH v2] [SCSI] scsi_debug: silence GCC warning

2013-07-16 Thread Akinobu Mita
2013/7/17 Paul Bolle : > On Wed, 2013-07-17 at 00:21 +0900, Akinobu Mita wrote: >> This one looks good to me. > > Thanks. > >> It would be much better if this commit >> log had a reference to the commit that introduced this warning as >> you described after &#x

[PATCH v2 2/3] ufs: don't disable_irq() if the IRQ can be shared among devices

2013-07-19 Thread Akinobu Mita
: Akinobu Mita Cc: Vinayak Holikatti Cc: Santosh Y Cc: "James E.J. Bottomley" Cc: linux-scsi@vger.kernel.org --- drivers/scsi/ufs/ufshcd-pci.c| 1 - drivers/scsi/ufs/ufshcd-pltfrm.c | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd-pci.c b/drivers/scsi/ufs/uf

[PATCH v2 3/3] ufs: don't stop controller before scsi_remove_host()

2013-07-19 Thread Akinobu Mita
scsi_remove_host() sends SYNCHRONIZE CACHE commands for write cache enabled scsi disk devices. So stopping controller working shouldn't be done before scsi_remove_host(). Signed-off-by: Akinobu Mita Cc: Vinayak Holikatti Cc: Santosh Y Cc: "James E.J. Bottomley" Cc: linux-scsi@

  1   2   3   4   >