[PATCH 1/7] scsi: fix comment in scsi_device_set_state()

2014-06-27 Thread Hannes Reinecke
The function returns '0' if successful; with the original comment the function doesn't have a way to indicate success ... Signed-off-by: Hannes Reinecke h...@suse.de --- drivers/scsi/scsi_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_lib.c

[PATCH 3/7] ibmvfc: Do not call fc_block_scsi_eh() on host reset

2014-06-27 Thread Hannes Reinecke
When we're resetting the host any remote port states will be reset anyway, so it's pointless to wait for dev_loss_tmo during host reset. Signed-off-by: Hannes Reinecke h...@suse.de Cc: Brian King brk...@linux.vnet.ibm.com --- drivers/scsi/ibmvscsi/ibmvfc.c | 4 1 file changed, 4

RE: [PATCH 3/4] pm8001: add a new spinlock to protect the CCB

2014-06-27 Thread Viswas G
HI Tomas, This lock is not needed as we are already protecting the tag allocation and freeing with the pm8001_ha-lock. We are always acquiring this lock before calling pm8001_tag_alloc(). We are allocating and freeing the tag in following paths, 1) Request/Response path : This we are

[PATCH 0/7] Use 'Scsi_Host' as argument for host reset

2014-06-27 Thread Hannes Reinecke
eh_host_reset_handler can only depend on the Scsi_Host, so we should make that explicit by using 'struct Scsi_Host' as argument for it. This uncovered issues with some FC HBAs; calling 'fc_block_scsi_eh' _before_ host reset is not only pointless (the host reset will reset the rport state anyway),

[PATCH 5/7] scsi_transport_fc: Use fc_rport as argument for fc_block_scsi_eh

2014-06-27 Thread Hannes Reinecke
fc_block_scsi_eh() works on a remote port, so we should be using that as an argument and not the scsi command. Signed-off-by: Hannes Reinecke h...@suse.de Cc: James Smart james.sm...@emulex.com --- drivers/s390/scsi/zfcp_scsi.c | 9 ++--- drivers/scsi/bnx2fc/bnx2fc_io.c | 4 ++--

[PATCH 2/7] mptfc: Do not call fc_block_scsi_eh() on host reset

2014-06-27 Thread Hannes Reinecke
When we're resetting the host any remote port states will be reset anyway, so it's pointless to wait for dev_loss_tmo during host reset. Signed-off-by: Hannes Reinecke h...@suse.de Cc: Sreekanth Reddy sreekanth.re...@avagotech.com --- drivers/message/fusion/mptfc.c | 10 +- 1 file

[PATCH 7/7] scsi_error: do not use command list for host reset

2014-06-27 Thread Hannes Reinecke
When host reset is called the host should be reset, and not depend on any commands on the queue. Signed-off-by: Hannes Reinecke h...@suse.de --- drivers/scsi/scsi_error.c | 40 ++-- 1 file changed, 14 insertions(+), 26 deletions(-) diff --git

[PATCH 4/7] libfc: Do not call fc_block_scsi_eh() on host reset

2014-06-27 Thread Hannes Reinecke
When we're resetting the host any remote port states will be reset anyway, so it's pointless to wait for dev_loss_tmo during host reset. Signed-off-by: Hannes Reinecke h...@suse.de Cc: Vasu Dev vasu@intel.com --- drivers/scsi/libfc/fc_fcp.c | 2 -- 1 file changed, 2 deletions(-) diff --git

Re: [PATCH 7/7] scsi_error: do not use command list for host reset

2014-06-27 Thread Bart Van Assche
On 06/27/14 08:27, Hannes Reinecke wrote: * scsi_eh_host_reset - send a host reset + * @shost: scsi host being recovered. In Documentation/kernel-doc-nano-HOWTO.txt I found 'struct_name' - name of a structure (up to two words including 'struct'). This made me wonder whether the ampersand

Re: [PATCH 4/4] scsi_scan: Fixup scsilun_to_int()

