- 26 1月, 2017 3 次提交
-
-
由 Bhumika Goyal 提交于
Declare dev_pm_ops structures as const as they are only stored in the pm field of a device_driver structure. This field is of type const, so dev_pm_ops structures having similar properties can be declared const too. Signed-off-by: NBhumika Goyal <bhumirks@gmail.com> Acked-by: NTony Lindgren <tony@atomide.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Grzegorz Jaszczyk 提交于
This commit implements suspend/resume support in the mv64xxx I2C controller driver. There is no need to implement a ->suspend() hook, as calling mv64xxx_i2c_hw_init() at ->resume() time is enough. Signed-off-by: NGrzegorz Jaszczyk <jaz@semihalf.com> Reviewed-by: NNadav Haklai <nadavh@marvell.com> Reviewed-by: NLior Amsalem <alior@marvell.com> Tested-by: NLior Amsalem <alior@marvell.com> [Thomas: switch to dev_pm_ops, fix build warning when !PM.] Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 M'boumba Cedric Madianga 提交于
This patch adds support for the STM32F4 I2C controller. Signed-off-by: NM'boumba Cedric Madianga <cedric.madianga@gmail.com> Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 20 1月, 2017 8 次提交
-
-
由 Mathias Nyman 提交于
The warn on is a bit too much, we will anyway set the dma mask if not set previously. The main reason for this fix is that 4.10-rc1 has a dwc3 change that pass a parent sysdev dev pointer instead of setting the dma mask of its xhci platform device. xhci platform driver can then get more attributes from the sysdev than just the dma mask. The usb core and xhci changes are not yet in 4.10, and a fix like this was preferred instead of taking those big changes this late in the rc-cycle. Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Bhumika Goyal 提交于
Declare virtio_config_ops structure as const as it is only stored in the config field of a virtio_device structure. This field is of type const, so virtio_config_ops structures having this property can be declared const. Done using Coccinelle: @r1 disable optional_qualifier@ identifier i; position p; @@ static struct virtio_config_ops i@p={...}; @ok1@ identifier r1.i; position p; struct virtio_ccw_device x; @@ x.vdev.config=&i@p @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct virtio_config_ops i; File size before and after applying the patch remains the same. text data bss dec hex filename 9235 296 32928 42459 a5db drivers/s390/virtio/virtio_ccw.o Signed-off-by: NBhumika Goyal <bhumirks@gmail.com> Message-Id: <1484333336-13443-1-git-send-email-bhumirks@gmail.com> Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
-
由 Colin Ian King 提交于
Trival fix, dev_err message is missing a \n, so add it. Signed-off-by: NColin Ian King <colin.king@canonical.com> Message-Id: <20160927200844.16008-1-colin.king@canonical.com> Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
-
由 Pierre Morel 提交于
As virtio-1 introduced the possibility of the device manipulating the status byte, revision 2 of the virtio-ccw transport introduced a means of getting the status byte from the device via READ_STATUS. Let's wire it up for revisions >= 2 and fall back to returning the stored status byte if not supported. Signed-off-by: NPierre Morel <pmorel@linux.vnet.ibm.com> Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
-
由 G. Campana 提交于
Using control_work instead of config_work as the 3rd argument to container_of results in an invalid portdev pointer. Indeed, the work structure is initialized as below: INIT_WORK(&portdev->config_work, &config_work_handler); It leads to a crash when portdev->vdev is dereferenced later. This bug is triggered when the guest uses a virtio-console without multiport feature and receives a config_changed virtio interrupt. Signed-off-by: NG. Campana <gcampana@quarkslab.com> Reviewed-by: NAmit Shah <amit.shah@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Dan Carpenter 提交于
This is to silence an uninitialized variable warning in debug output. The problem is this line: pr_debug("vhost_get_vq_desc: head: %d, out: %u in: %u\n", head, out, in); If "head == vq->num" is true on the first iteration then "out" and "in" aren't initialized. We handle that a few lines after the printk. I was tempted to just delete the pr_debug() but I decided to just initialize them to zero instead. Also checkpatch.pl complains if variables are declared as just "unsigned" without the "int". Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Bhumika Goyal 提交于
Declare target_core_fabric_ops strucrues as const as they are only passed as an argument to the functions target_register_template and target_unregister_template. The arguments are of type const struct target_core_fabric_ops *, so target_core_fabric_ops structures having this property can be declared const. Done using Coccinelle: @r disable optional_qualifier@ identifier i; position p; @@ static struct target_core_fabric_ops i@p={...}; @ok@ position p; identifier r.i; @@ ( target_register_template(&i@p) | target_unregister_template(&i@p) ) @bad@ position p!={r.p,ok.p}; identifier r.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ +const struct target_core_fabric_ops i; File size before: drivers/vhost/scsi.o text data bss dec hex filename 18063 2985 40 21088 5260 drivers/vhost/scsi.o File size after: drivers/vhost/scsi.o text data bss dec hex filename 18479 2601 40 21120 5280 drivers/vhost/scsi.o Signed-off-by: NBhumika Goyal <bhumirks@gmail.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Acked-by: NJason Wang <jasowang@redhat.com>
-
由 Josef Bacik 提交于
A user noticed that write performance was horrible over loopback and we traced it to an inversion of when we need to set MSG_MORE. It should be set when we have more bvec's to send, not when we are on the last bvec. This patch made the test go from 20 iops to 78k iops. Signed-off-by: NJosef Bacik <jbacik@fb.com> Fixes: 429a787b ("nbd: fix use-after-free of rq/bio in the xmit path") Signed-off-by: NJens Axboe <axboe@fb.com>
-
- 19 1月, 2017 1 次提交
-
-
由 Jason Gerecke 提交于
Commit 345857bb ("HID: wacom: generic: Add support for sensor offsets") included a change to the operation and location of the call to 'wacom_add_shared_data' in 'wacom_parse_and_register'. The modifications included moving it higher up so that it would occur before the call to 'wacom_retrieve_hid_descriptor'. This was done to prevent a crash that would have occured when the report containing tablet offsets was fed into the driver with 'wacom_hid_report_raw_event' (specifically: the various 'wacom_wac_*_report' functions were written with the assumption that they would only be called once tablet setup had completed; 'wacom_wac_pen_report' in particular dereferences 'shared' which wasn't yet allocated). Moving the call to 'wacom_add_shared_data' effectively prevented the crash but also broke the sibiling detection code which assumes that the HID descriptor has been read and the various device_type flags set. To fix this situation, we restore the original 'wacom_add_shared_data' operation and location and instead implement an alternative change that can also prevent the crash. Specifically, we notice that the report functions mentioned above expect to be called only for input reports. By adding a check, we can prevent feature reports (such as the offset report) from causing trouble. Fixes: 345857bb ("HID: wacom: generic: Add support for sensor offsets") Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com> Tested-by: NPing Cheng <pingc@wacom.com> Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 18 1月, 2017 22 次提交
-
-
由 James Bottomley 提交于
mpt3sas has a firmware failure where it can only handle one pass through ATA command at a time. If another comes in, contrary to the SAT standard, it will hang until the first one completes (causing long commands like secure erase to timeout). The original fix was to block the device when an ATA command came in, but this caused a regression with commit 669f0441 Author: Bart Van Assche <bart.vanassche@sandisk.com> Date: Tue Nov 22 16:17:13 2016 -0800 scsi: srp_transport: Move queuecommand() wait code to SCSI core So fix the original fix of the secure erase timeout by properly returning SAM_STAT_BUSY like the SAT recommends. The original patch also had a concurrency problem since scsih_qcmd is lockless at that point (this is fixed by using atomic bitops to set and test the flag). [mkp: addressed feedback wrt. test_bit and fixed whitespace] Fixes: 18f6084a (mpt3sas: Fix secure erase premature termination) Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com> Acked-by: NSreekanth Reddy <Sreekanth.Reddy@broadcom.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> Reported-by: NIngo Molnar <mingo@kernel.org> Tested-by: NIngo Molnar <mingo@kernel.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Quinn Tran 提交于
Out of order(OOO) processing requires initiator, switch and target to support OOO. In today's environment, none of the switches support OOO. OOO requires extra buffer space which affect performance. By turning ON this feature in QLogic's FW, it delays error recovery because dropped frame is treated as out of order frame. We're turning OFF this option of speed up error recovery. Signed-off-by: NQuinn Tran <quinn.tran@cavium.com> Signed-off-by: NHimanshu Madhani <himanshu.madhani@cavium.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> [ bvanassche: Fixed spelling in patch description ] Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
-
由 Quinn Tran 提交于
Termination of Immediate Notify IOCB was using wrong IOCB handle. IOCB completion code was unable to find appropriate code path due to wrong handle. Following message is seen in the logs. "Error entry - invalid handle/queue (ffff)." Signed-off-by: NQuinn Tran <quinn.tran@cavium.com> Signed-off-by: NHimanshu Madhani <himanshu.madhani@cavium.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> [ bvanassche: Fixed word order in patch title ] Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
-
由 Quinn Tran 提交于
Soft reset and Risc reset should take 100uS to complete. This change pad the timeout up to 400uS, which should be plenty. Signed-off-by: NQuinn Tran <quinn.tran@cavium.com> Signed-off-by: NHimanshu Madhani <himanshu.madhani@cavium.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
-
由 Quinn Tran 提交于
Corrupted ATIO is defined as length of fcp_header & fcp_cmd payload is less than 0x38. It's the minimum size for a frame to carry 8..16 bytes SCSI CDB. The exchange will be dropped or terminated if corrupted. Signed-off-by: NQuinn Tran <quinn.tran@cavium.com> Signed-off-by: NHimanshu Madhani <himanshu.madhani@cavium.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> [ bvanassche: Fixed spelling in patch title ] Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
-
由 Quinn Tran 提交于
During code inspection, while investigating following stack trace seen on one of the test setup, we found out there was possibility of memory leak becuase driver was not unwinding the stack properly. This issue has not been reproduced in a test environment or on a customer setup. Here's stack trace that was seen. [1469877.797315] Call Trace: [1469877.799940] [<ffffffffa03ab6e9>] qla2x00_mem_alloc+0xb09/0x10c0 [qla2xxx] [1469877.806980] [<ffffffffa03ac50a>] qla2x00_probe_one+0x86a/0x1b50 [qla2xxx] [1469877.814013] [<ffffffff813b6d01>] ? __pm_runtime_resume+0x51/0xa0 [1469877.820265] [<ffffffff8157c1f5>] ? _raw_spin_lock_irqsave+0x25/0x90 [1469877.826776] [<ffffffff8157cd2d>] ? _raw_spin_unlock_irqrestore+0x6d/0x80 [1469877.833720] [<ffffffff810741d1>] ? preempt_count_sub+0xb1/0x100 [1469877.839885] [<ffffffff8157cd0c>] ? _raw_spin_unlock_irqrestore+0x4c/0x80 [1469877.846830] [<ffffffff81319b9c>] local_pci_probe+0x4c/0xb0 [1469877.852562] [<ffffffff810741d1>] ? preempt_count_sub+0xb1/0x100 [1469877.858727] [<ffffffff81319c89>] pci_call_probe+0x89/0xb0 Cc: <stable@vger.kernel.org> Signed-off-by: NQuinn Tran <quinn.tran@cavium.com> Signed-off-by: NHimanshu Madhani <himanshu.madhani@cavium.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> [ bvanassche: Fixed spelling in patch description ] Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
-
由 Quinn Tran 提交于
Signed-off-by: NQuinn Tran <quinn.tran@cavium.com> Signed-off-by: NHimanshu Madhani <himanshu.madhani@cavium.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
-
由 Himanshu Madhani 提交于
During NVRAM initialization in target mode, reset reserved fields in firmware options to Zero (BIT 15) Signed-off-by: NHimanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: NGiridhar Malavali <giridhar.malavali@cavium.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
-
由 Himanshu Madhani 提交于
Signed-off-by: NHimanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: NGiridhar Malavali <giridhar.malavali@cavium.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
-
由 Himanshu Madhani 提交于
Include ATIO queue for ISP27XX when firmware dump is collected for target mode. Signed-off-by: NHimanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: NGiridhar Malavali <giridhar.malavali@cavium.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
-
由 Quinn Tran 提交于
qlt_reset is called with Immedidate Notify IOCB only. Current code wrongly cast it as ATIO IOCB. Signed-off-by: NQuinn Tran <quinn.tran@cavium.com> Signed-off-by: NHimanshu Madhani <himanshu.madhani@cavium.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
-
由 Bart Van Assche 提交于
Remove two set-but-not-used variables and avoid that the compiler warns about a third variable (rc). Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com> Acked-by: NHimanshu Madhani <himanshu.madhani@qlogic.com> Cc: Quinn Tran <quinn.tran@qlogic.com> Cc: Christoph Hellwig <hch@lst.de>
-
由 Bart Van Assche 提交于
This patch avoids that building with W=1 triggers compiler warnings similar to the following: drivers/scsi/qla2xxx/qla_nx2.h:538:23: warning: ‘qla8044_reg_tbl’ defined but not used [-Wunused-const-variable=] Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com> Acked-by: NHimanshu Madhani <himanshu.madhani@qlogic.com> Cc: Quinn Tran <quinn.tran@qlogic.com> Cc: Christoph Hellwig <hch@lst.de>
-
由 Bart Van Assche 提交于
This patch avoids that building with W=1 triggers a compiler warning about a missing declaration. Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com> Acked-by: NHimanshu Madhani <himanshu.madhani@qlogic.com> Cc: Quinn Tran <quinn.tran@qlogic.com> Cc: Christoph Hellwig <hch@lst.de>
-
由 Bart Van Assche 提交于
This patch avoids that smatch complains about inconsistent indentation. Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com> Acked-by: NHimanshu Madhani <himanshu.madhani@qlogic.com> Cc: Quinn Tran <quinn.tran@qlogic.com> Cc: Christoph Hellwig <hch@lst.de>
-
由 Johannes Thumshirn 提交于
Set the elsiocb contexts to NULL after freeing as others depend on it. Signed-off-by: NJohannes Thumshirn <jthumshirn@suse.de> Acked-by: NDick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Damien Le Moal 提交于
There is no good match of the zoned field of the block device characteristics page for host-managed devices. For these devices, the zoning model is derived directly from the device type. So ignore the zoned field for these drives. [mkp: typo] Signed-off-by: NDamien Le Moal <damien.lemoal@wdc.com> Reviewed-by: NHannes Reinecke <hare@suse.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Damien Le Moal 提交于
Zoned block devices force the use of READ/WRITE(16) commands by setting sdkp->use_16_for_rw and clearing sdkp->use_10_for_rw. This result in DPOFUA always being disabled for these drives as the assumed use of the deprecated READ/WRITE(6) commands only looks at sdkp->use_10_for_rw. Strenghten the test by also checking that sdkp->use_16_for_rw is false. Signed-off-by: NDamien Le Moal <damien.lemoal@wdc.com> Reviewed-by: NHannes Reinecke <hare@suse.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Johannes Thumshirn 提交于
Commit 01e0e15c ("scsi: don't use fc_bsg_job::request and fc_bsg_job::reply directly") introduced a typo, which causes that the bsg_request variable in bfad_im_bsg_els_ct_request() is initialized to itself instead of pointing to the bsg job's request. Reported-by: NNicolas Iooss <nicolas.iooss_linux@m4x.org> Signed-off-by: NJohannes Thumshirn <jthumshirn@suse.de> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Ewan D. Milne 提交于
The call to scsi_is_sas_rphy() needs to be made on the SAS end_device, not on the SCSI device. Fixes: 835831c5 ("ses: use scsi_is_sas_rphy instead of is_sas_attached") Signed-off-by: NEwan D. Milne <emilne@redhat.com> Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de> Reviewed-by: NJames Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Bryant G. Ly 提交于
Currently, dma_alloc_coherent is being called with a GFP_KERNEL flag which allows it to sleep in an interrupt context, need to change to GFP_ATOMIC. Cc: stable@vger.kernel.org Tested-by: NSteven Royer <seroyer@linux.vnet.ibm.com> Reviewed-by: NMichael Cyr <mikecyr@linux.vnet.ibm.com> Signed-off-by: NBryant G. Ly <bryantly@linux.vnet.ibm.com> Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
-
由 Bryant G. Ly 提交于
Current code incorrectly calculates the max transfer length, since it is assuming a 4k page table, but ppc64 all run on 64k page tables. Cc: stable@vger.kernel.org Reported-by: NSteven Royer <seroyer@linux.vnet.ibm.com> Tested-by: NSteven Royer <seroyer@linux.vnet.ibm.com> Signed-off-by: NBryant G. Ly <bryantly@linux.vnet.ibm.com> Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
-
- 17 1月, 2017 6 次提交
-
-
由 Marc Zyngier 提交于
The conversion to the new hotplug state machine introduced a regression where a successful hotplug registration would be treated as an error, effectively disabling the MSI driver forever. Fix it by doing the proper check on the return value. Fixes: 9c248f88 ("PCI/xgene-msi: Convert to hotplug state machine") Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de> Tested-by: NDuc Dang <dhdang@apm.com> CC: Thomas Gleixner <tglx@linutronix.de> CC: stable@vger.kernel.org
-
由 Joonyoung Shim 提交于
When a CPU goes offline a potentially pending timer interrupt is not cleared. When the CPU comes online again then the pending interrupt is delivered before the per cpu clockevent device is initialized. As a consequence the tick interrupt handler dereferences a NULL pointer. [ 51.251378] Unable to handle kernel NULL pointer dereference at virtual address 00000040 [ 51.289348] task: ee942d00 task.stack: ee960000 [ 51.293861] PC is at tick_periodic+0x38/0xb0 [ 51.298102] LR is at tick_handle_periodic+0x1c/0x90 Clear the pending interrupt in the cpu dying path. Fixes: 56a94f13 ("clocksource: exynos_mct: Avoid blocking calls in the cpu hotplug notifier") Reported-by: NSeung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: NJoonyoung Shim <jy0922.shim@samsung.com> Cc: linux-samsung-soc@vger.kernel.org Cc: cw00.choi@samsung.com Cc: daniel.lezcano@linaro.org Cc: stable@vger.kernel.org Cc: javier@osg.samsung.com Cc: kgene@kernel.org Cc: krzk@kernel.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1484628876-22065-1-git-send-email-jy0922.shim@samsung.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
-
由 Caesar Wang 提交于
As Ayaka reported the thermal was abormal on rk3288 at booting time. thermal thermal_zone1: critical temperature reached(125 C),shutting down thermal thermal_zone2: critical temperature reached(125 C),shutting down thermal thermal_zone1: critical temperature reached(125 C),shutting down thermal thermal_zone2: critical temperature reached(125 C),shutting down ... The root caused by reading the invald analogic value, the value is zero will convert the 125 degree to trigger the critical temperature. Fixes it with insteading of the incorrect reading now. Fixes commit cadf29dc ("thermal: rockchip: optimize the conversion table") Reported-by: Nayaka <ayaka@soulik.info> Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Jack Morgenstein 提交于
When running SRIOV, warnings for SRQ LIMIT events flood the Hypervisor's message log when (correct, normally operating) apps use SRQ LIMIT events as a trigger to post WQEs to SRQs. Add more information to the existing debug printout for SRQ_LIMIT, and output the warning messages only for the SRQ CATAS ERROR event. Fixes: acba2420 ("mlx4_core: Add wrapper functions and comm channel and slave event support to EQs") Fixes: e0debf9c ("mlx4_core: Reduce warning message for SRQ_LIMIT event to debug level") Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: NTariq Toukan <tariqt@mellanox.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jack Morgenstein 提交于
Save the qp context flags byte containing the flag disabling vlan stripping in the RESET to INIT qp transition, rather than in the INIT to RTR transition. Per the firmware spec, the flags in this byte are active in the RESET to INIT transition. As a result of saving the flags in the incorrect qp transition, when switching dynamically from VGT to VST and back to VGT, the vlan remained stripped (as is required for VST) and did not return to not-stripped (as is required for VGT). Fixes: f0f829bf ("net/mlx4_core: Add immediate activate for VGT->VST->VGT") Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: NTariq Toukan <tariqt@mellanox.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jack Morgenstein 提交于
In function mlx4_cq_completion() and mlx4_cq_event(), the radix_tree_lookup requires a rcu_read_lock. This is mandatory: if another core frees the CQ, it could run the radix_tree_node_rcu_free() call_rcu() callback while its being used by the radix tree lookup function. Additionally, in function mlx4_cq_event(), since we are adding the rcu lock around the radix-tree lookup, we no longer need to take the spinlock. Also, the synchronize_irq() call for the async event eliminates the need for incrementing the cq reference count in mlx4_cq_event(). Other changes: 1. In function mlx4_cq_free(), replace spin_lock_irq with spin_lock: we no longer take this spinlock in the interrupt context. The spinlock here, therefore, simply protects against different threads simultaneously invoking mlx4_cq_free() for different cq's. 2. In function mlx4_cq_free(), we move the radix tree delete to before the synchronize_irq() calls. This guarantees that we will not access this cq during any subsequent interrupts, and therefore can safely free the CQ after the synchronize_irq calls. The rcu_read_lock in the interrupt handlers only needs to protect against corrupting the radix tree; the interrupt handlers may access the cq outside the rcu_read_lock due to the synchronize_irq calls which protect against premature freeing of the cq. 3. In function mlx4_cq_event(), we change the mlx_warn message to mlx4_dbg. 4. We leave the cq reference count mechanism in place, because it is still needed for the cq completion tasklet mechanism. Fixes: 6d90aa5c ("net/mlx4_core: Make sure there are no pending async events when freeing CQ") Fixes: 225c7b1f ("IB/mlx4: Add a driver Mellanox ConnectX InfiniBand adapters") Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: NMatan Barak <matanb@mellanox.com> Signed-off-by: NTariq Toukan <tariqt@mellanox.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-