[PATCH] mvsas: always iounmap resources

2015-05-22 Thread Johannes Thumshirn
In case pci_resource_start() or pci_resource_len() reutrn 0, mvsas_ioremap returns without doing an iounmap() of mvi->regs_ex. Found by the cocinelle tool. Signed-off-by: Johannes Thumshirn --- drivers/scsi/mvsas/mv_init.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --gi

Re: [PATCH v6 9/9] snic:Add Makefile, patch Kconfig, MAINTAINERS

2015-05-28 Thread Johannes Thumshirn
On Thu, May 28, 2015 at 09:49:08AM +, Narsimhulu Musini (nmusini) wrote: > Hi Boaz, > > Sure, I will incorporate the comments and suggestions in next patch > submittal. > > Thanks > Narsimhulu As you're going to re-submit anyway, I have found several occurences of: [Insert appropriate l

[PATCH] advansys: fix compilation errors and warnings when CONFIG_PCI is not set

2015-06-03 Thread Johannes Thumshirn
Fix compilation errors on forgotten #include and warnings when CONFIG_PCI is not set. Reported-by: Jim Davis Signed-off-by: Johannes Thumshirn --- drivers/scsi/advansys.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c

Re: [PATCH] megaraid_sas: insert missing space in kernel message

2015-06-09 Thread Johannes Thumshirn
defer_index, cmd, cmd->sync_cmd, cmd->scmd); > > if (!list_empty(&cmd->list)) { > -- > 2.1.4 > Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de

Re: [Patch V2 4/9] [SCSI] aacraid: Enable 64-bit write to controller register

2015-06-11 Thread Johannes Thumshirn
rc_writel(dev, MUnit.IQ_H, upper_32_bits(address) & 0x); > src_writel(dev, MUnit.IQ_L, address & 0x); > - > + spin_unlock_irqrestore(&fib->dev->iq_lock, flags); > +#endif > return 0; > } Why not make src_writeq() a wrapper over eithe

Re: [PATCH 01/20] [SCSI] mpt3sas: Added Combined Reply Queue feature to extend up-to 96 MSIX vector support

2015-06-12 Thread Johannes Thumshirn
f next position in Reply Desc Post Queue > * @delayed_tr_list: target reset link list > * @delayed_tr_volume_list: volume target reset link list > * @@temp_sensors_count: flag to carry the number of temperature sensors > @@ -937,6 +938,10 @@ struct MPT3SAS_ADAPTE

Re: [PATCH 04/20] [SCSI] mpt3sas: Remove redundancy code while freeing the controller resources.

2015-06-12 Thread Johannes Thumshirn
oc->bars); > - pci_disable_pcie_error_reporting(pdev); > - pci_disable_device(pdev); > - } > + mpt3sas_base_unmap_resources(ioc); > return; > } > > -- > 2.0.2 > > -- > To unsubscribe from this list: send the line &q

Re: [PATCH 04/20] [SCSI] mpt3sas: Remove redundancy code while freeing the controller resources.

2015-06-12 Thread Johannes Thumshirn
On Fri, Jun 12, 2015 at 05:48:56PM +0530, Sreekanth Reddy wrote: > On Fri, Jun 12, 2015 at 4:58 PM, Johannes Thumshirn > wrote: > > On Fri, Jun 12, 2015 at 03:12:16PM +0530, Sreekanth Reddy wrote: > >> Removed the redundancy code while freeing the controller resources. &g

Re: [PATCH] bfa: fix leak of bfad_im_port_index on module unload

2015-06-12 Thread Johannes Thumshirn
vers/scsi/bfa/bfad_im.c > @@ -851,6 +851,8 @@ bfad_im_module_exit(void) > > if (bfad_im_scsi_vport_transport_template) > fc_release_transport(bfad_im_scsi_vport_transport_template); > + > + idr_destroy(&bfad_im_port_index); > } > > void &

Re: [PATCH 10/20] [SCSI] mpt3sas: Add branding string support for OEM's HBA

2015-06-15 Thread Johannes Thumshirn
tatus bits for ioc->diag_buffer_status > */ > #define MPT3_DIAG_BUFFER_IS_REGISTERED (0x01) > -- > 2.0.2 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-scsi" in > the body of a message to majord...@vger.kernel.org > More maj

Re: [PATCH 07/20] [SCSI] mpt3sas: Bump mpt3sas Driver version to v5.100.00.00

2015-06-15 Thread Johannes Thumshirn
subscribe 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 Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn

Re: [PATCH 05/20] [SCSI] mpt3sas: MPI 2.5 Rev I (2.5.4) specifications.

2015-06-15 Thread Johannes Thumshirn
+ * 12-05-13 02.00.24 Added MPI25_HASH_IMAGE_TYPE_BIOS. > * -- > */ > > @@ -1598,6 +1599,7 @@ Mpi25EncryptedHashEntry_t, *pMpi25EncryptedHashEntry_t; > /* values for HashImageType */ > #define MPI25_HASH_IMAGE_

