Commit Graph

10342 Commits

Author SHA1 Message Date
Poul-Henning Kamp
a09aaeaa0f Initialize bp->b_offset and remove comment about B_PHYS. 2003-10-18 11:02:24 +00:00
Mark Murray
8f559ca08e Mark as __unused some arguments that are, erm, unused. 2003-10-18 09:16:01 +00:00
Poul-Henning Kamp
74d87364e1 Rearrange the deck-chairs while we wait for scottl to GEOMify RF. 2003-10-18 08:58:35 +00:00
Hidetoshi Shimokawa
e9e688e243 Add SBP-II target mode driver.
Though this is still incomplete and has some missing features such as
exclusive login and event notification, it may be enough for someone
who wants to play with it.

This driver is supposed to work with firewire(4), targ(4) of CAM(4)
and scsi_target(8) which can be found in /usr/share/example/scsi_target.
This driver doesn't require sbp(4) which implements initiator mode.

Sample configuration:

Kernel: (you can use modules as well)
device	firewire
device	scbus
device	targ
device	sbp_targ

After reboot:
# mdconfig -a -t malloc -s 10m
md0
# scsi_target 0:0:0 /dev/md0
(Assuming sbp_targ0 on scbus0)

You should find the 10MB HDD on FreeBSD/MacOS X/WinXP or whatever connected
to the target using FireWire.

Manpage is not finished yet.
2003-10-18 05:41:31 +00:00
Hidetoshi Shimokawa
5217c8c293 - Call sbp_reset_start() for mgm timeout.
- Change type of target->luns to allocate an array of LUNs dynamically.
	This allows targets to change their number of LUNs after each bus reset.
- Serialize ORB POINTER command for each LUN.
- Improve debug messages.
2003-10-18 04:59:47 +00:00
Sam Leffler
4bc0e754ee o consolidate rx filter calculations in one place
o enable beacon reception when operating in adhoc mode
  so the 802.11 layer can use them to create nodes for peers
2003-10-17 21:58:39 +00:00
Sam Leffler
fe32c3ef01 indicate device receives all management frames 2003-10-17 21:55:53 +00:00
Scott Long
3df780cf76 Fix a couple of bugs with AIF handling:
- Correct the logic for the AIF array index pointers so that correct slot is
   always looked at.
 - Copy the full FIB payload size when copying AIF's, not just the first 64
   bytes.

Thanks to Mirapoint, Inc, for pointing these problems out and offering a
solution.
2003-10-17 21:44:06 +00:00
Sam Leffler
00a12f3ae7 o correct handling of a frame that has too many segments to fit in the
tx descriptor array
o while here fix a whitespace nit

Obtained from:	NetBSD
2003-10-16 16:13:11 +00:00
Paul Saab
79adbf76d0 Print the correct logical drive lun number returned by the controller. 2003-10-15 18:52:44 +00:00
Takeshi Shibagaki
5141386c7b Add Allied Telesis SIC-AT boards support.
Discussed in from [FreeBSD-tech-jp 3396] to [FreeBSD-tech-jp 3407]
at FreeBSD-tech-jp@jp.freebsd.org.

NOTE: We must put ed_probe_SIC() function into if_ed_isa.c because
      this is a bus dependent code. But the ed driver code is not
      separated explicitly whether it is bus dependent or independent
      now.

Refer to: http://plaza17.mbn.or.jp/~chi/myprog/FreeBSD/sicat.html
Submitted by: chi@bd.mbn.or.jp (Chiharu Shibata)
2003-10-15 17:22:15 +00:00
Daniel Eischen
0bea487cfa Add a wrapper for a function that takes and releases the adapter
lock around a call to the original function.  Make the timeout
function in callout_reset() use the wrapped function to avoid a
lock assertion panic.

Reviewed by:	sam
Reported by:	cgiordano@ids.net
2003-10-15 05:34:41 +00:00
Sam Leffler
f0b2a0beb6 o convert mutex calls to #defines for portability, etc.
o destroy mutex's on detach (was missing)
2003-10-14 22:51:45 +00:00
Scott Mitchell
846b8315a2 Major update to xe driver:
- Make multicast work
- Fix (some of) the watchdog timeouts after card reset
- Add support for CE2, CEM28 and CEM33 cards
- General code cleanup

Any card that worked previously should still work, as well as a lot that
didn't.

The driver is not yet style(9) compliant; those changes are forthcoming,
once the functional changes are done.

PR:		kern/50644
Reviewed by:	imp
Approved by:	imp
2003-10-14 22:51:35 +00:00
Søren Schmidt
a827a5ff6a Reintroduce the "recovered from lost interrupt" code, but in a new
(hopefully) panic safe way.

