aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/qlge/qlge_mpi.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-01-29staging: qlge: remove mpi_core_to_log which sends coredump to the kernel ring bufferCoiby Xu1-6/+0
devlink health could be used to get coredump. No need to send so much data to the kernel ring buffer. Signed-off-by: Coiby Xu <coiby.xu@gmail.com> Link: https://lore.kernel.org/r/20210123104613.38359-7-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-29staging: qlge: use qlge_* prefix to avoid namespace clashes with other qlogic driversCoiby Xu1-176/+176
To avoid namespace clashes with other qlogic drivers and also for the sake of naming consistency, use the "qlge_" prefix as suggested in drivers/staging/qlge/TODO, - For existing ql_ prefix, sed -i "s/ql_/qlge_/g" *.{c,h} - for structs not having a prefix 1. get a list of structs grep "struct.*{" qlge. 2. add qlge_ for each struct, e.g., sed -i "s/ib_ae_iocb_rsp/qlge_ib_ae_iocb_rsp/g" *.{c,h} Link: https://lore.kernel.org/patchwork/patch/1318503/#1516131 Suggested-by: Benjamin Poirier <benjamin.poirier@gmail.com> Signed-off-by: Coiby Xu <coiby.xu@gmail.com> Link: https://lore.kernel.org/r/20210123104613.38359-2-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-26staging/qlge: fix typoElena Afanasova1-1/+1
Reported by checkpatch.pl. Signed-off-by: Elena Afanasova <eafanasova@gmail.com> Link: https://lore.kernel.org/r/20201020150559.35667-1-eafanasova@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-01staging: qlge: qlge_mpi: Fix several CHECKs involving bracesSebastian Fuentes1-9/+6
CHECK: Blank lines aren't necessary before a close brace '}' FILE: drivers/staging/qlge/qlge_mpi.c:121: CHECK: Unbalanced braces around else statement FILE: drivers/staging/qlge/qlge_mpi.c:243: CHECK: braces {} should be used on all arms of this statement FILE: drivers/staging/qlge/qlge_mpi.c:350: CHECK: Unbalanced braces around else statement FILE: drivers/staging/qlge/qlge_mpi.c:352: CHECK: Blank lines aren't necessary before a close brace '}' FILE: drivers/staging/qlge/qlge_mpi.c:360: CHECK: Blank lines aren't necessary after an open brace '{' FILE: drivers/staging/qlge/qlge_mpi.c:408: CHECK: braces {} should be used on all arms of this statement FILE: drivers/staging/qlge/qlge_mpi.c:997: CHECK: Unbalanced braces around else statement FILE: drivers/staging/qlge/qlge_mpi.c:1001: Signed-off-by: Sebastian Fuentes <sefu1789@gmail.com> Link: https://lore.kernel.org/r/20200831014859.GA29362@ubuntu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-28staging: qlge: Use fallthrough pseudo-keywordGustavo A. R. Silva1-2/+2
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Link: https://lore.kernel.org/r/20200727184042.GA29074@embeddedor Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-13staging: qlge: qlge_mpi: Simplify while statements.Suraj Upadhyay1-17/+15
Simplify while loops into more readable and simple for loops. Signed-off-by: Suraj Upadhyay <usuraj35@gmail.com> Link: https://lore.kernel.org/r/6eb96e8c074bbdee3838b6421d25b50f1faffb3d.1594642213.git.usuraj35@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-13staging: qlge: Remove pci-dma-compat wrapper APIs.Suraj Upadhyay1-4/+5
The legacy API wrappers in include/linux/pci-dma-compat.h should go away as it creates unnecessary midlayering for include/linux/dma-mapping.h APIs, instead use dma-mapping.h APIs directly. The patch has been generated with the coccinelle script below and compile-tested. @@@@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@@@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@@@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@@@ - PCI_DMA_NONE + DMA_NONE @@ expression E1, E2, E3; @@ - pci_alloc_consistent(E1, E2, E3) + dma_alloc_coherent(&E1->dev, E2, E3, GFP_ATOMIC) @@ expression E1, E2, E3; @@ - pci_zalloc_consistent(E1, E2, E3) + dma_alloc_coherent(&E1->dev, E2, E3, GFP_ATOMIC) @@ expression E1, E2, E3, E4; @@ - pci_free_consistent(E1, E2, E3, E4) + dma_free_coherent(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_map_single(E1, E2, E3, E4) + dma_map_single(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4; @@ - pci_unmap_single(E1, E2, E3, E4) + dma_unmap_single(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4, E5; @@ - pci_map_page(E1, E2, E3, E4, E5) + dma_map_page(&E1->dev, E2, E3, E4, (enum dma_data_direction)E5) @@ expression E1, E2, E3, E4; @@ - pci_unmap_page(E1, E2, E3, E4) + dma_unmap_page(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4; @@ - pci_map_sg(E1, E2, E3, E4) + dma_map_sg(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4; @@ - pci_unmap_sg(E1, E2, E3, E4) + dma_unmap_sg(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_single_for_cpu(E1, E2, E3, E4) + dma_sync_single_for_cpu(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_single_for_device(E1, E2, E3, E4) + dma_sync_single_for_device(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_sg_for_cpu(E1, E2, E3, E4) + dma_sync_sg_for_cpu(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_sg_for_device(E1, E2, E3, E4) + dma_sync_sg_for_device(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2; @@ - pci_dma_mapping_error(E1, E2) + dma_mapping_error(&E1->dev, E2) @@ expression E1, E2; @@ - pci_set_consistent_dma_mask(E1, E2) + dma_set_coherent_mask(&E1->dev, E2) @@ expression E1, E2; @@ - pci_set_dma_mask(E1, E2) + dma_set_mask(&E1->dev, E2) Signed-off-by: Suraj Upadhyay <usuraj35@gmail.com> Link: https://lore.kernel.org/r/20200711124633.GA16459@blackclown Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-27staging: qlge: fix else after return or breakCoiby Xu1-2/+2
Remove unnecessary elses after return or break. Signed-off-by: Coiby Xu <coiby.xu@gmail.com> Link: https://lore.kernel.org/r/20200625215755.70329-3-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-27staging: qlge: fix trailing */ in block commentCoiby Xu1-4/+6
Remove trailing "*/" in block comments. Signed-off-by: Coiby Xu <coiby.xu@gmail.com> Link: https://lore.kernel.org/r/20200625215755.70329-2-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-17staging: qlge: qlge_mpi.c: remove an unneeded variablePayal Kshirsagar1-4/+1
Remove unneeded temporary local variable, cleanup suggested by coccinelle. Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com> Reviewed-by: Stefano Brivio <sbrivio@redhat.com> Link: https://lore.kernel.org/r/20200312190624.24167-3-payalskshirsagar1234@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-11staging: qlge: Fix WARNING: Missing a blank line after declarationsCarlos Henrique Lima Melara1-0/+6
Fixed WARNING: Missing a blank line after declarations in qlge_mpi.c to the following lines: WARNING: Missing a blank line after declarations FILE: drivers/staging/qlge/qlge_mpi.c:94: WARNING: Missing a blank line after declarations FILE: drivers/staging/qlge/qlge_mpi.c:240: WARNING: Missing a blank line after declarations FILE: drivers/staging/qlge/qlge_mpi.c:258: WARNING: Missing a blank line after declarations FILE: drivers/staging/qlge/qlge_mpi.c:356: WARNING: Missing a blank line after declarations FILE: drivers/staging/qlge/qlge_mpi.c:915: WARNING: Missing a blank line after declarations FILE: drivers/staging/qlge/qlge_mpi.c:1099: Signed-off-by: Carlos Henrique Lima Melara <charlesmelara@outlook.com> Link: https://lore.kernel.org/r/CP2PR80MB434086A44A1ED5BB662B9D70A8FC0@CP2PR80MB4340.lamprd80.prod.outlook.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-17staging: qlge: Fix CHECK: Alignment should match open parenthesisScott Schafer1-11/+10
Fix CHECK: Alignment should match open parenthesis in qlge_dbg.c, qlge_ethtool.c, qlge_main.c, and qlge_mpi.c. Also made changes to the following lines: WARNING: quoted string split across lines FILE: drivers/staging/qlge/qlge_main.c:81 WARNING: quoted string split across lines FILE: drivers/staging/qlge/qlge_main.c:87 WARNING: quoted string split across lines FILE: drivers/staging/qlge/qlge_main.c:3528 WARNING: quoted string split across lines FILE: drivers/staging/qlge/qlge_main.c:3536 CHECK: spaces preferred around that '*' (ctx:VxV) drivers/staging/qlge/qlge_main.c:4102 I made these changes due to touching these lines in the original fix Signed-off-by: Scott Schafer <schaferjscott@gmail.com> Link: https://lore.kernel.org/r/27ec7ee0a3ba8c1ad946077aacfcc6e40b98c106.1576086080.git.schaferjscott@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-17staging: qlge: Fix CHECK extra blank lines in many filesScott Schafer1-5/+0
Fix CHECK: Please don't use multiple blank lines in qlge.h, qlge_dbg.c, qlge_ethtool.c, qlge_main.c, and qlge_mpi.c Signed-off-by: Scott Schafer <schaferjscott@gmail.com> Link: https://lore.kernel.org/r/9387760ae35bdeb606dc03ca9dd167f5214cd3a8.1576086080.git.schaferjscott@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-04staging: qlge: Remove irq_cntBenjamin Poirier1-1/+0
qlge uses an irq enable/disable refcounting scheme that is: * poorly implemented Uses a spin_lock to protect accesses to the irq_cnt atomic variable. * buggy Breaks when there is not a 1:1 sequence of irq - napi_poll, such as when using SO_BUSY_POLL. * unnecessary The purpose or irq_cnt is to reduce irq control writes when multiple work items result from one irq: the irq is re-enabled after all work is done. Analysis of the irq handler shows that there is only one case where there might be two workers scheduled at once, and those have separate irq masking bits. Therefore, remove irq_cnt. Additionally, we get a performance improvement: perf stat -e cycles -a -r5 super_netperf 100 -H 192.168.33.1 -t TCP_RR Before: 628560 628056 622103 622744 627202 [...] 268,803,947,669 cycles ( +- 0.09% ) After: 636300 634106 634984 638555 634188 [...] 259,237,291,449 cycles ( +- 0.19% ) Signed-off-by: Benjamin Poirier <bpoirier@suse.com> Link: https://lore.kernel.org/r/20190927101210.23856-3-bpoirier@suse.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-23qlge: Move drivers/net/ethernet/qlogic/qlge/ to drivers/staging/qlge/Benjamin Poirier1-0/+1285
The hardware has been declared EOL by the vendor more than 5 years ago. What's more relevant to the Linux kernel is that the quality of this driver is not on par with many other mainline drivers. Cc: Manish Chopra <manishc@marvell.com> Message-id: <20190617074858.32467-1-bpoirier@suse.com> Signed-off-by: Benjamin Poirier <bpoirier@suse.com> Signed-off-by: David S. Miller <davem@davemloft.net>