Commit Graph

120 Commits

Author SHA1 Message Date
Hajimu UMEMOTO
e0faad6850 Add UNIX domain socket feature to pccardd. This makes pccard
related PAO3/ports such as gxcardmon work.

Reviewed by:	imp
Obtained from:	PAO3
2000-08-20 16:16:57 +00:00
Warner Losh
4abef49222 Add documentation on the new logstr command. 2000-07-14 19:54:47 +00:00
Warner Losh
6c726135ad Add new keyword "logstr". By default, we now use syslog outselves to
log insert/remove events using the logstr, if specified for that card,
or the manufacturer + version strings from the cis if not.  This
eliminates the need to have logger in the pccard.conf file which makes
it easier to move pcardd to /sbin later if we need to.  This also
reduces the pccard.conf file size from 53k to 28k, which will help the
install disk a little.

Also, minor cleanup of free usage (if (x != NULL) free(x); is
identical to free(x); for all versions of C that we care about).

Reviewed by: iwasaki (who proposed the logstr keyword).

Documentation and fixes to pccard.conf to follow.
2000-07-14 19:46:35 +00:00
Kris Kennaway
9a47755d7c Don't call syslog() without a format string. 2000-07-12 01:43:55 +00:00
Warner Losh
097a95ebd9 MFPAO vis Iwasaki-san on the train from Tokyo to Osaka.
Document "reset", "iosize" and "memsize".  The code for these was
merged in some time ago.

Reviewed by: iwasaki-san
2000-06-24 05:51:35 +00:00
Ollivier Robert
61ea53372a Fix building with -DDEBUG. 2000-06-18 20:22:11 +00:00
Mitsuru IWASAKI
6ebef682a8 Add regex(3) matching feature for card line strings.
- This feature will be enabled only if the string is
   enclosed by '/' something like;
	card "SunDisk" "/.*/"
 - Also added matching additional information strings
   followed by version string.  This is for the card which is
   difficult to idendentify by only the manufacturer and
   card version strings matching.
	card "MACNICA" "MIRACLE SCSI" "mPS100" "D.0"

Reviewed by:	imp
Obtained from:	PAO
2000-05-30 15:33:56 +00:00
Mitsuru IWASAKI
83896393a6 Add CIS string comparison function.
This should solve tentatively the pccardd core dump problem when
there's no CIS (likely CardBus cards).
Later, this function will have regex CIS string comparison capability
too.

Obtained from:	PAO
2000-05-17 18:29:17 +00:00
Bill Paul
2aea9e28cb When setting up an iomem resources, remember to set the MEM_ASSIGNED bit
so that pccardd actually does something to set up the memory range.
2000-05-09 22:01:16 +00:00
Mitsuru IWASAKI
10e6817efc Add ioctl() in read_ether() so that pccardd ensure reading its ether
address from the attribute memory area.
2000-05-04 15:38:18 +00:00
Mitsuru IWASAKI
1f4b0b5767 MFPAO3. Improvement of of pccard cis tuple parsing capability.
- Fixed bogus CIS tuple dumping (Network node ID, IRQ modes and etc.)
 - Include telling drivers ethernet address if Network node ID
   tuple is available.  This is usefull for some bogus ehter cards which
   can't get correct ethernet address from CIS tupple.

Obtained from:	PAO3
2000-04-26 15:36:43 +00:00
Mitsuru IWASAKI
b254720a71 MFPAO3. Add support multi io window. This code support following cards;
Accton UE2212
	PLANET-SMART-COM-CREDITCARD-2000
	Melco LPC-T
	ME-3000II
	Laneed LD-CDY
	Melco LPC3-TX

Submitted by:	MIHIRA Sanpei Yoshiro <sanpei@sanpei.org>
Obtained from:	PAO3
2000-04-26 15:11:17 +00:00
Mitsuru IWASAKI
44e02d51e5 Fix minor bugs.
- reset line number when new file is included.
 - activate `-i' command lline option (specify available IRQ) again.
2000-04-14 18:04:15 +00:00
Mitsuru IWASAKI
83471a4c3c Add restart capability by SIGHUP. On restart, working configuration
(resource and card configuration being used) is to be maintained for
consistency.  Part of resource pool re-initialization would be rewrite
later using on Warner-san's hints driver API :-)

Reviewed by:    nate, imp and -nomads ML in Japan.
Obtained from:  http://www.freebsd.org/~iwasaki/pccard/pccardd-signal.diff
Commited at:    BSD HANAMI Party 2000 in Japan
2000-04-08 05:19:44 +00:00
Mitsuru IWASAKI
1ea7ed21c8 MFPAO: support wildcard entry for generic serial and fixed
disk as fallthrough entry.

Submitted by:	MIHIRA Sanpei Yoshiro <sanpei@sanpei.org>, iwasaki
Reviewed by:	imp, -mobile ML and nomads ML in Japan
Obtained from:	http://www.freebsd.org/~iwasaki/pccard/pccardd-generic.diff
		http://home.jp.freebsd.org/~sanpei/4-current/usr.sbin-pccard-pccardd.diff
2000-04-05 18:39:21 +00:00
Mitsuru IWASAKI
891c44eae2 - default config file changed from /etc/pccard.conf to
/etc/defaults/pccard.conf in pccardd. But system default pccardd
  config file is still /etc/pccard.conf.sample specified in /etc/rc.conf
  for the testing this changes.
- improved `include' keyword function for error handling.
- now that resource pool (io, irq, mem) can be overridden.
- pccard config entries is searched following the first match rule if
  there are more than two entries which have the same card identifier.

