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
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.
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.
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.
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!
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.
- 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>
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.
- 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
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
- 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
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
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)
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.
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.
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
change it w/out informing the program. Instead, use the (now available)
previous state returned by the kernel to make intelligent card
removal/insertion decisions.