Re: [PATCH] virtio_scsi: remove duplicate check if queue is broken

2024-01-23 Thread Martin K. Petersen
On Tue, 16 Jan 2024 12:58:36 +0800, Li RongQing wrote:

> virtqueue_enable_cb() will call virtqueue_poll() which will check if
> queue is broken at beginning, so remove the virtqueue_is_broken() call
> 
> 

Applied to 6.8/scsi-fixes, thanks!

[1/1] virtio_scsi: remove duplicate check if queue is broken
  https://git.kernel.org/mkp/scsi/c/d6b75ba52189

-- 
Martin K. Petersen  Oracle Linux Engineering



Re: [PATCH] virtio_scsi: remove duplicate check if queue is broken

2024-01-17 Thread Martin K. Petersen


> virtqueue_enable_cb() will call virtqueue_poll() which will check if
> queue is broken at beginning, so remove the virtqueue_is_broken() call

Applied to 6.8/scsi-staging, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering



Re: [PATCH 0/2] qla2xxx: Fixes for the driver

2019-10-22 Thread Martin K. Petersen


Himanshu,

> This series has couple bug fixes for the driver. 
>
> First patch addresses initialization error with the newer adapter on a 
> blade systems. 
>
> Second patch adds protection for accidental flash corruption using SysFS 
> path. 

Applied to 5.4/scsi-fixes, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 0/7] scsi: aacraid updates

2019-10-18 Thread Martin K. Petersen


Balsundar,

> Balsundar P (7):
>   scsi: aacraid: Fix illegal data read or write beyond last LBA
>   scsi: aacraid: Fixed failure to check IO response and report IO error
>   scsi: aacraid: Fixed basecode assert when IOP reset is sent by driver
>   scsi: aacraid: setting different timeout for src and thor
>   scsi: aacraid: check adapter health before processing IOCTL
>   scsi: aacraid: Issued AIF request command after IOP RESET
>   scsi: aacraid: Update driver version to 50983

Applied to 5.5/scsi-queue.

Zeroday had some additional warnings that were not introduced by this
series. Please review and address those. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: ufs-bsg: Wake the device before sending raw upiu commands

2019-10-18 Thread Martin K. Petersen


Avri,

> The scsi async probe process is calling blk_pm_runtime_init for each
> lun, and then those request queues are monitored by the block layer pm
> engine (blk-pm.c).  This is however, not the case for scsi-passthrough
> queues, created by bsg_setup_queue().
>
> So the ufs-bsg driver might send various commands, disregarding the pm
> status of the device. This is wrong, regardless if its request queue
> is pm-aware or not.

Applied to 5.4/scsi-fixes, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi_dh_alua: Do not run STPG for implicit ALUA

2019-10-18 Thread Martin K. Petersen


Hannes,

> If a target only supports implicit ALUA sending a SET TARGET PORT
> GROUPS command is not only pointless, but might actually cause issues.

We already have a conditional in alua_stpg():

if (!(pg->tpgs & TPGS_MODE_EXPLICIT)) {
/* Only implicit ALUA supported, retry */
return SCSI_DH_RETRY;
}

> @@ -832,6 +832,10 @@ static void alua_rtpg_work(struct work_struct *work)
>   if (err != SCSI_DH_OK)
>   pg->flags &= ~ALUA_PG_RUN_STPG;
>   }
> + /* Do not run STPG if only implicit ALUA is supported */
> + if (scsi_device_tpgs(sdev) == TPGS_MODE_IMPLICIT)
> + pg->flags &= ~ALUA_PG_RUN_STPG;
> +
>   if (pg->flags & ALUA_PG_RUN_STPG) {
>   pg->flags &= ~ALUA_PG_RUN_STPG;
>   spin_unlock_irqrestore(&pg->lock, flags);

Instead of checking for EXPLICIT one place and checking for !IMPLICIT
another, can we consolidate the two and maybe do:

if (pg->flags & ALUA_PG_RUN_STPG &&
scsi_device_tpgs(sdev) == TPGS_MODE_EXPLICIT) {
    [...]

and then remove the redundant check in alua_stpg()?

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] qla2xxx: fixup incorrect usage of host_byte

2019-10-18 Thread Martin K. Petersen


Hannes,

> DRIVER_ERROR is a a driver byte setting, not a host byte.  The qla2xxx
> driver should rather return DID_ERROR here to be in line with the
> other drivers.

Applied to 5.4/scsi-fixes, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] lpfc: remove left-over BUILD_NVME defines

2019-10-18 Thread Martin K. Petersen


James,

> I assume that 5.4/scsi-fixes will get merged into 5.4 pre-release,

Yes.

> and that the stable tree will rebase to pick it up ?

stable/master is tracking Linus until final release.

If you want the stats issue fixed in 5.3, it's best to wait for Hannes'
commit to be merged by Linus. You can then request a stable backport.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v5 00/13] scsi: core: fix uninit-value access of variable sshdr

2019-10-18 Thread Martin K. Petersen


Hannes,

> The one thing which I patently don't like is the ambivalence between
> DRIVER_SENSE and scsi_sense_valid().  What shall we do if only _one_
> of them is set?  IE what would be the correct way of action if
> DRIVER_SENSE is not set, but we have a valid sense code?  Or the other
> way around?

I agree, it's a mess.

(Sorry, zhengbin, you opened a can of worms. This is some of our oldest
and most arcane code in SCSI)

> But more important, from a quick glance not all drivers set the
> DRIVER_SENSE bit; so for things like hpsa or smartpqi the sense code is
> never evaluated after this patchset.

And yet we appear to have several code paths where sense evaluation is
contingent on DRIVER_SENSE. So no matter what, behavior might
change if we enforce consistent semantics. *sigh*

> I _really_ would prefer to ditch the 'DRIVER_SENSE' bit, and rely on
> scsi_sense_valid() only.

I would really like to get rid of DRIVER_* completely. Except for
DRIVER_SENSE, few are actually in use:

