Re: [PATCH] scsi: export function scsi_scan.c:sanitize_inquiry_string

2016-01-20 Thread Johannes Thumshirn
On Wed, Jan 20, 2016 at 01:41:41PM -0600, Don Brace wrote: > The hpsa driver uses this function to cleanup inquiry > data. Our new pqi driver will also use this > function. This function was copied into both drivers. > > This patch exports sanitize_inquiry_string so the hpsa > and the pqi drivers

[PATCH 0/2] scsi: Fix endless loop of ATA hard resets due to VPD reads

2016-01-20 Thread Alexander Duyck
Recent changes to the kernel pulled in during the merge window have resulted in my system generating an endless loop of the following type of errors: [ 318.965756] ata14: SATA link up 1.5 Gbps (SStatus 113 SControl 300) [ 318.968457] ata14.00: configured for UDMA/66 [ 318.970656] ata14: EH

[PATCH 1/2] scsi: Do not attach VPD to devices that don't support it

2016-01-20 Thread Alexander Duyck
The patch "scsi: rescan VPD attributes" introduced a regression in which devices that don't support VPD were being scanned for VPD attributes anyway. This could cause issues for this parts and should be avoided so the check for scsi_level has been moved out of scsi_add_lun and into

[PATCH 2/2] scsi: Fix RCU handling for VPD pages

2016-01-20 Thread Alexander Duyck
This patch is meant to fix the RCU handling for VPD pages. The original code had a number of issues including the fact that the local variables were being declared as __rcu, the RCU variable being directly accessed outside of the RCU locked region, and the fact that length was not associated with

Re: [PATCH 2/2] scsi: Fix RCU handling for VPD pages

2016-01-20 Thread Hannes Reinecke
On 01/21/2016 07:35 AM, Alexander Duyck wrote: > This patch is meant to fix the RCU handling for VPD pages. The original > code had a number of issues including the fact that the local variables > were being declared as __rcu, the RCU variable being directly accessed > outside of the RCU locked

Re: [PATCH 1/2] scsi: Do not attach VPD to devices that don't support it

2016-01-20 Thread Hannes Reinecke
On 01/21/2016 07:35 AM, Alexander Duyck wrote: > The patch "scsi: rescan VPD attributes" introduced a regression in which > devices that don't support VPD were being scanned for VPD attributes > anyway. This could cause issues for this parts and should be avoided so > the check for scsi_level has

RE: [PATCH 09/15] megaraid_sas: Dual Queue depth support

2016-01-20 Thread Sumit Saxena
> -Original Message- > From: Tomas Henzl [mailto:the...@redhat.com] > Sent: Wednesday, January 20, 2016 7:46 PM > To: Sumit Saxena; jbottom...@parallels.com; h...@infradead.org; > martin.peter...@oracle.com > Cc: linux-scsi@vger.kernel.org; Kashyap Desai > Subject: Re: [PATCH 09/15]

[PATCH] lpfc: Remove redundant code block in lpfc_scsi_cmd_iocb_cmpl

2016-01-20 Thread Johannes Thumshirn
This removes a redundant code block that will either be executed if the ENABLE_FCP_RING_POLLING flag is set in phba->cfg_poll or not. The code is just duplicated in both cases, hence we unify it again. This probably is a left over from some sort of refactoring. Signed-off-by: Johannes Thumshirn

Re: [PATCH] lpfc: Remove redundant code block in lpfc_scsi_cmd_iocb_cmpl

2016-01-20 Thread Matthew R. Ochs
Reviewed-by: Matthew R. Ochs -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH] SCSI: fix crashes in sd and sr runtime PM

2016-01-20 Thread Alan Stern
Runtime suspend during driver probe and removal can cause problems. The driver's runtime_suspend or runtime_resume callbacks may invoked before the driver has finished binding to the device or after the driver has unbound from the device. This problem shows up with the sd and sr drivers, and can

Re: [PATCH] sd: Optimal I/O size is in bytes, not sectors

2016-01-20 Thread Martin K. Petersen
> "James" == James Bottomley writes: James> We should mark the commit causing the problems, which went into James> 4.4 if I remember correctly: James> Fixes: ca369d51b3e1649be4a72addd6d6a168cfb3f537 Cc: James> sta...@vger.kernel.org # 4.4+ Reviewed-by:

Re: [PATCH] sd: Optimal I/O size is in bytes, not sectors

2016-01-20 Thread James Bottomley
On Wed, 2016-01-20 at 11:01 -0500, Martin K. Petersen wrote: > Commit ca369d51b3e1 ("block/sd: Fix device-imposed transfer length > limits") accidentally switched optimal I/O size reporting from bytes > to > block layer sectors. > > Signed-off-by: Martin K. Petersen >

[PATCH] sd: Optimal I/O size is in bytes, not sectors

2016-01-20 Thread Martin K. Petersen
Commit ca369d51b3e1 ("block/sd: Fix device-imposed transfer length limits") accidentally switched optimal I/O size reporting from bytes to block layer sectors. Signed-off-by: Martin K. Petersen Reported-by: Christian Borntraeger ---