Why the interrupts are lost is still a mystery, to me at least.
2003-10-14 16:53:13 +00:00
Warner Losh
11a3320287 Fix a race condition in owi. If you eject a card, then the wi_inquire
timeout would continue to happen: boom!  Fix this[*] by timing out earlier.

[*] almost fixes the race on unload: wi_inquire could be running when
untimeout is called, and there's no way to know when it has actually
returned.  This race is very rare and hard to lose.

Submitted by: scottl
2003-10-14 05:25:31 +00:00
Sam Leffler
7d4bf9ccb1 remove dangling mtx_unlock orphaned by rev 1.21 change 2003-10-13 04:57:31 +00:00
Sam Leffler
91101a2af3 Reduce per-packet overhead when using WEP by using an advancing IV
seeded with arc4random rather than calling arc4random for each
packet.  Note this is the same algorithm used to select the IV when
doing WEP on the host.
2003-10-13 03:42:53 +00:00
Sam Leffler
167ecdca8c Must reset the pointer to the 802.11 header after prepending
for WEP in case the prepend addes a new mbuf.  This fixes WEP.
2003-10-13 03:41:32 +00:00
Sam Leffler
2075afba8d MFp4:
o don't grab the mutex at the top of ath_detach; it does nothing
  useful
o deal with entry to ath_ioctl during detach to disable promiscuous
  mode as a result of calling bpfdetach2: cannot call ath_init when
  the device is marked invalid as the code isn't prepared to deal
  with it (in particular by that time the hal reference may have
  been yanked)
2003-10-13 03:39:38 +00:00
Sam Leffler
310e4a4ae6 MFp4:
change ath_rate_ctl_reset to handle transition from station
mode to adhoc mode; was not resetting the initial xmit rate
causing outbound frames to be dicarded
2003-10-13 03:37:38 +00:00
Bernd Walter
8b43efbd44 Cache dev_t values in the right structure.
Tested by:	Jay Cornwall <jay@evilrealms.net>
2003-10-12 15:51:40 +00:00
Søren Schmidt
ffd08d59ae Redo the code that handles eject/close. 2003-10-12 13:11:57 +00:00
Søren Schmidt
15749e8d06 Avoid potential race on ATA_R_DONE. 2003-10-12 12:38:03 +00:00
Søren Schmidt
c4c8a3e041 Put devices into sleep mode (ie spin down) on detach. 2003-10-12 12:37:11 +00:00
Søren Schmidt
f27b8b8ad4 Up timeout to 10s (from 5) in r/w commands. 2003-10-12 12:35:44 +00:00
Dag-Erling Smørgrav
5197cdc1aa Recognize the Avance Logic ALC655 codec found on some ICH4/5-based
motherboards, such as the Gigabyte I848P.

PR:		kern/54176
Submitted by:	Chris Keladis <chris@cmc.optus.net.au>
Forgotten by:	orion
2003-10-12 11:51:24 +00:00
Dag-Erling Smørgrav
7847079929 A couple of months' worth of back-burner hacking: restructure to better
handle the minor (but significant) differences between the various
Vortex chips; add (incomplete) support for playback.
2003-10-12 11:33:39 +00:00
Søren Schmidt
61dbcc0d05 Use isprint instead of isalpha in determining valid ident string. 2003-10-12 11:10:41 +00:00
Stefan Eßer
66f314b5f2 The code that was meant to test alignment of the register offset
parameter in the read and write case dereferenced an unitialized
pointer and can't possibly ever have catched an actual invalid
argument.

This was apparently true for the read/write and getconf cases. The
latter does not even receive the paramter that is to be verified.

I'm surprised that this did not cause kernel panics, but it seems
that the uninitialized local variable happens to contain data that
may be used as a pointer to memory that satisfies the test condition.

Make the code work as intended by moving the test inside the switch
case where the pointer has been properly initialized.

Since the read and write case shared just about all code (except
for the single call to PCIB_READ_CONFIG resp. PCIB_WRITE_CONFIG) I
have merged both cases.

Noticed by:	trhodes@FreeBSD.org (Tom Rhodes)
2003-10-11 22:20:34 +00:00
Sam Leffler
7f59ff24d8 locking fixups:
o correct recursive locking when polling and in em_82547_move_tail
o destroy mutex on detach
o add EM_LOCK_ASSERT and similar macros for creating+deleteing the mtx

Submitted by:	Daniel Eischen <eischen@vigrid.com>
2003-10-10 23:14:21 +00:00
Paul Saab
6728a38bf2 crashdump support.
Some bits by:	Rajesh Prabhakaran <rajeshpr@lsil.com>
2003-10-10 22:49:40 +00:00
Bruce M Simpson
c3f4241601 Add the Intersil Prism2/Atmel device. These particular devices are strange
beasts which are reported to exist in both Atmel and Prism2 flavours. In
particular, Itronix branded laptops have the Atmel part with an Intersil
radio.