DRIVER_OK:  0
DRIVER_BUSY:0
DRIVER_SOFT:0
DRIVER_MEDIA:   0
DRIVER_ERROR:   6
DRIVER_INVALID: 4
DRIVER_TIMEOUT: 1
DRIVER_SENSE:   58

Johannes: Whatever happened to your efforts at cleaning all this up? Do
you have a patch series or a working tree we could use as starting
point?

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v4 1/2] sr: need to check whether sshdr is valid in sr_do_ioctl

2019-10-18 Thread Martin K. Petersen


zhengbin,

> Like other callers of scsi_execute(send_trespass_cmd, hp_sw_tur...),
> we need to check whether sshdr is valid.

Applied to 5.4/scsi-fixes, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v4 2/2] scsi: core: fix uninit-value access of variable sshdr

2019-10-18 Thread Martin K. Petersen


zhengbin,

> We can init sshdr in sr_get_events, but there have many callers of
> scsi_execute, scsi_execute_req, we have to troubleshoot all callers,
> the simpler way is init sshdr in __scsi_execute.

There aren't that many callers. I'd prefer to make sure that everybody
is handling DRIVER_SENSE and scsi_sense_valid() correctly. Looks like
we're generally OK, but please verify.

Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v4 1/2] sr: need to check whether sshdr is valid in sr_do_ioctl

2019-10-17 Thread Martin K. Petersen


zhengbin,

>> Like other callers of scsi_execute(send_trespass_cmd, hp_sw_tur...),
>> we need to check whether sshdr is valid.
>
> Applied to 5.4/scsi-fixes, thanks!

Actually, after looking at this again, the function is making the
assumption that if driver_byte(result) != 0, then the sense is
present. It really should check both driver_byte(result) == DRIVER_SENSE
and scsi_sense_valid(sshdr) before poking at the sense data.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v4 2/2] scsi: core: fix uninit-value access of variable sshdr

2019-10-17 Thread Martin K. Petersen


zhengbin,

> I modify these in a patch? or every .c a patch, use a patchset?

A patchset consisting of one patch per file, please.

Thank you!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] lpfc: remove left-over BUILD_NVME defines

2019-10-17 Thread Martin K. Petersen


Hannes,

> The BUILD_NVME define never got defined anywhere, causing NVMe
> commands to be treated as SCSI commands when freeing the buffers.
> This was causing a stuck discovery and a horrible crash in
> lpfc_set_rrq_active() later on.

Applied to 5.4/scsi-fixes, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: core: try to get module before removing devcie

2019-10-17 Thread Martin K. Petersen


>> We have a test case like block/001 in blktests, which will create a
>> scsi device by loading scsi_debug module and then try to delete the
>> device by sysfs interface. At the same time, it may remove the
>> scsi_debug module.

Applied to 5.4/scsi-fixes, thanks!

> Please consider to contribute the test case to the blktests project.

Yes, please do!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] hpsa: add missing hunks in reset-patch

2019-10-17 Thread Martin K. Petersen


Don,

> - correct returning from reset before outstanding
>   commands are completed for the device.

Applied to 5.4/scsi-fixes, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] ch: Make it again possible to open a ch device two or more times

2019-10-09 Thread Martin K. Petersen


Bart,

> Clearing ch->device in ch_release() is wrong because that pointer must
> remain valid until ch_remove() is called. This patch fixes the
> following crash the second time a ch device is opened:

Applied to 5.4/scsi-fixes, thank you!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v2] megaraid_sas: unique names for MSIx vectors

2019-10-09 Thread Martin K. Petersen


Chandrakanth,

> Currently, MSIx vectors name appears in /proc/interrupts is "megasas"
> which is same for all the vectors. This patch provides the unique
> name to all megaraid_sas controllers and its associated MSIx interrupts.
>
> Suggested-by: Konstantin Shalygin 
> Signed-off-by: Sumit Saxena 
> Signed-off-by: Chandrakanth Patil 

Next time, please make sure you put a "---" separator before the patch
changelog.

> v2:

[...]

Applied to 5.5/scsi-queue, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 00/10] smartpqi updates

2019-10-09 Thread Martin K. Petersen


Don,

> These patches are based on Linus's tree

Applied to 5.5/scsi-queue. There was some fuzz but I think I figured it
out.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi_dh_alua: handle RTPG sense code correctly during state transitions

2019-10-09 Thread Martin K. Petersen


Hannes,

> Some arrays are not capable of returning RTPG data during state
> transitioning, but rather return an 'LUN not accessible, asymmetric
> access state transition' sense code. In these cases we can set the
> state to 'transitioning' directly and don't need to evaluate the RTPG
> data (which we won't have anyway).

Applied to 5.4/scsi-fixes, thanks you!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: mpt3sas: Clean up some indenting

2019-10-09 Thread Martin K. Petersen


Dan,

> This line is indented too far so it's a bit confusing.

Applied to 5.5/scsi-queue. Thank you!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: lpfc: Make function lpfc_defer_pt2pt_acc static

2019-10-09 Thread Martin K. Petersen


zhengbin,

> drivers/scsi/lpfc/lpfc_nportdisc.c:290:1: warning: symbol 
> 'lpfc_defer_pt2pt_acc' was not declared. Should it be static?

Applied to 5.5/scsi-queue, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v2 08/14] qla2xxx: Dual FCP-NVMe target port support

2019-10-09 Thread Martin K. Petersen


Himanshu,

> Some storage arrays advertise FCP LUNs and NVMe namespaces behind the
> same WWN.  The driver now offer's a user option by way of NVRAM
> parameter to allow users to choose, on a per port basis, the kind of
> FC-4 type they would like to prioritize for login.

Applied patches 8-14 to 5.5/scsi-queue. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v2] fixup "qla2xxx: Optimize NPIV tear down process"

2019-10-03 Thread Martin K. Petersen


