From owner-cvs-all@FreeBSD.ORG Fri Jul 1 03:40:28 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7629516A41C; Fri, 1 Jul 2005 03:40:28 +0000 (GMT) (envelope-from imp@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 614F943D1F; Fri, 1 Jul 2005 03:40:28 +0000 (GMT) (envelope-from imp@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j613eS9v036671; Fri, 1 Jul 2005 03:40:28 GMT (envelope-from imp@repoman.freebsd.org) Received: (from imp@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j613eS6j036670; Fri, 1 Jul 2005 03:40:28 GMT (envelope-from imp) Message-Id: <200507010340.j613eS6j036670@repoman.freebsd.org> From: Warner Losh Date: Fri, 1 Jul 2005 03:40:28 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/dev/pccard card_if.m pccard.c pccard_cis.c pccardvar.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jul 2005 03:40:28 -0000 imp 2005-07-01 03:40:28 UTC FreeBSD src repository Modified files: sys/dev/pccard card_if.m pccard.c pccard_cis.c pccardvar.h Log: Add a much-requested feature: The ability for pccard attachments to 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) Revision Changes Path 1.29 +9 -0 src/sys/dev/pccard/card_if.m 1.105 +1 -0 src/sys/dev/pccard/pccard.c 1.33 +5 -6 src/sys/dev/pccard/pccard_cis.c 1.52 +3 -2 src/sys/dev/pccard/pccardvar.h