Obtained from:	NetBSD
2003-10-10 21:01:00 +00:00
Poul-Henning Kamp
47850d0ae7 Sanitize the code relating to the /dev/ti%d entries. In particular evict
the evil vnode sniffing code and use destroy_dev() instead.
2003-10-10 20:35:28 +00:00
Bruce M Simpson
d7a65264fd Add the Actiontec 801UAT1/HWU01170-01 802.11b USB Wireless Ethernet adapter. 2003-10-10 16:04:21 +00:00
Søren Schmidt
82681884cf Restore transfermode on devices after reinit. 2003-10-10 11:03:27 +00:00
Søren Schmidt
6235c1f6ae Dont store ata_params for devices that return a bogus ident string. 2003-10-10 11:00:06 +00:00
Søren Schmidt
fa9dc8d090 Fix the bug that prevented DMA from working on old Acer chips.
Found by: Andrew Gallatin <gallatin@cs.duke.edu>
Pointy hat to: sos
2003-10-09 14:33:06 +00:00
Sam Leffler
17b667019e Add symmetric crypto support for the 7955 and 7956.
Note performance is currently suboptimal.

Submitted by:	Rajesh Vaidyanath <RVaidyanath@hifn.com>
2003-10-08 20:25:47 +00:00
Warner Losh
146143aa36 Xircom Wireless Ethernet card is a rebadged Cisco 340, but with a
different vendor id/product id.

Submitted by: Keith Davis
2003-10-08 01:20:00 +00:00
Warner Losh
58bad99209 sync to 1.73 2003-10-08 01:16:07 +00:00
Warner Losh
e9732b5260 Xircom Wireless ethernet
Submitted by: Keith Davis
2003-10-08 01:15:41 +00:00
Søren Schmidt
ebac4a7b77 Give more correct params to busdma_* 2003-10-07 13:48:55 +00:00
Søren Schmidt
b0f747d57e Improve timeout handling and reporting. 2003-10-07 13:47:40 +00:00
Søren Schmidt
f313fea97d Properly get out of transaction() if setting up the transfer fails. 2003-10-07 13:45:56 +00:00
Søren Schmidt
e203a01fad In case we loose a device during reset in reinit() finish off
the request with error instead of loosing it.
2003-10-07 13:44:15 +00:00
Max Khon
7ea199a777 Assign keycodes for Power, Sleep and Wake keys.
Submitted by:	Eugene Grosbein <eugen@grosbein.pp.ru>
2003-10-07 09:21:59 +00:00
Warner Losh
a1721d84eb Card type stuff was backwards, so assume io for the moment. mem needs
a lot of help and with luck bms will help me fix that.
2003-10-07 04:29:04 +00:00
Warner Losh
d25d7d01be Include pccard/pccard_cis.h here too 2003-10-07 04:26:14 +00:00
Warner Losh
4ea2d18aa4 remove obsolete quirks for cardbus cis. none have proven to be needed. 2003-10-07 03:40:17 +00:00
Warner Losh
13d07a4669 Add new file for definitions of CIS. We can share this with cardbus.
the filename isn't that bad, because all of these are defined in the
PC Card standard :-)
2003-10-07 03:35:48 +00:00
Warner Losh
a294cdb6b5 o move the cis tuple definitions into a common file.
o minor optimization of cardbus_cis processing.  Remove a bunch of generic
  entries that are handled by generic.
o no longer need the card_get_type stuff.
2003-10-07 03:33:54 +00:00
Warner Losh
0d5500e4aa These aren't needed anymore 2003-10-07 02:51:50 +00:00
John Baldwin
5e7c50d04d Remove prototype for decode_tuple_copy() which was axed in the last
revision to fix compile.
2003-10-06 21:21:55 +00:00
Warner Losh
f6e01094a4 remove the cardbus cis reading code. nobody ever used it and it has
locking issues down to the api level.
2003-10-06 15:56:29 +00:00
Hidetoshi Shimokawa
bdc0dba68b - Introduce hw.firewire.hold_count sysctl MIB by popular demand.
This MIB specifies how many bus resets should be observed before the
lost device entry is removed. The default value is 3.
You can set this value to 0 if you want a SBP device to be detached from CAM
layer as soon as the device is physically detached like USB.
2003-10-06 07:17:43 +00:00
Warner Losh
d266c2db1c refactor how we do the quirk matching. this puts an ugly if into a
routine of its own, and allows us to move the indentation back two
layers making the code more readable.

delete a prototype that should have been killed years ago in pccardvar.h.