> this patch fixes two issues in patch 02/14 in Himanshu's latest
> qla2xxx series ("qla2xxx: Bug fixes for the driver") from Sept. 12th,
> which you applied onto 5.4/scsi-fixes already.  See
> https://marc.info/?l=linux-scsi&m=156951704106671&w=2
>
> I'm assuming that Himanshu and Quinn are working on another
> series of fixes, in which case that should take precedence
> over this patch. I just wanted to provide this so that the
> already known problems are fixed in your tree.

Himanshu: Please review. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] MAINTAINERS: Update qla2xxx driver

2019-10-03 Thread Martin K. Petersen


Himanshu,

> Update maintainer's entries for qla2xxx driver now that email
> addresses have been changed to Marvell.

Applied to 5.4/scsi-fixes, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v2] zfcp: fix reaction on bit error theshold notification with adapter close

2019-10-03 Thread Martin K. Petersen


Steffen,

>> Why not just shut FCP down unconditionally on excessive bit errors?
>> What's the benefit of allowing things to continue? Are you hoping things
>> will eventually recover in a single-path scenario?
>
> Experience told me that there will be an unforeseen end user scenario
> where I need a quick switch to let even shaky paths survive.

Can't say I like it. But it's your driver.

Applied to 5.4/scsi-fixes. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH V3] scsi: save/restore command resid for error handling

2019-10-03 Thread Martin K. Petersen


Damien,

> When a non-passthrough command is terminated with CHECK CONDITION,
> request sense is executed by hijacking the command descriptor. [...]

Applied to 5.4/scsi-fixes. Thanks for debugging this issue!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v2] zfcp: fix reaction on bit error theshold notification with adapter close

2019-10-01 Thread Martin K. Petersen


Greg,

> Ok, then why make this a module option that you will have to support
> for the next 20+ years anyway if you feel this fix is the correct way
> that it should be done instead?

I agree.

Why not just shut FCP down unconditionally on excessive bit errors?
What's the benefit of allowing things to continue? Are you hoping things
will eventually recover in a single-path scenario?

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v2] scsi_debug: randomize command duration option + %p

2019-09-30 Thread Martin K. Petersen


Doug,

>> Since sdebug_random is either 0 or 1, is the "? 1 : 0" part necessary?
>
> No.
> Why didn't you complain when MKP wrote that? That is where I cut and
> pasted that code from (sdebug_removable).

[...]

> Again, copy and paste from MKP's code (which no doubt was a copy +
> paste from my earlier code).

I'll be the first to admit that I make mistakes and almost always
blindly copy surrounding plumbing when I hack on scsi_debug. However, I
am not responsible for the commit that introduced any of this code.

Also, in defense of the original author, our coding practices were
obviously different when this was written many years ago.

>>> @@ -5338,7 +5373,7 @@ static int __init scsi_debug_init(void)
>>>   dif_size = sdebug_store_sectors * sizeof(struct t10_pi_tuple);
>>>   dif_storep = vmalloc(dif_size);
>>> -    pr_err("dif_storep %u bytes @ %p\n", dif_size, dif_storep);
>>> +    pr_err("dif_storep %u bytes @ %pK\n", dif_size, dif_storep);
>>>   if (dif_storep == NULL) {
>>>   pr_err("out of mem. (DIX)\n");
>>
>> Is it useful to print the kernel pointer 'dif_storep'?
>
> Ask MKP, it's his code. All I do know is that doing a printk("%p" ...)
> is useless in lk 5.3 (and probably lk 5.2). Taking the above snippet,
> if vmalloc() returned NULL then the existing pr_err() would print out
> a random number rather than . Sick ...

This used to be somewhat useful for debugging purposes in combination
with the ability to dump the buffer to inspect the PI. In this day and
age with obfuscated kernel pointers, not so much. I suggest just
removing the line. Or--if people feel the size is valuable
information--just zap the pointer. Also, since this is unrelated to the
duration randomization it should be a separate patch.

Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] zfcp: fix reaction on bit error theshold notification with adapter close

2019-09-30 Thread Martin K. Petersen


Steffen,

> Kernel message explanation:
>
>  * Description:
>  * The FCP channel reported that its bit error threshold has been exceeded.
>  * These errors might result from a problem with the physical components
>  * of the local fibre link into the FCP channel.
>  * The problem might be damage or malfunction of the cable or
>  * cable connection between the FCP channel and
>  * the adjacent fabric switch port or the point-to-point peer.
>  * Find details about the errors in the HBA trace for the FCP device.
>  * The zfcp device driver closed down the FCP device
>  * to limit the performance impact from possible I/O command timeouts.
>  * User action:
>  * Check for problems on the local fibre link, ensure that fibre optics are
>  * clean and functional, and all cables are properly plugged.
>  * After the repair action, you can manually recover the FCP device by
>  * writing "0" into its "failed" sysfs attribute.
>  * If recovery through sysfs is not possible, set the CHPID of the device
>  * offline and back online on the service element.

This commentary does not read like a patch description. It makes no
mention of the actual kernel changes and the introduced module
parameter.

> +static bool ber_stop = true;
> +module_param(ber_stop, bool, 0600);
> +MODULE_PARM_DESC(ber_stop,
> +  "Shuts down FCP devices for FCP channels that report a 
> bit-error count in excess of its threshold (default on)");
> +

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] megaraid_sas: unique names for MSIx vectors

2019-09-30 Thread Martin K. Petersen


Chandrakanth,

> +#define MEGASAS_MSIX_NAME_LEN16

[...]

> + snprintf(instance->irq_context[i].name, MEGASAS_MSIX_NAME_LEN, 
> "%s%d-msix%d",
> + "megasas", instance->host->host_no, i);

Seems like MEGASAS_MSIX_NAME_LEN is too small given that naming scheme?

Also, please use %u.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: ignore a failure to synchronize cache due to lack of authorization

2019-09-30 Thread Martin K. Petersen


Oliver,

