Re: [PATCH V2 0/4] Add XEN pvSCSI support

2014-07-26 Thread Juergen Gross

On 07/25/2014 07:38 PM, Konrad Rzeszutek Wilk wrote:

On Fri, Jul 25, 2014 at 01:37:29PM +0200, jgr...@suse.com wrote:

This series adds XEN pvSCSI support. With pvSCSI it is possible to use physical
SCSI devices from a XEN domain.

The support consists of a backend in the privileged Domain-0 doing the real
I/O and a frontend in the unprivileged domU passing I/O-requests to the backend.



About the question that Christopher Hellwig asked - was that ever answered?


Sure. That's the first item under Changes in V2.




The code is taken (and adapted) from the original pvSCSI implementation done
for Linux 2.6 in 2008 by Fujitsu.

[PATCH V2 1/4] Add XEN pvSCSI protocol description
[PATCH V2 2/4] Introduce xen-scsifront module
[PATCH V2 3/4] Introduce XEN scsiback module
[PATCH V2 4/4] add xen pvscsi maintainer

Changes in V2:
- use core target infrastructure by backend instead of pure SCSI passthrough
- add support for larger SG lists by putting them in grant page(s)
- add command abort capability




--
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 v2 RESEND 05/23] csiostor: Remove superfluous call to pci_disable_msix()

2014-07-26 Thread Alexander Gordeev
On Wed, Jul 16, 2014 at 08:05:09PM +0200, Alexander Gordeev wrote:
 There is no need to call pci_disable_msix() in case
 the previous call to pci_enable_msix() failed

Hi Naresh, Arvind,

Could you please review csiostor patches in this series?

Thanks!

 Signed-off-by: Alexander Gordeev agord...@redhat.com
 Cc: Naresh Kumar Inna nar...@chelsio.com
 Cc: Arvind Bhushan arvi...@chelsio.com
 Cc: linux-scsi@vger.kernel.org
 Cc: linux-...@vger.kernel.org
 ---
  drivers/scsi/csiostor/csio_isr.c |4 +---
  1 files changed, 1 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/scsi/csiostor/csio_isr.c 
 b/drivers/scsi/csiostor/csio_isr.c
 index 7ee9777..91ba91d 100644
 --- a/drivers/scsi/csiostor/csio_isr.c
 +++ b/drivers/scsi/csiostor/csio_isr.c
 @@ -529,10 +529,8 @@ csio_enable_msix(struct csio_hw *hw)
   csio_reduce_sqsets(hw, cnt - extra);
   }
   } else {
 - if (rv  0) {
 - pci_disable_msix(hw-pdev);
 + if (rv  0)
   csio_info(hw, Not using MSI-X, remainder:%d\n, rv);
 - }
  
   kfree(entries);
   return -ENOMEM;
 -- 
 1.7.7.6
 

-- 
Regards,
Alexander Gordeev
agord...@redhat.com
--
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 v2 RESEND 07/23] fnic: Use pci_enable_msix_exact() instead of pci_enable_msix()

2014-07-26 Thread Alexander Gordeev
On Wed, Jul 16, 2014 at 08:05:11PM +0200, Alexander Gordeev wrote:
 As result of deprecation of MSI-X/MSI enablement functions
 pci_enable_msix() and pci_enable_msi_block() all drivers
 using these two interfaces need to be updated to use the
 new pci_enable_msi_range()  or pci_enable_msi_exact()
 and pci_enable_msix_range() or pci_enable_msix_exact()
 interfaces.

Hi Hiral, Suma, Brian,

Could you please review this patch?

Thanks!

 Signed-off-by: Alexander Gordeev agord...@redhat.com
 Cc: Hiral Patel hiral...@cisco.com
 Cc: Suma Ramars sram...@cisco.com
 Cc: Brian Uchino buch...@cisco.com
 Cc: linux-scsi@vger.kernel.org
 Cc: linux-...@vger.kernel.org
 ---
  drivers/scsi/fnic/fnic_isr.c |4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/scsi/fnic/fnic_isr.c b/drivers/scsi/fnic/fnic_isr.c
 index 7d9b54a..a0dd1b6 100644
 --- a/drivers/scsi/fnic/fnic_isr.c
 +++ b/drivers/scsi/fnic/fnic_isr.c
 @@ -257,8 +257,8 @@ int fnic_set_intr_mode(struct fnic *fnic)
   fnic-raw_wq_count = m 
   fnic-wq_copy_count = o 
   fnic-cq_count = n + m + o) {
 - if (!pci_enable_msix(fnic-pdev, fnic-msix_entry,
 - n + m + o + 1)) {
 + if (!pci_enable_msix_exact(fnic-pdev, fnic-msix_entry,
 +n + m + o + 1)) {
   fnic-rq_count = n;
   fnic-raw_wq_count = m;
   fnic-wq_copy_count = o;
 -- 
 1.7.7.6
 

-- 
Regards,
Alexander Gordeev
agord...@redhat.com
--
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 v2 RESEND 12/23] lpfc: Use pci_enable_msix_range() instead of pci_enable_msix()

2014-07-26 Thread Alexander Gordeev
On Wed, Jul 16, 2014 at 08:05:16PM +0200, Alexander Gordeev wrote:
 As result of deprecation of MSI-X/MSI enablement functions
 pci_enable_msix() and pci_enable_msi_block() all drivers
 using these two interfaces need to be updated to use the
 new pci_enable_msi_range()  or pci_enable_msi_exact()
 and pci_enable_msix_range() or pci_enable_msix_exact()
 interfaces.

Hi James,

Could you please review this patch?

Thanks!

 Signed-off-by: Alexander Gordeev agord...@redhat.com
 Cc: James Smart james.sm...@emulex.com
 Cc: linux-scsi@vger.kernel.org
 Cc: linux-...@vger.kernel.org
 ---
  drivers/scsi/lpfc/lpfc_init.c |   38 +-
  1 files changed, 17 insertions(+), 21 deletions(-)
 
 diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
 index a5769a9..d9caed9 100644
 --- a/drivers/scsi/lpfc/lpfc_init.c
 +++ b/drivers/scsi/lpfc/lpfc_init.c
 @@ -8211,9 +8211,9 @@ lpfc_sli4_pci_mem_unset(struct lpfc_hba *phba)
   * @phba: pointer to lpfc hba data structure.
   *
   * This routine is invoked to enable the MSI-X interrupt vectors to device
 - * with SLI-3 interface specs. The kernel function pci_enable_msix() is
 - * called to enable the MSI-X vectors. Note that pci_enable_msix(), once
 - * invoked, enables either all or nothing, depending on the current
 + * with SLI-3 interface specs. The kernel function pci_enable_msix_exact()
 + * is called to enable the MSI-X vectors. Note that pci_enable_msix_exact(),
 + * once invoked, enables either all or nothing, depending on the current
   * availability of PCI vector resources. The device driver is responsible
   * for calling the individual request_irq() to register each MSI-X vector
   * with a interrupt handler, which is done in this function. Note that
 @@ -8237,8 +8237,8 @@ lpfc_sli_enable_msix(struct lpfc_hba *phba)
   phba-msix_entries[i].entry = i;
  
   /* Configure MSI-X capability structure */
 - rc = pci_enable_msix(phba-pcidev, phba-msix_entries,
 - ARRAY_SIZE(phba-msix_entries));
 + rc = pci_enable_msix_exact(phba-pcidev, phba-msix_entries,
 +ARRAY_SIZE(phba-msix_entries));
   if (rc) {
   lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
   0420 PCI enable MSI-X failed (%d)\n, rc);
 @@ -8775,15 +8775,13 @@ out:
   * @phba: pointer to lpfc hba data structure.
   *
   * This routine is invoked to enable the MSI-X interrupt vectors to device
 - * with SLI-4 interface spec. The kernel function pci_enable_msix() is called
 - * to enable the MSI-X vectors. Note that pci_enable_msix(), once invoked,
 - * enables either all or nothing, depending on the current availability of
 - * PCI vector resources. The device driver is responsible for calling the
 - * individual request_irq() to register each MSI-X vector with a interrupt
 - * handler, which is done in this function. Note that later when device is
 - * unloading, the driver should always call free_irq() on all MSI-X vectors
 - * it has done request_irq() on before calling pci_disable_msix(). Failure
 - * to do so results in a BUG_ON() and a device will be left with MSI-X
 + * with SLI-4 interface spec. The kernel function pci_enable_msix_range()
 + * is called to enable the MSI-X vectors. The device driver is responsible
 + * for calling the individual request_irq() to register each MSI-X vector
 + * with a interrupt handler, which is done in this function. Note that later
 + * when device is unloading, the driver should always call free_irq() on all
 + * MSI-X vectors it has done request_irq() on before calling 
 pci_disable_msix()
 + * Failure to do so results in a BUG_ON() and a device will be left with 
 MSI-X
   * enabled and leaks its vectors.
   *
   * Return codes
 @@ -8805,18 +8803,16 @@ lpfc_sli4_enable_msix(struct lpfc_hba *phba)
   phba-sli4_hba.msix_entries[index].entry = index;
   vectors++;
   }
 -enable_msix_vectors:
 - rc = pci_enable_msix(phba-pcidev, phba-sli4_hba.msix_entries,
 -  vectors);
 - if (rc  1) {
 - vectors = rc;
 - goto enable_msix_vectors;
 - } else if (rc) {
 +
 + rc = pci_enable_msix_range(phba-pcidev, phba-sli4_hba.msix_entries,
 +2, vectors);
 + if (rc  0) {
   lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
   0484 PCI enable MSI-X failed (%d)\n, rc);
   goto vec_fail_out;
   }
  
 + vectors = rc;
   /* Log MSI-X vector assignment */
   for (index = 0; index  vectors; index++)
   lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
 -- 
 1.7.7.6
 

-- 
Regards,
Alexander Gordeev
agord...@redhat.com
--
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 v2 RESEND 15/23] mpt2sas: Use pci_enable_msix_exact() instead of pci_enable_msix()