# adding quirks here is way harder than it needs to be. :-(
2003-10-06 07:17:20 +00:00
Warner Losh
6ea91a6bcb Remove the cis reading bus methods. They were never implemented and
there's been some critism about the API not being lock friendly.
2003-10-06 07:10:40 +00:00
Hidetoshi Shimokawa
cb987496a3 - Implement sbp_poll() to enable kernel dump on SBP-2 device. 2003-10-06 05:40:47 +00:00
Hidetoshi Shimokawa
baaf74b248 - Fix timeout for unodered excution.
In unodered excution case, we cannot detect link-chain end only
	by prev == NULL if lastest ORB is executed earlyer than the former
	ORBs. Use ORB_LINK_DEAD flag for this case.

- Don't reset agent for management ORB.
- Improve debug messages.

Spotted by: sbp target mode
2003-10-06 03:44:37 +00:00
Sam Leffler
abb62a415d include the DS element in beacons 2003-10-06 00:45:25 +00:00
Martin Blapp
87f4fa1512 Ignore CSR13, CSR14, CSR15 'Media Specific Data' registers
for 21143 based cards which use SIA mode.

This fixes 10mbit mode for ZNYX ZX346Q cards and other
21143 based cards.

PR:		32118
Submitted by:	Rene de Vries <rene@tunix.nl>
		Geert Jan de Groot <GeertJan.deGroot@tunix.nl>

Obtained from:	BSDI

MFC after:	2 weeks
2003-10-05 19:57:10 +00:00
Warner Losh
3bb2d995f0 sync to 1.140 2003-10-05 18:59:09 +00:00
Warner Losh
bb0cd662ca 2662W-AR Wireless Adapter
Submitted by: Stuart Walsh <stu@ipng.org.uk>
2003-10-05 18:58:37 +00:00
Bruce M Simpson
ea5c2ab712 Correct a typo on line 552 of revision 1.92 which was breaking GENERIC:-
_FreeBSD_version should be __FreeBSD_version.
2003-10-05 06:06:09 +00:00
Josef Karthauser
272487f507 Make it easier to run this code on RELENG_4.
Submitted by:	luoqi
2003-10-04 22:13:21 +00:00
Josef Karthauser
cd719b55bd Make it easier to run this code on RELENG_4.
Submitted by:	luoqi
2003-10-04 21:41:01 +00:00
Eric Anholt
7efb14ccd3 Make the i810 AGP device create a "drmsub" child device. This will be attached
to by the DRM for i8xx devices.

Submitted by:	Keith Whitwell <keith@tungstengraphics.com>
2003-10-02 19:49:15 +00:00
Hidetoshi Shimokawa
c44a734c56 Remove wrong usage of BUF_REFCNT().
Spotted by: phk
2003-10-02 14:33:30 +00:00
Nate Lawson
8525ffefc2 If requested to Sleep for less than our hz granularity (e.g., 10 ms),
use DELAY instead of tsleep.

Submitted by:	peter
2003-10-02 05:09:37 +00:00
Hidetoshi Shimokawa
c4778b5d1c MFp4: Change struct fw_xfer to reduce memory copy in fwmem_*() functions.
And many changes.

* all
	- Major change of struct fw_xfer.
		o {send,recv}.buf is splitted into hdr and payload.
		o Remove unnecessary fields.
		o spd is moved under send and recv.
	- Remove unnecessary 'volatile' keyword.
	- Add definition of rtcode and extcode.

* firewire.c
	- Ignore FWDEVINVAL devices in fw_noderesolve_nodeid().
	- Check the existance of the bind before call STAILQ_REMOVE().
	- Fix bug in the fw_bindadd().
	- Change element of struct fw_bind for simplicity.
	- Check rtcode of response packet.
	- Reduce split transaction timeout to 200 msec.
		(100msec is the default value in the spec.)
	- Set watchdog timer cycle to 10 Hz.
	- Set xfer->tv just before calling fw_get_tlabel().

* fwohci.c
	- Simplifies fwohci_get_plen().

* sbp.c
	- Fix byte order of multibyte scsi_status informations.
	- Split sbp.c and sbp.h.
	- Unit number is not necessary for FIFO¤ address.
	- Reduce LOGIN_DELAY and SCAN_DELAY to 1 sec.
	- Add some constants defineded in SBP-2 spec.

* fwmem.c
	- Introduce fwmem_strategy() and reduce memory copy.
2003-10-02 04:06:56 +00:00
Bernd Walter
1313b38492 Fix indention
Noticed by:	johan
2003-10-01 14:49:53 +00:00
Bernd Walter
a244477908 Don't call makedev().
Cache result of make_dev() and use it when calling destroy_dev().
2003-10-01 13:53:51 +00:00
Søren Schmidt
6d92de35c9 Fix the problem with accessing certain FLASH devices. The problem
was that accessing the status reg could occour too fast, confusing
the logic in the flash part. Could not have been located without:

