aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/pccard/pccardvar.h
Commit message (Collapse)AuthorAgeFilesLines
* Reapply, with minor tweaks, r338025, from the original commit:Warner Losh2018-09-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove unused and easy to misuse PNP macro parameter Inspired by r338025, just remove the element size parameter to the MODULE_PNP_INFO macro entirely. The 'table' parameter is now required to have correct pointer (or array) type. Since all invocations of the macro already had this property and the emitted PNP data continues to include the element size, there is no functional change. Mostly done with the coccinelle 'spatch' tool: $ cat modpnpsize0.cocci @normaltables@ identifier b,c; expression a,d,e; declarer MODULE_PNP_INFO; @@ MODULE_PNP_INFO(a,b,c,d, -sizeof(d[0]), e); @singletons@ identifier b,c,d; expression a; declarer MODULE_PNP_INFO; @@ MODULE_PNP_INFO(a,b,c,&d, -sizeof(d), 1); $ rg -l MODULE_PNP_INFO -- sys | \ xargs spatch --in-place --sp-file modpnpsize0.cocci (Note that coccinelle invokes diff(1) via a PATH search and expects diff to tolerate the -B flag, which BSD diff does not. So I had to link gdiff into PATH as diff to use spatch.) Tinderbox'd (-DMAKE_JUST_KERNELS). Approved by: re (glen) Notes: svn path=/head/; revision=338948
* Back out r338035 until Warner is finished churning GSoC PNP patchesConrad Meyer2018-08-191-1/+1
| | | | | | | | | | I was not aware Warner was making or planning to make forward progress in this area and have since been informed of that. It's easy to apply/reapply when churn dies down. Notes: svn path=/head/; revision=338037
* Remove unused and easy to misuse PNP macro parameterConrad Meyer2018-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Inspired by r338025, just remove the element size parameter to the MODULE_PNP_INFO macro entirely. The 'table' parameter is now required to have correct pointer (or array) type. Since all invocations of the macro already had this property and the emitted PNP data continues to include the element size, there is no functional change. Mostly done with the coccinelle 'spatch' tool: $ cat modpnpsize0.cocci @normaltables@ identifier b,c; expression a,d,e; declarer MODULE_PNP_INFO; @@ MODULE_PNP_INFO(a,b,c,d, -sizeof(d[0]), e); @singletons@ identifier b,c,d; expression a; declarer MODULE_PNP_INFO; @@ MODULE_PNP_INFO(a,b,c,&d, -sizeof(d), 1); $ rg -l MODULE_PNP_INFO -- sys | \ xargs spatch --in-place --sp-file modpnpsize0.cocci (Note that coccinelle invokes diff(1) via a PATH search and expects diff to tolerate the -B flag, which BSD diff does not. So I had to link gdiff into PATH as diff to use spatch.) Tinderbox'd (-DMAKE_JUST_KERNELS). Notes: svn path=/head/; revision=338035
* Minor formatting and style tweaks to some comments.John Baldwin2017-12-281-9/+8
| | | | Notes: svn path=/head/; revision=327292
* Create a new ISA_PNP_INFO macro. Use this macro every where we haveWarner Losh2017-12-231-1/+1
| | | | | | | | | | ISA PNP card support (replace by hand version in if_ed). Move module declarations to the end of some files. Fix PCCARD_PNP_INFO to use nitems(). Remove some stale comments about pc98, turns out the comment was simply wrong. Notes: svn path=/head/; revision=327102
* Expand cryptic comment with inforation I've learned in the mean timeWarner Losh2017-12-231-4/+12
| | | | | | | | | about CIS3/CIS4, including studies I've done on my large collection of PC Cards bought off e-bay over the years since the original entry as well as conversations I've had at conferences. Notes: svn path=/head/; revision=327101
* PC Card PNP tables are terminated by a NULL sentinel. This shouldn'tWarner Losh2017-12-221-1/+1
| | | | | | | be recorded in the linker hints, so subtract one to omit it. Notes: svn path=/head/; revision=327084
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326255
* Since the human readable name is actually ignored, and not matching aWarner Losh2017-09-271-1/+1
| | | | | | | | 'human' pnp string, change it to #, the name reserved for fields that are ignored. Notes: svn path=/head/; revision=324069
* Create a generic PCCARD_PNP_INFO from the MODULE_PNP_INFO buildingWarner Losh2015-12-111-0/+10
| | | | | | | | | | | | block. Use it in all the PNP drivers to export either the current PNP table. For uart, create a custom table and export it using MODULE_PNP_INFO since it's the only one that matches on function number. Differential Review: https://reviews.freebsd.org/D3461 Notes: svn path=/head/; revision=292079
* Remove unused PCMCIA_CARD* macros.Warner Losh2014-12-031-7/+1
| | | | | | | | | | Always include the card human readable name. We support ~270 cards and at ~20 bytes each, this bloats things by only ~5k. Retain the PCMCIA_CARD vs PCMCIA_CARD_D distinction, though, in case this is intolerable. Notes: svn path=/head/; revision=275434
* Retire old, transition code for managing the FreeBSD 5 -> 6 migration.Warner Losh2014-11-221-25/+0
| | | | Notes: svn path=/head/; revision=274879
* Replace `inline static' by `static inline'.Ed Schouten2011-12-131-7/+7
| | | | | | | | | If I interpret the C standard correctly, the storage specifier should be placed before the inline keyword. While at it, replace __inline by inline in the files affected. Notes: svn path=/head/; revision=228471
* Fix typos.Rebecca Cran2010-11-091-3/+3
| | | | | | | | PR: bin/148894 Submitted by: olgeni Notes: svn path=/head/; revision=215034
* Add in parsing of the disk FUNCE tuples.Warner Losh2009-03-031-1/+23
| | | | Notes: svn path=/head/; revision=189318
* Define bits for memory mapping house keeping by bridges.Warner Losh2009-01-051-0/+4
| | | | Notes: svn path=/head/; revision=186795
* Unify the initial card probe/attach procedure with the kldloadWarner Losh2008-08-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | procedure. There were some subtle differences before that could lead to a variety of bugs, including resources being lost (in one case forever). pccard_probe_and_attach_card does this now, and includes comments about what's going on and why, since it isn't obvious from the code. Please let me know if I've missed anything... Provide a new function called pccard_select_cfe that allows drivers to select which configuration entry to use. This is needed for some older pre-MFC standard cards with many functions that want to activate all their functions by selecting alternative entries, or to work around broken ones. pccard_select_cfe will migrate into the pccard_if.m interface as its interface stabilizes to keep all the pccard drivers from referencing any symbols in the pccard.ko module directly. Fix a printf to refer to the right function name. Notes: svn path=/head/; revision=181342
* Fix commentWarner Losh2005-09-251-2/+2
| | | | Notes: svn path=/head/; revision=150532
* Remove compat layer for OLDCARD compatibility. All instances of itWarner Losh2005-09-221-13/+0
| | | | | | | are now gone from the tree. Notes: svn path=/head/; revision=150468
* Fix build.Gleb Smirnoff2005-09-201-0/+13
| | | | Notes: svn path=/head/; revision=150371
* Implement /dev/pccardN.cis. This mirrors the CIS for the card to userland.Warner Losh2005-09-201-163/+1
| | | | | | | | | pccardc dumpcis /dev/pccardN.cis will work now, but I may rewrite pccardc. Also, move more of the private data to a new file called pccardvarp.h. Notes: svn path=/head/; revision=150362
* Add a few new functions interfaces to allow reading/writing attributeWarner Losh2005-09-131-1/+33
| | | | | | | memory, the CCR and a tweak to cis_scan. Notes: svn path=/head/; revision=150098
* Define and use PCCARD_MEM_PAGE_SIZE.Warner Losh2005-09-131-0/+2
| | | | Notes: svn path=/head/; revision=150097
* MFp4: Remove stale functions.Warner Losh2005-09-131-21/+0
| | | | Notes: svn path=/head/; revision=150095
* o Check to make sure the card has a function (panic if not) in read_ivar.Warner Losh2005-07-131-1/+1
| | | | | | | | | | o Use pf more consistantly for pccard_function. o Make sure we quote the strings properly (maybe this function belongs in subr_bus.c) o Tweak a comment to be more accurate after code changed. Notes: svn path=/head/; revision=147963
* Upon relection, we shouldn't allow the tuple structs to be modified byWarner Losh2005-07-011-1/+1
| | | | | | | | | | the functor, so make it a const pointer, and chase down the resulting const-poisoning. Approved by: re (scottl) Notes: svn path=/head/; revision=147729
* Add a much-requested feature: The ability for pccard attachments toWarner Losh2005-07-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scan the CIS for interesting tuples. 95% of what can be obtained from the CIS is harvested by the pccard layer and presented to the user in standard function calls. However, there are special needs at times where the standard stuff doesn't suffice. This is for those special cases. CARD_SCAN_CIS(device_get_parent(dev), function, argp) scans the CIS of the card, passing each tuple to function with the tuple and argp as its arguments. Returning 0 continues the scan, while returning 1 terminates the scan. The value of the last invocation of function is returned from this function. int (*pccard_scan_t)(struct pccard_tuple *tuple, void *argp) function called for each tuple. Elements of the CIS tuple can be read with pccard_tuple_read_{1,2,3,4,n}(). You are reading the actual tuple memory each time, in case your card has registers in the CIS. # I suppose these things should be documented in pccard(4) or something like # that. # I plan on unifying cardbus CIS support in a similar way. Approved by: re (scottl) Notes: svn path=/head/; revision=147711
* Eliminate unused argument in PCMCIA_CARD macro.Warner Losh2005-06-241-5/+29
| | | | | | | | | | | Provide a backwards compatible way to have the extra macro by defining PCCARD_API_LEVEL 5 before including pccarddevs for driver writers that want/need to have the same driver on 5 and 6 with pccard attachments. Approved by: re (dwhite) Notes: svn path=/head/; revision=147580
* Big cleanup of resource code for pccard. Once coventry noticedWarner Losh2005-04-121-3/+0
| | | | | | | | | | | | | problems here, it became clear we were being too complex. o Don't keep track of resources in two places o Use resource_list_purge instead of rolling our own o Just reassign the ownership of the resource, rather than freeing it and reallocating it. o Fix compile problems when sizeof(u_long) != sizeof(int) Notes: svn path=/head/; revision=144955
* Cleanup of resource allocation code after having my attention focused onWarner Losh2005-04-121-3/+0
| | | | | | | | | | | this code: o rid is stored in the resource, so don't bother keeping track of it here. o Implement memory space o Don't try to activate 'memory card' CFEs. This is type memory, as opposed to the memory resource. Notes: svn path=/head/; revision=144930
* Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh2005-01-061-1/+1
| | | | Notes: svn path=/head/; revision=139749
* Don't nest includes here. There's no need and the subset included is lame.Warner Losh2004-05-281-5/+0
| | | | | | | Submitted by: bde Notes: svn path=/head/; revision=129799
* MFp4:Warner Losh2003-11-021-4/+2
| | | | | | | | | | | | | o Fix MFC cards. We were bogusly setting CCR_IOBASE[01] and CCR_IOLIMIT. now when we activate the resource, we adjust these for MFC cards, per the spec. o Change type of pf_mfc_* to be bus_addr_t, which is more correct than long. This makes my 3C362D/3C363D and 3CXEM556 cards work! Woo Hoo! Notes: svn path=/head/; revision=121905
* Const poison string accessor functions.Warner Losh2003-10-261-4/+4
| | | | Notes: svn path=/head/; revision=121521
* refactor how we do the quirk matching. this puts an ugly if into aWarner Losh2003-10-061-4/+2
| | | | | | | | | | | | routine of its own, and allows us to move the indentation back two layers making the code more readable. delete a prototype that should have been killed years ago in pccardvar.h. # adding quirks here is way harder than it needs to be. :-( Notes: svn path=/head/; revision=120849
* Remove unused #defines.Warner Losh2003-09-201-3/+0
| | | | Notes: svn path=/head/; revision=120289
* Remove unneeded field after CIS changes.Warner Losh2003-08-291-1/+0
| | | | Notes: svn path=/head/; revision=119545
* Add accessor for cis4 string. Neither OLDCARD nor NEWCARD supportWarner Losh2003-04-231-0/+1
| | | | | | | | | | this yet, but that will change soon. Pr: 51333 Submited by: Scott Mitchell Notes: svn path=/head/; revision=113945
* Remove bogus line and entry, restore cnet ne2000 add smc 8041Warner Losh2003-04-101-5/+6
| | | | Notes: svn path=/head/; revision=113322
* 1.37 was committed prematurely: back out until I can commit all parts at theWarner Losh2003-04-091-6/+5
| | | | | | | same time. Notes: svn path=/head/; revision=113308
* 1.77 was bogus: there is no logic bug. Back it out and compare theWarner Losh2003-04-091-5/+6
| | | | | | | correct fields instead. Notes: svn path=/head/; revision=113307
* Create new _ND versions to allow one to not specify the description beWarner Losh2003-04-081-0/+5
| | | | | | | stored in the table. Notes: svn path=/head/; revision=113257
* u_int*_t -> uint*_tWarner Losh2003-04-081-14/+14
| | | | | | | -1 -> 0xffffffff Notes: svn path=/head/; revision=113241
* MFp4:Warner Losh2002-11-141-4/+4
| | | | | | | | | | | o Use 32-bit unsigned types for things that really are 32-bit quantities, not bus_addr_t. These are not the same as a bus_addr_t, so don't use that here. Harmless on i386, introduced problems on sparc64. Submitted by: jhb Notes: svn path=/head/; revision=106898
* Eliminate the need for pccard_common.c by moving the function inlineWarner Losh2002-07-171-5/+13
| | | | | | | | | | in the .h file. Make it static __inline to make sure that it doesn't wind up defined in any files. Also, fix a typo that said null_do_attach instead of null_do_probe. Notes: svn path=/head/; revision=100218
* Make oldcard and newcard kernel module work.Takanori Watanabe2002-05-301-1/+2
| | | | Notes: svn path=/head/; revision=97613
* Add u_int16 prodext value in CISTPL_MANF_ID. This gets a fifth byteTakeshi Shibagaki2002-02-201-0/+3
| | | | | | | | | | when manufacturer id tuple length is 5. This change is for xe driver. This is a dirty hack. But there is no better idea. Reviewd by: imp Notes: svn path=/head/; revision=90964
* Move cardaddr to memory structure.Warner Losh2002-01-291-1/+2
| | | | | | | | Forgotten by: imp Reminded by: Dave Cornejo Notes: svn path=/head/; revision=89959
* Hoist the Card/Card2 macros that I invented for the wi driver intoWarner Losh2001-11-151-0/+10
| | | | | | | | | | | pccard layer and rename them PCMCIA_CARD and PCMCIA_CARD2 respectively (note, this is being done with an eye towards NetBSD integreation so it is easier to keep lists of cards between us and them in sync). Use this in the an and wi drivers. Notes: svn path=/head/; revision=86385
* Sync to 1.16 pccarddevs to get new PCMCIA_ symbolsWarner Losh2001-11-111-3/+3
| | | | Notes: svn path=/head/; revision=86272