2014-07-26 Thread Alexander Gordeev
On Wed, Jul 16, 2014 at 08:05:19PM +0200, Alexander Gordeev wrote:
 As result of deprecation of MSI-X/MSI enablement functions
 pci_enable_msix() and pci_enable_msi_block() all drivers
 using these two interfaces need to be updated to use the
 new pci_enable_msi_range()  or pci_enable_msi_exact()
 and pci_enable_msix_range() or pci_enable_msix_exact()
 interfaces.

Hi Nagalakshmi, Sreekanth,

Could you please review mpt patches in this series?

Thanks!

 Signed-off-by: Alexander Gordeev agord...@redhat.com
 Cc: Nagalakshmi Nandigama nagalakshmi.nandig...@lsi.com
 Cc: Sreekanth Reddy sreekanth.re...@lsi.com
 Cc: supp...@lsi.com
 Cc: dl-mptfusionli...@lsi.com
 Cc: linux-scsi@vger.kernel.org
 Cc: linux-...@vger.kernel.org
 ---
  drivers/scsi/mpt2sas/mpt2sas_base.c |6 +++---
  1 files changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c 
 b/drivers/scsi/mpt2sas/mpt2sas_base.c
 index 8b88118..6aca369 100644
 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c
 +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c
 @@ -1432,10 +1432,10 @@ _base_enable_msix(struct MPT2SAS_ADAPTER *ioc)
   for (i = 0, a = entries; i  ioc-reply_queue_count; i++, a++)
   a-entry = i;
  
 - r = pci_enable_msix(ioc-pdev, entries, ioc-reply_queue_count);
 + r = pci_enable_msix_exact(ioc-pdev, entries, ioc-reply_queue_count);
   if (r) {
 - dfailprintk(ioc, printk(MPT2SAS_INFO_FMT pci_enable_msix 
 - failed (r=%d) !!!\n, ioc-name, r));
 + dfailprintk(ioc, printk(MPT2SAS_INFO_FMT
 + pci_enable_msix_exact failed (r=%d) !!!\n, ioc-name, r));
   kfree(entries);
   goto try_ioapic;
   }
 -- 
 1.7.7.6
 

-- 
Regards,
Alexander Gordeev
agord...@redhat.com
--
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 v2 RESEND 18/23] pm8001: Use pci_enable_msix_exact() instead of pci_enable_msix()

2014-07-26 Thread Alexander Gordeev
On Wed, Jul 16, 2014 at 08:05:22PM +0200, Alexander Gordeev wrote:
 As result of deprecation of MSI-X/MSI enablement functions
 pci_enable_msix() and pci_enable_msi_block() all drivers
 using these two interfaces need to be updated to use the
 new pci_enable_msi_range()  or pci_enable_msi_exact()
 and pci_enable_msix_range() or pci_enable_msix_exact()
 interfaces.

Hi Jack, Lindar,

Could you please review this patch?

