Commit Graph

163 Commits

Author SHA1 Message Date
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
Ruslan Ermilov
345e52e742 - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:42:20 +00:00
Ruslan Ermilov
c73e22c3d4 Set the default manual section for usr.sbin/ to 8. 2001-03-20 18:17:26 +00:00
Gary Jennejohn
27ba031dff Use vsnprintf in logmsg() to avoid overflowing the array on the stack.
The problem was noted with an older model 3Com 3C589 which seems
to return more than 256 bytes of data.
2001-02-25 19:52:42 +00:00
Ruslan Ermilov
8b5c4af3ff Prepare for mdoc(7)NG. 2000-12-27 15:30:30 +00:00
Toshihiko ARAI
05546286ff Fix output of -v option. 2000-12-24 15:30:36 +00:00
Ruslan Ermilov
f4d874a1db mdoc(7) police: do not split author names in the AUTHORS section. 2000-11-22 09:35:58 +00:00
Ruslan Ermilov
e97407b4f2 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 20:10:44 +00:00
Ruslan Ermilov
251c176f41 mdoc(7) police: use certified section headers wherever possible. 2000-11-17 11:44:16 +00:00
MIHIRA Sanpei Yoshiro
33eb563d67 add PC-Card melody beep(PC Card bus, kludge version)
Original idea from:	PAO3
2000-10-28 13:35:34 +00:00
MIHIRA Sanpei Yoshiro
2a2e255b8a add -I option, ``Don't get and use a list of free
IRQs from kernel.''..

With IBM ThinkPad600.  ``sio1'' was disabled in BIOS
and irq 3 was free (also not listed in dmesg), I think.
But I could not use irq 3 for PC-Card with new(PIOCSRESOURCE
ioctl enabled) pccardd.
2000-10-20 13:08:18 +00:00
MIHIRA Sanpei Yoshiro
49ff3907a6 cosmetic: resource -> res 2000-10-13 15:11:48 +00:00
MIHIRA Sanpei Yoshiro
29d26e2f27 print out error reason if it was failed in assign_io
Obtained from:	PAO3
2000-10-10 13:01:18 +00:00
Sheldon Hearn
2687ca9f97 Fix abuse of the Pa, Nm and Ar macros. This necessitated a rewording
of the description for the "power" internal command.

Reviewed by:	sanpei
2000-10-05 07:18:59 +00:00
MIHIRA Sanpei Yoshiro
6b164dd5b7 check {IO,IRQ}_ASSIGNED flags before
release {io,irq} resources.

fix multi io window in release io routine

PR:		20454
2000-10-04 15:22:09 +00:00
MIHIRA Sanpei Yoshiro
975ce2575a fix some minor problem in PIOCSRESOURCE ioctl.
- If resource which was allocated for pcic was
  requested via this ioctl, bus_alloc_resource
  would be succeeded and that resource was
  returned as free resource.  So check whether
  requested resource was used for pcic or not
  before bus_alloc_resource test.

- merge SYS_RES_IRQ routine into other SYS_RES_*
  routine and clean up.

problem reported by:	Yohei Terada <terada@jiro.c.u-tokyo.ac.jp>
2000-10-01 12:36:14 +00:00
MIHIRA Sanpei Yoshiro
45d54d7ee2 add ``check free resource rage code''
for PC-Card which has no address in cis.
2000-09-21 13:13:00 +00:00
MIHIRA Sanpei Yoshiro
7e30ab7168 fix previous PIOCSRESOURCE code in assign_card_index 2000-09-20 14:54:21 +00:00
MIHIRA Sanpei Yoshiro
ec2892ee0c pccard_beep parameter was already supported by rc.conf.
(removed in Rev.1.3)(A(B
2000-09-17 16:37:36 +00:00
MIHIRA Sanpei Yoshiro
5935ef4c44 add PIOCSRESOURCE(IOC_GET_RESOURCE_RANGE)
Now /usr/sbin/pccardd read free resource(io,irq) range with
this ioctl.

Original Idea from:	PAO3
2000-09-17 15:37:53 +00:00
Mitsuru IWASAKI
ca2df34a1c Fix typo (rc.conf -> pccard.conf).
Submitted by:	OKAZAKI Tetsurou <okazaki@be.to>
2000-09-15 19:17:40 +00:00
MIHIRA Sanpei Yoshiro
06f748444a fix multi io window patch(Rev. 1.48)
Submitted by:	iwasaki
Obtained from:	PAO3
2000-09-01 08:51:37 +00:00
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