Re: [PATCH] tcmu: remove useless code and clean up the code style.
On 2018/6/8 9:35, Martin K. Petersen wrote: Xiubo, Since the TCMU_RING_SIZE macro is not using here will discard it and at the same time clean up the code style. Applied to 4.19/scsi-queue. Thanks! Thanks very much. BRs
Re: [PATCH] ipr: Format HCAM overlay ID 0x41
Wen, > This patch adds formatting error overlay 0x41 to improve debug > capabilities. Applied to 4.19/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering
Re: [PATCH 0/5] megaraid_sas: Driver updates
Shivasharan, >> megaraid_sas: Return immediately from wait_for_adapter_operational >> after kill adapter The comment I made to Chaitra about long patch header lines also applies in this case. Please keep the line length to about 70 chars in the header and 75 in the rest of the patch description. Thanks! -- Martin K. Petersen Oracle Linux Engineering
Re: [PATCH 0/6] mpt3sas: Enhancements and Defect fixes.
Chaitra, > Chaitra P B (6): > mpt3sas: Don't abort I/Os issued to NVMe drives while processing > Async Broadcast primitive event. > mpt3sas: Incorrect command status was set/marked as not used. > mpt3sas: Don't access the structure after decrementing it's > instance reference count. > mpt3sas: Fix, False timeout prints for ioctl and other internal > commands during controller reset. > mpt3sas: As per MPI-spec, use combined reply queue for SAS3.5 > controllers when HBA supports more than 16 MSI-x vectors. > mpt3sas: Update driver version "26.100.00.00" Applied to 4.19/scsi-queue. Your patch subject lines are generally very long. In the future, please try to restrict them to 70 chars, leaving me enough room to add "scsi: " (checkpatch should have warned you about this). -- Martin K. Petersen Oracle Linux Engineering
Re: [PATCH 0/5] megaraid_sas: Driver updates
Shivasharan, > megaraid_sas: Do not do Kill adapter if GET_CTRL_INFO times out > megaraid_sas: Update controller info during resume > megaraid_sas: Return immediately from wait_for_adapter_operational > after kill adapter > megaraid_sas: Support FW provided TM timeout values > megaraid_sas: driver version upgrade Applied to 4.19/scsi-queue. Thank you! -- Martin K. Petersen Oracle Linux Engineering
Re: [PATCH 00/12] qla2xxx: Updates for driver
Himanshu, > This series contains bug-fixes for driver mainly in the area of > interaction with switch and small patch for N2N link reconnect. Applied to 4.19/scsi-queue, thanks! -- Martin K. Petersen Oracle Linux Engineering
Re: [PATCH 0/3] scsi: be2iscsi: Deprecate BE3 family adapters
Jitendra, > This patch is generated against for-next branch. Applied patches 1 and 3 to 4.19/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering
Re: [PATCH] tcmu: remove useless code and clean up the code style.
Xiubo, > Since the TCMU_RING_SIZE macro is not using here will discard it and > at the same time clean up the code style. Applied to 4.19/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering
Re: [PATCH] qla2xxx: Mask off Scope bits in retry delay.
Himanshu, > Some newer target uses "Status Qualifier" response in a returned "Busy > Status". This new response code of 0x4001, which is "Scope" bits, > translates to "Affects all units accessible by target". Due to this > new value returned in the Scope bits, driver was using that value as > timeout value which resulted into driver waiting for 27min timeout. > > This patch masks off this Scope bits so that driver does not use this > value as retry delay time. Applied to 4.18/scsi-fixes. Thank you! -- Martin K. Petersen Oracle Linux Engineering
Re: Possible race in completion with SRP after abort with latest upstream kernel 4.17.0+
On Thu, 2018-06-07 at 15:21 +, Bart Van Assche wrote: > On Thu, 2018-06-07 at 09:23 -0400, Laurence Oberman wrote: > > Have you seen this before, let me know what else you want from the > > dump > > while I look further. > > Hello Laurence, > > I haven't seen this before and I can't reproduce this by running srp- > tests > against Linus' latest master. So it would be appreciated if you could > tell > me how to reproduce this behavior or if you could run a bisect. > > Thanks, > > Bart. > > > > > > NrybXǧv^){.n+{ٚ{ayʇڙ,jfhzwj:+vwjmzZ+ݢj"! OK, let me see if I can get it to fail reliably to narrow it down. Thanks Laurence
Re: Possible race in completion with SRP after abort with latest upstream kernel 4.17.0+
On Thu, 2018-06-07 at 09:23 -0400, Laurence Oberman wrote: > Have you seen this before, let me know what else you want from the dump > while I look further. Hello Laurence, I haven't seen this before and I can't reproduce this by running srp-tests against Linus' latest master. So it would be appreciated if you could tell me how to reproduce this behavior or if you could run a bisect. Thanks, Bart.
Re: [PATCH] tcmu: remove useless code and clean up the code style.
On 06/07/2018 01:31 AM, xiu...@redhat.com wrote: > From: Xiubo Li > > Since the TCMU_RING_SIZE macro is not using here will discard it > and at the same time clean up the code style. > > Signed-off-by: Xiubo Li > --- > drivers/target/target_core_user.c | 8 ++-- > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/drivers/target/target_core_user.c > b/drivers/target/target_core_user.c > index 4f26bdc..2c63936 100644 > --- a/drivers/target/target_core_user.c > +++ b/drivers/target/target_core_user.c > @@ -79,14 +79,10 @@ > #define DATA_BLOCK_SIZE PAGE_SIZE > #define DATA_BLOCK_SHIFT PAGE_SHIFT > #define DATA_BLOCK_BITS_DEF (256 * 1024) > -#define DATA_SIZE (DATA_BLOCK_BITS * DATA_BLOCK_SIZE) > > #define TCMU_MBS_TO_BLOCKS(_mbs) (_mbs << (20 - DATA_BLOCK_SHIFT)) > #define TCMU_BLOCKS_TO_MBS(_blocks) (_blocks >> (20 - DATA_BLOCK_SHIFT)) > > -/* The total size of the ring is 8M + 256K * PAGE_SIZE */ > -#define TCMU_RING_SIZE (CMDR_SIZE + DATA_SIZE) > - > /* > * Default number of global data blocks(512K * PAGE_SIZE) > * when the unmap thread will be started. > @@ -279,7 +275,7 @@ static int tcmu_genl_cmd_done(struct genl_info *info, int > completed_cmd) > if (!info->attrs[TCMU_ATTR_CMD_STATUS] || > !info->attrs[TCMU_ATTR_DEVICE_ID]) { > printk(KERN_ERR "TCMU_ATTR_CMD_STATUS or TCMU_ATTR_DEVICE_ID > not set, doing nothing\n"); > -return -EINVAL; > + return -EINVAL; > } > > dev_id = nla_get_u32(info->attrs[TCMU_ATTR_DEVICE_ID]); > @@ -309,7 +305,7 @@ static int tcmu_genl_cmd_done(struct genl_info *info, int > completed_cmd) > > spin_unlock(>nl_cmd_lock); > if (!is_removed) > - target_undepend_item(>dev_group.cg_item); > + target_undepend_item(>dev_group.cg_item); > if (!ret) > complete(_cmd->complete); > return ret; > Acked-by: Mike Christie
[PATCH] scsi: qla2xxx: Recursive spinlock in qla_target
From: Mikhail Malygin The patch addresses issue causing recursive spinlock in qla_target.c. qlt_handle_login takes vha->hw->tgt.sess_lock, then calls qlt_schedule_sess_for_deletion where it tries to take spinlock again: BUG: spinlock lockup suspected on CPU#0, swapper/0/0 lock: 0xc0c07aa8bec0, .magic: dead4ead, .owner: swapper/0/0, .owner_cpu: 0 CPU: 0 PID: 0 Comm: swapper/0 Tainted: G OE NX 4.4.132-ttln.24-debug #1 Call Trace: [c0dfff6d7830] [c08060c0] dump_stack+0xb0/0xf0 (unreliable) [c0dfff6d7870] [c07ff6ec] spin_dump+0xa8/0xc4 [c0dfff6d78e0] [c0128320] do_raw_spin_lock+0x140/0x1d0 [c0dfff6d7920] [c07f7354] _raw_spin_lock_irqsave+0x34/0x50 [c0dfff6d7950] [d0001edf3220] qlt_schedule_sess_for_deletion+0x90/0x250 [qla2xxx] [c0dfff6d79c0] [d0001edf6b08] qlt_find_sess_invalidate_other+0x1d8/0x230 [qla2xxx] [c0dfff6d7a70] [d0001edf710c] qlt_handle_login+0x5ac/0x760 [qla2xxx] [c0dfff6d7b10] [d0001edf7ccc] qlt_handle_imm_notify+0xa0c/0x10b0 [qla2xxx] [c0dfff6d7c00] [d0001edf85f0] qlt_24xx_atio_pkt+0x280/0x400 [qla2xxx] [c0dfff6d7ca0] [d0001edfa9d8] qlt_24xx_process_atio_queue+0x368/0x7d0 [qla2xxx] [c0dfff6d7d80] [d0001edfb898] qla83xx_msix_atio_q+0x58/0x90 [qla2xxx] [c0dfff6d7dc0] [c0133cd0] __handle_irq_event_percpu+0xa0/0x2f0 [c0dfff6d7e80] [c0133f5c] handle_irq_event_percpu+0x3c/0x90 [c0dfff6d7ec0] [c0134018] handle_irq_event+0x68/0xb0 [c0dfff6d7f00] [c0139278] handle_fasteoi_irq+0xf8/0x260 [c0dfff6d7f40] [c0132e80] generic_handle_irq+0x50/0x80 [c0dfff6d7f60] [c0014c44] __do_irq+0x84/0x1d0 [c0dfff6d7f90] [c0027924] call_do_irq+0x14/0x24 [c0f13a20] [c0014e30] do_IRQ+0xa0/0x120 [c0f13a70] [c0002694] hardware_interrupt_common+0x114/0x180 --- interrupt: 501 at snooze_loop+0xc4/0x1a0 LR = snooze_loop+0x16c/0x1a0 [c0f13d60] [c063b41c] nap_loop+0x5c/0x120 (unreliable) [c0f13da0] [c0637f9c] cpuidle_enter_state+0xbc/0x3d0 [c0f13e00] [c011db10] call_cpuidle+0x50/0x80 [c0f13e20] [c011e138] cpu_startup_entry+0x388/0x490 [c0f13ee0] [c000c260] rest_init+0xb0/0xd0 [c0f13f00] [c0aa4070] start_kernel+0x55c/0x578 [c0f13f90] [c0008e6c] start_here_common+0x20/0xb4 nvme nvme0: I/O 782 QID 9 timeout, completion polled nvme nvme0: I/O 99 QID 12 timeout, completion polled nvme nvme0: I/O 925 QID 4 timeout, completio Signed-off-by: Mikhail Malygin --- drivers/scsi/qla2xxx/qla_target.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 025dc2d3f3de..35518a2a6890 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -1227,11 +1227,9 @@ static void qla24xx_chk_fcp_state(struct fc_port *sess) } } -void qlt_schedule_sess_for_deletion(struct fc_port *sess) +static void qlt_schedule_sess_for_deletion_locked(struct fc_port *sess) { struct qla_tgt *tgt = sess->tgt; - struct qla_hw_data *ha = sess->vha->hw; - unsigned long flags; if (sess->disc_state == DSC_DELETE_PEND) return; @@ -1247,16 +1245,13 @@ void qlt_schedule_sess_for_deletion(struct fc_port *sess) return; } - spin_lock_irqsave(>tgt.sess_lock, flags); if (sess->deleted == QLA_SESS_DELETED) sess->logout_on_delete = 0; if (sess->deleted == QLA_SESS_DELETION_IN_PROGRESS) { - spin_unlock_irqrestore(>tgt.sess_lock, flags); return; } sess->deleted = QLA_SESS_DELETION_IN_PROGRESS; - spin_unlock_irqrestore(>tgt.sess_lock, flags); sess->disc_state = DSC_DELETE_PEND; @@ -1269,6 +1264,16 @@ void qlt_schedule_sess_for_deletion(struct fc_port *sess) WARN_ON(!queue_work(sess->vha->hw->wq, >del_work)); } +void qlt_schedule_sess_for_deletion(struct fc_port *sess) +{ + struct qla_hw_data *ha = sess->vha->hw; + unsigned long flags; + + spin_lock_irqsave(>tgt.sess_lock, flags); + qlt_schedule_sess_for_deletion_locked(sess); + spin_unlock_irqrestore(>tgt.sess_lock, flags); +} + static void qlt_clear_tgt_db(struct qla_tgt *tgt) { struct fc_port *sess; @@ -4527,7 +4532,7 @@ qlt_find_sess_invalidate_other(scsi_qla_host_t *vha, uint64_t wwn, * might have cleared it when requested this session * deletion, so don't touch it */ - qlt_schedule_sess_for_deletion(other_sess); + qlt_schedule_sess_for_deletion_locked(other_sess); } else { /*
Possible race in completion with SRP after abort with latest upstream kernel 4.17.0+
Hello Bart Have not seen this more than twice but during testing of latest upstream kernel with SRP I have had two of these completion races. 4.17.0+ [49945.984133] sd 2:0:0:29: alua: transition timeout set to 60 seconds [49945.984136] sd 2:0:0:29: alua: port group 00 state A non-preferred supports TOlUSNA [49946.023273] sd 2:0:0:6: alua: port group 00 state A non-preferred supports TOlUSNA [49946.052514] sd 2:0:0:5: alua: port group 00 state A non-preferred supports TOlUSNA [49946.092895] sd 2:0:0:4: [sdl] Attached SCSI disk [49946.093422] sd 2:0:0:6: alua: port group 00 state A non-preferred supports TOlUSNA [49953.156158] scsi host2: SRP abort called * Abort [49953.187444] sd 2:0:0:5: [sdm] Attached SCSI disk [49953.211545] BUG: unable to handle kernel NULL pointer dereference at 0008 [49965.632850] PGD 0 P4D 0 [49965.644974] Oops: 0002 [#1] SMP PTI [49965.661765] CPU: 11 PID: 2949 Comm: kworker/u64:0 Kdump: loaded Tainted: G I 4.17.0+ #1 [49965.711026] Hardware name: HP ProLiant DL380 G7, BIOS P67 08/16/2015 [49965.742461] Workqueue: scsi_tmf_2 scmd_eh_abort_handler [49965.770633] RIP: 0010:_raw_spin_lock_irqsave+0x1e/0x40 [49965.795410] Code: 40 00 66 2e 0f 1f 84 00 00 00 00 00 66 66 66 66 90 53 9c 58 66 66 90 66 90 48 89 c3 fa 66 66 90 66 66 90 31 c0 ba 01 00 00 00 0f b1 17 85 c0 75 05 48 89 d8 5b c3 89 c6 e8 d7 26 92 ff eb f2 [49965.892623] RSP: 0018:b75e4789fdc0 EFLAGS: 00010046 [49965.920553] RAX: RBX: 0286 RCX: 0018 [49965.954952] RDX: 0001 RSI: 000a RDI: 0008 [49965.995180] RBP: R08: R09: 000a [49966.033257] R10: R11: R12: 000a [49966.073219] R13: 8d51f9041380 R14: R15: 8d454df84d30 [49966.107885] FS: () GS:8d52b334() knlGS: [49966.150490] CS: 0010 DS: ES: CR0: 80050033 [49966.177976] CR2: 0008 CR3: 00107300a005 CR4: 000206e0 [49966.216606] Call Trace: [49966.228353] complete+0x18/0x50 [49966.243410] scsi_end_request+0x95/0x1e0 [49966.263891] scsi_io_completion+0x1c1/0x680 [49966.286617] process_one_work+0x171/0x370 [49966.305850] worker_thread+0x49/0x3f0 [49966.323408] kthread+0xf8/0x130 [49966.341046] ? max_active_store+0x80/0x80 [49966.362901] ? kthread_bind+0x10/0x10 [49966.382485] ret_from_fork+0x35/0x40 Looks like a race in completion Pull request off stack struct request { q = 0x8d51f979b0c0, mq_ctx = 0xd752442e0600, cpu = -1, cmd_flags = 0, rq_flags = 139456, internal_tag = -1, __data_len = 0, tag = 56, __sector = 8191008, bio = 0x0, biotail = 0x8d46acd9e700, queuelist = { next = 0x8d454df84c40, prev = 0x8d454df84c40 }, struct gendisk { major = 67, first_minor = 64, minors = 16, disk_name = "sdba\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\0 00\000\000\000\000\000\000\000\000ba", crash> scsi_device.sdev_state 0x8d52b1da4800 sdev_state = SDEV_RUNNING crash> Scsi_Host.shost_state 0x8d466b969000 shost_state = SHOST_RUNNING if (scsi_target(sdev)->single_lun || !list_empty(>host->starved_list)) kblockd_schedule_work(>requeue_work); Have you seen this before, let me know what else you want from the dump while I look further. I have not tested for a while so not sure where this crept in or if its even an issue for others. Thanks Laurence
Re: mpt3sas heavy I/O load causes kernel BUG at block/blk-core.c:2695
Thanks, Suganath, That commit was introduced with version 12.100.00.00 and the distro version we're running is 15.100.00.01 (RHEL-ALT 7.5) and appears to include this fix - although the code is not identical, probably due to the effects of backporting patches. This driver also does not include commit 9961c9bbf2b43acaaf030a0fbabc9954d937ad8c, which was added much later (added on top of driver 17.100.00.00). So, I guess I am still looking for a companion (opposite scenario) patch to 9961c9bbf2b43acaaf030a0fbabc9954d937ad8c. Do you have any reason to believe that both situations (normal completion before abort, and abort before normal completion) do not need to be handled? Thanks, Doug On 06/07/2018 01:24 AM, Suganath Prabu Subramani wrote: Hi Douglas, Can you check if this patch is already part of driver, If not please try with below patch. This patch is to fix the completion of abort before the IO completion. With this, driver will process IO's reply first followed by TM. authorSuganath prabu Subramani 2016-01-28 12:07:06 +0530 committerMartin K. Petersen 2016-02-23 21:27:02 -0500 commit03d1fb3a65783979f23bd58b5a0387e6992d9e26 (patch) tree6aca275e2ebe7fbcd5fac1654cedd8f56d0947d0 /drivers/scsi/mpt3sas parent5c739b6157bd090942e5847ddd12bfb99cd4240d (diff) downloadlinux-03d1fb3a65783979f23bd58b5a0387e6992d9e26.tar.gz mpt3sas: Fix for Asynchronous completion of timedout IO and task abort of timedout IO. Track msix of each IO and use the same msix for issuing abort to timed out IO. With this driver will process IO's reply first followed by TM. Signed-off-by: Suganath prabu Subramani Signed-off-by: Chaitra P B Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen Thanks, Suganath Prabu S On Wed, Jun 6, 2018 at 7:50 PM, Douglas Miller wrote: Running a heavy I/O load on multipath/dual-ported SSD disks attached to a SAS3008 adapter (mpt3sas driver), we are seeing I/Os get aborted and tasks stuck in blk_complete_request() and this sometimes results in hitting a BUG_ON in blk_start_request(). It would appear that we are seeing two completions performed on an I/O, and the second completion is racing with re-use of the request for a new I/O. I saw this upstream commit: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v4.17-rc3=9961c9bbf2b43acaaf030a0fbabc9954d937ad8c which addresses the case where the normal completion occurs before the abort completion. But the situation I am seeing appears to be that the abort completion occurs before the normal completion (due to tasks getting delayed in blk_complete_request()). I don't find any commit to fix this second case. Of course, tasks being delayed like this is a concern, and is being worked separately. But it seems that the alternate double-completion case is being ignored here. Does everyone concur that this second case needs to be addressed? Is there a proposed fix? Thanks, Doug FYI, system is a Power9 running RHEL-ALT 7.5, two SAS3008 adapters connected to an IBM EXP24SX SAS Storage Enclosure with 24 HUSMM8040ASS201 drives. FIO was being used to drive the I/O load.
Re: [PATCH 2/3] scsi: be2iscsi: Add warnings for unsupported adapters
On Thu, Jun 07, 2018 at 01:54:42PM +0530, Jitendra Bhivare wrote: > From: Ketan Mukadam > > Add a warning message to indicate obsolete/unsupported > BE3 Adapter Family devices. Ahm no. The upstream Linux kernel doesn't deprecate specific hardware. -- 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 = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
[PATCH 0/3] scsi: be2iscsi: Deprecate BE3 family adapters
This patch is generated against for-next branch. Jitendra Bhivare (1): scsi: be2iscsi: Include null char in SET_HOST_DATA Ketan Mukadam (2): scsi: be2iscsi: Add warnings for unsupported adapters scsi: be2iscsi: Update copyright drivers/scsi/be2iscsi/be_cmds.c | 2 +- drivers/scsi/be2iscsi/be_iscsi.c | 15 +-- drivers/scsi/be2iscsi/be_main.c | 25 +++-- drivers/scsi/be2iscsi/be_mgmt.c | 26 +++--- 4 files changed, 48 insertions(+), 20 deletions(-) -- 2.7.4
[PATCH 1/3] scsi: be2iscsi: Include null char in SET_HOST_DATA
FW needs NULL terminated driver version string. Signed-off-by: Ketan Mukadam Reviewed-by: Jitendra Bhivare --- drivers/scsi/be2iscsi/be_cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/be2iscsi/be_cmds.c b/drivers/scsi/be2iscsi/be_cmds.c index 2eb66df..c10aac4 100644 --- a/drivers/scsi/be2iscsi/be_cmds.c +++ b/drivers/scsi/be2iscsi/be_cmds.c @@ -1545,7 +1545,7 @@ int beiscsi_set_host_data(struct beiscsi_hba *phba) snprintf((char *)ioctl->param.req.param_data, sizeof(ioctl->param.req.param_data), "Linux iSCSI v%s", BUILD_STR); - ioctl->param.req.param_len = ALIGN(ioctl->param.req.param_len, 4); + ioctl->param.req.param_len = ALIGN(ioctl->param.req.param_len + 1, 4); if (ioctl->param.req.param_len > BE_CMD_MAX_DRV_VERSION) ioctl->param.req.param_len = BE_CMD_MAX_DRV_VERSION; ret = be_mbox_notify(ctrl); -- 2.7.4
[PATCH 3/3] scsi: be2iscsi: Update copyright
From: Ketan Mukadam Update Broadcom copyright markings in all modified files. Signed-off-by: Ketan Mukadam Reviewed-by: Jitendra Bhivare --- drivers/scsi/be2iscsi/be_iscsi.c | 15 +-- drivers/scsi/be2iscsi/be_main.c | 23 +-- drivers/scsi/be2iscsi/be_mgmt.c | 23 +-- 3 files changed, 43 insertions(+), 18 deletions(-) diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c index a398c54..c8f0a21 100644 --- a/drivers/scsi/be2iscsi/be_iscsi.c +++ b/drivers/scsi/be2iscsi/be_iscsi.c @@ -1,11 +1,14 @@ /* - * Copyright 2017 Broadcom. All Rights Reserved. - * The term "Broadcom" refers to Broadcom Limited and/or its subsidiaries. + * This file is part of the Emulex Linux Device Driver for Enterprise iSCSI + * Host Bus Adapters. Refer to the README file included with this package + * for driver version and adapter compatibility. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. The full GNU General - * Public License is included in this distribution in the file called COPYING. + * Copyright (c) 2018 Broadcom. All Rights Reserved. + * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of version 2 of the GNU General Public License as published + * by the Free Software Foundation. * * Contact Information: * linux-driv...@broadcom.com diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index 2b4f524..84c3287 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c @@ -1,11 +1,22 @@ /* - * Copyright 2017 Broadcom. All Rights Reserved. - * The term "Broadcom" refers to Broadcom Limited and/or its subsidiaries. + * This file is part of the Emulex Linux Device Driver for Enterprise iSCSI + * Host Bus Adapters. Refer to the README file included with this package + * for driver version and adapter compatibility. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. The full GNU General - * Public License is included in this distribution in the file called COPYING. + * Copyright (c) 2018 Broadcom. All Rights Reserved. + * The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of version 2 of the GNU General Public License as published + * by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful. ALL EXPRESS + * OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY + * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, + * OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH + * DISCLAIMERS ARE HELD TO BE LEGALLY INVALID. + * See the GNU General Public License for more details, a copy of which + * can be found in the file COPYING included with this package. * * Contact Information: * linux-driv...@broadcom.com diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c index dff6cdf..13c7dea 100644 --- a/drivers/scsi/be2iscsi/be_mgmt.c +++ b/drivers/scsi/be2iscsi/be_mgmt.c @@ -1,11 +1,22 @@ /* - * Copyright 2017 Broadcom. All Rights Reserved. - * The term "Broadcom" refers to Broadcom Limited and/or its subsidiaries. + * This file is part of the Emulex Linux Device Driver for Enterprise iSCSI + * Host Bus Adapters. Refer to the README file included with this package + * for driver version and adapter compatibility. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. The full GNU General - * Public License is included in this distribution in the file called COPYING. + * Copyright (c) 2018 Broadcom. All Rights Reserved. + * The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of version 2 of the GNU General Public License as published + * by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful. ALL EXPRESS + * OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY + * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, + * OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH + * DISCLAIMERS ARE HELD TO BE LEGALLY INVALID. + * See the GNU General Public License for more details, a copy of which + * can be found in the file COPYING included with this package. * * Contact Information: *
[PATCH 2/3] scsi: be2iscsi: Add warnings for unsupported adapters
From: Ketan Mukadam Add a warning message to indicate obsolete/unsupported BE3 Adapter Family devices. Signed-off-by: Ketan Mukadam Reviewed-by: Jitendra Bhivare --- drivers/scsi/be2iscsi/be_main.c | 2 ++ drivers/scsi/be2iscsi/be_mgmt.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index b3cfdd5..2b4f524 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c @@ -5583,6 +5583,8 @@ static int beiscsi_dev_probe(struct pci_dev *pcidev, case OC_DEVICE_ID3: phba->generation = BE_GEN3; phba->iotask_fn = beiscsi_iotask; + dev_warn(>dev, +"Obsolete/Unsupported BE3 Adapter Family\n"); break; case OC_SKH_ID1: phba->generation = BE_GEN4; diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c index 66ca967..dff6cdf 100644 --- a/drivers/scsi/be2iscsi/be_mgmt.c +++ b/drivers/scsi/be2iscsi/be_mgmt.c @@ -1233,7 +1233,8 @@ beiscsi_adap_family_disp(struct device *dev, struct device_attribute *attr, break; case BE_DEVICE_ID2: case OC_DEVICE_ID3: - return snprintf(buf, PAGE_SIZE, "BE3-R Adapter Family\n"); + return snprintf(buf, PAGE_SIZE, + "Obsolete/Unsupported BE3-R Adapter Family\n"); break; case OC_SKH_ID1: return snprintf(buf, PAGE_SIZE, "Skyhawk-R Adapter Family\n"); -- 2.7.4
Re: [PATCH] qla2xxx: Mask off Scope bits in retry delay.
On Wed, 2018-06-06 at 08:41 -0700, Himanshu Madhani wrote: > From: Anil Gurumurthy > > Some newer target uses "Status Qualifier" response in a returned > "Busy Status". This new response code of 0x4001, which is "Scope" > bits, > translates to "Affects all units accessible by target". > Due to this new value returned in the Scope bits, driver was using > that value as timeout value which resulted into driver waiting for > 27min > timeout. > > This patch masks off this Scope bits so that driver does not use > this value as retry delay time. > > Cc: > Signed-off-by: Anil Gurumurthy > Signed-off-by: Giridhar Malavali > Signed-off-by: Himanshu Madhani Tested successfully by SUSE customers. Acked-by: Martin Wilck -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)
[PATCH] tcmu: remove useless code and clean up the code style.
From: Xiubo Li Since the TCMU_RING_SIZE macro is not using here will discard it and at the same time clean up the code style. Signed-off-by: Xiubo Li --- drivers/target/target_core_user.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c index 4f26bdc..2c63936 100644 --- a/drivers/target/target_core_user.c +++ b/drivers/target/target_core_user.c @@ -79,14 +79,10 @@ #define DATA_BLOCK_SIZE PAGE_SIZE #define DATA_BLOCK_SHIFT PAGE_SHIFT #define DATA_BLOCK_BITS_DEF (256 * 1024) -#define DATA_SIZE (DATA_BLOCK_BITS * DATA_BLOCK_SIZE) #define TCMU_MBS_TO_BLOCKS(_mbs) (_mbs << (20 - DATA_BLOCK_SHIFT)) #define TCMU_BLOCKS_TO_MBS(_blocks) (_blocks >> (20 - DATA_BLOCK_SHIFT)) -/* The total size of the ring is 8M + 256K * PAGE_SIZE */ -#define TCMU_RING_SIZE (CMDR_SIZE + DATA_SIZE) - /* * Default number of global data blocks(512K * PAGE_SIZE) * when the unmap thread will be started. @@ -279,7 +275,7 @@ static int tcmu_genl_cmd_done(struct genl_info *info, int completed_cmd) if (!info->attrs[TCMU_ATTR_CMD_STATUS] || !info->attrs[TCMU_ATTR_DEVICE_ID]) { printk(KERN_ERR "TCMU_ATTR_CMD_STATUS or TCMU_ATTR_DEVICE_ID not set, doing nothing\n"); -return -EINVAL; + return -EINVAL; } dev_id = nla_get_u32(info->attrs[TCMU_ATTR_DEVICE_ID]); @@ -309,7 +305,7 @@ static int tcmu_genl_cmd_done(struct genl_info *info, int completed_cmd) spin_unlock(>nl_cmd_lock); if (!is_removed) -target_undepend_item(>dev_group.cg_item); + target_undepend_item(>dev_group.cg_item); if (!ret) complete(_cmd->complete); return ret; -- 1.8.3.1
Re: mpt3sas heavy I/O load causes kernel BUG at block/blk-core.c:2695
Hi Douglas, Can you check if this patch is already part of driver, If not please try with below patch. This patch is to fix the completion of abort before the IO completion. With this, driver will process IO's reply first followed by TM. authorSuganath prabu Subramani 2016-01-28 12:07:06 +0530 committerMartin K. Petersen 2016-02-23 21:27:02 -0500 commit03d1fb3a65783979f23bd58b5a0387e6992d9e26 (patch) tree6aca275e2ebe7fbcd5fac1654cedd8f56d0947d0 /drivers/scsi/mpt3sas parent5c739b6157bd090942e5847ddd12bfb99cd4240d (diff) downloadlinux-03d1fb3a65783979f23bd58b5a0387e6992d9e26.tar.gz mpt3sas: Fix for Asynchronous completion of timedout IO and task abort of timedout IO. Track msix of each IO and use the same msix for issuing abort to timed out IO. With this driver will process IO's reply first followed by TM. Signed-off-by: Suganath prabu Subramani Signed-off-by: Chaitra P B Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen Thanks, Suganath Prabu S On Wed, Jun 6, 2018 at 7:50 PM, Douglas Miller wrote: > Running a heavy I/O load on multipath/dual-ported SSD disks attached to a > SAS3008 adapter (mpt3sas driver), we are seeing I/Os get aborted and tasks > stuck in blk_complete_request() and this sometimes results in hitting a > BUG_ON in blk_start_request(). It would appear that we are seeing two > completions performed on an I/O, and the second completion is racing with > re-use of the request for a new I/O. > > I saw this upstream commit: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v4.17-rc3=9961c9bbf2b43acaaf030a0fbabc9954d937ad8c > > which addresses the case where the normal completion occurs before the abort > completion. But the situation I am seeing appears to be that the abort > completion occurs before the normal completion (due to tasks getting delayed > in blk_complete_request()). I don't find any commit to fix this second case. > > Of course, tasks being delayed like this is a concern, and is being worked > separately. But it seems that the alternate double-completion case is being > ignored here. > > Does everyone concur that this second case needs to be addressed? Is there a > proposed fix? > > Thanks, > > Doug > > FYI, system is a Power9 running RHEL-ALT 7.5, two SAS3008 adapters connected > to an IBM EXP24SX SAS Storage Enclosure with 24 HUSMM8040ASS201 drives. FIO > was being used to drive the I/O load. > >