Commit Graph

191 Commits

Author SHA1 Message Date
Maxim Konovalov
7a4ff692d0 o Document -s flag.
No objections from:	ume
MFC after:		2 weeks
2004-01-15 13:23:21 +00:00
Maxim Konovalov
0bc6ba1fd2 o Actually add -x option: probeonly assigment was missed
in rev. 1.15 pccardd.c.

Reported by:            osa
OK'ed by:               imp
MFC after:              2 weeks
2003-12-26 10:01:29 +00:00
Warner Losh
7c9b63d96a Ooops. Committed sin number 1: updating the code w/o updating the comments.
Update the comments too.
2003-10-04 18:43:21 +00:00
Warner Losh
9cd2bd7564 I've been burned about half a dozen times by the old PAO syntax for
'any' interrupt.  There's no reason not to be liberal here and accept
the PAO syntax.

MFC After: 2 weeks
2003-10-04 18:40:36 +00:00
Warner Losh
926c662984 Go ahead and allow ports as high as 0xfff to be used for pccard
devices.  Only some devices support above 0x400, but since you have to
explicitly enable this range, you are assumed to know what you are
doing.
2003-08-03 06:17:06 +00:00
Diomidis Spinellis
644fbff012 Report the I/O base address in hex to be consistent with its
specification format.

Approved by:	schweikh (mentor)
MFC after:	2 weeks
2003-07-18 21:53:42 +00:00
Warner Losh
b5fce26182 Include string.h for strlen declaration 2003-06-09 06:17:07 +00:00
Warner Losh
f2303cfb6e Include stdlib.h for exit declaration 2003-06-09 06:16:18 +00:00
Warner Losh
f8ba13e996 Include string.h for strcmp declaration 2003-06-09 06:16:00 +00:00
Warner Losh
5de7693b9f Remove obsolete compatibility ifdef. 2003-04-23 23:41:48 +00:00
Warner Losh
e4d8ed2595 Copy CIS3 and CIS4 strings into the kernel too.
PR:		51333
Submitted by:	Scott Mitchell
2003-04-23 23:40:28 +00:00
David E. O'Brien
052238b16c style.Makefile(5) 2003-04-04 17:49:21 +00:00
Warner Losh
e0a6103d7d manufacturer id is typically 4 bytes 2003-03-14 21:11:01 +00:00
Warner Losh
62bac311fc Don't be so verbose about 'unknown' CIS tuples. We were printing each
one three times before we did the dump.  Also, we printed 0x00 for the
tuple type rather than the actual tuple type.  Now, we print the
actual tuple type.  This appears to have no ill effects.

Should get rid of the

Code NN not found
and
code Unknown ignored

messages.  The ignored messages are still generated for tuples tuples
who have a minimum length set and we find a tuple of that type that's
shorter than the minimum length.
2003-03-14 13:17:35 +00:00
Ruslan Ermilov
3892c30012 mdoc(7) police: Nits. 2003-03-02 21:04:21 +00:00
Brian Feldman
e088615df0 Add a new subcommand to pccardc(8), "dumpcisfile", which reads a CIS
structure from a file instead of a PC-CARD itself before parsing and
dumping it. (E.g. useful when you get a CIS file from a manufacturer
which fixes they broken card's CIS, and add it to the pccard quirks.)
2003-02-25 22:14:38 +00:00
Jens Schweikhardt
d64ada501a Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/
Add FreeBSD Id tag where missing.
2002-12-30 21:18:15 +00:00
Ruslan Ermilov
8d5d039f80 Uniformly refer to a file system as "file system".
Approved by:	re
2002-12-12 17:26:04 +00:00
Warner Losh
9099eb660e Remove bogus comments about why we do some silly things, and instead
just say that the reasons are historical.

Pr: 41104
Submitted by: hiten
2002-09-29 23:56:33 +00:00
Warner Losh
0bd71bcb9b Add -x option. This causes pccardd to exit after probing the cards. This
is useful for low memory systems.

PR: 36418
Submitted by: Forrest W. Christian
2002-09-29 23:00:11 +00:00
Warner Losh
83431b577e Add a ; to make a non-null statement 2002-09-29 22:58:53 +00:00
Warner Losh
bf038c87af Copy cis strings into the kernel. 2002-07-22 06:58:24 +00:00
Philippe Charnier
490d5836b5 The .Nm utility 2002-07-14 14:47:15 +00:00
Dag-Erling Smørgrav
d397408818 Usage style sweep: spell "usage" with a small 'u'.
Also change one case of blatant __progname abuse (several more remain)
This commit does not touch anything in src/{contrib,crypto,gnu}/.
2002-04-22 13:44:47 +00:00
Dima Dorfman
a52a303f5e Correct a typo.
PR:		36214
Submitted by:	Nagy Attila <bra@fsn.hu>
2002-03-24 02:34:59 +00:00
Takeshi Shibagaki
d9dd0fde5f Add some code which read manufucturer id. This is for NEWCARD compatibility.
Reviewed by: imp
2002-02-20 14:48:23 +00:00
Warner Losh
7a731ac2d2 Update length more correctly when parsing a cis info field.
Before, we were using
	while (*p++ && --len > 0);
to do this.  However, len doesn't get decremented for the NUL byte, so when
we used len later to see if we still have CIS left for some optional fields,
we'd run off the end of an array and dump core.

Instead, replace it with
	len -= strlen(p) + 1;
	p += strlen(p) + 1;
which is more correct.  It is a little bogus to assume that p points to
a valid C string, but only a little.  The PC Card SPEC mandates that it
does, and we already depend on that with the use of strdup a few lines
earlier.  Since much of the rest of the cis parsing code isn't hyper
retentive about error checking, I'll leave that level of checking for
another time and/or another committer :-).
2002-01-06 18:03:55 +00:00
Mitsuru IWASAKI
fcb24d01b0 Fix a bug about CIS string comparison. Pccardd should be able to distinguish
card "MELCO" "LPC2-T"
and
	card "MELCO" "LPC2-TX"