> I've got a report about a UAS drive enclosure reporting back Sense:
> Logical unit access not authorized if the drive it holds is password
> protected. While the drive is obviously unusable in that state as a
> mass storage device, it still exists as a sd device and when the
> system is asked to perform a suspend of the drive, it will be sent a
> SYNCHRONIZE CACHE. If that fails due to password protection, the error
> must be ignored.  --- drivers/scsi/sd.c | 3 ++- 1 file changed, 2
> insertions(+), 1 deletion(-)

Applied to 5.4/scsi-fixes, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v2] scsi: Add sysfs attributes for VPD pages 0h and 89h

2019-09-30 Thread Martin K. Petersen


Ryan,

> Add sysfs attributes for the ATA information page and Supported VPD
> Pages page.

Applied to 5.5/scsi-queue, thank you.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v4 0/3] scsi: core: allow auto suspend override by low-level driver

2019-09-30 Thread Martin K. Petersen


Stanley,

> Until now the scsi mid-layer forbids runtime suspend till userspace
> enables it. This is mainly to quarantine some disks with broken
> runtime power management or have high latencies executing suspend
> resume callbacks. If the userspace doesn't enable the runtime suspend
> the underlying hardware will be always on even when it is not doing
> any useful work and thus wasting power.

Applied to 5.5/scsi-queue, thank you!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 00/13] Enhancements w.r.t to diag buffer and few bug fixes

2019-09-30 Thread Martin K. Petersen


Sreekanth,

> This patch series contains enhancements w.r.t to diag buffer support
> and few bug fix patches.

Applied to 5.5/scsi-queue. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 00/20] lpfc: Update lpfc to revision 12.4.0.1

2019-09-30 Thread Martin K. Petersen


James,

> Update lpfc to revision 12.4.0.1

Applied to 5.5/scsi-queue. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [RFC,v2] scsi: scan: map PQ=1, PDT=other values to SCSI_SCAN_TARGET_PRESENT

2019-09-30 Thread Martin K. Petersen


Hannes,

> 1) all underlying devices are exported to the OS; of course they have
> to be properly masked etc to avoid udev to latch on those devices. I
> also was under the impression that the 'no_uld_attach' should be
> sufficient here, but then that only avoids the 'sd' driver to become
> attached to it. The actual SCSI device is still visible, so one
> _might_ be tempted to use the 'sg' device and export it to things like
> qemu. Which of course should be avoided.

Well, yes. But in this case the bug report was that sg devices were no
longer available for smartmontools to monitor.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [RFC,v2] scsi: scan: map PQ=1, PDT=other values to SCSI_SCAN_TARGET_PRESENT

2019-09-26 Thread Martin K. Petersen


Andrey,

>> > This patch break exposing individual RAID disks from adaptec raid
>> > controller. I need access to this disc's for S.M.A.R.T monitoring.
>
> adaptec report hidden luns with PQ=1, PDT=0 - now it skipped.

>> > Please find other way to workaround bugs in IBM/2145 controller.

Spent some time on this today and I'm in agreement with Zhong's
interpretation of the SCSI spec.

What puzzles me is that aacraid already supports the no_uld_attach
feature so I'm not sure why it also sets PQ=1 for physical devices?

We could either have a SCSI host flag to override the behavior or
consider masking PQ in the driver. Unfortunately, I don't have any
aacraid controllers I can test with in my test setup so I'd have to
synthesize a setup with scsi_debug.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v2 00/14] qla2xxx: Bug fixes for the driver

2019-09-23 Thread Martin K. Petersen


Himanshu,

> This series has fixes for N2N handling and unload path for driver when
> NPIV is configured. Also included are patches for capturing firmware
> dump when firmware posts MPI heartbeat stop event.  We have also
> enhanced handling of FCP/FC-NVMe when target advertises both
> capabilites under same WWNN.
>
> Please apply this series for 5.4/scsi-queue at your earliest
> convenience.

This came in too late for 5.4. I applied patches #1-7 to fixes. Patch #8
and beyond are more like features and will have to wait for 5.5.

Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [RESEND PATCH] scsi: megaraid: disable device when probe failed after enabled device

2019-09-23 Thread Martin K. Petersen


> For pci device, need to disable device when probe failed after enabled
> device.

Applied to 5.4/scsi-fixes, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v1] scsi: ufs: skip shutdown if hba is not powered

2019-09-23 Thread Martin K. Petersen


Stanley,

> In some cases, hba may go through shutdown flow without successful
> initialization and then make system hang.

Applied to 5.4/scsi-fixes, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] bnx2fc: Handle scope bits when array returns BUSY or TASK_SET_FULL

2019-09-23 Thread Martin K. Petersen


Laurence,

> The qla2xxx driver had this issue as well when the newer array
> firmware returned the retry_delay_timer in the fcp_rsp.
> The bnx2fc is not handling the masking of the scope bits either
> so the retry_delay_timestamp value lands up being a large value
> added to the timer timestamp delaying I/O for up to 27 Minutes.
> This patch adds similar code to handle this to the
> bnx2fc driver to avoid the huge delay.
> ---
> V2. Fix Indent for comments (Chad)
> V3. Kbuild robot reported uninitialized variable scope
> Initialize scope to 0
>
> Signed-off-by: Laurence Oberman 
> Reported-by: David Jeffery 
> Reported-by: kbuild test robot 
> ---
>  drivers/scsi/bnx2fc/bnx2fc_io.c | 29 -
>  1 file changed, 24 insertions(+), 5 deletions(-)

Applied to 5.4/scsi-fixes.

Please read Documentation/process/submitting-patches.rst. Your patch got
all mangled since you put tags after the --- separator.

Also, please use the -vN option when submitting updated patches.

Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 2/6] qla2xxx: Fix flash read for Qlogic ISPs

2019-09-13 Thread Martin K. Petersen


Hi Martin,

