summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* IB/ipath: Fix PCI config write size used to clear linkctrl error bitsRoland Dreier2008-04-161-1/+1
| | | | | | | | | | | | | | In slave_or_pri_blk(), pci_write_config_byte() is used to write a 16-bit quantity to clear linkctrl CRC error bits. This is clearly a bug and also causes the warning drivers/infiniband/hw/ipath/ipath_iba6110.c: In function 'slave_or_pri_blk': drivers/infiniband/hw/ipath/ipath_iba6110.c:849: warning: overflow in implicit constant conversion Fix this by using pci_write_config_word() instead. Acked-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Fix sanity checks on QP number of WRs and SGEsRalph Campbell2008-04-161-10/+16
| | | | | | | | The receive queue number of WRs and SGEs shouldn't be checked if a SRQ is specified. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Remove useless commentsRalph Campbell2008-04-161-2/+0
| | | | | | | | Remove useless comment about list removal since locks are held and the code checks that the QP is on the list before removing it. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: HW workaround for case where chip can send but not receiveDave Olson2008-04-163-0/+24
| | | | | | | | | | Workaround a QLE7140 problem that in rare cases causes flow control problems after link recovery by forcing a link retrain after recovery. A module parameter is provided to control the behavior in case it causes problems. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Add code to support multiple link speeds and widthsRalph Campbell2008-04-163-33/+69
| | | | | | | | This patch adds code to get/set portinfo to support multiple link speeds and widths. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Head of Line blocking vs forward progress of user appsJohn Gregor2008-04-167-182/+310
| | | | | | | | | | | | | | | | There's a conflict between our need to quiesce PSM-based applications to avoid HoL blocking when the IB link goes down and the apps' desire to remain running so that their quiescence timout mechanism can keep running. The compromise is to STOP the processes for a fixed period of time and then alternate between CONT and STOP until the link is again active. If there are poor interactions with subnet manager configuration at a given site, the interval can be adjusted via a module paramter. Signed-off-by: John Gregor <john.gregor@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Make debug error message match the constraint that is checked forRalph Campbell2008-04-161-1/+1
| | | | | Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Don't try to handle freeze mode HW errors if diagnostic modeRalph Campbell2008-04-161-1/+1
| | | | | | | | Don't try to handle freeze mode HW errors if the driver is in diagnostic mode since some tests can cause errors that shouldn't be processed. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Fix link up LED displayArthur Jones2008-04-161-1/+1
| | | | | | | | The check for link up was incorrect, thus setting the LED display inconsistently with the link state. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Fix error recovery for send buffer status after chip freeze modeRalph Campbell2008-04-161-1/+2
| | | | | | | | | The error recovery code for updating the driver's cached status information for which send buffers are busy or free wasn't updated for IBA7220. It should be similar to the initialization code in enable_chip(). Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Fix byte order of pioavail in handle_errors()Ralph Campbell2008-04-161-3/+3
| | | | | | | | Fix byte order of value assigned to pioavailshadow. This bug was detected by sparse endianness warnings. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Avoid integer overflow when allocating huge ICM tableRoland Dreier2008-04-161-1/+3
| | | | | | | | | | | | | | In mthca_alloc_icm_table(), the number of entries to allocate for the table->icm array is computed by calculating obj_size * nobj and then dividing by MTHCA_TABLE_CHUNK_SIZE. If nobj is really large, then obj_size * nobj may overflow and the division may get the wrong value (even a negative value). Fix this by calculating the number of objects per chunk and then dividing nobj by this value instead. This patch allows crazy configurations such as loading ib_mthca with the module parameter num_mtt=33554432 to work properly. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Avoid integer overflow when dealing with profile sizeRoland Dreier2008-04-163-7/+10
| | | | | | | | | | | | | | mthca_make_profile() returns the size in bytes of the HCA context layout it creates, or a negative value if an error occurs. However, the return value is declared as u64 and the memfree initialization path casts this value to int to test if it is negative. This makes it think incorrectly than an error has occurred if the context size happens to be bigger than 2GB, since this turns into a negative int. Fix this by having mthca_make_profile() return an s64 and testing for an error by checking whether this 64-bit value itself is negative. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ehca: Remove tgid checkingHoang-Nam Nguyen2008-04-167-162/+0
| | | | | | | | | | | | | | Pavel Emelyanov <xemul@openvz.org> mentioned in <http://lkml.org/lkml/2008/3/17/131> that the task_struct->tgid field is about to become deprecated, so the uses in the ehca driver need to be fixed up. However, all the uses in ehca are for some object ownership checking that is not really needed, and anyway is implementing a policy that should be in common code rather than a low-level driver. So just remove all the checks. Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/srp: Enforce protocol limit on srp_sg_tablesizeDavid Dillow2008-04-161-1/+6
| | | | | | | | | | | | | | The current SRP initiator will allow unlimited s/g entries in the indirect descriptors lists, but the entry count field in the SRP_CMD request is 8 bits, so setting srp_sg_tablesize too large will open the possibility of wrapping the count and generating invalid requests. Clamp srp_sg_tablesize to the protocol limits to prevent surprises. Reported by Martin W. Schlining III <mschlining@datadirectnet.com>. Signed-off-by: David Dillow <dillowda@ornl.gov> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Enable 4KB MTUDave Olson2008-04-168-65/+45
| | | | | | | | | | | Enable use of 4KB MTU. Since the driver uses more pinned memory for receive buffers when the 4KB MTU is enabled, whether or not the fabric supports that MTU, add a "mtu4096" module parameter that can be used to limit the MTU to 2KB when it is known that 4KB MTUs can't be used anyway. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Shared context code needs to be sure device is usableDave Olson2008-04-161-1/+1
| | | | | | | | The code was checking if units are present, but not that present units were usable (link up, etc.) Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Provide I/O bus speeds for diagnostic purposesArthur Jones2008-04-164-23/+85
| | | | | | | | | | Modern I/O buses like PCIe and HT can be configured for multiple speeds and widths. When an ipath HCA seems to have lower than expected performance, it is very useful to be able to display what the driver thinks the bus speed is. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Make some constants chip-specific, related cleanupDave Olson2008-04-163-30/+35
| | | | | | | | This patch makes some constants chip-specific, and makes some related changes to prepare for supporting another HCA. Signed-off-by: Dave Olson <dave.olson@qlogic.com Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Misc sparse warning cleanupArthur Jones2008-04-162-4/+7
| | | | | | | | | | Recent sparse versions and kernel cleanups knock down the false positive rate of the ipath driver code to a point where having it be sparse clean is worthwhile. Here we fixup the sparse warnings. Some of these warnings (and the impetus to run sparse again) are due to work by Roland Dreier. Signed-off-by: Arthur Jones <arthur.jones@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Add IPoIB checksum offload supportEli Cohen2008-04-166-13/+30
| | | | | | | | | | | Arbel and Sinai devices support checksum generation and verification of TCP and UDP packets for UD IPoIB messages. This patch checks if the HCA supports this and sets the IB_DEVICE_UD_IP_CSUM capability flag if it does. It implements support for handling the IB_SEND_IP_CSUM send flag and setting the csum_ok field in receive work completions. Signed-off-by: Eli Cohen <eli@mellnaox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mlx4: Add IPoIB checksum offload supportEli Cohen2008-04-166-6/+43
| | | | | | | | | | | | ConnectX devices support checksum generation and verification of TCP and UDP packets for UD IPoIB messages. This patch checks if the HCA supports this and sets the IB_DEVICE_UD_IP_CSUM capability flag if it does. It implements support for handling the IB_SEND_IP_CSUM send flag and setting the csum_ok field in receive work completions. Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Ali Ayub <ali@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IPoIB: Use checksum offload support if availableEli Cohen2008-04-164-1/+41
| | | | | | | | | For HCAs that support checksum offload (ie that set IB_DEVICE_UD_IP_CSUM in the device capabilities flags), have IPoIB set NETIF_F_IP_CSUM and use the HCA to generate and verify IP checksums. Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB: Replace remaining __FUNCTION__ occurrences with __func__Harvey Harrison2008-04-1626-302/+302
| | | | | | | | __FUNCTION__ is gcc-specific, use __func__ instead. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ehca: Make symbols used only in a single source file staticRoland Dreier2008-04-163-16/+15
| | | | | | | | | | | | | | | | | | | | | Allow the compiler to optimize better and generate smaller code: add/remove: 0/6 grow/shrink: 2/0 up/down: 1528/-1864 (-336) function old new delta .ehca_set_pagebuf 1344 2172 +828 .ehca_probe 2312 3012 +700 ehca_set_pagebuf_phys 24 - -24 ehca_set_pagebuf_fmr 24 - -24 ehca_init_device 24 - -24 .ehca_set_pagebuf_fmr 480 - -480 .ehca_set_pagebuf_phys 512 - -512 .ehca_init_device 800 - -800 Also this fixes warnings like: drivers/infiniband/hw/ehca/ehca_mrmw.c:2015:5: warning: symbol 'ehca_set_pagebuf_fmr' was not declared. Should it be static? Signed-off-by: Roland Dreier <rolandd@cisco.com>
* RDMA/nes: Make symbols used only in a single source file staticRoland Dreier2008-04-167-97/+88
| | | | | | Avoid namespace pollution and allow the compiler to optimize better. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* RDMA/nes: Use proper format and cast to print dma_addr_tRoland Dreier2008-04-161-8/+8
| | | | | | | | | | | | | | | | | | On some platforms, eg sparc64, dma_addr_t is not the same size as a pointer, so printing dma_addr_t values by casting to void * and using a %p format generates warnings. Fix this by casting to unsigned long and using %lx instead. This fixes the warnings: drivers/infiniband/hw/nes/nes_verbs.c: In function 'nes_setup_virt_qp': drivers/infiniband/hw/nes/nes_verbs.c:1047: warning: cast to pointer from integer of different size drivers/infiniband/hw/nes/nes_verbs.c:1078: warning: cast to pointer from integer of different size drivers/infiniband/hw/nes/nes_verbs.c:1078: warning: cast to pointer from integer of different size drivers/infiniband/hw/nes/nes_verbs.c: In function 'nes_reg_user_mr': drivers/infiniband/hw/nes/nes_verbs.c:2657: warning: cast to pointer from integer of different size Reported by Andrew Morton <akpm@linux-foundation.org>. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* RDMA/nes: Remove unused nes_netdev_exit() functionRoland Dreier2008-04-162-23/+0
| | | | | | nes_netdev_exit() has no callers, so delete it. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* RDMA/nes: Remove redundant NULL check in nes_unregister_ofa_device()Roland Dreier2008-04-161-3/+0
| | | | | | | | | | | nes_unregister_ofa_device() dereferences the nesibdev pointer before testing if it's NULL. Also, the test is doubly redundant because the only caller of nes_unregister_ofa_device() is nes_destroy_ofa_device(), which already tests if nesibdev is NULL. Remove the unnecessary test. This was spotted by the Coverity checker (CID 2190). Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/uverbs: Use alloc_file() instead of get_empty_filp()Roland Dreier2008-04-161-12/+7
| | | | | | | | Christoph Hellwig wants to unexport get_empty_filp(), which is an ugly internal interface. Change the modular user in ib_uverbs_alloc_event_file() to use the better alloc_file() interface; this makes the code cleaner too. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/uverbs: Don't store struct file * for event filesRoland Dreier2008-04-162-7/+6
| | | | | | | | | | The file member of struct ib_uverbs_event_file was only used to keep track of whether the file had been closed or not. The only thing we ever did with the value was check if it was NULL or not. Simplify the code and get rid of the need to keep track of the struct file * we allocate by replacing the file member with an is_closed member. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* mlx4_core: Fix confusion between mlx4_event and mlx4_dev_event enumsRoland Dreier2008-04-166-18/+18
| | | | | | | | | | | | | | | | | | | | The struct mlx4_interface.event() method was supposed to get an enum mlx4_dev_event, but the driver code was actually passing in the hardware enum mlx4_event values. Fix up the callers of mlx4_dispatch_event() so that they pass in the right type of value, and fix up the event method in mlx4_ib so that it can handle the enum mlx4_dev_event values. This eliminates the need for the subtype parameter to the event method, so remove it. This also fixes the sparse warning drivers/net/mlx4/intf.c:127:48: warning: mixing different enum types drivers/net/mlx4/intf.c:127:48: int enum mlx4_event versus drivers/net/mlx4/intf.c:127:48: int enum mlx4_dev_event Signed-off-by: Roland Dreier <rolandd@cisco.com>
* RDMA/amso1100: Endian annotate mqsq allocatorRoland Dreier2008-04-162-8/+8
| | | | Signed-off-by: Roland Dreier <rolandd@cisco.com>
* RDMA/amso1100: Start of endianness annotationRoland Dreier2008-04-168-160/+166
| | | | | Signed-off-by: Roland Dreier <rolandd@cisco.com> Acked-by: Steve Wise <swise@opengridcomputing.com>
* RDMA/nes: Delete unused variablesRoland Dreier2008-04-162-16/+0
| | | | | | | None of the cqp_reqs_XXX counters were ever used anywhere, and neither was the nics_per_function variable. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* RDMA/nes: Trivial endianness annotationsRoland Dreier2008-04-161-2/+2
| | | | | | Fix a couple of htonl() that should really be ntohl(). Signed-off-by: Roland Dreier <rolandd@cisco.com>
* RDMA/ucma: Endian annotationRoland Dreier2008-04-161-1/+1
| | | | | | | Add __force cast of node_guid to __u64, since we are sticking it into a structure whose definition is shared with userspace. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/cm: Endianness annotationsRoland Dreier2008-04-161-19/+44
| | | | | | | | | Mostly update the RB tree comparisons to force __be types to normal integers, but the change to cm_format_sidr_req() is a real fix: param->path->pkey is already __be16. Signed-off-by: Roland Dreier <rolandd@cisco.com> Acked-by: Sean Hefty <sean.hefty@intel.com>
* IB/mlx4: Endianness annotationsRoland Dreier2008-04-161-2/+2
| | | | | | Trivial fixes to stamp_send_wqe(). Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Fix sparse warning about shadowed symbolRoland Dreier2008-04-161-4/+4
| | | | | | | | | | | | Fix drivers/infiniband/hw/ipath/ipath_init_chip.c:526:10: warning: symbol 'val' shadows an earlier one drivers/infiniband/hw/ipath/ipath_init_chip.c:473:6: originally declared here by giving the second val a different name. Signed-off-by: Roland Dreier <rolandd@cisco.com> Acked-by: Arthur Jones <arthur.jones@qlogic.com>
* IB/ipath: Fix sparse warning about pointer signednessArthur Jones2008-04-162-3/+3
| | | | | | | | | | | | | There's no reason for the third parameter of ipath_count_units() to be a u32 *, so change it to be an int * instead. This fixes the sparse warning: drivers/infiniband/hw/ipath/ipath_file_ops.c:1654:47: warning: incorrect type in argument 3 (different signedness) drivers/infiniband/hw/ipath/ipath_file_ops.c:1654:47: expected unsigned int [usertype] *maxportsp drivers/infiniband/hw/ipath/ipath_file_ops.c:1654:47: got int *<noident> Signed-off-by: Arthur Jones <arthur.jones@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB: Make struct ib_uobject.id a signed intRoland Dreier2008-04-161-1/+1
| | | | | | | IDR IDs are signed, so struct ib_uobject.id should be signed. This avoids some sparse pointer signedness warnings. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* RDMA/cxgb3: IDR IDs are signedRoland Dreier2008-04-161-1/+1
| | | | | | | | Fix sparse warnings about pointer signedness by using a signed int when calling idr_get_new_above(). Signed-off-by: Roland Dreier <rolandd@cisco.com> Acked-by: Steve Wise <swise@opengridcomputing.com>
* RDMA/amso1100: Don't use 0UL as a NULL pointerRoland Dreier2008-04-161-5/+5
| | | | | | | | | | | | | | | Write tests for NULL pointers as if (!ptr) instead of if (ptr == 0UL) to fix sparse warnings. Signed-off-by: Roland Dreier <rolandd@cisco.com> Acked-by: Steve Wise <swise@opengridcomputing.com>
* mlx4_core: Move opening brace of function onto a new lineRoland Dreier2008-04-161-1/+2
| | | | Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mlx4: Convert "if(foo)" to "if (foo)"Roland Dreier2008-04-161-1/+1
| | | | Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Formatting cleanupsRoland Dreier2008-04-166-11/+11
| | | | | | Fix a few whitespace and other coding style problems. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* Linux 2.6.25v2.6.25Linus Torvalds2008-04-161-1/+1
|
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6Linus Torvalds2008-04-167-36/+13
|\ | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: it821x: do not describe noraid parameter with its value Pb1200/DBAu1200: fix bad IDE resource size Au1200: IDE driver build fix Au1200: kill IDE driver function prototypes avr32 mustn't select HAVE_IDE
| * it821x: do not describe noraid parameter with its valuePaul Bolle2008-04-171-1/+1
| | | | | | | | | | | | | | Describe noraid parameter with its name (and not its value). Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>