aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ichsmb
Commit message (Collapse)AuthorAgeFilesLines
* Add smbus and i2c device IDs for Meteor LakeSHENG-YI HONG2024-08-131-0/+9
| | | | | | | | Reviewed by: emaste, Daniel Schaefer <dhs@frame.work> MFC after: 3 days Sponsored by: Framework Computer Inc Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46249
* ichsmb: add Cedar Fork PCI idKristof Provost2024-02-101-0/+3
| | | | Sponsored by: Rubicon Communications, LLC ("Netgate")
* ichsmb: fix block read operationAndriy Gapon2024-01-282-20/+46
| | | | | | | | | | | | | | | First of all and unlike I2C, it's not the master that dictates how many bytes to read in block read operation. It's the device that informs the master how many bytes it's sending back. Thus, for ichsmb_bread() the count parameter is purely an output parameter. The code has been changed to reflect that. The sanity checking of the response length is now done once it (the first byte of the response) is received. While here, handling of ICH_HST_STA_FAILED status bit has been added. Plus some code style improvements and some new code comments in the vicinity of the changed code.
* ichsmb(4): Add PCI ID for Intel Ice Lake SMBus controllerDmitry Luhtionov2023-12-191-0/+3
| | | | MFC after: 2 weeks
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-162-4/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* sys: Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-162-4/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* sys/dev/ichsmb: Silence unhandled SMBALERT device_printfsReid Linnemann2023-06-261-13/+2
| | | | | | | | | | | | | | | | | | | | | | | The ichsmb driver does not actually handle SMBALERT, other than by logging the first 16 occurences of the ICH_HST_STA_SMBALERT_STS_SMBALERT status flag. Because the SMBALERT is not acknowledged by the host, clearing it in the host status register does not appear to work as long as some slave device is pulling the SMBALERT line low, at least for C2000 chips. As a result, if a slave device does pull SMBALERT low the interrupt handler will always loop its maximum of 16 times attempting to clear all status register flags and device_printf the status register. The result is the kernel message buffer is littered with these device_printfs at every interrupt. To remedy the problem, the ICH_HST_STA_SMBALERT_STS flag is zeroed in the read host status register value, just as with ICH_HST_STA_INUSE_STS and ICH_HST_STA_HOST_BUSY. This allows the loop to break when no other flags that must be handled are set in the host status register. Additionally, because the SMBALERT is not actually handled the SMBALERT logging is omitted as it has no actual function at this time. Reviewed by: imp Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D39966
* ichsmb/imcsmb/intpm/ismt: Remove unused devclass arguments to DRIVER_MODULE.John Baldwin2022-05-091-3/+1
|
* Remove unused smbus_devclass.John Baldwin2022-05-061-1/+1
|
* Remove check for __CC_SUPPORTS___FUNC__.John Baldwin2022-04-121-1/+1
| | | | | | | | __func__ is part of C99. PR: 263102 (exp-run) Reviewed by: brooks, imp, emaste Differential Revision: https://reviews.freebsd.org/D34801
* ichsmb: Add PCI IDs for Intel Alder Lake SMBus controllerAlexander Motin2021-11-241-0/+9
| | | | | Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com> MFC after: 2 weeks
* ichsmb: Add PCI ID for Intel Gemini Lake SMBus controllerVladimir Kondratyev2021-04-141-0/+3
| | | | | Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com> MFC after: 2 weeks
* ichsmb: Add PCI IDs for Intel Comet Lake and Tiger LakeNeel Chauhan2021-03-271-0/+12
| | | | | | Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D27859 MFC after: 2 weeks
* ichsmb_pci: convert to pci_device_table / add PCI_PNP_INFOEmmanuel Vadot2020-10-011-55/+87
| | | | | | | | | Submitted by: Greg V <greg@unrelenting.technology> Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D25260 Notes: svn path=/head/; revision=366330
* Create new wrapper function: bus_delayed_attach_children()Warner Losh2019-12-131-5/+2
| | | | | | | | | | | | | Delay the attachment of children, when requested, until after interrutps are running. This is often needed to allow children to run transactions on i2c or spi busses. It's a common enough idiom that it will be useful to have its own wrapper. Reviewed by: ian Differential Revision: https://reviews.freebsd.org/D21465 Notes: svn path=/head/; revision=355727
* ichsmb: defer smbus attach until interrupts are availableYuri Pankov2019-08-291-5/+2
| | | | | | | | | | | | This fixes a "timed sleep before timers are working" panic seen while attaching jedec_dimm(4) instances too early in the boot. Submitted by: ian Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D21452 Notes: svn path=/head/; revision=351604
* Add some Cannon Lake chipset IDs.Alexander Motin2019-03-201-0/+2
| | | | | | | | Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com> MFC after: 2 weeks Notes: svn path=/head/; revision=345333
* Add IDs for several missing Intel SMBus controllers.Gavin Atkinson2017-04-021-0/+18
| | | | | | | | Obtained from: Data sheets, Linux defines, local hardware MFH: 2 weeks Notes: svn path=/head/; revision=316413
* ichsmb: switch device_probe() from a large case statement to a lookup table.Gavin Atkinson2017-03-291-113/+75
| | | | | | | | | | The case statement was getting unmanageably large, and I'm about to add several more devices to it. MFC after: 2 weeks Notes: svn path=/head/; revision=316184
* Remove #define PCIS_SERIALBUS_SMBUS_PROGIF, unused since r200091Gavin Atkinson2017-03-281-2/+0
| | | | Notes: svn path=/head/; revision=316113
* Add some device IDs found in my new laptop.Alexander Motin2016-11-091-0/+4
| | | | Notes: svn path=/head/; revision=308464
* Migrate many bus_alloc_resource() calls to bus_alloc_resource_anywhere().Justin Hibbits2016-02-271-4/+4
| | | | | | | | | | | Most calls to bus_alloc_resource() use "anywhere" as the range, with a given count. Migrate these to use the new bus_alloc_resource_anywhere() API. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D5370 Notes: svn path=/head/; revision=296137
* ichsmb: add PCI device ID for Intel Sunrise Point-H SMBus controllerEric van Gyzen2016-02-161-0/+4
| | | | | | | | MFC after: 3 days Sponsored by: Dell Inc. Notes: svn path=/head/; revision=295651
* ichsmb: add Intel Wellsburg device ID.Rui Paulo2015-06-101-0/+4
| | | | | | | | | Submitted by: Michael Allen <mallen pi-coral.com> MFC after: 1 week Sponsored by: Pi-Coral, Inc. Notes: svn path=/head/; revision=284248
* ichsmb: remove whitespace.Rui Paulo2015-06-101-2/+2
| | | | Notes: svn path=/head/; revision=284247
* Add Lynx-Point LP smbus controller ID.Takanori Watanabe2015-04-241-0/+4
| | | | Notes: svn path=/head/; revision=281920
* ichsmb: add a device id for the Wildcat Point-LP.Rui Paulo2015-04-061-1/+5
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=281136
* Add bunch of PCI IDs of Intel Wildcat Point (9 Series) chipsets.Alexander Motin2014-11-261-0/+4
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=275101
* Add ID for Intel Avoton SMBus controller.Alexander Motin2013-11-151-0/+4
| | | | Notes: svn path=/head/; revision=258169
* Add new Coleto Creek device support: SATA, SMBus, and Watchdog devices.Jack F Vogel2013-07-191-0/+4
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=253475
* Add Intel Lynx Point PCH SMBus Device IDsJack F Vogel2013-01-021-0/+4
| | | | Notes: svn path=/head/; revision=244981
* - There's no need to overwrite the default device method with the defaultMarius Strobl2011-11-221-4/+2
| | | | | | | | | | | | | one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9) since r52045) but even recently added device drivers do this unnecessarily. Discussed with: jhb, marcel - While at it, use DEVMETHOD_END. Discussed with: jhb - Also while at it, use __FBSDID. Notes: svn path=/head/; revision=227843
* Revert r224736 as the introduced value was already present.Attilio Rao2011-08-091-2/+0
| | | | | | | | Reported by: tinderbox, pluknet Approved by: re (kib) Notes: svn path=/head/; revision=224745
* Add the PCI ID for the PCH DH89xxCC on ichsmb as got from Linux counterpart.Attilio Rao2011-08-091-0/+2
| | | | | | | | | | Sponsored by: Sandvine Incorporated Reviewed by: emaste, rstone Approved by: re (bz) MFC after: 3 days Notes: svn path=/head/; revision=224736
* Chipset support for the new Intel Panther Point PCH, thanksJack F Vogel2011-05-111-0/+4
| | | | | | | to Seth Heasley for preparing the changes. Notes: svn path=/head/; revision=221789
* Support for the new Patsburg PCH chipset:Jack F Vogel2011-02-011-0/+4
| | | | | | | | | | | | | | - SMBus Controller - SATA Controller - HD Audio Controller - Watchdog Controller Thanks to Seth Heasley (seth.heasley@intel.com) for providing us code. MFC after 3 days Notes: svn path=/head/; revision=218149
* Support for the new DH89xxCC PCH chipset including:Jack F Vogel2011-01-311-0/+4
| | | | | | | | | - SATA controller - Watchdog timer - SMBus controller Notes: svn path=/head/; revision=218140
* Add support for Intel Cougar Point SMBus controller.Jack F Vogel2010-08-271-0/+4
| | | | | | | MFC afer 1 week Notes: svn path=/head/; revision=211905
* ichsmb: add another pci idAndriy Gapon2009-12-161-0/+4
| | | | | | | | | | | | This is SMBus controller found in Intel Platform Controller Hub (PCH), which is a general name that refers to Intel 5 Series chipsets and 3400 Series chipsets. Submitted by: Dmitry S. Luhtionov <mitya@cabletv.dp.ua> MFC after: 3 days Notes: svn path=/head/; revision=200602
* ichsmb: drop default attachment to generic smbus hardwareAndriy Gapon2009-12-041-8/+0
| | | | | | | | | | | Attach only to devices known to be supported. This change overrided and undoes r200053. Suggested by: jhb MFC after: 2 weeks (only to stable/8) Notes: svn path=/head/; revision=200091
* ichsmb: try attaching only to intel hardware in the default caseAndriy Gapon2009-12-031-2/+4
| | | | | | | | | | | | | Ideally we should attempt attaching only to known supported devices. But I am not sure that we have all supported PCI IDs already listed, and I am too young to die, err, I don't want to take the heat from causing a trouble to someone. MFC after: 1 week X-ToDo: drop the default case Notes: svn path=/head/; revision=200053
* ichsmb: add pci ids for some newer supported hardwareAndriy Gapon2009-12-031-0/+12
| | | | | | | | Submitted by: Dmitry S. Luhtionov <mitya@cabletv.dp.ua> MFC after: 5 days Notes: svn path=/head/; revision=200052
* - Change ichsmb(4) to follow the format of all the other smbus controllersJohn Baldwin2009-02-031-10/+10
| | | | | | | | | | | | | | | | for slave addressing by using left-adjusted slave addresses (i.e. xxxxxxx0b). - Require the low bit of the slave address to always be zero in smb(4) to help catch broken applications. - Adjust some code in the IPMI driver to not convert the slave address for SSIF to a right-adjusted address. I (or possibly ambrisko@) added this in the past to (unknowingly) work around the bug in ichsmb(4). Submitted by: Andriy Gapon <avg of icyb.net.ua> (1,2) MFC after: 1 month Notes: svn path=/head/; revision=188077
* - Use bus_foo() rather than bus_space_foo() and remove bus space tag/handleJohn Baldwin2008-06-063-67/+63
| | | | | | | | | from softc. - Mark interrupt handlers MPSAFE as these drivers have been locked for a while. Notes: svn path=/head/; revision=179622
* Add the Intel 82801FB (ICH6) SMBus controller and theRemko Lodder2007-11-261-0/+8
| | | | | | | | | | | | | | | Intel 82801GB (ICH7) SMBus controller. PR: 85106 [1] PR: 99663 [2] Approved by: imp (mentor), jhb Submitted by: Oliver Fromme <olli at lurza.secnetix dot de>, [1] Arthur Hartwig <arthur dot hartwig at nokia dot com>, [1] Lowell Gilbert <lgfbsd at be-well dot ilk dot org> [2]@ MFC After: 3 days Notes: svn path=/head/; revision=173953
* o break newbus api: add a new argument of type driver_filter_t toPaolo Pisati2007-02-231-1/+1
| | | | | | | | | | | | | | | | bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Reviewed by: many Approved by: re@ Notes: svn path=/head/; revision=166901
* Add a device ID for the 631xESB/6321ESB SMBus controller.John Baldwin2007-01-111-0/+4
| | | | | | | Submitted by: Reed A. Cartwright <reed scit.us> Notes: svn path=/head/; revision=165958
* Various updates to most of the smbus(4) drivers:John Baldwin2007-01-112-45/+35
| | | | | | | | | | | | | | | | | | | | | - Use printf() and device_printf() instead of log() in ichsmb(4). - Create the mutex sooner during ichsmb(4) attach. - Attach the interrupt handler later during ichsmb(4) attach to avoid races. - Don't try to set PCIM_CMD_PORTEN in ichsmb(4) attach as the PCI bus driver does this already. - Add locking to alpm(4), amdpm(4), amdsmb(4), intsmb(4), nfsmb(4), and viapm(4). - Axe ALPM_SMBIO_BASE_ADDR, it's not really safe to write arbitrary values into BARs, and the PCI bus layer will allocate resources now if needed. - Merge intpm(4) and intsmb(4) into just intsmb(4). Previously, intpm(4) attached to the PCI device and created an intsmb(4) child. Now, intsmb(4) just attaches to PCI directly. - Change several intsmb functions to take a softc instead of a device_t to make things simpler. Notes: svn path=/head/; revision=165951
* Minor overhaul of SMBus support:John Baldwin2006-09-111-12/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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) Notes: svn path=/head/; revision=162234
* This signal handling code is worse than a no-op. If aBrian Somers2006-01-031-6/+1
| | | | | | | | | | | | | signal is received during the msleep, the msleep is retried indefinitely as it just keeps returning ERESTART because of the pending signal. Instead, just don't PCATCH - the signal can wait. Sponsored by: Sophos/ActiveState Notes: svn path=/head/; revision=153993