> I believe this patch should be tagged with
>
> Fixes: 5fa8774c7f38 (scsi: qla2xxx: Add 28xx flash primary/secondary 
> status/image mechanism)
>
> I just bisected the FW initialization problems on my 8200 series CNA
> to that commit, and I can confirm that this patch fixes it.

I am not going to rebase this late in the cycle. Himanshu or Quinn will
need to send a request to stable@ after Linus pulls 5.4/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] bnx2fc: Handle scope bits when array returns BUSY or TASK_SET_FULL

2019-09-10 Thread Martin K. Petersen


Laurence,

> The qla2xxx driver had this issue as well when the newer array
> firmware returned the retry_delay_timer in the fcp_rsp.  The bnx2fc is
> not handling the masking of the scope bits either so the
> retry_delay_timestamp value lands up being a large value added to the
> timer timestamp delaying I/O for up to 27 Minutes.  This patch adds
> similar code to handle this to the bnx2fc driver to avoid the huge
> delay.

Does not apply to 5.4/scsi-queue.

When you resubmit, please use git send-email -v3 [...] and put the
changelog commentary after a "---" separator.

> V2. Indent comments as suggested
>
> Signed-off-by: Laurence Oberman 

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: scsi_dh_rdac: zero cdb in send_mode_select()

2019-09-10 Thread Martin K. Petersen


Martin,

> cdb in send_mode_select() is not zeroed and is only partially filled
> in rdac_failover_get(), which leads to some random data getting to the
> device. Users have reported storage responding to such commands with
> INVALID FIELD IN CDB. Code before commit 327825574132 was not
> affected, as it called blk_rq_set_block_pc().

Applied to 5.4/scsi-queue, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: fcoe: fix null-ptr-deref Read in fc_release_transport

2019-09-10 Thread Martin K. Petersen


zhengbin,

> In fcoe_if_init, if fc_attach_transport(&fcoe_vport_fc_functions)
> fails, need to free the previously memory and return fail,
> otherwise will trigger null-ptr-deref Read in fc_release_transport.

Applied to 5.4/scsi-queue. Thank you.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH -next] scsi: ufs-hisi: use devm_platform_ioremap_resource() to simplify code

2019-09-07 Thread Martin K. Petersen


YueHaibing,

> Use devm_platform_ioremap_resource() to simplify the code a bit.
> This is detected by coccinelle.

Applied to 5.4/scsi-queue, thanks.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH -next] scsi: ufshcd: use devm_platform_ioremap_resource() to simplify code

2019-09-07 Thread Martin K. Petersen


YueHaibing,

> Use devm_platform_ioremap_resource() to simplify the code a bit.
> This is detected by coccinelle.

Applied to 5.4/scsi-queue, thanks.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH -next] scsi: hisi_sas: use devm_platform_ioremap_resource() to simplify code

2019-09-07 Thread Martin K. Petersen


YueHaibing,

> Use devm_platform_ioremap_resource() to simplify the code a bit.
> This is detected by coccinelle.

Applied to 5.4/scsi-queue, thanks.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH -next] scsi: ufs: Use kmemdup in ufshcd_read_string_desc()

2019-09-07 Thread Martin K. Petersen


YueHaibing,

> Use kmemdup rather than duplicating its implementation

Applied to 5.4/scsi-queue. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v4 0/3] Qualcomm UFS device reset support

2019-09-07 Thread Martin K. Petersen


Bjorn,

> This series adds a new ufs vops to allow platform specific methods for
> resetting an attached UFS device, then implements this for the
> Qualcomm driver.  This reset seems to be necessary for the majority of
> Dragonboard845c devices.

Applied to 5.4/scsi-queue, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] lpfc: Fix reset recovery paths that are not recovering

2019-09-07 Thread Martin K. Petersen


James,

> A recent patch unconditionally marks the hba as in error as part of
> resetting the adapter. The driver flow that called the adapter reset
> was a recovery path, which expects the adapter to not be in an error
> state in order to finish the recovery.  Given the new error state
> being set, the recovery fails and the adapter is left in limbo.
>
> Revise the adapter reset routine so that it will only mark the adapter
> in error if it was unable to reset the adapter.

Applied to 5.4/scsi-queue, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 1/1] scsi: lpfc: Convert existing %pf users to %ps

2019-09-07 Thread Martin K. Petersen


Sakari,

> Convert the remaining %pf users to %ps to prepare for the removal of
> the old %pf conversion specifier support.

Applied to 5.4/scsi-queue, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 0/6] qla2xxx: Bug fixes for the driver

2019-09-07 Thread Martin K. Petersen


Himanshu,

> This series has few bug fixes for the driver.

Applied to 5.4/scsi-queue, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: sd: Improve unaligned completion resid message

2019-09-07 Thread Martin K. Petersen


Damien,

> For commands completing with a resid not aligned on the device logical
> sector size, also print the command CDB in addition to the current
> message to help debug hardware generating such incorrect command
> completion information.

Applied to 5.4/scsi-queue. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: fnic: fix msix interrupt allocation

2019-09-07 Thread Martin K. Petersen


Govindarajulu,

> pci_alloc_irq_vectors() returns number of vectors allocated.
> Fix the check for error condition.

Applied to 5.4/scsi-queue, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: fnic: print port speed only at driver init or speed change

2019-08-29 Thread Martin K. Petersen


John,

> Port speed printing was added by commit d948e6383ec3 ("scsi: fnic:
> Add port speed stat to fnic debug stats"). As currently configured,
> this will cause the port speed to be printed to syslog every
> 2 seconds. To prevent log spamming, only print the vnic port speed
> at driver initialization and if the speed changes. Also clean up a
> small typo in fnic_trace.c.

Applied to 5.4/scsi-queue, thanks.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 0/3] scsi: bnx2fc: remove some set but not used variables

2019-08-29 Thread Martin K. Petersen


zhengbin,

