summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* ide-floppy: remove IDEFLOPPY_DEBUG_BUGS macroBorislav Petkov2008-02-021-6/+1
| | | | | Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-floppy: mv idefloppy_{should_,}report_errorBorislav Petkov2008-02-021-24/+14
| | | | | | | | | | | | | In addition to shortening the function name, move the printk-call into the function thereby saving some code lines. Also, make the function out_of_line since it is not on a performance critical path. Finally, rename the reworked function to ide_floppy..(). Bart: - minor CodingStyle fixup Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-floppy: report DMA handling in idefloppy_pc_intr() properlyBorislav Petkov2008-02-021-1/+5
| | | | | | | | | Bart: - use 'hwif' instead of 'HWIF(drive)' - minor CodingStyle fixup Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-floppy: factor out ioctl handlers from idefloppy_ioctl()Borislav Petkov2008-02-021-75/+78
| | | | | | | | | | | | | | By passing idefloppy_floppy_t *floppy to the factored out functions, we get rid of (almost) all local vars so stack usage should be at minimum here. Also, we merge idefloppy_begin_format() into idefloppy_format_start() since it is its only user. Also, rename idefloppy_format_start() to idefloppy_format_unit(). Finally, rename the reworked functions to ide_floppy..(). Bart - minor CodingStyle fixup Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-floppy: remove struct idefloppy_capacity_descriptorBorislav Petkov2008-02-021-100/+76
| | | | | | | | | | | | Also, - remove the accompanying 4 byte idefloppy_capacity_header. - rename functions from idefloppy_... to ide_floppy_... after cleanup. - simplify loop in ide_floppy_get_capacity() by reversing if-test condition logically. - finally, fix white space and checkpatch.pl issues Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-floppy: remove struct idefloppy_flexible_disk_pageBorislav Petkov2008-02-021-54/+36
| | | | | Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-floppy: remove struct idefloppy_mode_parameter_headerBorislav Petkov2008-02-021-23/+3
| | | | | Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-floppy: remove struct idefloppy_request_sense_resultBorislav Petkov2008-02-021-58/+24
| | | | | | | | While at it, collapse idefloppy_analyze_error() into idefloppy_request_sense_callback() since the latter was its only user. Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-floppy: remove struct idefloppy_inquiry_resultBorislav Petkov2008-02-021-41/+0
| | | | | Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-floppy: remove struct idefloppy_capabilities_pageBorislav Petkov2008-02-021-49/+6
| | | | | | | | | | | | | This change is rather temporary and is in preparation of using generic commands as is the case with ide-cd and the uniform cdrom layer (i.e. init_cdrom_command()) However, before this happens, we'll have to remove all typedefs and teach idefloppy_create_mode_sense_cmd() to work directly on u8 buffers. Also, since idefloppy_get_capability_page() was used to read only the sfrp bit, rename the latter so that the name reflects what it does. Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-floppy: cleanup and unify debugging macro callsBorislav Petkov2008-02-021-37/+31
| | | | | | | | | | | | | | * some debug_log() calls were not using "ide-floppy: " prefix * a few used printk levels different than KERN_INFO (KERN_NOTICE and KERN_ERR, which is the default one if no level is given) Bart: - fix build issues for IDEFLOPPY_DEBUG_LOG set to 1 while at it - s/__FUNCTION__/__func__/ Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-floppy: include the proper headersBorislav Petkov2008-02-021-3/+3
| | | | | Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-floppy: disambiguate function namesBorislav Petkov2008-02-021-3/+3
| | | | | | | | | | | | | | | | There were two almost identical function names in ide-floppy.c, which makes their distinction almost impossible. While ide_floppy_release() cleans up the object after the last reference to it has been dropped, idefloppy_release() is the blkdev .release method from struct block_device_operations which releases that last reference. Rename ide_floppy_release() to idefloppy_cleanup_obj() in order to make its purpose more clear. There should be no functionality change resulting from this patch. Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-floppy: remove unnecessary ->handler != NULL checkBorislav Petkov2008-02-021-4/+3
| | | | | | | | This BUG_ON is unneeded since the ->handler != NULL check is performed in ide_set_handler(). Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-floppy: replace ntoh{s,l} and hton{s,l} calls with the generic byteorderBorislav Petkov2008-02-021-14/+14
| | | | | Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-floppy: convert to generic packet commandsBorislav Petkov2008-02-021-32/+12
| | | | | | | | | | | | Replace the ide-floppy packet commands opcode defines with the generic ones. Add a missing GPCMD_WRITE_12 (opcode 0xaa) to the generic ones in cdrom.h. The last one can be found in the current version of INF-8090, p.905. [ Bart: Tejun's libata patch also adding GPCMD_WRITE_12 got merged first ] Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove needless includes from PCI host driversBartlomiej Zolnierkiewicz2008-02-0232-134/+4
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add ->cable_detect method to ide_hwif_tBartlomiej Zolnierkiewicz2008-02-0222-150/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add ->cable_detect method to ide_hwif_t. * Call the new method in ide_init_port() if: - the host supports UDMA modes > UDMA2 ('hwif->ultra_mask & 78') - DMA initialization was successful (if hwif->dma_base is not set ide_init_port() sets hwif->ultra_mask to zero) - "idex=ata66" is not used ('hwif->cbl != ATA_CBL_PATA40_SHORT') * Convert PCI host drivers to use ->cable_detect method. While at it: * Factor out cable detection to separate functions (if not already done). * hpt366.c/it8213.c/slc90e66.c: - don't check cable type if "idex=ata66" is used * pdc202xx_new.c: - add __devinit tag to pdcnew_cable_detect() * pdc202xx_old.c: - rename pdc202xx_old_cable_detect() to pdc2026x_old_cable_detect() - add __devinit tag to pdc2026x_old_cable_detect() Reviewed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add struct ide_port_info instances to legacy host driversBartlomiej Zolnierkiewicz2008-02-0229-270/+258
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove 'struct pci_dev *dev' argument from ide_hwif_setup_dma(). * Un-static ide_hwif_setup_dma() and add CONFIG_BLK_DEV_IDEDMA_PCI=n version. * Add 'const struct ide_port_info *d' argument to ide_device_add[_all](). * Factor out generic ports init from ide_pci_setup_ports() to ide_init_port(), move it to ide-probe.c and call it in in ide_device_add_all() instead of ide_pci_setup_ports(). * Move ->mate setup to ide_device_add_all() from ide_port_init(). * Add IDE_HFLAG_NO_AUTOTUNE host flag for host drivers that don't enable ->autotune currently. * Setup hwif->chipset in ide_init_port() but iff pi->chipset is set (to not override setup done by ide_hwif_configure()). * Add ETRAX host handling to ide_device_add_all(). * cmd640.c: set IDE_HFLAG_ABUSE_* also for CONFIG_BLK_DEV_CMD640_ENHANCED=n. * pmac.c: make pmac_ide_setup_dma() return an error value and move DMA masks setup to pmac_ide_setup_device(). * Add 'struct ide_port_info' instances to legacy host drivers, pass them to ide_device_add() calls and then remove open-coded ports initialization. Reviewed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: separate PCI specific init from generic init in ide_pci_setup_ports()Bartlomiej Zolnierkiewicz2008-02-021-8/+21
| | | | | | | | | | | * Setup ->mate and ->channel in ide_pci_setup_ports() instead of in ide_hwif_configure(). * Make 'port' parameter for ide_hwif_configure() 'unsigned int'. * Separate PCI specific init from generic init in ide_pci_setup_ports(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: always set DMA masks in ide_pci_setup_ports()Bartlomiej Zolnierkiewicz2008-02-021-4/+9
| | | | | | | | Always set DMA masks in ide_pci_setup_ports() to make sure that the valid masks for a host are set. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* macide: remove drive->capacity64 quirkBartlomiej Zolnierkiewicz2008-02-021-10/+0
| | | | | | | Nowadays IDE core always provides drive ID and ide-disk always setups drive->capacity64 so this quirk is no longer needed. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* atiixp/cs5535/scc_pata: fix "idex=ata66" parameter handlingBartlomiej Zolnierkiewicz2008-02-023-15/+26
| | | | | | | | | | | | | | | | | Don't override the cable type if the "idex=ata66" parameter was used. While at it: * atiixp.c: factor out cable detection to atiixp_cable_detect() from init_hwif_atiixp(). * cs5535.c: pass 'ide_hwif_t *hwif' instead of 'struct pci_dev *dev' to cs5535_cable_detect(). * scc_pata.c: factor out cable detection to scc_cable_detect() from init_hwif_scc() and remove incorrect comment. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* au1xxx-ide: fix ->io_32bit handlingBartlomiej Zolnierkiewicz2008-02-021-2/+1
| | | | | | | The host driver must set hwif's ->no_io_32bit setting not drive's one (ide_port_tune_devices() overrides drive's setting). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* dtc2278: fix ->io_32bit handlingBartlomiej Zolnierkiewicz2008-02-022-10/+6
| | | | | | | | On DTC2278 32-bit I/O has to be enabled for both devices on the port so always enable it during init time and disallow further changes. Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* Merge git://git.infradead.org/battery-2.6Linus Torvalds2008-02-029-152/+300
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.infradead.org/battery-2.6: apm_power: check I.intval for zero value, we use it as the divisor MAINTAINERS: remove kernel-discuss@handhelds.org list pda_power: implement polling pda_power: various cleanups apm_power: support using VOLTAGE_* properties for apm calculations pda_power: add suspend/resume support power_supply: add few more values and props pda_power: only register available psu power: fix incorrect unregistration in power_supply_create_attrs error path power: remove POWER_SUPPLY_PROP_CAPACITY_LEVEL [BATTERY] power_supply_leds: use kasprintf [BATTERY] Every file should include the headers containing the prototypes for its global functions.
| * apm_power: check I.intval for zero value, we use it as the divisorAnton Vorontsov2008-02-021-0/+3
| | | | | | | | Signed-off-by: Anton Vorontsov <cbou@mail.ru>
| * MAINTAINERS: remove kernel-discuss@handhelds.org listAnton Vorontsov2008-02-021-1/+0
| | | | | | | | | | | | | | kernel-discuss at handhelds.org is down for months, and nobody knows why. So remove it for now. Signed-off-by: Anton Vorontsov <cbou@mail.ru>
| * pda_power: implement pollingAnton Vorontsov2008-02-022-1/+46
| | | | | | | | Signed-off-by: Anton Vorontsov <cbou@mail.ru>
| * pda_power: various cleanupsAnton Vorontsov2008-02-021-55/+92
| | | | | | | | | | | | | | | | - handle spurious interrupts correctly; - get rid of pda_power_supplies array, use two variables instead; - factor out psy_changed() function, it will be used for polling. Signed-off-by: Anton Vorontsov <cbou@mail.ru>
| * apm_power: support using VOLTAGE_* properties for apm calculationsDmitry Baryshkov2008-02-021-21/+70
| | | | | | | | | | | | | | | | It's pretty dummy, but useful for batteries for which we can only get voltages. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Anton Vorontsov <cbou@mail.ru>
| * pda_power: add suspend/resume supportDmitry Baryshkov2008-02-021-0/+33
| | | | | | | | | | | | | | Add suspend/resume/wakeup support for pda_power. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Anton Vorontsov <cbou@mail.ru>
| * power_supply: add few more values and propsDmitry Baryshkov2008-02-023-1/+11
| | | | | | | | | | | | | | | | Add LiMn (one of the most common for small non-rechargable batteries) battery technology and voltage_min/_max properties support. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Anton Vorontsov <cbou@mail.ru>
| * pda_power: only register available psuDmitry Baryshkov2008-02-021-36/+44
| | | | | | | | | | | | | | | | Currently pda-power adds both ac and usb power supply units. This patch fixes it so that psu are added only if they are enabled. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Anton Vorontsov <cbou@mail.ru>
| * power: fix incorrect unregistration in power_supply_create_attrs error pathAndres Salomon2008-02-021-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | In power_supply_create_attrs(), we create static attributes as referenced by power_supply_static_attrs[i]. After that, if we fail, we unregister via power_supply_static_attrs[psy->properties[i]]. This is incorrect, as psy->properties has absolutely no bearing on static attribs. This patch fixes it to unregister the correct attrib. Another line which was unnecessarily line wrapped is also unwrapped. Signed-off-by: Andres Salomon <dilinger@debian.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * power: remove POWER_SUPPLY_PROP_CAPACITY_LEVELAndres Salomon2008-02-024-27/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CAPACITY_LEVEL stuff defines various levels of charge; however, what is the difference between them? What differentiates between HIGH and NORMAL, LOW and CRITICAL, etc? As it appears that these are fairly arbitrary, we end up making such policy decisions in the kernel (or in hardware). This is the sort of decision that should be made in userspace, not in the kernel. If the hardware does not support _CAPACITY and it cannot be easily calculated, then perhaps the driver should register a custom CAPACITY_LEVEL attribute; however, userspace should not become accustomed to looking for such a thing, and we should certainly not encourage drivers to provide CAPACITY_LEVEL stubs. The following removes support for POWER_SUPPLY_PROP_CAPACITY_LEVEL. The OLPC battery driver is the only driver making use of this, so it's removed from there as well. Signed-off-by: Andres Salomon <dilinger@debian.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [BATTERY] power_supply_leds: use kasprintfAkinobu Mita2008-02-021-18/+7
| | | | | | | | | | | | | | | | | | Use kasprintf instead of kmalloc()-strcpy()-strcat(). Cc: Anton Vorontsov <cbou@mail.ru> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Anton Vorontsov <cbou@mail.ru>
| * [BATTERY] Every file should include the headers containing the prototypes ↵Adrian Bunk2008-02-022-0/+4
| | | | | | | | | | | | | | | | for its global functions. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Anton Vorontsov <cbou@mail.ru>
* | Merge branch 'for-linus' of git://linux-nfs.org/~bfields/linuxLinus Torvalds2008-02-0260-1664/+5450
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'for-linus' of git://linux-nfs.org/~bfields/linux: (100 commits) SUNRPC: RPC program information is stored in unsigned integers SUNRPC: Move exported symbol definitions after function declaration part 2 NLM: tear down RPC clients in nlm_shutdown_hosts SUNRPC: spin svc_rqst initialization to its own function nfsd: more careful input validation in nfsctl write methods lockd: minor log message fix knfsd: don't bother mapping putrootfh enoent to eperm rdma: makefile rdma: ONCRPC RDMA protocol marshalling rdma: SVCRDMA sendto rdma: SVCRDMA recvfrom rdma: SVCRDMA Core Transport Services rdma: SVCRDMA Transport Module rdma: SVCRMDA Header File svc: Add svc_xprt_names service to replace svc_sock_names knfsd: Support adding transports by writing portlist file svc: Add svc API that queries for a transport instance svc: Add /proc/sys/sunrpc/transport files svc: Add transport hdr size for defer/revisit svc: Move the xprt independent code to the svc_xprt.c file ...
| * | SUNRPC: RPC program information is stored in unsigned integersChuck Lever2008-02-012-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up: When looping over RPC version and procedure numbers, use unsigned index variables. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
| * | SUNRPC: Move exported symbol definitions after function declaration part 2Trond Myklebust2008-02-017-42/+33
| | | | | | | | | | | | | | | | | | | | | Do it for the server code... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
| * | NLM: tear down RPC clients in nlm_shutdown_hostsJeff Layton2008-02-011-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's possible for a RPC to outlive the lockd daemon that created it, so we need to make sure that all RPC's are killed when lockd is coming down. When nlm_shutdown_hosts is called, kill off all RPC tasks associated with the host. Since we need to wait until they have all gone away, we might as well just shut down the RPC client altogether. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
| * | SUNRPC: spin svc_rqst initialization to its own functionJeff Layton2008-02-012-17/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the initialzation in __svc_create_thread that happens prior to thread creation to a new function. Export the function to allow services to have better control over the svc_rqst structs. Also rearrange the rqstp initialization to prevent NULL pointer dereferences in svc_exit_thread in case allocations fail. Signed-off-by: Jeff Layton <jlayton@redhat.com> Reviewed-by: NeilBrown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
| * | nfsd: more careful input validation in nfsctl write methodsJ. Bruce Fields2008-02-011-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Neil Brown points out that we're checking buf[size-1] in a couple places without first checking whether size is zero. Actually, given the implementation of simple_transaction_get(), buf[-1] is zero, so in both of these cases the subsequent check of the value of buf[size-1] will catch this case. But it seems fragile to depend on that, so add explicit checks for this case. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Acked-by: NeilBrown <neilb@suse.de>
| * | lockd: minor log message fixJ. Bruce Fields2008-02-011-1/+1
| | | | | | | | | | | | | | | | | | | | | Wendy Cheng noticed that function name doesn't agree here. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Cc: Wendy Cheng <wcheng@redhat.com>
| * | knfsd: don't bother mapping putrootfh enoent to epermJ. Bruce Fields2008-02-011-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Neither EPERM and ENOENT map to valid errors for PUTROOTFH according to rfc 3530, and, if anything, ENOENT is likely to be slightly more informative; so don't bother mapping ENOENT to EPERM. (Probably this was originally done because one likely cause was that there is an fsid=0 export but that it isn't permitted to this particular client. Now that we allow WRONGSEC returns, this is somewhat less likely.) In the long term we should work to make this situation less likely, perhaps by turning off nfsv4 service entirely in the absence of the pseudofs root, or constructing a pseudofilesystem root ourselves in the kernel as necessary. Thanks to Benny Halevy <bhalevy@panasas.com> for pointing out this problem. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Cc: Benny Halevy <bhalevy@panasas.com>
| * | rdma: makefileTom Tucker2008-02-011-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Add the svcrdma module to the xprtrdma makefile. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Acked-by: Neil Brown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
| * | rdma: ONCRPC RDMA protocol marshallingTom Tucker2008-02-011-0/+412
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This logic parses the ONCRDMA protocol headers that precede the actual RPC header. It is placed in a separate file to keep all protocol aware code in a single place. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Acked-by: Neil Brown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
| * | rdma: SVCRDMA sendtoTom Tucker2008-02-011-0/+520
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This file implements the RDMA transport sendto function. A RPC reply on an RDMA transport consists of some number of RDMA_WRITE requests followed by an RDMA_SEND request. The sendto function parses the ONCRPC RDMA reply header to determine how to send the reply back to the client. The send queue is sized so as to be able to send complete replies for requests in most cases. In the event that there are not enough SQ WR slots to reply, e.g. big data, the send will block the NFSD thread. The I/O callback functions in svc_rdma_transport.c that reap WR completions wake any waiters blocked on the SQ. In general, the goal is not to block NFSD threads and the has_wspace method stall requests when the SQ is nearly full. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Acked-by: Neil Brown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
| * | rdma: SVCRDMA recvfromTom Tucker2008-02-011-0/+586
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This file implements the RDMA transport recvfrom function. The function dequeues work reqeust completion contexts from an I/O list that it shares with the I/O tasklet in svc_rdma_transport.c. For ONCRPC RDMA, an RPC may not be complete when it is received. Instead, the RDMA header that precedes the RPC message informs the transport where to get the RPC data from on the client and where to place it in the RPC message before it is delivered to the server. The svc_rdma_recvfrom function therefore, parses this RDMA header and issues any necessary RDMA operations to fetch the remainder of the RPC from the client. Special handling is required when the request involves an RDMA_READ. In this case, recvfrom submits the RDMA_READ requests to the underlying transport driver and then returns 0. When the transport completes the last RDMA_READ for the request, it enqueues it on a read completion queue and enqueues the transport. The recvfrom code favors this queue over the regular DTO queue when satisfying reads. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Acked-by: Neil Brown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>