Note that the /etc/defaults/pccard.conf related files is not committed
at this time, will come a week later.  I'll prepare the test version
of /etc/defaults/pccard.conf, /etc/pccard.conf and other files soon.

Reviewed by:	imp and nomads in Japan.
2000-03-30 16:01:37 +00:00
Sheldon Hearn
f2e366a105 Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-01 14:09:25 +00:00
Mitsuru IWASAKI
41c8853867 Merge from PAO; Add new keywords for pccard.conf, auto and default.
This will help importing pccard entries (and users :) from PAO
into -CURRENT.
2000-01-26 17:54:00 +00:00
Mitsuru IWASAKI
29d1eb210d Merge from PAO3 -- Quick fix a bug which assign_driver() checks wrong
member variable to find the configuration on new driver allocation.
Correct condition is that card_config and driver are not in use.  Both
of them are cleared in card_removed() (conf->driver->card never be
cleared).

This fix problems `No free configuration for card' on insertion, and
pccardd core dump on removal in condition of the same driver but
different card.

Also this might be emergency measures, complete solution would be made
after Hosokawa-san come back.

Consulted with:	imp
Waiting for:	hosokawa
2000-01-24 13:15:05 +00:00
Tatsumi Hosokawa
eac3536941 Added "attr2" MAC address encoding (used by Megahertz Ethernet Card)
support.

Reviewed by:	Warner Losh <imp@village.org>
Obtained from:	PAO
2000-01-21 09:12:00 +00:00
Tatsumi Hosokawa
a7da6b679e This fixes a bug that /etc/pccard_ether did not work without DHCP.
For example, when /etc/pccard.conf had ed0 in config line, but kernel
refused this name and said

devclass_alloc_unit: ed0 already exists, using next availale unit
number

Kernel used ed1 as device name and it did not match with config and
insert/remove lines.  Fortunately, dhclient was called without args,
and it works, but if we wanted to use static IP address for PC-card,
it did not work.

This modification makes pccardd to execute insert/remove lines with
the true device name that returns from kernel.  (Last change to
etc/pccard.conf.sample eliminated all hardwired device name from
insert/remove lines in /etc/pccard.conf)
2000-01-16 06:44:48 +00:00
Marcel Moolenaar
c292cf660e Remove -g compiler flag. 2000-01-03 12:01:30 +00:00
Warner Losh
17c770d7e5 Version 1.16 was a bad change, so revert it. 1999-12-08 18:12:02 +00:00
Warner Losh
f077fb2703 If last state was supended, remove the card. This is a kludge, there
is a race here that the old code didn't deal with, and I'm not
completely sure this is the right way to solve it, but it works here.

Should get rid of the dreaded "No free configuration for card" message.
1999-12-08 07:47:41 +00:00
Warner Losh
87db5eaa0d Bump CIS_MAXSTR from 30 to 254. pccard appears to define the entire
section we take them from to be up to 255 bytes long, so that's the
max size for the string.  They can't all be this big, but I don't have
a better number and better to be a little long than a little short.

Also only consume len characters of the cis buffer so we don't run off
the end into the next buffer and get garbage.  This second patch
shouldn't impact anything, but I'll hold off back porting this to
-stable until I get more reports on the stability before/after this
fix.
1999-12-07 19:23:56 +00:00
Warner Losh
677c39ac03 Fix typo from last commit.
Noticed by: Maxim Sobolev <sobomax@altavista.net>
1999-12-02 19:31:28 +00:00
Warner Losh
8622777b8e Forgotten part of pccardc power command 1999-12-02 05:56:36 +00:00
Warner Losh
78944e7259 Implement pccardc power command. This allows one to power off
individual slots at one's whim.  Useful for turning the slots into
card carrying cases, etc.  Patch was originally from mihira-san in
message to freebsd-mobile.  He ported the code originally from PAO.

Submitted by: MIHIRA Sanpei Yoshiro <sanpei@sanpei.org>
1999-12-02 05:52:58 +00:00
Peter Wemm
97d92980a9 $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
Tatsumi Hosokawa
0e568d4b12 Added "include" feature to pccard.conf to put the default pccard.conf
entries in /etc/defaults/.
1999-08-17 03:38:51 +00:00
Warner Losh
673b7bf483 o Add "debuglevel" keyword to config file.
o Document debug level keyword
o Implement debug level:
	o For most of the diagnostic messages, change them from #ifdef DEBUG
	  to if (debuglevel > 0).
	o Add a couple more diagnostic messages that weren't present before
	o Fix a couple of excessively long lines.
Reviewed by: hosokawa-san

o Start to implement the stopgap kludge for -current's pccard code by passing
  the length of the i/o range.  If DEV_DESC_HAS_SIZE is defined, we'll set
  the size.  This is done as an ifdef so that I can generate patches
  against the kernel more easily.
o Add preliminary support for tweaking sleep times, but leave it
  disabled until a good range of values can be established.

Didn't fix: logmsg problem noted by Nate.
1999-08-01 18:04:26 +00:00
Tatsumi Hosokawa
bcb5ab3765 Set correct "flags" value when pccardd allocates/initializes driver. 1999-07-23 14:58:33 +00:00
Tatsumi Hosokawa
f22ff34fba Removed a very very old hack (I disabled it in PAO long time ago)
that existed in original PC-card driver for FreeBSD 2.0 (maybe).
This prevents from utilizing flags for drivers.
1999-07-23 08:53:20 +00:00
Tatsumi Hosokawa
1b19dea47d Sorry, I forgot to test "iosize auto" before merging "iosize" patch. 1999-07-23 02:01:19 +00:00
Tatsumi Hosokawa
6886e4d9be Inappropriate commment for -i option. 1999-07-23 01:46:47 +00:00
Tatsumi Hosokawa
35e42bac95 Added "iosize" directive in /etc/pccard.conf
Allocate free I/O window with given size to card.

(example)
# IBM PCMCIA Ethernet I/II
card "IBM Corp." "Ethernet"
	config	0x1 "ed0" ?
	iosize	32
	ether	0xff0

(it's currently only useful for externalizing hacks for broken CIS cards,
 but it will play an important role with "function" directive I'm planninng
 to merge)

Reviewed by:	freebsd-mobile list
Obtained from:	PAO3's "cardio" directive
1999-07-23 01:33:34 +00:00
Tatsumi Hosokawa
bff5ef3ac9 Release IRQ allocated dynamically. 1999-07-23 00:12:22 +00:00
Warner Losh
c0c4dbc6d4 Fix a dangling else warning from new egcs. 1999-07-15 03:04:31 +00:00
Nik Clayton
414a35e60a Add $Id$, to make it simpler for members of the translation teams to
track.

The Id line is normally at the bottom of the main comment block in the
man page, separated from the rest of the manpage by an empty comment,
like so;

     .\"    $Id$
     .\"

If the immediately preceding comment is a @(#) format ID marker than the
the $Id$ will line up underneath it with no intervening blank lines.
Otherwise, an additional blank line is inserted.

Approved by:            bde
1999-07-12 20:12:29 +00:00
Tatsumi Hosokawa
0f1bf4524a pccard_beep parameter is not supported by rc.conf and rc.pccard of -current.
(I'll port it later...)
1999-06-30 04:16:08 +00:00
Tatsumi Hosokawa
04b21fd64b Added -z and -i option. 1999-06-30 03:49:30 +00:00
Tatsumi Hosokawa
3e478b3901 FreeBSD does supports LKM now.
PR: doc/10331
Reviewed by: mpp@freebsd.org
Submitted by: Andreas Gustafsson <gson@araneus.fi>
1999-06-29 23:59:15 +00:00
Mike Pritchard
25b6a7d131 Minor mdoc fix. 1999-06-26 23:16:40 +00:00
Mark Murray
9c0592b821 More uncontroversial PAO updates. Make the IRQ wildcarding work a lot better,
and improve the daemonizing code.

Submitted by: Tatsumi HOSOKAWA
1999-06-17 21:07:59 +00:00
Jun Kuriyama
e948f24a53 Fix typo.
Submitted by:	Hiroki Sato <hrs@geocities.co.jp>
1999-05-10 22:01:38 +00:00
Jun Kuriyama
86779ad4dd Activate pccardc.8. 1999-05-03 11:20:15 +00:00
Jun Kuriyama
8c4110d213 New translation of pccardc.8.
Obtained from:	PAO (written in Japanese)
Reviewed by:	bsd-nomads@clave.gr.jp
		freebsd-mobile@freebsd.org
		Randy Bush <randy@psg.com>
		Bill Trost <trost@grey.cloud.rain.com>
		Bruce Campbell <bc@apnic.net>
1999-05-02 16:33:13 +00:00
Warner Losh
f229c04eef When printing out V1 info, make sure that there is additional info
before printing it.  Terminate when we come to a 0xff byte.  This
allows there to be zero or more additional info fields printed
correctly.  Before, the old code would print bogons or dump core when
presented with this case.

I don't know what the spec says about this, exactly, but this allows
me to do a dumpcis of my non-ATA AMP 4M FLASH cards w/o pccardc
dumping core.
1999-03-13 04:41:35 +00:00
Jun Kuriyama
7164b74e64 Cleanup usage of err() and warn().
Add error handling for ioctl().

Reviewed by:	-current
Obtained from:	PAO
1999-02-27 12:08:02 +00:00
Jun Kuriyama
f1165987f1 Add "beep" subcommand.
Obtained from:	PAO3
Reviewed by:	-current list
1999-02-13 11:32:01 +00:00