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

2015-01-26 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

Re: [PATCH v4 00/11] scsi: fix module reference mismatch for scsi host

2015-01-22 Thread Akinobu Mita
2015-01-21 0:20 GMT+09:00 Alan Stern st...@rowland.harvard.edu: On Tue, 20 Jan 2015, Akinobu Mita wrote: 2015-01-19 23:22 GMT+09:00 Tejun Heo t...@kernel.org: On Mon, Jan 19, 2015 at 12:05:58AM +0900, Akinobu Mita wrote: While accessing a scsi_device, the use count of the underlying LLDD

Re: [PATCH v4 00/11] scsi: fix module reference mismatch for scsi host

2015-01-20 Thread Akinobu Mita
2015-01-19 23:22 GMT+09:00 Tejun Heo t...@kernel.org: On Mon, Jan 19, 2015 at 12:05:58AM +0900, Akinobu Mita wrote: While accessing a scsi_device, the use count of the underlying LLDD module is incremented. The module reference is retrieved through .module field of struct scsi_host_template

[PATCH v4 04/11] libfc: prepare to move module reference from scsi_host_template to Scsi_Host

2015-01-18 Thread Akinobu Mita
to macro and it takes module reference explicitly. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Robert Love robert.w.l...@intel.com Cc: Christoph Hellwig h...@lst.de Cc: James E.J. Bottomley jbottom...@parallels.com Cc: fcoe-de...@open-fcoe.org Cc: linux-scsi@vger.kernel.org --- drivers

[PATCH v4 08/11] scsi: ufs: adjust module reference for scsi host

2015-01-18 Thread Akinobu Mita
scsi_host_alloc(). So the glue drivers can be unloaded even if the scsi device is being accessed. This fixes it by converting ufshcd_alloc_host() into macro so that the glue drivers can pass their correct module reference through __scsi_host_alloc(). Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc

[PATCH v4 07/11] scsi: move module reference from scsi_host_template to Scsi_Host

2015-01-18 Thread Akinobu Mita
defined in esp_scsi module, so these had module reference mismatch problem, but this change implicitly fixes it. Because sub drivers directly call scsi_host_alloc() and THIS_MODULE is used for the module reference instead of scsi_host_template-module. Signed-off-by: Akinobu Mita akinobu.m

[PATCH v4 06/11] scsi: legacy: prepare to move module reference from scsi_host_template to Scsi_Host

2015-01-18 Thread Akinobu Mita
In preparation for moving owner module reference field from struct scsi_host_template to struct Scsi_Host, this converts scsi_register() into macro so that legacy LLDDs can pass THIS_MODULE to scsi_host_alloc() through it instead of scsi_host_template-module. Signed-off-by: Akinobu Mita akinobu.m

[PATCH v4 01/11] ata: prepare to move module reference from scsi_host_template to Scsi_Host

2015-01-18 Thread Akinobu Mita
() ata_host_alloc_pinfo() ata_pci_sff_prepare_host() ata_pci_sff_init_one() ata_pci_bmdma_prepare_host() ata_pci_bmdma_init_one() 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. Bottomley jbottom

[PATCH v4 02/11] iscsi: prepare to move module reference from scsi_host_template to Scsi_Host

2015-01-18 Thread Akinobu Mita
In preparation for moving owner module reference field from struct scsi_host_template to struct Scsi_Host, this converts iscsi_host_alloc() into macro so that LLDDs can pass THIS_MODULE to scsi_host_alloc() through it instead of scsi_host_template-module. Signed-off-by: Akinobu Mita akinobu.m

[PATCH v4 11/11] ata: pata_of_platform: adjust module reference for scsi host

2015-01-18 Thread Akinobu Mita
be unloaded even if the scsi device is being accessed. This fixes it by converting into __pata_platform_probe() macro so that these drivers can pass their correct module reference through __ata_host_alloc(). Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Tejun Heo t...@kernel.org Cc: Christoph

