Commit Graph

72 Commits

Author SHA1 Message Date
christos
4de2a1c70e Don't allocate 2K on the stack... 2006-06-04 19:27:59 +00:00
thorpej
0bb0418280 Use device_private(). 2006-03-29 06:22:38 +00:00
thorpej
78ffd948be Replace device_locators() with device_locator(), and use it. 2006-03-29 06:00:46 +00:00
thorpej
39cd836ee1 Use device_unit(). 2006-03-28 17:38:24 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
drochner
afcc05d0fe finally nuke the useless cardbus "dev" locator 2005-10-25 16:37:50 +00:00
drochner
1af44f3c6e remove the useless (always 0) device number from cardbus driver state,
autoconf attach structures and configuration cycle functions
(just leave the kernel configuration attribute for now to avoid breaking
 config(1) files)
2005-09-09 14:50:58 +00:00
drochner
1797f37c06 fix parsing of some informational CIS tuples: correct length and handle
the case correctly where a string is terminated with 0x00 0xff
2005-09-08 15:02:48 +00:00
drochner
49126e9efe use XXXCF_NLOCS constants instead of magic numbers 2005-08-26 11:01:42 +00:00
drochner
e6a178f21f kill a number of autoconf submatch functions which follow the
standard scheme:
if (<configured> != <wildcard> && <configured> != <real>)
	then fail
else
	ask device match function

This is handled by config_stdsubmatch() now.
2005-08-25 22:33:18 +00:00
drochner
fa3cb84d62 replace the "locdesc_t" structure carrying the number of locators
explicitely by a plain integer array
the length in now known to all relevant parties, so this avoids
duplication of information, and we can allocate that thing in
drivers without hacks
2005-08-25 18:35:38 +00:00
perry
f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
enami
10f8fdf7dd Redo previous two commit a bit different way;
- Just read as much as we can.
- Handle some special tuples.
2004-10-14 03:24:00 +00:00
enami
327ace1ba7 Terminate the search loop when something is found rather than when
first iteration is done.
2004-10-10 22:26:34 +00:00
enami
9c893ee4c1 One more obvious test. 2004-10-10 22:10:06 +00:00
enami
d7464d0873 Don't overrun when decoding tuples. 2004-10-10 22:00:36 +00:00
enami
6ad7a348b0 Cosmetic changes. 2004-10-10 21:58:46 +00:00
drochner
baf74cd9d0 it is sufficient to include "locators.h" in cardbus.c 2004-08-23 18:21:51 +00:00
drochner
d9b1d2cfd2 kick out the error-prone handcrafted single-linked list of cardbus
functions; replace by a simple *array[8]
2004-08-23 17:52:45 +00:00
drochner
b2f07722fc make the "selective probing" work, and minor cleanup
(avoid using the macros which hide cfdata members, this doesn't help
for anything)
2004-08-23 16:41:48 +00:00
drochner
f2e99ab844 support rescan / manual detach
This code needs cleanup, at least a reasonable linked list
implementation (fixed a bug in detach_card() in the process which
left a dangling pointer around).
Also removed a questionable and undocumented use of the parent's
device unit number as locator value.
(As with the pcmcia code: someone please review wrt powerup/down etc.)
2004-08-19 14:50:52 +00:00
mycroft
eed3298a3c cardbusdevs -> pcidevs 2004-08-02 19:14:28 +00:00
mycroft
9d70547685 If the CIS pointer in all-0s, don't try to read the CIS. 2004-07-22 16:18:32 +00:00
christos
de3fd5d864 Cleanup and remove suplicate copies of the incorrect power setup code.
Thanks to mycroft for suggesting this.
XXX: This is a copy of the pci code; another reason cardbus needs to die.
2004-05-08 23:40:01 +00:00
itojun
6123043789 pass string length (= boundary info) to pci_devinfo so that we do not run over
the end of memory region
2004-04-23 21:13:05 +00:00
thorpej
72a7af27b0 Use aprint_normal() in cfprint routines. 2003-01-01 00:10:15 +00:00
thorpej
c9b3657ce9 Add trailing ; to CFATTACH_DECL. 2002-10-02 16:33:28 +00:00
thorpej
bacf3a10fa Use CFATTACH_DECL(). 2002-09-30 20:43:55 +00:00
thorpej
f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
thorpej
6c88de3b53 Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller.  Use it
rather than invoking cfattach->ca_match directly.
2002-09-27 03:17:40 +00:00
thorpej
d1ad2ac4f2 Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver.  The cfdriver is then looked
up in a list which is built at run-time.
2002-09-27 02:24:06 +00:00
lukem
06de426449 SIMPLEQ rototill:
- implement SIMPLEQ_REMOVE(head, elm, type, field).  whilst it's O(n),
  this mirrors the functionality of SLIST_REMOVE() (the other
  singly-linked list type) and FreeBSD's STAILQ_REMOVE()
