Re: [PATCH 17/20] [SCSI] mpt3sas: Use alloc_ordered_workqueue() API instead of create_singlethread_workqueue() API

2015-06-12 Thread Joe Lawrence
On 06/12/2015 05:42 AM, Sreekanth Reddy wrote: ... > +#if defined(alloc_ordered_workqueue) > + ioc->firmware_event_thread = alloc_ordered_workqueue( > + ioc->firmware_event_name, WQ_MEM_RECLAIM); > +#else > + ioc->firmware_event_thread = create_singlethread_workqueue( >

Re: [PATCH] mpt2sas: Abort initialization if no memory I/O resources, detected

2015-06-16 Thread Joe Lawrence
On 06/16/2015 12:28 PM, Timothy Pearson wrote: > On 06/12/2015 05:05 PM, Timothy Pearson wrote: >> The mpt2sas driver crashes if the BIOS does not set up at least one >> memory I/O resource. This failure can happen if the device is too >> slow to respond during POST and is missed by the BIOS, but L

Re: [PATCH 17/20 v1] [SCSI] mpt3sas: Use alloc_ordered_workqueue() API instead of create_singlethread_workqueue() API

2015-06-18 Thread Joe Lawrence
On 06/16/2015 01:37 AM, Sreekanth Reddy wrote: > Created a thread using alloc_ordered_workqueue() API in order to process > the works from firmware Work-queue sequentially instead of > create_singlethread_workqueue() API. > > Changes in v1: > No need to check for backport compatibility in the

Re: [PATCH 17/20 v1] [SCSI] mpt3sas: Use alloc_ordered_workqueue() API instead of create_singlethread_workqueue() API

2015-06-18 Thread Joe Lawrence
On 06/18/2015 09:06 AM, Sreekanth Reddy wrote: > On Thu, Jun 18, 2015 at 5:40 PM, Joe Lawrence > wrote: >> On 06/16/2015 01:37 AM, Sreekanth Reddy wrote: >>> Created a thread using alloc_ordered_workqueue() API in order to process >>> the works from firmware Work

Re: OOPS: unplugging western digital passport drive

2015-06-22 Thread Joe Lawrence
t; > > On Wed, 18 Mar 2015, Alan Stern wrote: > >> On Wed, 18 Mar 2015, Alan Stern wrote: >> >>> On Tue, 17 Mar 2015, Joe Lawrence wrote: >>> >>>> On 03/11/2015 12:25 AM, Stanisław Pitucha wrote: >>>>> Hi linux-scsi, >>>>

Re: [PATCH] mpt2sas: Abort initialization if no memory I/O resources, detected

2015-06-23 Thread Joe Lawrence
On 06/21/2015 02:46 PM, Timothy Pearson wrote: > On 06/16/2015 01:49 PM, Timothy Pearson wrote: >> On 06/16/2015 12:42 PM, Joe Lawrence wrote: >>> On 06/16/2015 12:28 PM, Timothy Pearson wrote: >>>> On 06/12/2015 05:05 PM, Timothy Pearson wrote: >>>>>

Re: [PATCH] [RESEND] qla2xxx: prevent board_disable from running during EEH

2015-06-26 Thread Joe Lawrence
On 06/26/2015 12:33 PM, Mauricio Faria de Oliveira wrote: > Commit f3ddac1918fe963bcbf8d407a3a3c0881b47248b ("[SCSI] qla2xxx: > Disable adapter when we encounter a PCI disconnect.") has introduced a > code that disables the board, releasing some resources, when reading > 0x. > > In case th

Re: [PATCH 1/2] mpt2sas: Refcount sas_device objects and fix unsafe list usage

2015-07-13 Thread Joe Lawrence
On 07/12/2015 12:24 AM, Calvin Owens wrote: > These objects can be referenced concurrently throughout the driver, we > need a way to make sure threads can't delete them out from under each > other. This patch adds the refcount, and refactors the code to use it. > > Additionally, we cannot iterate

Re: [PATCH 5/6] qla2xxx: Prevent removal and board_disable race

2014-07-25 Thread Joe Lawrence
On Fri, 25 Jul 2014 11:23:02 -0400 Chad Dupuis wrote: > > > On Wed, 18 Jun 2014, Joe Lawrence wrote: > > > Introduce mutual exclusion between the qla2xxx_remove_one PCI driver > > callback and qla2x00_disable_board_on_pci_error, which is scheduled as &

Re: [PATCH 0/6] qla2xxx device removal fixups

2014-08-26 Thread Joe Lawrence
On Wed, 18 Jun 2014 10:02:13 -0400 Joe Lawrence wrote: > Hi Chad, Giri, et al. > > Stratus has been testing the upstream qla2xxx driver against surprise > device removal and has found a few minor issues along the way. With > this patchset, results have been good. Althoug

[PATCH RESEND 0/6] qla2xxx device removal fixups

2014-08-26 Thread Joe Lawrence
Resending patchset against scsi-queue/drivers-for-3.18 with Acked-by and Cc stable annotations. Joe Lawrence (6): qla2xxx: Fix shost use-after-free on device removal qla2xxx: Use qla2x00_clear_drv_active on probe failure qla2xxx: Collect PCI register checks and board_disable scheduling

[PATCH RESEND 1/6] qla2xxx: Fix shost use-after-free on device removal

2014-08-26 Thread Joe Lawrence
Cc: sta...@vger.kernel.org # 3.14, 3.15, 3.16 Signed-off-by: Joe Lawrence Acked-by: Chad Dupuis --- drivers/scsi/qla2xxx/qla_os.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index be9698d..8252