[PATCH v4 03/11] cxgbi: prepare to move module reference from scsi_host_template to Scsi_Host

2015-01-18 Thread Akinobu Mita
In preparation for moving owner module reference field from struct scsi_host_template to struct Scsi_Host, this converts cxgbi_hbas_add() into macro so that LLDDs can pass THIS_MODULE to __iscsi_host_alloc() through it instead of scsi_host_template-module. Signed-off-by: Akinobu Mita akinobu.m

[PATCH v4 05/11] 53c700: prepare move module reference from scsi_host_template to Scsi_Host

2015-01-18 Thread Akinobu Mita
In preparation for moving owner module reference field from struct scsi_host_template to struct Scsi_Host, this converts NCR_700_detect() into macro so that LLDDs can pass THIS_MODULE to scsi_host_alloc() through it instead of scsi_host_template-module. Signed-off-by: Akinobu Mita akinobu.m

[PATCH v4 09/11] usb: storage: adjust module reference for scsi host

2015-01-18 Thread Akinobu Mita
these drivers can be unloaded even if the scsi device is being accessed. This fixes it by converting usb_stor_probe1() into macro so that these drivers can pass their correct module reference through __scsi_host_alloc(). Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Matthew Dharm mdharm-...@one

[PATCH v4 10/11] ata: ahci_platform: adjust module reference for scsi host

2015-01-18 Thread Akinobu Mita
can be unloaded even if the scsi device is being accessed. This fixes it by converting into ahci_platform_init_host() macro so that these drivers can pass their correct module reference through __ata_host_alloc_pinfo(). Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Hans de Goede hdego

[PATCH v4 00/11] scsi: fix module reference mismatch for scsi host

2015-01-18 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 (11): ata: prepare to move module reference from

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

2015-01-13 Thread Akinobu Mita
2015-01-12 18:36 GMT+09:00 Christoph Hellwig h...@lst.de: On Sun, Jan 11, 2015 at 10:50:02PM +0900, Akinobu Mita wrote: While accessing a scsi_device, the use count of the underlying LLDD module is incremented. The module reference is retrieved through .module field of struct

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

2015-01-11 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 Cc: Vinayak Holikatti vinholika...@gmail.com Cc: Dolev Raviv dra...@codeaurora.org Cc: Sujit Reddy Thumma sthu...@codeaurora.org Cc: Subhash

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

2015-01-11 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 Cc: David S. Miller da...@davemloft.net Cc: Hannes Reinecke h

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

2015-01-11 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 v3 2/4] scsi: ufs: adjust module reference for scsi host

2015-01-11 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

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

2015-01-11 Thread Akinobu Mita
by LLDDs and then fixes actual LLDDs by adjusting module reference after scsi host allocation. * 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

Re: [PATCH v2 0/3] scsi: ufs ums-*: fix module reference counting

2015-01-08 Thread Akinobu Mita
2015-01-08 0:09 GMT+09:00 Alan Stern st...@rowland.harvard.edu: On Wed, 7 Jan 2015, Christoph Hellwig wrote: On Wed, Jan 07, 2015 at 11:02:59PM +0900, Akinobu Mita wrote: While accessing a scsi_device, the use count of the underlying LLDD module is incremented. The module reference

[PATCH v2 0/3] scsi: ufs ums-*: fix module reference counting

2015-01-07 Thread Akinobu Mita
and then fixes ufs and unusual usb storage drivers by adjusting module reference after scsi host allocation. * v2: - Pass correct module reference to usb_stor_probe1() instead of touching all ums-* drivers, suggested by Alan Stern Akinobu Mita (3): scsi: add ability to adjust module reference

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

2015-01-07 Thread Akinobu Mita
module reference to usb_stor_probe1() to adjust it after scsi host allocation. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Matthew Dharm mdharm-...@one-eyed-alien.net Cc: Greg Kroah-Hartman gre...@linuxfoundation.org Cc: Alan Stern st...@rowland.harvard.edu Cc: Christoph Hellwig h...@lst.de

