[PATCH 3/5] scsi_debug: avoid partial copying PI from prot_sglist to dif_storep

2013-09-18 Thread Akinobu Mita
and dif_storep. This fixes it by ensuring that copying protection info to dif_storep is done after all blocks are successfully verified. Reusing dif_copy_prot() with supporting the opposite direction simplifies this fix. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: James E.J. Bottomley

[PATCH 4/5] scsi_debug: fix invalid value check for guard module parameter

2013-09-18 Thread Akinobu Mita
the type of scsi_debug_guard is 'int' and scsi_debug_guard could be a negative value. This fixes it by changing the type of scsi_debug_guard to 'unsigned int' instead of adding extra check for a negative value. Reported-by: Joe Perches j...@perches.com Signed-off-by: Akinobu Mita akinobu.m

[PATCH 2/5] scsi_debug: factor out copying PI from dif_storep to prot_sglist

2013-09-18 Thread Akinobu Mita
function. It will also be reused in the next change after supporting the opposite direction (copying prot_sglist to dif_storep). Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: Martin K. Petersen

[PATCH -next] ufs: fix source address of the read descriptor

2013-08-28 Thread Akinobu Mita
When the query request with read descriptor opcode is completed, the descriptor is copied from response UPIU to the buffer that the caller has specified. Unfortunately the source address of the descriptor is broken due to the unnecessary address-of operator. Signed-off-by: Akinobu Mita m

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

2013-08-26 Thread Akinobu Mita
map (map_storep). Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Acked-by: Douglas Gilbert dgilb...@interlog.com Acked-by: Martin K. Petersen martin.peter...@oracle.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: Martin K. Petersen martin.peter

[PATCH 0/2] scsi_debug: bug fixes for certain module parameters

2013-08-26 Thread Akinobu Mita
, and I'll try to submit next time. Akinobu Mita (2): scsi_debug: fix endianness bug in sdebug_build_parts() scsi_debug: fix logical block provisioning support when unmap_alignment != 0 drivers/scsi/scsi_debug.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) Cc: James E.J

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

2013-08-26 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 akinobu.m

Re: [PATCH] scsi: fix the build warning

2013-08-22 Thread Akinobu Mita
2013/8/22 Martin K. Petersen martin.peter...@oracle.com: Joe == Joe Perches j...@perches.com writes: Joe I don't get this build warning in the first place and I think the Joe scsi_debug file is quite old and probably doesn't need to be Joe changed at all. guard isn't a boolean, it selects

Re: [PATCH] scsi: fix the build warning

2013-08-22 Thread Akinobu Mita
2013/8/22 James Bottomley jbottom...@parallels.com: On Thu, 2013-08-22 at 21:42 +0900, Akinobu Mita wrote: 2013/8/22 Martin K. Petersen martin.peter...@oracle.com: Joe == Joe Perches j...@perches.com writes: Joe I don't get this build warning in the first place and I think the Joe

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

2013-08-21 Thread Akinobu Mita
2013/8/21 Douglas Gilbert dgilb...@interlog.com: On 13-08-19 10:16 AM, Akinobu Mita wrote: Hi Douglas, Martin, Could you review this patch when you have a time? I would like to submit at least this patch 2/4, and 1/4 which has already been acked by Douglas for the next merge window

Re: [PATCH 1/2] ufs-pltfrm: initialize DMA mask for device-tree probed device

2013-08-20 Thread Akinobu Mita
On 8/19/2013 8:02 PM, James Bottomley wrote: On Mon, 2013-08-19 at 22:56 +0900, Akinobu Mita wrote: The device-tree probed device for ARM doesn't have dev-dma_mask. So dma_set_mask() for the device doesn't succeed. The popular trick for this is - dev-dma_mask = dev-coherent_dma_mask

[PATCH 1/2] ufs-pltfrm: initialize DMA mask for device-tree probed device

2013-08-19 Thread Akinobu Mita
in ufs core driver. So initializing dev-dma_mask as described above is required. Signed-off-by: Akinobu Mita m...@fixstars.com Cc: Sujit Reddy Thumma sthu...@codeaurora.org Cc: Vinayak Holikatti vinholika...@gmail.com Cc: Santosh Y santos...@gmail.com Cc: James E.J. Bottomley jbottom

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

