Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-17 Thread Martin K. Petersen
> "Christoph" == Christoph Hellwig writes: Christoph> On Tue, Jan 17, 2017 at 07:43:51PM +0530, Sreekanth Reddy wrote: >> [Sreekanth] Just for readability purpose, can use use "if >> (test_bit(0, _device_priv_data->ata_command_pending)" instead of >> "if

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-17 Thread Martin K. Petersen
> "Christoph" == Christoph Hellwig writes: Christoph> On Tue, Jan 17, 2017 at 07:43:51PM +0530, Sreekanth Reddy wrote: >> [Sreekanth] Just for readability purpose, can use use "if >> (test_bit(0, _device_priv_data->ata_command_pending)" instead of >> "if

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-17 Thread James Bottomley
On Tue, 2017-01-17 at 19:43 +0530, Sreekanth Reddy wrote: > On Tue, Jan 17, 2017 at 1:31 AM, James Bottomley > wrote: > > From 91d249409546569444897a1ffde65c421e064899 Mon Sep 17 00:00:00 > > 2001 > > From: James Bottomley

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-17 Thread James Bottomley
On Tue, 2017-01-17 at 19:43 +0530, Sreekanth Reddy wrote: > On Tue, Jan 17, 2017 at 1:31 AM, James Bottomley > wrote: > > From 91d249409546569444897a1ffde65c421e064899 Mon Sep 17 00:00:00 > > 2001 > > From: James Bottomley > > Date: Sun, 1 Jan 2017 09:39:24 -0800 > > Subject: [PATCH] scsi:

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-17 Thread Christoph Hellwig
On Tue, Jan 17, 2017 at 07:43:51PM +0530, Sreekanth Reddy wrote: > [Sreekanth] Just for readability purpose, can use use "if (test_bit(0, > _device_priv_data->ata_command_pending)" > instead of "if (sas_device_priv_data->ata_command_pending)". > Since while setting & clearing the bit we are using

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-17 Thread Christoph Hellwig
On Tue, Jan 17, 2017 at 07:43:51PM +0530, Sreekanth Reddy wrote: > [Sreekanth] Just for readability purpose, can use use "if (test_bit(0, > _device_priv_data->ata_command_pending)" > instead of "if (sas_device_priv_data->ata_command_pending)". > Since while setting & clearing the bit we are using

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-17 Thread Sreekanth Reddy
On Tue, Jan 17, 2017 at 1:31 AM, James Bottomley wrote: > From 91d249409546569444897a1ffde65c421e064899 Mon Sep 17 00:00:00 2001 > From: James Bottomley > Date: Sun, 1 Jan 2017 09:39:24 -0800 > Subject: [PATCH] scsi:

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-17 Thread Sreekanth Reddy
On Tue, Jan 17, 2017 at 1:31 AM, James Bottomley wrote: > From 91d249409546569444897a1ffde65c421e064899 Mon Sep 17 00:00:00 2001 > From: James Bottomley > Date: Sun, 1 Jan 2017 09:39:24 -0800 > Subject: [PATCH] scsi: mpt3sas: fix hang on ata passthrough commands > > mpt3sas has a firmware

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-17 Thread Ingo Molnar
* Martin K. Petersen wrote: > > "James" == James Bottomley > > writes: > > James> Subject: [PATCH] scsi: mpt3sas: fix hang on ata passthrough > James> commands > > James> mpt3sas has a firmware failure where it can

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-17 Thread Ingo Molnar
* Martin K. Petersen wrote: > > "James" == James Bottomley > > writes: > > James> Subject: [PATCH] scsi: mpt3sas: fix hang on ata passthrough > James> commands > > James> mpt3sas has a firmware failure where it can only handle one pass > James> through ATA command at a time. If

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-16 Thread Martin K. Petersen
> "James" == James Bottomley writes: James> Subject: [PATCH] scsi: mpt3sas: fix hang on ata passthrough James> commands James> mpt3sas has a firmware failure where it can only handle one pass James> through ATA command at a time. If another comes in,

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-16 Thread Martin K. Petersen
> "James" == James Bottomley writes: James> Subject: [PATCH] scsi: mpt3sas: fix hang on ata passthrough James> commands James> mpt3sas has a firmware failure where it can only handle one pass James> through ATA command at a time. If another comes in, contrary to James> the SAT standard, it

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-16 Thread James Bottomley
>From 91d249409546569444897a1ffde65c421e064899 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Sun, 1 Jan 2017 09:39:24 -0800 Subject: [PATCH] scsi: mpt3sas: fix hang on ata passthrough commands mpt3sas has a firmware failure where it can only handle

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-16 Thread James Bottomley
>From 91d249409546569444897a1ffde65c421e064899 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Sun, 1 Jan 2017 09:39:24 -0800 Subject: [PATCH] scsi: mpt3sas: fix hang on ata passthrough commands mpt3sas has a firmware failure where it can only handle one pass through ATA command at a time.

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-16 Thread Bart Van Assche
On Sun, 2017-01-15 at 09:01 -0800, James Bottomley wrote: > From b47c28434e9cee9cbb95a794c97ec53657408111 Mon Sep 17 00:00:00 2001 > From: James Bottomley <j...@linux.vnet.ibm.com> > Date: Sun, 1 Jan 2017 09:39:24 -0800 > Subject: [PATCH] scsi: mpt3sas: fix hang on ata

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-16 Thread Bart Van Assche
On Sun, 2017-01-15 at 09:01 -0800, James Bottomley wrote: > From b47c28434e9cee9cbb95a794c97ec53657408111 Mon Sep 17 00:00:00 2001 > From: James Bottomley > Date: Sun, 1 Jan 2017 09:39:24 -0800 > Subject: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands > > mp3sas has

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-15 Thread James Bottomley
? James --- >From b47c28434e9cee9cbb95a794c97ec53657408111 Mon Sep 17 00:00:00 2001 From: James Bottomley <j...@linux.vnet.ibm.com> Date: Sun, 1 Jan 2017 09:39:24 -0800 Subject: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands mp3sas has a firmware failure where it can only handle

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-15 Thread James Bottomley
James --- >From b47c28434e9cee9cbb95a794c97ec53657408111 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Sun, 1 Jan 2017 09:39:24 -0800 Subject: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands mp3sas has a firmware failure where it can only handle one pass through ATA command

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-09 Thread Martin K. Petersen
> "Sreekanth" == Sreekanth Reddy writes: Sreekanth> We are fine with this patch. Can we rename function Sreekanth> 'set_satl_pending()' name to '_scsih_set_satl_pending()' and Sreekanth> can add headers to this function. Sreekanth> other wise I am OK.

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-09 Thread Martin K. Petersen
> "Sreekanth" == Sreekanth Reddy writes: Sreekanth> We are fine with this patch. Can we rename function Sreekanth> 'set_satl_pending()' name to '_scsih_set_satl_pending()' and Sreekanth> can add headers to this function. Sreekanth> other wise I am OK. Sreekanth> Acked-by: Sreekanth Reddy

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-06 Thread Sreekanth Reddy
On Fri, Jan 6, 2017 at 7:29 AM, Martin K. Petersen wrote: >> "James" == James Bottomley writes: > > James> Now that I look at the reviews, each of the reviewers said what > James> the correct thing to do was: return SAM_STAT_BUSY if SATL >

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-06 Thread Sreekanth Reddy
On Fri, Jan 6, 2017 at 7:29 AM, Martin K. Petersen wrote: >> "James" == James Bottomley writes: > > James> Now that I look at the reviews, each of the reviewers said what > James> the correct thing to do was: return SAM_STAT_BUSY if SATL > James> commands are outstanding like the spec says.

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-05 Thread Martin K. Petersen
> "James" == James Bottomley writes: James> Now that I look at the reviews, each of the reviewers said what James> the correct thing to do was: return SAM_STAT_BUSY if SATL James> commands are outstanding like the spec says. You all get James> negative brownie

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-05 Thread Martin K. Petersen
> "James" == James Bottomley writes: James> Now that I look at the reviews, each of the reviewers said what James> the correct thing to do was: return SAM_STAT_BUSY if SATL James> commands are outstanding like the spec says. You all get James> negative brownie points for not insisting on a

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-03 Thread Jason Baron
On 01/01/2017 12:39 PM, James Bottomley wrote: On Sun, 2017-01-01 at 11:33 -0500, David Miller wrote: From: Bart Van Assche Date: Sun, 1 Jan 2017 14:22:11 + My recommendation is to revert commit 18f6084a989b ("scsi: mpt3sas: Fix secure erase premature

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-03 Thread Jason Baron
On 01/01/2017 12:39 PM, James Bottomley wrote: On Sun, 2017-01-01 at 11:33 -0500, David Miller wrote: From: Bart Van Assche Date: Sun, 1 Jan 2017 14:22:11 + My recommendation is to revert commit 18f6084a989b ("scsi: mpt3sas: Fix secure erase premature termination"). Since the mpt3sas

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-01 Thread James Bottomley
On Sun, 2017-01-01 at 11:33 -0500, David Miller wrote: > From: Bart Van Assche > Date: Sun, 1 Jan 2017 14:22:11 + > > > My recommendation is to revert commit 18f6084a989b ("scsi: mpt3sas: Fix > > secure erase premature termination"). Since the mpt3sas driver uses

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-01 Thread James Bottomley
On Sun, 2017-01-01 at 11:33 -0500, David Miller wrote: > From: Bart Van Assche > Date: Sun, 1 Jan 2017 14:22:11 + > > > My recommendation is to revert commit 18f6084a989b ("scsi: mpt3sas: Fix > > secure erase premature termination"). Since the mpt3sas driver uses the > > single-queue

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-01 Thread David Miller
From: Bart Van Assche Date: Sun, 1 Jan 2017 14:22:11 + > My recommendation is to revert commit 18f6084a989b ("scsi: mpt3sas: Fix > secure erase premature termination"). Since the mpt3sas driver uses the > single-queue approach and since the SCSI core unlocks the

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-01 Thread David Miller
From: Bart Van Assche Date: Sun, 1 Jan 2017 14:22:11 + > My recommendation is to revert commit 18f6084a989b ("scsi: mpt3sas: Fix > secure erase premature termination"). Since the mpt3sas driver uses the > single-queue approach and since the SCSI core unlocks the block layer > request queue

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-01 Thread Jason Baron
On 01/01/2017 09:22 AM, Bart Van Assche wrote: > On Sat, 2016-12-31 at 15:19 -0800, James Bottomley wrote: >> On Thu, 2016-12-29 at 00:02 -0800, Christoph Hellwig wrote: >>> On Wed, Dec 28, 2016 at 11:30:24PM -0500, Jason Baron wrote: Add a new parameter to scsi_internal_device_block() to

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-01 Thread Jason Baron
On 01/01/2017 09:22 AM, Bart Van Assche wrote: > On Sat, 2016-12-31 at 15:19 -0800, James Bottomley wrote: >> On Thu, 2016-12-29 at 00:02 -0800, Christoph Hellwig wrote: >>> On Wed, Dec 28, 2016 at 11:30:24PM -0500, Jason Baron wrote: Add a new parameter to scsi_internal_device_block() to

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-01 Thread Bart Van Assche
On Sat, 2016-12-31 at 15:19 -0800, James Bottomley wrote: > On Thu, 2016-12-29 at 00:02 -0800, Christoph Hellwig wrote: > > On Wed, Dec 28, 2016 at 11:30:24PM -0500, Jason Baron wrote: > > > Add a new parameter to scsi_internal_device_block() to decide > > > whether or not to invoke

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-01 Thread Bart Van Assche
On Sat, 2016-12-31 at 15:19 -0800, James Bottomley wrote: > On Thu, 2016-12-29 at 00:02 -0800, Christoph Hellwig wrote: > > On Wed, Dec 28, 2016 at 11:30:24PM -0500, Jason Baron wrote: > > > Add a new parameter to scsi_internal_device_block() to decide > > > whether or not to invoke

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2016-12-31 Thread James Bottomley
On Thu, 2016-12-29 at 00:02 -0800, Christoph Hellwig wrote: > On Wed, Dec 28, 2016 at 11:30:24PM -0500, Jason Baron wrote: > > Add a new parameter to scsi_internal_device_block() to decide > > whether or not to invoke scsi_wait_for_queuecommand(). > > We'll also need to deal with the blk-mq wait

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2016-12-31 Thread James Bottomley
On Thu, 2016-12-29 at 00:02 -0800, Christoph Hellwig wrote: > On Wed, Dec 28, 2016 at 11:30:24PM -0500, Jason Baron wrote: > > Add a new parameter to scsi_internal_device_block() to decide > > whether or not to invoke scsi_wait_for_queuecommand(). > > We'll also need to deal with the blk-mq wait

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2016-12-29 Thread David Miller
From: Jason Baron Date: Wed, 28 Dec 2016 23:30:24 -0500 > On ata passthru commands scsih_qcmd() ends up spinning in > scsi_wait_for_queuecommand() indefinitely. scsih_qcmd() is called from > __blk_run_queue_uncond() which first increments request_fn_active to a > non-zero

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2016-12-29 Thread David Miller
From: Jason Baron Date: Wed, 28 Dec 2016 23:30:24 -0500 > On ata passthru commands scsih_qcmd() ends up spinning in > scsi_wait_for_queuecommand() indefinitely. scsih_qcmd() is called from > __blk_run_queue_uncond() which first increments request_fn_active to a > non-zero value. Thus,

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2016-12-29 Thread Jason Baron
On 12/29/2016 03:02 AM, Christoph Hellwig wrote: > On Wed, Dec 28, 2016 at 11:30:24PM -0500, Jason Baron wrote: >> Add a new parameter to scsi_internal_device_block() to decide whether >> or not to invoke scsi_wait_for_queuecommand(). > We'll also need to deal with the blk-mq wait path that Bart

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2016-12-29 Thread Jason Baron
On 12/29/2016 03:02 AM, Christoph Hellwig wrote: > On Wed, Dec 28, 2016 at 11:30:24PM -0500, Jason Baron wrote: >> Add a new parameter to scsi_internal_device_block() to decide whether >> or not to invoke scsi_wait_for_queuecommand(). > We'll also need to deal with the blk-mq wait path that Bart

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2016-12-29 Thread Christoph Hellwig
On Wed, Dec 28, 2016 at 11:30:24PM -0500, Jason Baron wrote: > Add a new parameter to scsi_internal_device_block() to decide whether > or not to invoke scsi_wait_for_queuecommand(). We'll also need to deal with the blk-mq wait path that Bart has been working on (I think it's already in the scsi

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2016-12-29 Thread Christoph Hellwig
On Wed, Dec 28, 2016 at 11:30:24PM -0500, Jason Baron wrote: > Add a new parameter to scsi_internal_device_block() to decide whether > or not to invoke scsi_wait_for_queuecommand(). We'll also need to deal with the blk-mq wait path that Bart has been working on (I think it's already in the scsi

[PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2016-12-28 Thread Jason Baron
On ata passthru commands scsih_qcmd() ends up spinning in scsi_wait_for_queuecommand() indefinitely. scsih_qcmd() is called from __blk_run_queue_uncond() which first increments request_fn_active to a non-zero value. Thus, scsi_wait_for_queuecommand() never completes because its spinning waiting

[PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2016-12-28 Thread Jason Baron
On ata passthru commands scsih_qcmd() ends up spinning in scsi_wait_for_queuecommand() indefinitely. scsih_qcmd() is called from __blk_run_queue_uncond() which first increments request_fn_active to a non-zero value. Thus, scsi_wait_for_queuecommand() never completes because its spinning waiting