[PATCH v2 2/3] scsi: ufs: adjust module reference for scsi host

2015-01-07 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

[PATCH v2 1/3] scsi: add ability to adjust module reference for scsi host

2015-01-07 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 Cc: Vinayak Holikatti vinholika...@gmail.com Cc: Dolev Raviv dra...@codeaurora.org Cc: Sujit Reddy Thumma sthu...@codeaurora.org Cc: Subhash Jadavani

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

2015-01-05 Thread Akinobu Mita
reference after scsi host allocation. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Matthew Dharm mdharm-...@one-eyed-alien.net Cc: Greg Kroah-Hartman gre...@linuxfoundation.org Cc: Christoph Hellwig h...@lst.de Cc: James E.J. Bottomley jbottom...@parallels.com Cc: linux-...@vger.kernel.org

[PATCH 0/3] scsi: ufs ums-*: fix module reference counting

2015-01-05 Thread Akinobu Mita
and then fixes ufs and unusual usb storage drivers by adjusting module reference after scsi host allocation. Akinobu Mita (3): scsi: add ability to adjust module reference for scsi host scsi: ufs: adjust module reference for scsi host usb: storage: adjust module reference for scsi host drivers

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

2015-01-05 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 Cc: Vinayak Holikatti vinholika...@gmail.com Cc: Dolev Raviv dra...@codeaurora.org Cc: Sujit Reddy Thumma sthu...@codeaurora.org Cc: Subhash Jadavani

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

2015-01-05 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 3/3] usb: storage: adjust module reference for scsi host

2015-01-05 Thread Akinobu Mita
2015-01-06 0:27 GMT+09:00 Alan Stern st...@rowland.harvard.edu: On Mon, 5 Jan 2015, Akinobu Mita wrote: While accessing a unusual usb storage (ums-alauda, ums-cypress, ...), the module reference count is not incremented. Because these drivers allocate scsi hosts with usb_stor_host_template

Re: [PATCH -next] scsi: ufs: don't kfree() devm_kzalloc()'ed memory

2014-11-26 Thread Akinobu Mita
2014-11-27 0:51 GMT+09:00 James Bottomley james.bottom...@hansenpartnership.com: On Thu, 2014-11-27 at 00:37 +0900, Akinobu Mita wrote: In ufshcd_parse_clock_info(), temporary memory allocated by devm_kzalloc() is released by kfree(). The devres mechanism cannot track the release

[PATCH] scsi: ufs: ensure clk gating work is finished before module unloading

2014-11-23 Thread Akinobu Mita
it by cancelling clk gating and ungating works and ensure that its execution is finished before module unloading. Signed-off-by: Akinobu Mita m...@fixstars.com Cc: Vinayak Holikatti vinholika...@gmail.com Cc: Dolev Raviv dra...@codeaurora.org Cc: Subhash Jadavani subha...@codeaurora.org Cc: Yaniv

[PATCH 0/2] UFS driver fixes for v3.18

2014-11-18 Thread Akinobu Mita
is a fix which I have already reported and Dolev agreed with that in http://marc.info/?l=linux-scsim=141164131404767 Akinobu Mita (2): scsi: ufs: fix reference counting of W-LUs scsi: ufs: fix NULL dereference when no regulators are defined drivers/scsi/ufs/ufshcd.c | 80

[PATCH 2/2] scsi: ufs: fix NULL dereference when no regulators are defined

2014-11-18 Thread Akinobu Mita
{h,l}pm noop when no regulators are defined. Signed-off-by: Akinobu Mita m...@fixstars.com Cc: Vinayak Holikatti vinholika...@gmail.com Cc: Subhash Jadavani subha...@codeaurora.org Cc: Dolev Raviv dra...@codeaurora.org Cc: Sujit Reddy Thumma sthu...@codeaurora.org Cc: Yaniv Gardi yga