Re: [PATCH 08/20] [SCSI] mpt3sas: Update MPI2 strings to MPI2.5

2015-06-15 Thread Johannes Thumshirn
PT_BUILD_ZERO_LEN_SGE build_zero_len_sge; > - u8 mpi25; > u16 sge_size_ieee; > > /* function ptr for MPI sg elements only */ > -- > 2.0.2 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-scsi"

Re: [PATCH 09/20] [SCSI] mpt3sas: MPI 2.5 Rev J (2.5.5) specification and 2.00.34 header files

2015-06-15 Thread Johannes Thumshirn
000) > #define MPI2_TOOLBOX_CLEAN_INITIALIZATION (0x0100) > #define MPI2_TOOLBOX_CLEAN_FLASH(0x0004) > -- > 2.0.2 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-scsi" in > the body of a messa

Re: [PATCH 12/20] [SCSI] mpt3sas: Bump mpt3sas driver version to v6.100.00.00

2015-06-15 Thread Johannes Thumshirn
subscribe 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 Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn

Re: [PATCH 13/20] [SCSI] mpt3sas: MPI 2.5 Rev K (2.5.6) specifications

2015-06-15 Thread Johannes Thumshirn
0) > + > #define MPI2_BIOSPAGE1_OPTIONS_X86_DISABLE_BIOS (0x0400) > > #define MPI2_BIOSPAGE1_OPTIONS_MASK_REGISTRATION_UEFI_BSD(0x0300) > -- > 2.0.2 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-scsi&qu

Re: [PATCH 18/20] [SCSI] mpt3sas: Call dma_mapping_error() API after mapping an address with dma_map_single() API

2015-06-15 Thread Johannes Thumshirn
;%s(): DMA Addr in = NULL\n", > ioc->name, __func__); > rc = -ENOMEM; > -- > 2.0.2 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-scsi" in > the body of a message to majord...@vg

Re: [PATCH 20/20] [SCSI] mpt3sas : Bump mpt3sas driver version to 9.100.00.00

2015-06-15 Thread Johannes Thumshirn
subscribe 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 Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn

Re: [PATCH 15/20] [SCSI] mpt3sas: Return host busy error status to SML when DMA mapping of scatter gather list fails for a SCSI command

2015-06-15 Thread Johannes Thumshirn
ubscribe 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 Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jt

Re: [PATCH 19/20] [SCSI] mpt3sas: When device is blocked followed by unblock fails, unfreeze the I/Os

2015-06-15 Thread Johannes Thumshirn
block_io_device(struct MPT3SAS_ADAPTER *ioc, > u16 handle) > continue; > if (sas_device->pend_sas_rphy_add) > continue; > - sas_device_priv_data->block = 1; > - scsi_internal_device_block(sdev)

Re: [PATCH 14/20] [SCSI] mpt3sas: Complete the SCSI command with DID_RESET status for log_info value 0x0x32010081

2015-06-15 Thread Johannes Thumshirn
break; Could you make that a #define instead of some magic vlaue, so everyone can see what is happening when reading the source? > } > scmd->result = DID_SOFT_ERROR << 16; > break; > -- > 2.0.2 > > -- > To unsubscribe from this list:

Re: [PATCH 04/20] [SCSI] mpt3sas: Remove redundancy code while freeing the controller resources.

2015-06-15 Thread Johannes Thumshirn
On Mon, Jun 15, 2015 at 03:56:56PM +0530, Sreekanth Reddy wrote: > On Fri, Jun 12, 2015 at 6:10 PM, Johannes Thumshirn > wrote: > > On Fri, Jun 12, 2015 at 05:48:56PM +0530, Sreekanth Reddy wrote: > >> On Fri, Jun 12, 2015 at 4:58 PM, Johannes Thumshirn > >> wrot

Re: [PATCH 10/20] [SCSI] mpt3sas: Add branding string support for OEM's HBA

2015-06-15 Thread Johannes Thumshirn
On Mon, Jun 15, 2015 at 04:41:56PM +0530, Sreekanth Reddy wrote: > On Mon, Jun 15, 2015 at 3:16 PM, Johannes Thumshirn > wrote: > > On Fri, Jun 12, 2015 at 03:12:22PM +0530, Sreekanth Reddy wrote: > >> Added the following Dell branding to the mpt3sas driver. > >&g

Re: [Patch V2 1/9] [SCSI] aacraid: Fix for logical device name and UID not exposed to the OS

2015-06-16 Thread Johannes Thumshirn
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 Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de

Re: [Patch V2 3/9] [SCSI] aacraid: Enable MSI interrupt for series-6 controller

2015-06-16 Thread Johannes Thumshirn
no = 0; > dev->aac_msix[0].dev = dev; > -- > 1.9.3 > > -- > 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-inf

