freebsd-skq/sys/pci
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
..
agp_ali.c Change the various AGP drivers that attach to the Host-PCI bridge device to 2005-12-20 21:12:26 +00:00
agp_amd64.c Use aperture base address from north bridge. Some BIOS does not encode 2006-08-21 19:10:58 +00:00
agp_amd.c Change the various AGP drivers that attach to the Host-PCI bridge device to 2005-12-20 21:12:26 +00:00
agp_ati.c Add support for another ATI IGP 340M (RS200M) AGP bridge. 2006-09-01 02:22:17 +00:00
agp_i810.c Fix breakage of CHIP_I855 in the last revision. 2006-06-27 14:05:11 +00:00
agp_if.m /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
agp_intel.c Add support for the Intel E7205 chipset. 2006-02-17 01:40:46 +00:00
agp_nvidia.c Change the various AGP drivers that attach to the Host-PCI bridge device to 2005-12-20 21:12:26 +00:00
agp_sis.c Move SiS 760 to where it belongs. 2006-05-30 18:41:26 +00:00
agp_via.c Change the various AGP drivers that attach to the Host-PCI bridge device to 2005-12-20 21:12:26 +00:00
agp.c Explicitly set v3 mode only when it is requested. Don't bother otherwise. 2006-08-11 19:16:50 +00:00
agppriv.h
agpreg.h - Use PCIR_BAR() macro for the BAR for the aperture. 2005-12-20 22:45:24 +00:00
agpvar.h Don't map the AGP aperture into contiguous KVA. The various graphics 2005-12-20 20:05:21 +00:00
alpm.c Minor overhaul of SMBus support: 2006-09-11 20:52:41 +00:00
amdpm.c Minor overhaul of SMBus support: 2006-09-11 20:52:41 +00:00
amdsmb.c Minor overhaul of SMBus support: 2006-09-11 20:52:41 +00:00
if_mn.c Stop embedding struct ifnet at the top of driver softcs. Instead the 2005-06-10 16:49:24 +00:00
if_pcn.c Replace references to lnc(4) with references to le(4) (so far the notes 2006-05-15 20:07:24 +00:00
if_pcnreg.h Remove various bits of conditional Alpha code and fixup a few comments. 2006-05-12 05:04:46 +00:00
if_rl.c Do not touch ifp->if_baudrate in miibus aware drivers. 2006-02-14 12:44:56 +00:00
if_rlreg.h Another small update to the re(4) driver: 2006-08-01 17:18:25 +00:00
if_sf.c Do not touch ifp->if_baudrate in miibus aware drivers. 2006-02-14 12:44:56 +00:00
if_sfreg.h Remove various bits of conditional Alpha code and fixup a few comments. 2006-05-12 05:04:46 +00:00
if_sis.c Do not touch ifp->if_baudrate in miibus aware drivers. 2006-02-14 12:44:56 +00:00
if_sisreg.h Small fixes to sis(4): 2005-09-26 18:42:27 +00:00
if_ste.c Do not touch ifp->if_baudrate in miibus aware drivers. 2006-02-14 12:44:56 +00:00
if_stereg.h Remove various bits of conditional Alpha code and fixup a few comments. 2006-05-12 05:04:46 +00:00
if_tl.c Remove various bits of conditional Alpha code and fixup a few comments. 2006-05-12 05:04:46 +00:00
if_tlreg.h Remove various bits of conditional Alpha code and fixup a few comments. 2006-05-12 05:04:46 +00:00
if_vr.c Do not touch ifp->if_baudrate in miibus aware drivers. 2006-02-14 12:44:56 +00:00
if_vrreg.h Remove various bits of conditional Alpha code and fixup a few comments. 2006-05-12 05:04:46 +00:00
if_wb.c Do not touch ifp->if_baudrate in miibus aware drivers. 2006-02-14 12:44:56 +00:00
if_wbreg.h Remove various bits of conditional Alpha code and fixup a few comments. 2006-05-12 05:04:46 +00:00
if_xl.c Don't reset Tx threshold value whenever xl_init_locked() is called. 2006-08-12 02:05:13 +00:00
if_xlreg.h Various fixups to locking: 2005-08-18 19:24:30 +00:00
intpm.c Minor overhaul of SMBus support: 2006-09-11 20:52:41 +00:00
intpmreg.h
locate.pl
ncr.c Commit the results of the typo hunt by Darren Pilgrim. 2006-08-04 07:56:35 +00:00
ncrreg.h Fix typos from previous commit. 2005-01-07 05:01:24 +00:00
nfsmb.c Minor overhaul of SMBus support: 2006-09-11 20:52:41 +00:00
viapm.c Minor overhaul of SMBus support: 2006-09-11 20:52:41 +00:00
xrpu.c Return BUS_PROBE_DEFAULT instead of 0. 2005-02-24 21:32:56 +00:00