[PATCH 1/2] scsi: ufs: fix reference counting of W-LUs

2014-11-18 Thread Akinobu Mita
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 m...@fixstars.com Cc: Vinayak

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

2014-10-07 Thread Akinobu Mita
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 m...@fixstars.com Cc: Vinayak

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 subha...@codeaurora.org: 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

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

2014-10-05 Thread Akinobu Mita
-by: Akinobu Mita m...@fixstars.com Cc: Vinayak Holikatti vinholika...@gmail.com Cc: Santosh Y santos...@gmail.com Cc: Dolev Raviv dra...@codeaurora.org Cc: Subhash Jadavani subha...@codeaurora.org Cc: Yaniv Gardi yga...@codeaurora.org Cc: Christoph Hellwig h...@lst.de Cc: James E.J. Bottomley jbottom

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 h...@infradead.org: 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, so

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 dra...@codeaurora.org: +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); +

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 dra...@codeaurora.org: +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

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 dra...@codeaurora.org: +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;

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 dra...@codeaurora.org: +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; +

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 dra...@codeaurora.org: 2014-09-10 20:54 GMT+09:00 Dolev Raviv dra...@codeaurora.org: +static void ufshcd_set_queue_depth(struct scsi_device *sdev) +{ + int ret = 0; + u8 lun_qdepth; + struct ufs_hba *hba; + + hba =

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 dra...@codeaurora.org: +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 =

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 dra...@codeaurora.org: +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

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 dra...@codeaurora.org: +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

[PATCH v2] ufs: fix DMA mask setting

2014-07-13 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

[PATCH resend] ufs: fix DMA mask setting

2014-07-12 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

[PATCH v3] ufs: adjust queue settings to PRDT limitations

2014-07-01 Thread Akinobu Mita
limitations. Signed-off-by: Akinobu Mita m...@fixstars.com Reviewed-by: Subhash Jadavani subha...@codeaurora.org Tested-by: Dolev Raviv dra...@codeaurora.org Acked-by: Vinayak Holikatti vinholika...@gmail.com Cc: Subhash Jadavani subha...@codeaurora.org Cc: Dolev Raviv dra...@codeaurora.org Cc: Vinayak

Re: [PATCH v2] ufs: adjust queue settings to PRDT limitations

2014-07-01 Thread Akinobu Mita
2014-07-01 17:53 GMT+09:00 Dolev Raviv dra...@codeaurora.org: Hi, I couldn't find this patch in scsi-misc branch. Was it merged somewhere else? No. I have just resend it with Tested-by and Acked-by lines. Thanks for reminding me. -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH] sd: Limit transfer length

2014-06-03 Thread Akinobu Mita
2014-06-03 4:11 GMT+09:00 Martin K. Petersen martin.peter...@oracle.com: @@ -2755,6 +2765,10 @@ static int sd_revalidate_disk(struct gendisk *disk) blk_queue_flush(sdkp-disk-queue, flush); + max_xfer = min_not_zero((unsigned int)sdp-host-max_sectors, +

[PATCH v2 1/6] block: fix BLKSECTGET ioctl when max_sectors is greater than USHRT_MAX

2014-06-02 Thread Akinobu Mita
-by: Akinobu Mita akinobu.m...@gmail.com Reviewed-by: Christoph Hellwig h...@lst.de Cc: Christoph Hellwig h...@lst.de Cc: Jens Axboe ax...@kernel.dk Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: linux-scsi@vger.kernel.org --- No change from previous

[PATCH v2 0/6] scsi: increase upper limit for max_sectors

2014-06-02 Thread Akinobu Mita
max_sectors. * Changes in v2 - Add Reviewed-by line - Split the scsi core change into three patches, suggested by Christoph Hellwig - Reorder conditional in command selection, suggested by Elliott, Robert Akinobu Mita (6): block: fix BLKSECTGET ioctl when max_sectors is greater than USHRT_MAX

[PATCH v2 2/6] block: fix SG_[GS]ET_RESERVED_SIZE ioctl when max_sectors is huge

2014-06-02 Thread Akinobu Mita
-by: Akinobu Mita akinobu.m...@gmail.com Reviewed-by: Christoph Hellwig h...@lst.de Cc: Christoph Hellwig h...@lst.de Cc: Jens Axboe ax...@kernel.dk Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: linux-scsi@vger.kernel.org --- No change from previous

[PATCH v2 5/6] scsi: increase upper limit for max_sectors

2014-06-02 Thread Akinobu Mita
the SCSI mid level's limitation for max_sectors upto the block layer's limitation for max_hw_sectors by extending the data type of max_sectors in struct Scsi_Host and scsi_host_template, so that SCSI lower level drivers can specify more than 0x. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com

[PATCH v2 3/6] sg: prevent integer overflow when converting from sectors to bytes

2014-06-02 Thread Akinobu Mita
low-level drivers can not specify max_sectors greater than 0x due to the data type limitation. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Christoph Hellwig h...@lst.de Cc: Jens Axboe ax...@kernel.dk Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb

[PATCH v2 4/6] sd: use READ_16 or WRITE_16 when transfer length is greater than 0xffff

2014-06-02 Thread Akinobu Mita
for now, because SCSI low-level drivers can not specify max_sectors greater than 0x due to the data type limitation. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Elliott, Robert elli...@hp.com Cc: Christoph Hellwig h...@lst.de Cc: Jens Axboe ax...@kernel.dk Cc: James E.J. Bottomley

Re: [PATCH 3/4] scsi: increase upper limit for max_sectors

2014-05-29 Thread Akinobu Mita
2014-05-29 1:18 GMT+09:00 Elliott, Robert (Server Storage) elli...@hp.com: -Original Message- From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi- ow...@vger.kernel.org] On Behalf Of Akinobu Mita Sent: Sunday, 25 May, 2014 7:44 AM To: linux-scsi@vger.kernel.org Cc: Akinobu

Re: [PATCH 3/4] scsi: increase upper limit for max_sectors

2014-05-28 Thread Akinobu Mita
Hi Christoph, Thanks for your review. 2014-05-28 19:39 GMT+09:00 Christoph Hellwig h...@infradead.org: Looks good, but I think this should be three patches, one for the ioctl in sg, one for the command selection in sd, and one to change the field with in the scsi core. OK, I'll break this

[PATCH 0/4] scsi: increase upper limit for max_sectors

2014-05-25 Thread Akinobu Mita
max_sectors in the block layer. Akinobu Mita (4): block: fix BLKSECTGET ioctl when max_sectors is greater than USHRT_MAX block: fix SG_[GS]ET_RESERVED_SIZE ioctl when max_sectors is huge scsi: increase upper limit for max_sectors scsi_debug: allow huge transfer length for read/write commands

[PATCH 1/4] block: fix BLKSECTGET ioctl when max_sectors is greater than USHRT_MAX

2014-05-25 Thread Akinobu Mita
-by: Akinobu Mita akinobu.m...@gmail.com Cc: Jens Axboe ax...@kernel.dk Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: linux-scsi@vger.kernel.org --- block/compat_ioctl.c | 6 -- block/ioctl.c| 5 - 2 files changed, 8 insertions(+), 3

[PATCH 3/4] scsi: increase upper limit for max_sectors

2014-05-25 Thread Akinobu Mita
to handle the requests whose transfer length is more than 0x with READ_16 or WRITE_16. Also, this needs to prevent SG_GET_RESERVED_SIZE and SG_SET_RESERVED_SIZE ioctls for the scsi generic (sg) driver from integer overflow when converting max_sectors to bytes. Signed-off-by: Akinobu Mita akinobu.m

[PATCH 4/4] scsi_debug: allow huge transfer length for read/write commands

2014-05-25 Thread Akinobu Mita
. Also, this increases sg_tablesize and max_segment_size, otherwise the maximum transfer length is limited to 64MB. (sg_tablesize * max_segment_size = 256 * 256KB) Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Jens Axboe ax...@kernel.dk Cc: James E.J. Bottomley jbottom...@parallels.com Cc

[PATCH 2/4] block: fix SG_[GS]ET_RESERVED_SIZE ioctl when max_sectors is huge

2014-05-25 Thread Akinobu Mita
-by: Akinobu Mita akinobu.m...@gmail.com Cc: Jens Axboe ax...@kernel.dk Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: linux-scsi@vger.kernel.org --- block/scsi_ioctl.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git

[PATCH v3 1/7] scsi_debug: fix false positive logical block reference tag check fail

2014-02-26 Thread Akinobu Mita
Reading partially unwritten sectors generates a false positive logical block reference tag check failure when DIF is enabled. This bug is caused by missing ei_lba increment in loop of dif_verify() when unwritten sector is skipped. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Acked

[PATCH v3 0/7] scsi_debug: several bug fixes and enable clustering support

2014-02-26 Thread Akinobu Mita
-by lines Akinobu Mita (7): scsi_debug: fix false positive logical block reference tag check fail scsi_debug: make pseudo_primary static scsi_debug: fix duplicate dif_errors increment scsi_debug: fix resp_xdwriteread() return value when running out of memory scsi_debug: prepare to enable

[PATCH v3 4/7] scsi_debug: fix resp_xdwriteread() return value when running out of memory

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

[PATCH v3 6/7] scsi_debug: protect device access with atomic_rw lock

2014-02-26 Thread Akinobu Mita
This change ensures that concurrent device access including ramdisk storage, protection info, and provisioning map by read, write, and unmap commands are protected with atomic_rw spinlock. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Reviewed-by: Douglas Gilbert dgilb...@interlog.com

[PATCH v3 5/7] scsi_debug: prepare to enable clustering

2014-02-26 Thread Akinobu Mita
. This replaces these for_each_sg() loops with sg mapping iterator which is capable of handling each sg list element is consisted with multiple pages. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Reviewed-by: Douglas Gilbert dgilb...@interlog.com Reviewed-by: Martin K. Petersen martin.peter

[PATCH v3 7/7] scsi_debug: add ability to enable clustering

2014-02-26 Thread Akinobu Mita
that transfer length. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Reviewed-by: Douglas Gilbert dgilb...@interlog.com Reviewed-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 v3 3/7] scsi_debug: fix duplicate dif_errors increment