- remove the unnecessary elm arg from SIMPLEQ_REMOVE_HEAD().
  this mirrors the functionality of SLIST_REMOVE_HEAD() (the other
  singly-linked list type) and FreeBSD's STAILQ_REMOVE_HEAD()
- remove notes about SIMPLEQ not supporting arbitrary element removal
- use SIMPLEQ_FOREACH() instead of home-grown for loops
- use SIMPLEQ_EMPTY() appropriately
- use SIMPLEQ_*() instead of accessing sqh_first,sqh_last,sqe_next directly
- reorder manual page; be consistent about how the types are listed
- other minor cleanups
2002-06-01 23:50:52 +00:00
enami
fe972558c0 Use __func__ instead of __FUNCTION__. 2001-11-23 10:20:47 +00:00
enami
eca8404326 Don't use __func__ as variable. It prevents compilation.
Use __FUNCTION__ instead.
2001-11-21 09:08:38 +00:00
lukem
2565646230 don't need <sys/types.h> when including <sys/param.h> 2001-11-15 09:47:59 +00:00
lukem
f61cbe7489 add RCSID 2001-11-13 12:51:12 +00:00
augustss
d8cebea1fc Make some messages only appear with bootverbose.
Add bus number to attach args.
2001-11-06 03:11:10 +00:00
mcr
90e0ca31dd record handles for memory and io spaces 2001-07-06 18:05:25 +00:00
thorpej
6300e455b4 Make sure `bhlc' is initialzed before we consult it to determine
the number of functions on the card.
2001-05-09 18:16:39 +00:00
augustss
c37a0f8fb8 Fix grammaer in error message. 2001-05-09 12:06:25 +00:00
haya
94e69e110f Initialise all function's latency timer and cacheline size. 2001-04-25 09:29:36 +00:00
haya
3d8f9a4f4f Set function-in-use flag before calling power control function in
order to prevent turn on power twice.  This change does not prevent
power-off/power-on conflicts.
2001-04-25 09:20:32 +00:00
enami
caf82786af - Unmap space used to read tuple.
- No need to zero clear temporary storage twice.
2001-03-28 01:55:55 +00:00
enami
f5f3098c7c Cosmetic changes; mostly knf. 2001-03-28 01:53:14 +00:00
wiz
8a9e5b82d3 typo in comment (consifuration -> configuration) 2000-10-12 12:42:03 +00:00
cgd
1ce8331ad9 nuke some final __BROKEN_INDIRECT_CONFIG bits that weren't caught by
unifdef last time.  (bloody things just won't stay dead!)
2000-07-02 06:25:46 +00:00
cgd
eee18e1f6c beat back the undead: __BROKEN_INDIRECT_CONFIG had risen, and was
terrorizing innocent hackers...
2000-06-16 23:41:33 +00:00
joda
1f1d169e20 extract serial funce 2000-04-17 09:16:38 +00:00
mycroft
8aeb8df354 Add a flag to tell whether a MAC address was actually found in the CIS.
XXX This whole piece of code should go away ASAP.  We should use a callback
as in the PCMCIA code.  In fact, we should use the PCMCIA code...
2000-04-02 19:11:37 +00:00
haya
ddd36bd41a 1. Do not apply 5 V on a CardBus card.
2. Do not avoid ISA hole when a device requires more than
   256-byte io space.
3. Remove sending CardBus bridge's function number to
   cardbus stack.  This number is not needed for anyone.
2000-03-22 09:35:06 +00:00