summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pccard/pccardd
Commit message (Collapse)AuthorAgeFilesLines
* Update length more correctly when parsing a cis info field.imp2002-01-061-4/+11
| | | | | | | | | | | | | | | | | | 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 :-).
* Fix a bug about CIS string comparison. Pccardd should be able to distinguishiwasaki2001-11-291-0/+4
| | | | | | | | | | | 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
* Always set unit number to -1 unless some other unit is specified inimp2001-11-021-0/+1
| | | | | | | | 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>
* Don't core dump if we can't get the index automatically.imp2001-10-051-1/+2
| | | | Debug info from: Ben Hockenhull <benh@jpj.net>
* Change the access width of memory window from 8 bits to 16 bits.non2001-09-041-1/+1
| | | | | | | | 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
* Fix ISA machines. Also, make it possible for the new pccardd to runimp2001-08-191-40/+61
| | | | | | | | 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.
* Ask the kernel about IRQ 0 first. If the kernel responds with an IRQ,imp2001-08-142-20/+22
| | | | | | 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.
* Only try to allocated properly aligned I/O segments. This should stopimp2001-08-021-17/+12
| | | | | | | 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.
* Have pccardd always ask the kernel for the IRQ to use. The kernelimp2001-07-312-38/+47
| | | | | | | | | | 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!
* Perform a major cleanup of the usr.sbin Makefiles.obrien2001-07-201-2/+4
| | | | | 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.
* Remove whitespace at EOL.dd2001-07-152-5/+5
|
* mdoc(7) police: removed HISTORY info from the .Os call.ru2001-07-102-2/+2
|
* mdoc(7) police: remove extraneous .Pp before and/or after .Sh.dd2001-07-091-1/+0
|
* Remove duplicate words.dd2001-06-241-1/+1
|
* Resetting using COR bit 7 appears to be bad on pci based systems.imp2001-06-041-0/+2
| | | | #ifdef it out for now.
* Add suggested parens around truth value.imp2001-05-311-1/+1
|
* From the PR:imp2001-05-301-4/+2
| | | | | | | | | | | | | 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
* Use constants in <pccard/cis.h> for scannign the memory window with.dmlb2001-05-071-4/+4
| | | | Approved by: imp
* Ensure that pccardd sets up memory windows correctly for drivers otherdmlb2001-05-071-8/+36
| | | | | | | than if_ed. The code for if_ed to set the offset and memory width remains. Approved by: imp
* - Backout botched attempt to introduce MANSECT feature.ru2001-03-261-2/+1
| | | | - MAN[1-9] -> MAN.
* Use vsnprintf in logmsg() to avoid overflowing the array on the stack.gj2001-02-251-1/+1
| | | | | The problem was noted with an older model 3Com 3C589 which seems to return more than 256 bytes of data.
* Prepare for mdoc(7)NG.ru2000-12-271-1/+1
|
* Fix output of -v option.toshi2000-12-241-0/+1
|
* mdoc(7) police: use the new features of the Nm macro.ru2000-11-201-2/+2
|
* mdoc(7) police: use certified section headers wherever possible.ru2000-11-171-1/+1
|
* add -I option, ``Don't get and use a list of freesanpei2000-10-204-2/+11
| | | | | | | | | 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.
* cosmetic: resource -> ressanpei2000-10-131-14/+14
|
* print out error reason if it was failed in assign_iosanpei2000-10-101-3/+23
| | | | Obtained from: PAO3
* check {IO,IRQ}_ASSIGNED flags beforesanpei2000-10-041-3/+8
| | | | | | | | release {io,irq} resources. fix multi io window in release io routine PR: 20454
* fix some minor problem in PIOCSRESOURCE ioctl.sanpei2000-10-011-2/+2
| | | | | | | | | | | | | | - 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>
* add ``check free resource rage code''sanpei2000-09-213-10/+32
| | | | for PC-Card which has no address in cis.
* fix previous PIOCSRESOURCE code in assign_card_indexsanpei2000-09-201-7/+10
|
* add PIOCSRESOURCE(IOC_GET_RESOURCE_RANGE)sanpei2000-09-171-5/+36
| | | | | | | Now /usr/sbin/pccardd read free resource(io,irq) range with this ioctl. Original Idea from: PAO3
* Fix typo (rc.conf -> pccard.conf).iwasaki2000-09-151-1/+1
| | | | Submitted by: OKAZAKI Tetsurou <okazaki@be.to>
* fix multi io window patch(Rev. 1.48)sanpei2000-09-011-1/+1
| | | | | Submitted by: iwasaki Obtained from: PAO3
* Add UNIX domain socket feature to pccardd. This makes pccardume2000-08-205-11/+265
| | | | | | | related PAO3/ports such as gxcardmon work. Reviewed by: imp Obtained from: PAO3
* Add documentation on the new logstr command.imp2000-07-141-0/+17
|
* Add new keyword "logstr". By default, we now use syslog outselves toimp2000-07-143-9/+21
| | | | | | | | | | | | | | | | 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.
* Don't call syslog() without a format string.kris2000-07-121-1/+1
|
* MFPAO vis Iwasaki-san on the train from Tokyo to Osaka.imp2000-06-241-0/+16
| | | | | | | Document "reset", "iosize" and "memsize". The code for these was merged in some time ago. Reviewed by: iwasaki-san
* Fix building with -DDEBUG.roberto2000-06-183-3/+5
|
* Add regex(3) matching feature for card line strings.iwasaki2000-05-304-12/+82
| | | | | | | | | | | | | | - 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
* Add CIS string comparison function.iwasaki2000-05-171-2/+17
| | | | | | | | | 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
* When setting up an iomem resources, remember to set the MEM_ASSIGNED bitwpaul2000-05-091-0/+1
| | | | so that pccardd actually does something to set up the memory range.
* Add ioctl() in read_ether() so that pccardd ensure reading its etheriwasaki2000-05-041-0/+2
| | | | address from the attribute memory area.
* MFPAO3. Improvement of of pccard cis tuple parsing capability.iwasaki2000-04-263-122/+271
| | | | | | | | | - 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
* MFPAO3. Add support multi io window. This code support following cards;iwasaki2000-04-263-59/+97
| | | | | | | | | | | | 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
* Fix minor bugs.iwasaki2000-04-142-1/+10
| | | | | - reset line number when new file is included. - activate `-i' command lline option (specify available IRQ) again.
* Add restart capability by SIGHUP. On restart, working configurationiwasaki2000-04-084-6/+255
| | | | | | | | | | (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
* MFPAO: support wildcard entry for generic serial and fixediwasaki2000-04-056-11/+133
| | | | | | | | | 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
OpenPOWER on IntegriCloud