2014-02-26 Thread Akinobu Mita
It is unnecessary to increase dif_errors in dif_verify(), because the caller will increment it when dif_verify() detects failure. This bug was introduced by commit beb40ea42bd6 ([SCSI] scsi_debug: reduce duplication between prot_verify_read and prot_verify_write) Signed-off-by: Akinobu Mita

[PATCH v3 2/7] scsi_debug: make pseudo_primary static

2014-02-26 Thread Akinobu Mita
As pseudo_primary is only used in scsi_debug.c, it should be static. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Reviewed-by: Douglas Gilbert dgilb...@interlog.com Reviewed-by: Martin K. Petersen martin.peter...@oracle.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas

loading scsi_debug with data integrity hits BUG_ON

2014-02-19 Thread Akinobu Mita
After commit 5837c80e870b (bio-integrity: Fix bio_integrity_verify segment start bug), loading scsi_debug with data integrity enabled (for example modprobe scsi_debug dif=1 dix=1) starts hitting BUG_ON() at bio_integrity_verify(): BUG_ON(total bio-bi_integrity-bip_iter.bi_size); Because

[PATCH v2 2/7] scsi_debug: make pseudo_primary static

2014-01-19 Thread Akinobu Mita
As pseudo_primary is only used in scsi_debug.c, it should be static. 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 --- No change from previous version drivers/scsi