HW donated by: Jonas Bülow <jonas@servicefactory.se>
2003-10-01 09:58:19 +00:00
Hidetoshi Shimokawa
c727011a76 Fix a bug in fwdev_clone().
Spotted by: grog
2003-10-01 06:04:30 +00:00
Nate Lawson
ae0781a1cb Revert 1.24. It causes a hang on shutdown for Marcel. This is due to
AcpiEnterSleepState() calling a long AcpiOsStall() with interrupts
disabled.  This fix will instead be added to ACPI-CA.

PR:
Submitted by:
Reviewed by:
Approved by:
Obtained from:
MFC after:
2003-09-30 19:12:37 +00:00
Scott Long
9f099823a1 Use a dynamic major assignment for the raidctl device. 2003-09-29 14:14:35 +00:00
Scott Long
c567467af2 Eliminate the use of a statically assign major number for the aac device. 2003-09-29 14:10:04 +00:00
Greg Lehey
be0dabc1bc If we fail to complete configuring a subdisk because of some error,
make sure we return any allocated space to the drive.  This should get
rid of a number of inconsistencies (hopefully all) that have been seen
after configuration errors.
2003-09-29 08:50:03 +00:00
Greg Lehey
692db2e5c9 Revert last commit. It built the kernel module just fine, but broke
world in /sbin.

Reported by:	erwin
Pointy hat to:	grog
2003-09-29 08:19:06 +00:00
Nate Lawson
b22df41bbd If asked to stall for more than 100 us (which is specified as the max in
the ACPI standard), call sleep instead since that is probably what the
caller meant.

Mentioned by:		peter
2003-09-29 07:29:26 +00:00
Greg Lehey
2b0761b360 Remove calls to makedev. They were never needed.
Requested by:	phk
Explained by:	rwatson
2003-09-29 03:16:20 +00:00
Poul-Henning Kamp
ed692400eb I don't know from where the notion that device driver should or
even could call VOP_REVOKE() on vnodes associated with its dev_t's
has originated, but it stops right here.

If there are things people belive destroy_dev() needs to learn how to
do, please tell me about it, preferably with a reproducible test case.

Include <sys/uio.h> in bluetooth code rather than rely on <sys/vnode.h>
to do so.

The fact that some of the USB code needs to include <sys/vnode.h>
still disturbs me greatly, but I do not have time to chase that.
2003-09-28 20:48:13 +00:00
Marcel Moolenaar
6dcf0a53d2 Don't explicitly initialize d_maj in the cdevsw with MAJOR_AUTO, as
per the intentions of conf.h, rev 1.176. This change is a no-op as
MAJOR_AUTO equals to 0.
2003-09-28 18:20:42 +00:00
Bruce Evans
90796c0860 Removed some nearly dead code in comparam(). We don't need to recover
from fiddling with CS_TTGO since fiddling with CS_TTGO was removed in
rev.1.218 of the i386/isa version (which was merged with loss of history
in rev.1.223 of this version).
2003-09-28 13:12:26 +00:00
Jake Burkholder
2eaa495767 Set the baud rate to 1200 if the device is a keyboard. 2003-09-28 07:06:34 +00:00
Jake Burkholder
278667afab Only create the ofwcons device nodes if it has been initialized, not
just probed.
2003-09-28 06:51:47 +00:00
Jake Burkholder
5dbb062210 Make ofw_console a low priority console device, so that uart will be
preferred in all cases, even if the "remote" bit is not set.
2003-09-28 05:38:37 +00:00
Paul Saab
786a9b65a9 Typo when setting wirespeed. || != |
Found by:	jake
2003-09-28 04:16:16 +00:00
Bruce Evans
fa2e26c437 MFsio (sio.c 1.413: cleaned up and fixed setting of speeds in comparam()).
This is just a cleanup here (modulo rev.1.108 of kern/tty.c), since the
input speed can be different from to output speed and extra code to
handle both speeds naturally handled all cases.
2003-09-27 12:40:23 +00:00
Poul-Henning Kamp
36449dc48e Return ENOIOCTL for unknown ioctls, don't use noioctl to return ENODEV. 2003-09-27 12:27:23 +00:00
Poul-Henning Kamp
70cd771337 The present defaults for the open and close for device drivers which
provide no methods does not make any sense, and is not used by any
driver.

It is a pretty hard to come up with even a theoretical concept of
a device driver which would always fail open and close with ENODEV.

Change the defaults to be nullopen() and nullclose() which simply
does nothing.

Remove explicit initializations to these from the drivers which
already used them.
2003-09-27 12:01:01 +00:00
Bruce Evans
5da172697f Cleaned up and fixed setting of speeds in comparam():
- Removed conversion of a zero input speed to the output speed.  This
  has been done better in ttioctl() since rev.1.108 of kern/tty.c
  almost 5 years ago.  comparam() did the conversion incompletely for
  the case where the output speed is also zero.  It had complications
  to avoid using zero speeds, but would still have used a zero input
  speed for setting watermarks if kern/tty.c had passed one.