> zhengbin (3):
>   scsi: bnx2fc: remove set but not used variable 'fh'
>   scsi: bnx2fc: remove set but not used variables 'lport','host'
>   scsi: bnx2fc: remove set but not used variables
> 'task','port','orig_task'

Applied to 5.4/scsi-queue, thanks.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 00/14] qedf: Miscellaneous fixes.

2019-08-29 Thread Martin K. Petersen


Saurav,

> This series have bug fixes and improve the log messages for better
> debugging.
>
> Kindly apply this series to scsi-queue at your earliest convenience.

Applied to 5.4/scsi-queue. I fixed a warning in patch #8. Please
verify. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 00/11] smartpqi updates

2019-08-29 Thread Martin K. Petersen


Don,

> These patches are based on Linus's tree

Applied to 5.4/scsi-queue. In the future, please make your commit
descriptions a bit more verbose. Doesn't matter for adding new PCI ids.
But it would be nice with some additional background for the more
intricate functional driver changes.

Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] lpfc: fix 12.4.0.0 GPF at boot

2019-08-29 Thread Martin K. Petersen


James,

> The 12.4.0.0 patch that merged WQ/CQ pairs into single per-cpu pair
> contained a bug: a local variable was set to the queue pair by index.
> This should have allowed the local variable to be natively used.
> Instead, the code reused the index relative to the local variable,
> obtaining a random pointer value that when used eventually faulted
> the system
>
> Convert offending code to use local variable.

Applied to 5.4/scsi-queue. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] lpfc: Raise config max for lpfc_fcp_mq_threshold variable

2019-08-29 Thread Martin K. Petersen


James,

> Raise the config max for lpfc_fcp_mq_threshold variable to 256.

Not a big fan of these magic values.

Applied to 5.3/scsi-fixes.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] lpfc: Remove bg debugfs buffers

2019-08-29 Thread Martin K. Petersen


James,

> Capturing and downloading dif command data and dif data was done a
> dozen years ago and no longer being used. Also creates a potential
> security hole.
>
> Remove the debugfs buffer for dif debugging.

Applied to 5.4/scsi-queue, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] lpfc: Resolve checker warning for lpfc_new_io_buf()

2019-08-29 Thread Martin K. Petersen


James,

> The patch d79c9e9d4b3d: "scsi: lpfc: Support dynamic unbounded SGL
> lists on G7 hardware." from Aug 14, 2019, leads to the following
> static checker warning:
>
>drivers/scsi/lpfc/lpfc_init.c:4107 lpfc_new_io_buf()
>   error: not allocating enough data 784 vs 768

Applied to 5.4/scsi-queue, thanks.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v2] scsi: ufs: remove set but not used variable 'val'

2019-08-29 Thread Martin K. Petersen


zhengbin,

> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/scsi/ufs/ufs-qcom.c: In function ufs_qcom_pwr_change_notify:
> drivers/scsi/ufs/ufs-qcom.c:808:6: warning: variable val set but not used 
> [-Wunused-but-set-variable]

Applied to 5.4/scsi-queue, thanks.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: hisi_sas: remove set but not used variable 'irq_value'

2019-08-29 Thread Martin K. Petersen


zhengbin,

> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/scsi/hisi_sas/hisi_sas_v1_hw.c: In function cq_interrupt_v1_hw:
> drivers/scsi/hisi_sas/hisi_sas_v1_hw.c:1542:6: warning: variable irq_value 
> set but not used [-Wunused-but-set-variable]

Applied to 5.4/scsi-queue, thanks.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] mpt3sas: Add sysfs parameter to set sdev qd to host can_queue

2019-08-29 Thread Martin K. Petersen


Sreekanth,

> This patch provides the module parameter and sysfs interface named
> 'enable_sdev_max_qd' to switch between the driver provided
> (optimal)queue depth and controller queue depth (can_queue).

Applied to 5.4/scsi-queue. Thanks.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v3 0/1] aacraid: Host adapter Adaptec 6405 constantly resets under high io load

2019-08-29 Thread Martin K. Petersen


> Problem description:
> 
> A node with Adaptec 6405 controller, latest BIOS V5.3-0[19204] A lot
> of disks attached to the controller.  Simple test: running mkfs.ext4
> on many disks on the same controller in parallel (mkfs is not
> important here, any serious io load triggers controller aborts)

Microchip folks: Please review!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] qla2xxx: Fix a recently introduced kernel warning

2019-08-29 Thread Martin K. Petersen


Bart,

> According to the firmware documentation a status type 0 IOCB can be
> followed by one or more status continuation type 0 IOCBs. Hence do not
> complain if the completion function is not called from inside the
> status type 0 IOCB handler.

Applied to 5.4/scsi-queue, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v3] scsi: ufs: fix broken hba->outstanding_tasks

2019-08-29 Thread Martin K. Petersen


Stanley,

> Currently bits in hba->outstanding_tasks are cleared only after their
> corresponding task management commands are successfully done by
> __ufshcd_issue_tm_cmd().

Applied to 5.4/scsi-queue. Thank you!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 00/42] lpfc: Update lpfc to revision 12.4.0.0

2019-08-19 Thread Martin K. Petersen


James,

> Update lpfc to revision 12.4.0.0

Applied to 5.4/scsi-queue, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: ufs-qcom: Make structure ufs_hba_qcom_vops constant

2019-08-19 Thread Martin K. Petersen


Nishka,

> Static structure ufs_hba_qcom_vops, of type ufs_hba_variant_ops, is used
> only once, when it is passed as the second argument to function
> ufshcd_pltfrm_init(). In the definition of ufshcd_pltfrm_init(), its
> second parameter (corresponding to ufs_hba_qcom_vops) is declared as
> constant. Hence declare ufs_hba_qcom_vops itself constant as well to
> protect it from unintended modification.
> Issue found with Coccinelle.

Applied to 5.4/scsi-queue, thanks.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v3] lpfc: Mitigate high memory pre-allocation by SCSI-MQ

