1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-28 11:57:28 +00:00
freebsd/sys/dev
John Baldwin 7048a99c30 Minor overhaul of SMBus support:
- Change smbus_callback() to pass a void * rather than caddr_t.
- Change smbus_bread() to pass a pointer to the count and have it be an
  in/out parameter.  The input is the size of the buffer (same as before),
  but on return it will contain the actual amount of data read back from
  the bus.  Note that this value may be larger than the input value.  It
  is up to the caller to treat this as an error if desired.
- Change the SMB_BREAD ioctl to write out the updated struct smbcmd which
  will contain the actual number of bytes read in the 'count' field.  To
  preserve the previous ABI, the old ioctl value is mapped to SMB_OLD_BREAD
  which doesn't copy the updated smbcmd back out to userland.  I doubt anyone
  actually used the old BREAD anyway as it was rediculous to do a bulk-read
  but not tell the using program how much data was actually read.
- Make the smbus driver and devclass public in the smbus module and
  push all the DRIVER_MODULE()'s for attaching the smbus driver to
  various foosmb drivers out into the foosmb modules.  This makes all
  the foosmb logic centralized and allows new foosmb modules to be
  self-contained w/o having to hack smbus.c everytime a new smbus driver
  is added.
- Add a new SMB_EINVAL error bit and use it in place of EINVAL to return
  an error for bad arguments (such as invalid counts for bread and bwrite).
- Map SMB bus error bits to EIO in smbus_error().
- Make the smbus driver call bus_generic_probe() and require child drivers
  such as smb(4) to create device_t's via identify routines.  Previously,
  smbus just created one anonymous device during attach, and if you had
  multiple drivers that could attach it was just random chance as to which
  driver got to probe for the sole device_t first.
- Add a mutex to the smbus(4) softc and use it in place of dummy splhigh()
  to protect the 'owner' field and perform necessary synchronization for
  smbus_request_bus() and smbus_release_bus().
- Change the bread() and bwrite() methods of alpm(4), amdpm(4), and
  viapm(4) to only perform a single transaction and not try to use a
  loop of multiple transactions for a large request.  The framing and
  commands to use for a large transaction depend on the upper-layer
  protocol (such as SSIF for IPMI over SMBus) from what I can tell, and the
  smb(4) driver never allowed bulk read/writes of more than 32-bytes
  anyway.  The other smb drivers only performed single transactions.
- Fix buffer overflows in the bread() methods of ichsmb(4), alpm(4),
  amdpm(4), amdsmb(4), intpm(4), and nfsmb(4).
- Use SMB_xxx errors in viapm(4).
- Destroy ichsmb(4)'s mutex after bus_generic_detach() to avoid problems
  from child devices making smb upcalls that would use the mutex during
  their detach methods.