Re: [Patch V2 6/9] [SCSI] aacraid: Reset irq affinity hints before releasing irq

2015-06-16 Thread Johannes Thumshirn
printk(KERN_ERR "%s%d: Failed to set IRQ > affinity for cpu %d\n", > - name, instance, cpu); > - } > - cpu = cpumask_next(cpu, cpu_online_mask); > - } > - } els

Re: [Patch V2 7/9] [SCSI] aacraid: Unblock IOCTLs to controller once system resumed from suspend

2015-06-16 Thread Johannes Thumshirn
cribe linux-scsi" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de +49

Re: [Patch V2 9/9] [SCSI] aacraid: Update driver version

2015-06-16 Thread Johannes Thumshirn
R_VERSION "1.2-2" > #ifndef AAC_DRIVER_BRANCH > #define AAC_DRIVER_BRANCH"" > #endif > -- > 1.9.3 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-scsi" in &g

Re: [PATCH] mpt2sas: setpci reset kernel panic fix

2015-06-16 Thread Johannes Thumshirn
&ioc->list, &mpt2sas_ioc_list); > + spin_unlock_irqrestore(&gioc_lock, flags); > ioc->shost = shost; > ioc->id = mpt_ids++; > sprintf(ioc->name, "%s%d", MPT2SAS_DRIVER_NAME, ioc->id); > @@ -8167,6 +8191,9 @@ _scsih_probe(struc

Re: [PATCH 1/1] scsi: Initialize sdp after NULL check of cmnd

2015-06-17 Thread Johannes Thumshirn
G_OPT_NOISE & scsi_debug_opts)) > sdev_printk(KERN_INFO, sdp, "%s: non-zero result=0x%x\n", > __func__, scsi_result); > -- > 1.7.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-scsi&q

Re: [PATCH 14/20 v1] [SCSI] mpt3sas: Complete the SCSI command with DID_RESET status for log_info value 0x0x32010081

2015-06-18 Thread Johannes Thumshirn
break; > + } else if (log_info == VIRTUAL_IO_FAILED_RETRY) { > + scmd->result = DID_RESET << 16; > + break; > } > scmd->result = DID_SOFT_ERROR << 16; >

Re: [PATCH 04/20] [SCSI] mpt3sas: Remove redundancy code while freeing the controller resources.

2015-06-18 Thread Johannes Thumshirn
>replyPostRegisterIndex); > - > - if (ioc->chip_phys && ioc->chip) > - iounmap(ioc->chip); > - ioc->chip_phys = 0; > - > - if (pci_is_enabled(pdev)) { > - pci_release_selected_regions(ioc->pdev, ioc->bars); > - pci_disable_pcie_err

Re: [PATCH 10/20] [SCSI] mpt3sas: Add branding string support for OEM's HBA

2015-06-18 Thread Johannes Thumshirn
TEL_RS3UC080_SSDID0x3524 > > /* > + * Dell HBA branding > + */ > +#define MPT3SAS_DELL_12G_HBA_BRANDING \ > + "Dell 12Gbps HBA" > + > +/* > + * Dell HBA SSDIDs > + */ > +#define MPT3SAS_DELL_12G_HBA_SSDI

Re: [PATCH 01/20] [SCSI] mpt3sas: Added Combined Reply Queue feature to extend up-to 96 MSIX vector support

2015-06-19 Thread Johannes Thumshirn
nt, 0); > >>> MODULE_PARM_DESC(max_msix_vectors, > >>> " max msix vectors - (default=8)"); ^^^ > >> > >> When changing the default value, please also update the description > >> reflecting

Re: [PATCH 06/20] [SCSI] mpt3sas: Provides the physical location of sas drives

2015-06-19 Thread Johannes Thumshirn
> u8 pfa_led_on; > u8 pend_sas_rphy_add; > + u8 enclosure_level; > + u8 connector_name[4]; Minor nit of different indent here, don't know if it is worth re-sending? Other than that: Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn

Re: [PATCH 01/20] [SCSI] mpt3sas: Added Combined Reply Queue feature to extend up-to 96 MSIX vector support

2015-06-19 Thread Johannes Thumshirn
On Fri, Jun 19, 2015 at 02:51:00PM +0530, Sreekanth Reddy wrote: > On Fri, Jun 19, 2015 at 2:44 PM, Johannes Thumshirn > wrote: > > On Thu, Jun 18, 2015 at 03:27:26PM +0530, Sreekanth Reddy wrote: > >> Hi, > >> > >> Any other review comments on this patch.

Re: [PATCH v1 01/20] [SCSI] mpt3sas: Added Combined Reply Queue feature to extend up-to 96 MSIX vector support

2015-06-19 Thread Johannes Thumshirn
8,8 @@ typedef void (*MPT3SAS_FLUSH_RUNNING_CMDS)(struct > MPT3SAS_ADAPTER *ioc); > * is assigned only ones > * @reply_queue_count: number of reply queue's > * @reply_queue_list: link list contaning the reply queue info > - * @reply_post_host_index: hea