[PATCH v2 3/7] scsi_debug: fix duplicate dif_errors increment

2014-01-19 Thread Akinobu Mita
It is unnecessary to increase dif_errors in dif_verify(), because the caller will increment it when dif_verify() detects failure. This bug was introduced by commit beb40ea42bd6 ([SCSI] scsi_debug: reduce duplication between prot_verify_read and prot_verify_write) Signed-off-by: Akinobu Mita

[PATCH v2 7/7] scsi_debug: add ability to enable clustering

2014-01-19 Thread Akinobu Mita
that transfer length. 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 previous version: - make clustering module

[PATCH v2 6/7] scsi_debug: protect device access with atomic_rw lock

2014-01-19 Thread Akinobu Mita
This change ensures that concurrent device access including ramdisk storage, protection info, and provisioning map by read, write, and unmap commands are protected with atomic_rw spinlock. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc

[PATCH v2 4/7] scsi_debug: fix resp_xdwriteread() return value when running out of memory

2014-01-19 Thread Akinobu Mita
of memory. 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 --- No change from previous version drivers/scsi/scsi_debug.c | 8 ++-- 1 file changed, 6 insertions(+), 2

[PATCH v2 0/7] scsi_debug: several bug fixes and enable clustering support

2014-01-19 Thread Akinobu Mita
is limited upto 8MB when page size is 4KB and sg_tablesize is 2048 (= SCSI_MAX_SG_CHAIN_SEGMENTS). Changes from v1: - remove unnecessary irqsave/irqrestore while iterating sg mapping - protect device access with atomic_rw lock - make clustering module parameter writable Akinobu Mita (7): scsi_debug: fix