[PATCH RESEND 2/6] qla2xxx: Use qla2x00_clear_drv_active on probe failure

2014-08-26 Thread Joe Lawrence
Take advantage of commit fe1b806f4f71 ("qla2xxx: Refactor shutdown code so some functionality can be reused") to remove an inlined copy of qla2x00_clear_drv_active in the driver's probe hardware error path. Signed-off-by: Joe Lawrence Acked-by: Chad Dupuis --- drivers/scsi/q

[PATCH RESEND 5/6] qla2xxx: Prevent removal and board_disable race

2014-08-26 Thread Joe Lawrence
PCI device enable count check in qla2x00_remove_one to determine if board_disable has occured. The original purpose of this check was unnecessary since the driver remove function wasn't called when the probe fails. Signed-off-by: Joe Lawrence Acked-by: Chad Dupuis --- drivers/scsi/ql

[PATCH RESEND 4/6] qla2xxx: Schedule board_disable only once

2014-08-26 Thread Joe Lawrence
There are various callers of qla2x00_check_reg{32,16}_for_disconnect that may schedule board removal on PCI-disconnect. Test-and-set a dedicated flag before scheduling board_disable so it is invoked only once. Signed-off-by: Joe Lawrence Acked-by: Chad Dupuis --- drivers/scsi/qla2xxx/qla_def.h

[PATCH RESEND 3/6] qla2xxx: Collect PCI register checks and board_disable scheduling

2014-08-26 Thread Joe Lawrence
Add an uint16_t variant of qla2x00_check_reg_for_disconnect and use these routines to check and schedule a PCI-disconnected board from a centralized place. Signed-off-by: Joe Lawrence Acked-by: Chad Dupuis --- drivers/scsi/qla2xxx/qla_gbl.h |3 ++- drivers/scsi/qla2xxx/qla_isr.c | 28

[PATCH RESEND 6/6] qla2xxx: Prevent probe and board_disable race

2014-08-26 Thread Joe Lawrence
ructure is initialized and more importantly, avoids racing qla2x00_probe_one. Signed-off-by: Joe Lawrence Acked-by: Chad Dupuis --- drivers/scsi/qla2xxx/qla_def.h |1 + drivers/scsi/qla2xxx/qla_isr.c |3 ++- drivers/scsi/qla2xxx/qla_os.c |2 ++ 3 files changed, 5 insertions(+), 1 deletio

[PATCH] mpt2sas: remove duplicate disable_discovery MODULE_PARAM

2014-09-05 Thread Joe Lawrence
The disable_discovery module parameter is declared and only used by mpt2sas_scsih.c. Remove the extra copy in mpt2sas_base.c. Signed-off-by: Joe Lawrence --- drivers/scsi/mpt2sas/mpt2sas_base.c |4 1 file changed, 4 deletions(-) diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b

Re: [PATCH 20/35] qla2xxx: Unload of qla2xxx driver crashes the machine.

2014-09-24 Thread Joe Lawrence
Hi Saurav, Will these changes conflict with those submitted in August [1] to Christoph's drivers-for-3.18 branch? In particular, "qla2xxx: Fix shost use-after-free on device removal" [2] fixed this same driver unload issue in a slightly different manner. That change was marked for stable as the

Re: [PATCH 31/35] qla2xxx: Disable PCI device in shutdown handler.

2014-09-24 Thread Joe Lawrence
On Wed, 24 Sep 2014 03:08:34 -0400 Saurav Kashyap wrote: > From: Chad Dupuis > > Disable the PCI device during shutdown to prevent any races with > other PCI code such as the AER handling code. > > Signed-off-by: Chad Dupuis > Signed-off-by: Saurav Kashyap > --- > drivers/scsi/qla2xxx/qla_o

Re: [PATCH 31/35] qla2xxx: Disable PCI device in shutdown handler.

2014-09-24 Thread Joe Lawrence
On Wed, 24 Sep 2014 11:37:55 -0400 Chad Dupuis wrote: > > > On Wed, 24 Sep 2014, Joe Lawrence wrote: > > > On Wed, 24 Sep 2014 03:08:34 -0400 > > Saurav Kashyap wrote: > > > >> From: Chad Dupuis > >> > >> Disable the PCI device duri

[PATCH] mpt3sas - remove unused fw_event_work delayed_work

2016-04-01 Thread Joe Lawrence
Remove it and update _scsih_fw_event_cleanup_queue accordingly. Signed-off-by: Joe Lawrence --- I think this goes all the way back to the introduction of the mpt3sas driver. The previous generation mpt2sas driver uses delayed_work, so perhaps it was simply copied and pasted into the mpt3sas but never upd

Re: [PATCH] mpt3sas - remove unused fw_event_work delayed_work

