NAME
smb – SMB generic I/O device driver
SYNOPSIS
device smb
DESCRIPTION
The smb character device driver provides generic i/o to any smbus(4) instance. In order to control SMB devices, use /dev/smb? with the ioctls described below. Any of these ioctl commands takes a pointer to struct smbcmd as its argument.
#include <sys/types.h>
struct smbcmd {
char cmd;
int count;
u_char slave;
union {
char byte;
short word;
char *byte_ptr;
short *word_ptr;
struct {
short sdata;
short *rdata;
} process;
} data;
};
The slave field is always used, and provides the address of the SMBus slave device to talk to.
| Ioctl | Description |
| SMB_QUICK_WRITE | |
| SMB_QUICK_READ | |
| SMB_SENDB | |
| SMB_RECVB | |
| SMB_WRITEB | |
| SMB_WRITEW | |
| SMB_READB | |
| SMB_READW | |
| SMB_PCALL | |
| SMB_BWRITE | |
| SMB_BREAD |
The read(2) and write(2) system calls are not implemented by this driver.
ERRORS
The ioctl(2) commands can cause the following driver-specific errors:
- [ENXIO]
-
Device did not respond to selection.
- [EBUSY]
-
Device still in use.
- [ENODEV]
-
Operation not supported by device (not supposed to happen).
- [EINVAL]
-
General argument error.
- [EWOULDBLOCK]
-
SMBus transaction timed out.
SEE ALSO
HISTORY
The smb manual page first appeared in FreeBSD 3.0.
AUTHORS
This manual page was written by Nicolas Souchu.