Re: [PATCH] sd: Optimal I/O size is in bytes, not sectors

2016-01-20 Thread Ewan Milne
On Wed, 2016-01-20 at 11:01 -0500, Martin K. Petersen wrote: > Commit ca369d51b3e1 ("block/sd: Fix device-imposed transfer length > limits") accidentally switched optimal I/O size reporting from bytes to > block layer sectors. > > Signed-off-by: Martin K. Petersen >

Re: scsi-debug regression with 4.5-rc?

2016-01-20 Thread Ewan Milne
So I have a report from our test people that the optimal_io_size sysfs value is now different by a factor of 512 from what it used to be... >Here is what is executed: > >modprobe scsi_debug dev_size_mb=32 sector_size=4096 opt_blks=64 >num_tgts=1 > >And here is what our test is capturing: >

[PATCH RESEND] lpfc: Add lockdep assertions

2016-01-20 Thread Johannes Thumshirn
Several functions in lpfc have comments stating that the function must be called with the hbalock (or hostlock, or ringlock) held. Add lockdep_assert_held() annotations to these functions, so one can actually verify the locks are held. Signed-off-by: Johannes Thumshirn ---

Re: [PATCH] lpfc: Fix race on command completion

2016-01-20 Thread Tomas Henzl
On 15.1.2016 10:48, Hannes Reinecke wrote: > Upon command completion the lpfc driver would call ->done() > on the scsi command before taking the host lock and > releasing the command internally. > This opens up a race window there this command might be re-used > after ->done(), leading to a double

Re: [PATCH 09/15] megaraid_sas: Dual Queue depth support

2016-01-20 Thread Tomas Henzl
On 20.1.2016 16:08, Sumit Saxena wrote: >> -Original Message- >> From: Tomas Henzl [mailto:the...@redhat.com] >> Sent: Wednesday, January 20, 2016 7:46 PM >> To: Sumit Saxena; jbottom...@parallels.com; h...@infradead.org; >> martin.peter...@oracle.com >> Cc: linux-scsi@vger.kernel.org;

Re: [PATCH] scsi: qla2xxxx: avoid type mismatch in comparison

2016-01-20 Thread Bart Van Assche
On 01/20/2016 02:47 AM, Arnd Bergmann wrote: A recent bug fix added code that does bool logged_out = (status & 0x); if (logged_out == CTIO_PORT_LOGGED_OUT) ... This looks wrong because we are comparing a boolean with an integer constant, ang gcc warns

Re: [PATCH] sd: Optimal I/O size is in bytes, not sectors

2016-01-20 Thread Johannes Thumshirn
On Wed, Jan 20, 2016 at 11:01:23AM -0500, Martin K. Petersen wrote: > Commit ca369d51b3e1 ("block/sd: Fix device-imposed transfer length > limits") accidentally switched optimal I/O size reporting from bytes to > block layer sectors. > > Signed-off-by: Martin K. Petersen

Re: [PATCH] lpfc: Remove redundant code block in lpfc_scsi_cmd_iocb_cmpl

2016-01-20 Thread Tomas Henzl
On 20.1.2016 16:08, Johannes Thumshirn wrote: > This removes a redundant code block that will either be executed if the > ENABLE_FCP_RING_POLLING flag is set in phba->cfg_poll or not. The code is just > duplicated in both cases, hence we unify it again. > > This probably is a left over from some

Re: scsi-debug regression with 4.5-rc?

2016-01-20 Thread Martin K. Petersen
> "Ewan" == Ewan Milne writes: Ewan> So I have a report from our test people that the optimal_io_size Ewan> sysfs value is now different by a factor of 512 from what it used Ewan> to be... Yes, just prepared a patch this morning. I messed up sectors vs. bytes. -- Martin

[PATCH] scsi update

2016-01-20 Thread Don Brace
This patch is based on Linus tree The change is: - export sanitize_inquiry_string --- Don Brace (1): scsi: export function scsi_scan.c:sanitize_inquiry_string drivers/scsi/scsi_scan.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) -- Signature -- To unsubscribe

[PATCH] scsi: export function scsi_scan.c:sanitize_inquiry_string

2016-01-20 Thread Don Brace
The hpsa driver uses this function to cleanup inquiry data. Our new pqi driver will also use this function. This function was copied into both drivers. This patch exports sanitize_inquiry_string so the hpsa and the pqi drivers can use this function directly. Hannes recommended the change in

UFS: MPHY configuration issue

2016-01-20 Thread Joao Pinto
Hi, I am trying to configure my MPHY through UNIPRO but I am experiencing a kernel crash when executing a dme instruction: As an example I am executing the following: result = ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(PA_RXHSUNTERMCAP, 0), 1); In ufshcd_dme_set_attr() I have the following data ready

Re: [PATCHv4 1/1] SCSI: hosts: update to use ida_simple for host_no management

