* \param dev Device to be probed.
*
* \return
- * Zero on succes or an \c errno value on failure.
+ * Zero on success or an \c errno value on failure.
*/
int
pci_device_probe( struct pci_device * dev )
/**
* Map the specified BAR so that it can be accessed by the CPU.
*
- * Maps the specified BAR for acces by the processor. The pointer to the
+ * Maps the specified BAR for access by the processor. The pointer to the
* mapped region is stored in the \c pci_mem_region::memory pointer for the
* BAR.
*
* Map the specified memory range so that it can be accessed by the CPU.
*
* Maps the specified memory range for access by the processor. The pointer
- * to the mapped region is stored in \c addr. In addtion, the
+ * to the mapped region is stored in \c addr. In addition, the
* \c pci_mem_region::memory pointer for the BAR will be updated.
*
* \param dev Device whose memory region is to be mapped.
* Map the specified memory range so that it can be accessed by the CPU.
*
* Maps the specified memory range for access by the processor. The pointer
- * to the mapped region is stored in \c addr. In addtion, the
+ * to the mapped region is stored in \c addr. In addition, the
* \c pci_mem_region::memory pointer for the BAR will be updated.
*
* \param dev Device whose memory region is to be mapped.
*
* Reads data from the device's PCI configuration space. As with the system
* read command, less data may be returned, without an error, than was
- * requested. This is particuarly the case if a non-root user tries to read
+ * requested. This is particularly the case if a non-root user tries to read
* beyond the first 64-bytes of configuration space.
*
* \param dev Device whose PCI configuration data is to be read.
* Zero on success or an errno value on failure.
*
* \note
- * Data read from PCI configuartion space using this routine is \b not
+ * Data read from PCI configuration space using this routine is \b not
* byte-swapped to the host's byte order. PCI configuration data is always
* stored in little-endian order, and that is what this routine returns.
*/
/**
* Write arbitrary bytes to device's PCI config space
*
- * Writess data to the device's PCI configuration space. As with the system
+ * Writes data to the device's PCI configuration space. As with the system
* write command, less data may be written, without an error, than was
* requested.
*
* Zero on success or an errno value on failure.
*
* \note
- * Data written to PCI configuartion space using this routine is \b not
+ * Data written to PCI configuration space using this routine is \b not
* byte-swapped from the host's byte order. PCI configuration data is always
* stored in little-endian order, so data written with this routine should be
* put in that order in advance.
const int tmp_err = pci_device_cfg_write_u32(& priv->base,
rom_base_tmp, 48);
- /* Prefer to return the first error that occured.
+ /* Prefer to return the first error that occurred.
*/
if (err == 0) {
err = tmp_err;
* \file linux_sysfs.c
* Access PCI subsystem using Linux's sysfs interface. This interface is
* available starting somewhere in the late 2.5.x kernel phase, and is the
- * prefered method on all 2.6.x kernels.
+ * preferred method on all 2.6.x kernels.
*
* \author Ian Romanick <idr@us.ibm.com>
*/
static int pci_device_linux_sysfs_write( struct pci_device * dev,
const void * data, pciaddr_t offset, pciaddr_t size,
- pciaddr_t * bytes_wrtten );
+ pciaddr_t * bytes_written );
static const struct pci_system_methods linux_sysfs_methods = {
.destroy = NULL,
#define PCITOOL_ACC_IS_BIG_ENDIAN(x) (x & PCITOOL_ACC_ATTR_ENDN_BIG)
/*
- * Data stucture to read and write to pci device registers.
+ * Data structure to read and write to pci device registers.
* This is the argument to the following ioctls:
* PCITOOL_DEVICE_SET/GET_REG
* PCITOOL_NEXUS_SET/GET_REG
static int pci_device_solx_devfs_write( struct pci_device * dev,
const void * data, pciaddr_t offset, pciaddr_t size,
- pciaddr_t * bytes_wrtten );
+ pciaddr_t * bytes_written );
static int
probe_dev(int fd, pcitool_reg_t *prg_p, struct pci_system *pci_sys);
};
/*
- * Rlease all the resources
+ * Release all the resources
* Solaris version
*/
static void
/*
* Data came back as 0.
- * Treat as unresponsive device amd check next device.
+ * Treat as unresponsive device and check next device.
*/
} else if (prg_p->data == 0) {
rval = 0;
}
/*
- * Found one device with bus numer, device number and
+ * Found one device with bus number, device number and
* function number.
*/
pci_sys->num_devices++;
/*
- * Accomodate devices which state their
+ * Accommodate devices which state their
* multi-functionality only in their function 0 config
* space. Note multi-functionality throughout probing
* of all of this device's functions.
}
}
if (pci_sys->num_devices > MAX_DEVICES) {
- (void) fprintf(stderr, "pci devices reach maximu number\n");
+ (void) fprintf(stderr, "pci devices reach maximum number\n");
}
return (rval);
devnode = (i_devnode_t *)arg;
/*
- * Test the property funtions, only for testing
+ * Test the property functions, only for testing
*/
/*
(void) fprintf(stderr, "start of node 0x%x\n", node->nodeid);