Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178103847
D8430.1795972579.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D8430.1795972579.diff
View Options
Index: sys/dev/smbus/smb.h
===================================================================
--- sys/dev/smbus/smb.h
+++ sys/dev/smbus/smb.h
@@ -63,11 +63,13 @@
#define SMB_RECVB _IOWR('i', 4, struct smbcmd)
#define SMB_WRITEB _IOW('i', 5, struct smbcmd)
#define SMB_WRITEW _IOW('i', 6, struct smbcmd)
-#define SMB_READB _IOW('i', 7, struct smbcmd)
-#define SMB_READW _IOW('i', 8, struct smbcmd)
-#define SMB_PCALL _IOW('i', 9, struct smbcmd)
+#define SMB_OLD_READB _IOW('i', 7, struct smbcmd)
+#define SMB_READB _IOWR('i', 7, struct smbcmd)
+#define SMB_OLD_READW _IOW('i', 8, struct smbcmd)
+#define SMB_READW _IOWR('i', 8, struct smbcmd)
+#define SMB_OLD_PCALL _IOW('i', 9, struct smbcmd)
+#define SMB_PCALL _IOWR('i', 9, struct smbcmd)
#define SMB_BWRITE _IOW('i', 10, struct smbcmd)
-#define SMB_OLD_BREAD _IOW('i', 11, struct smbcmd)
#define SMB_BREAD _IOWR('i', 11, struct smbcmd)
#define SMB_OLD_TRANS _IOWR('i', 12, struct smbcmd)
Index: sys/dev/smbus/smb.c
===================================================================
--- sys/dev/smbus/smb.c
+++ sys/dev/smbus/smb.c
@@ -224,7 +224,9 @@
s->cmd, s->wdata.word));
break;
+ case SMB_OLD_READB:
case SMB_READB:
+ /* NB: for SMB_OLD_READB the read data goes to rbuf only. */
error = smbus_error(smbus_readb(parent, s->slave, s->cmd,
&s->rdata.byte));
if (error)
@@ -235,7 +237,9 @@
}
break;
+ case SMB_OLD_READW:
case SMB_READW:
+ /* NB: for SMB_OLD_READW the read data goes to rbuf only. */
error = smbus_error(smbus_readw(parent, s->slave, s->cmd,
&s->rdata.word));
if (error)
@@ -248,7 +252,9 @@
}
break;
+ case SMB_OLD_PCALL:
case SMB_PCALL:
+ /* NB: for SMB_OLD_PCALL the read data goes to rbuf only. */
error = smbus_error(smbus_pcall(parent, s->slave, s->cmd,
s->wdata.word, &s->rdata.word));
if (error)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 29, 5:16 PM (12 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42093254
Default Alt Text
D8430.1795972579.diff (1 KB)
Attached To
Mode
D8430: smb: fix SMB_READB, SMB_READW, SMB_PCALL to work as documented
Attached
Detach File
Event Timeline