Commit Graph

10187 Commits

Author SHA1 Message Date
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