Re: [PATCH v1 06/20] [SCSI] mpt3sas: Provides the physical location of sas drives

2015-06-19 Thread Johannes Thumshirn
"enclosure logical id(0x%016llx)," > + " slot(%d)\n", > + (unsigned long long) > + sas_device->enclosure_logical_id, > +

Re: [PATCH resend] mpt2sas: setpci reset kernel panic fix

2015-06-19 Thread Johannes Thumshirn
->shost = shost; > ioc->id = mpt_ids++; > sprintf(ioc->name, "%s%d", MPT2SAS_DRIVER_NAME, ioc->id); > @@ -8167,6 +8191,9 @@ _scsih_probe(struct pci_dev *pdev, const struct > pci_device_id *id) > ioc->schedule_dead_ioc_flush_running_cmds = &a

Re: [PATCH resend] mpt2sas: setpci reset kernel panic fix

2015-06-19 Thread Johannes Thumshirn
oc_lock_initialize) { > > + spin_lock_init(&gioc_lock); > > + gioc_lock_initialize = 1; > > + } > > +} > > Just use DEFINE_SPINLOCK() to initialize the lock at compile time. Or yes, even better. -- Johannes Thumshirn

Re: [PATCH] mvsas: always iounmap resources

2015-06-22 Thread Johannes Thumshirn
On Fri, Jun 12, 2015 at 08:31:38AM +0200, Hannes Reinecke wrote: > On 05/22/2015 11:15 AM, Johannes Thumshirn wrote: > > In case pci_resource_start() or pci_resource_len() reutrn 0, mvsas_ioremap > > returns without doing an iounmap() of mvi->regs_ex. > > > &g

Re: [PATCH] SCSI-OSD: Delete an unnecessary check before the function call "put_disk"

2015-06-24 Thread Johannes Thumshirn
csi" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de +4

Re: [PATCH] st: null pointer dereference panic caused by use after kref_put by st_open

2015-07-02 Thread Johannes Thumshirn
"Seymour, Shane M" writes: > Two SLES11 SP3 servers encountered similar crashes simultaneously > following some kind of SAN/tape target issue: > Thanks, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage

Re: [PATCH 1/1] we added changes in fnic driver patch 1.6.0.16 to acquire io_req_lock in fnic_queuecommand() before issuing I/O so that io completion is serialized. But when releasing the lock we chec

2015-07-03 Thread Johannes Thumshirn
if (io_lock_acquired) > spin_unlock_irqrestore(io_lock, flags); Can't you just use if (spin_is_locked(io_lock)) spin_unlock_irqrestore(io_lock, flags); > > atomic_dec(&fnic->in_flight); Johannes -- Johannes Thumshirn

Re: [patch] mptfusion: prevent some memory corruption

2015-07-03 Thread Johannes Thumshirn
set > ioc->req_sz / 4) > + return -EINVAL; > + > /* Verify that the final request frame will not be too large. >*/ > sz = karg.dataSgeOffset * 4; > -- > To unsubscribe from this list: send the line "unsubscribe linux-scsi" in > the

[PATCH RESEND] mvsas: always iounmap resources

2015-07-07 Thread Johannes Thumshirn
In case pci_resource_start() or pci_resource_len() reutrn 0, mvsas_ioremap returns without doing an iounmap() of mvi->regs_ex. Found by the cocinelle tool. Signed-off-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke --- drivers/scsi/mvsas/mv_init.c | 5 - 1 file changed, 4 inserti

[PATCH] lpfc: Destroy lpfc_hba_index IDR on module exit

2015-07-08 Thread Johannes Thumshirn
t.exit; @@ exit(void) { ... idr_destroy(&idr); ... } @ missing_module_idr_destroy depends on declares_idr && defines_module_exit && !on_exit_calls_destroy @ identifier declares_idr.idr, defines_module_exit.exit; @@ exit(void) { ... +idr_destroy(&idr); } Signed-

[PATCH] st: Destroy st_index_idr on module exit

2015-07-08 Thread Johannes Thumshirn
t; @@ exit(void) { ... idr_destroy(&idr); ... } @ missing_module_idr_destroy depends on declares_idr && defines_module_exit && !on_exit_calls_destroy @ identifier declares_idr.idr, defines_module_exit.exit; @@ exit(void) { ... +idr_destroy(&idr); } Signed-off-by: Jo

Re: [PATCH] csiostor: Use list_for_each_safe instead of re-implementing it