2016-04-01 Thread Joe Lawrence
On 04/01/2016 02:51 PM, Ewan D. Milne wrote: > On Fri, 2016-04-01 at 13:56 -0400, Joe Lawrence wrote: >> @@ -2804,12 +2803,12 @@ _scsih_fw_event_cleanup_queue(struct MPT3SAS_ADAPTER >> *ioc) >> /* >> * Wait on the fw_event to comple

Re: [PATCH] mpt3sas - remove unused fw_event_work delayed_work

2016-04-11 Thread Joe Lawrence
athya.prak...@broadcom.com] Sent: Saturday, April 02, 2016 1:45 AM To: emi...@redhat.com; Joe Lawrence Cc: linux-scsi@vger.kernel.org; Chaitra Basappa; Suganath Prabu Subramani; Calvin Owens Subject: RE: [PATCH] mpt3sas - remove unused fw_event_work delayed_work We will look into this early next week a

[PATCH v2] mpt3sas - remove unused fw_event_work elements

2016-04-18 Thread Joe Lawrence
es: 146b16c8071f (mpt3sas: Refcount fw_events and fix unsafe list usage) Signed-off-by: Joe Lawrence --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c inde

Re: [PATCH] Fix a bdi reregistration race, v3

2016-05-05 Thread Joe Lawrence
On 05/05/2016 03:58 PM, Bart Van Assche wrote: > On 03/28/2016 02:29 PM, Bart Van Assche wrote: >> Avoid that the sd driver registers a BDI device with a name that >> is still in use. This patch avoids that the following warning gets >> triggered: >> >> [ ... ] > > (replying to my own e-mail) > >

Re: [PATCH] Fix a bdi reregistration race, v3

2016-05-09 Thread Joe Lawrence
On 05/05/2016 04:40 PM, Joe Lawrence wrote: > On 05/05/2016 03:58 PM, Bart Van Assche wrote: >> On 03/28/2016 02:29 PM, Bart Van Assche wrote: >>> Avoid that the sd driver registers a BDI device with a name that >>> is still in use. This patch avoids that the following

[PATCH 2/2] mpt3sas - avoid mpt3sas_transport_port_add NULL parent_dev

2016-05-25 Thread Joe Lawrence
If _scsih_sas_host_add's call to mpt3sas_config_get_sas_iounit_pg0 fails, ioc->sas_hba.parent_dev may be left uninitialized. A later device probe could invoke mpt3sas_transport_port_add which will call sas_port_alloc_num [scsi_transport_sas] with a NULL parent_dev pointer. Signed-off

[PATCH 1/2] mpt3sas - set num_phys after allocating phy[] space

2016-05-25 Thread Joe Lawrence
>sas_hba is left in a dangerous state: all readers of ioc->sas_hba.phy[] do so by indexing it from 0..ioc->sas_hba.num_phys without checking that the space was ever allocated. Modify _scsih_sas_host_add to set ioc->sas_hba.num_phys only after successfully allocating ioc->sas_hba.

[PATCH 0/2] _scsih_sas_host_add early exits can crash system

2016-05-25 Thread Joe Lawrence
Note: these changes don't improve or retry adapter initialization, but only try to prevent the system from crashing Joe Lawrence (2): mpt3sas - set num_phys after allocating phy[] space mpt3sas - avoid mpt3sas_transport_port_add NULL parent_dev drivers/scsi/mpt3sas/mpt3sas_scsi

Re: mpt2sas,mpt3sas watchdog device removal

2013-05-17 Thread Joe Lawrence
On Fri, 17 May 2013 09:29:06 -0600 Bjorn Helgaas wrote: > [+cc linux-pci] > > On Wed, May 15, 2013 at 11:29 AM, Joe Lawrence > wrote: > > From 84ac7a35ebd61e84d4254eae78bb967de17254c2 Mon Sep 17 00:00:00 > > 2001 From: Joe Lawrence > > Date: Wed, 15 May 2013 12:5

[PATCH v4] block: handle pointer error from blk_get_request

2013-05-23 Thread Joe Lawrence
00:00:00 2001 From: Joe Lawrence Date: Thu, 23 May 2013 15:05:08 -0400 Subject: [PATCH v4] block: handle pointer error from blk_get_request The blk_get_request function may fail in low-memory conditions or during device removal (even if __GFP_WAIT is set). To distinguish between these error

Re: [PATCH] block,scsi: verify return pointer from blk_get_request

2013-05-23 Thread Joe Lawrence
On Fri, 24 May 2013 00:40:11 +0400 James Bottomley wrote: > Now that we see the size of the patch diff between fixing the bug and > doing proper error returns, I'm really not convinced this should be > done as a single bug fix patch. The modify all error returns is big > and if we missed one, it

[PATCH v5 0/2] block,scsi: fixup blk_get_request dead queue scenarios

2013-05-24 Thread Joe Lawrence
[PATCH v5 0/2] block,scsi: fixup blk_get_request dead queue scenarios Changes from v4: - As per James' suggestion, split into two patches: the first adds blk_get_request return value checking to avoid potential oops, the second converts callers and friends to handle ERR_PTR differentiation

[PATCH v5 1/2] block,scsi: verify return pointer from blk_get_request

2013-05-24 Thread Joe Lawrence
>From 22307be1bc6e404622b1f074094902e385a1bd30 Mon Sep 17 00:00:00 2001 From: Joe Lawrence Date: Fri, 24 May 2013 12:39:04 -0400 Subject: [PATCH v5 1/2] block,scsi: verify return pointer from blk_get_request The blk-core dead queue checks introduced in commit 70460571 added an error scenario

[PATCH v5 2/2] block,scsi: convert and handle ERR_PTR from blk_get_request

2013-05-24 Thread Joe Lawrence
>From 5b26d593807b30f60ed41f6fd5a16a56c3c9a43c Mon Sep 17 00:00:00 2001 From: Joe Lawrence Date: Fri, 24 May 2013 13:05:09 -0400 Subject: [PATCH v5 2/2] block,scsi: convert and handle ERR_PTR from blk_get_request The blk_get_request function may fail in low-memory conditions or during dev

[PATCH 0/2] Minor scsi_dh_emc error path fixes

2013-05-28 Thread Joe Lawrence
latter fix could have been made in parse_path, but it didn't seem appropriate for that file to sort through SCSI_DH enums. Comments welcome, unfortunately I don't have the HW to verify, so these are only compile tested. Thanks, Joe Lawrence (2): scsi_dh_emc: handle zero-senselen sen

scsi_dh_emc: handle zero-senselen send_inquiry_cmd errors

2013-05-28 Thread Joe Lawrence
>From c6645f639f7e7551c7a6f0aacee78e57ddd37bc1 Mon Sep 17 00:00:00 2001 From: Joe Lawrence Date: Tue, 28 May 2013 14:49:37 -0400 Subject: [PATCH 1/2] scsi_dh_emc: handle zero-senselen send_inquiry_cmd errors The send_inquiry_cmd function may exit without setting senselen if get_req fa

scsi_dh_emc: set_params callback should consistently return errno

2013-05-28 Thread Joe Lawrence
>From db6c2d4406732585fd7a658fc89b14fa26e7d1d4 Mon Sep 17 00:00:00 2001 From: Joe Lawrence Date: Tue, 28 May 2013 15:47:20 -0400 Subject: [PATCH 2/2] scsi_dh_emc: set_params callback should consistently return errno A SCSI scsi_device_handler set_params routine should return a negative er

Re: mpt2sas,mpt3sas watchdog device removal

2013-07-16 Thread Joe Lawrence
On Tue, 16 Jul 2013 16:03:38 +0400 James Bottomley wrote: > On Tue, 2013-07-16 at 17:30 +0530, Reddy, Sreekanth wrote: > > James, > > > > This patch seem to be fine. Please consider this patch. > > Where's the new version? The one that has all of this fixed: > > > Off list, Sreekanth from LSI

Re: [PATCH v5 0/2] block,scsi: fixup blk_get_request dead queue scenarios

2013-07-24 Thread Joe Lawrence
On Fri, 24 May 2013 14:15:31 -0400 Joe Lawrence wrote: > [PATCH v5 0/2] block,scsi: fixup blk_get_request dead queue scenarios > > Changes from v4: > > - As per James' suggestion, split into two patches: the first adds >blk_get_request return value checking to av

Re: [PATCH 0/2] Minor scsi_dh_emc error path fixes

2013-07-24 Thread Joe Lawrence
On Tue, 28 May 2013 17:18:37 -0400 Joe Lawrence wrote: > These two patches spun out of the blk_get_request return type changes > I've been working on [1]. > > [1] http://thread.gmane.org/gmane.linux.scsi/80934 > > Should that patch go in, there are a few other

[PATCH 0/2] mpt2sas/mpt3sas resource cleanup fixes

2013-08-02 Thread Joe Lawrence
quot; at the top of mpt2sas_base_map_resources. I don't have access to mpt3sas HW, but that driver code looks exactly the same. Patches based off of 3.11.0-rc3. Regards, Joe Lawrence (2): mpt2sas: fix cleanup on controller resource mapping failure mpt3sas: fix cleanup on controller res

[PATCH 2/2] mpt3sas: fix cleanup on controller resource mapping failure

2013-08-02 Thread Joe Lawrence
iterates over the adapter's reply_queue_list, so move this list head initialization out of _base_enable_msix to _scsih_probe so this will always be safe. Signed-off-by: Joe Lawrence --- drivers/scsi/mpt3sas/mpt3sas_base.c | 16 +--- drivers/scsi/mpt3sas/mpt3sas_scsih.c

[PATCH 1/2] mpt2sas: fix cleanup on controller resource mapping failure

2013-08-02 Thread Joe Lawrence
iterates over the adapter's reply_queue_list, so move this list head initialization out of _base_enable_msix to _scsih_probe so this will always be safe. Signed-off-by: Joe Lawrence --- drivers/scsi/mpt2sas/mpt2sas_base.c | 16 +--- drivers/scsi/mpt2sas/mpt2sas_scsih.c

[PATCH v3 1/2] mpt2sas: fix cleanup on controller resource mapping failure

2013-08-08 Thread Joe Lawrence
iterates over the adapter's reply_queue_list, so move this list head initialization out of _base_enable_msix to _scsih_probe so this will always be safe. 3 - check that the controller PCI device and its BARs have been enabled before disabling them. Signed-off-by: Joe Law

[PATCH v3 0/2] mpt2sas/mpt3sas resource cleanup fixes

2013-08-08 Thread Joe Lawrence
PCI device is enabled before disabling it. - Verify that the PCI BARs have been enabled before releasing them. Joe Lawrence (2): mpt2sas: fix cleanup on controller resource mapping failure mpt3sas: fix cleanup on controller resource mapping failure drivers/scsi/mpt2sas/mpt2sas

[PATCH v3 2/2] mpt3sas: fix cleanup on controller resource mapping failure

2013-08-08 Thread Joe Lawrence
iterates over the adapter's reply_queue_list, so move this list head initialization out of _base_enable_msix to _scsih_probe so this will always be safe. 3 - check that the controller PCI device and its BARs have been enabled before disabling them. Signed-off-by: Joe Law

Re: [PATCH] [SCSI] mpt3sas: Added a driver module parameter max_msix_vectors

2013-08-15 Thread Joe Lawrence
Hi Sreekanth, Will there be a follow up patch to fix the crash scenario? Is there some error path in _base_allocate_memory_pools that isn't handled gracefully that needs to be cleaned up? Also, I think fixes in this space could apply to the mpt2sas driver as well. Regards, -- Joe On Wed, 14

[RESEND PATCH v5 0/2] block,scsi: fixup blk_get_request dead queue scenarios

2013-09-06 Thread Joe Lawrence
e pktdvd.c changes. Can this patch go forward for the 3.12 merge, or at least in the hopper for the next release? Regards, [1] http://thread.gmane.org/gmane.linux.scsi/80934 [2] http://thread.gmane.org/gmane.linux.kernel/1502882 Joe Lawrence (2): block,scsi: verify return pointer from blk_g

[RESEND PATCH v5 2/2] block,scsi: convert and handle ERR_PTR from blk_get_request

2013-09-06 Thread Joe Lawrence
instead of a simple NULL pointer check. Signed-off-by: Joe Lawrence Cc: Jens Axboe Cc: Jiri Kosina Cc: "James E.J. Bottomley" Cc: Bart Van Assche Cc: linux-scsi@vger.kernel.org --- block/blk-core.c| 34 ++--- b

[RESEND PATCH v5 1/2] block,scsi: verify return pointer from blk_get_request

2013-09-06 Thread Joe Lawrence
The blk-core dead queue checks introduce an error scenario to blk_get_request that returns NULL if the request queue has been shutdown. This affects the behavior for __GFP_WAIT callers, who should verify the return value before dereferencing. Signed-off-by: Joe Lawrence Cc: Jens Axboe Cc: Jiri

usb-storage URB use-after-free

2015-01-28 Thread Joe Lawrence
Hello linux-usb, We've hit a USB use-after-free on Stratus HW during device removal tests. We're running fio disk I/O to a scsi disk hanging off USB when the USB controller is hotplug removed. This crash is very consistent (usually the first device pull during testing). Without I/O, it may take

Re: usb-storage URB use-after-free

2015-01-28 Thread Joe Lawrence
This one should have gone over to linux-usb. -- Joe On 01/28/2015 05:04 PM, Joe Lawrence wrote: > Hello linux-usb, > > We've hit a USB use-after-free on Stratus HW during device removal tests. > We're running fio disk I/O to a scsi disk hanging off USB when the USB &

Re: usb-storage URB use-after-free

2015-01-30 Thread Joe Lawrence
On Thu, 29 Jan 2015 11:42:18 -0500 Alan Stern wrote: > On Wed, 28 Jan 2015, Joe Lawrence wrote: > > > This one should have gone over to linux-usb. > > > > -- Joe > > > > On 01/28/2015 05:04 PM, Joe Lawrence wrote: > > > Hello linux-usb, > >

Re: OOPS: unplugging western digital passport drive

2015-03-17 Thread Joe Lawrence
On 03/11/2015 12:25 AM, Stanisław Pitucha wrote: > Hi linux-scsi, > I've got another case of reproducible crash when unplugging western > digital passport drives. This was mentioned before in > http://www.spinics.net/lists/linux-scsi/msg82603.html > > Is there any way I can get a more correct stac

Re: [PATCH 0/2] mpt2sas,mpt3sas - PCI master abort fixups

2015-04-12 Thread Joe Lawrence
On 12/30/2014 09:07 AM, Joe Lawrence wrote: > A colleague noticed that the mpt2 and mpt3sas drivers do not correctly > check the PCI master abort pattern in _base_wait_for_doorbell_ack. This > pattern should be checked *prior* to any valid bit patterns, which would > always return

Re: [PATCH 0/2] mpt2sas,mpt3sas - PCI master abort fixups

2015-04-13 Thread Joe Lawrence
On 04/12/2015 08:54 PM, James Bottomley wrote: > On Sun, 2015-04-12 at 20:11 -0400, Joe Lawrence wrote: >> On 12/30/2014 09:07 AM, Joe Lawrence wrote: >>> A colleague noticed that the mpt2 and mpt3sas drivers do not correctly >>> check the PCI master abort pattern in

Re: [PATCH 0/2] mpt2sas,mpt3sas - PCI master abort fixups

2015-04-13 Thread Joe Lawrence
On 04/13/2015 10:38 AM, James Bottomley wrote: > On Mon, 2015-04-13 at 10:06 -0400, Joe Lawrence wrote: >> On 04/12/2015 08:54 PM, James Bottomley wrote: >>> On Sun, 2015-04-12 at 20:11 -0400, Joe Lawrence wrote: >>>> On 12/30/2014 09:07 AM, Joe Lawrence wrote: >

Re: [PATCH v8 0/10] More device removal fixes

2013-02-06 Thread Joe Lawrence
On Tue, 5 Feb 2013, Bart Van Assche wrote: > Fix a few race conditions that can be triggered by removing a device: > - Fix a race between starved list processing and device removal. > - Avoid that a SCSI LLD callback can get invoked after > scsi_remove_host() finished. > - Speed up device remova

Re: [PATCH v8 0/10] More device removal fixes

2013-02-08 Thread Joe Lawrence
On Thu, 7 Feb 2013, Bart Van Assche wrote: > On 02/06/13 23:31, Joe Lawrence wrote: > > crash> list scsi_device.siblings -H 0x8808513a4290 -s scsi_device > > > > 880851232520 > > struct scsi_device { > >is_visible = 0x1, > >sdev_st

[PATCH] mpt2sas/mpt3sas: set async scan finished on adapter removal

2013-02-13 Thread Joe Lawrence
mation to give up on the scan and cleanup a bit faster. I don't have mpt3sas HW, so that part of the patch is untested (though the code looks 99% the same here.) Regards, -- Joe >From 9900a0a30464ef1fff67f28780ec036d3d7d0cbe Mon Sep 17 00:00:00 2001 From: Joe Lawrence Date: Wed, 13

Re: Kernel oops on st module cycling

2013-02-22 Thread Joe Lawrence
On Fri, 22 Feb 2013, Jean Delvare wrote: > Hi Kai, James, > > It only takes a few st module rmmod/modprobe cycles to get a kernel > oops. It was reported to me, and reproduced by me, on kernel 3.0.58 / > SLES11 SP2, but I was also able to reproduce it on more recent kernels > (3.4.6 / openSUSE 12

[PATCH 0/2] LSI SAS device removal fixes

2013-03-04 Thread Joe Lawrence
wait the entire async scan timeout period of five minutes. Joe Lawrence (2): mptfusion, mpt2sas, mpt3sas: Don't remove dead IOC PCI device mpt2sas, mpt3sas: set async scan finished on adapter removal drivers/message/fusion/mptbase.c | 41 +--

[PATCH 1/2] mptfusion, mpt2sas, mpt3sas: Don't remove dead IOC PCI device

2013-03-04 Thread Joe Lawrence
outstanding commands and sets IOC state. Signed-off-by: Joe Lawrence Cc: Bjorn Helgaas Cc: James E.J. Bottomley Cc: Nagalakshmi Nandigama Cc: Sreekanth Reddy Cc: supp...@lsi.com Cc: dl-mptfusionli...@lsi.com Cc: linux-scsi@vger.kernel.org --- drivers/message/fusion/mptbase.c| 41

[PATCH 2/2] mpt2sas, mpt3sas: set async scan finished on adapter removal

2013-03-04 Thread Joe Lawrence
complete. Signed-off-by: Joe Lawrence Cc: James E.J. Bottomley Cc: Nagalakshmi Nandigama Cc: Sreekanth Reddy Cc: supp...@lsi.com Cc: dl-mptfusionli...@lsi.com Cc: linux-scsi@vger.kernel.org --- drivers/scsi/mpt2sas/mpt2sas_scsih.c | 10 -- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 12

[PATCH] st: Take additional queue ref in st_probe

2013-03-04 Thread Joe Lawrence
driver issues [2]. [1] https://lkml.org/lkml/2012/8/27/354 [2] https://lkml.org/lkml/2012/9/22/113 Regards, -- Joe >From f209bda3ee16a70e714b55c372ed4265bfa91784 Mon Sep 17 00:00:00 2001 From: Joe Lawrence Date: Fri, 1 Mar 2013 17:32:30 -0500 Subject: [PATCH] st: Take additional queue ref in st

[PATCH v2] st: Take additional queue ref in st_probe

2013-03-05 Thread Joe Lawrence
made to fix this bug at the block level [1] but later abandoned due to floppy driver issues [2]. [1] https://lkml.org/lkml/2012/8/27/354 [2] https://lkml.org/lkml/2012/9/22/113 >From a50a6ee28748b7c1620af6f76772164ec0fc4a1d Mon Sep 17 00:00:00 2001 From: Joe Lawrence Date: Tue, 5 Mar 2013 09:

Re: [PATCH 1/2] mptfusion, mpt2sas, mpt3sas: Don't remove dead IOC PCI device

2013-03-06 Thread Joe Lawrence
On Wed, 6 Mar 2013 12:01:37 -0500 "Desai, Kashyap" wrote: > Please reject this Patch. I have made required changes which will > remove PCI system's call from mptsas/mpt2sas/mpt3sas. I will be > sending that patch to upstream. Currently waiting to do more testing > on new patch. > > Thanks for co

[PATCH] block,scsi: verify return pointer from blk_get_request

2013-03-17 Thread Joe Lawrence
blk_get_request returned a NULL struct request pointer, but __blk_send_generic continued on without checking it first. Regards, -- Joe >From 7450cd8ac7bc247439fe890e000c81e3653d2832 Mon Sep 17 00:00:00 2001 From: Joe Lawrence Date: Sat, 16 Mar 2013 19:45:04 -0400 Subject: [PATCH] block,scsi:

[PATCH v2] block: handle pointer error from blk_get_request

2013-03-26 Thread Joe Lawrence
quest, updating callers accordingly. Thanks, -- Joe >From 7122dd3ba8c3b1e7edff42ff9c21247fcf4379c2 Mon Sep 17 00:00:00 2001 From: Joe Lawrence Date: Tue, 26 Mar 2013 14:30:28 -0400 Subject: [PATCH v2] block: handle pointer error from blk_get_request The blk_get_request function may fail in lo

[PATCH v3] block: handle pointer error from blk_get_request

2013-03-26 Thread Joe Lawrence
that does bother to check the return pointer. Regards, -- Joe >From 05646b66021df447207e327e3c7c8692a506cd4b Mon Sep 17 00:00:00 2001 From: Joe Lawrence Date: Tue, 26 Mar 2013 18:03:26 -0400 Subject: [PATCH v3] block: handle pointer error from blk_get_request The blk_get_request function

Re: [patch] scsi_dh_hp_sw.c: return DEV_OFFLINED when blk_get_request fails

2013-03-28 Thread Joe Lawrence
On Thu, 28 Mar 2013 15:32:12 -0400 Jeff Moyer wrote: > Hi, > > If blk_get_requet fails here, it means that the queue is dead. It > seems better to return a DEV_OFFLINED error code than the misleading > TEMP_UNAVAIL. Comments? > > Signed-off-by: Jeff Moyer > > diff --git a/drivers/scsi/devic

Re: mpt2sas + raid10 goes boom

2013-04-08 Thread Joe Lawrence
On Mon, 8 Apr 2013 03:53:51 -0400 "Chris Dunlop" wrote: > Upon reflection, given this smells like a controller issue, this > may be better addressed to linux-scsi@vger.kernel.org... > > On Mon, Apr 08, 2013 at 05:18:34PM +1000, Chris Dunlop wrote: [... snip ...] > Apr 8 15:08:53 b4 kernel: [ 4

Re: [PATCH v10 0/9] More device removal fixes

2013-05-08 Thread Joe Lawrence
On Sun, 07 Apr 2013 16:55:33 +0200 Bart Van Assche wrote: > Fix a few issues that can be triggered by removing a device: > - Fix a race between starved list processing and device removal. > - Avoid that a SCSI LLD callback can get invoked after >scsi_remove_host() finished. > - Speed up devic

mpt2sas,mpt3sas watchdog device removal

2013-05-15 Thread Joe Lawrence
This is a followup to the earlier discussion of MPT watchdog device removal calling directly into PCI core API: [1] http://thread.gmane.org/gmane.linux.scsi/80629 I've tested two safer, alternative methods of removing MPT hosts from the SCSI topology. Both involve wrapping the existing MPT .remov

[PATCH] mpt2sas,mpt3sas: make watchdog instantiated device removal safe

2013-05-15 Thread Joe Lawrence
>From 9fc1a958ad48718216fbdc19405297dd11d11539 Mon Sep 17 00:00:00 2001 From: Joe Lawrence Date: Tue, 14 May 2013 15:41:17 -0400 Subject: [PATCH] mpt2sas,mpt3sas: make watchdog instantiated device removal safe Calling pci_stop_and_remove_bus_device from a SCSI LLD may introduce device remo

Re: mpt2sas,mpt3sas watchdog device removal

2013-05-15 Thread Joe Lawrence
>From 84ac7a35ebd61e84d4254eae78bb967de17254c2 Mon Sep 17 00:00:00 2001 From: Joe Lawrence Date: Wed, 15 May 2013 12:52:31 -0400 Subject: [PATCH] mpt2sas,mpt3sas: make watchdog instantiated device removal safe Calling pci_stop_and_remove_bus_device from a SCSI LLD may introduce device remo

Re: mpt2sas,mpt3sas watchdog device removal

2013-10-21 Thread Joe Lawrence
On Thu, 10 Oct 2013 15:59:28 -0600 Bjorn Helgaas wrote: > On Fri, May 17, 2013 at 3:42 PM, Joe Lawrence > wrote: > > On Fri, 17 May 2013 09:29:06 -0600 > > Bjorn Helgaas wrote: > > > >> [+cc linux-pci] > >> > >> On Wed, May 15, 2013

[PATCH v6 2/2] block,scsi: convert and handle ERR_PTR from blk_get_request

2013-10-31 Thread Joe Lawrence
instead of a simple NULL pointer check. Signed-off-by: Joe Lawrence --- block/blk-core.c| 34 ++--- block/bsg.c | 8 +++ block/scsi_ioctl.c | 12 +- drivers/block/paride/pd.c

[PATCH v6 0/2] block,scsi: fixup blk_get_request dead queue scenarios

2013-10-31 Thread Joe Lawrence
set, the ioctl fails and returns ENODEV. Changes from v6: - rebase to latest linux-block, for-3.13/core branch - provide bug repro Regards, [1] http://thread.gmane.org/gmane.linux.scsi/80934 [2] http://thread.gmane.org/gmane.linux.kernel/1502882 Joe Lawrence (2): block,scsi: verify return po

[PATCH v6 1/2] block,scsi: verify return pointer from blk_get_request

2013-10-31 Thread Joe Lawrence
The blk-core dead queue checks introduce an error scenario to blk_get_request that returns NULL if the request queue has been shutdown. This affects the behavior for __GFP_WAIT callers, who should verify the return value before dereferencing. Signed-off-by: Joe Lawrence --- block/scsi_ioctl.c

Re: PATCH: st.c: Fix blk_get_queue usage

2013-11-14 Thread Joe Lawrence
On Thu, 14 Nov 2013 20:22:40 +0100 Bodo Stroesser wrote: > On 14.11.2013, at 20.05, Kai M??kisara (Kolumbus) > wrote: > > > > > On 14.11.2013, at 16.48, Bodo Stroesser wrote: > > > > > Hi, > > > > > > in st_probe(), st.c I stumbled across what I'd call a minor problem. > > > > > > So I'd

Re: PATCH: st.c: Fix blk_get_queue usage

2013-11-15 Thread Joe Lawrence
On Fri, 15 Nov 2013 12:23:06 +0100 Bodo Stroesser wrote: > On 14.11.2013, at 22.50, Joe Lawrence wrote: > > > On Thu, 14 Nov 2013 20:22:40 +0100 > > Bodo Stroesser wrote: > > > > > On 14.11.2013, at 20.05, Kai M??kisara (Kolumbus) > > > wrote:

sysfs group not found for kobject on mpt2sas unload

2013-11-20 Thread Joe Lawrence
Starting in 3.12, when loading and unloading the mpt2sas driver, I see the following warning: [ cut here ] WARNING: CPU: 20 PID: 19096 at fs/sysfs/group.c:214 sysfs_remove_group+0xc6/0xd0() sysfs group 81ca2f40 not found for kobject 'end_device-30:0' Modules linked

Re: sysfs group not found for kobject on mpt2sas unload

2013-11-25 Thread Joe Lawrence
On Wed, 20 Nov 2013 14:08:40 -0500 Joe Lawrence wrote: > Starting in 3.12, when loading and unloading the mpt2sas driver, I see > the following warning: > > [ cut here ] > WARNING: CPU: 20 PID: 19096 at fs/sysfs/group.c:214 > sysfs_remove_group+0xc6/0x

Re: sysfs group not found for kobject on mpt2sas unload

2013-12-03 Thread Joe Lawrence
On Mon, 25 Nov 2013 11:23:39 -0500 Joe Lawrence wrote: > On Wed, 20 Nov 2013 14:08:40 -0500 > Joe Lawrence wrote: > > > Starting in 3.12, when loading and unloading the mpt2sas driver, I see > > the following warning: > > > > [ cut here ]

[PATCH] scsi_transport_sas: move bsg destructor into sas_rphy_remove

2013-12-03 Thread Joe Lawrence
B, C, A. Note the sas_device and sas_end_device transport class devices (B and C above) are created and destroyed both via the list match traversal in attribute_container_device_trigger, so the order in which they are handled is fixed. This is fine as long as they are deleted before their parent device.

Re: mpt2sas driver barfs when force removing a drive on 3.13.1

2014-02-03 Thread Joe Lawrence
a lot like what I see on mpt2sas driver removal [1]. I posted a suggested fix back in Dec [2], which you might try, however it is not reviewed at this point. [1] http://thread.gmane.org/gmane.linux.scsi/86237 [2] https://github.com/joe-lawrence/linux/compare/scsi_transport_sas_sysfs_warning.patch

Re: mpt2sas driver barfs when force removing a drive on 3.13.1

2014-02-12 Thread Joe Lawrence
g the same WARNING call > trace on latest 3.14.0-rc2+ kernel whenever we unload the mpt2sas/mpt3sas > driver or whenever we unplug the drive attached to the HBA. > But after applying yours patch, these WARNING call trace is not observed. > > Regards, > Sreekanth > > >-

Re: [PATCH] scsi_transport_sas: move bsg destructor into sas_rphy_remove

2014-02-21 Thread Joe Lawrence
On Wed, 12 Feb 2014 11:13:22 -0800 Dan Williams wrote: > > Acked-by: Dan Williams > > I think this is the right move, and some follow-up cleanups / fixes > come to mind: Dan -- Thanks for taking a look. A few comments below. > 1/ Why is sas_bsg_remove() multiplexing 2 use cases? Let's just

Re: [PATCH RESEND] scsi_transport_sas: move bsg destructor into sas_rphy_remove

2014-04-02 Thread Joe Lawrence
On Wed, 2 Apr 2014 16:40:41 -0400 Joe Lawrence wrote: > Since bsg creation is a side effect of sas_rphy_add, move its > complementary removal call into sas_rphy_remove. Hello James, This a resend of a patch posted to quiet an end-device sysfs warning in its device deletion path when re

[PATCH RESEND] scsi_transport_sas: move bsg destructor into sas_rphy_remove

2014-04-02 Thread Joe Lawrence
B, C, A. Note the sas_device and sas_end_device transport class devices (B and C above) are created and destroyed both via the list match traversal in attribute_container_device_trigger, so the order in which they are handled is fixed. This is fine as long as they are deleted before their parent device.

Re: 3.15-mw: Oops Workqueue: writeback bdi_writeback_workfn (flush-8:16) RIP: e030:[] [] kobject_put+0x11/0x70

2014-04-14 Thread Joe Lawrence
On Mon, 14 Apr 2014 04:30:15 -0700 Christoph Hellwig wrote: > On Sat, Apr 12, 2014 at 01:34:31PM +0200, Sander Eikelenboom wrote: > > Hi, > > > > I just ran into the oops belowafter some uptime. > > Classic use after free introduced by my recent changes, sorry. > > This should fix it: > > ---

Re: [PATCH RESEND] scsi_transport_sas: move bsg destructor into sas_rphy_remove

2014-05-02 Thread Joe Lawrence
On Wed, 2 Apr 2014 16:48:52 -0400 Joe Lawrence wrote: > On Wed, 2 Apr 2014 16:40:41 -0400 > Joe Lawrence wrote: > > > Since bsg creation is a side effect of sas_rphy_add, move its > > complementary removal call into sas_rphy_remove. > > Hello James, > > T

[PATCH] scsi_transport_sas: move bsg destructor into sas_rphy_remove

2014-05-22 Thread Joe Lawrence
B, C, A. Note the sas_device and sas_end_device transport class devices (B and C above) are created and destroyed both via the list match traversal in attribute_container_device_trigger, so the order in which they are handled is fixed. This is fine as long as they are deleted before their parent device.

Re: Make SCSI error handler code easier to understand

2014-05-28 Thread Joe Lawrence
On Mon, 26 May 2014 17:12:27 +0200 Bart Van Assche wrote: > Every now and then someone asks how it is avoided that the SCSI error > handler and the SCSI completion handler are invoked concurrently for > the same SCSI command. Hence this patch series that should make the SCSI > error handler code

[PATCH 1/4] mpt2sas: correct scsi_{target,device} hostdata allocation

2014-06-02 Thread Joe Lawrence
warn: struct type mismatch 'MPT2SAS_DEVICE vs scsi_device' Signed-off-by: Joe Lawrence Cc: Dan Carpenter Cc: Sreekanth Reddy --- drivers/scsi/mpt2sas/mpt2sas_scsih.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih

[PATCH 0/4] mpt2/mpt3 static checker fixups

2014-06-02 Thread Joe Lawrence
Hello Sreekanth, Dan, These are a few minor smatch and sparse static checker fixes for the LSI mpt2 and mpt3 drivers. The first three fix real potential bugs and the last cleans up a noisy complaint from sparse. Joe Lawrence (4): mpt2sas: correct scsi_{target,device} hostdata allocation

[PATCH 3/4] mpt3sas: fix possible memory leak in mpt3sas_send_trigger_data_event

2014-06-02 Thread Joe Lawrence
Signed-off-by: Joe Lawrence Cc: Dan Carpenter Cc: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_scsih.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index e6f0720..25e3a22 100644 --- a/dr

  1   2   >