MFC after:	1 week
Reviewed by:	jmg (mostly)
2006-09-11 20:52:41 +00:00
..
aac Unlock aac_io_lock before returning, thus eliminates a mutex 2006-07-14 13:55:56 +00:00
acpi_support Improve exception string format. 2006-08-14 18:38:56 +00:00
acpica Give the ACPI I/O rman's unique description strings to make 'devinfo -u' 2006-09-11 19:32:54 +00:00
adlink
advansys Remove some header polution. 2006-04-30 16:44:41 +00:00
agp Add support for another ATI IGP 340M (RS200M) AGP bridge. 2006-09-01 02:22:17 +00:00
aha Add explicit dependency on cam. This is necessary when both aha.ko and 2006-03-24 06:33:25 +00:00
ahb Fix missing update to reflect change in scsi_inquiry data structure. 2006-05-31 14:33:23 +00:00
aic
aic7xxx Coverity: initialize some variables before potential use. 2006-09-05 20:28:28 +00:00
amd
amr Chain the bus_dmamap_load() calls when mapping a command with a data CCB 2006-07-17 19:45:47 +00:00
an Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
ar - Use bus_setup_intr() and bus_teardown_intr() to register device driver 2006-02-22 18:16:26 +00:00
arcmsr Fix typos: s/rebulid/rebuild/ 2006-08-31 08:45:44 +00:00
arl while (0); -> while (0) in multi-line macros 2006-08-17 22:50:33 +00:00
asr Remove stale MAINTAINER 2006-07-09 16:31:53 +00:00
ata Add support for a few more Serverworks and lookalikes chips. 2006-09-11 19:48:30 +00:00
ath while (0); -> while (0) in multi-line macros 2006-08-17 22:50:33 +00:00
atkbdc Avoid an infinite loop in empty_both_buffers() by adding a timeout. 2006-09-04 00:19:31 +00:00
auxio - Only touch the LED bit of the (LED) AUXIO register when turning the 2006-01-26 19:04:18 +00:00
awi add missed calls to bpf_peers_present 2006-06-02 23:14:40 +00:00
bce Remove extra '*/' comment close. In code not normally compiled but a bug never the less. 2006-08-15 04:56:29 +00:00
bfe Back out the BUS_DMA_ALLOCNOW change from rev 1.39. Scottl informed me that 2006-05-28 20:35:39 +00:00
bge Add support to bge(4) to not break IPMI support when the driver attaches 2006-09-09 03:36:57 +00:00
bktr Minor overhaul of SMBus support: 2006-09-11 20:52:41 +00:00
buslogic
cardbus Minor cleanup of CIS parsing. 2006-06-12 03:28:42 +00:00
ce Update low-level code. (to version 1.4) 2006-03-01 09:50:20 +00:00
ciss Spin until a request structure is available in the ioctl path. 2006-05-30 06:42:02 +00:00
cm Make cm(4) driver MPSAFE. 2006-06-11 22:25:01 +00:00
cnw Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
cp
cpufreq Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
cs Fix multicast support for cs89x0 chips. Just setting the RX_MULTCAST_ACCEPT 2006-03-10 23:50:53 +00:00
ct Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
ctau Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
cx Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
cy
dc Replace hard-coded magic constants to system defined constants 2006-08-02 05:28:52 +00:00
dcons Convert to new console interface. 2006-05-26 13:51:38 +00:00
de Remove various bits of conditional Alpha code and fixup a few comments. 2006-05-12 05:04:46 +00:00
digi - Push Giant down into linker_reference_module(). 2006-06-20 20:54:13 +00:00
dpt Commit the results of the typo hunt by Darren Pilgrim. 2006-08-04 07:56:35 +00:00
drm Merge from DRM upstream: 2006-09-07 23:04:47 +00:00
ed MFp4: 2006-06-12 04:30:42 +00:00
eisa
em Fix style(9) issues in the TSO specific changes. 2006-09-10 19:23:27 +00:00
en Subtracting two pointers produces a ptrdiff_t not a size_t so use 2006-03-21 15:00:10 +00:00
ep Remove ifdef notdef SIOCHWADDR vestige. 2006-02-04 08:16:07 +00:00
esp
ex Remove ifdef notyet SIOCGHWADDR vestige. 2006-02-04 08:16:41 +00:00
exca The TOPIC97 and TOPIC100 seem to have a special register in the exca 2006-08-12 08:53:54 +00:00
fatm This driver has been MPSAFE from the beginning so declare the interrupt 2006-03-21 14:56:42 +00:00
fb Remove the DPMS code in creator_blank_display(), as it causes some 2006-08-24 22:00:24 +00:00
fdc Fix style nits. No md5 changes in .o's. ;-) 2006-09-08 21:46:01 +00:00
fe Commit the results of the typo hunt by Darren Pilgrim. 2006-08-04 07:56:35 +00:00
firewire Better printf 2006-06-12 04:00:33 +00:00
fxp Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
gem add a newbus method for obtaining the bus's bus_dma_tag_t... This is 2006-09-03 00:27:42 +00:00
gfb Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
harp
hatm
hfa
hifn Use newly added functions to simplify the code. 2006-06-04 22:17:25 +00:00
hme Fix invalid reference of mbuf chains. 2006-08-12 01:19:37 +00:00
hptmv Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
hwpmc First pass at removing Alpha kernel support. 2006-05-11 22:25:28 +00:00
ic Fix style nits. No md5 changes in .o's. ;-) 2006-09-08 21:46:01 +00:00
ichsmb Minor overhaul of SMBus support: 2006-09-11 20:52:41 +00:00
ichwd Re-work the bus attachment somewhat. Make the rids unique for 2006-02-17 18:46:18 +00:00
ida
idt Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
ie Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
ieee488 Don't be noisy in case of shared interrupts. 2006-03-11 15:39:22 +00:00
if_ndis Static -> static. 2006-09-07 06:00:03 +00:00
iicbus Minor overhaul of SMBus support: 2006-09-11 20:52:41 +00:00
iir Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
io
ipmi Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
ips while (0); -> while (0) in multi-line macros 2006-08-17 22:50:33 +00:00
ipw Hold on to firmware images until the interface detaches since 2006-06-10 17:29:40 +00:00
isp Restore multi-version cleanliness. 2006-09-03 01:26:55 +00:00
ispfw Add QLogic 2400 (4Gb) firmware. 2006-08-26 18:39:18 +00:00
iwi set default beacon miss threshold to 10 beacons 2006-07-26 03:09:32 +00:00
ixgb Commit the results of the typo hunt by Darren Pilgrim. 2006-08-04 07:56:35 +00:00
joy
kbd Integrate kbdmux(4) into syscons(4) and kbd code. 2006-02-28 23:46:23 +00:00
kbdmux Add extra code into kbdmux(4)s read_char() method to 2006-07-27 20:33:48 +00:00
le Revert the part of rev. 1.3 which changed the software style to be 2006-06-05 15:14:14 +00:00
led
lge Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
lmc The contents pointed by ssi_cables[] is never changed so explicitly 2006-07-21 08:45:00 +00:00
mc146818
mca
mcd
md - Conditionally acquire Giant in mdstart_vnode(), mdcreate_vnode(), and 2006-03-28 21:25:11 +00:00
mem
mfi Change the class from uint8_t to int8_t so people can filter on >0 2006-09-07 19:32:05 +00:00
mii Add PHY support for BCM5752. 2006-08-31 11:15:18 +00:00
mk48txx Fix spelling in a status message. 2006-09-01 20:14:06 +00:00
mlx
mly
mpt Support for PCI-Express 4Gb Cards. 2006-09-08 05:27:04 +00:00
mse Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
mxge Copy the link-layer address from our ifnet pointer at reset time 2006-08-04 17:58:40 +00:00
my Add altq(4) support. 2006-06-05 17:59:46 +00:00
ncv no need to print unload anymore 2006-07-14 04:36:57 +00:00
nfe Add support for MCP61 and MCP65 adaptors. 2006-09-11 07:31:55 +00:00
nge Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
nmdm
nsp Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
null
nve ALTQ-ify nve(4). 2006-05-20 21:08:09 +00:00
ofw Fix spelling and wording in a comment. 2006-09-01 20:12:12 +00:00
patm Commit the results of the typo hunt by Darren Pilgrim. 2006-08-04 07:56:35 +00:00
pbio Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
pccard Thomas Wintergerst reports that when this tsleep went away, certain 2006-08-09 00:05:54 +00:00
pccbb Batch of changes: 2006-08-12 09:06:55 +00:00
pcf - Use bus_setup_intr() and bus_teardown_intr() to register device driver 2006-02-22 18:16:26 +00:00
pci Commit the results of the typo hunt by Darren Pilgrim. 2006-08-04 07:56:35 +00:00
pdq Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
powermac_nvram Add device to access and modify Open Firmware NVRAM settings in 2006-08-01 22:19:01 +00:00
ppbus Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
ppc Remove various bits of conditional Alpha code and fixup a few comments. 2006-05-12 05:04:46 +00:00
pst
puc Add SIIG 4 port serial card based on the Oxford OX16PCI954. 2006-09-04 18:27:14 +00:00
ral remove unnecessary null ptr check 2006-08-02 04:54:14 +00:00
random Now even more style(9)ish. 2006-07-13 11:47:36 +00:00
ray
rc
re Make 8139C+ work again which was broken since rev 1.68. 2006-09-08 00:58:02 +00:00
rndtest
rp The UPCI 32 rp(4) card uses BAR 2 like the UPCI 80 card. 2006-01-25 14:55:11 +00:00
rr232x Make this compile with -Wundef. 2006-05-16 15:23:27 +00:00
safe Use newly added functions to simplify the code. 2006-06-04 22:17:25 +00:00
sbni
sbsh Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
scc Fix braino: The cl_range field should not hold the shifted I/O 2006-07-26 03:10:01 +00:00
scd
sf Remove various bits of conditional Alpha code and fixup a few comments. 2006-05-12 05:04:46 +00:00
si
sio Restore the status quo before my last commit. Prior to it, sio took 2006-07-17 03:47:18 +00:00
sk Fix invalid reference of mbuf chains. 2006-08-12 01:24:37 +00:00
smbus Minor overhaul of SMBus support: 2006-09-11 20:52:41 +00:00
sn Fix mismerge after last cvs update for the IFQ_DRV_DEQUEUE changes. 2006-02-04 08:19:00 +00:00
snc
snp
sound Fix the check where we want to use the end of the supported range if the 2006-09-09 14:43:03 +00:00
speaker
spibus Fix comments. 2006-07-17 21:18:03 +00:00
sr - Use bus_setup_intr() and bus_teardown_intr() to register device driver 2006-02-22 18:16:26 +00:00
stg no need to print unload anymore. 2006-07-14 04:35:59 +00:00
stge Fix invalid reference of mbuf chains. 2006-08-12 01:24:37 +00:00
streams Clean up the svr4 socket cache and streams code some to make it more easily 2006-07-21 20:40:13 +00:00
sym Commit the results of the typo hunt by Darren Pilgrim. 2006-08-04 07:56:35 +00:00
syscons Convert to new console api 2006-05-26 13:54:27 +00:00
tdfx Take the functionality contained in the former "options TDFX_LINUX" 2006-03-03 21:37:38 +00:00
ti Fix invalid reference of mbuf chains. 2006-08-12 01:30:38 +00:00
trm Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
twa Remove header pollution. 2006-04-30 16:46:11 +00:00
twe
tx Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
txp Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
uart Properly propagate overrun conditions to the TTY layer. 2006-07-27 00:07:10 +00:00
ubsec - Use m_getcl(), m_get(), and m_gethdr() rather than the older macros for 2006-08-02 17:41:58 +00:00
usb Yank FreeBSD specific code out from under ifdef. 2006-09-10 15:20:39 +00:00
utopia
vge Add locking to vge_ifmedia_upd(). 2006-09-04 13:14:44 +00:00
vkbd Disable custom locking in the vkbd(4) for now and make it rely on the 2006-02-27 06:17:48 +00:00
vr Remove various bits of conditional Alpha code and fixup a few comments. 2006-05-12 05:04:46 +00:00
vx
watchdog
wds Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
wi raw 802.11 packet transmit support 2006-08-05 04:58:25 +00:00
wl Trival whitespace change. 2006-06-19 11:30:36 +00:00
xe o Fix printf(9) formatting: do not use hardcode "0x" and "#" flags 2006-04-15 11:41:40 +00:00
zs Update to new console api. 2006-05-26 18:25:34 +00:00