Re: [PATCH] tcm_loop: Fixup tag handling

2014-10-02 Thread Nicholas A. Bellinger
On Thu, 2014-10-02 at 09:30 +0200, Hannes Reinecke wrote: > The SCSI command tag is set to the tag assigned from the block > layer, not the SCSI-II tag message. So we need to convert > it into the correct SCSI-II tag message based on the > device flags, not the tag value itself. > > Signed-off-by:

RE: [PATCH 24/24] scsi_error: document scsi_try_to_abort_cmd

2014-10-02 Thread Elliott, Robert (Server Storage)
> -Original Message- > From: Hannes Reinecke [mailto:h...@suse.de] > Sent: Wednesday, 01 October, 2014 1:23 AM > To: James Bottomley > Cc: Christoph Hellwig; linux-scsi@vger.kernel.org; Elliott, Robert (Server > Storage); Hannes Reinecke > Subject: [PATCH 24/24] scsi_error: document scsi_

RE: [PATCH 22/24] scsi: fixup logging messages in scsi_error.c

2014-10-02 Thread Elliott, Robert (Server Storage)
> -Original Message- > From: Hannes Reinecke [mailto:h...@suse.de] ... > diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c > index 554f885..7e1e190 100644 > --- a/drivers/scsi/scsi_error.c > +++ b/drivers/scsi/scsi_error.c > @@ -1156,9 +1156,10 @@ int scsi_eh_get_sense(st

RE: [PATCH 21/24] scsi: simplify scsi_log_(send|completion)

2014-10-02 Thread Elliott, Robert (Server Storage)
> -Original Message- > From: Hannes Reinecke [mailto:h...@suse.de] > Sent: Wednesday, 01 October, 2014 1:23 AM > To: James Bottomley > Cc: Christoph Hellwig; linux-scsi@vger.kernel.org; Elliott, Robert (Server > Storage); Hannes Reinecke > Subject: [PATCH 21/24] scsi: simplify scsi_log_(s

RE: [PATCH 20/24] sd: Cleanup logging

2014-10-02 Thread Elliott, Robert (Server Storage)
> -Original Message- > From: Hannes Reinecke [mailto:h...@suse.de] ... > diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c ... > @@ -3328,9 +3319,19 @@ static void sd_print_sense_hdr(struct scsi_disk *sdkp, >sshdr->asc, sshdr->ascq); > } > > -static void sd_

RE: [PATCH 18/24] scsi: Remove scsi_print_command when calling abort

2014-10-02 Thread Elliott, Robert (Server Storage)
> -Original Message- > From: Hannes Reinecke [mailto:h...@suse.de] > Sent: Wednesday, 01 October, 2014 1:23 AM > To: James Bottomley > Cc: Christoph Hellwig; linux-scsi@vger.kernel.org; Elliott, Robert (Server > Storage); Hannes Reinecke > Subject: [PATCH 18/24] scsi: Remove scsi_print_co

RE: [PATCH 17/24] scsi: remove last argument from print_opcode_name()

2014-10-02 Thread Elliott, Robert (Server Storage)
> -Original Message- > From: Hannes Reinecke [mailto:h...@suse.de] > Sent: Wednesday, 01 October, 2014 1:23 AM > To: James Bottomley > Cc: Christoph Hellwig; linux-scsi@vger.kernel.org; Elliott, Robert (Server > Storage); Hannes Reinecke > Subject: [PATCH 17/24] scsi: remove last argument

RE: [PATCH 16/24] scsi: consolidate opcode lookup in scsi_opcode_sa_name()

2014-10-02 Thread Elliott, Robert (Server Storage)
> -Original Message- > From: Hannes Reinecke [mailto:h...@suse.de] ... > diff --git a/drivers/scsi/constants.c b/drivers/scsi/constants.c ... > @@ -332,21 +340,20 @@ static void print_opcode_name(unsigned char * cdbp, int > cdb_len) > len = cdb_len; > } > > - if (

[PATCH] tmscim: Remove unused SCSI_IRQ_NONE macro definition

2014-10-02 Thread Finn Thain
Signed-off-by: Finn Thain --- This macro is only used in the NCR5380 drivers and they don't include this header. --- drivers/scsi/tmscsim.h |2 -- 1 file changed, 2 deletions(-) Index: linux/drivers/scsi/tmscsim.h === --- li

[PATCH] scsi_debug: Error message should say scsi_host_alloc not scsi_register

2014-10-02 Thread Finn Thain
Signed-off-by: Finn Thain --- drivers/scsi/scsi_debug.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux/drivers/scsi/scsi_debug.c === --- linux.orig/drivers/scsi/scsi_debug.c2014-09-29 10:55:44.00

[PATCH] scsi: Fix "choir" and "beeing" malaprops

2014-10-02 Thread Finn Thain
Signed-off-by: Finn Thain --- Documentation/scsi/scsi_eh.txt |4 ++-- drivers/scsi/aha152x.c |2 +- drivers/scsi/mac_scsi.c|2 +- include/scsi/scsi_host.h |2 +- 4 files changed, 5 insertions(+), 5 deletions(-) Index: linux/Documentation/scsi/scsi_eh.txt =

RE: [PATCH 15/24] scsi: merge print_opcode_name()

2014-10-02 Thread Elliott, Robert (Server Storage)
> -Original Message- > From: Hannes Reinecke [mailto:h...@suse.de] > +struct sa_name_list { > + int cmd; > + const struct value_name_pair *arr; > + int arr_sz; > +}; The suggestion to rename cmd to opcode in patch 14 would follow the movements here. ... > @@ -273,7 +292,7 @@

RE: [PATCH 14/24] Implement scsi_opcode_sa_name

2014-10-02 Thread Elliott, Robert (Server Storage)
> -Original Message- > From: Hannes Reinecke [mailto:h...@suse.de] ... > +struct sa_name_list { > + int cmd; > + const struct value_name_pair *arr; > + int arr_sz; > +}; cmd usually refers to a whole structure and is usually a pointer variable. grep searches will be easier

RE: [PATCH 12/24] scsi: use 'bool' as return value for scsi_normalize_sense()

2014-10-02 Thread Elliott, Robert (Server Storage)
> -Original Message- > From: Hannes Reinecke [mailto:h...@suse.de] > Sent: Wednesday, 01 October, 2014 1:23 AM > To: James Bottomley > Cc: Christoph Hellwig; linux-scsi@vger.kernel.org; Elliott, Robert (Server > Storage); Hannes Reinecke > Subject: [PATCH 12/24] scsi: use 'bool' as return

RE: [PATCH 08/24] fas216: Update logging messages

2014-10-02 Thread Elliott, Robert (Server Storage)
> -Original Message- > From: Hannes Reinecke [mailto:h...@suse.de] ... > @@ -2079,12 +2078,12 @@ fas216_std_done(FAS216_Info *info, struct scsi_cmnd > *SCpnt, unsigned int result) > break; > > default: > - printk(KERN_ERR "scsi%d.%c

RE: [PATCH 05/24] scsi: Use sdev as argument for sense code printing

2014-10-02 Thread Elliott, Robert (Server Storage)
> -Original Message- > From: Hannes Reinecke [mailto:h...@suse.de] ... > @@ -1369,49 +1372,53 @@ scsi_extd_sense_format(unsigned char asc, unsigned > char ascq) { > EXPORT_SYMBOL(scsi_extd_sense_format); > > void > -scsi_show_extd_sense(unsigned char asc, unsigned char ascq) > +scsi_sh

RE: [PATCH 03/24] aha152x: Debug output update and whitespace cleanup

2014-10-02 Thread Elliott, Robert (Server Storage)
> -Original Message- > From: Hannes Reinecke [mailto:h...@suse.de] ... > diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c > index e77b72f..e1aba73 100644 > --- a/drivers/scsi/aha152x.c > +++ b/drivers/scsi/aha152x.c ... > @@ -345,10 +311,10 @@ CMD_INC_RESID(struct scsi_cmnd *cmd

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-10-02 Thread Luis R. Rodriguez
On Tue, Sep 30, 2014 at 09:15:55AM +0200, Luis R. Rodriguez wrote: > Can you provide an example code path hit here? I'll certainly like to address > that as well. I managed to enable built-in driver support on top of this series, I'll send them as part of the next series but I suspect we'll want t

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-10-02 Thread Luis R. Rodriguez
On Tue, Sep 30, 2014 at 09:21:59AM +0200, Luis R. Rodriguez wrote: > On Mon, Sep 29, 2014 at 05:26:01PM -0400, Tejun Heo wrote: > > Hello, Luis. > > > > On Mon, Sep 29, 2014 at 11:22:08PM +0200, Luis R. Rodriguez wrote: > > > > > + /* For now lets avoid stupid bug reports */ > > > > > + if

RE: [PATCH 20/24] sd: Cleanup logging

2014-10-02 Thread Elliott, Robert (Server Storage)
> From: Hannes Reinecke [mailto:h...@suse.de] ... > diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c > index 848b17d..2cc8703 100644 > --- a/drivers/scsi/sd.c > +++ b/drivers/scsi/sd.c > @@ -116,7 +116,7 @@ static int sd_eh_action(struct scsi_cmnd *, int); > static void sd_read_capacity(struct s

[PATCH] cxgb4i : fix rtnl lock assertion

2014-10-02 Thread Anish Bhatt
We should have been calling netdev_master_upper_dev_get_rcu() instead of netdev_master_upper_dev_get() all along since this is called with an rcu_read_lock() Please queue up for the next set of fixes for 3.17 as well. -Anish Signed-off-by: Anish Bhatt Signed-off-by: Karen Xie Fixes: 759a0cc5a

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-10-02 Thread Luis R. Rodriguez
As per Tom, adding systemd-devel for advice / review / of the request to avoid the sigkill for kmod workers. Keeping others on Cc as its a discussion that I think can help if both camps are involved. Specially since we've been ping ponging back and forth on this particular topic for a long time now

Re: [PATCH 22/24] scsi: fixup logging messages in scsi_error.c

2014-10-02 Thread Ewan Milne
On Wed, 2014-10-01 at 08:22 +0200, Hannes Reinecke wrote: > Use the matching scope for logging messages to allow for > better command tracing. > > Suggested-by: Robert Elliott > Reviewed-by: Christoph Hellwig > Signed-off-by: Hannes Reinecke > --- > drivers/scsi/hosts.c | 4 +-- > driver

RE: [PATCHv5 00/24] scsi logging update (the boring part)

2014-10-02 Thread Elliott, Robert (Server Storage)
> -Original Message- > From: Hannes Reinecke [mailto:h...@suse.de] > Sent: Wednesday, 01 October, 2014 1:23 AM > To: James Bottomley > Cc: Christoph Hellwig; linux-scsi@vger.kernel.org; Elliott, Robert (Server > Storage); Hannes Reinecke > Subject: [PATCHv5 00/24] scsi logging update (the

RE: [PATCH 04/24] scsi: introduce sdev_prefix_printk()

2014-10-02 Thread Elliott, Robert (Server Storage)
> -Original Message- > From: Hannes Reinecke [mailto:h...@suse.de] ... > diff --git a/drivers/scsi/sd.h b/drivers/scsi/sd.h > index 4c3ab83..c01dc89 100644 > --- a/drivers/scsi/sd.h > +++ b/drivers/scsi/sd.h > @@ -103,9 +103,10 @@ static inline struct scsi_disk *scsi_disk(struct gendisk > *

Re: [PATCH 8/8] IB/srp: Add multichannel support

2014-10-02 Thread Christoph Hellwig
On Thu, Oct 02, 2014 at 06:45:55PM +0200, Bart Van Assche wrote: > Would it be acceptable to let blk_mq_rq_tag() always return the > hardware context number and the per-hctx tag ? Block and SCSI LLD > drivers that do not need the hardware context number can still use > rq->tag. Drivers that need

Re: [PATCH 8/8] IB/srp: Add multichannel support

2014-10-02 Thread Jens Axboe
On 10/02/2014 10:45 AM, Bart Van Assche wrote: > On 10/01/14 18:54, Jens Axboe wrote: >> Lets get rid of the blk_mq_tag struct and just have it be an u32 or >> something. We could potentially typedef it, but I'd prefer to just have >> it be an unsigned 32-bit int. >> >> Probably also need some in

Re: [PATCH 8/8] IB/srp: Add multichannel support

2014-10-02 Thread Bart Van Assche
On 10/01/14 18:54, Jens Axboe wrote: > Lets get rid of the blk_mq_tag struct and just have it be an u32 or > something. We could potentially typedef it, but I'd prefer to just have > it be an unsigned 32-bit int. > > Probably also need some init time safety checks that 16-bits is enough > to ho

re: ufs: definitions for phy interface

2014-10-02 Thread Dan Carpenter
Hello Dolev Raviv, This is a semi-automatic email about new static checker warnings. The patch e785060ea3a1: "ufs: definitions for phy interface" from Sep 25, 2014, leads to the following Smatch complaint: drivers/scsi/ufs/ufshcd.c:5118 ufshcd_system_suspend() error: we previously assu

re: ufs: Add support for clock gating

2014-10-02 Thread Dan Carpenter
Hello Sahitya Tummala, The patch 1ab27c9cf8b6: "ufs: Add support for clock gating" from Sep 25, 2014, leads to the following static checker warning: drivers/scsi/ufs/ufshcd.c:4474 __ufshcd_setup_clocks() warn: we tested 'ret' before and it was 'false' drivers/scsi/ufs/ufshcd.c

re: ufs: add UFS power management support

2014-10-02 Thread Dan Carpenter
Hello Subhash Jadavani, The patch 57d104c153d3: "ufs: add UFS power management support" from Sep 25, 2014, leads to the following static checker warning: drivers/scsi/ufs/ufshcd.c:4746 ufshcd_link_state_transition() warn: we tested 'check_for_bkops' before and it was 'true' drive

re: ufs: Add regulator enable support

2014-10-02 Thread Dan Carpenter
Hello Sujit Reddy Thumma, The patch aa4976130934: "ufs: Add regulator enable support" from Sep 25, 2014, leads to the following static checker warning: drivers/scsi/ufs/ufshcd-pltfrm.c:167 ufshcd_populate_vreg() warn: missing error code here? 'devm_kzalloc()' failed. 'ret' = '0'

re: ufs: Add freq-table-hz property for UFS device

2014-10-02 Thread Dan Carpenter
Hello Sahitya Tummala, The patch 4cff6d991e4a: "ufs: Add freq-table-hz property for UFS device" from Sep 25, 2014, leads to the following static checker warning: drivers/scsi/ufs/ufshcd-pltfrm.c:138 ufshcd_parse_clock_info() warn: passing devm_ allocated variable to kfree. 'clkfre

Re: [PATCH] megaraid_sas: Enable shared tag map

2014-10-02 Thread Christoph Hellwig
On Thu, Oct 02, 2014 at 02:00:32PM +0200, Hannes Reinecke wrote: > Actually, I've hit a similar issue for megaraid_sas (and I guess > others which implement a host-wide tag map might suffer here, too): > tags need to be used even for internal commands. > But tag allocation is done exclusively in th

Re: PR registration on LIO iscsi returns sense key not ready

2014-10-02 Thread Luigi Tarenga
On 10/02/2014 04:11 PM, Christophe Vu-Brugier wrote: Dear Luigi, On Thu, 02 Oct 2014 12:47:09 +0200, Luigi Tarenga wrote : I have a little problem with LIO iscsi target and SPC-3 persistent reservation. The summary of my setup is: host: centos 6.5 x86_64 with custom kernel 3.16.3 + scst pa

Re: [PATCH 1/2] be2iscsi : Fix kernel panic during reboot/shutdown

2014-10-02 Thread Ewan Milne
On Fri, 2014-09-26 at 15:13 -0400, John Soni Jose wrote: > In the reboot/shutdown path, workqueue was destroyed after the > adapter resource were freed. The task associated with workqueue > was getting executed after resources were freed. This lead to > kernel panic. > > Signed-off-by: John Son

Re: PR registration on LIO iscsi returns sense key not ready

2014-10-02 Thread Christophe Vu-Brugier
Dear Luigi, On Thu, 02 Oct 2014 12:47:09 +0200, Luigi Tarenga wrote : > I have a little problem with LIO iscsi target and SPC-3 persistent > reservation. > The summary of my setup is: > host: >centos 6.5 x86_64 with custom kernel 3.16.3 + scst patches >targetcli (-fb) 2.1.fb37 >this h

Re: [PATCH 2/2] uas: Make uas work with blk-mq

2014-10-02 Thread Greg Kroah-Hartman
On Thu, Oct 02, 2014 at 06:12:59AM -0700, Christoph Hellwig wrote: > On Thu, Oct 02, 2014 at 03:08:40PM +0200, Hans de Goede wrote: > > Yes, although that likely would need to go through stable, without > > going into 3.18 . > > > > Greg, is this ok with you and how do I get a patch in stable whic

Re: [PATCH 2/2] uas: Make uas work with blk-mq

2014-10-02 Thread Hans de Goede
Hi, On 10/02/2014 03:25 PM, James Bottomley wrote: > On Thu, 2014-10-02 at 15:18 +0200, Hans de Goede wrote: >> Hi, >> >> On 10/02/2014 03:12 PM, Christoph Hellwig wrote: >>> On Thu, Oct 02, 2014 at 03:08:40PM +0200, Hans de Goede wrote: Yes, although that likely would need to go through stab

Re: [PATCH 2/2] uas: Make uas work with blk-mq

2014-10-02 Thread James Bottomley
On Thu, 2014-10-02 at 15:18 +0200, Hans de Goede wrote: > Hi, > > On 10/02/2014 03:12 PM, Christoph Hellwig wrote: > > On Thu, Oct 02, 2014 at 03:08:40PM +0200, Hans de Goede wrote: > >> Yes, although that likely would need to go through stable, without > >> going into 3.18 . > >> > >> Greg, is th

Re: [PATCH 2/2] uas: Make uas work with blk-mq

2014-10-02 Thread Hans de Goede
Hi, On 10/02/2014 03:12 PM, Christoph Hellwig wrote: > On Thu, Oct 02, 2014 at 03:08:40PM +0200, Hans de Goede wrote: >> Yes, although that likely would need to go through stable, without >> going into 3.18 . >> >> Greg, is this ok with you and how do I get a patch in stable which >> is not in ups

Re: [PATCH 2/2] uas: Make uas work with blk-mq

2014-10-02 Thread Christoph Hellwig
On Thu, Oct 02, 2014 at 03:08:40PM +0200, Hans de Goede wrote: > Yes, although that likely would need to go through stable, without > going into 3.18 . > > Greg, is this ok with you and how do I get a patch in stable which > is not in upstream (because upstream will get a better fix) ? This is a

Re: [PATCH 2/2] uas: Make uas work with blk-mq

2014-10-02 Thread Hans de Goede
Hi, On 10/02/2014 03:06 PM, Christoph Hellwig wrote: > On Thu, Oct 02, 2014 at 02:35:10PM +0200, Hans de Goede wrote: >> This patch sits on top of a whole bunch of uas cleanups / fixes which >> are going into 3.18, and which are to big of a change to backport. > > Can add a patch to set disable_b

Re: [PATCH 2/2] uas: Make uas work with blk-mq

2014-10-02 Thread Christoph Hellwig
On Thu, Oct 02, 2014 at 02:35:10PM +0200, Hans de Goede wrote: > This patch sits on top of a whole bunch of uas cleanups / fixes which > are going into 3.18, and which are to big of a change to backport. Can add a patch to set disable_blk_mq for uas on 3.17 then? -- To unsubscribe from this list:

Re: [PATCH] megaraid_sas: Enable shared tag map

2014-10-02 Thread James Bottomley
On Thu, 2014-10-02 at 14:14 +0200, Hannes Reinecke wrote: > On 10/02/2014 02:05 PM, James Bottomley wrote: > > On Thu, 2014-10-02 at 08:51 +0200, Hannes Reinecke wrote: > >> On 10/01/2014 11:10 PM, Christoph Hellwig wrote: > >>> On Wed, Oct 01, 2014 at 02:51:31PM -0400, Webb Scales wrote: > Ha

[PATCH 06/29] ncr5380: Remove more useless prototypes

2014-10-02 Thread Finn Thain
Make use of the host template static initializer instead of assigning handlers at run-time. Move __maybe_unused qualifiers from declarations to definitions. Move the atari_scsi_bus_reset() wrapper after the definition of NCR5380_bus_reset(). All of the host template handler prototypes are now redun

[PATCH 19/29] mac_scsi: Add module option to Kconfig

2014-10-02 Thread Finn Thain
Allow mac_scsi to be built as a module. Replace the old validation of __setup options with code that validates both module and __setup options. Signed-off-by: Finn Thain --- drivers/scsi/Kconfig|2 drivers/scsi/mac_scsi.c | 112 +++- 2 files

[PATCH 05/29] ncr5380: Remove useless prototypes

2014-10-02 Thread Finn Thain
Add missing static qualifiers and remove the now pointless prototypes. The NCR5380_* prototypes are all declared in NCR5380.h and renamed using macros. Further declarations are redundant (some are completely unused). Remove them. Signed-off-by: Finn Thain --- drivers/scsi/atari_scsi.c |5 --

[PATCH 26/29] sun3_scsi: Move macro definitions

2014-10-02 Thread Finn Thain
The #defines in sun3_scsi.h are intended to influence subsequent #includes in sun3_scsi.c. IMHO, that's too convoluted. Move sun3_scsi.h macro definitions to sun3_scsi.c, consistent with other NCR5380 drivers. Omit the unused NCR5380_local_declare() and NCR5380_setup() macros. Signed-off-by: Fin

[PATCH 29/29] atari_NCR5380: Refactor Falcon locking

2014-10-02 Thread Finn Thain
Simplify falcon_release_lock_if_possible() by making callers responsible for disabling local IRQ's, which they must do anyway to correctly synchronize the ST DMA "lock" with core driver data structures. Move this synchronization logic to the core driver with which it is tightly coupled. Other LLD'

[PATCH 22/29] atari_scsi: Fix atari_scsi deadlocks on Falcon

2014-10-02 Thread Finn Thain
Don't disable irqs when waiting for the ST DMA lock; its release may require an interrupt. Introduce stdma_try_lock() for use in soft irq context. atari_scsi now tells the SCSI mid-layer to defer queueing a command if the ST DMA "lock" is not available, as per Michael's patch: http://marc.info/?l=

[PATCH 16/29] ncr5380: Drop legacy scsi.h include

2014-10-02 Thread Finn Thain
Convert Scsi_Cmnd to struct scsi_cmnd and drop the #include "scsi.h". The sun3_NCR5380.c core driver already uses struct scsi_cmnd so converting the other core drivers reduces the diff which makes them easier to unify. Signed-off-by: Finn Thain --- Line length issues have not been addressed her

[PATCH 28/29] atari_NCR5380: Refactor Falcon special cases

2014-10-02 Thread Finn Thain
Make the atari_NCR5380.c core driver usable by sun3_scsi, mac_scsi and others by moving some of the Falcon-specific code out of the core driver: !IS_A_TT, atari_read_overruns and falcon_dont_release. Replace these with hostdata variables and flags. FLAG_CHECK_LAST_BYTE_SENT is unused in atari_NCR5

[PATCH 17/29] dmx3191d: Use IRQ_NONE

2014-10-02 Thread Finn Thain
Testing shows that the Domex 3191D card never asserts its IRQ. Hence it is non-functional with Linux (worse, the EH bugs in the core driver are fatal but that's a problem for another patch). Perhaps the DT-536 chip needs special setup? I can't find documentation for it. The NetBSD driver uses polli

[PATCH 23/29] atari_scsi: Convert to platform device

2014-10-02 Thread Finn Thain
Convert atari_scsi to platform device and eliminate scsi_register(). Validate __setup options later on so that module options are checked as well. Remove the comment about the scsi mid-layer disabling the host irq as it is no longer true (AFAICT). Also remove the obsolete slow interrupt stuff (IR

[PATCH 09/29] ncr5380: Remove duplicate comments

2014-10-02 Thread Finn Thain
The LIMIT_TRANSFERSIZE, PSEUDO_DMA, PARITY and UNSAFE options are all documented in the core drivers where they are used. The same goes for the chip databook reference. Remove the duplicate comments. Signed-off-by: Finn Thain --- drivers/scsi/dtc.c | 17 + drivers/scsi/d

[PATCH 13/29] ncr5380: Move static PDMA spin counters to host data

2014-10-02 Thread Finn Thain
Static variables from dtc.c and pas16.c should not appear in the core NCR5380.c driver. Aside from being a layering issue this worsens the divergence between the three core driver variants (atari_NCR5380.c and sun3_NCR5380.c don't support PSEUDO_DMA) and it can mean multiple hosts share the same co

[PATCH 15/29] ncr5380: Remove *_RELEASE macros

2014-10-02 Thread Finn Thain
The *_RELEASE macros don't tell me anything. In some cases the version in the macro contradicts the version in the comments. Anyway, the Linux kernel version is sufficient information. Remove these macros to improve readability. Signed-off-by: Finn Thain --- drivers/scsi/NCR5380.c | 18

[PATCH 24/29] atari_scsi: Remove header

2014-10-02 Thread Finn Thain
The #defines in atari_scsi.h are intended to influence subsequent #includes in atari_scsi.c. IMHO, that's too convoluted. Remove atari_scsi.h by moving those macro definitions to atari_scsi.c, consistent with other NCR5380 drivers. Signed-off-by: Finn Thain --- drivers/scsi/atari_scsi.c | 35

[PATCH 21/29] mac_scsi: Convert to platform device

2014-10-02 Thread Finn Thain
Convert mac_scsi to platform device and eliminate scsi_register(). Platform resources for chip registers now follow the documentation. This should fix issues with the Mac IIci (and possibly other models too). Signed-off-by: Finn Thain --- The new hwreg_present() call is not protected by local_

[PATCH 25/29] sun3_scsi: Convert to platform device

2014-10-02 Thread Finn Thain
Convert sun3_scsi to platform device and eliminate scsi_register(). Signed-off-by: Finn Thain --- arch/m68k/sun3/config.c | 11 + drivers/scsi/sun3_scsi.c | 405 +++ drivers/scsi/sun3_scsi.h |8 3 files changed, 214 insertions(+), 210 deletio

[PATCH 27/29] ncr5380: Remove ENABLE_IRQ/DISABLE_IRQ macros

2014-10-02 Thread Finn Thain
atari_NCR5380.c enables its IRQ when it is already enabled. Sun3 doesn't use the ENABLE_IRQ/DISABLE_IRQ cruft. Remove it. Signed-off-by: Finn Thain --- drivers/scsi/atari_NCR5380.c |2 -- drivers/scsi/atari_scsi.c| 21 - drivers/scsi/sun3_NCR5380.c |2 -- driv

[PATCH 20/29] mac_scsi: Cleanup PDMA code

2014-10-02 Thread Finn Thain
Fix whitespace, remove pointless volatile qualifiers and improve code style by use of INPUT_DATA_REG and OUTPUT_DATA_REG macros. Signed-off-by: Finn Thain --- drivers/scsi/mac_scsi.c | 122 1 file changed, 62 insertions(+), 60 deletions(-) Inde

[PATCH 08/29] ncr5380: Remove redundant AUTOSENSE macro

2014-10-02 Thread Finn Thain
Every NCR5380 driver sets AUTOSENSE so it need not be optional (and the mid-layer expects it). Remove this redundant macro to improve readability. Signed-off-by: Finn Thain --- drivers/scsi/NCR5380.c | 14 +- drivers/scsi/NCR5380.h |5 - drivers/scsi/arm/cumana

[PATCH 18/29] mac_scsi: Remove header

2014-10-02 Thread Finn Thain
The #defines in mac_scsi.h are intended to influence subsequent #includes in mac_scsi.c. IMHO, that's too convoluted. Remove mac_scsi.h by moving those macro definitions to mac_scsi.c, consistent with other NCR5380 drivers. Signed-off-by: Finn Thain --- drivers/scsi/mac_scsi.c | 21 +

[PATCH 07/29] ncr5380: Cleanup TAG_NEXT and TAG_NONE macros

2014-10-02 Thread Finn Thain
Both atari_NCR5380.c and sun3_NCR5380.c core drivers #undef TAG_NONE and then redefine it. But the original definition is unused because NCR5380.c lacks support for tagged queueing. So just define it once. The TAG_NEXT macro only appears in the arguments to NCR5380_select() calls. But that routine

[PATCH 11/29] ncr5380: Remove NCR5380_STATS

2014-10-02 Thread Finn Thain
The NCR5380_STATS option is only enabled by g_NCR5380 yet it adds clutter to all three core drivers. The atari_NCR5380.c and sun3_NCR5380.c core drivers have a slightly different implementation of the NCR5380_STATS option. Out of all ten NCR5380 drivers, only one of them (g_NCR5380) actually has t

[PATCH 12/29] ncr5380: Cleanup host info() methods

2014-10-02 Thread Finn Thain
If the host->info() method is not set, then host->name is used by default. For atari_scsi, that is exactly the same text. So remove the redundant info() method. Keep sun3_scsi.c in line with atari_scsi. Some NCR5380 drivers return an empty string from the info() method (arm/cumana_1.c arm/oak.c ma

[PATCH 14/29] ncr5380: Remove pointless compiler command line override macros

2014-10-02 Thread Finn Thain
Compile-time override of scsi host defaults is pointless for drivers that provide module parameters and __setup options for that. Too many macros make the code hard to read so remove them. Signed-off-by: Finn Thain --- drivers/scsi/atari_scsi.c |2 +- drivers/scsi/atari_scsi.h |3 --- d

[PATCH 10/29] ncr5380: Fix SCSI_IRQ_NONE bugs

2014-10-02 Thread Finn Thain
Oak scsi doesn't use any IRQ, but it sets irq = IRQ_NONE rather than SCSI_IRQ_NONE. Problem is, the core NCR5380 driver expects SCSI_IRQ_NONE if it is to issue IDENTIFY commands that prevent target disconnection. Other drivers, when they can't get an IRQ or can't use one, will set host->irq = SCSI

[PATCH 02/29] ncr5380: Remove unused hostdata fields

2014-10-02 Thread Finn Thain
Remove unused fields from hostdata structs declared with the NCR5380_implementation_fields macro. Signed-off-by: Finn Thain --- drivers/scsi/dmx3191d.c |4 ++-- drivers/scsi/mac_scsi.c | 33 - drivers/scsi/mac_scsi.h |3 +-- drivers/scsi/sun3_scsi.c

[PATCH 04/29] ncr5380: Remove unused macros

2014-10-02 Thread Finn Thain
Some macros are never evaluated (i.e. FOO, USLEEP, SCSI2 and USE_WRAPPER; and in some drivers, NCR5380_intr and NCR5380_proc_info). DRIVER_SETUP serves no purpose anymore. Remove these macro definitions. Signed-off-by: Finn Thain --- drivers/scsi/NCR5380.c|2 +- drivers/scsi/arm/oak.c

[PATCH 03/29] ncr5380: Fix compiler warnings and __setup options

2014-10-02 Thread Finn Thain
Some __setup() options mentioned in Documentation/scsi don't work because a few lines of code went missing sometime since Linux 2.4. Fix the options and thus fix some compiler warnings for both the non-modular case, CC drivers/scsi/dtc.o drivers/scsi/dtc.c:176:20: warning: 'dtc_setup' def

[PATCH 01/29] ncr5380: Use printk() not pr_debug()

2014-10-02 Thread Finn Thain
Having defined NDEBUG, and having set the console log level, I'd like to see some output. Don't use pr_debug(), it's annoying to have to define DEBUG as well. Signed-off-by: Finn Thain --- Use of pr_debug() here was a bad idea of mine. Joe was right when he questioned it. --- drivers/scsi/NCR

[PATCH 00/29] Fixes, cleanups and modernization for NCR5380 drivers

2014-10-02 Thread Finn Thain
This patch series has fixes for bugs and compiler warnings as well as code cleanup and modernization. It covers all ten NCR5380 drivers and the three core NCR5380 drivers so it's fairly large. At the end of this series about a thousand lines (net) have been removed including two header files. A l

Re: [PATCH 2/2] uas: Make uas work with blk-mq

2014-10-02 Thread Hans de Goede
Hi, On 10/02/2014 01:26 PM, Christoph Hellwig wrote: > Looks fine to me (and actually removes code..) > > Reviewed-by: Christoph Hellwig > > It's fairly late in 3.17 to get something like this in, but would you > consider Ccing it to stable so we can get it into the first 3.17 stable > release?

Re: [PATCH] megaraid_sas: Enable shared tag map

2014-10-02 Thread Hannes Reinecke
On 10/02/2014 02:05 PM, James Bottomley wrote: > On Thu, 2014-10-02 at 08:51 +0200, Hannes Reinecke wrote: >> On 10/01/2014 11:10 PM, Christoph Hellwig wrote: >>> On Wed, Oct 01, 2014 at 02:51:31PM -0400, Webb Scales wrote: Hannes, In megasas_change_queue_type(), is it possible for s

Re: [PATCH] megaraid_sas: Enable shared tag map

2014-10-02 Thread James Bottomley
On Thu, 2014-10-02 at 08:51 +0200, Hannes Reinecke wrote: > On 10/01/2014 11:10 PM, Christoph Hellwig wrote: > > On Wed, Oct 01, 2014 at 02:51:31PM -0400, Webb Scales wrote: > >> Hannes, > >> > >> In megasas_change_queue_type(), is it possible for sdev->queue_depth to be > >> greater than 256? > >>

Re: [PATCH] megaraid_sas: Enable shared tag map

2014-10-02 Thread Hannes Reinecke
On 10/02/2014 01:36 PM, Christoph Hellwig wrote: > On Thu, Oct 02, 2014 at 11:50:42AM +0200, Hannes Reinecke wrote: >> NCR5380 (and derived LLDDs) and fnic. > > fnic needs a tag for a device reset, which we don't provide if it > is issue by ioctl. This is also showed up during the blk-mq work. >

Re: [PATCH 5/5] scsi: Remove scmd->tag

2014-10-02 Thread Finn Thain
On Thu, 2 Oct 2014, Hannes Reinecke wrote: > struct scsi_cmnd has a 'tag' field, which was supposed to be > used to support SCSI-II tagged command queueing. > In the end tagged command queueing support moved into the > block layer, with the tag number available in the request. > So the 'tag' fiel

Re: [PATCH] megaraid_sas: Enable shared tag map

2014-10-02 Thread Christoph Hellwig
On Thu, Oct 02, 2014 at 11:50:42AM +0200, Hannes Reinecke wrote: > NCR5380 (and derived LLDDs) and fnic. fnic needs a tag for a device reset, which we don't provide if it is issue by ioctl. This is also showed up during the blk-mq work. -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH 5/5] scsi: Remove scmd->tag

2014-10-02 Thread Hannes Reinecke
On 10/02/2014 01:22 PM, Christoph Hellwig wrote: >> diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c >> index a0c8c5d..cb68089 100644 >> --- a/drivers/scsi/NCR5380.c >> +++ b/drivers/scsi/NCR5380.c >> @@ -1527,7 +1527,6 @@ part2: >> tmp[0] = IDENTIFY(((instance->irq == SCSI_IRQ_NON

Re: [PATCH 2/2] uas: Make uas work with blk-mq

2014-10-02 Thread Christoph Hellwig
Looks fine to me (and actually removes code..) Reviewed-by: Christoph Hellwig It's fairly late in 3.17 to get something like this in, but would you consider Ccing it to stable so we can get it into the first 3.17 stable release? -- To unsubscribe from this list: send the line "unsubscribe linux-

Re: [PATCH 1/2] uas: Reduce number of function arguments for uas_alloc_foo functions

2014-10-02 Thread Christoph Hellwig
On Thu, Oct 02, 2014 at 12:04:39PM +0200, Hans de Goede wrote: > The stream_id and pipe are already present in uas_cmd_info resp uas_dev_info, > so there is no need to pass a copy along. > > Signed-off-by: Hans de Goede Looks good, Reviewed-by: Christoph Hellwig -- To unsubscribe from this lis

Re: [PATCH 5/5] scsi: Remove scmd->tag

2014-10-02 Thread Christoph Hellwig
> diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c > index a0c8c5d..cb68089 100644 > --- a/drivers/scsi/NCR5380.c > +++ b/drivers/scsi/NCR5380.c > @@ -1527,7 +1527,6 @@ part2: > tmp[0] = IDENTIFY(((instance->irq == SCSI_IRQ_NONE) ? 0 : 1), > cmd->device->lun); > > len = 1

Re: [RFC PATCH 0/5] Remove scmd->tag

2014-10-02 Thread Christoph Hellwig
This seems to miss a places, that mostly just seem to use scmd->tag where they should be using scmd->request->tag: - acornscsi.c (and arm/queue.c) - fas216 - qla1280 As well as virtio_scsi, which does a pointless assignment to scmd->tag. It might be worth to push this out to somewhere where t

Re: [PATCH 1/5] NCR5380: Whitespace cleanup

2014-10-02 Thread Hannes Reinecke
On 10/02/2014 01:07 PM, Finn Thain wrote: > > On Thu, 2 Oct 2014, Hannes Reinecke wrote: > >> Signed-off-by: Hannes Reinecke >> --- >> drivers/scsi/NCR5380.c | 652 >> + >> 1 file changed, 333 insertions(+), 319 deletions(-) >> > > This is going

Re: [PATCH 1/5] NCR5380: Whitespace cleanup

2014-10-02 Thread Finn Thain
On Thu, 2 Oct 2014, Hannes Reinecke wrote: > Signed-off-by: Hannes Reinecke > --- > drivers/scsi/NCR5380.c | 652 > + > 1 file changed, 333 insertions(+), 319 deletions(-) > This is going to break about 30 or 40 patches that I'm working on. Can

PR registration on LIO iscsi returns sense key not ready

2014-10-02 Thread Luigi Tarenga
hello everybody, I have a little problem with LIO iscsi target and SPC-3 persistent reservation. The summary of my setup is: host: centos 6.5 x86_64 with custom kernel 3.16.3 + scst patches targetcli (-fb) 2.1.fb37 this host is configured to export a lun0 to the guest via iscsi guest: c

[PATCH 5/5] scsi: Remove scmd->tag

2014-10-02 Thread Hannes Reinecke
struct scsi_cmnd has a 'tag' field, which was supposed to be used to support SCSI-II tagged command queueing. In the end tagged command queueing support moved into the block layer, with the tag number available in the request. So the 'tag' field lost its original meaning and can be removed. Signed

[PATCH 3/5] vmw_pvscsi: fixup tagging

2014-10-02 Thread Hannes Reinecke
The request (and SCSI command) tag is the tag number assigned by the generic block-tagging code, not the SCSI-II tag messages. Those are represented by the device flags 'tagged_supported', 'simple_tags', and 'ordered_tags'. (The SCSI midlayer doesn't use HEAD_OF_QUEUE tags). So fixup vmw_pvscsi to

[PATCH 4/5] tcm_loop: Fixup tag handling

2014-10-02 Thread Hannes Reinecke
The SCSI command tag is set to the tag assigned from the block layer, not the SCSI-II tag message. So we need to convert it into the correct SCSI-II tag message based on the device flags, not the tag value itself. Reviewed-by: Sagi Grimberg Signed-off-by: Hannes Reinecke --- drivers/target/loop

[PATCH 1/5] NCR5380: Whitespace cleanup

2014-10-02 Thread Hannes Reinecke
Signed-off-by: Hannes Reinecke --- drivers/scsi/NCR5380.c | 652 + 1 file changed, 333 insertions(+), 319 deletions(-) diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c index 45da3c8..c8aa935 100644 --- a/drivers/scsi/NCR5380.c +++ b/dri

[PATCH 2/5] scsi: Remove references to linked commands

2014-10-02 Thread Hannes Reinecke
Some NCR5380-based drivers implement support for linked commands via a 'next_link' pointer in struct scsi_cmnd. This pointer has long since removed, rendering the code pointless. So remove it. Signed-off-by: Hannes Reinecke --- drivers/scsi/NCR5380.c | 40 --- d

[RFC PATCH 0/5] Remove scmd->tag

2014-10-02 Thread Hannes Reinecke
The 'tag' field of struct scsi_cmnd has not separate meaning anymore, and the same information is present in the associated request. So remove it. Hannes Reinecke (5): NCR5380: Whitespace cleanup scsi: Remove references to linked commands vmw_pvscsi: fixup tagging tcm_loop: Fixup tag handl

Re: [PATCH 5/8] IB/srp: Remove stale connection retry mechanism

2014-10-02 Thread Bart Van Assche
On 09/20/14 19:45, Or Gerlitz wrote: On Fri, Sep 19, 2014 at 3:58 PM, Bart Van Assche wrote: Attempting to connect three times may be insufficient after an initiator system that was using multiple RDMA channels tries to relogin. Additionally, this login retry mechanism is a workaround for parti

[PATCH 2/2] uas: Make uas work with blk-mq

2014-10-02 Thread Hans de Goede
With uas over usb-3 the tags inside the uas iu-s must match the usb-3 stream ids, and those go from 1 - qdepth. Before blk-mq calling scsi_activate_tcq(sdev, qdepth) guaranteed that we would only get cmnd->request->tag from 0 - (qdepth - 1), and we used those as uas-tags / stream-ids. With blk-mq

[PATCH 1/2] uas: Reduce number of function arguments for uas_alloc_foo functions

2014-10-02 Thread Hans de Goede
The stream_id and pipe are already present in uas_cmd_info resp uas_dev_info, so there is no need to pass a copy along. Signed-off-by: Hans de Goede --- drivers/usb/storage/uas.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/drivers/usb/stora

Re: [PATCH] megaraid_sas: Enable shared tag map

2014-10-02 Thread Hannes Reinecke
On 10/02/2014 11:19 AM, Christoph Hellwig wrote: > On Thu, Oct 02, 2014 at 08:51:20AM +0200, Hannes Reinecke wrote: >> >> I'm afraid it's not _that_ easy. >> SCSI-II tagged queueing has some specific tag values: >> >> #define SIMPLE_QUEUE_TAG0x20 >> #define HEAD_OF_QUEUE_TAG 0x21 >> #define O

Re: [PATCH] megaraid_sas: Enable shared tag map

2014-10-02 Thread Christoph Hellwig
On Thu, Oct 02, 2014 at 08:51:20AM +0200, Hannes Reinecke wrote: > > I'm afraid it's not _that_ easy. > SCSI-II tagged queueing has some specific tag values: > > #define SIMPLE_QUEUE_TAG0x20 > #define HEAD_OF_QUEUE_TAG 0x21 > #define ORDERED_QUEUE_TAG 0x22 These are not tag values. Thes

  1   2   >