2019-08-19 Thread Martin K. Petersen


James,

> When SCSI-MQ is enabled, the SCSI-MQ layers will do pre-allocation of
> MQ resources based on shost values set by the driver. In newer cases
> of the driver, which attempts to set nr_hw_queues to the cpu count,
> the multipliers become excessive, with a single shost having SCSI-MQ
> pre-allocation reaching into the multiple GBytes range.  NPIV, which
> creates additional shosts, only multiply this overhead. On lower-memory
> systems, this can exhaust system memory very quickly, resulting in a
> system crash or failures in the driver or elsewhere due to low memory
> conditions.

Applied to 5.3/scsi-fixes. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: lpfc: use spin_lock_irqsave instead of spin_lock_irq in IRQ context

2019-08-19 Thread Martin K. Petersen


Fuqian,

> As spin_unlock_irq will enable interrupts.
> Function lpfc_findnode_rpi is called from
> lpfc_sli_abts_err_handler (./drivers/scsi/lpfc/lpfc_sli.c)
>  <- lpfc_sli_async_event_handler
>  <- lpfc_sli_process_unsol_iocb
>  <- lpfc_sli_handle_fast_ring_event
>  <- lpfc_sli_fp_intr_handler
>  <- lpfc_sli_intr_handler
>  and lpfc_sli_intr_handler is an interrupt handler.
> Interrupts are enabled in interrupt handler.
> Use spin_lock_irqsave/spin_unlock_irqrestore instead of spin_(un)lock_irq
> in IRQ context to avoid this.

Applied to 5.4/scsi-queue, thanks.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: lpfc: remove redundant code

2019-08-19 Thread Martin K. Petersen


Fuqian,

> Remove the redundant initialization code.

Applied to 5.4/scsi-queue, thanks.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v2 0/2] scsi: qla2xxx: fixes for FW trace/dump buffers

2019-08-14 Thread Martin K. Petersen


Martin,

> The first patch of the series is a fix for a memory corruption we
> saw in a test where qla2xxx was loaded/unloaded repeatedly under
> memory pressure. The second one is a cleanup/consistency fix.

Applied to 5.4/scsi-queue, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v2] tcmu: avoid use-after-free after command timeout

2019-08-14 Thread Martin K. Petersen


Dmitry,

> In tcmu_handle_completion() function, the variable called read_len is
> always initialized with a value taken from se_cmd structure. If this
> function is called to complete an expired (timed out) out command, the
> session command pointed by se_cmd is likely to be already deallocated
> by the target core at that moment. As the result, this access triggers
> a use-after-free warning from KASAN.

Applied to 5.3/scsi-fixes, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH RESEND] qla2xxx: Fix gnl.l memory leak on adapter init failure

2019-08-14 Thread Martin K. Petersen


Bill,

> If HBA initialization fails unexpectedly (exiting via probe_failed:),
> we may fail to free vha->gnl.l. So that we don't attempt to double
> free, set this pointer to NULL after a free and check for NULL at
> probe_failed: so we know whether or not to call dma_free_coherent.

Applied to 5.3/scsi-fixes, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] megaraid_sas: change sdev queue depth max vs optimal

2019-08-12 Thread Martin K. Petersen


Chandrakanth,

> The firmware provided queue depth provides optimum performance in most
> of the cases/workloads. And this patch provides the option to the user
> to go with max queue_depth or with optimum queue_depth.

I guess I'm just objecting to the notion that something is being
described as "optimum" when it clearly isn't.

Applied to 5.4/scsi-queue. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v2 00/58] qla2xxx patches for kernel v5.4

2019-08-12 Thread Martin K. Petersen


Bart,

> The patches in this series improve the robustness of the QLogic Fibre
> Channel initiator and target drivers. These patches are a result of
> manual code inspection, analysis of Coverity reports and stress
> testing of these two drivers. Please consider these patches for kernel
> version v5.4.

Applied to 5.4/scsi-queue. Thanks you!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 00/12] mpt3sas: Features and defect fixes.

2019-08-07 Thread Martin K. Petersen


Suganath,

> This patch series includes below Enhancements and Bug fixes.

Applied to 5.4/scsi-queue. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 1/2] scsi: core: fix missing .cleanup_rq for SCSI hosts without request batching

2019-08-07 Thread Martin K. Petersen


Ming,

>> +   .cleanup_rq = scsi_cleanup_rq,
>> .busy   = scsi_mq_lld_busy,
>> .map_queues = scsi_map_queues,
>>  };
>
> This one is a cross-tree thing, either scsi/5.4/scsi-queue needs to
> pull for-5.4/block, or do it after both land linus tree.

I'll set up an amalgamated for-next branch tomorrow.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] lpfc: Fix crash when cpu count is 1 and null irq affinity mask

2019-08-07 Thread Martin K. Petersen


James,

> When a configurations runs with a single cpu (such as a kdump kernel),
> which causes the driver to request a single vector, when the driver
> subsequently requests an irq affinity mask, the mask comes back null.
> The driver currently does nothing in this scenario, which leaves
> mappings to hardware queues incomplete and crashes the system.
>
> Fix by recognizing the null mask and assigning the vector to the first
> cpu in the system.

Applied to 5.3/scsi-fixes. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: ncr53c8xx: Mark expected switch fall-through

2019-08-07 Thread Martin K. Petersen


Helge,

Applied to 5.4/scsi-queue. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [RFC PATCH v2] target: tcmu: clean the nl_cmd of the udev when nl send fails

2019-08-07 Thread Martin K. Petersen


Li,

> If the userspace process crashes while we send the nl msg, it is
> possible that the cmd in curr_nl_cmd of tcmu_dev never gets reset to
> 0, and and returns busy for other commands after the userspace process
> is restartd.

Applied to 5.4/scsi-queue, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v2 0/3] SCSI core patches for kernel v5.4

2019-08-07 Thread Martin K. Petersen


Bart,