Thanks!

 Signed-off-by: Alexander Gordeev agord...@redhat.com
 Cc: xjtu...@gmail.com
 Cc: lindar_...@usish.com
 Cc: linux-scsi@vger.kernel.org
 Cc: linux-...@vger.kernel.org
 ---
  drivers/scsi/pm8001/pm8001_init.c |   39 
 +++--
  1 files changed, 20 insertions(+), 19 deletions(-)
 
 diff --git a/drivers/scsi/pm8001/pm8001_init.c 
 b/drivers/scsi/pm8001/pm8001_init.c
 index e837ece..4057c24 100644
 --- a/drivers/scsi/pm8001/pm8001_init.c
 +++ b/drivers/scsi/pm8001/pm8001_init.c
 @@ -729,34 +729,35 @@ static u32 pm8001_setup_msix(struct pm8001_hba_info 
 *pm8001_ha)
   sizeof(pm8001_ha-msix_entries[0]);
   for (i = 0; i  max_entry ; i++)
   pm8001_ha-msix_entries[i].entry = i;
 - rc = pci_enable_msix(pm8001_ha-pdev, pm8001_ha-msix_entries,
 + rc = pci_enable_msix_exact(pm8001_ha-pdev, pm8001_ha-msix_entries,
   number_of_intr);
   pm8001_ha-number_of_intr = number_of_intr;
 - if (!rc) {
 - PM8001_INIT_DBG(pm8001_ha, pm8001_printk(
 - pci_enable_msix request ret:%d no of intr %d\n,
 - rc, pm8001_ha-number_of_intr));
 + if (rc)
 + return rc;
  
 + PM8001_INIT_DBG(pm8001_ha, pm8001_printk(
 + pci_enable_msix_exact request ret:%d no of intr %d\n,
 + rc, pm8001_ha-number_of_intr));
  
 - for (i = 0; i  number_of_intr; i++) {
 - snprintf(intr_drvname[i], sizeof(intr_drvname[0]),
 - DRV_NAME%d, i);
 - pm8001_ha-irq_vector[i].irq_id = i;
 - pm8001_ha-irq_vector[i].drv_inst = pm8001_ha;
 + for (i = 0; i  number_of_intr; i++) {
 + snprintf(intr_drvname[i], sizeof(intr_drvname[0]),
 + DRV_NAME%d, i);
 + pm8001_ha-irq_vector[i].irq_id = i;
 + pm8001_ha-irq_vector[i].drv_inst = pm8001_ha;
  
 - rc = request_irq(pm8001_ha-msix_entries[i].vector,
 - pm8001_interrupt_handler_msix, flag,
 - intr_drvname[i], (pm8001_ha-irq_vector[i]));
 - if (rc) {
 - for (j = 0; j  i; j++)
 - free_irq(
 - pm8001_ha-msix_entries[j].vector,
 + rc = request_irq(pm8001_ha-msix_entries[i].vector,
 + pm8001_interrupt_handler_msix, flag,
 + intr_drvname[i], (pm8001_ha-irq_vector[i]));
 + if (rc) {
 + for (j = 0; j  i; j++) {
 + free_irq(pm8001_ha-msix_entries[j].vector,
   (pm8001_ha-irq_vector[i]));
 - pci_disable_msix(pm8001_ha-pdev);
 - break;
   }
 + pci_disable_msix(pm8001_ha-pdev);
 + break;
   }
   }
 +
   return rc;
  }
  #endif
 -- 
 1.7.7.6
 

-- 
Regards,
Alexander Gordeev
agord...@redhat.com
--
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 v2 RESEND 20/23] pmcraid: Use pci_enable_msix_range() instead of pci_enable_msix()

2014-07-26 Thread Alexander Gordeev
On Wed, Jul 16, 2014 at 08:05:24PM +0200, Alexander Gordeev wrote:
 As result of deprecation of MSI-X/MSI enablement functions
 pci_enable_msix() and pci_enable_msi_block() all drivers
 using these two interfaces need to be updated to use the
 new pci_enable_msi_range()  or pci_enable_msi_exact()
 and pci_enable_msix_range() or pci_enable_msix_exact()
 interfaces.

Hi Anil,

Could you please review pmcraid patches in this series?

Thanks!

 Signed-off-by: Alexander Gordeev agord...@redhat.com
 Cc: Anil Ravindranath anil_ravindran...@pmc-sierra.com
 Cc: linux-scsi@vger.kernel.org
 Cc: linux-...@vger.kernel.org
 ---
  drivers/scsi/pmcraid.c |   13 ++---
  1 files changed, 2 insertions(+), 11 deletions(-)
 
 diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
 index c06af7f..6d0f208 100644
 --- a/drivers/scsi/pmcraid.c
 +++ b/drivers/scsi/pmcraid.c
 @@ -4698,19 +4698,10 @@ pmcraid_register_interrupt_handler(struct 
 pmcraid_instance *pinstance)
   for (i = 0; i  PMCRAID_NUM_MSIX_VECTORS; i++)
   entries[i].entry = i;
  
 - rc = pci_enable_msix(pdev, entries, num_hrrq);
 - if (rc  0)
 + num_hrrq = pci_enable_msix_range(pdev, entries, 1, num_hrrq);
 + if (num_hrrq  0)
   goto pmcraid_isr_legacy;
  
 - /* Check how many MSIX vectors are allocated and register
 -  * msi-x handlers for each of them giving appropriate buffer
 -  */
 - if (rc  0) {
 - num_hrrq = rc;
 - if (pci_enable_msix(pdev, entries, num_hrrq))
 - goto pmcraid_isr_legacy;
 - }
 -
   for (i = 0; i  num_hrrq; i++) {
   pinstance-hrrq_vector[i].hrrq_id = i;
   pinstance-hrrq_vector[i].drv_inst = pinstance;
 -- 
 1.7.7.6
 

-- 
Regards,
Alexander Gordeev
agord...@redhat.com
--
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 v2 RESEND 21/23] qla2xxx: Use pci_enable_msix_range() instead of pci_enable_msix()

2014-07-26 Thread Alexander Gordeev
On Wed, Jul 16, 2014 at 08:05:25PM +0200, Alexander Gordeev wrote:
 As result of deprecation of MSI-X/MSI enablement functions
 pci_enable_msix() and pci_enable_msi_block() all drivers
 using these two interfaces need to be updated to use the
 new pci_enable_msi_range()  or pci_enable_msi_exact()
 and pci_enable_msix_range() or pci_enable_msix_exact()
 interfaces.
 
 Log message code 0x00c6 preserved, although it is reported
 after successful call to pci_enable_msix_range(), not before
 possibly unsuccessful call to pci_enable_msix(). Consumers
 of the error code should not notice the difference.

Hello,

Could someone review this patch, please?

Thanks!

 Signed-off-by: Alexander Gordeev agord...@redhat.com
 Cc: qla2xxx-upstr...@qlogic.com
 Cc: linux-scsi@vger.kernel.org
 Cc: linux-...@vger.kernel.org
 ---
  drivers/scsi/qla2xxx/qla_isr.c |   27 +++
  1 files changed, 11 insertions(+), 16 deletions(-)
 
 diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
 index a56825c..52d420f 100644
 --- a/drivers/scsi/qla2xxx/qla_isr.c
 +++ b/drivers/scsi/qla2xxx/qla_isr.c
 @@ -2923,27 +2923,22 @@ qla24xx_enable_msix(struct qla_hw_data *ha, struct 
 rsp_que *rsp)
   for (i = 0; i  ha-msix_count; i++)
   entries[i].entry = i;
  
 - ret = pci_enable_msix(ha-pdev, entries, ha-msix_count);
 - if (ret) {
 - if (ret  MIN_MSIX_COUNT)
 - goto msix_failed;
 -
 + ret = pci_enable_msix_range(ha-pdev,
 + entries, MIN_MSIX_COUNT, ha-msix_count);
 + if (ret  0) {
 + ql_log(ql_log_fatal, vha, 0x00c7,
 + MSI-X: Failed to enable support, 
 + giving   up -- %d/%d.\n,
 + ha-msix_count, ret);
 + goto msix_out;
 + } else if (ret  ha-msix_count) {
   ql_log(ql_log_warn, vha, 0x00c6,
   MSI-X: Failed to enable support 
   -- %d/%d\n Retry with %d vectors.\n,
   ha-msix_count, ret, ret);
 - ha-msix_count = ret;
 - ret = pci_enable_msix(ha-pdev, entries, ha-msix_count);
 - if (ret) {
 -msix_failed:
 - ql_log(ql_log_fatal, vha, 0x00c7,
 - MSI-X: Failed to enable support, 
 - giving   up -- %d/%d.\n,
 - ha-msix_count, ret);
 - goto msix_out;
 - }
 - ha-max_rsp_queues = ha-msix_count - 1;
   }
 + ha-msix_count = ret;
 + ha-max_rsp_queues = ha-msix_count - 1;
   ha-msix_entries = kzalloc(sizeof(struct qla_msix_entry) *
   ha-msix_count, GFP_KERNEL);
   if (!ha-msix_entries) {
 -- 
 1.7.7.6
 

-- 
Regards,
Alexander Gordeev
agord...@redhat.com
--
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 v2 RESEND 22/23] qla4xxx: Use pci_enable_msix_exact() instead of pci_enable_msix()

2014-07-26 Thread Alexander Gordeev
On Wed, Jul 16, 2014 at 08:05:26PM +0200, Alexander Gordeev wrote:
 As result of deprecation of MSI-X/MSI enablement functions
 pci_enable_msix() and pci_enable_msi_block() all drivers
 using these two interfaces need to be updated to use the
 new pci_enable_msi_range()  or pci_enable_msi_exact()
 and pci_enable_msix_range() or pci_enable_msix_exact()
 interfaces.

Hi Vikas,

Could you please reveiw this patch?

Thanks!

 Signed-off-by: Alexander Gordeev agord...@redhat.com
 Cc: Vikas Chaudhary vikas.chaudh...@qlogic.com
 Cc: iscsi-dri...@qlogic.com
 Cc: linux-scsi@vger.kernel.org
 Cc: linux-...@vger.kernel.org
 Acked-By: Vikas Chaudhary vikas.chaudh...@qlogic.com
 ---
  drivers/scsi/qla4xxx/ql4_nx.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c
 index 9dbdb4b..7c33658 100644
 --- a/drivers/scsi/qla4xxx/ql4_nx.c
 +++ b/drivers/scsi/qla4xxx/ql4_nx.c
 @@ -4221,7 +4221,7 @@ qla4_8xxx_enable_msix(struct scsi_qla_host *ha)
   for (i = 0; i  QLA_MSIX_ENTRIES; i++)
   entries[i].entry = qla4_8xxx_msix_entries[i].entry;
  
 - ret = pci_enable_msix(ha-pdev, entries, ARRAY_SIZE(entries));
 + ret = pci_enable_msix_exact(ha-pdev, entries, ARRAY_SIZE(entries));
   if (ret) {
   ql4_printk(KERN_WARNING, ha,
   MSI-X: Failed to enable support -- %d/%d\n,
 -- 
 1.7.7.6
 

-- 
Regards,
Alexander Gordeev
agord...@redhat.com
--
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 v2 3/3] [SCSI] Make LBP quirk skip lbpme checks tests

2014-07-26 Thread KY Srinivasan


 -Original Message-
 From: James Bottomley [mailto:jbottom...@parallels.com]
 Sent: Friday, July 25, 2014 10:10 AM
 To: KY Srinivasan
 Cc: linux-ker...@vger.kernel.org; h...@infradead.org; sits...@gmail.com;
 de...@linuxdriverproject.org; a...@canonical.com;
 martin.peter...@oracle.com; linux-scsi@vger.kernel.org;
 oher...@suse.com; gre...@linuxfoundation.org; jasow...@redhat.com
 Subject: Re: [PATCH v2 3/3] [SCSI] Make LBP quirk skip lbpme checks tests
 
 On Fri, 2014-07-25 at 16:47 +, KY Srinivasan wrote:
 
   -Original Message-
   From: Martin K. Petersen [mailto:martin.peter...@oracle.com]
   Sent: Thursday, July 24, 2014 8:54 AM
   To: Sitsofe Wheeler
   Cc: Martin K. Petersen; Christoph Hellwig; KY Srinivasan;
   gre...@linuxfoundation.org; linux-ker...@vger.kernel.org;
   de...@linuxdriverproject.org; oher...@suse.com; a...@canonical.com;
   jasow...@redhat.com; jbottom...@parallels.com; linux-
   s...@vger.kernel.org
   Subject: Re: [PATCH v2 3/3] [SCSI] Make LBP quirk skip lbpme checks
   tests
  
Sitsofe == Sitsofe Wheeler sits...@gmail.com writes:
  
   Sitsofe So we can see it is really a SATA device that announces
   Sitsofe discard correctly and supports discard through WRITE_SAME(16).
  
   No, that's the SATA device that announces support for DSM TRIM, and
   as a result the Linux SATL reports support for WRITE SAME(16) w. the
   UNMAP bit set and LBPME.
  
   Sitsofe It is the act of passing it through Hyper-V that turned it
   Sitsofe into a SCSI device that supports UNMAP (but not
   Sitsofe WRITE_SAME(16)), doesn't announce its SCSI conformance
   Sitsofe number and doesn't correctly announce which features it
   Sitsofe supports. Surely in this case it's reasonable to quirk our way
 around the problem?
  
   No. That's an issue in Hyper-V that'll you'll have to take up with
   Microsoft. I don't know what their passthrough limitations are for SCSI-
 ATA translation.
   Maybe K. Y. has some insight into this?
 
  For the pass through case, the host validates the request and passes
  the request to the device.
  However, not all scsi commands are passed through even though the
  device it is being passed through may support the command. WRITE_SAME
  is one such command. Consequently, in the EVPD page, we will set state
  indicating that WRITE_SAME is not supported (even if the device
  supports it).
 
 I think you haven't appreciated the problem: He's passing a SATA SSD via the
 SCSI hyper-v interface.  That means that the windows host is doing SCSI-
 ATA translation.  The problem is that the Windows translation layer (SATL)
 looks to be incomplete and it's not correctly translating the IDENTIFY bit 
 that
 corresponds to TRIM to the correct VPD pages so consequently, Linux  won't
 send UNMAP commands to the device (to be translated back to TRIM).
 
 We already know this is a bug in the Windows SATL which needs fixing (if you
 could report it and get a fix, that would be great) and that we're not going 
 to
 be able to work around this automatically in Linux because the proposed
 patch would have us unconditionally try UNMAP for all Hyper-V devices.  The
 current proposed fix is to enable UNMAP manually via sysfs in the guest boot
 scripts, but obviously that means that Hyper-V guests with direct pass
 through of SSDs need operator intervention to turn on TRIM.

James,

Thanks for the clarification. I am talking to the folks in MSFT that develop 
the native scsi
stack on Windows. Hyper-V's back-end driver is not involved in SATL. I will 
keep you guys
posted.

Regards,

K. Y
 
 James



RE: [PATCH v2 3/3] [SCSI] Make LBP quirk skip lbpme checks tests

2014-07-26 Thread KY Srinivasan


 -Original Message-
 From: Martin K. Petersen [mailto:martin.peter...@oracle.com]
 Sent: Friday, July 25, 2014 9:57 AM
 To: KY Srinivasan
 Cc: Martin K. Petersen; Sitsofe Wheeler; Christoph Hellwig;
 gre...@linuxfoundation.org; linux-ker...@vger.kernel.org;
 de...@linuxdriverproject.org; oher...@suse.com; a...@canonical.com;
 jasow...@redhat.com; jbottom...@parallels.com; linux-
 s...@vger.kernel.org
 Subject: Re: [PATCH v2 3/3] [SCSI] Make LBP quirk skip lbpme checks tests
 
  KY == KY Srinivasan k...@microsoft.com writes:
 
 KY For the pass through case, the host validates the request and passes
 KY the request to the device.  However, not all scsi commands are
 KY passed through even though the device it is being passed through may
 KY support the command. WRITE_SAME is one such command.
 Consequently,
 KY in the EVPD page, we will set state indicating that WRITE_SAME is
 KY not supported (even if the device supports it).
 
 The LBP VPD page flags UNMAP as being supported. Do you actually support
 UNMAP to DSM TRIM SCSI-ATA translation?

Martin,

I have been told by the Windows folks that this is done. I am trying to get
additional details.

K. Y
 
 One challenge in that department is that a single UNMAP command may turn
 into many, many, many DSM TRIM commands on the underlying SATA
 device.
 That's why we went with WRITE SAME for the internal Linux SATL, capping
 the maximum number of blocks to what we can fit in a single DSM TRIM
 command.
 
 --
 Martin K. PetersenOracle Linux Engineering
--
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: bfa: bfad_attr.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-07-26 Thread Rickard Strandqvist
Replacing strncpy with strlcpy to avoid strings that lacks null terminate.

Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se
---
 drivers/scsi/bfa/bfad_attr.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/bfa/bfad_attr.c b/drivers/scsi/bfa/bfad_attr.c
index 40be670..6d21bc6 100644
--- a/drivers/scsi/bfa/bfad_attr.c
+++ b/drivers/scsi/bfa/bfad_attr.c
@@ -842,7 +842,7 @@ bfad_im_symbolic_name_show(struct device *dev, struct 
device_attribute *attr,
char symname[BFA_SYMNAME_MAXLEN];
 
bfa_fcs_lport_get_attr(bfad-bfa_fcs.fabric.bport, port_attr);
-   strncpy(symname, port_attr.port_cfg.sym_name.symname,
+   strlcpy(symname, port_attr.port_cfg.sym_name.symname,
BFA_SYMNAME_MAXLEN);
return snprintf(buf, PAGE_SIZE, %s\n, symname);
 }
-- 
1.7.10.4

--
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: ibmvscsi: ibmvscsi.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-07-26 Thread Rickard Strandqvist
Replacing strncpy with strlcpy to avoid strings that lacks null terminate.

Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se
---
 drivers/scsi/ibmvscsi/ibmvscsi.c |7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
index 7b23f21..b0f5d0a 100644
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
@@ -261,7 +261,7 @@ static void gather_partition_info(void)
 
ppartition_name = of_get_property(rootdn, ibm,partition-name, NULL);
if (ppartition_name)
-   strncpy(partition_name, ppartition_name,
+   strlcpy(partition_name, ppartition_name,
sizeof(partition_name));
p_number_ptr = of_get_property(rootdn, ibm,partition-no, NULL);
if (p_number_ptr)
@@ -277,7 +277,7 @@ static void set_adapter_info(struct ibmvscsi_host_data 
*hostdata)
dev_info(hostdata-dev, SRP_VERSION: %s\n, SRP_VERSION);
strcpy(hostdata-madapter_info.srp_version, SRP_VERSION);
 
-   strncpy(hostdata-madapter_info.partition_name, partition_name,
+   strlcpy(hostdata-madapter_info.partition_name, partition_name,
sizeof(hostdata-madapter_info.partition_name));
 
hostdata-madapter_info.partition_number =
@@ -1280,8 +1280,7 @@ static void send_mad_capabilities(struct 
ibmvscsi_host_data *hostdata)
 
location = of_get_property(of_node, ibm,loc-code, NULL);
location = location ? location : dev_name(hostdata-dev);
-   strncpy(hostdata-caps.loc, location, sizeof(hostdata-caps.loc));
-   hostdata-caps.loc[sizeof(hostdata-caps.loc) - 1] = '\0';
+   strlcpy(hostdata-caps.loc, location, sizeof(hostdata-caps.loc));
 
req-common.type = cpu_to_be32(VIOSRP_CAPABILITIES_TYPE);
req-buffer = cpu_to_be64(hostdata-caps_addr);
-- 
1.7.10.4

--
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: qla4xxx: ql4_os.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-07-26 Thread Rickard Strandqvist
Replacing strncpy with strlcpy to avoid strings that lacks null terminate.

Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se
---
 drivers/scsi/qla4xxx/ql4_os.c |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 3202063..a07c53e 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -756,9 +756,9 @@ static int qla4xxx_get_chap_list(struct Scsi_Host *shost, 
uint16_t chap_tbl_idx,
continue;
 
chap_rec-chap_tbl_idx = i;
-   strncpy(chap_rec-username, chap_table-name,
+   strlcpy(chap_rec-username, chap_table-name,
ISCSI_CHAP_AUTH_NAME_MAX_LEN);
-   strncpy(chap_rec-password, chap_table-secret,
+   strlcpy(chap_rec-password, chap_table-secret,
QL4_CHAP_MAX_SECRET_LEN);
chap_rec-password_length = chap_table-secret_len;
 
@@ -6027,8 +6027,8 @@ static int qla4xxx_get_bidi_chap(struct scsi_qla_host 
*ha, char *username,
if (!(chap_table-flags  BIT_6)) /* Not BIDI */
continue;
 
-   strncpy(password, chap_table-secret, QL4_CHAP_MAX_SECRET_LEN);
-   strncpy(username, chap_table-name, QL4_CHAP_MAX_NAME_LEN);
+   strlcpy(password, chap_table-secret, QL4_CHAP_MAX_SECRET_LEN);
+   strlcpy(username, chap_table-name, QL4_CHAP_MAX_NAME_LEN);
ret = 0;
break;
}
@@ -6258,8 +6258,8 @@ static void qla4xxx_get_param_ddb(struct ddb_entry 
*ddb_entry,
 
tddb-tpgt = sess-tpgt;
tddb-port = conn-persistent_port;
-   strncpy(tddb-iscsi_name, sess-targetname, ISCSI_NAME_SIZE);
-   strncpy(tddb-ip_addr, conn-persistent_address, DDB_IPADDR_LEN);
+   strlcpy(tddb-iscsi_name, sess-targetname, ISCSI_NAME_SIZE);
+   strlcpy(tddb-ip_addr, conn-persistent_address, DDB_IPADDR_LEN);
 }
 
 static void qla4xxx_convert_param_ddb(struct dev_db_entry *fw_ddb_entry,
@@ -7764,7 +7764,7 @@ static int qla4xxx_sysfs_ddb_logout(struct 
iscsi_bus_flash_session *fnode_sess,
goto exit_ddb_logout;
}
 
-   strncpy(flash_tddb-iscsi_name, fnode_sess-targetname,
+   strlcpy(flash_tddb-iscsi_name, fnode_sess-targetname,
ISCSI_NAME_SIZE);
 
if (!strncmp(fnode_sess-portal_type, PORTAL_TYPE_IPV6, 4))
-- 
1.7.10.4

--
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: bfa: bfad_bsg.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-07-26 Thread Rickard Strandqvist
Replacing strncpy with strlcpy to avoid strings that lacks null terminate.

Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se
---
 drivers/scsi/bfa/bfad_bsg.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/bfa/bfad_bsg.c b/drivers/scsi/bfa/bfad_bsg.c
index 8994fb8..f229936 100644
--- a/drivers/scsi/bfa/bfad_bsg.c
+++ b/drivers/scsi/bfa/bfad_bsg.c
@@ -128,7 +128,7 @@ bfad_iocmd_ioc_get_attr(struct bfad_s *bfad, void *cmd)
 
/* fill in driver attr info */
strcpy(iocmd-ioc_attr.driver_attr.driver, BFAD_DRIVER_NAME);
-   strncpy(iocmd-ioc_attr.driver_attr.driver_ver,
+   strlcpy(iocmd-ioc_attr.driver_attr.driver_ver,
BFAD_DRIVER_VERSION, BFA_VERSION_LEN);
strcpy(iocmd-ioc_attr.driver_attr.fw_ver,
iocmd-ioc_attr.adapter_attr.fw_ver);
@@ -316,7 +316,7 @@ bfad_iocmd_port_get_attr(struct bfad_s *bfad, void *cmd)
iocmd-attr.port_type = port_attr.port_type;
iocmd-attr.loopback = port_attr.loopback;
iocmd-attr.authfail = port_attr.authfail;
-   strncpy(iocmd-attr.port_symname.symname,
+   strlcpy(iocmd-attr.port_symname.symname,
port_attr.port_cfg.sym_name.symname,
sizeof(port_attr.port_cfg.sym_name.symname));
 
-- 
1.7.10.4

--
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 V2 3/4] Introduce XEN scsiback module

2014-07-26 Thread Christoph Hellwig
Just a quick glance:

 a) this should move to drivers/target with the other target code
 b) you're still having your own CDB emulation in there, the target code
should be taking care of all that.

--
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 02/14] block: Replace bi_integrity with bi_special

2014-07-26 Thread Christoph Hellwig
Not sure what this buys us until other uses show up, but it looks
fine to me:

Reviewed-by: Christoph Hellwig h...@lst.de

--
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 05/14] block: Deprecate the use of the term sector in the context of block integrity

2014-07-26 Thread Christoph Hellwig
Looks good,

Reviewed-by: Christoph Hellwig h...@lst.de
--
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 06/14] block: Make protection interval calculation generic

2014-07-26 Thread Christoph Hellwig
On Fri, Jul 25, 2014 at 04:34:21PM -0400, Martin K. Petersen wrote:
 + return sectors  (ilog2(bi-interval) - 9);

I was going to say this should be 'SECTOR_SHIFT', but that constant
or variants of it are only defined locally in various subsystems..

Looks good,

Reviewed-by: Christoph Hellwig h...@lst.de
--
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: [RFC] hpsa: work in progress lockless monster patches

2014-07-26 Thread Christoph Hellwig
 Christoph Hellwig (1):
   reserve block tags in scsi host

So you found this one useful.  This begs the question how we should
move forward with it, as it will only work with the blk-mq path in
it's current form.

I can see three ways:

 - we implement equivalent functionality in the old block tagging code
   and make it available for any driver
 - we require drivers specific workarounds for the !mq path
 - we allow drivers to force the use of the blk-mq path if they want
   to use advanced features like this.  This might become nessecary
   anyway when we expose actual multiqueue support to LLDDs.

--
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] scsi: break from queue depth adjusting loops when device found

2014-07-26 Thread Christoph Hellwig
I just saw this patch showing up again in the hpsa series, so let's get
the discussiong going on how to proceed again:

I think we can't simply apply the current version as it breaks the intended
semantics in the FC drivers that expect an array with target-wide ressources.

So if we want to go ahead quickly we might just need two versions of it, one
that does LUN-level ramp up/down and one that does target level.

I'd also very much like to be able to use the SAM-4 indicators, but I fear
that a lot of hardware might not be able to get this right.  If anyone
has experience with using those I'd love to hear about it.
--
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] scsi: break from queue depth adjusting loops when device found

2014-07-26 Thread Christoph Hellwig
On Sat, Jul 26, 2014 at 11:14:35AM -0500, Stephen Cameron wrote:
 Hmm, I forgot that that patch was in there, I wasn't trying to keep pushing
 it along.  From the previous discussion, I got the impression I was simply
 wrong, and that this patch wasn't needed, so I had meant to drop it, I just
 forgot to actually drop it.

It's more complicated - as Robert indicated you're tenically right, although
in practice it's not what the existing users expect.  If you have some
cycles for it I'd love to at lest get the per-LUN and per-target
ramp up/down in ASAP.  We can then start looking into doing it even
better based on the target response later on.
--
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: WARNING: CPU: 1 PID: 495 at mm/slab_common.c:69 kmem_cache_create+0x1a9/0x330()

2014-07-26 Thread Christoph Hellwig
Here's a formal one.

James, can I get your signoff for it?

Vladimir, can I get a reviewed-by from you (or anyone else)?

---
From 73b1034ab1418e2dea75ccf642bc85c728b57313 Mon Sep 17 00:00:00 2001
From: James Bottomley james.bottom...@hansenpartnership.com
Date: Sat, 26 Jul 2014 12:21:26 -0400
Subject: scsi: use short driver name for per-driver cmd slab caches

hostt-name might contain space, so use the -proc_name short name instead
when creating per-driver command slabs.

Reported-by: Vladimir Davydov vdavy...@parallels.com
Tested-by: Vladimir Davydov vdavy...@parallels.com
---
 drivers/scsi/scsi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 33318f5..df33060 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -365,8 +365,8 @@ scsi_alloc_host_cmd_pool(struct Scsi_Host *shost)
if (!pool)
return NULL;
 
-   pool-cmd_name = kasprintf(GFP_KERNEL, %s_cmd, hostt-name);
-   pool-sense_name = kasprintf(GFP_KERNEL, %s_sense, hostt-name);
+   pool-cmd_name = kasprintf(GFP_KERNEL, %s_cmd, hostt-proc_name);
+   pool-sense_name = kasprintf(GFP_KERNEL, %s_sense, hostt-proc_name);
if (!pool-cmd_name || !pool-sense_name) {
scsi_free_host_cmd_pool(pool);
return NULL;
-- 
1.9.1

--
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: Block/SCSI data integrity update v2

2014-07-26 Thread Christoph Hellwig
I haven't done an in-depth review of the whole series, but it looks
generally good to me.  How should we pull it in?  Normally block
stuff should go through Jens, but the sd changes won't apply without
the various patches in the scsi tree.

--
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] eata: remove driver_lock

2014-07-26 Thread Christoph Hellwig
Can I get a quick review for this one?

On Mon, Jul 14, 2014 at 10:26:33AM +0200, Christoph Hellwig wrote:
 port_detect is only called from the module_init routine and thus implicitly
 serialized, so remove the driver lock which was held over potentially
 sleeping function calls.
 
 Signed-off-by: Christoph Hellwig h...@lst.de
 Reported-by: Arthur Marsh arthur.ma...@internode.on.net
 Tested-by: Arthur Marsh arthur.ma...@internode.on.net
 ---
  drivers/scsi/eata.c | 9 -
  1 file changed, 9 deletions(-)
 
 diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c
 index 03372cf..980898e 100644
 --- a/drivers/scsi/eata.c
 +++ b/drivers/scsi/eata.c
 @@ -837,7 +837,6 @@ struct hostdata {
  static struct Scsi_Host *sh[MAX_BOARDS];
  static const char *driver_name = EATA;
  static char sha[MAX_BOARDS];
 -static DEFINE_SPINLOCK(driver_lock);
  
  /* Initialize num_boards so that ihdlr can work while detect is in progress 
 */
  static unsigned int num_boards = MAX_BOARDS;
 @@ -1097,8 +1096,6 @@ static int port_detect(unsigned long port_base, 
 unsigned int j,
   goto fail;
   }
  
 - spin_lock_irq(driver_lock);
 -
   if (do_dma(port_base, 0, READ_CONFIG_PIO)) {
  #if defined(DEBUG_DETECT)
   printk(%s: detect, do_dma failed at 0x%03lx.\n, name,
 @@ -1265,10 +1262,7 @@ static int port_detect(unsigned long port_base, 
 unsigned int j,
   }
  #endif
  
 - spin_unlock_irq(driver_lock);
   sh[j] = shost = scsi_register(tpnt, sizeof(struct hostdata));
 - spin_lock_irq(driver_lock);
 -
   if (shost == NULL) {
   printk(%s: unable to register host, detaching.\n, name);
   goto freedma;
 @@ -1345,8 +1339,6 @@ static int port_detect(unsigned long port_base, 
 unsigned int j,
   else
   sprintf(dma_name, DMA %u, dma_channel);
  
 - spin_unlock_irq(driver_lock);
 -
   for (i = 0; i  shost-can_queue; i++)
   ha-cp[i].cp_dma_addr = pci_map_single(ha-pdev,
 ha-cp[i],
 @@ -1439,7 +1431,6 @@ static int port_detect(unsigned long port_base, 
 unsigned int j,
freeirq:
   free_irq(irq, sha[j]);
freelock:
 - spin_unlock_irq(driver_lock);
   release_region(port_base, REGION_SIZE);
fail:
   return 0;
 -- 
 1.9.1
 
 --
 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
---end quoted text---
--
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: Block/SCSI data integrity update v2

2014-07-26 Thread Martin K. Petersen
 Christoph == Christoph Hellwig h...@infradead.org writes:

Christoph How should we pull it in?  Normally block stuff should go
Christoph through Jens, but the sd changes won't apply without the
Christoph various patches in the scsi tree.

Typically Jens and James stagger their merges when we do this. But it
would definitely be easier to just pull everything through SCSI. Except
for the tweak in blk-merge.c I don't touch anything that would interfere
with block code outside of the data integrity files.

Jens, what do you think?

-- 
Martin K. Petersen  Oracle Linux Engineering
--
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: WARNING: CPU: 1 PID: 495 at mm/slab_common.c:69 kmem_cache_create+0x1a9/0x330()

2014-07-26 Thread Martin K. Petersen
 Christoph == Christoph Hellwig h...@lst.de writes:

Christoph Here's a formal one.  James, can I get your signoff for it?

Christoph Vladimir, can I get a reviewed-by from you (or anyone else)?

Reviewed-by: Martin K. Petersen martin.peter...@oracle.com

-- 
Martin K. Petersen  Oracle Linux Engineering
--
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] eata: remove driver_lock

2014-07-26 Thread Martin K. Petersen
 Christoph == Christoph Hellwig h...@infradead.org writes:

Christoph Can I get a quick review for this one?

Reviewed-by: Martin K. Petersen martin.peter...@oracle.com

-- 
Martin K. Petersen  Oracle Linux Engineering
--
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: mpt2sas: mpt2sas_base.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-07-26 Thread Rickard Strandqvist
Replacing strncpy with strlcpy to avoid strings that lacks null terminate.
And removed unnecessary magic numbers.

Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se
---
 drivers/scsi/mpt2sas/mpt2sas_base.c |   31 +++
 1 file changed, 15 insertions(+), 16 deletions(-)

diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c 
b/drivers/scsi/mpt2sas/mpt2sas_base.c
index 8b88118..5f0 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_base.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_base.c
@@ -1922,38 +1922,37 @@ _base_display_dell_branding(struct MPT2SAS_ADAPTER *ioc)
if (ioc-pdev-subsystem_vendor != PCI_VENDOR_ID_DELL)
return;
 
-   memset(dell_branding, 0, MPT2SAS_DELL_BRANDING_SIZE);
switch (ioc-pdev-subsystem_device) {
case MPT2SAS_DELL_6GBPS_SAS_HBA_SSDID:
-   strncpy(dell_branding, MPT2SAS_DELL_6GBPS_SAS_HBA_BRANDING,
-   MPT2SAS_DELL_BRANDING_SIZE - 1);
+   strlcpy(dell_branding, MPT2SAS_DELL_6GBPS_SAS_HBA_BRANDING,
+   MPT2SAS_DELL_BRANDING_SIZE);
break;
case MPT2SAS_DELL_PERC_H200_ADAPTER_SSDID:
-   strncpy(dell_branding, MPT2SAS_DELL_PERC_H200_ADAPTER_BRANDING,
-   MPT2SAS_DELL_BRANDING_SIZE - 1);
+   strlcpy(dell_branding, MPT2SAS_DELL_PERC_H200_ADAPTER_BRANDING,
+   MPT2SAS_DELL_BRANDING_SIZE);
break;
case MPT2SAS_DELL_PERC_H200_INTEGRATED_SSDID:
-   strncpy(dell_branding,
+   strlcpy(dell_branding,
MPT2SAS_DELL_PERC_H200_INTEGRATED_BRANDING,
-   MPT2SAS_DELL_BRANDING_SIZE - 1);
+   MPT2SAS_DELL_BRANDING_SIZE);
break;
case MPT2SAS_DELL_PERC_H200_MODULAR_SSDID:
-   strncpy(dell_branding,
+   strlcpy(dell_branding,
MPT2SAS_DELL_PERC_H200_MODULAR_BRANDING,
-   MPT2SAS_DELL_BRANDING_SIZE - 1);
+   MPT2SAS_DELL_BRANDING_SIZE);
break;
case MPT2SAS_DELL_PERC_H200_EMBEDDED_SSDID:
-   strncpy(dell_branding,
+   strlcpy(dell_branding,
MPT2SAS_DELL_PERC_H200_EMBEDDED_BRANDING,
-   MPT2SAS_DELL_BRANDING_SIZE - 1);
+   MPT2SAS_DELL_BRANDING_SIZE);
break;
case MPT2SAS_DELL_PERC_H200_SSDID:
-   strncpy(dell_branding, MPT2SAS_DELL_PERC_H200_BRANDING,
-   MPT2SAS_DELL_BRANDING_SIZE - 1);
+   strlcpy(dell_branding, MPT2SAS_DELL_PERC_H200_BRANDING,
+   MPT2SAS_DELL_BRANDING_SIZE);
break;
case MPT2SAS_DELL_6GBPS_SAS_SSDID:
-   strncpy(dell_branding, MPT2SAS_DELL_6GBPS_SAS_BRANDING,
-   MPT2SAS_DELL_BRANDING_SIZE - 1);
+   strlcpy(dell_branding, MPT2SAS_DELL_6GBPS_SAS_BRANDING,
+   MPT2SAS_DELL_BRANDING_SIZE);
break;
default:
sprintf(dell_branding, 0x%4X, ioc-pdev-subsystem_device);
@@ -2097,7 +2096,7 @@ _base_display_ioc_capabilities(struct MPT2SAS_ADAPTER 
*ioc)
u32 bios_version;
 
bios_version = le32_to_cpu(ioc-bios_pg3.BiosVersion);
-   strncpy(desc, ioc-manu_pg0.ChipName, 16);
+   strlcpy(desc, ioc-manu_pg0.ChipName, sizeof(desc));
printk(MPT2SAS_INFO_FMT %s: FWVersion(%02d.%02d.%02d.%02d), 
   ChipRevision(0x%02x), BiosVersion(%02d.%02d.%02d.%02d)\n,
ioc-name, desc,
-- 
1.7.10.4

--
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: mpt3sas: mpt3sas_base.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-07-26 Thread Rickard Strandqvist
Replacing strncpy with strlcpy to avoid strings that lacks null terminate.
And removed unnecessary magic numbers.

Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se
---
 drivers/scsi/mpt3sas/mpt3sas_base.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c 
b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 0cf4f70..acc02eb 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -2233,7 +2233,7 @@ _base_display_ioc_capabilities(struct MPT3SAS_ADAPTER 
*ioc)
u32 bios_version;
 
bios_version = le32_to_cpu(ioc-bios_pg3.BiosVersion);
-   strncpy(desc, ioc-manu_pg0.ChipName, 16);
+   strlcpy(desc, ioc-manu_pg0.ChipName, sizeof(desc));
pr_info(MPT3SAS_FMT %s: FWVersion(%02d.%02d.%02d.%02d), \
   ChipRevision(0x%02x), BiosVersion(%02d.%02d.%02d.%02d)\n,
ioc-name, desc,
-- 
1.7.10.4

--
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 v2 3/3] [SCSI] Make LBP quirk skip lbpme checks tests

2014-07-26 Thread Martin K. Petersen
 KY == KY Srinivasan k...@microsoft.com writes:

 The LBP VPD page flags UNMAP as being supported. Do you actually
 support UNMAP to DSM TRIM SCSI-ATA translation?

KY I have been told by the Windows folks that this is done. I am trying
KY to get additional details.

Great! I'd just like to have a reasonable level of confidence in what's
happening down the stack before I entertain turning something on that's
not being properly advertised.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
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 v2 3/3] [SCSI] Make LBP quirk skip lbpme checks tests

2014-07-26 Thread KY Srinivasan


 -Original Message-
 From: Martin K. Petersen [mailto:martin.peter...@oracle.com]
 Sent: Saturday, July 26, 2014 9:55 AM
 To: KY Srinivasan
 Cc: Martin K. Petersen; Sitsofe Wheeler; Christoph Hellwig;
 gre...@linuxfoundation.org; linux-ker...@vger.kernel.org;
 de...@linuxdriverproject.org; oher...@suse.com; a...@canonical.com;
 jasow...@redhat.com; jbottom...@parallels.com; linux-
 s...@vger.kernel.org
 Subject: Re: [PATCH v2 3/3] [SCSI] Make LBP quirk skip lbpme checks tests
 
  KY == KY Srinivasan k...@microsoft.com writes:
 
  The LBP VPD page flags UNMAP as being supported. Do you actually
  support UNMAP to DSM TRIM SCSI-ATA translation?
 
 KY I have been told by the Windows folks that this is done. I am trying
 KY to get additional details.
 
 Great! I'd just like to have a reasonable level of confidence in what's
 happening down the stack before I entertain turning something on that's not
 being properly advertised.

As I look at the output of inquiry between Linux on Hyper-V and native Linux, 
is not specifying
conformance level the main issue?

K. Y
 
 --
 Martin K. PetersenOracle Linux Engineering
--
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] usb-storage/SCSI: Add broken_fua blacklist flag

2014-07-26 Thread Laszlo T.
Hello,

First of all I've just subscribed the linux-scsi thread. I hope you
get my email the right way.

I have also problems with Jmicron JMS567 mobile rack.

I tried on different kernels:
3.15.5
3.16.rc6
the 'Invalid field in cdb' errors disappeared but still not ok.

I got the following errors when I ran a mkfs.ext4 command and then the
device disappeared.

Jul 26 19:54:37 debian kernel: [  118.060026] usb 8-3: new high-speed
USB device number 2 using ehci-pci
Jul 26 19:54:37 debian kernel: [  118.245208] usb 8-3: New USB device
found, idVendor=152d, idProduct=0567
Jul 26 19:54:37 debian kernel: [  118.245210] usb 8-3: New USB device
strings: Mfr=1, Product=2, SerialNumber=3
Jul 26 19:54:37 debian kernel: [  118.245212] usb 8-3: Product: USB to
ATA/ATAPI Bridge
Jul 26 19:54:37 debian kernel: [  118.245213] usb 8-3: Manufacturer: JMicron
Jul 26 19:54:37 debian kernel: [  118.245215] usb 8-3: SerialNumber:
74D781114413108
Jul 26 19:54:37 debian mtp-probe: checking bus 8, device 2:
/sys/devices/pci:00/:00:1d.7/usb8/8-3
Jul 26 19:54:37 debian mtp-probe: bus: 8, device: 2 was not an MTP device
Jul 26 19:54:37 debian kernel: [  118.257932] usbcore: registered new
interface driver usb-storage
Jul 26 19:54:37 debian kernel: [  118.259053] scsi6 : uas
Jul 26 19:54:37 debian kernel: [  118.259178] usbcore: registered new
interface driver uas
Jul 26 19:54:37 debian kernel: [  118.259720] scsi 6:0:0:0:
Direct-Access JMicron  Generic  0114 PQ: 0 ANSI: 6
Jul 26 19:54:37 debian kernel: [  118.260863] sd 6:0:0:0: Attached
scsi generic sg2 type 0
Jul 26 19:54:37 debian kernel: [  118.261217] sd 6:0:0:0: [sdc]
Spinning up disk...
Jul 26 19:54:39 debian kernel: [  119.264049] ..ready
Jul 26 19:54:39 debian kernel: [  120.268470] sd 6:0:0:0: [sdc]
976773168 512-byte logical blocks: (500 GB/465 GiB)
Jul 26 19:54:39 debian kernel: [  120.268472] sd 6:0:0:0: [sdc]
4096-byte physical blocks
Jul 26 19:54:39 debian kernel: [  120.269468] sd 6:0:0:0: [sdc] Write
Protect is off
Jul 26 19:54:39 debian kernel: [  120.269968] sd 6:0:0:0: [sdc] Write
cache: enabled, read cache: enabled, supports DPO and FUA
Jul 26 19:54:39 debian kernel: [  120.290104]  sdc: sdc1 sdc2
Jul 26 19:54:39 debian kernel: [  120.292356] sd 6:0:0:0: [sdc]
Attached SCSI disk
Jul 26 19:56:15 debian kernel: [  216.611696] usb 8-3: USB disconnect,
device number 2
Jul 26 19:56:15 debian kernel: [  216.611697] sd 6:0:0:0: [sdc]
uas_submit_sense_urb 8800ca32ac80 tag 112, inflight: s-st a-out
a-cmd s-cmd
Jul 26 19:56:15 debian kernel: [  216.611700] scsi host6: sense urb
submission error -19 stream 0
Jul 26 19:56:15 debian kernel: [  216.612035] sd 6:0:0:0: [sdc]
uas_cmd_cmplt 8800ca2f2240 tag 39, inflight: CMD
Jul 26 19:56:15 debian kernel: [  216.612120] sd 6:0:0:0: [sdc]
uas_cmd_cmplt 8800ca2f20c0 tag 40, inflight: CMD
Jul 26 19:56:15 debian kernel: [  216.612185] sd 6:0:0:0: [sdc]
uas_cmd_cmplt 8800ca300dc0 tag 41, inflight: CMD
Jul 26 19:56:15 debian kernel: [  216.612248] sd 6:0:0:0: [sdc]
uas_cmd_cmplt 8800ca300c40 tag 42, inflight: CMD
Jul 26 19:56:15 debian kernel: [  216.612315] sd 6:0:0:0: [sdc]
uas_cmd_cmplt 8800ca300ac0 tag 43, inflight: CMD
Jul 26 19:56:15 debian kernel: [  216.612377] sd 6:0:0:0: [sdc]
uas_cmd_cmplt 8800ca300940 tag 44, inflight: CMD
Jul 26 19:56:15 debian kernel: [  216.612441] sd 6:0:0:0: [sdc]
uas_cmd_cmplt 8800ca3007c0 tag 45, inflight: CMD
Jul 26 19:56:15 debian kernel: [  216.612504] sd 6:0:0:0: [sdc]
uas_cmd_cmplt 8800ca300640 tag 46, inflight: CMD
Jul 26 19:56:15 debian kernel: [  216.612570] sd 6:0:0:0: [sdc]
uas_cmd_cmplt 8800ca3004c0 tag 47, inflight: CMD
Jul 26 19:56:15 debian kernel: [  216.612633] sd 6:0:0:0: [sdc]
uas_cmd_cmplt 8800ca300340 tag 48, inflight: CMD
...
Jul 26 19:56:15 debian kernel: [  216.625366] sd 6:0:0:0: [sdc]
uas_zap_dead 8800ca3277c0 tag 105, inflight: CMD abort
Jul 26 19:56:15 debian kernel: [  216.625368] sd 6:0:0:0: [sdc] abort completed
Jul 26 19:56:15 debian kernel: [  216.625370] sd 6:0:0:0: [sdc]
uas_zap_dead 8800ca327640 tag 106, inflight: CMD abort
Jul 26 19:56:15 debian kernel: [  216.625371] sd 6:0:0:0: [sdc] abort completed
Jul 26 19:56:15 debian kernel: [  216.625373] sd 6:0:0:0: [sdc]
uas_zap_dead 8800ca3274c0 tag 107, inflight: CMD abort
Jul 26 19:56:15 debian kernel: [  216.625375] sd 6:0:0:0: [sdc] abort completed
Jul 26 19:56:15 debian kernel: [  216.625377] sd 6:0:0:0: [sdc]
uas_zap_dead 8800ca327340 tag 108, inflight: CMD abort
Jul 26 19:56:15 debian kernel: [  216.625378] sd 6:0:0:0: [sdc] abort completed
Jul 26 19:56:15 debian kernel: [  216.625380] sd 6:0:0:0: [sdc]
uas_zap_dead 8800ca3271c0 tag 109, inflight: CMD abort
Jul 26 19:56:15 debian kernel: [  216.625382] sd 6:0:0:0: [sdc] abort completed
Jul 26 19:56:15 debian kernel: [  216.625384] sd 6:0:0:0: [sdc]
uas_zap_dead 8800ca327040 tag 110, inflight: CMD abort
Jul 26 19:56:15 debian kernel: [  216.625385] sd 6:0:0:0: [sdc] abort 

[PATCH] scsi: scsi_tgt_if.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-07-26 Thread Rickard Strandqvist
If you are going to use memset before strncpy you must copy sizeof -1

Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se
---
 drivers/scsi/scsi_tgt_if.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/scsi_tgt_if.c b/drivers/scsi/scsi_tgt_if.c
index 6209110..7dc98eb 100644
--- a/drivers/scsi/scsi_tgt_if.c
+++ b/drivers/scsi/scsi_tgt_if.c
@@ -190,7 +190,7 @@ int scsi_tgt_uspace_send_it_nexus_request(int host_no, u64 
itn_id,
ev.p.it_nexus_req.itn_id = itn_id;
if (initiator_id)
strncpy(ev.p.it_nexus_req.initiator_id, initiator_id,
-   sizeof(ev.p.it_nexus_req.initiator_id));
+   sizeof(ev.p.it_nexus_req.initiator_id) - 1);
 
dprintk(%d %x %llx\n, host_no, function, (unsigned long long)itn_id);
 
-- 
1.7.10.4

--
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 v2 3/3] [SCSI] Make LBP quirk skip lbpme checks tests

2014-07-26 Thread KY Srinivasan


 -Original Message-
 From: Martin K. Petersen [mailto:martin.peter...@oracle.com]
 Sent: Saturday, July 26, 2014 12:25 PM
 To: KY Srinivasan
 Cc: Martin K. Petersen; Sitsofe Wheeler; Christoph Hellwig;
 gre...@linuxfoundation.org; linux-ker...@vger.kernel.org;
 de...@linuxdriverproject.org; oher...@suse.com; a...@canonical.com;
 jasow...@redhat.com; jbottom...@parallels.com; linux-
 s...@vger.kernel.org
 Subject: Re: [PATCH v2 3/3] [SCSI] Make LBP quirk skip lbpme checks tests
 
  KY == KY Srinivasan k...@microsoft.com writes:
 
  Great! I'd just like to have a reasonable level of confidence in
  what's happening down the stack before I entertain turning something
  on that's not being properly advertised.
 
 KY As I look at the output of inquiry between Linux on Hyper-V and
 KY native Linux, is not specifying conformance level the main issue?
 
 The main problem for this particular use case (aside from the issue we've
 already addressed) is that the passthrough device (SATA SSD) has
 LBPME=0 in the READ CAPACITY(16) response. The LBP VPD is correctly
 provided with LBPU flag set but because LBPME is reported as disabled we
 will not attempt to issue UNMAP commands to the device.

Oh; ok. I missed the read_capacity response.

Thanks,

K. Y
 
 --
 Martin K. PetersenOracle Linux Engineering
--
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 4/5] [SCSI] Do not use platform_bus as a parent

2014-07-26 Thread James Bottomley
On Sat, 2014-07-26 at 13:11 -0700, Greg Kroah-Hartman wrote:
 On Fri, Jul 25, 2014 at 07:46:56AM -0700, James Bottomley wrote:
  On Fri, 2014-07-25 at 15:23 +0100, Pawel Moll wrote:
   The host devices without a parent were forcefully adopted
   by platform bus. This patch removes this assignment. In
   effect the dev_dev may be NULL now, which means ISA.
   
   Cc: James E.J. Bottomley jbottom...@parallels.com
   Cc: linux-scsi@vger.kernel.org
   Signed-off-by: Pawel Moll pawel.m...@arm.com
   ---
   
   This patch is a part of effort to remove references to platform_bus
   and make it static.
   
   James, could you please have a look and advice if the change is
   correct? Would you happen to know the real reasons behind
   using the root platform_bus device a parent?
  
  Yes, for DMA purposes, the parent cannot now be NULL; we'll get a panic
  in the DMA transfers if it is.  A lot of the legacy ISA device on x86
  and I thought some ARM SOC devices don't pass in the parent device, so
  we hang them off a known parent.
 
 The generic platform bus device is not a known parent.  I don't
 understand the difference between just setting the parent to be NULL,
 which will then have a proper parent pointer filled in by the driver
 core when the device is registered, or faking it out here.  What is the
 difference?

If you set the parent to NULL, the host template dma_dev will end up
NULL as well and that will trigger a NULL deref panic in the dma segment
routines.

If you want to remove platform_bus, we have to have a well known device
to set dma_dev to at scsi_host_add time.

 In the end, the device always ends up with a parent pointer, right?

The parent pointer isn't the problem ... assigning the correct dma
device is.

James


--
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