by this fix.

Reported by:	Kitagawa Shoichi <sk@xstar.kiu.ac.jp>,
		NINOMIYA Hideyuki <nin@shikoku.ne.jp>
MFC after:	1 week
2001-11-29 14:33:57 +00:00
Warner Losh
b2237d4d5c Always set unit number to -1 unless some other unit is specified in
the config file.  This fixes the breakage caused by the recent change
in the behavior of device_add_child for ata (which shows soren's
reservations were well founded).

Submitted by:	OGAWA Takaya <t-ogawa@triaez.kaisei.org>
2001-11-02 17:28:43 +00:00
Warner Losh
df306b2647 Don't core dump if we can't get the index automatically.
Debug info from:	Ben Hockenhull <benh@jpj.net>
2001-10-05 20:38:32 +00:00
Noriaki Mitsunaga
4ea024db92 Change the access width of memory window from 8 bits to 16 bits.
16 bits access is required by nsp driver to work in SMIT mode.
Since previously (1.65 and before in current, and 1.46.28 and before
in stable branch) 16 bits access was default, I hope it will break nothing.

Okayed-by: imp
2001-09-04 04:40:09 +00:00
Warner Losh
76a6c2a9a1 Fix ISA machines. Also, make it possible for the new pccardd to run
on older kernels correctly.  Terminate the loop when we find a
suitable irq.  Also, only try to select from the pool.  Cleaned up the
two cases (IRQ picked by the user and ?) into one.

MFC upon re approval.
2001-08-19 19:16:26 +00:00
Warner Losh
f18be15b41 Ask the kernel about IRQ 0 first. If the kernel responds with an IRQ,
use it.  If not, then loop asking for each one, with normal -I
processing.  This will effectively disable -I for when the pcic is in
PCI function interrupt routing mode.
2001-08-14 19:18:33 +00:00
Warner Losh
e61693305c Only try to allocated properly aligned I/O segments. This should stop
some of the config problems that we've been seeing (where wi0 tries to
allocate 0x138-0x198, for example).

Use err(1,"foo") rather than perror + exit while I'm here.
2001-08-02 07:06:32 +00:00
Warner Losh
712f16e96c Have pccardd always ask the kernel for the IRQ to use. The kernel
will soon return the irq from the pcic bridge in cases where't that's
appropriate.

Note: I've had to disbale -I option for the moment.  I've made it easy
to reenable it for people that need it.

MFC After: soon!
2001-07-31 06:12:01 +00:00
Warner Losh
c5a7a65261 Improve wording for pccard memory assignement.
Document intended correct behavior for pccardc power and how it interacts
with suspend/resume.
2001-07-27 06:32:20 +00:00
David E. O'Brien
90e655ea4e Perform a major cleanup of the usr.sbin Makefiles.
These are not perfectly in agreement with each other style-wise, but they
are orders of orders of magnitude more consistent style-wise than before.
2001-07-20 06:20:32 +00:00
David E. O'Brien
ac24b049cc Remove GCC'isms in CFLAGS. 2001-07-20 04:23:13 +00:00
Dima Dorfman
f247324df7 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
Ruslan Ermilov
a4c37c816b mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 15:12:08 +00:00
Dima Dorfman
70d51341bf mdoc(7) police: remove extraneous .Pp before and/or after .Sh. 2001-07-09 09:54:33 +00:00
Dima Dorfman
a910f192bb Remove duplicate words. 2001-06-24 01:34:38 +00:00
Warner Losh
0becf102d7 Resetting using COR bit 7 appears to be bad on pci based systems.
#ifdef it out for now.
2001-06-04 07:41:05 +00:00
Warner Losh
56578b06a0 Add suggested parens around truth value. 2001-05-31 04:37:17 +00:00
Warner Losh
eae79da24b From the PR:
The PCCard daemon can hang indefinately while reading its
	configuration file. If the last line of the file is a comment line
	that does not end in a newline, the program goes into an infinite
	loop searching for the non-existent newline.

This fix, provided by the PR, will allow files ending without a newline
to be read without hanging.

Submitted by: Crist J. Clark <cjclark@alum.mit.edu>
PR: bin/25791
2001-05-30 21:45:50 +00:00
Duncan Barclay
3105a10149 Use constants in <pccard/cis.h> for scannign the memory window with.
Approved by:	imp
2001-05-07 21:58:31 +00:00
Duncan Barclay
05ce3194c4 Ensure that pccardd sets up memory windows correctly for drivers other
than if_ed. The code for if_ed to set the offset and memory width
remains.

Approved by:	imp
2001-05-07 21:56:57 +00:00
Duncan Barclay
dfb0b4cf55 Fix a minor printing bug that prints incorrect information for memory
block sizes.

This orginally worked in PAO-3 and worked on their r330 branch but got
broken in PAO-3 around December 1998!

Approved by:	imp
Obtained from:	PAO-3
2001-05-07 21:51:54 +00:00
Ruslan Ermilov
a381d6c906 Backout revision 1.6 (removed the NOSHARED bit.)
These must be compiled static so that it is possible
to use them early in the boot process.

Requested by:	imp
2001-04-02 08:47:25 +00:00
Ruslan Ermilov
393a5770a8 Removed the NOSHARED bit. 2001-04-02 07:27:46 +00:00