cvs commit: src/sys/dev/iicbus iic.c iicbus.c iicbus.h iiconf.c iicsmb.c

John Baldwin jhb at FreeBSD.org
Mon Aug 4 21:03:19 UTC 2008


jhb         2008-08-04 21:03:06 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/iicbus       iic.c iicbus.c iicbus.h iiconf.c iicsmb.c 
  Log:
  SVN rev 181304 on 2008-08-04 21:03:06Z by jhb
  
  Add locking to the core iicbus(4) drivers:
  - Add an sx lock to the iic(4) driver to serialize open(), close(), read(),
    and write and to protect sc_addr and sc_count in the softc.
  - Use cdev->si_drv1 instead of using the minor number of the cdev to
    lookup the softc via newbus in iic(4).
  - Store the device_t in the softc to avoid a similar detour via minor
    numbers in iic(4).
  - Only add at most one instance of iic(4) and iicsmb(4) to each iicbus(4)
    instance, and do it in the child driver.
  - Add a mutex to the iicbus(4) softc to synchronize the request/release bus
    stuff.
  - Use __BUS_ACCESSOR() for IICBUS_ACCESSOR() instead of rolling our own.
  - Add a mutex to the iicsmb(4) softc to protect softc state updated in the
    interrupt handler.
  - Remove Giant from all the smbus methods in iicsmb(4) now that all the
    iicbus(4) backend is locked.
  
  Revision  Changes    Path
  1.40      +81 -40    src/sys/dev/iicbus/iic.c
  1.25      +6 -8      src/sys/dev/iicbus/iicbus.c
  1.8       +9 -6      src/sys/dev/iicbus/iicbus.h
  1.18      +19 -15    src/sys/dev/iicbus/iiconf.c
  1.16      +13 -37    src/sys/dev/iicbus/iicsmb.c


More information about the cvs-src mailing list