2015-07-15 Thread Johannes Thumshirn
- struct list_head *tmp; > + struct list_head *tmp, *next; > struct csio_dma_buf *ddp_desc; > > /* release dma descs back to freelist and free dma memory */ > - list_for_each(tmp, &scm->ddp_freelist) { > + list_for_each_safe(tmp, next, &scm-&g

Re: [TRIVIAL PATCH] block: Correct misuses of 0x%

2015-08-03 Thread Johannes Thumshirn
v_dbg(&h->pdev->dev, " Max outstanding commands = 0x%x\n", >readl(&(tb->CmdsOutMax))); > dev_dbg(&h->pdev->dev, " Bus Types = 0x%x\n", > readl(&(tb->BusTypes))); > -- > To unsubscribe from

Re: [PATCH] megaraid_sas: fix missing { } braces

2015-08-03 Thread Johannes Thumshirn
[i].phys_addr)); > kbuff_arr[i] = NULL; > + } > } > > megasas_return_cmd(instance, cmd); For the curly braces part: Reviewed-by: Johannes Thumshirn While you're up to it, care to check drivers/scsi/bfa as well? There was a patch so

Re: [PATCH] scsi/be2iscsi: Fix logical-not-parentheses compilation warning

2015-08-04 Thread Johannes Thumshirn
N(0 == length); Please write WARN_ON(length == 0); > WARN_ON(!sgl); > > sgl->va = virtual_address; Given the above is swapped: Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de

Re: [PATCH v3] mpt2sas: setpci reset kernel oops fix