2013-08-19 Thread Akinobu Mita
glue driver. Secondly, we should change pci_ DMA mapping API to dma_ DMA mapping API because core driver is independent of glue drivers. Signed-off-by: Akinobu Mita m...@fixstars.com Cc: Sujit Reddy Thumma sthu...@codeaurora.org Cc: Vinayak Holikatti vinholika...@gmail.com Cc: Santosh Y santos

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

2013-08-19 Thread Akinobu Mita
Akinobu Mita akinobu.m...@gmail.com: Commit b90ebc3d5c41c9164ae04efd2e4f8204c2a186f1 ([SCSI] scsi_debug: fix logical block provisioning support) fixed several issues with logical block provisioning support, but it still doesn't properly fix the cases when unmap_alignment 0. (for example

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

2013-08-15 Thread Akinobu Mita
On 6/29/2013 11:10 AM, Akinobu Mita wrote: 2013/6/29 James Bottomley james.bottom...@hansenpartnership.com: 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

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

2013-07-26 Thread Akinobu Mita
2013/7/26 Martin Peschke mpesc...@linux.vnet.ibm.com: On Mon, 2013-07-15 at 20:52 +0900, Akinobu Mita wrote: 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

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

2013-07-19 Thread Akinobu Mita
-by: Akinobu Mita m...@fixstars.com Cc: Vinayak Holikatti vinholika...@gmail.com Cc: Santosh Y santos...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com 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