2016-01-20 Thread Lee Duncan
On 01/05/2016 03:53 PM, Martin K. Petersen wrote: "Lee" == Lee Duncan writes: Lee> Do you need me to resubmit this patch now that it's accepted? Please resend. Thanks! Done, submitted against scsi tree, misc branch. -- Lee Duncan -- To unsubscribe from this list: send

[PATCHv2] SCSI: usd ida for host number management

2016-01-20 Thread Lee Duncan
Update the SCSI hosts module to use ida to manage its host_no index instead of an ATOMIC integer. This means that the SCSI host number will now be reclaimable. Use the ida "simple" mechanism, since there should be no need for a separate spin lock current usage. Ida was chosen over idr because the

[GIT PULL] target updates for v4.5-rc1

2016-01-20 Thread Nicholas A. Bellinger
Hello Linus, Here are target-pending updates for v4.5-rc1 code. Please go ahead and PULL from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git for-next Note that Sagi + Jenny's series for iser target + initiator remote invalidation is being merged via rdma.git, and Doug

RE: [PATCH V3 7/9] aacraid: Fix AIF triggered IOP_RESET

2016-01-20 Thread Raghava Aditya Renukunta
> -Original Message- > From: Tomas Henzl [mailto:the...@redhat.com] > Sent: Tuesday, January 19, 2016 8:14 AM > To: Raghava Aditya Renukunta; james.bottom...@hansenpartnership.com; > martin.peter...@oracle.com; linux-scsi@vger.kernel.org > Cc: Mahesh Rajashekhara; Murthy Bhat; Gana

RE: [PATCH V3 8/9] aacraid: Fix character device re-initialization

2016-01-20 Thread Raghava Aditya Renukunta
Hello Tomas, > -Original Message- > From: Tomas Henzl [mailto:the...@redhat.com] > Sent: Wednesday, January 20, 2016 5:41 AM > To: Raghava Aditya Renukunta; james.bottom...@hansenpartnership.com; > martin.peter...@oracle.com; linux-scsi@vger.kernel.org > Cc: Mahesh Rajashekhara; Murthy

[PATCH] qla2xxx: Fix warning reported by static checker

2016-01-20 Thread Himanshu Madhani
This patch fixes following warning drivers/scsi/qla2xxx/qla_target.c:3587 qlt_do_ctio_completion() warn: impossible condition '(logged_out == 41) => (0-1 == 41)' drivers/scsi/qla2xxx/qla_target.c 3580 case CTIO_PORT_LOGGED_OUT: 3581 case CTIO_PORT_UNAVAILABLE:

Re: [PATCH] qla2xxx: Fix warning reported by static checker

2016-01-20 Thread Nicholas A. Bellinger
Hi Himanshu, On Wed, 2016-01-20 at 15:11 -0500, Himanshu Madhani wrote: > This patch fixes following warning > > drivers/scsi/qla2xxx/qla_target.c:3587 qlt_do_ctio_completion() > warn: impossible condition '(logged_out == 41) => (0-1 == 41)' > > drivers/scsi/qla2xxx/qla_target.c > 3580

Re: [PATCH] sd: Optimal I/O size is in bytes, not sectors

2016-01-20 Thread Matthew R. Ochs
Reviewed-by: Matthew R. Ochs -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] sd: Optimal I/O size is in bytes, not sectors

2016-01-20 Thread James Bottomley
On Wed, 2016-01-20 at 11:40 -0500, Martin K. Petersen wrote: > > > > > > "James" == James Bottomley < > > > > > > james.bottom...@hansenpartnership.com> writes: > > James> We should mark the commit causing the problems, which went > into > James> 4.4 if I remember correctly: > > James> Fixes:

Re: [PATCH] scsi: export function scsi_scan.c:sanitize_inquiry_string

2016-01-20 Thread Matthew R. Ochs
> On Jan 20, 2016, at 1:41 PM, Don Brace wrote: > > The hpsa driver uses this function to cleanup inquiry > data. Our new pqi driver will also use this > function. This function was copied into both drivers. > > This patch exports sanitize_inquiry_string so the hpsa > and

Re: [PATCH] sd: Optimal I/O size is in bytes, not sectors

2016-01-20 Thread Christian Borntraeger
On 01/20/2016 05:01 PM, Martin K. Petersen wrote: > Commit ca369d51b3e1 ("block/sd: Fix device-imposed transfer length > limits") accidentally switched optimal I/O size reporting from bytes to > block layer sectors. > > Signed-off-by: Martin K. Petersen > Reported-by:

Re: [PATCH] lpfc: Remove redundant code block in lpfc_scsi_cmd_iocb_cmpl

2016-01-20 Thread Sebastian Herbszt
Johannes Thumshirn wrote: > This removes a redundant code block that will either be executed if the > ENABLE_FCP_RING_POLLING flag is set in phba->cfg_poll or not. The code is just > duplicated in both cases, hence we unify it again. > > This probably is a left over from some sort of refactoring.