Re: [PATCHv2 3/5] scsi: Move user-shareable stuff in scsi/scsi.h to uapi/linux/scsi.h

2015-02-02 Thread Christoph Hellwig
On Thu, Jan 29, 2015 at 05:24:13PM -0800, James Bottomley wrote: > I think this is too much: lots of things in scsi.h have no meaning to > the user: our internal definition of scsi_lun for instance, internal > return codes, mid level queue instructions, our internal markers for > SCSI levels ... >

Re: [PATCH 0/8] vhost/scsi: Add ANY_LAYOUT support

2015-02-02 Thread Christoph Hellwig
Hi Nic, Al has been rewriting the vhost code to use iov_iter primitives, can you please rebase it on top of that istead of using the obsolete infrastructure? -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordo

Re: block layer copying user io vectors

2015-02-02 Thread Christoph Hellwig
On Fri, Jan 30, 2015 at 05:43:04PM +, Andy Falanga (afalanga) wrote: > > > This function does something that seems rather strange. On line 859, > > > a for loop determines the number of pages needed for the copying of > > > the user data to kernel space. Then the memory is allocated (line > >

[PATCH v1] ahci_xgene: Fix the dma state machine lockup for the ATA_CMD_SMART PIO mode command.

2015-02-02 Thread Suman Tripathi
This patch addresses the issue with ATA_CMD_SMART pio mode command for enumeration and device detection with ATA devices. The X-Gene AHCI controller has an errata in which it cannot clear the BSY bit after the PIO setup FIS. The dma state machine enters CMFatalErrorUpdate state and locks up. It is

[PATCH v1] Fix the dma state machine lockup for the ATA_CMD_SMART PIO mode command.

2015-02-02 Thread Suman Tripathi
v1 changes: * Update the commit id as per Tejun's comments. * Add a bit explanation. Signed-off-by: Suman Tripathi --- Suman Tripathi (1): ahci_xgene: Fix the dma state machine lockup for the ATA_CMD_SMART PIO mode command. drivers/ata/ahci_xgene.c | 3 ++- 1 file changed, 2 insertions

Re: [PATCH v1] ahci_xgene: Fix the dma state machine lockup for the ATA_CMD_SMART PIO mode command.

2015-02-02 Thread Sergei Shtylyov
Hello. On 2/2/2015 1:18 PM, Suman Tripathi wrote: This patch addresses the issue with ATA_CMD_SMART pio mode command for enumeration and device detection with ATA devices. The X-Gene AHCI controller has an errata in which it cannot clear the BSY bit after the PIO setup FIS. The dma state machin

Kernel Ooops upon USB disconnect of a Western Digital My Passport 1TB drive

2015-02-02 Thread Athlion
Hello all. On my Thunkpad T420i with 3.18.2 (possibly earlier as well but definitely not 3.17.6), 3.18.3, 3.18.4 and 3.18.5 kernels, I can reproduce the following behaviour 100% of the time: 1. Connect one of my (NTFS-formatted) WD 1TB 'My Passport' drives via USB. 2. Disconnect the cable. 3. Ker

[PATCH v2] ahci_xgene: Fix the dma state machine lockup for the ATA_CMD_SMART PIO mode command.

2015-02-02 Thread Suman Tripathi
This patch addresses the issue with ATA_CMD_SMART pio mode command for enumeration and device detection with ATA devices. The X-Gene AHCI controller has an errata in which it cannot clear the BSY bit after the PIO setup FIS. The dma state machine enters CMFatalErrorUpdate state and locks up. It is

[PATCH v2] Fix the dma state machine lockup for the ATA_CMD_SMART PIO mode command.

2015-02-02 Thread Suman Tripathi
v1 changes: * Update the commit id as per Tejun's comments. * Add a bit explanation. v2 changes: * Update the comments from sergei. Signed-off-by: Suman Tripathi --- Suman Tripathi (1): ahci_xgene: Fix the dma state machine lockup for the ATA_CMD_SMART PIO mode command. drivers/ata/a

Re: [PATCH 1/3] scsi: serialize ->rescan against ->remove

2015-02-02 Thread Christoph Hellwig
On Fri, Jan 30, 2015 at 10:46:17AM +0100, Paolo Bonzini wrote: > Great, we might want to revert that patch in 3.21. Is that fix in any tree yet? Seems like I missed it for the scsi tree at least. So unless you want it for 3.19/stable we might as well ust skip that patch. -- To unsubscribe from t

[PATCH 1/3] scsi: serialize ->rescan against ->remove

2015-02-02 Thread Christoph Hellwig
Lock the device embedded in the scsi_device to protect against concurrent calls to ->remove. Signed-off-by: Christoph Hellwig Acked-by: Alan Stern --- drivers/scsi/scsi_scan.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi

[PATCH 2/3] sd: don't grab a device references from driver methods

2015-02-02 Thread Christoph Hellwig
The device model already takes care of races between ->remove and ->shutdown vs its other methods, and we now take care about locking them out for ->rescan as well. This is a partial revert of commit 39b7f1 ("[SCSI] sd: Fix refcounting"). Signed-off-by: Christoph Hellwig --- drivers/scsi/sd.c |

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

2015-02-02 Thread Christoph Hellwig
This effectively reverts commits 85b6c7 ("[SCSI] sd: fix cache flushing on module removal (and individual device removal)" and dc4515ea ("scsi: always increment reference count"). We now never call scsi_device_get from the shutdown path, and the fact that we started grabbing reference there in com

Re: [PATCH 1/3] scsi: serialize ->rescan against ->remove

2015-02-02 Thread Paolo Bonzini
On 02/02/2015 13:59, Christoph Hellwig wrote: > On Fri, Jan 30, 2015 at 10:46:17AM +0100, Paolo Bonzini wrote: >> > Great, we might want to revert that patch in 3.21. > Is that fix in any tree yet? Seems like I missed it for the scsi > tree at least. So unless you want it for 3.19/stable we mig

sequential I/O on SSD disk varies from 20 to 300 MBytes/s every week

2015-02-02 Thread Siim Vahtre
Hello, I have an extremely odd situation when the I/O speed changes for both SATA and SSD disks every few days or weeks with no apparent reason. The servers have clean base install with nothing but SSH running and the test I am doing is the following: # dd if=/dev/zero of=/dev/sda4 bs=1M co

Re: sequential I/O on SSD disk varies from 20 to 300 MBytes/s every week

2015-02-02 Thread Suman Tripathi
Hi, I have an extremely odd situation when the I/O speed changes for both SATA and SSD disks every few days or weeks with no apparent reason. The servers have clean base install with nothing but SSH running and the test I am doing is the following: # dd if=/dev/zero of=/dev/sda4 bs=1M count=1024

Re: sequential I/O on SSD disk varies from 20 to 300 MBytes/s every week

2015-02-02 Thread Siim Vahtre
Please check whether write cache is enabled in the drive also check whether NCQ is enabled or not. About caches please note quote from my e-mail below. Changing NCQ enabled/disabled had no effect either. 6) It is not a caching issue (controller/disk caches were off during testing, but even p

[PATCH v1] Revert "scsi: ufs-qcom-ice: add Inline Crypto Engine (ICE) support for UFS"

2015-02-02 Thread Yaniv Gardi
This reverts commit 54acb89a8d8682d99ee8594f9ce0dd863a2df80d. Since ICE driver hasn't been uploaded to upstream, ICE support for UFS driver could not be functional at this time. Therefore this change should be reverted. --- drivers/scsi/ufs/Kconfig| 12 - drivers/scsi/ufs/Makefile

Re: [PATCH v7 5/5] scsi: ufs-qcom-ice: add Inline Crypto Engine (ICE) support for UFS

2015-02-02 Thread ygardi
Paul, we have decided to revert the ICE change that support UFS. a change already uploaded: look for subject: [PATCH v1] Revert "scsi: ufs-qcom-ice: add Inline Crypto Engine (ICE) support for UFS" thanks, Yaniv > Yaniv, > > On Thu, 2015-01-15 at 16:32 +0200, Yaniv Gardi wrote: >> From: Yaniv Ga

Re: [PATCH] st: implement sysfs based tape statistics v2

2015-02-02 Thread Laurence Oberman
I pulled this this morning and will be testing. The prior version was stable for me on the upstream and RHEL 6.5 kernel without exhaustive testing. We also just received more requests to get this into RHEL from HP / Red Hat customers. Kai, what are your thoughts. I realize this is a large amount o

Re: [PATCH] phy: qcom-ufs: export symbols needed by main drivers

2015-02-02 Thread James Bottomley
On Wed, 2015-01-28 at 17:18 +0100, Arnd Bergmann wrote: > The qcom ufs phy support is split into three separate loadable > modules, however none of the interfaces are exported, resulting > in a link error: > > ERROR: "ufs_qcom_phy_power_off" [drivers/phy/phy-qcom-ufs-qmp-20nm.ko] > undefined! > E

Re: [PATCH] phy: qcom-ufs: export symbols needed by main drivers

2015-02-02 Thread h...@lst.de
On Mon, Feb 02, 2015 at 03:30:27PM +, James Bottomley wrote: > Cc added for linux-scsi, since this is the origin of the problem. How > important is bisectability in this? It won't affect any non-embedded > user, since most don't build with UFS, so I can go either way on folding > or just appl

Re: [PATCH v2] ahci_xgene: Fix the dma state machine lockup for the ATA_CMD_SMART PIO mode command.

2015-02-02 Thread Sergei Shtylyov
Hello. On 02/02/2015 02:57 PM, Suman Tripathi wrote: This patch addresses the issue with ATA_CMD_SMART pio mode command for enumeration and device detection with ATA devices. The X-Gene AHCI controller has an errata in which it cannot clear the BSY bit after the PIO setup FIS. The dma state mac

[PATCH] IB/srp: Add 64-bit LUN support

2015-02-02 Thread Bart Van Assche
The largest LUN number that has been tested is 0xd2003fff. Checked the following structure sizes with gdb: * sizeof(struct srp_cmd) = 48 * sizeof(struct srp_tsk_mgmt) = 48 * sizeof(struct srp_aer_req) = 36 The ibmvscsi changes have been compile tested only (on a PPC system). Signed-off-b

Re: [PATCH] phy: qcom-ufs: export symbols needed by main drivers

2015-02-02 Thread James Bottomley
On Mon, 2015-02-02 at 17:26 +0100, h...@lst.de wrote: > On Mon, Feb 02, 2015 at 03:30:27PM +, James Bottomley wrote: > > Cc added for linux-scsi, since this is the origin of the problem. How > > important is bisectability in this? It won't affect any non-embedded > > user, since most don't bu

[PATCH v3] Fix the dma state machine lockup for the ATA_CMD_SMART PIO mode command.

2015-02-02 Thread Suman Tripathi
v1 changes: * Update the commit id as per Tejun's comments. * Add a bit explanation. v2 changes: * Update the comments from sergei. v3 changes: * More changes in comments. Signed-off-by: Suman Tripathi --- Suman Tripathi (1): ahci_xgene: Fix the dma state machine lockup for the ATA_CMD_S

[PATCH v3] ahci_xgene: Fix the dma state machine lockup for the ATA_CMD_SMART PIO mode command.

2015-02-02 Thread Suman Tripathi
This patch addresses the issue with ATA_CMD_SMART pio mode command for enumeration and device detection with ATA devices. The X-Gene AHCI controller has an errata in which it cannot clear the BSY bit after the PIO setup FIS. The dma state machine enters CMFatalErrorUpdate state and locks up. It is

Re: [PATCH v3] ahci_xgene: Fix the dma state machine lockup for the ATA_CMD_SMART PIO mode command.

2015-02-02 Thread Sergei Shtylyov
Hello. On 02/02/2015 09:07 PM, Suman Tripathi wrote: This patch addresses the issue with ATA_CMD_SMART pio mode command for enumeration and device detection with ATA devices. The X-Gene AHCI controller has an errata in which it cannot clear the BSY bit after the PIO setup FIS. The dma state mac

Re: [PATCH v3] ahci_xgene: Fix the dma state machine lockup for the ATA_CMD_SMART PIO mode command.

2015-02-02 Thread Sergei Shtylyov
On 02/02/2015 10:37 PM, Suman Tripathi wrote: Ugh, please avoid using HTML when posting to the lists hosted on vger.kernel.org -- it's configured to ignore such mails AFAIK. This patch addresses the issue with ATA_CMD_SMART pio mode command for enumeration and device detection with

Re: [PATCH v3] ahci_xgene: Fix the dma state machine lockup for the ATA_CMD_SMART PIO mode command.

2015-02-02 Thread Suman Tripathi
Ugh, please avoid using HTML when posting to the lists hosted on vger.kernel.org -- it's configured to ignore such mails AFAIK. Yeah forgot to set the plain text mode. Sorry for that >>> This patch addresses the issue with ATA_CMD_SMART pio mode >>> command for enumeration and device de

Re: [PATCH 0/8] vhost/scsi: Add ANY_LAYOUT support

2015-02-02 Thread Nicholas A. Bellinger
On Mon, 2015-02-02 at 00:15 -0800, Christoph Hellwig wrote: > Hi Nic, > > Al has been rewriting the vhost code to use iov_iter primitives, > can you please rebase it on top of that istead of using the obsolete > infrastructure? > Yep, already done with the copy_[from,to]_iter() conversion in vho

Re: General protection fault in iscsi_rx_thread_pre_handler

2015-02-02 Thread Gavin Guo
Hi Nicholas, On Sun, Feb 1, 2015 at 11:47 AM, Gavin Guo wrote: > Hi Nicholas, > > On Sat, Jan 31, 2015 at 6:53 AM, Nicholas A. Bellinger > wrote: >> On Fri, 2015-01-23 at 09:30 +0800, Gavin Guo wrote: >>> Hi Nicholas, >>> >>> On Fri, Jan 23, 2015 at 1:35 AM, Nicholas A. Bellinger >>> wrote: >>>

RE: [PATCH 2/4] Fix for crash when bfa_itnim is NULL

2015-02-02 Thread Anil Gurumurthy
Hi Julian, You are right. It makes sense to move it to the next patch. I will re-send the patch series. Thanks, Anil -Original Message- From: Julian Calaby [mailto:julian.cal...@gmail.com] Sent: 30 January 2015 06:45 To: Anil Gurumurthy Cc: Jej B; Christoph Hellwig; linux-scsi Subjec

[PATCH-v3 0/9] vhost/scsi: Add ANY_LAYOUT + VERSION_1 support

2015-02-02 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi MST, Paolo, Al & Co, Here is -v3 for adding vhost/scsi ANY_LAYOUT + VERSION_1 host feature bit support. It adds a new vhost_virtqueue ->handle_kick() callback to determine the start of protection and data payloads iovecs past starting virtio-scsi request and response

[PATCH-v3 3/9] vhost/scsi: Change vhost_scsi_map_to_sgl to accept iov ptr + len

2015-02-02 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch changes vhost_scsi_map_to_sgl() parameters to accept virtio iovec ptr + len when determing pages_nr. This is currently done with iov_num_pages() -> PAGE_ALIGN, so allow the same parameters as well. Cc: Michael S. Tsirkin Cc: Paolo Bonzini Signed-off-by: Nic

[PATCH-v3 4/9] vhost/scsi: Add ANY_LAYOUT iov -> sgl mapping prerequisites

2015-02-02 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds ANY_LAYOUT prerequisites logic for accepting a set of protection + data payloads via iov_iter. Also includes helpers for calcuating SGLs + invoking vhost_scsi_map_to_sgl() with a known number of iovecs. Required by ANY_LAYOUT processing when struct iovec

[PATCH-v3 1/9] vhost/scsi: Convert completion path to use copy_to_iser

2015-02-02 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Required for ANY_LAYOUT support when the incoming virtio-scsi response header + fixed size sense buffer payload may span more than a single iovec entry. This changes existing code to save cmd->tvc_resp_iov instead of the first single iovec base pointer from &vq->iov[out]

[PATCH-v3 9/9] vhost/scsi: Global tcm_vhost -> vhost_scsi rename

2015-02-02 Thread Nicholas A. Bellinger
From: Nicholas Bellinger There is a large amount of code that still references the original 'tcm_vhost' naming conventions, instead of modern 'vhost_scsi'. Go ahead and do a global rename to make the usage consistent. Cc: Michael S. Tsirkin Cc: Paolo Bonzini Signed-off-by: Nicholas Bellinger

[PATCH-v3 6/9] vhost/scsi: Set VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 feature bits

2015-02-02 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Signal support of VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 feature bits required for virtio-scsi 1.0 spec layout requirements. Cc: Michael S. Tsirkin Cc: Paolo Bonzini Signed-off-by: Nicholas Bellinger --- drivers/vhost/scsi.c | 9 +++-- 1 file changed, 7 inserti

[PATCH-v3 5/9] vhost/scsi: Add ANY_LAYOUT vhost_virtqueue callback

2015-02-02 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds ANY_LAYOUT support with a new vqs[].vq.handle_kick() callback in vhost_scsi_handle_vqal(). It calculates data_direction + exp_data_len for the new tcm_vhost_cmd descriptor by walking both outgoing + incoming iovecs using iov_iter, assuming the layout of o

[PATCH-v3 2/9] vhost/scsi: Fix incorrect early vhost_scsi_handle_vq failures

2015-02-02 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch fixes vhost_scsi_handle_vq() failure cases that result in BUG_ON() getting triggered when vhost_scsi_free_cmd() is called, and ->tvc_se_cmd has not been initialized by target_submit_cmd_map_sgls(). It changes tcm_vhost_release_cmd() to use tcm_vhost_cmd->tvc_n

[PATCH-v3 8/9] vhost/scsi: Drop left-over scsi_tcq.h include

2015-02-02 Thread Nicholas A. Bellinger
From: Nicholas Bellinger With the recent removal of MSG_*_TAG defines in commit 68d81f40, vhost-scsi is now using TCM_*_TAG and doesn't depend upon host side scsi_tcq.h definitions anymore. Cc: Michael S. Tsirkin Cc: Paolo Bonzini Signed-off-by: Nicholas Bellinger --- drivers/vhost/scsi.c |

[PATCH-v3 7/9] vhost/scsi: Drop legacy pre virtio v1.0 !ANY_LAYOUT logic

2015-02-02 Thread Nicholas A. Bellinger
From: Nicholas Bellinger With the new ANY_LAYOUT logic in place for vhost_scsi_handle_vqal(), there is no longer a reason to keep around the legacy code with !ANY_LAYOUT assumptions. Go ahead and drop the pre virtio 1.0 logic in vhost_scsi_handle_vq() and associated helpers. Cc: Michael S. Tsir