[PATCH v2 1/7] scsi_debug: fix false positive logical block reference tag check fail

2014-01-19 Thread Akinobu Mita
Reading partially unwritten sectors generates a false positive logical block reference tag check failure when DIF is enabled. This bug is caused by missing ei_lba increment in loop of dif_verify() when unwritten sector is skipped. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Acked

[PATCH v2 5/7] scsi_debug: prepare to enable clustering

2014-01-19 Thread Akinobu Mita
. This replaces these for_each_sg() loops with sg mapping iterator which is capable of handling each sg list element is consisted with multiple pages. 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 5/6] scsi_debug: prepare to enable clustering

2014-01-11 Thread Akinobu Mita
2014/1/11 Martin K. Petersen martin.peter...@oracle.com: Akinobu == Akinobu Mita akinobu.m...@gmail.com writes: Akinobu This replaces these for_each_sg() loops with sg mapping Akinobu iterator which is capable of handling each sg list element is Akinobu consisted with multiple pages. Looks

Re: [PATCH 6/6] scsi_debug: add ability to enable clustering

2014-01-06 Thread Akinobu Mita
2014/1/6 Douglas Gilbert dgilb...@interlog.com: @@ -2787,6 +2788,7 @@ module_param_named(opts, scsi_debug_opts, int, S_IRUGO | S_IWUSR); module_param_named(physblk_exp, scsi_debug_physblk_exp, int, S_IRUGO); module_param_named(ptype, scsi_debug_ptype, int, S_IRUGO | S_IWUSR);

[PATCH 5/6] scsi_debug: prepare to enable clustering

2014-01-05 Thread Akinobu Mita
. This replaces these for_each_sg() loops with sg mapping iterator which is capable of handling each sg list element is consisted with multiple pages. 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 0/6] scsi_debug: a few bug fixes and enable clustering support

2014-01-05 Thread Akinobu Mita
length for read and write scsi commands is limited upto 8MB when page size is 4KB and sg_tablesize is 2048 (= SCSI_MAX_SG_CHAIN_SEGMENTS). Akinobu Mita (6): scsi_debug: fix false positive logical block reference tag check fail scsi_debug: make pseudo_primary static scsi_debug: fix duplicate

