From: Hannes Reinecke
Hi all,
here's a small patchset to suppress errors from scsi_dh_attach() for
unsupported devices.
As usual, comments and reviews are welcome.
Hannes Reinecke (2):
scsi_dh: Return SCSI_DH_XX error code from ->attach()
scsi_dh: suppress errors from unsupported devices
Rather than having each device handler implementing their own
error mapping have the ->attach() call return a SCSI_DH_XXX
error code and implement the mapping in scsi_dh_handler_attach().
Suggested-by: Christoph Hellwig
Signed-off-by: Hannes Reinecke
---
drivers/scsi/device_handler/scsi_dh_alua
Device handlers are optional, and for some handlers like ALUA only
implemented for certain device types.
So suppress any errors for unsupported devices.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/scsi_dh.c| 19 +--
drivers/scsi/scsi_priv.h | 4 ++--
drivers/scsi/scsi_s
Applied, thanks.
--
Johannes Thumshirn Storage
jthumsh...@suse.de+49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = E
Signed-off-by: Zang Leigang
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 794a4600e952..2984f33095be 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -385,6 +385,8 @@ void ufshcd_print_trs(struct ufs_hba *hba, unsigned long
bitmap, bool pr_prdt
On Mon, Sep 18, 2017 at 09:13:30AM -0700, Christoph Hellwig wrote:
> Looks ok,
>
> although I really wish we could come up with some common FC code,
> including making the existing FC drivers use more infrastructure
> from libfc..
the problem with libfc currently is it is made for fcoe, despite b
Looks good,
Reviewed-by: Johannes Thumshirn
--
Johannes Thumshirn Storage
jthumsh...@suse.de+49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG N
Reviewed-by: Johannes Thumshirn
--
Johannes Thumshirn Storage
jthumsh...@suse.de+49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Ke
Reviewed-by: Johannes Thumshirn
--
Johannes Thumshirn Storage
jthumsh...@suse.de+49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Ke
On Tue, Sep 19, 2017 at 10:32 PM, Christoph Hellwig wrote:
> On Wed, Sep 06, 2017 at 07:38:10PM +0200, Ilya Dryomov wrote:
>> sd_config_write_same() ignores ->max_ws_blocks == 0 and resets it to
>> permit trying WRITE SAME on older SCSI devices, unless ->no_write_same
>> is set. This means blkdev
On Wed, 20 Sep 2017, 2:58am, Hannes Reinecke wrote:
> From: Hannes Reinecke
>
> When an rport is found in the bindings array there is no guarantee that
> it had been a target port, so we need to call fc_remote_port_rolechg()
> here to ensure the scsi_target_id is set correctly.
> Otherwise the
From: Colin Ian King
Don't pass a null lport to FC_LPORT_DBG as this causes a null pointer
dereference when accessing lport->host and lport->port_id. Instead
use the FC_CHECK_LOGGING macro to print the kernel message via pr_info.
Detected by CoverityScan, CID#113198 ("Dereference after null chec
On Tue, Sep 19, 2017 at 11:11:11PM -0400, Meng Xu wrote:
> Since right after the user copy, we are going to
> memset(&karg, 0, sizeof(karg)), I guess an access_ok check is enough?
The right thing is to remove it entirely.
Since right after the user copy, we are going to
memset(&karg, 0, sizeof(karg)), the copy_from_user is redundant
Signed-off-by: Meng Xu
---
drivers/scsi/mpt3sas/mpt3sas_ctl.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c
b/drivers/scsi/mpt3sas/mpt3s
Hi Viswas,
[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on v4.14-rc1 next-20170920]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system]
url:
https://github.com/0day-ci/linux/commits/Viswas-G/pm80xx-updates/20170920
Looks good,
Reviewed-by: Christoph Hellwig
Hi Viswas,
[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on v4.14-rc1 next-20170920]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system]
url:
https://github.com/0day-ci/linux/commits/Viswas-G/pm80xx-updates/20170920
On Wed, Sep 20, 2017 at 12:30:41PM +0200, Johannes Thumshirn wrote:
> the problem with libfc currently is it is made for fcoe, despite being named
> libfc.
Well, that's my point - we should be able to use more bits in a common
FC layer. I don't really care about the exact name.
> The other hand
From: David Windsor
SCSI sense buffers, stored in struct scsi_cmnd.sense and therefore
contained in the scsi_sense_cache slab cache, need to be copied to/from
userspace.
cache object allocation:
drivers/scsi/scsi_lib.c:
scsi_select_sense_cache(...):
return ... ? scsi_sens
This removes an open coded simple_open() function and replaces file operations
references to the function with simple_open() instead.
Found by coccinelle spatch "api/simple_open.cocci"
Signed-off-by: Thomas Meyer
---
diff -u -p a/drivers/scsi/fnic/fnic_debugfs.c b/drivers/scsi/fnic/fnic_debugfs.
This standardizes the callback and data prototypes in several places that
perform casting, in an effort to remove more open-coded .data and
.function uses in favor of setup_timer().
Cc: Samuel Ortiz
Cc: Tyrel Datwyler
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Michael Ellerman
Cc: "Jam
stat_timer only ever assigns the same function and data, so consolidate to
a setup_timer() call and drop everything else used to pass things around.
reset_timer is unused; remove it.
Cc: Hannes Reinecke
Cc: "James E.J. Bottomley"
Cc: "Martin K. Petersen"
Cc: linux-scsi@vger.kernel.org
Signed-o
There was a seemingly missing call to setup_timer() in one handler,
so add setup_timer() here to remove the open-coded initialization.
Cc: qlogic-storage-upstr...@qlogic.com
Cc: "James E.J. Bottomley"
Cc: "Martin K. Petersen"
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Kees Cook
---
drivers/
On Tue, Sep 19, 2017 at 11:11:11PM -0400, Meng Xu wrote:
> Since right after the user copy, we are going to
> memset(&karg, 0, sizeof(karg)), I guess an access_ok check is enough?
access_ok() is *NOT* "will copy_from_user() succeed?" Not even close.
On a bunch of architectures (sparc64, for one)
> On Sep 20, 2017, at 11:26 PM, Al Viro wrote:
>
> On Tue, Sep 19, 2017 at 11:11:11PM -0400, Meng Xu wrote:
>> Since right after the user copy, we are going to
>> memset(&karg, 0, sizeof(karg)), I guess an access_ok check is enough?
>
> access_ok() is *NOT* "will copy_from_user() succeed?" Not
Hi, Christoph,
I have changed dma_get_cache_alignment's return value, and I don't know whether
those drivers want to return ARCH_DMA_MINALIGN unconditionally. So I pass a
NULL for those drivers, in order to keep their old behavior.
Huacai
-- Original --
From:
On Wed, Sep 20, 2017 at 10:50:18AM -0700, Christoph Hellwig wrote:
> On Wed, Sep 20, 2017 at 12:30:41PM +0200, Johannes Thumshirn wrote:
> > the problem with libfc currently is it is made for fcoe, despite being named
> > libfc.
>
> Well, that's my point - we should be able to use more bits in a c
Use *_pool_zalloc rather than *_pool_alloc followed by memset with 0.
Found by coccinelle spatch "api/alloc/pool_zalloc-simple.cocci"
Signed-off-by: Thomas Meyer
---
diff -u -p a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c
--- a/drivers/scsi/qla2xxx/qla_bsg.c
+++ b/drivers/sc
Use *_pool_zalloc rather than *_pool_alloc followed by memset with 0.
Found by coccinelle spatch "api/alloc/pool_zalloc-simple.cocci"
Signed-off-by: Thomas Meyer
---
diff -u -p a/drivers/scsi/qla4xxx/ql4_mbx.c b/drivers/scsi/qla4xxx/ql4_mbx.c
--- a/drivers/scsi/qla4xxx/ql4_mbx.c
+++ b/drivers/sc
Use *_pool_zalloc rather than *_pool_alloc followed by memset with 0.
Found by coccinelle spatch "api/alloc/pool_zalloc-simple.cocci"
Signed-off-by: Thomas Meyer
---
diff -u -p a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c
--- a/drivers/scsi/mvsas/mv_sas.c
+++ b/drivers/scsi/mvsas/
Use *_pool_zalloc rather than *_pool_alloc followed by memset with 0.
Found by coccinelle spatch "api/alloc/pool_zalloc-simple.cocci"
Signed-off-by: Thomas Meyer
---
diff -u -p a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
--- a/drivers/scsi/lpfc/lpfc_nvme.c
+++ b/drivers/scsi/
31 matches
Mail list logo