[GIT PULL] SCSI fixes for 3.18-rc6

2014-11-28 Thread James Bottomley
This is a set of ten fixes: 8 for UFS including four static checker warnings, a potential null deref in the voltage regulator code, a race on module unload, a ref counting fix on the well known LUNs which made it impossible to remove the ufs module and fix to correct the information in pwr_info. I

Re: [PATCH] tcm_loop: Wrong I_T nexus association

2014-11-28 Thread Nicholas A. Bellinger
On Wed, 2014-11-26 at 14:58 +0100, Hannes Reinecke wrote: > tcm_loop has the I_T nexus associated with the HBA. This causes > commands to become misdirected if the HBA has more than one > target portal group; any command is then being sent to the > first target portal group instead of the correct o

[PATCH 2/7] scsi/g_NCR5380: Remove obfuscating macros

2014-11-28 Thread Rasmus Villemoes
The macros PRINTP/ANDP make the code harder to read and depend on a specific identifier name in the surrounding scope. Nuke them. Signed-off-by: Rasmus Villemoes --- drivers/scsi/g_NCR5380.c | 66 ++-- 1 file changed, 30 insertions(+), 36 deletions(-)

[PATCH 3/7] scsi/advansys: Replace seq_printf with seq_puts

2014-11-28 Thread Rasmus Villemoes
Using seq_printf to print a simple string is a lot more expensive than it needs to be, since seq_puts exists. Replace seq_printf with seq_puts when possible. Signed-off-by: Rasmus Villemoes --- drivers/scsi/advansys.c | 157 1 file changed, 77 ins

[PATCH 4/7] scsi/aha152x: Replace seq_printf with seq_puts

2014-11-28 Thread Rasmus Villemoes
Using seq_printf to print a simple string is a lot more expensive than it needs to be, since seq_puts exists. Replace seq_printf with seq_puts when possible. Signed-off-by: Rasmus Villemoes --- drivers/scsi/aha152x.c | 252 - 1 file changed, 126 in

[PATCH 5/7] scsi: misc: Replace seq_printf with seq_puts

2014-11-28 Thread Rasmus Villemoes
Using seq_printf to print a simple string is a lot more expensive than it needs to be, since seq_puts exists. Replace seq_printf with seq_puts when possible. Signed-off-by: Rasmus Villemoes --- drivers/scsi/BusLogic.c | 10 +- drivers/scsi/NCR5380.c | 6 +++---

[PATCH 6/7] scsi: misc: Merge consecutive seq_puts calls

2014-11-28 Thread Rasmus Villemoes
Consecutive seq_puts calls with literal strings may be replaced by a single call, saving a little .text. Signed-off-by: Rasmus Villemoes --- drivers/scsi/advansys.c | 40 ++-- drivers/scsi/atp870u.c | 5 ++--- drivers/scsi/dc395x.c| 4 ++--

[PATCH 7/7] scsi: misc: Print single-character strings with seq_putc

2014-11-28 Thread Rasmus Villemoes
Using seq_putc to print a single character saves at least a strlen() call and a memory access, and may also give a small .text reduction. Signed-off-by: Rasmus Villemoes --- drivers/scsi/NCR5380.c | 2 +- drivers/scsi/advansys.c | 34 +-

[PATCH 1/7] scsi: Remove SPRINTF macro

2014-11-28 Thread Rasmus Villemoes
The macro SPRINTF doesn't save a lot of typing or make the code more readable, and depending on a specific identifier (m) in the surrounding scope is generally frowned upon. Nuke it. Signed-off-by: Rasmus Villemoes --- drivers/scsi/NCR5380.c | 42 +++--- drivers/scsi/aha152x.c | 301

[PATCH 0/7] scsi: Some seq_file cleanups/optimizations