- Never permit the input speed to be different from the output speed.
  There was no validity check on the input speed for the case of a zero
  output speed.  Then we didn't change the physical speeds, but we used
  the unvalidated input speed for setting watermarks and didn't return
  an error, so ttioctl() stored the unvalidated input speed in the tty
  struct where it could cause problems later.
- Removed complications that were to avoid using a divisor of 0.  The
  divisor is now always valid if the speed is accepted.
2003-09-27 11:13:59 +00:00
Bruce Evans
7872ac5542 Quick fix for bitrot in locking in the SMP case. cd_getreg() and
cd_setreg() were still using !(read_eflags() & PSL_I) as the condition
for the lock hidden by COM_LOCK() (if any) being held.  This worked
when spin mutexes and/or critical_enter() used hard interrupt disablement,
but it has caused recursion on the non-recursive mutex com_mtx since
all relevant interrupt disablement became soft.  The recursion is
harmless unless there are other bugs, but it breaks an invariant so
it is fatal if spinlocks are witnessed.
2003-09-27 10:30:03 +00:00
Poul-Henning Kamp
25ae11f8d4 Fix dev_t handling to avoid needless makedev() call. 2003-09-27 08:29:58 +00:00
Poul-Henning Kamp
edafc5663e Fix compilation on alpha. 2003-09-26 21:36:01 +00:00
Nate Lawson
1d7b121ca4 Make debug.acpi.level and debug.acpi.layer sysctls that can be set with
the strings found in acpi(4).  Also make acpi_ca_version a string so it
is more readable.
2003-09-26 21:22:10 +00:00
Poul-Henning Kamp
3f99f14bf1 OK, I messed up /dev/console with what I had hoped would be compat
code.  Convert remaining console drivers and hope for the best.
2003-09-26 19:35:50 +00:00
Poul-Henning Kamp
c9f007b685 Convert to cn_name rather than cn_dev. 2003-09-26 18:57:34 +00:00
Marcel Moolenaar
12d984b608 Catch up with the console interface change: the use of makedev() has
been abandoned in favor of a (device) name-based approach.

Submitted by: phk
Tested on: alpha
2003-09-26 18:10:30 +00:00
Poul-Henning Kamp
f9b9ae4dd1 Remove code previously under #ifdef ASR_VERY_BROKEN
Ok'ed by:	scottl
2003-09-26 15:56:42 +00:00
Scott Long
50e2aaa00c Update email addresses, copyrights, and tweak the management interface.
Submitted by: "Leubner, Achim" <Achim_Leubner@adaptec.com>
2003-09-26 15:36:47 +00:00
Bruce Evans
3a6a55a60b Use the correct speed in the delay for the transmission of a character
in the loopback test in the probe.  The delay was too short for consoles
at speeds lower than about 3200 bps.  This shouldn't have caused many
problems, since such low speeds are rare and the probe is forced to
succeed for consoles.
2003-09-26 11:36:09 +00:00
Poul-Henning Kamp
2f06c3e7f2 Initialize the cn_name instead of the cn_dev 2003-09-26 10:55:07 +00:00
Poul-Henning Kamp
4866f95d76 Change fb_attach() and fb_detach() to take a integer unit number rather
than a dev_t.

All of the dev_t's passed were bogusly created with makedev()
2003-09-26 10:41:44 +00:00
Poul-Henning Kamp
ff2cf8a51d Eliminate bogus use of makedev(): rather than synthesize the dev_t, use
our already cached copy.
2003-09-26 09:05:57 +00:00
Poul-Henning Kamp
c5c8f9652b Adhere to the new console API:
Initialize cn_name
   Use cn_unit for internal housekeeping.
   Forget about cn_dev.
2003-09-26 07:29:34 +00:00
Nate Lawson
656b9dd5c3 Consistently print attach messages. 2003-09-26 05:24:55 +00:00
Marcel Moolenaar
875f70dba4 Revert the introduction of iobase in struct uart_bas. Both the SAB82532
and the Z8530 drivers used the I/O address as a quick and dirty way to
determine which channel they operated on, but formalizing this by
introducing iobase is not a solution. How for example would a driver
know which channel it controls for a multi-channel UART that only has a
single I/O range?

Instead, add an explicit field, called chan, to struct uart_bas that
holds the channel within a device, or 0 otherwise. The chan field is
initialized both by the system device probing (i.e. a system console)
or it is passed down to uart_bus_probe() by any of the bus front-ends.
As such, it impacts all platforms and bus drivers and makes it a rather
large commit.