2015-08-06 Thread Johannes Thumshirn
) >>> return ret; >>> >>> printk(KERN_INFO "setting logging_level(0x%08x)\n", logging_level); >>> + spin_lock_irqsave(&gioc_lock, flags); >>> list_for_each_entry(ioc, &m

Re: [PATCH] scsi/be2iscsi: Fix logical-not-parentheses compilation warning

2015-08-07 Thread Johannes Thumshirn
gl_create_contiguous(void *virtual_address, > { > WARN_ON(!virtual_address); > WARN_ON(!physical_address); > - WARN_ON(!length > 0); > + WARN_ON(length == 0); > WARN_ON(!sgl); > > sgl->va = virtual_address

Re: [PATCH] fnic: check pci_map_single() return value

2015-08-12 Thread Johannes Thumshirn
;sense_buf_pa = pci_map_single(fnic->pdev, > @@ -353,6 +360,15 @@ static inline int fnic_queue_wq_copy_desc(struct fnic > *fnic, > SCSI_SENSE_BUFFERSIZE, > PCI_DMA_FROMDE

Re: [PATCH V2] fnic: check pci_map_single() return value

2015-08-12 Thread Johannes Thumshirn
return; > + } > + > spin_lock_irqsave(&fnic->wq_lock[0], flags); > if (!vnic_wq_desc_avail(wq)) { > pci_unmap_single(fnic->pdev, pa, skb->len, PCI_DMA_TODEVICE); > @@ -1071,6 +1091,12 @@ static int fnic_send_frame(struct fnic *fnic, struct

Re: [PATCH V3] fnic: check pci_map_single() return value

2015-08-12 Thread Johannes Thumshirn
@ static inline int fnic_queue_wq_copy_desc(struct fnic > *fnic, > SCSI_SENSE_BUFFERSIZE, > PCI_DMA_FROMDEVICE); > > + r = pci_dma_mapping_error(fnic->pdev, io_req->sense_buf_pa); > +

[PATCH] scsi: Export SCSI Inquiry data to sysfs

2015-08-13 Thread Johannes Thumshirn
2020 2020 010 4551 554d 4420 4456 522d 4d4f 2020 2020 020 2e32 2e33 024 Signed-off-by: Johannes Thumshirn --- drivers/scsi/scsi_sysfs.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index 9ad4116

Re: [PATCH RESEND V2 3/7] scsi: storvsc: Untangle the storage protocol negotiation from the vmbus protocol negotiation.

2015-08-13 Thread Johannes Thumshirn
POST_WIN7_STORVSC_SENSE_BUFFER_SIZE, > + 0 > + }, > + { > + VMSTOR_PROTO_VERSION_WIN7, > + PRE_WIN8_STORVSC_SENSE_BUFFER_SIZE, > + sizeof(struct vmscsi_win8_extension), > + }, > + { > + VMSTOR_PROT

Re: [PATCH RESEND V2 3/7] scsi: storvsc: Untangle the storage protocol negotiation from the vmbus protocol negotiation.

2015-08-13 Thread Johannes Thumshirn
KY Srinivasan writes: >> -Original Message- >> From: Johannes Thumshirn [mailto:jthumsh...@suse.de] >> Sent: Thursday, August 13, 2015 7:34 AM >> To: KY Srinivasan ; Keith Mange >> >> Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; &

[PATCH v2] scsi: Export SCSI Inquiry data to sysfs

2015-08-14 Thread Johannes Thumshirn
2020 2020 010 4551 554d 4420 4456 522d 4d4f 2020 2020 020 2e32 2e33 024 Signed-off-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke --- Chanes to v1: * Correct typo userlang -> userland in commit message. drivers/scsi/scsi_sysfs.c | 24 1 file changed,

[PATCH] lpfc: Fix possible use-after-free and double free in lpfc_mbx_cmpl_rdp_page_a2()

2015-08-17 Thread Johannes Thumshirn
his is the use after free. Following the use after free mp gets kfree()d again which is a double free. Signed-off-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_mbox.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_mbox.c b/drivers/scs

[PATCH] [SCSI] bfa: check if port is non NULL before dereferencing

2015-08-17 Thread Johannes Thumshirn
In bfa_fcs_lport_get_rport_max_speed() check if port is non NULL before dereferencing it's child port->fcs->bfa to trl_enabled. NB: I'm not entirely sure if port can even be NULL, so the check for NULL might be useless as well. Signed-off-by: Johannes Thumshirn ---

[PATCH] pm80xx: Don't override ts->stat on IO_OPEN_CNX_ERROR_HW_RESOURCE_BUSY

2015-08-17 Thread Johannes Thumshirn
In case XXX returns with a status of IO_OPEN_CNX_ERROR_HW_RESOURCE_BUSY ts->stat gets set to SAS_OPEN_REJECT but a missing 'break' statement causes a fallthrough to the default handler of the switch statement overriding ts->stat to SAS_DEV_NO_RESPONSE. Signed-off-by: Jo

Re: [PATCH] pm80xx: Don't override ts->stat on IO_OPEN_CNX_ERROR_HW_RESOURCE_BUSY

2015-08-17 Thread Johannes Thumshirn
Jack Wang writes: > 2015-08-17 15:04 GMT+02:00 Johannes Thumshirn : >> In case XXX returns with a status of IO_OPEN_CNX_ERROR_HW_RESOURCE_BUSY Apparently I've hit enter to fast. This shouldn't be XXX but psataPayload->status. I'll be sending a v2 :-(. >> ts-

[PATCH v2] pm80xx: Don't override ts->stat on IO_OPEN_CNX_ERROR_HW_RESOURCE_BUSY

2015-08-17 Thread Johannes Thumshirn
In case psataPayload->status has a status of IO_OPEN_CNX_ERROR_HW_RESOURCE_BUSY ts->stat gets set to SAS_OPEN_REJECT but a missing 'break' statement causes a fallthrough to the default handler of the switch statement overriding ts->stat to SAS_DEV_NO_RESPONSE. Signed-off-by:

Re: [PATCH] lpfc: Fix possible use-after-free and double free in lpfc_mbx_cmpl_rdp_page_a2()

2015-08-17 Thread Johannes Thumshirn
Sebastian Herbszt writes: > Johannes Thumshirn wrote: >> If the bf_get() call in lpfc_mbx_cmpl_rdp_page_a2() does succeeds, execution >> continues normally and mp gets kfree()d. >> >> If the subsequent call to lpfc_sli_issue_mbox() fails execution jumps

Re: [PATCH] SCSI: Fix NULL pointer dereference in runtime PM

2015-08-18 Thread Johannes Thumshirn
if (pm && pm->runtime_resume) { > + blk_pre_runtime_resume(sdev->request_queue); > err = pm->runtime_resume(dev); > - blk_post_runtime_resume(sdev->request_queue, err); > - > + blk_post_runtime_r

Re: [patch] scsi: aic94xx: set an error code on failure

2015-08-18 Thread Johannes Thumshirn
ribe 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 Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn

Re: [patch] cxlflash: shift wrapping bug in afu_link_reset()

2015-08-18 Thread Johannes Thumshirn
L << port); > writeq_be(port_sel, &afu->afu_map->global.regs.afu_port_sel); > cxlflash_afu_sync(afu, 0, 0, AFU_GSYNC); > > -- > To unsubscribe from this list: send the line "unsubscribe linux-scsi" in > the body of a message to majord...@vger

Re: [PATCH] hfcldd: Add Hitachi FC driver.

2015-08-31 Thread Johannes Thumshirn
|48 + > drivers/scsi/hfcldd/hfcmpcfg.h |78 + > drivers/scsi/hfcldd/hraslog.h |52 + > drivers/scsi/hfcldd/hraslog_link.c |83 + > 56 files changed, 131907 insertions(+) > > > -- > To unsubscribe from this list:

[PATCH 44/44] block: unexport bsg_softirq_done() again

2016-10-11 Thread Johannes Thumshirn
Unexport bsg_softirq_done() again, we don't need it outside of bsg-lib.c anymore now that scsi_transport_fc is a pure bsg-lib client. Signed-off-by: Johannes Thumshirn --- block/bsg-lib.c | 3 +-- include/linux/bsg-lib.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff

[PATCH 41/44] scsi: fc: use bsg_job_done

2016-10-11 Thread Johannes Thumshirn
fc_bsg_jobdone() and bsg_job_done() are 1:1 copies now so use the bsg-lib one instead of the FC private implementation. Signed-off-by: Johannes Thumshirn --- drivers/s390/scsi/zfcp_fc.c | 2 +- drivers/scsi/bfa/bfad_bsg.c | 4 ++-- drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- drivers

[PATCH 37/44] block: export bsg_destroy_job

2016-10-11 Thread Johannes Thumshirn
Export bsg_destroy_job so we can use it from clients of bsg-lib. Signed-off-by: Johannes Thumshirn --- block/bsg-lib.c | 3 ++- include/linux/bsg-lib.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/block/bsg-lib.c b/block/bsg-lib.c index 632fb40..6b99c7f 100644

[PATCH 40/44] scsi: fc: use bsg_softirq_done

2016-10-11 Thread Johannes Thumshirn
bsg_softirq_done() and fc_bsg_softirq_done() are copies of each other, so ditch the fc specific one. Signed-off-by: Johannes Thumshirn --- drivers/scsi/scsi_transport_fc.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/scsi/scsi_transport_fc.c b

[PATCH 39/44] block: export bsg_softirq_done

2016-10-11 Thread Johannes Thumshirn
Export bsg_softirq_done so it can be used by clients of bsg-lib. Signed-off-by: Johannes Thumshirn --- block/bsg-lib.c | 3 ++- include/linux/bsg-lib.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/block/bsg-lib.c b/block/bsg-lib.c index 6b99c7f..5d24d25 100644

[PATCH 42/44] block: add bsg_job_put() and bsg_job_get()

2016-10-11 Thread Johannes Thumshirn
Add bsg_job_put() and bsg_job_get() so don't need to export bsg_destroy_job() any more. Signed-off-by: Johannes Thumshirn --- block/bsg-lib.c | 17 ++--- drivers/scsi/scsi_transport_fc.c | 2 +- include/linux/bsg-lib.h | 3 ++- 3 files change

[PATCH 43/44] scsi: fc: move FC transport's bsg code to bsg-lib

2016-10-11 Thread Johannes Thumshirn
Now that all conversions are done, move the FibreChannel bsg code over to the bsg library. This patch is derived from work done by Mike Christie in 2011 [1] but only the iscsi parts got merged back then. [1] http://marc.info/?l=linux-scsi&m=131149780921009&w=2 Signed-off-by: Johannes T

[PATCH 36/44] scsi: change FC drivers to use 'struct bsg_job'

2016-10-11 Thread Johannes Thumshirn
Change FC drivers to use 'struct bsg_job' from bsg-lib.h instead of 'struct fc_bsg_job' from scsi_transport_fc.h and remove 'struct fc_bsg_job'. Signed-off-by: Johannes Thumshirn --- drivers/s390/scsi/zfcp_fc.c | 15 drivers/scsi/bfa/bfad_bsg.c

[PATCH 33/44] scsi: libfc: don't set FC_RQST_STATE_DONE before calling fc_bsg_jobdone()

2016-10-11 Thread Johannes Thumshirn
Don't set FC_RQST_STATE_DONE before calling fc_bsg_jobdone() as fc_bsg_jobdone() calls blk_complete_requeust() which raises a soft-IRQ that ends up in fc_bsg_sofirq_done() and fc_bsg_softirq_done() sets the FC_RQST_STATE_DONE flag. Signed-off-by: Johannes Thumshirn --- drivers/scsi/

[PATCH 29/44] qla2xxx: use fc_bsg_to_rport() to access a bsg_job's rport

2016-10-11 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn --- drivers/scsi/qla2xxx/qla_bsg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c index 109b852..917eafe 100644 --- a/drivers/scsi/qla2xxx/qla_bsg.c +++ b/drivers/scsi

[PATCH 31/44] libfc: use fc_bsg_to_rport() to access a bsg_job's rport

2016-10-11 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn --- drivers/scsi/libfc/fc_lport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index c60fdb9..156708a 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc

[PATCH 35/44] block: add reference counting for struct bsg_job

2016-10-11 Thread Johannes Thumshirn
Add reference counting to 'struct bsg_job' so we can implement a reuqest timeout handler for bsg_jobs, which is needed for Fibre Channel. Signed-off-by: Johannes Thumshirn --- block/bsg-lib.c | 7 +-- include/linux/bsg-lib.h | 2 ++ 2 files changed, 7 insertions(+), 2

[PATCH 38/44] scsi: fc: Use bsg_destroy_job

2016-10-11 Thread Johannes Thumshirn
fc_destroy_bsgjob() and bsg_destroy_job() are now 1:1 copies, so use the later. Signed-off-by: Johannes Thumshirn --- drivers/scsi/scsi_transport_fc.c | 20 ++-- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi

[PATCH 16/44] scsi: fc: remove job_done method from struct fc_bsg_job

2016-10-11 Thread Johannes Thumshirn
Now that we've converted all LLDDs over to use fc_bsg_jobdone() directly, remove the function pointer from struct fc_bsg_job. Signed-off-by: Johannes Thumshirn --- drivers/scsi/scsi_transport_fc.c | 1 - include/scsi/scsi_transport_fc.h | 1 - 2 files changed, 2 deletions(-) diff --

[PATCH 20/44] bfa: use fc_bsg_to_shost() to access a bsg_job's Scsi_Host

2016-10-11 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn --- drivers/scsi/bfa/bfad_bsg.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/bfa/bfad_bsg.c b/drivers/scsi/bfa/bfad_bsg.c index e49a6c8..d3094270 100644 --- a/drivers/scsi/bfa/bfad_bsg.c +++ b/drivers/scsi/bfa/bfad_bsg.c

[PATCH 23/44] libfc: use fc_bsg_to_shost() to access a bsg_job's Scsi_Host

2016-10-11 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn --- drivers/scsi/libfc/fc_lport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index 4bed7ec..c60fdb9 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc

[PATCH 30/44] lpfc: use fc_bsg_to_rport() to access a bsg_job's rport

2016-10-11 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_bsg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c index bfcc37d..dae7cc3 100644 --- a/drivers/scsi/lpfc/lpfc_bsg.c +++ b/drivers/scsi/lpfc

[PATCH 25/44] zfcp: use fc_bsg_to_shost() to access a bsg_job's Scsi_Host

2016-10-11 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn --- drivers/s390/scsi/zfcp_fc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c index 87f6330..813c286 100644 --- a/drivers/s390/scsi/zfcp_fc.c +++ b/drivers/s390/scsi/zfcp_fc.c

[PATCH 24/44] ibmvfc: use fc_bsg_to_shost() to access a bsg_job's Scsi_Host

2016-10-11 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn --- drivers/scsi/ibmvscsi/ibmvfc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 1001d4a..f7b50af 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi

[PATCH 34/44] scsi: fc: implement kref backed reference counting

2016-10-11 Thread Johannes Thumshirn
Implement kref backed reference counting instead of rolling our own. This elimnates the need of the following fields in 'struct fc_bsg_job': * ref_cnt * state_flags * job_lock bringing us close to unification of 'struct fc_bsg_job' and 'struct bsg_job'. Sig

[PATCH 32/44] ibmvfc: use fc_bsg_to_rport() to access a bsg_job's rport

2016-10-11 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn --- drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index f7b50af..35114d9 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi

[PATCH 28/44] zfcp: use fc_bsg_to_rport() to access a bsg_job's rport

2016-10-11 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn --- drivers/s390/scsi/zfcp_fc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c index 813c286..1977a66 100644 --- a/drivers/s390/scsi/zfcp_fc.c +++ b/drivers/s390/scsi/zfcp_fc.c

[PATCH 21/44] lpfc: use fc_bsg_to_shost() to access a bsg_job's Scsi_Host

2016-10-11 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_bsg.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c index 447a7af..bfcc37d 100644 --- a/drivers/scsi/lpfc/lpfc_bsg.c

[PATCH 19/44] scsi: fc: use fc_bsg_to_shost() to access a bsg_job's Scsi_Host

2016-10-11 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn --- drivers/scsi/scsi_transport_fc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index 9744476..d6d18ce 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi

[PATCH 09/44] scsi: fc: Export fc_bsg_jobdone

2016-10-11 Thread Johannes Thumshirn
Export fc_bsg_jobdone so drivers can use it directly instead of doing the round-trip via struct fc_bsg_job::job_done(). Signed-off-by: Johannes Thumshirn --- drivers/scsi/scsi_transport_fc.c | 4 ++-- include/scsi/scsi_transport_fc.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff

[PATCH 27/44] scsi: fc: use fc_bsg_to_rport() to access a bsg_job's rport

2016-10-11 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn --- drivers/scsi/scsi_transport_fc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index d6d18ce..96b3a2e 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi

[PATCH 26/44] scsi: fc: provide fc_bsg_to_rport() helper

2016-10-11 Thread Johannes Thumshirn
Provide fc_bsg_to_rport() helper that will become handy when we're moving from struct fc_bsg_job to a plain struct bsg_job. Signed-off-by: Johannes Thumshirn --- include/scsi/scsi_transport_fc.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/scsi/scsi_transport_fc.h b/in

[PATCH 22/44] qla2xxx: use fc_bsg_to_shost() to access a bsg_job's Scsi_Host

2016-10-11 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn --- drivers/scsi/qla2xxx/qla_bsg.c | 54 +- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c index 9293d5a..109b852 100644 --- a/drivers/scsi

[PATCH 12/44] ibmvfc: Use fc_bsg_jobdone()

2016-10-11 Thread Johannes Thumshirn
Use fc_bsg_jobdone() directly instead of the struct bsg_job::job_done() callback. Signed-off-by: Johannes Thumshirn --- drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index

  1   2   3   4   5   6   7   8   9   10   >