2014-11-28 Thread Rasmus Villemoes
These patches mostly replace seq_printf with simpler and faster equivalents, e.g. seq_printf(m, "something") => seq_puts(m, "something") and seq_printf(m, "\n") => seq_putc(m, '\n). But before my Coccinelle scripts could be unleashed I had to clean up some unnecessary, and in the PRINTP case quite

Re: [PATCH] scsi_debug: improve driver description in Kconfig

2014-11-28 Thread Douglas Gilbert
On 14-11-28 04:05 PM, Randy Dunlap wrote: On 11/26/14 11:55, Douglas Gilbert wrote: From: Douglas Gilbert Date: Wed, 26 Nov 2014 14:41:55 -0500 Subject: [PATCH] scsi_debug improve driver description in Kconfig Try to give a more accurate driver description and some extra useful information in

Re: [PATCH] scsi_debug: improve driver description in Kconfig

2014-11-28 Thread Randy Dunlap
On 11/26/14 11:55, Douglas Gilbert wrote: > From: Douglas Gilbert > Date: Wed, 26 Nov 2014 14:41:55 -0500 > Subject: [PATCH] scsi_debug improve driver description in Kconfig > > Try to give a more accurate driver description and some extra > useful information in less lines. > --- > drivers/scsi

Re: [PATCH 1/4] scsi: remove ->change_queue_type method

2014-11-28 Thread Bart Van Assche
On 11/24/14 15:36, Christoph Hellwig wrote: Since we got rid of ordered tag support in 2010 the prime use case of switching on and off ordered tags has been obsolete. The other function of enabling/dsiabling tagging entirely has only been correctly implemented by the 53c700 driver and isn't gene

Re: [PATCH 5/4] scsi: remove MSG_*_TAG defines

2014-11-28 Thread Bart Van Assche
On 11/24/14 16:07, Christoph Hellwig wrote: index 6719a33..2c5ce48 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c @@ -7921,9 +7921,9 @@ static int asc_build_req(struct asc_board *boardp, struct scsi_cmnd *scp, */ if ((asc_dvc->cur_dvc_qng[scp->device->id] > 0

Re: [PATCH 1.1 1/1] arcmsr: Notify has sense data report

2014-11-28 Thread 黃清隆
ibute; >> #define ARCMSR_MAX_FREECCB_NUM 320 >> #define ARCMSR_MAX_OUTSTANDING_CMD 255 >> #endif >> -#define ARCMSR_DRIVER_VERSION"v1.30.00.04-20140919" >> +#define ARCMSR_DRIVER_VERSION

Re: [PATCH 3/4] scsi: remove scsi_get_tag_type

2014-11-28 Thread Bart Van Assche
On 11/24/14 15:36, Christoph Hellwig wrote: Both remaining users are better of just checking sdev->simple_tags directly. Reviewed-by: Bart Van Assche -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo i

Re: [PATCH 4/4] scsi: remove scsi_set_tag_type

2014-11-28 Thread Bart Van Assche
On 11/24/14 15:36, Christoph Hellwig wrote: There is no benefit over just setting sdev->simple_tags directly. Reviewed-by: Bart Van Assche -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at htt

Re: [PATCH 2/4] scsi: never drop to untagged mode during queue ramp down

2014-11-28 Thread Bart Van Assche
On 11/24/14 15:36, Christoph Hellwig wrote: Dropping to untagged mode when ramping down a queue due to QUEUE FULL events has two problems: - nothing in the midlayer or drivers ever moves back to tagged mode during queue ramp up. - cmd_per_lun isn't the untagged queue depth for many moder

Re: [PATCH 1.1 1/1] arcmsr: Notify has sense data report

2014-11-28 Thread Hannes Reinecke
/arcmsr.h2014-11-28 10:54:30.0 +0800 > @@ -52,7 +52,7 @@ struct device_attribute; > #define ARCMSR_MAX_FREECCB_NUM 320 > #define ARCMSR_MAX_OUTSTANDING_CMD 255 > #endif > -#define ARCMSR_DRIVER_VERSION"v1.30.00.04-20140919" > +#define AR

[PATCH 1.1 1/1] arcmsr: Notify has sense data report

2014-11-28 Thread Ching Huang
MAX_FREECCB_NUM 320 #define ARCMSR_MAX_OUTSTANDING_CMD 255 #endif -#define ARCMSR_DRIVER_VERSION "v1.30.00.04-20140919" +#define ARCMSR_DRIVER_VERSION "v1.30.00.05-20141128" #define ARCMSR_SCSI_INITIATOR_ID

Re: [PATCH 1/1] arcmsr: Notify has sense data report

2014-11-28 Thread Ching Huang
Thanks to Dan's advice and Hannes' suggestion. I will revise and resubmit it later. On Fri, 2014-11-28 at 12:17 +0300, Dan Carpenter wrote: > On Fri, Nov 28, 2014 at 12:20:44PM +0800, Ching Huang wrote: > > This patch is relative to > > http://git.infradead.org/users/hch/scsi-queue.git/tree/refs/

[PATCH 06/16] target: Move dev_stat_cit to struct se_subsystem_api

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds support for dev_stat_cit as an external config_item_type using TB_CIT_SETUP() helper macro, and sets only ct_group_ops following existing code. It updates target_core_make_subdev() + target_core_setup_dev_attrib_cit() + struct target_backend_cits, and dro

[PATCH 09/16] target: Add DEF_TB_DEFAULT_ATTRIBS macro for virtual device attrs

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This helper macro adds the default set of 30 device attributes for virtual devices from existing target_core_configfs.c code, and moves the definitions into a single macro to create the structs necessary for backend drivers. It allows them to populate their own external

[PATCH 08/16] target: Add EXPORT_SYMBOL for existing se_dev_set_*

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Now that target_core_backend_configfs.h macros will be using these se_dev_set attribute functions externally to allow backend drivers to populate different attributes, go ahead and add EXPORT_SYMBOL() for the existing default set of 30 device attributes. Also update targ

[PATCH 07/16] target: Add target_core_backend_configfs.h helper macros

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds a number of configfs e-attr macros following what existing target_core_configfs.c code does for internal target_backend_dev_attrib setup, and similar to how target fabric drivers allow for external config_item_type + cit->ct_attrs. assignment. This is use

[PATCH 13/16] target/user: Convert to external tcmu_backend_dev_attrs

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch converts TCM-USER to use an external set of device attributes, and utilizes target_core_backend_configfs.h macros to generate a default set of configfs extended-attr handlers. It calls target_core_setup_sub_cits() to setup the initial config_item_type based on

[PATCH 02/16] target: Move dev_attrib_cit to struct se_subsystem_api

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds support for dev_attrib_cit as an external config_item_type using TB_CIT_SETUP() helper macro, and sets both ct_item_ops + ct_attr following existing code. It updates target_core_make_subdev() + target_core_setup_dev_attrib_cit() + struct target_backend_ci

[PATCH 04/16] target: Move dev_wwn_cit to struct se_subsystem_api

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds support for dev_wwn_cit as an external config_item_type using TB_CIT_SETUP() helper macro, and sets both ct_item_ops + ct_attr following existing code. It updates target_core_make_subdev() + target_core_setup_dev_attrib_cit() + struct target_backend_cits,

[PATCH 03/16] target: Move dev_pr_cit to struct se_subsystem_api

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds support for dev_pr_cit as an external config_item_type using TB_CIT_SETUP() helper macro, and sets both ct_item_ops + ct_attr following existing code. It updates target_core_make_subdev() + target_core_setup_dev_attrib_cit() + struct target_backend_cits,

[PATCH 05/16] target: Move dev_alua_tg_pt_gps_cit to struct se_subsystem_api

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds support for dev_alua_tg_pt_gps_cit as an external config_item_type using TB_CIT_SETUP() helper macro, and sets only ct_group_ops following existing code. It updates target_core_make_subdev() + target_core_setup_dev_attrib_cit() + struct target_backend_ci

[PATCH 12/16] target/rd: Convert to external rd_mcp_backend_dev_attrs

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch converts RAMDISK to use an external set of device attributes, and utilizes target_core_backend_configfs.h macros to generate a default set of configfs extended-attr handlers. It calls target_core_setup_sub_cits() to setup the initial config_item_type based on

[PATCH 10/16] target/iblock: Convert to external iblock_backend_dev_attrs

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch converts IBLOCK to use an external set of device attributes, and utilizes target_core_backend_configfs.h macros to generate a default set of configfs extended-attr handlers. It calls target_core_setup_sub_cits() to setup the initial config_item_type based on e

[PATCH 00/16] target: Use external CITs for backend devices

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi all, This series addresses a long standing limitation going back to early LIO v3.x days, where all TCM backend devices originally used local scope struct config_item_types in target_core_configfs.c code that resulted in same /sys/kernel/config/target/core/$HBA/$DEV/at

[PATCH 15/16] target: Drop left-over internal dev attribute code

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Now that backend drivers are populating their own device attributes, go ahead and remove left-over definitions + internal attribute list of device attributes from target_core_configfs.c code Also update TB_CIT_SETUP(dev_attrib,...) to signal ct_attr = NULL. Signed-off-b

[PATCH 11/16] target/file: Convert to external fileio_backend_dev_attrs

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch converts FILEIO to use an external set of device attributes, and utilizes target_core_backend_configfs.h macros to generate a default set of configfs extended-attr handlers. It calls target_core_setup_sub_cits() to setup the initial config_item_type based on e

[PATCH 01/16] target: Move dev_cit to struct se_subsystem_api

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds initial support for dev_cit as external config_item_type. This includes a new struct target_backend_cits to hold the external CITs within struct se_subsystem_api, and target_core_setup_sub_cits() to be used by backend drivers ahead of transport_subsystem_

[PATCH 16/16] target: Drop left-over PHBA_PDEV set attr checks

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Now that PSCSI is only exposing four hw_* read-only device attributes, go ahead and drop the left-over -> legacy PHBA_PDEV checks in various se_dev_set_* code, since it's now only used by virtual devices. Signed-off-by: Nicholas Bellinger --- drivers/target/target_core

[PATCH 14/16] target/pscsi: Convert to external pscsi_backend_dev_attrs

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch converts PSCSI to use an external set of device attributes, and utilizes target_core_backend_configfs.h macros to generate a default set of configfs extended-attr handlers. It calls target_core_setup_sub_cits() to setup the initial config_item_type based on ex

Re: [PATCH 1/1] arcmsr: Notify has sense data report

2014-11-28 Thread Dan Carpenter
On Fri, Nov 28, 2014 at 12:20:44PM +0800, Ching Huang wrote: > This patch is relative to > http://git.infradead.org/users/hch/scsi-queue.git/tree/refs/heads/drivers-for-3.18:/drivers/scsi/arcmsr > Put this information after the --- cut off line so that it is not saved in the permanent git log.

Re: [PATCH 1/1] arcmsr: Notify has sense data report

2014-11-28 Thread Hannes Reinecke
2014-11-28 10:54:30.0 +0800 > @@ -52,7 +52,7 @@ struct device_attribute; > #define ARCMSR_MAX_FREECCB_NUM 320 > #define ARCMSR_MAX_OUTSTANDING_CMD 255 > #endif > -#define ARCMSR_DRIVER_VERSION"v1.30.00.04-20140919" > +#define ARCMS