Remove the use of iobase in uart_cpu_eqres() for pc98. It is expected
that platforms have the capability to compare tag and handle pairs for
equality; as to determine whether two pairs access the same device or
not. The use of iobase for pc98 makes it impossible to formalize this
and turn it into a real newbus function later. This commit reverts
uart_cpu_eqres() for pc98 to an unimplemented function. It has to be
reimplemented using only the tag and handle fields in struct uart_bas.

Rewrite the SAB82532 and Z8530 drivers to use the chan field in struct
uart_bas. Remove the IS_CHANNEL_A and IS_CHANNEL_B macros. We don't
need to abstract anything anymore.

Discussed with: nyan
Tested on: i386, ia64, sparc64
2003-09-26 05:14:56 +00:00
Marcel Moolenaar
153bbe3e6a Make the port number available to the sub-device with PUC_IVAR_PORT. 2003-09-26 04:44:55 +00:00
Nate Lawson
297835bcd5 Sort debugging levels and update the man page to match reality. Also
update man page to reflect iasl(8) import.
2003-09-26 04:32:40 +00:00
Scott Long
ba079c0d9f aic79xx_pci.c:
aic7xxx_pci.c:
	When performing our register test, be careful
	to avoid resetting the chip when pausing the
	controller.  The test reads the HCNTRL register
	and then writes it back with the PAUSE bit
	explicitly set.  If the last write to the controller
	before our probe is to reset it, the CHIPRST
	bit will still be set, so we must mask it off
	before the PAUSE operation.  On some chip versions,
	we cannot access registers for a few 100us after
	a reset, so this inadvertant reset was causing PCI
	errors to occur on the read to check for paused
	status.

Submitted by:	gibbs
2003-09-25 23:36:41 +00:00
Hidetoshi Shimokawa
aed9eb791a Phy register map. 2003-09-25 09:27:05 +00:00
Warner Losh
26824d8c47 CARDMEM is the offset of the address ON THE CARD (eg which page).
Instead, use EXCA_MEMREG_WIN_SHIFT which is the amount we shift the
bus address by to write into upper memory (eg above 24MB).  Use the
latter in this case.
2003-09-24 22:13:25 +00:00
Thomas Quinot
3fbbaabe4a Enable DMA for ATAPI/CAM input/output operations.
Reviewed by:	scottl
2003-09-24 18:40:10 +00:00
John Birrell
4e7b8fcec4 Add VidzMedia MonsterTV (MPEG video/TV capture box). 2003-09-24 02:02:41 +00:00
Paul Saab
473851ba04 By not setting No_CRC in the Mode Control Register, we must also
reduce the size of the packet by 4 bytes to remove the ethernet crc.

Submitted by:	jdp
2003-09-23 19:54:32 +00:00
Yoshihiro Takahashi
312ebe0323 Don't return to search another ports even if bus_space_map() fails. 2003-09-23 13:03:22 +00:00
Yoshihiro Takahashi
b8759afc2b Initialize iobase, bsh and bst. 2003-09-23 09:55:21 +00:00
Yoshihiro Takahashi
82df4f3134 Compare base address instead of bus_handle. 2003-09-23 09:49:37 +00:00
Yoshihiro Takahashi
c423dba334 - Keep the base address in struct uart_bas for sab82532 and z8530 modules.
- Remove buggy uart_cpu_busaddr() function.
2003-09-23 09:25:38 +00:00
Yoshihiro Takahashi
34c875bc30 Remove unneeded includes. 2003-09-23 09:20:03 +00:00
Yoshihiro Takahashi
81a11def25 Use bus_space_map() to initialize a bus_handle. 2003-09-23 08:38:49 +00:00
Paul Saab
e446dc8601 From the Broadcom Eratta:
Setting the No_CRC bit Can Cause Data Write Errors on BCM5701/03/04
The resolution is to not set the No_CRC bit in the Mode Control Register.
2003-09-23 00:37:07 +00:00
Sam Leffler
266f0707bb add locking
Reviewed by:	Prafulla Deuskar <pdeuskar@FreeBSD.ORG>
Sponsored by:	FreeBSD Foundation
2003-09-23 00:18:25 +00:00
Thomas Moestl
a65aa77700 Fix inverted BURN_BRIDGES and GONE_IN_5 #ifdefs. 2003-09-22 17:58:40 +00:00
Warner Losh
2e6a21aa7f Sony PEGA-WL110 Wireless LAN
Obtained from: NetBSD (onoe-san)
2003-09-22 05:33:22 +00:00
Warner Losh
f1bbdf43f2 sync to 1.72 2003-09-22 05:27:33 +00:00
Warner Losh
4091833eb6 Merge from NetBSD:
1.186: onoe; Sony's PEGA-WL110 CF WLAN (which strangely has fujitsu's
   vendor id)
1.185: ichiro; Quatech Inc, PCMCIA Enhanced Parallel Port Card

