summaryrefslogtreecommitdiffstats
path: root/sys/dev/cardbus
Commit message (Collapse)AuthorAgeFilesLines
* Cope gracefully with device_get_children returning an error.imp2007-01-191-2/+5
| | | | | Obtained from: Hans Petter Selasky P4: http://perforce.freebsd.org/chv.cgi?CH=112957
* Minor cleanup of CIS parsing.imp2006-06-121-5/+1
|
* Better error message when the CIS is a non-standards conforming '0'.imp2006-06-121-1/+3
|
* When we can't parse the CIS, note with a warning that the bogus CISimp2006-06-121-5/+2
| | | | | was ignored, rather than freaking out. In the past, it wasn't possible to not parse the CIS, so this changes no behavior.
* Make the 'pci_devclass' pointer variable private (drivers really shouldn'tjhb2006-01-201-1/+0
| | | | | | share devclass pointers, a mistake I've encouraged in the past) and move the declaration of the pci_driver kobj class from cardbus.c to pci_private.h so that other drivers can inherit from pci_driver.
* Use the child to allocate the resource rather than bridge, since we'reimp2006-01-031-41/+6
| | | | | | | | | | allocating a resource that's in the card itself. Remove more now-redundant resource_list_add, and now-redunant code that lives in the pci layer. # This fixes the atheros card that I have which had its CIS in one of # the BARs. Don't know yet if this fixes the amd64 issues reported.
* Minor style(9) hacking, plus use a macro in place of (struct resource *)~0ULimp2006-01-031-6/+7
| | | | (what the heck does that mean?).
* Fixing build bustage.avatar2005-12-311-1/+1
|
* Remove now-obsolete printf warning.imp2005-12-301-7/+2
|
* Move all of the resource allocation into the pci layer. The resourceimp2005-12-301-321/+15
| | | | allocation here just duplicated it (badly).
* The RID2BAR macro returns a number, not a bitmask. Fix this.imp2005-12-301-4/+6
| | | | Spotted by: ru, jhb
* - Retire BARBIT in favor of new PCI_RID2BAR.glebius2005-12-301-5/+5
| | | | - Fix build.
* Retire BARBIT in favor of new PCI_RID2BAR.imp2005-12-292-5/+4
|
* Help Warner with merge from p4.glebius2005-12-291-1/+2
|
* Implement /dev/cardbus%d.cis, same thing as /dev/pccard%d.cis. Thereimp2005-12-294-71/+268
| | | | | are some rough edges with this still, but it seems to work well enough to commit.
* When in rev. 1.47 cardbus_alloc_resources() function was moved fromglebius2005-12-281-15/+40
| | | | | | | | | | | | | | | | | | | | cardbus_cis.c to this file, some code was not merged and thus resource list entries were invalid. They didn't have a resources attached to them. However, the problem was masked for some time later, because newer resources list entries were added to the head of the list, and resource_list_find() always returned the first matching resource list entry. Usually the underlying driver allocated a valid resource and added it to the head of the list, and invalid one wasn't used. In rev. 1.174 of subr_bus.c the sorting of resource list entries was reversed demasking the problem in cardbus_alloc_resources(). This commit fixes the problem returning back some code from cardbus_cis.c, pre-1.49 revisions. PR: kern/87114 PR: kern/90441 Hardware provided by: Vasily Olekhov <olekhov yandex.ru> Reviewed by: imp
* Cardbus has only 1 slot, so simplify a little.imp2005-10-282-44/+37
|
* Eliminate even more duplication, and move some definitions into pcireg.himp2005-10-282-45/+19
|
* Remove now redundant defines.imp2005-10-281-6/+0
|
* Simplify code a little, prefer PCI?_FOO registers where possible.imp2005-10-281-15/+9
|
* Use PCIR_BARS rather than CARDBUS_BASE0_REGimp2005-10-281-2/+3
| | | | Style nit.
* Calling rman_get_start() after bus_release_resource() is evil.ru2005-09-271-2/+2
| | | | It became fatal after a recent "struct resource" split change.
* Use STAILQ in preference to SLIST for the resources. Insert new resourcesimp2005-03-181-4/+4
| | | | | | | | | last in the list rather than first. This makes the resouces print in the 4.x order rather than the 5.x order (eg fdc0 at 0x3f0-0x3f5,0x3f7 is 4.x, but 0x3f7,0x3f0-0x3f5 is 5.x). This also means that the pci code will once again print the resources in BAR ascending order.
* Doh! silly typo precludes compilingimp2005-03-111-2/+2
|
* Revert changes of 1.49. Lots-a-people broke with it, for reasonsimp2005-03-111-5/+9
| | | | | | | | | unknown (since my sony vaio didn't :-(. Instead, fix the problem described by 1.49 in a different way: just add the two calls I'd hoped I'd avoid in 1.49 by doing the (wrong) gymnastics there. While 1.49 is a good direction to go in, each step of the way should work :-(.
* There were two calls to cardbus_do_cis when cardbus_do_cis changed,imp2005-02-281-7/+5
| | | | | | | | | | | | | | | | | yet I only changed one of them. So when we loaded drivers, we'd fail to allocate resources correct. This pointed out that we were doing the wrong thing when we failed to attach a child. We released all the resources and almost deleted the child. Instead, we should keep the resources allocated so when/if a driver is loaded, we can go w/o having to allocate them. We use pci_cfg_save/restore to restore the BARs with these resources. This seems to fix the problems that we were seeing that I thought might have magically gone away in the last revision of cardbus.c (but really didn't). Noticed by: avatar (nicely done!)
* Be more verbose on errors with CIS reading. This should be a noop, butimp2005-02-201-4/+9
| | | | | appears to fix the ath problem that had been reported. I don't see how it can, so there's likely some other hidden bug.
* style(9) nitimp2005-02-201-2/+2
|
* Move resource allocation routines from cardbus_cis.c to cardbus.c.imp2005-02-064-354/+303
| | | | | | | | | | | They have nothing at all to do with CIS parsing. Remove some unused funce parsing: nothing used the results. Use more of pccard_cis.h's deifnitions for the cardbus specific cis parsing we do. More work is needed in this area. This reduces the size of the cardbus module by 380 bytes or so...
* Use the standard FreeBSD licenseimp2005-01-135-37/+25
| | | | Approved by: imp, jon
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-065-5/+5
|
* MFp4:imp2004-06-271-14/+0
| | | | | | | The hack for setting the bus has been moved down into the cbb driver. I've been running without this hack in my tree for so long I had forgotten that I'd removed it :-). Please let me know if this causes difficulty for your laptop.
* Add some missing <sys/module.h> includes which are masked by thephk2004-05-301-0/+1
| | | | one on death-row in <sys/kernel.h>
* Add note about why we're ignoring the below 1MB bit.imp2004-04-111-0/+19
|
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-2/+1
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Make the cardbus driver a derived class of the pci driver. In theory, thisdfr2003-11-011-33/+2
| | | | should allow many of the pci methods to be re-staticised.
* remove obsolete quirks for cardbus cis. none have proven to be needed.imp2003-10-071-25/+3
|
* o move the cis tuple definitions into a common file.imp2003-10-072-79/+4
| | | | | | o minor optimization of cardbus_cis processing. Remove a bunch of generic entries that are handled by generic. o no longer need the card_get_type stuff.
* These aren't needed anymoreimp2003-10-071-3/+0
|
* Remove prototype for decode_tuple_copy() which was axed in the lastjhb2003-10-061-3/+0
| | | | revision to fix compile.
* remove the cardbus cis reading code. nobody ever used it and it hasimp2003-10-062-111/+0
| | | | locking issues down to the api level.
* Use PCIR_BAR(x) instead of PCIR_MAPS.jhb2003-09-021-1/+1
| | | | | Glanced over by: imp, gibbs Tested by: i386 LINT
* Use __FBSDID().obrien2003-08-242-2/+6
| | | | Also some minor style cleanups.
* Add a new PCI interface method, assign_interrupt, to determine thetmm2003-07-011-0/+1
| | | | | | | | | | | | | | | | interrupt to be used for a device. This is intended solely for internal use of PCI bus implementations, and exists so that PCI bus drivers implementing special interrupt assignment methods which require additional work at the bus level to work right can be easily derived from the generic driver (or any other one) without resorting to hacks. It will be used in the sparc64 ofw_pcibus driver, which will be committed shortly. Make use of this method in the generic implementation, and add it to the method table of bus drivers derived from the PCI one. Reviewed by: imp, -hackers
* Don't leak "barlist" allocation on failure.phk2003-06-011-0/+4
| | | | Found by: FlexeLint
* Ignore the 'must allocate below 1MB' flag for the TPL_BAR_REG. It isimp2003-05-241-0/+2
| | | | | | | | | | | | set on realtek cards, but they work without it (and don't work with it). The standard seems to imply that this is just a hint anyway, so this should be harmless. It doesn't appear to be set on any other cardbus cards that I have (or have seen). This should make the rl based CardBus cards work again. I've been running it for about a month now. Approved by: re@ (jhb)
* MFp4: when you can't allocate a resource, print a message, don't panic.imp2003-04-081-0/+19
|
* Back out M_* changes, per decision of the TRB.imp2003-02-191-3/+3
| | | | Approved by: trb
* Move the resource handling down into the pci bus as well.imp2003-02-182-410/+49
| | | | | | | | | | | Minor CIS resource allocation code cleanup Remove some fairly useless debug writes. This finishes the work to move as much cardbus code as possible into pci. We wind up removing 800-odd lines from cardbus.c: we go from 1285 to 400 lines. Reviewed by: mdodd
* Sanity check the BAR length reported by the CIS with the BAR length thatscottl2003-02-171-4/+22
| | | | | | | | is encoded in the PCI BAR. The latter is more reliable. This allows the sio/modem function of the Xircom RealPort ethernet+modem card to work. Note that there still seem to be issues with sio_pci not releasing resources on detach.
OpenPOWER on IntegriCloud