Re: [PATCH] target: fix deadlock on unload

2014-06-27 Thread Nicholas A. Bellinger
On Fri, 2014-06-27 at 08:35 -0400, Mikulas Patocka wrote: > > 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 de

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 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': > ../drivers/scsi/3w-.c:1001:68

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 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 device uses free energy o

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

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

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 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 Technology Corp. / JMicron US

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 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: [PATCH] b2iscsi: Fix memory leak in mgmt_set_ip()

2014-06-27 Thread Tomas Henzl
On 06/27/2014 02:55 PM, Maurizio Lombardi wrote: > The if_info pointer is not released by the mgmt_set_ip() function > > Signed-off-by: Maurizio Lombardi > --- > drivers/scsi/be2iscsi/be_mgmt.c | 20 +++- > 1 file changed, 11 insertions(+), 9 deletions(-) > > diff --git a/drivers/

Re: External USB3 disk fails with "Invalid field in cdb"

2014-06-27 Thread Michael Büsch
On Fri, 27 Jun 2014 08:48:01 -0700 James Bottomley 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 > > === > > --- linux.orig/drivers/scsi/sd.c

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 unpriv

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 04:41 PM, Steffen Maier wrote: 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_Hos

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

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 > > Add myself as maintainer for the Xen pvSCSI stuff. Woot! Acked-by: Konrad Rzeszutek Wilk > > Signed-off-by: Juergen Gross > --- > MAINTAINERS | 7 +++ > 1 file changed, 7 insertions(+) > > diff

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

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

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.ke

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. Sign

[PATCH 1/4] Add XEN pvSCSI protocol description

2014-06-27 Thread jgross
From: Juergen Gross 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 - adapt to Linux style

[PATCH 4/4] add xen pvscsi maintainer

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

[PATCH 3/4] Introduce XEN scsiback module

2014-06-27 Thread jgross
From: Juergen Gross 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. This allows e.g.

[PATCH 2/4] Introduce xen-scsifront module

2014-06-27 Thread jgross
From: Juergen Gross Introduces the XEN pvSCSI frontend. 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. This allows e.g

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 adapt

[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 --- drivers/scsi/be2iscsi/be_mgmt.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c index

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 abou

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 Cc: James Smart --- drivers/s390/scsi/zfcp_scsi.c | 9 ++--- 10 files changed, 56 insertio

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

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" 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 20:47:14

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 eh_host_res

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

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

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: [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 --- drivers/s390/scsi/zfcp_scsi.c | 3 +-

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] > > http://www.t10.org/lists/2se

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 --- drivers/s390/scsi/zfcp_scsi.c | 3 +- 69 files changed, 289 insertions(+), 379 de

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

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

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 wig

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 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 appears > to

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 http://ixion.pld-linux.org/~arekm/p2/web3-adaptec-proble

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 behi

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 t

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 f

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(scm

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

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 shoul

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. > An

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 amper