Also:
o update $NetBSD$
o minor tweaks to FUJITSU.  We've tried to keep the CIS only entries seprate
  from vendor id/product id.
2003-09-22 05:27:03 +00:00
Nate Lawson
0588717032 Add an off_t cast to prevent overflow on media size. This should
fix issues with geometry not matching drive size.

Submitted by:	Clive Lin <clive@tongi.org>
2003-09-22 04:59:07 +00:00
Nate Lawson
a6a1d01594 Fix the ACPI_DEBUG case.
Reported by:	Larry Rosenman <ler@lerctr.org>
PR:
Submitted by:
Reviewed by:
Approved by:
Obtained from:
MFC after:
2003-09-22 04:50:29 +00:00
Poul-Henning Kamp
fb4d4b60b3 Make the clone handler BURN_BRIDGES but the actual 'a' and 'c' partition
check GONE_IN_5:  We need the clone handler for root filesystem case.

Once under GEOM, we can remove the clone handler as GEOM provides one.
2003-09-21 18:57:12 +00:00
Poul-Henning Kamp
d2f243d06a Make this compile. 2003-09-21 18:54:52 +00:00
Thomas Quinot
505d8ea4f1 (atapi_cb): Reorganize error handling circuitry.
Fix to the messages output under CAM_DEBUG_CCB: the summary sense
 information (error bits and sense key) is in the error field, not
 in the result field, of struct ata_request. No other functional change.
2003-09-21 16:49:53 +00:00
Thomas Quinot
1a2ede86a0 (atapi_cb): Disable autosense for now as it causes a missed ATA interrupt.
Minor reformatting.
2003-09-21 08:53:05 +00:00
Nate Lawson
be8dca590c Add support for fixed event buttons defined in the DSDT (HID "ACPI_FSB"
and "ACPI_FPB").

Pointed out by:		Linux
2003-09-21 02:49:59 +00:00
Bill Paul
edd033746c Remove the dual-address cycle stuff. DAC is used to allow a bus master
device to access 64-bit addresses from a 32-bit PCI bus. While the
RealTek manual says you can set this bit and the chip will perform
DAC only if you give it a DMA address with any of the upper 32
bits set, this appears not to be the case. If I turn on the DAC
bit, the chip sets the 'system error' bit in the status register
when I to do a DMA on my Athlon test box with 32-bit PCI bus (VIA
chipset) even though I only have 128MB of physical memory, and thus
can never give the chip a 64-bit address.

Obviously, I can't just set it and forget it, so until I figure
out the right rule for when it's safe/necessary to enable it, keep
it turned off.
2003-09-20 21:18:27 +00:00
Stefan Eßer
cf3153c9c9 Add vendor Samsung and device Samsung ML-6060. 2003-09-20 20:01:08 +00:00
Warner Losh
1bbd0d4010 EXPsys PCMCIA Ethernet Combo
Submitted by: Ludwig Pummer
2003-09-20 18:03:07 +00:00
Warner Losh
37c3193030 update to 1.71 2003-09-20 18:01:51 +00:00
Warner Losh
734b8bcbac EXPsys PCMCIA Ethernet Combo
Submitted by: Ludwig Pummer
2003-09-20 17:54:30 +00:00
Warner Losh
89aea6d530 Remove unused #defines. 2003-09-20 17:46:39 +00:00
Wilko Bulte
95ad0a1f28 Add missing file, it is sorely needed to make if_sk.c compile again. 2003-09-20 15:49:22 +00:00
Wilko Bulte
59ce78fef1 Add support for SK-9521 V2.0 and 3COM 3C940.
Tested at 100Mbit only, using Asus P4P800 onboard 3C940.
The -stable version of this patch I have in use for ~2 weeks now, and works
just fine for me.

Based on: Nathan L. Binkert's patch for OpenBSD
Patch submitted by and thanks to: Jung-uk Kim <jkim@niksun.com>
MFC after: 2 weeks
2003-09-20 10:53:08 +00:00
Søren Schmidt
bcf5e4d6b1 Dont reject a master device if it said slave failed. 2003-09-20 08:38:33 +00:00
Gary Jennejohn
eb3c983360 In umass_bbb_get_max_lun() move maxlun to before the DPRINTF so that
the actual number of LUNs is printed.
2003-09-20 08:18:16 +00:00
Warner Losh
45a3024ec7 New Proxim Harmony OEM card.
Submitted by: Jeremy Bingham
2003-09-20 05:27:18 +00:00
Warner Losh
7558e6858e sync to 1.70 2003-09-20 05:24:50 +00:00
Warner Losh
ea1349a34b OEM version of Proxim Harmony card
Submitted by: Jeremy Bingham
2003-09-20 05:23:50 +00:00
John Birrell
5ec40b82ff Add HP 4400C, Belkin F5U208 VideoBusII 2003-09-19 22:42:51 +00:00