[PATCH 6/6] scsi_debug: add ability to enable clustering

2014-01-05 Thread Akinobu Mita
that transfer length. 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 | 4 1 file changed, 4

[PATCH 1/6] scsi_debug: fix false positive logical block reference tag check fail

2014-01-05 Thread Akinobu Mita
Reading partially unwritten sectors generates a false positive logical block reference tag check failure when DIF is enabled. This bug is caused by missing ei_lba increment in loop of dif_verify() when unwritten sector is skipped. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Douglas

[PATCH 4/6] scsi_debug: fix resp_xdwriteread() return value when running out of memory

2014-01-05 Thread Akinobu Mita
of memory. 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/scsi_debug.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH 2/6] scsi_debug: make pseudo_primary static

2014-01-05 Thread Akinobu Mita
As pseudo_primary is only used in scsi_debug.c, it should be static. 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/scsi_debug.c | 2 +- 1 file changed

[PATCH 3/6] scsi_debug: fix duplicate dif_errors increment

2014-01-05 Thread Akinobu Mita
It is unnecessary to increase dif_errors in dif_verify(), because the caller will increment it when dif_verify() detects failure. This bug was introduced by commit beb40ea42bd6 ([SCSI] scsi_debug: reduce duplication between prot_verify_read and prot_verify_write) Signed-off-by: Akinobu Mita

[PATCH] scsi_debug: make pseudo_primary static

2013-12-09 Thread Akinobu Mita
It is not necessary to declare pseudo_primary as global, becuase it is only used in scsi_debug.c. 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] scsi_debug: simplify creation and destruction of driver attribute files

2013-10-14 Thread Akinobu Mita
sparse warning caused by driver_attributes which are unnecessarily declared as global. 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

[PATCH v2] ufs: adjust queue settings to PRDT limitations

2013-09-25 Thread Akinobu Mita
limitations. Signed-off-by: Akinobu Mita m...@fixstars.com Cc: Subhash Jadavani subha...@codeaurora.org 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 --- * Change from v1 - Add comments

[PATCH] ufs: adjust queue settings to PRDT limitations

2013-09-21 Thread Akinobu Mita
limitations. 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 | 15 +++ drivers/scsi/ufs/ufshci.h | 3

Re: [PATCH] scsi: fix the build warning

2013-09-20 Thread Akinobu Mita
2013/9/20 Paul Bolle pebo...@tiscali.nl: On Thu, 2013-08-22 at 23:49 +0900, Akinobu Mita wrote: 2013/8/22 James Bottomley jbottom...@parallels.com: On Thu, 2013-08-22 at 21:42 +0900, Akinobu Mita wrote: Unfortunately, this warning isn't fixed in linux-next, either. Paul Bolle also sent

[PATCH 0/5] scsi_debug: several fixes related to data integrity support

2013-09-18 Thread Akinobu Mita
This patch set includes bug fixes and a warning fix which are related to the data integrity support for scsi_debug. Akinobu Mita (5): scsi_debug: fix buffer overrun when DIF/DIX is enabled and virtual_gb 0 scsi_debug: factor out copying PI from dif_storep to prot_sglist scsi_debug

[PATCH 1/5] scsi_debug: fix buffer overrun when DIF/DIX is enabled and virtual_gb 0

2013-09-18 Thread Akinobu Mita
. This fixes these buffer overruns. In order to simplify the fix, this also introduces fake_store() and dif_store() which return corresponding wrap around addresses. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb

[PATCH 5/5] scsi_debug: fix sparse warnings related to data integrity field

2013-09-18 Thread Akinobu Mita
Each member in data integrity field tuple is big-endian. But the endianness of the values being compared with these members are not annotated. So this fixes these sparse warnings. Reported-by: kbuild test robot fengguang...@intel.com Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc

<    1   2   3   >