2014-06-27 Thread Bart Van Assche
On 06/25/14 15:27, Hannes Reinecke wrote: scsilun_to_int() has an error which prevents it from generating correct LUN numbers for 64bit values. Also we should remove the misleading comment about portions of the LUN being ignored; the initiator should treat the LUN as an opaque value. And,

Re: [PATCH 4/4] scsi_scan: Fixup scsilun_to_int()

2014-06-27 Thread Hannes Reinecke
On 06/27/2014 09:12 AM, Bart Van Assche wrote: On 06/25/14 15:27, Hannes Reinecke wrote: scsilun_to_int() has an error which prevents it from generating correct LUN numbers for 64bit values. Also we should remove the misleading comment about portions of the LUN being ignored; the initiator

Re: SCSI eats error from flush failure during hot plug

2014-06-27 Thread Christoph Hellwig
On Thu, Jun 26, 2014 at 02:52:56PM -0400, James Bottomley wrote: OK, I give up, what memory leak (you don't actually mention it in your emails)? All memory handling is correctly done in unprep as far as I can tell. To quote my earlier mail: - scsi_unprep_fn: calls -uninit_command only for

Re: SCSI eats error from flush failure during hot plug

2014-06-27 Thread Christoph Hellwig
On Thu, Jun 26, 2014 at 02:52:14PM -0400, James Bottomley wrote: + } else if (req-cmd_flags REQ_FLUSH) { + /* +* Flush request don't transfer data, so we can't try +* to complete the good bytes first before checking +* the error. +

Re: [PATCH 7/7] scsi_error: do not use command list for host reset

2014-06-27 Thread Christoph Hellwig
@@ -771,7 +770,7 @@ static int scsi_try_host_reset(struct scsi_cmnd *scmd) if (!hostt-skip_settle_delay) ssleep(HOST_RESET_SETTLE_TIME); spin_lock_irqsave(host-host_lock, flags); - scsi_report_bus_reset(host, scmd_channel(scmd));

Re: [PATCH 0/7] Use 'Scsi_Host' as argument for host reset

2014-06-27 Thread Christoph Hellwig
On Fri, Jun 27, 2014 at 08:26:58AM +0200, Hannes Reinecke wrote: eh_host_reset_handler can only depend on the Scsi_Host, so we should make that explicit by using 'struct Scsi_Host' as argument for it. I like where this is going. Are you going to do a similar conversion away from scsi_cmnd for

Re: [PATCH 0/7] Use 'Scsi_Host' as argument for host reset

2014-06-27 Thread Hannes Reinecke
On 06/27/2014 09:59 AM, Christoph Hellwig wrote: On Fri, Jun 27, 2014 at 08:26:58AM +0200, Hannes Reinecke wrote: eh_host_reset_handler can only depend on the Scsi_Host, so we should make that explicit by using 'struct Scsi_Host' as argument for it. I like where this is going. Are you going

Re: [PATCH 0/7] Use 'Scsi_Host' as argument for host reset

2014-06-27 Thread Christoph Hellwig
On Fri, Jun 27, 2014 at 10:14:36AM +0200, Hannes Reinecke wrote: And I didn't want this to linger in my tree, as sending out the entire conversion will result in a massive patchset. But if you're fine with it ... I've not done a formal review yet, but as I said I really like the idea behind

help decoding aacraid errors (3.10.40 kernel)

2014-06-27 Thread Arkadiusz Miskiewicz
Hello. I'm using 3.10.40 kernel with adaptec 3405 and unfortunately I'm getting I/O errors and dmesg errors like below. Is there a howto how to decode these errors or what these actually mean? Some details, including full dmesg output at

RE: [PATCH] scsi: pm8001: pm80xx_hwi.c: Cleaning up variable is set more than once

2014-06-27 Thread Suresh Thiagarajan
On Thu, Jun 26, 2014 at 1:50 PM, Maurizio Lombardi mlomb...@redhat.com wrote: On 06/26/2014 10:09 AM, Jack Wang wrote: Thanks Rickard, From my point of view, looks good, but I'd like to get review from Anand (cc-ed). I would like to add that I noticed that this fields is only set and

Re: External USB3 disk fails with Invalid field in cdb

2014-06-27 Thread Bryn M. Reeves
On Thu, Jun 26, 2014 at 08:55:19PM +0200, Michael Büsch wrote: Jun 26 20:47:14 wiggum kernel: [156019.870310] sd 22:0:0:0: [sdb] 976773168 512-byte logical blocks: (500 GB/465 GiB) Jun 26 20:47:14 wiggum kernel: [156019.870653] sd 22:0:0:0: [sdb] Write Protect is off Jun 26 20:47:14 wiggum

Re: [PATCH 3/4] pm8001: add a new spinlock to protect the CCB

2014-06-27 Thread Tomas Henzl
On 06/27/2014 08:09 AM, Viswas G wrote: HI Tomas, This lock is not needed as we are already protecting the tag allocation and freeing with the pm8001_ha-lock. We are always acquiring this lock before calling pm8001_tag_alloc(). We are allocating and freeing the tag in following paths,

Re: help decoding aacraid errors (3.10.40 kernel)

2014-06-27 Thread Bryn M. Reeves
On Fri, Jun 27, 2014 at 10:55:08AM +0200, Arkadiusz Miskiewicz wrote: [3757350.671860] Result: hostbyte=0x00 driverbyte=0x08 [3757350.671862] sd 0:0:2:0: [sdc] [3757350.671863] Sense Key : 0x4 [current] http://www.t10.org/lists/2sensekey.htm 0x4 is hardware error. [3757350.671866] sd

Re: [PATCH 7/7] scsi_error: do not use command list for host reset

2014-06-27 Thread Steffen Maier
On 06/27/2014 09:58 AM, Christoph Hellwig wrote: @@ -771,7 +770,7 @@ static int scsi_try_host_reset(struct scsi_cmnd *scmd) if (!hostt-skip_settle_delay) ssleep(HOST_RESET_SETTLE_TIME); spin_lock_irqsave(host-host_lock, flags); -

Re: [PATCH 6/7] scsi: Use Scsi_Host as argument for eh_host_reset_handler

2014-06-27 Thread Steffen Maier
On 06/27/2014 08:27 AM, Hannes Reinecke wrote: Issuing a host reset should not rely on any commands. So use Scsi_Host as argument for eh_host_reset_handler. Signed-off-by: Hannes Reinecke h...@suse.de --- drivers/s390/scsi/zfcp_scsi.c | 3 +- 69 files changed, 289

Re: help decoding aacraid errors (3.10.40 kernel)

2014-06-27 Thread Arkadiusz Miskiewicz
On Friday 27 of June 2014, Bryn M. Reeves wrote: On Fri, Jun 27, 2014 at 10:55:08AM +0200, Arkadiusz Miskiewicz wrote: [3757350.671860] Result: hostbyte=0x00 driverbyte=0x08 [3757350.671862] sd 0:0:2:0: [sdc] [3757350.671863] Sense Key : 0x4 [current]

Re: [PATCH 6/7] scsi: Use Scsi_Host as argument for eh_host_reset_handler

2014-06-27 Thread Hannes Reinecke
On 06/27/2014 12:47 PM, Steffen Maier wrote: On 06/27/2014 08:27 AM, Hannes Reinecke wrote: Issuing a host reset should not rely on any commands. So use Scsi_Host as argument for eh_host_reset_handler. Signed-off-by: Hannes Reinecke h...@suse.de --- drivers/s390/scsi/zfcp_scsi.c

Re: help decoding aacraid errors (3.10.40 kernel)

2014-06-27 Thread Bryn M. Reeves
On Fri, Jun 27, 2014 at 12:59:18PM +0200, Arkadiusz Miskiewicz wrote: Thanks for links. I wonder why kernel doesn't decode these to be actually readable without a need for asking on ml - was decoding considered? Normally it does; I was a bit surprised to see numbers printed with such a recent

Re: help decoding aacraid errors (3.10.40 kernel)

2014-06-27 Thread Arkadiusz Miskiewicz
On Friday 27 of June 2014, Bryn M. Reeves wrote: On Fri, Jun 27, 2014 at 12:59:18PM +0200, Arkadiusz Miskiewicz wrote: Thanks for links. I wonder why kernel doesn't decode these to be actually readable without a need for asking on ml - was decoding considered? Normally it does; I was a bit

Re: [PATCH 6/7] scsi: Use Scsi_Host as argument for eh_host_reset_handler

2014-06-27 Thread Martin Peschke
On Fri, 2014-06-27 at 13:04 +0200, Hannes Reinecke wrote: On 06/27/2014 12:47 PM, Steffen Maier wrote: On 06/27/2014 08:27 AM, Hannes Reinecke wrote: Issuing a host reset should not rely on any commands. So use Scsi_Host as argument for eh_host_reset_handler. Signed-off-by: Hannes

Re: [PATCH 6/7] scsi: Use Scsi_Host as argument for eh_host_reset_handler

2014-06-27 Thread Hannes Reinecke
On 06/27/2014 01:52 PM, Martin Peschke wrote: On Fri, 2014-06-27 at 13:04 +0200, Hannes Reinecke wrote: On 06/27/2014 12:47 PM, Steffen Maier wrote: On 06/27/2014 08:27 AM, Hannes Reinecke wrote: Issuing a host reset should not rely on any commands. So use Scsi_Host as argument for

Re: External USB3 disk fails with Invalid field in cdb

2014-06-27 Thread Michael Büsch
Thanks for your analysis. On Fri, 27 Jun 2014 11:15:41 +0100 Bryn M. Reeves b...@redhat.com wrote: On Thu, Jun 26, 2014 at 08:55:19PM +0200, Michael Büsch wrote: Jun 26 20:47:14 wiggum kernel: [156019.870310] sd 22:0:0:0: [sdb] 976773168 512-byte logical blocks: (500 GB/465 GiB) Jun 26

Re: [PATCH] target: fix deadlock on unload

2014-06-27 Thread Mikulas Patocka
On Thu, 26 Jun 2014, Nicholas A. Bellinger wrote: Hi Mikulas, On Mon, 2014-06-23 at 13:42 -0400, Mikulas Patocka wrote: target: fix deadlock on unload On uniprocessor preemptible kernel, target core deadlocks on unload. The following events happen: * iscsit_del_np is called *

Re: [PATCH 5/7] scsi_transport_fc: Use fc_rport as argument for fc_block_scsi_eh

2014-06-27 Thread Steffen Maier
On 06/27/2014 08:27 AM, Hannes Reinecke wrote: fc_block_scsi_eh() works on a remote port, so we should be using that as an argument and not the scsi command. Signed-off-by: Hannes Reinecke h...@suse.de Cc: James Smart james.sm...@emulex.com --- drivers/s390/scsi/zfcp_scsi.c | 9 ++---

Re: [PATCH 4/4] scsi_scan: Fixup scsilun_to_int()

2014-06-27 Thread Bart Van Assche
On 06/27/14 09:30, Hannes Reinecke wrote: On 06/27/2014 09:12 AM, Bart Van Assche wrote: On 06/25/14 15:27, Hannes Reinecke wrote: scsilun_to_int() has an error which prevents it from generating correct LUN numbers for 64bit values. Also we should remove the misleading comment about portions

[PATCH] b2iscsi: Fix memory leak in mgmt_set_ip()

2014-06-27 Thread Maurizio Lombardi
The if_info pointer is not released by the mgmt_set_ip() function Signed-off-by: Maurizio Lombardi mlomb...@redhat.com --- drivers/scsi/be2iscsi/be_mgmt.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/be2iscsi/be_mgmt.c

Add XEN pvSCSI support

2014-06-27 Thread jgross
This series adds XEN pvSCSI support. With pvSCSI it is possible to use physical SCSI devices from a XEN domain. The support consists of a backend in the privileged Domain-0 doing the real I/O and a frontend in the unprivileged domU passing I/O-requests to the backend. The code is taken (and

[PATCH 3/4] Introduce XEN scsiback module

2014-06-27 Thread jgross
From: Juergen Gross jgr...@suse.com Introduces the XEN pvSCSI backend. With pvSCSI it is possible for a XEN domU to issue SCSI commands to a SCSI LUN assigned to that domU. The SCSI commands are passed to the pvSCSI backend in a driver domain (usually Dom0) which is owner of the physical device.

[PATCH 4/4] add xen pvscsi maintainer

2014-06-27 Thread jgross
From: Juergen Gross jgr...@suse.com Add myself as maintainer for the Xen pvSCSI stuff. Signed-off-by: Juergen Gross jgr...@suse.com --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index ebc8128..78c60e6 100644 --- a/MAINTAINERS +++

[PATCH 1/4] Add XEN pvSCSI protocol description

2014-06-27 Thread jgross
From: Juergen Gross jgr...@suse.com Add the definition of pvSCSI protocol used between the pvSCSI frontend in a XEN domU and the pvSCSI backend in a XEN driver domain (usually Dom0). This header was originally provided by Fujitsu for XEN based on Linux 2.6.18. Changes are: - added comment -

Re: [PATCH 6/7] scsi: Use Scsi_Host as argument for eh_host_reset_handler

2014-06-27 Thread Steffen Maier
What base does this patch set apply to? I failed with scsi:misc / scsi:fixes / vanilla. On 06/27/2014 12:47 PM, Steffen Maier wrote: On 06/27/2014 08:27 AM, Hannes Reinecke wrote: Issuing a host reset should not rely on any commands. So use Scsi_Host as argument for eh_host_reset_handler.

Re: scsi-mq V2

2014-06-27 Thread Bart Van Assche
On 06/27/14 00:07, Elliott, Robert (Server Storage) wrote: -Original Message- From: Jens Axboe [mailto:ax...@kernel.dk] Sent: Wednesday, 25 June, 2014 11:51 PM To: Christoph Hellwig; James Bottomley Cc: Bart Van Assche; Elliott, Robert (Server Storage); linux- s...@vger.kernel.org;

Re: External USB3 disk fails with Invalid field in cdb

2014-06-27 Thread Michael Büsch
I tried the following patch: Index: linux/drivers/scsi/sd.c === --- linux.orig/drivers/scsi/sd.c2014-06-26 18:40:39.214696552 +0200 +++ linux/drivers/scsi/sd.c 2014-06-27 15:52:30.776159456 +0200 @@ -2440,7 +2440,7 @@

Re: External USB3 disk fails with Invalid field in cdb

2014-06-27 Thread James Bottomley
On Fri, 2014-06-27 at 17:34 +0200, Michael Büsch wrote: I tried the following patch: Index: linux/drivers/scsi/sd.c === --- linux.orig/drivers/scsi/sd.c 2014-06-26 18:40:39.214696552 +0200 +++ linux/drivers/scsi/sd.c

Re: [Xen-devel] [PATCH 1/4] Add XEN pvSCSI protocol description

2014-06-27 Thread Konrad Rzeszutek Wilk
On Fri, Jun 27, 2014 at 04:34:33PM +0200, jgr...@suse.com wrote: From: Juergen Gross jgr...@suse.com Add the definition of pvSCSI protocol used between the pvSCSI frontend in a XEN domU and the pvSCSI backend in a XEN driver domain (usually Dom0). This header was originally provided by

Re: [Xen-devel] [PATCH 4/4] add xen pvscsi maintainer

2014-06-27 Thread Konrad Rzeszutek Wilk
On Fri, Jun 27, 2014 at 04:34:36PM +0200, jgr...@suse.com wrote: From: Juergen Gross jgr...@suse.com Add myself as maintainer for the Xen pvSCSI stuff. Woot! Acked-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com Signed-off-by: Juergen Gross jgr...@suse.com --- MAINTAINERS | 7 +++

Re: [Xen-devel] Add XEN pvSCSI support

2014-06-27 Thread Pasi Kärkkäinen
On Fri, Jun 27, 2014 at 08:45:25PM +0300, Pasi Kärkkäinen wrote: On Fri, Jun 27, 2014 at 04:34:32PM +0200, jgr...@suse.com wrote: This series adds XEN pvSCSI support. With pvSCSI it is possible to use physical SCSI devices from a XEN domain. The support consists of a backend in the

Re: [Xen-devel] Add XEN pvSCSI support

2014-06-27 Thread Pasi Kärkkäinen
On Fri, Jun 27, 2014 at 04:34:32PM +0200, jgr...@suse.com wrote: This series adds XEN pvSCSI support. With pvSCSI it is possible to use physical SCSI devices from a XEN domain. The support consists of a backend in the privileged Domain-0 doing the real I/O and a frontend in the

Re: External USB3 disk fails with Invalid field in cdb

2014-06-27 Thread Alan Stern
On Fri, 27 Jun 2014, Michael Büsch wrote: On Fri, 27 Jun 2014 08:48:01 -0700 James Bottomley james.bottom...@hansenpartnership.com wrote: On Fri, 2014-06-27 at 17:34 +0200, Michael Büsch wrote: I tried the following patch: Index: linux/drivers/scsi/sd.c

Re: External USB3 disk fails with Invalid field in cdb

2014-06-27 Thread Michael Büsch
On Fri, 27 Jun 2014 14:42:01 -0400 (EDT) Alan Stern st...@rowland.harvard.edu wrote: Michael, can you post the lsusb -v output for this device? I see it is made by JMicron; they are notorious for buggy USB-ATA bridges. Of course. Here you go: Bus 004 Device 009: ID 152d:0567 JMicron

Re: [usb-storage] Re: External USB3 disk fails with Invalid field in cdb

2014-06-27 Thread Alan Stern
On Fri, 27 Jun 2014, Michael Büsch wrote: On Fri, 27 Jun 2014 14:42:01 -0400 (EDT) Alan Stern st...@rowland.harvard.edu wrote: Michael, can you post the lsusb -v output for this device? I see it is made by JMicron; they are notorious for buggy USB-ATA bridges. Of course. Here you go:

Re: [PATCH] b2iscsi: Fix memory leak in mgmt_set_ip()

2014-06-27 Thread Maurizio Lombardi
diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c index 07934b0..a3e5648 100644 --- a/drivers/scsi/be2iscsi/be_mgmt.c +++ b/drivers/scsi/be2iscsi/be_mgmt.c @@ -1015,7 +1015,7 @@ int mgmt_set_ip(struct beiscsi_hba *phba, if (if_info-dhcp_state) {

Re: [usb-storage] Re: External USB3 disk fails with Invalid field in cdb

2014-06-27 Thread Michael Büsch
On Fri, 27 Jun 2014 15:23:42 -0400 (EDT) Alan Stern st...@rowland.harvard.edu wrote: MaxPower=2mA is a nice guess for a hard disk. ;) That refers to the amount of power the device draws from the USB bus. Since the disk drive is self-powered, it doesn't use much bus power. Unless the

Re: [PATCH] [scsi] 3w-xxxx: fix mis-aligned struct accesses

2014-06-27 Thread adam radford
On Thu, Jun 26, 2014 at 5:58 AM, Arnd Bergmann a...@arndb.de wrote: Building an allmodconfig ARM kernel, I get multiple such warnings because of a spinlock contained in packed structure in the 3w- driver: ../drivers/scsi/3w-.c: In function 'tw_chrdev_ioctl':