> The patches in this series address SCSI device blocking and unblocking
> and fix a boot failure. Please consider these patches for kernel
> version v5.4.

Applied to 5.4/scsi-queue, thank you!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] megaraid_sas: change sdev queue depth max vs optimal

2019-08-07 Thread Martin K. Petersen


Chandrakanth,

> This patch provides the module parameter and sysfs interface to switch
> between the firmware provided (optimal) queue depth and controller
> queue depth (can_queue).

This smells a bit like a don't-be-broken flag.

Why isn't the firmware-provided value optimal?

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 00/15] qla2xxx: Bug fixes for the driver

2019-07-30 Thread Martin K. Petersen


Himanshu,

> This series contains bug fixes for the driver. Most of the fixes are
> obvious memory leak and/or error handling fixes.
>
> Please apply this series to 5.4/scsi-queue at your earliest
> convenience.

Applied to 5.4/scsi-queue. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v2] scsi: mpt3sas: clean up a couple sizeof() uses

2019-07-30 Thread Martin K. Petersen


Dan,

> There is a copy and paste bug here.  It uses EVENT_TRIGGERS size instead
> of SCSI_TRIGGERS size but fortunately both size are 84 bytes so it
> doesn't affect runtime.
>
> These days the prefered style is to just say sizeof(object) instead of
> sizeof(type) so I have updated the function to the latest style as well.

Applied to 5.4/scsi-queue. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v2] scsi: scsi_debugfs: Use for_each_set_bit to simplify code

2019-07-30 Thread Martin K. Petersen


Andy,

> We can use for_each_set_bit() to slightly simplify the code.

Applied to 5.4/scsi-queue. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v2] mpt3sas: Use 63-bit DMA addressing on SAS35 HBA

2019-07-30 Thread Martin K. Petersen


Suganath,

> Although SAS3 & SAS3.5 IT HBA controllers support 64-bit DMA
> addressing, as per hardware design, if DMA able range contains all
> 64-bits set (0x-) then it results in a firmware fault.

Applied to 5.3/scsi-fixes. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 0/2] hpsa updates

2019-07-30 Thread Martin K. Petersen


Don,

> These patches are based on Linus's tree

Applied to 5.3/scsi-fixes. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCHv3 0/3] fcoe: cleanup fc_rport_priv usage

2019-07-30 Thread Martin K. Petersen


Hannes,

> the fcoe vn2vn code is using the 'fc_rport_priv' structure as argument
> to its internal function, but is really expecting a struct fcoe_rport
> to immediately follow this one. This is not only confusing but also an
> error for new compilers.  So clean up the usage by embedding
> fc_rport_priv into fcoe_rport, and use the fcoe_rport structure
> wherever possible.  This patchset also contains some minor whitespace
> cleanups for libfc.h.

Applied to 5.3/scsi-fixes. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 0/3] Fix more magic values in the Future Domain drivers

2019-07-30 Thread Martin K. Petersen


Sergei,

> Here's a set of 3 patches against the Linus' repo. The recently
> resurrected Future Domain SCSI driver got a facelift by Ondrej (thank
> you!); however, several magic numbers were overlooked, so I went and
> fixed these cases.

Applied to 5.4/scsi-queue. Thank you!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 0/3] Fix more magic values in the Future Domain drivers

2019-07-23 Thread Martin K. Petersen


Sergei,

> Here's a set of 3 patches against the Linus' repo. The recently
> resurrected Future Domain SCSI driver got a facelift by Ondrej (thank
> you!); however, several magic numbers were overlooked, so I went and
> fixed these cases.
>
> Future Domain's stuff isn't new to me -- I wrote a FD SCSI driver for
> another OS back in '90s... I thought I might still have a real card
> somewhere in my flat but none were found... :-(

Ondrej: Please review!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: fix the dma_max_mapping_size call

2019-07-22 Thread Martin K. Petersen


Christoph,

> We should only call dma_max_mapping_size for devices that have a DMA
> mask set, otherwise we can run into a NULL pointer dereference that
> will crash the system.
>
> Also we need to do right shift to get the sectors from the size in
> bytes, not a left shift.

I queued this up since it breaks stuff for enough people. But I do feel
that some of Bart's concerns may be valid.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH B] scsi: fdomain: fix building pcmcia front-end

2019-07-22 Thread Martin K. Petersen


Arnd,

> Move all of SCSI_LOWLEVEL_PCMCIA inside of the existing SCSI_LOWLEVEL
> section. Very few people use the PCMCIA support these days, and they
> likely don't mind having to turn on SCSI_LOWLEVEL as well. This way we
> avoid the link error and get a more sensible structure.

Applied to 5.3/scsi-fixes. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] fcoe: avoid memset across pointer boundaries

2019-07-20 Thread Martin K. Petersen


Linus,

> The gcc-9 warnings are still there, and as annoying as they were
> originally. Appended for your viewing "pleasure" once again, in case
> you don't have gcc-9 installed..

I didn't merge them because Bart had some comments and I was expecting
Hannes to address those and repost.

Hannes: Please fix!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH V2] scsi: fix race on creating sense cache

2019-07-16 Thread Martin K. Petersen


Ming,

> When scsi_init_sense_cache(host) is called concurrently from different
> hosts, each code path may see that the cache isn't created, then try
> to create a new one, then the created sense cache may be overrided and
> leaked.
>
> Fixes the issue by moving 'mutex_lock(&scsi_sense_cache_mutex)' before
> scsi_select_sense_cache().

Applied to 5.3/scsi-fixes, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi_dh_alua: always use a 2 seconds delay before retrying RTPG

2019-07-16 Thread Martin K. Petersen


Zhang,

> Retrying immediately after we've received a 'transitioning' sense
> code is pretty much pointless, we should always use a delay before
> retrying.

Does Hannes' patch alleviate your issue?

-- 
Martin K. Petersen  Oracle Linux Engineering


  1   2   3   4   5   6   7   8   9   10   >