[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 m...@fixstars.com Cc: Vinayak Holikatti vinholika...@gmail.com Cc: Santosh Y santos...@gmail.com

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

2013-07-19 Thread Akinobu Mita
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 m...@fixstars.com Cc: Seungwon Jeon

[PATCH v2 0/3] ufs: fix bugs in probing and removing driver paths

2013-07-19 Thread Akinobu Mita
. Akinobu Mita (3): ufshcd-pci: release ioremapped region during removing driver ufs: don't disable_irq() if the IRQ can be shared among devices ufs: don't stop controller before scsi_remove_host() drivers/scsi/ufs/ufshcd-pci.c| 38 +- drivers/scsi/ufs

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

2013-07-16 Thread Akinobu Mita
2013/7/16 Paul Bolle pebo...@tiscali.nl: 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.

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

2013-07-16 Thread Akinobu Mita
2013/7/17 Paul Bolle pebo...@tiscali.nl: 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 '---' in v1 patch. Do you mean

[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 akinobu.m...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: Martin K. Petersen martin.peter...@oracle.com Cc: linux-scsi@vger.kernel.org --- drivers/scsi/scsi_debug.c | 16

[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_parts

[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 akinobu.m

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

2013-07-15 Thread Akinobu Mita
-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: Martin K. Petersen martin.peter...@oracle.com Cc: linux-scsi@vger.kernel.org --- drivers/scsi/scsi_debug.c | 11 ++- 1 file changed, 10 insertions(+), 1

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

2013-07-15 Thread Akinobu Mita
) 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 akinobu.m...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: Martin

[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 m...@fixstars.com Cc: Vinayak Holikatti vinholika...@gmail.com Cc: Santosh Y santos...@gmail.com

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

2013-07-08 Thread Akinobu Mita
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 m...@fixstars.com Cc: Seungwon Jeon

[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 akinobu.m...@gmail.com Acked-by: Douglas Gilbert dgilb...@interlog.com Acked-by: Martin K. Petersen martin.peter...@oracle.com Cc

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

2013-06-29 Thread Akinobu Mita
and offsetting it by the loop counter on demand. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Acked-by: Douglas Gilbert dgilb...@interlog.com Acked-by: Martin K. Petersen martin.peter...@oracle.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: Martin

[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 akinobu.m...@gmail.com Acked-by: Douglas Gilbert dgilb...@interlog.com Acked-by: Martin K. Petersen martin.peter...@oracle.com Cc: James E.J. Bottomley jbottom

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

2013-06-29 Thread Akinobu Mita
pattern. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Acked-by: Douglas Gilbert dgilb...@interlog.com Acked-by: Martin K. Petersen martin.peter...@oracle.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: Martin K. Petersen martin.peter

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

2013-06-29 Thread Akinobu Mita
nested. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Acked-by: Douglas Gilbert dgilb...@interlog.com Acked-by: Martin K. Petersen martin.peter...@oracle.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: Martin K. Petersen martin.peter...@oracle.com

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

2013-06-23 Thread Akinobu Mita
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() scsi_debug: fix

[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 akinobu.m...@gmail.com Cc: Tejun Heo t...@kernel.org Cc: Imre Deak imre.d

[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 akinobu.m...@gmail.com Acked-by: Tejun Heo t...@kernel.org Cc: Tejun Heo t...@kernel.org Cc: Imre Deak imre.d

[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_next_page() from

[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 akinobu.m...@gmail.com Cc: Tejun Heo t...@kernel.org Cc: Imre Deak imre.d...@intel.com Cc: Herbert Xu herb

[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 akinobu.m...@gmail.com Cc: Tejun Heo t...@kernel.org Cc: Imre Deak imre.d

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

2013-06-09 Thread Akinobu Mita
-by: Akinobu Mita m...@fixstars.com Cc: Vinayak Holikatti vinholika...@gmail.com Cc: Santosh Y santos...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: linux-scsi@vger.kernel.org --- drivers/scsi/ufs/ufshcd-pci.c | 26 -- drivers/scsi/ufs/ufshcd.c | 25

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 imre.d...@intel.com: 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:

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 t...@kernel.org: 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; + unsigned long pgoffset

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 martin.peter...@oracle.com: Akinobu == Akinobu Mita akinobu.m...@gmail.com 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 unmapping the ppage

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

2013-06-06 Thread Akinobu Mita
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 akinobu.m...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: linux-scsi@vger.kernel.org --- drivers/scsi

[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

[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 akinobu.m...@gmail.com Cc: Tejun Heo t...@kernel.org Cc: Imre Deak imre.d

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 martin.peter...@oracle.com: 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

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

2013-06-01 Thread Akinobu Mita
be REG_UIC_ERROR_CODE_DATA_LINK_LAYER. Signed-off-by: Akinobu Mita m...@fixstars.com Cc: Vinayak Holikatti vinholika...@gmail.com Cc: Santosh Y santos...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: linux-scsi@vger.kernel.org --- drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1

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

2013-05-26 Thread Akinobu Mita
separate patches. - Add new cleanup patch reduce duplication between prot_verify_read and prot_verify_write. Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: Martin K. Petersen martin.peter...@oracle.com Cc: linux-scsi@vger.kernel.org Akinobu Mita (6

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

2013-05-26 Thread Akinobu Mita
and offsetting it by the loop counter on demand. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: Martin K. Petersen martin.peter...@oracle.com Cc: linux-scsi@vger.kernel.org --- * Change from v2

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

2013-05-26 Thread Akinobu Mita
nested. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: Martin K. Petersen martin.peter...@oracle.com Cc: linux-scsi@vger.kernel.org Acked-by: Douglas Gilbert dgilb...@interlog.com --- * No changes from

[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 akinobu.m...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: Martin K. Petersen martin.peter...@oracle.com Cc: linux

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

2013-05-26 Thread Akinobu Mita
pattern. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: Martin K. Petersen martin.peter...@oracle.com Cc: linux-scsi@vger.kernel.org --- * New patch from v3 drivers/scsi/scsi_debug.c | 5 + 1

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

2013-05-26 Thread Akinobu Mita
of struct sd_dif_tuple. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: Martin K. Petersen martin.peter...@oracle.com Cc: linux-scsi@vger.kernel.org Acked-by: Douglas Gilbert dgilb...@interlog.com

[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 akinobu.m...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: Martin K

[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 m...@fixstars.com Cc: Vinayak Holikatti vinholika...@gmail.com Cc: Santosh Y santos...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: linux-scsi

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

2013-05-19 Thread Akinobu Mita
-scsi@vger.kernel.org Akinobu Mita (5): scsi_debug: fix invalid address passed to kunmap_atomic() scsi_debug: fix incorrectly nested kmap_atomic() scsi_debug: fix NULL pointer dereference with parameters dif=0 dix=1 scsi_debug: simplify offset calculation for dif_storep scsi_debug: reduce

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

2013-05-19 Thread Akinobu Mita
-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: Martin K. Petersen martin.peter...@oracle.com Cc: linux-scsi@vger.kernel.org Acked-by: Douglas Gilbert dgilb...@interlog.com --- * New patch from v2 - Splitted

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

2013-05-19 Thread Akinobu Mita
nested. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: Martin K. Petersen martin.peter...@oracle.com Cc: linux-scsi@vger.kernel.org Acked-by: Douglas Gilbert dgilb...@interlog.com --- * New patch from v2

[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 akinobu.m...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: Martin K. Petersen martin.peter...@oracle.com Cc: linux

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

2013-05-19 Thread Akinobu Mita
of struct sd_dif_tuple. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: Martin K. Petersen martin.peter...@oracle.com Cc: linux-scsi@vger.kernel.org Acked-by: Douglas Gilbert dgilb...@interlog.com

[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 akinobu.m...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: Martin K

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

2013-04-27 Thread Akinobu Mita
2013/4/25 Martin K. Petersen martin.peter...@oracle.com: Akinobu == Akinobu Mita akinobu.m...@gmail.com writes: Akinobu The protection info dif_storep is allocated only when parameter Akinobu dif is not zero. But it will be accessed when reading or Akinobu writing to the storage installed

Re: [PATCH 1/3] scsi_debug: fix data integrity support on highmem machine

2013-04-27 Thread Akinobu Mita
2013/4/25 Martin K. Petersen martin.peter...@oracle.com: Akinobu == Akinobu Mita akinobu.m...@gmail.com writes: Akinobu kmap_atomic() is now using stack based implementation and Akinobu doesn't take the KM_type argument anymore. So nesting Akinobu kmap_atomic() calls must be properly stacked

[PATCH 0/3] scsi_debug: fix data integrity support

2013-04-21 Thread Akinobu Mita
martin.peter...@oracle.com Cc: linux-scsi@vger.kernel.org Akinobu Mita (3): scsi_debug: fix data integrity support on highmem machine scsi_debug: fix NULL pointer dereference with parameters dif=0 dix=1 scsi_debug: simplify offset calculation for dif_storep drivers/scsi/scsi_debug.c | 29

[PATCH 1/3] scsi_debug: fix data integrity support on highmem machine

2013-04-21 Thread Akinobu Mita
by 'modprobe scsi_debug dif=1 dix=1' on x86_32 with highmem. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: Martin K. Petersen martin.peter...@oracle.com Cc: linux-scsi@vger.kernel.org --- drivers/scsi

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

2013-04-21 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 akinobu.m...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: Martin K. Petersen martin.peter...@oracle.com Cc: linux

[PATCH 3/3] scsi_debug: simplify offset calculation for dif_storep

2013-04-21 Thread Akinobu Mita
of struct sd_dif_tuple. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: Martin K. Petersen martin.peter...@oracle.com Cc: linux-scsi@vger.kernel.org --- drivers/scsi/scsi_debug.c | 18 +++--- 1

[PATCH 0/6] scsi_debug: fix logical block provisioning support

2013-04-16 Thread Akinobu Mita
jbottom...@parallels.com Cc: linux-scsi@vger.kernel.org Cc: Douglas Gilbert dgilb...@interlog.com Cc: Martin K. Petersen martin.peter...@oracle.com Akinobu Mita (6): scsi_debug: call map_region() and unmap_region() only when needed scsi_debug: prohibit scsi_debug_unmap_granularity

[PATCH 1/6] scsi_debug: call map_region() and unmap_region() only when needed

2013-04-16 Thread Akinobu Mita
provisioning is disabled. But it is only meaningful module parameter when the logical block provisioning is enabled. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: Martin K. Petersen martin.peter

[PATCH 2/6] scsi_debug: prohibit scsi_debug_unmap_granularity == scsi_debug_unmap_alignment

2013-04-16 Thread Akinobu Mita
cannot be unmapped. But the difference is not properly handled in the current code. So this prohibits such unusual setting. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: Martin K. Petersen

[PATCH 3/6] scsi_debug: clear correct memory region when LBPRZ is enabled

2013-04-16 Thread Akinobu Mita
. But it only clears one logical block at LBA 'block' per loop iteration. And furthermore, the 'block' is not pointing to a logical block address which should be cleared, it is a index of probisioning map (map_storep). Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: James E.J. Bottomley

[PATCH 4/6] scsi_debug: add translation functions between LBA and index of provisioning map

2013-04-16 Thread Akinobu Mita
of provisioning map: static unsigned long lba_to_map_index(sector_t lba); static sector_t map_index_to_lba(unsigned long index); Actual bug fixes with using these functions will be done by forthcoming patches. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: James E.J. Bottomley

[PATCH 5/6] scsi_debug: fix initialization of provisioning map

2013-04-16 Thread Akinobu Mita
is not a multiple of BITS_PER_LONG. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: Martin K. Petersen martin.peter...@oracle.com Cc: linux-scsi@vger.kernel.org --- drivers/scsi/scsi_debug.c | 9

[PATCH 6/6] scsi_debug: fix logical block provisioning support

2013-04-16 Thread Akinobu Mita
LBA status shows that LBA 0 is still mapped. This problem is due to the wrong translation between LBA and index of provisioning map. Fix it by using correct translation functions added previously. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com

[PATCH -v3 15/23] scsi: rename random32() to prandom_u32()

2013-03-04 Thread Akinobu Mita
Use more preferable function name which implies using a pseudo-random number generator. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Robert Love robert.w.l...@intel.com Cc: de...@open-fcoe.org Cc: James Smart james.sm...@emulex.com Cc

[PATCH] scsi: fix typo s/scsi_dispatch_cmnd/scsi_dispatch_cmd/

2013-02-16 Thread Akinobu Mita
Logging message contains a mistake in its own function name. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: linux-scsi@vger.kernel.org --- drivers/scsi/scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH 1/5] pmcraid: fix a typo in error message

2013-02-16 Thread Akinobu Mita
Remove duplicate with in error message. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Anil Ravindranath anil_ravindran...@pmc-sierra.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: linux-scsi@vger.kernel.org --- drivers/scsi/pmcraid.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 2/5] pmcraid: fix pmcraid_netlink_init() error path in module_init

2013-02-16 Thread Akinobu Mita
pmcraid_netlink_init() error path in module_init doesn't destroy a struct class that was created just before. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Anil Ravindranath anil_ravindran...@pmc-sierra.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: linux-scsi@vger.kernel.org

[PATCH 3/5] pmcraid: make pmcraid_minor static

2013-02-16 Thread Akinobu Mita
The bitmap pmcraid_minor is only used in this file. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Anil Ravindranath anil_ravindran...@pmc-sierra.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: linux-scsi@vger.kernel.org --- drivers/scsi/pmcraid.c | 2 +- 1 file changed, 1

[PATCH 4/5] pmcraid: check for exceeding the max adapters limit

2013-02-16 Thread Akinobu Mita
Add proper check for running out of bitmap slot and disallow exceeding the max adapters limit. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Anil Ravindranath anil_ravindran...@pmc-sierra.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: linux-scsi@vger.kernel.org --- drivers

[PATCH 5/5] pmcraid: check error from device_create()

2013-02-16 Thread Akinobu Mita
Fix an unchecked error from device_create() and convert to use standard goto based unwinding for error cleanup. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Anil Ravindranath anil_ravindran...@pmc-sierra.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: linux-scsi

[PATCH -v2 16/26] scsi: rename random32() to prandom_u32()

2013-01-03 Thread Akinobu Mita
Use more preferable function name which implies using a pseudo-random number generator. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Robert Love robert.w.l...@intel.com Cc: de...@open-fcoe.org Cc: James Smart james.sm...@emulex.com Cc

[PATCH 16/29] scsi: rename random32() to prandom_u32()

2012-12-23 Thread Akinobu Mita
Use more preferable function name which implies using a pseudo-random number generator. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Robert Love robert.w.l...@intel.com Cc: de...@open-fcoe.org Cc: James Smart james.sm...@emulex.com Cc

[PATCH] sr: fix error handling in module_init

2007-06-25 Thread Akinobu Mita
Sweep registered blkdev when scsi_register_driver has failed. Cc: Jens Axboe [EMAIL PROTECTED] Signed-off-by: Akinobu Mita [EMAIL PROTECTED] Index: 2.6-rc/drivers/scsi/sr.c === --- 2.6-rc.orig/drivers/scsi/sr.c +++ 2.6-rc/drivers

[PATCH] fix possible race with scsi command pool

2005-01-22 Thread Akinobu Mita
Hello! There is a place where the reference count of scsi_host_cmd_pool is incremented without acquiring host_cmd_pool_mutex. Signed-off-by: Akinobu Mita [EMAIL PROTECTED] --- 2.6-mm/drivers/scsi/scsi.c.orig 2005-01-20 22:40:20.0 +0900 +++ 2.6-mm/drivers/scsi/scsi.c 2005-01-20 22

<    1   2   3