Commit Graph

8884 Commits

Author SHA1 Message Date
Martin Blapp
259b8d8489 Add missing braces.
Found by:       FlexeLint (phk)
Reviewed by:	wpaul, phk
2003-02-07 13:55:02 +00:00
MIHIRA Sanpei Yoshiro
553684bcea Regen 2003-02-07 13:19:29 +00:00
MIHIRA Sanpei Yoshiro
c524738eae Add support FUJITSU AH-F401U Air H device
Submitted by:	[bsd-nomads:16601]
		Kouichi ABE (WALL) <kouichi@MysticWALL.COM>
2003-02-07 12:53:21 +00:00
Hidetoshi Shimokawa
6f99c2ff52 Remove debug message. 2003-02-07 09:46:30 +00:00
Paul Saab
ff2387cb57 Update to new crashdump API 2003-02-07 06:58:32 +00:00
Paul Saab
98c779ea35 Update to new crashdump api 2003-02-07 02:36:20 +00:00
Scott Long
ff1e67ab93 Fix the mly driver! If card resources became unavailable, the driver would
correctly tell CAM to requeue the command and then freeze it's queue.  The
problem was that when resources became available again, it wouldn't tell
CAM to unfreeze it's queue, so no more commands would ever be delivered.
This is simialr to the bug that was fixed in the cciss driver last year.
This is a bug in 4-STABLE also, but is probably masked by the OS being
fast enough to drain the completion queue before it fills up.
Also add some diagnostics avaialble when compiled with MLY_DEBUG.
Thanks very much to LSI Corp for donating equipment to track this down,
and Vaidus Damosevicius for pestering me long enough to get it fixed.
2003-02-06 23:46:32 +00:00
Orion Hodson
63679b6573 Fix comment typo.
Sync with userland test framework which now deals better with pcm feeder kobj
emulation.

Reduce max rate from 96kHz to 48kHz as userland tests found a few bad
points about 90kHz and we don't care about operating up there for now.
2003-02-06 17:32:02 +00:00
Hidetoshi Shimokawa
d3539e9792 Fix memory leak. 2003-02-06 17:23:01 +00:00
Scott Long
ddb8683e59 Teach the CAM module how to deregister itself so it can be unloaded. 2003-02-06 03:31:02 +00:00
Scott Long
a761a1ca60 Free the container and sim objects on detach. Convert several uses of
MALLOC to malloc.
2003-02-06 00:37:37 +00:00
Scott Long
5f54d52203 Don't include aac_cam.h, since it was nuked in the last commit.
Deregister the shutdown eventhandler on unload.
2003-02-06 00:07:12 +00:00
Scott Long
70545d1a1f Various cleanups:
- Move the command timeout check from a separate repeating timeout to the
   kthread since the kthread is already running periodically.
 - Move printing the hardware print buffer to the kthread.
 - Properly shut down the kernel thread on detach.
 - Detach the child array devices on detach.
 - Don't issue a controller halt command on detach.  Doing so requires a PCI
   reset to wake the controller back up.  The driver can now be unloaded as
   long as CAM support is not enabled.
2003-02-05 23:24:25 +00:00
Martin Blapp
028a849180 Move the DC_SETBIT to the attach function.
Reviewed by:		phk
2003-02-05 21:21:26 +00:00
Joerg Wunsch
e1df235292 Finally make vinum ready for the root filesystem in FreeBSD 5.x. (A
similar patch has been in 4.x for a while, but is more hacky there.)

For this to work, vinum has to be loaded early (e. g. from
boot/loader), for obvious reasons.  If the kernel env variable
(aka. loader variable) "vinum.autostart" is set, vinum then asks the
sysctl kern.disks for all available disks in the system, and scans
them for possible vinum headers.

For statically compiled kernels, this behaviour can be obtained even
without boot/loader by using "options VINUM_AUTOSTART" (though this is
not the recommended way).

Alternatively, the 4.x way to specify "vinum.drives" is also supported.

No further hacks (like the 4.x "vinum.root" variable) are needed,
since in 5.x, mountroot() asks back at the drivers to have them
resolve the name of the root FS into a dev_t (using the dev_clone
eventhandler).

(The MFC reminder below is for a partial MFC for vinum.autostart, the
rest is already there in 4.x.)

Timed out on:	grog
MFC after:	2 weeks
2003-02-05 21:02:56 +00:00
Hidetoshi Shimokawa
5db3899d2e Fix for fwmem write part.
- fix typo
- don't need to check receive buffer.
- don't forget to free xfer on errer.
2003-02-05 17:19:34 +00:00
Andrey A. Chernov
952b6153de Remove srandom():
1) It is already called in init_main.c:proc0_post()
2) It is called each time read_random_phony() called, because "initialized"
variable is never set to 1.

Approved by:    markm
2003-02-05 15:56:04 +00:00
Philippe Charnier
c0f44a5927 Spelling. 2003-02-05 14:03:55 +00:00
Paul Saab
41abcc1b62 Obtain the media type from the shared memory and only use the eeprom
as a fallback.
2003-02-05 08:54:36 +00:00
Paul Saab
440baa08c3 Properly get the drive geometry from the controller. This should
fix booting off of volumes > 255GB.
2003-02-05 08:43:46 +00:00
Paul Saab
e010b6bc46 Close a memory leak when rescanning the bus. 2003-02-05 07:46:08 +00:00
Doug Ambrisko
01de2955e4 Support for suspend/resume in laptops. Loosely based on the wi(4) patches
but not quite.  The memory descriptors and most of the card parameters
need to be writen to the card.

MFC in:		3 days
2003-02-05 03:37:42 +00:00
Hidetoshi Shimokawa
8a45d99b2a - Implement write part.
- Use quad access for aligned 4 byte access.
2003-02-04 17:09:59 +00:00
Hidetoshi Shimokawa
a487c0f261 - Improve recovery after timeout.
* reset agent first then reset target.
	* untimeout all ccbs.
- Try reconnect first if the device has been seen.
- Fix for ORB_FUN_ATA.
2003-02-04 17:08:45 +00:00
MIHIRA Sanpei Yoshiro
8541fbec79 Fix `umass0: BBB bulk-in clear stall failed, IOERROR' problem with
some USB devices.  (Make sure to set xfer data length when we force
a short inquiry.)

Obtained from: NetBSD(sys/dev/usb/umass_scsipi.c rev.1.8)
Original idea from: Shingo WATANABE <nabe@nabechan.org>
2003-02-04 13:45:41 +00:00
MIHIRA Sanpei Yoshiro
ab0a90de0a Remove duplicated entry
Put the Trek Smart Thumbdrives (8MB model) entry in the right place.
(Entries are sorted by vendor id).
2003-02-04 13:36:32 +00:00
Orion Hodson
14908c43ac Remove unintended growth of bt848_card_signature. 2003-02-03 18:59:12 +00:00
Orion Hodson
faea679930 Avoid zero padding when feeding read channels. chn_rdfeed has no way
of knowing data size transformations of feeder chain and in some cases
this means too much data is pulled through chain, eg converting input
stream from 16bits to 8bits on 16bit only h/w.

PR: kern/37831
Submitted by: Harti Brandt <brandt@fokus.fraunhofer.de>
2003-02-03 15:02:28 +00:00
Hidetoshi Shimokawa
beb19fc5dd Remove unnecessary M_NOWAIT. 2003-02-03 09:41:42 +00:00
Hidetoshi Shimokawa
62dae95462 Add missing 'static'. 2003-02-03 08:10:50 +00:00
Hidetoshi Shimokawa
48249fe0c8 - Take malloc type as an argument in fw_xfer_alloc().
- Fix overwrite problem of freed buffers. It was rare but could happen
	when fwohci_arcv() is called before fwohci_txd() is called for
	the transcation.
- Drain AT queues and pend AR queues on SID receive rather than BUS reset to
	make sure DMA actually stops.
- Do agent reset in sbp_timeout().
2003-02-03 07:33:31 +00:00
Orion Hodson
ac224567bf Remove mono encodings from vchan format and mixer description. Fixes
mono formats at 44.1kHz playing at double speed when vchans are
enabled.
2003-02-03 03:20:27 +00:00
Orion Hodson
a825c6e59e Print ac97 name/id on normal boot.
Fix typo reported in pr misc/47794.
2003-02-03 01:38:43 +00:00
Doug Ambrisko
e61838b128 Some small enhancments
-	Implement TX power control with hints to code in Linux driver
	by Douglas S. J. De Couto <decouto@lcs.mit.edu>
      -	Update ifmedia support to use ieee80211_rate2media and
	ieee80211_media2rate.  Note doesn't work with stock ifconfig
	since there seems to be an issue with the setmedia code.
	"ancontrol -t" works now, before it did nothing.
      -	Fix spelling error in header.
2003-02-02 22:49:31 +00:00
Poul-Henning Kamp
6607b68526 Set si_drv1 to our softc for all the six dev_t's we create for a serial port. 2003-02-02 21:25:22 +00:00
Orion Hodson
f77f2ccb90 Add BCTV3/PCI entry.
Rename functions bctv_* to bctv2_* and macros BCTV_* to BCTV2_* for
coexistance of BCTV2 and BCTV3.

Rename CARD_IO_GV to CARD_TO_BCTV2.

Add auto recognition of BCTV3/PCI.

PR:             i386/43879
Submitted by:   MOROHOSHI Akihiko <moro@remus.dti.ne.jp>
Approved by:    roger
MFC after:      6 days
2003-02-02 17:46:00 +00:00
Alfred Perlstein
b7f305981e chase more of the MIN/MAX mess. *sigh* 2003-02-02 13:52:25 +00:00
Alfred Perlstein
04738e99b5 Catch more uses of MIN(). 2003-02-02 13:30:00 +00:00
Alfred Perlstein
c023201af1 remove MIN now that it's a standard kernel define 2003-02-02 13:21:05 +00:00
Alfred Perlstein
8deebb0160 Consolidate MIN/MAX macros into one place (param.h).
Submitted by: Hiten Pandya <hiten@unixdaemons.com>
2003-02-02 13:17:30 +00:00
Warner Losh
1a972e076a Unlock the mutex in the error case in wi_init. Otherwise we can return
from an ioctl with the lock held.

Submitted by: iedowse (by way of sam)
2003-02-02 06:35:46 +00:00
Marcel Moolenaar
a3909515f4 Regenerate after fixing duplicate device entries. 2003-02-02 01:58:28 +00:00
Marcel Moolenaar
7c125c1c6a Unbreak kernel builds caused by what appears to be a merge conflict.
This change has been tested.
2003-02-02 01:57:31 +00:00
MIHIRA Sanpei Yoshiro
c799e00130 Regen 2003-02-01 23:09:33 +00:00
MIHIRA Sanpei Yoshiro
a9451985f7 Add Genesys Logic products
- GL650 HUB
	- GL641USB CompactFlash Card Reade
	- GL641USB USB-IDE Bridge
Add MELCO product
	- USB-IDE Bridge: DUB-PxxG
2003-02-01 22:50:50 +00:00
Hidetoshi Shimokawa
5166f1df39 Define new malloc type M_FW and use it. 2003-02-01 15:04:33 +00:00
Hidetoshi Shimokawa
0981f5f00e - replace timeout with callout_*.
- replace TAILQ with STAILQ for device list.
- some clean up.
2003-02-01 14:42:49 +00:00
Hidetoshi Shimokawa
3c62126d84 Check status FIFO more closely to report error. 2003-02-01 12:06:57 +00:00
Poul-Henning Kamp
806d5cfff0 Eliminate the sc_openmask, ccdopen() and ccdclose() functions, we
can use the flag maintained by geom_disk.c

Having only a strategy method to intialize, don't waste space using
a cdevsw structure to do so.
2003-02-01 11:17:22 +00:00
Hidetoshi Shimokawa
0db3d1635c Add basic support for device wiring down to specific (CAM)
target id. It still needs to be hard-coded now but will
be changed to be configured by tunables or device hints.
2003-02-01 08:55:33 +00:00
Benno Rice
0faf0e2a30 MacIO frontend for the zs driver.
Many thanks to jake for doing the initial driver and for helping me in making
this work.
2003-02-01 07:23:47 +00:00
Hidetoshi Shimokawa
4230e8de2f Sort device list by eui64 in acendent order correctly. 2003-02-01 06:34:36 +00:00
Takeshi Shibagaki
2fd866e6b2 Regen. 2003-02-01 04:47:51 +00:00
Takeshi Shibagaki
57b42a754d Allied Telesis WR211PCM(wi) and Corega PCC-T(ed) have
same manufacture id and product id. So use CIS info
(PCCARD_CISTPL_VERS_1).

reported by HONDA Yasuhiro <yasu@yasu.org>
2003-02-01 04:47:29 +00:00
Mike Silbersack
1a984aad84 Add deviceids for 6105 and 6105M chips. Further changes will be necessary
to fully support these new chips, but preliminary evidence suggests that
they work acceptable with our present driver.

MFC after:	1 week
2003-02-01 01:27:05 +00:00
Mike Silbersack
97e6eca55d Switch the if_vr driver from using our generic MII routines over to
using the Rhine's internal shift registers which are designed
for the job.  This reduces the amount of time we wait around shifting
bits, and seems to work better with some chips.

Also, provide a workaround for some newer cards which report fake PHYs
at multiple addresses.  (As more cards are ID'd, I'm sure this part
of the code will have to be expanded to cover more cases.)

Submitted by:	Thomas Nystrom <thn@saeab.se>
MFC after:	1 week
2003-02-01 01:18:26 +00:00
Poul-Henning Kamp
1b1cf40164 Add PCI id for Quatech SSCLP-200/300 lowprofile single-port RS422/485 card. 2003-01-31 21:11:20 +00:00
Orion Hodson
9aa75ee251 Add tuner code for WinTV Go FM (Hauppauge Model 44811 C133). Patch
supplied by Ross Finlayson <finlayson@live.com>.
2003-01-31 15:23:40 +00:00
Hidetoshi Shimokawa
ba3129cb87 function name change. 2003-01-31 14:14:45 +00:00
Hidetoshi Shimokawa
64cf5240a9 SBP related changes.
- Issue LOGOUT command on detach and shutdown.
- Rename some functions.
2003-01-31 14:11:22 +00:00
Mike Silbersack
b72d483eb5 Fixes from Thomas Nystrom to fix hanging problems experienced by vr cards
under load.

This patch has been tested by Thomas and other for more than a month now,
and all (known) hangs seem to be solved.

Thomas's explanation of the patch:

*  Fix the problem with the printing of the RX-error.

*  Code from if_fet do better deal with the RX-recovery including a
   timeout of the RX-turnoff.

*  The call to vr_rxeof before vr_rxeoc have been moved to a point
   where the RX-part of the chip is turned off. Otherwise there is a
   window where new data could have been written to the buffer chain
   before the RX-part is turned off. If this happens the chip will see
   a busy rx-buffer. I have no evidence that this have occured but
   god knows what the chip will do in this case!

*  I have added a timeout of the TX-turnoff. I have checked and in
   my 900 MHz system the flags for turnoff (both RX & TX) is seen at
   the first check in the loop.

*  I could see that I got the VR_ISR_DROPPED interrupt sometimes and
   started to thinking about this. I then realized that no recovery is
   needed for this case and therefore I only count it as an rxerror
   (which was not done before).

*  Finally I have changed the FIFO RX threshhold to 128 bytes. When I
   did this the VR_ISR_DROPPED interrupt went away. Theory: The chip
   will receive a complete frame before it tries to write it out to
   memory then the RX threshold is set to store'n'forward. IF the frame
   is large AND the next rx frame also is large AND the bus is busy
   transfering a TX frame to the TX fifo THEN the second received
   frame wont fit in the FIFO and is then dropped. By having the RX
   threshold set to 128 the RX fifo is emptied faster.

MFC after:	5 days
2003-01-31 07:37:06 +00:00
Hidetoshi Shimokawa
9bb3ca0305 SBP related changes.
- Set dual phase retry BUSY_TIMEOUT.
- Let users to know serial bus error.
2003-01-31 03:09:13 +00:00
Poul-Henning Kamp
1686ac18f9 NO_GEOM cleanup: retire disk_invalidate() 2003-01-30 19:43:50 +00:00
Tom Rhodes
40cbf25dbb Add support for the Trek Thumbdrive 8MB USB Drive.
PR:		46004
Submitted by:	Brian J. McGovern <mcgovern@tick.beta.com> (original version)
2003-01-30 18:33:01 +00:00
Orion Hodson
456922d5f2 o Constrain inputs to 25Hz granularity so interpolator can operate
between any pair of values in range 4-96kHz.  Thanks to Ken Marks for
discovering there were problems with the previous version.

o Use a non-recursive gcd routine.
2003-01-30 16:32:56 +00:00
Max Khon
6b58184eb0 - bpf is now working (tested with tcpdump)
- fix promiscious mode

MFC after:	3 days
2003-01-30 15:55:02 +00:00
Doug Ambrisko
0738490650 Fix some style and incorrect indentation level bugs.
Questioned by:	phk (for the indentation problem)
2003-01-30 15:01:17 +00:00
Poul-Henning Kamp
5777c5b989 NO_GEOM cleanup: unifdef 2003-01-30 13:12:31 +00:00
Hidetoshi Shimokawa
958c774916 Restart cycle master after bus manager election.
This should fix the IR(and maybe IT) problem when
the host becames the bus manager.
- rename fw_noderesolve() to fw_noderesolve_eui64() and add
	fw_noderesolve_nodeid().
2003-01-30 05:18:35 +00:00
Hidetoshi Shimokawa
449e559cdb - Handle SCSI_STATUS_BUSY case. 2003-01-30 05:12:56 +00:00
Hidetoshi Shimokawa
7054e8482e - Probe number of IT/IR DMA contexts as specified in OHCI spec. 2003-01-29 15:32:35 +00:00
Joerg Wunsch
501901c61d The Xircom hardware always delivers received packets with the FCS appended.
Thus, mark the M_HASFCS flag so the generic ethernet layers will account
for this.
2003-01-29 15:19:20 +00:00
Benno Rice
a42a7e2f13 Set the termios speed based on the tty speed. This allows consoles to work at
speeds other than TTYDEF_SPEED.

Approved by:	jake
2003-01-29 02:43:35 +00:00
Hidetoshi Shimokawa
878db8920f - Fix build on alpha.
- Add a missing newline in printf.
2003-01-29 02:13:31 +00:00
Hidetoshi Shimokawa
c3e9e25542 - Allow multiple packets read/write for IR/IT to reduce system call.
- Remove unused variables.
2003-01-28 15:09:07 +00:00
Jake Burkholder
a68a96aad7 Add the sabtty children devices as unordered. Use the unit numbr of
the sabtty device to create its description so that they will be
unique for machines with multiple sab chips.

This fixes a panic on machines with an rsc card.

Tested by:	obrien (e250)
2003-01-27 18:39:09 +00:00
MIHIRA Sanpei Yoshiro
4bfecf88f4 Add PCI id for fxp(Intel Pro/100 M Mobile Connection).
PR:	i386/41915
Submitted by:	Ross A. Lippert <ripper@eskimo.com>
MFC after:	1 week
2003-01-27 14:31:32 +00:00
Josef Karthauser
4de19bd9c8 Put the Perfection 1660 scanner entry in the right place. (Entries
are sorted by product id).
2003-01-27 09:43:24 +00:00
Søren Schmidt
33ede9b3e7 Update the code that deals with disk enclosures:
Properly handle the newer Promise SuperSwap 1000 enclosures.
Print out what kind of enclosure was found in the probe.
Misc cleanups in the enclosure handling code.

Sponsored by: Advanis Inc.
2003-01-27 09:04:29 +00:00
Poul-Henning Kamp
16bcbe8cf7 Implement MDIOCLIST which returns the unit numbers of configured md(4)
devices.

We use the md_pad[] array and if there are more units than its size the
last returned unit number will be -1, but the number of units returned
is correct.
2003-01-27 07:58:18 +00:00
Warner Losh
66e390feb6 MFp4:
u_int*_t -> uint*_t to conform more closely with C99.
2003-01-27 05:47:01 +00:00
Jake Burkholder
984e265523 Change ofwcons to use the output-device property from the firmware for the
name of the device that it creates.  Update /etc/ttys accordingly.

An alias is created for the old name so that old /etc/ttys will continue to
work, but due to aliases being implemented as symlinks in devfs you cannot
login as root when using the alias device.

Discussed with:	grehan
2003-01-27 04:42:17 +00:00
Hidetoshi Shimokawa
53f1eb8620 - Split db.desc.cmd into desc.control and desc.reqcount.
- remove unncessary descriptor updates.
2003-01-26 18:38:06 +00:00
Hidetoshi Shimokawa
5a7ba74dc4 - Improve IT/IR DMA queue management.
- Improve debug message for mbuf handling.
- Wait 1 sec for DMA stop in fwohci_i{t,r}x_disable() before freeing buffers.
2003-01-26 15:39:04 +00:00
Poul-Henning Kamp
e70e846243 Put use of DIOCWLABEL under #ifdef NO_GEOM 2003-01-26 11:28:56 +00:00
Orion Hodson
cb4458e030 Disable DRA to fix problems with recording. 2003-01-26 04:23:23 +00:00
Jake Burkholder
6c5b0e25a0 Allow defaulting the console to ttya when it sets to screen and keyboard
in the prom but no keyboard is plugged in.
2003-01-26 01:56:20 +00:00
Warner Losh
7f7ff631be Add INTEL EEPRO100
Submitted by: joerg
2003-01-25 23:18:01 +00:00
Orion Hodson
f9eb140935 Add ac97_patch.[ch] that provide space for ac97 codec specific patches. 2003-01-25 16:54:05 +00:00
Hidetoshi Shimokawa
c547b896f5 Change API of FW_GDEVLST ioctl.
- include information about itself.
- define struct fw_devinfo and use it in struct fw_devlstreq.
- unify EUI64 representation using struct fw_eui64.
2003-01-25 14:47:33 +00:00
Hidetoshi Shimokawa
9190691bd0 Remove FW_SSTDV ioctl. It is not used anymore. 2003-01-24 13:03:19 +00:00
Hidetoshi Shimokawa
e715bfae6c Merge little and big endian case. 2003-01-24 12:45:19 +00:00
Max Khon
6cdcc15976 - add support for IPX (tested with mount -t nwfs and mars_nwe),
IP fast forwarding, SIOCGIFADDR, setting hardware address (not currently
enabled in cm driver), multicasts (experimental)
- add ARC_MAX_DATA, use IF_HANDOFF, remove arc_sprintf() and some unused
variables
- if_simloop logic is made more similar to ethernet
- drop not ours packets early (if we are not in promiscous mode)

Submitted by:	mark tinguely (partially)
2003-01-24 01:32:20 +00:00
Matthew N. Dodd
3648042ae9 - The 'aux' field isn't around any longer.
- Add missing splnet()/splx()
2003-01-24 00:37:10 +00:00
Nate Lawson
a40f20c791 More useful announce message containing current speed of CPU 2003-01-23 22:18:14 +00:00
Hidetoshi Shimokawa
16e0f48443 - Add sysctl knob for bus manager. (hw.firewire.try_bmr)
- Check invalid SID length.
- Add some debug messages.
2003-01-23 13:34:40 +00:00
Scott Long
128aa5a022 Hack around a bug in the 2200 and 2120 controllers that connot DMA
commands from below the first 8K of physical memory.  A better fix
is to modify the busdma api to allow either inclusion ranges or
multiple exclusion ranges, but that debate is for another day.

MFC After:	2 days
2003-01-23 01:01:44 +00:00
Marcel Moolenaar
19ad245042 YAM: This id is found in a Sony Vaio GRX-670. When will this end?
Submitted by: Chuck McCrobie <mccrobie2000@yahoo.com>
2003-01-22 22:02:09 +00:00
Justin T. Gibbs
a02f9953f0 Revert AHD_TIMER_MAX_US to its original definition now that the
ahc and ahd modules have correct dependencies on the assembler.
2003-01-22 22:00:07 +00:00
Joerg Wunsch
d50ea522c1 Make the arguments to d_close() match the arguments to d_open(), since
otherwise the close operation is void, and the underlying device remains
marked as being busy.

Thanks to phk for finding this.

MFC after:	3 days
2003-01-22 14:06:46 +00:00
Jeffrey Hsu
033aebebc4 Add yet another Sony Vaio PS/2 mouse ID. This one is found on a VX88.
Submitted by:	marcel
2003-01-22 03:31:08 +00:00
Thomas Moestl
3437dbef6d Free resources when failing to set up the interrupt. 2003-01-21 17:28:36 +00:00
Thomas Moestl
aaa160f357 bus_dmamap_sync() overhaul:
- Remove NetBSD-style or-ed together BUS_DMASYNC operations, in some
  cases relaxing the (intended) syncing operation a bit.
- Add syncs before reading the descriptor rings.
- Try to combine syncs where possible to avoid overhead.
- Sync all maps before unloading them.
2003-01-21 17:22:52 +00:00
Thomas Moestl
b2d59f4234 bus_dmamap_sync() overhaul:
- Remove NetBSD-style or-ed together BUS_DMASYNC operations, in some
  cases relaxing the (intended) syncing operation a bit.
- Stop pretending that that we can sync part of a dmamap: replace the
  GEM_CDTXSYNC and GEM_CDRXSYNC macros with GEM_CDSYNC to sync the
  complete control map, and combine syncs wherever possible to avoid
  the overhead.
- Sync all maps before unloading them.
- Remove a few syncs which should be unnecessary.
2003-01-21 17:17:01 +00:00
Hidetoshi Shimokawa
93001c7214 Define misc structs outside of struct firewire_comm. 2003-01-21 16:37:01 +00:00
Hidetoshi Shimokawa
b9b35d1965 Ignore events of unused IR DMA. 2003-01-21 16:24:35 +00:00
Josef Karthauser
d617f4ca0c Regen 2003-01-21 11:38:17 +00:00
Josef Karthauser
652fde6f1f Add support for Epson 1660 scanner.
Submitted by:	Bruno Schwander <bruno@tinkerbox.org>
MFC after:	3 days
2003-01-21 11:37:54 +00:00
Poul-Henning Kamp
c6eeff600d Bandaid to make the kernel compile until the scsi-crew can find out what
is happening.
2003-01-21 10:31:43 +00:00
Marcel Moolenaar
99fd68d987 Add yet another Sony Vaio PS/2 mouse ID. This one is found in a R505GL.
The ACPI data for the mouse includes the compatibility ID, but we
apparently don't make use of it.
2003-01-21 10:00:32 +00:00
Poul-Henning Kamp
3bc7d563e3 Add a missing '{' 2003-01-21 09:57:01 +00:00
Alfred Perlstein
44956c9863 Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
2003-01-21 08:56:16 +00:00
Søren Schmidt
d7b64c95c0 Remove the fake disklabel, no longer needed.
Fix potential malloc panic.

Prodded by: phk
2003-01-21 08:33:48 +00:00
Justin T. Gibbs
256081f980 Fix a missed goal.period -> goal.offset change. In
this case, the bug resulted in comparing a period
against an offset.
2003-01-20 23:51:18 +00:00
Sam Leffler
70be8cba19 move sysctl's under hw.hifn; change max batching default to 1 (no batching)
based on what I learned from the Broadcom h/w
2003-01-20 21:11:56 +00:00
Sam Leffler
ee94ed449a move sysctl's under hw.ubsec 2003-01-20 21:07:30 +00:00
Sam Leffler
2a363b8963 correct default setting of hw.wi.txerate; it must be -1, not zero,
to silence all msgs (like the old driver)
2003-01-20 21:06:58 +00:00
Sam Leffler
1c56cdce18 correct sysctl names and move them to hw.wi: hw.wi.txerate controls the rate
at which tx errors are printed (default to 0); hw.wi.debug control the debug
msgs and is only present when WI_DEBUG is defined at compile time (the default
for the moment)

Requested by:	imp
2003-01-20 20:55:37 +00:00
Justin T. Gibbs
70b41139c3 aic7xxx.reg:
Add a constant for the controller's stack size and the
	maximum scsi offset.

aic7xxx.seq:
	Style nit.  The source is implied to be the destination
	unless overridden in an "and" instruction.

	Update target mode code for changes in identify seen
	sequencer flags.

aic7xxx_pci.c:
	Ensure that the PCIERRGENDIS bit is set in the
	PCIERRGEN config space register.  Perhaps this
	is a reason for the spurios parity errors reported
	on U160 controllers.

	Honor the AHC_NO_BIOS_INIT flag.

	Allow PCI interrupt reporting to be disabled,
	by clearing the PERRRESEN bit in the command
	register.  This option is now enabled via a new
	softc flag: AHC_DISABLE_PCI_PERR.

	Disable SERR and pause the controller prior to performing
	our mmapped I/O test.  This should handle the case of
	controllers that do not "auto-access pause".  For legacy
	controllers, use SCB ram instead of scratch ram since
	the latter may contain settings left over from the BIOS
	that we will use if an seeprom is not found.

	Make use of new ahc_inl/outl() inlines.

aic7xxx.h:
	Reformat a few comments to follow driver style.

	Add a controller flags that indicate that a controller
	has not been initialized by the BIOS and whether to
	disable PCI parity errors..

	Remove stack probing softc members.

	Add a few more syncrate constants that are useful in speed
	fallback calculations.

	Add the SHOW_MASKED_ERRORS debug flag.

aic7xxx.h:
aic7xxx.c:
	Implement the SCB_SILENT flag.  This is useful for
	hushing up the driver during DV or other operations
	that we expect to cause transmission errors.  The
	messages will still print if the SHOW_MASKED_ERRORS
	debug option is enabled.

aic7xxx_inline.h:
	Implement ahc_[in|out][w|l|q].  This removes the need
	for manual 'or and shift" type operations throughout
	the driver.

aic7xxx.c:
	Move SELTO dignostic so that the SCB is still valid
	when we use it for printing path information.

	If we are narrow, limit syncrate to Ultra2.

	Don't clobber ppr_options when forcing a renegotiation.
	The current ppr_options may be referenced while queuing
	new commands.  Don't set our width to unknown when forcing
	negotiation on narrow controllers.  This will confuse the
	negotiation code into negotiating with a wide message on
	narrow controllers.

	Add an "asserting atn" diagnostic with controller/target
	information.

	Remove the probe_stack code.  The stack is always
	4 deep on legacy controllers, so probing is pointless.
	This also avoids an issue where probing the stack would
	upset the aic7770.

	In ahc_reset(), record whether or not we found the
	controller in a reset state.  If the controller was
	already reset, assume that no BIOS has initialized
	the controller and ignore left over scratch ram
	settings.

	Fix an ifdef bug that caused sequencer debugging to
	be enabled always.

	Clear the ultraenb flag in our tstate during startup.
	The ultraenbled'ness of a device is recorded in the user
	transfer settings.  tstate->ultraenb bitmask indicates
	which devices we have negotiated an ultra speed with.
	Just after initialization, we are async.  Setting the
	ultraenb flag while async seems to be harmless, but it
	was confusing to see the ULTRAENB flag set in the SCB.

	Enhance residual diagnostic to indicate if the residual
	if for sense information or normal data transfers.

	Indicate the features, bugs, and flags set in the softc
	that are used to control firmware patch download when
	booting verbose.

	In ahc_dump_card_state() fix a logic reversal.  The
	SCSIPHASE register only exists on U160 controllers.
	The SCSISIGI register exists on all controllers.  Not
	the other way around.  Also print out the ERROR register.

	Allow ahc_dump_card_state() to be called when the sequencer
	is not paused.  Add dump card state markers as in the U320
	driver.
2003-01-20 20:44:55 +00:00
Justin T. Gibbs
0794987d01 aic79xx.c:
Implement the SCB_SILENT flag.  This is useful for
	hushing up the driver during DV or other operations
	that we expect to cause transmission errors.  The
	messages will still print if the SHOW_MASKED_ERRORS
	debug option is enabled.

	Save and restore the NEGOADDR address when setting
	new transfer settings.  The sequencer performs lookups
	in the negotiation table too and it expects NEGOADDR
	to remain consistent across pause/unpause sessions.

	Consistently use "offset" instead of "period" to determine
	if we are running sync or not.

	Add a SHOW_MESSAGES diagnostic for when we assert ATN
	during message processing.

	Print out IU, QAS, and RTI features when showing transfer options.

	Limit the syncrate after all option conformance
	changes have taken place in ahd_devlimited_syncrate.
	Changes in options may change the final syncrate we
	accept.

	Keep a copy of the hs_mailbox in our softc so that
	we can perform read/modify/write operations on the
	hs_mailbox without having to pause the sequencer to
	read the last written value.  Use the ENINT_COALESS
	flag in the hs_mailbox to toggle interrupt coalessing.

	Add entrypoints for enabling interrupt coalessing and
	setting both a timeout (how long to wait for commands
	to be coalessed) and a maximum commands to coaless value.
	Add a statistics timer that decides when to enable or
	disable interrupt coalessing based on load.

	Add a routine, ahd_reset_cmds_pending() which is used
	to update the CMDS_PENDING sequencer variable whenever
	error recovery compeltes SCBs without notifying the
	sequencer.  Since ahd_reset_cmds_pending is called
	during ahd_unpause() only if we've aborted SCBs, its
	call to ahd_flush_qoutfifo should not cause recursion
	through ahd_run_qoutfifo().  A panic has been added to
	ensure that this recursion does not occur.

	In ahd_search_qinfifo, update the CMDS_PENDING sequencer
	variable directly.  ahd_search_qinififo can be called
	in situations where using ahd_reset_cmds_pending() might
	cause recursion.  Since we can safely determine the
	exact number to reduce CMDS_PENDING by in this scenario
	without running the qoutfifo, the manual update is sufficient.

	Clean up diagnostics.
	Add ahd_flush_qoutfifo() which will run the qoutfifo
	as well as complete any commands sitting on the
	sequencer's COMPLETE_SCB lists or the good status FIFO.
	Use this routine in several places that did similar
	things in an add-hoc, but incomplete, fashion.  A call
	to this routine was also added to ahd_abort_scbs() to
	close a race.

	In ahd_pause_and_flushwork() only return once selections
	are safely disabled.  Flush all completed commands via
	ahd_flush_qoutfifo().

	Remove "Now packetized" diagnostic now that this
	information is incorperated into the actual negotiation
	messages that are displayed.

	When forcing renegotiation, don't clober the current
	ppr_options.  Much of the driver uses this information
	to determine if we are currently packetized or not.

	Remove some stray spaces at column 1 in ahd_set_tags.

	When complaining about getting a host message loop
	request with no pending messages, print out the
	SCB_CONTROL register down on the card.

	Modify the ahd_sent_msg() routine to handle a search
	for an outgoing identify message.  Use this to detect
	a msg reject on an identify message which typically
	indicates that the target thought we were packetized.
	Force a renegotiation in this case.

	In ahd_search_qinfifo(), wait more effectively for SCB
	DMA activities to cease.  We also disable SCB fetch
	operations since we are about to change the qinfifo
	and any fetch in progress will likely be invalidated.

	In ahd_qinfifo_count(), fix the qinfifo empty case.

	In ahd_dump_card_state(), print out CCSCBCTL in the
	correct mode.

	If we are a narrow controller, don't set the current
	width to unknown when forcing a future negotiation.
	This just confuses the code into attempting a wide
	negotiation on a narrow bus.

	Add support for task management function completions.

	Modify ahd_handle_devreset so that it can handle
	lun resets in addition to target resets.  Use
	ahd_handle_devreset for lun and target reset task
	management functions.

	Handle the abort task TMF race case better.  We now
	wait until any current selections are over and then
	set the TMF back to zero.  This should cause the sequencer
	to ignore the abort TMF completion should it occur.

	Correct a bug in the illegal phase handler that
	caused us to drop down to narrow when handling the
	unexpected command phase case after 3rd party
	reset of a packetized device.

	Indicate the features, bugs, and flags set in the softc
	that are used to control firmware patch download when
        booting verbose.

aic79xx.h:
	Add coalessing and HS_MAILBOX fields.

	Add per-softc variables for the stats "daemon".

	Add a debug option for interrupt coalessing activities.

	Add two new softc flags:
	o AHD_UPDATE_PEND_CMDS
	  Run ahd_reset_cmds_pending() on the next unpause.

	o AHD_RUNNING_QOUTFIFO
	  Used to catch recursion through ahd_run_qoutfifo().

aic79xx.reg:
	Correct register addresses related to the software timer
	and the DFDBCTL register.

	Add constants paramaterizing the software timer.

	Add scratch ram locations for storing interrupt coalessing
	tunables.

	Break INTMASK in SEQITNCTL out into INTMASK1 and INTMASK2.
	In at least the REV A, these are writable bits.  We make
	use of that for a swtimer workaround in the sequencer.

	Since HS_MAILBOX autoclears, provide a sequencer variable
	to store its contents.

	Add SEQINT codes for handling task management completions.

aic79xx.seq:
	Correct ignore wide residue processing check for
	a wide negotiation being in effect.  We must be
	in the SCSI register window in order to access the
	negotiation table.

	Use the software timer and a commands completed count to
	implement interrupt coalessing.  The command complete is
	deferred until either the maximum command threshold or a
	the expiration of a command deferral timer.  If we have
	more SCBs to complete to the host (sitting in COMPLETE_SCB
	lists), always try to coaless them up to our coalessing limit.
	If coalessing is enabled, but we have fewer commands oustanting
	than the host's min coalessing limit, complete the command
	immediately.

	Add code to track the number of commands outstanding.
	Commands are outstanding from the time they are placed
	into the execution queue until the DMA to post completion
	is setup.

	Add a workaround for intvec_2 interrupts on the H2A4.
	In H2A4, the mode pointer is not saved for intvec2, but
	is restored on iret.  This can lead to the restoration
	of a bogus mode ptr.  Manually clear the intmask bits and
	do a normal return to compensate.  We use intvec_2 to
	track interrupt coalessing timeouts.

	Since we cannot disable the swtimer's countdown, simply
	mask its interrupt once we no longer care about it firing.

	In idle_loop_cchan, update LOCAL_HS_MAILBOX everytime
	we are notified of an HS_MAILBOX update via the
	HS_MAILBOX_ACT bit in QOFF_CTLSTA.  We have to use a
	local copy of persistant portions of the HS_MAILBOX as
	the mailbox auto-clears on any read.

	Move the test for the cfg4istat interrupt up an instruction
	to hopefully close a race between the next outgoing selection
	and our disabling of selections.

	Add a missing ret to the last instruction in load_overrun_buf.

	Add notifications to the host of task management
	completions as well as the completions for commands
	that completed successfully before their corresponding
	TMF could be sent.

	Hold a critical section during select-out processing
	until we have a fully identified connection.  This
	removes a race condition with the legacy abort handler.

	Correct a few spelling errors in some comments.

aic79xx_inline.h:
	Call ahd_reset_cmds_pending() in ahd_unpause if required.

	Update cmdcmplt interrupt statistics in our interrupt
	handler.

	Allow callers to ahd_send_scb() to set the task management
	function.

aic79xx_pci.c:
	Disable SERR and pause the controller prior to performing
	our mmapped I/O test.  The U320 controllers do not support
	"auto-access-pause".

aic79xx_osm.c:
	Set the task management function now that
	ahd_send_scb() doesn't do it for us.  We
	also perform a lun reset in response to BDR
	requests to packetized devices.
2003-01-20 20:17:35 +00:00
Sam Leffler
fa15ece030 gc dead code 2003-01-20 19:45:09 +00:00
Poul-Henning Kamp
552947cc40 #if 0 one more line to make this compile without subr_disklabel.c.
Hopefully forgiven by:	scottl
2003-01-20 19:43:46 +00:00
Justin T. Gibbs
3d46a68893 Allow constants to be complex expressions so long as those
expressions can be fully evaluated during assembly.

Remove the numerical_value portion of the grammer which is
no longer referenced.
2003-01-20 18:02:11 +00:00
Justin T. Gibbs
357c1c6a4c Fix the last reference to the reg_print.c file handle
in symtable_dump.  This allows the assembler to operate
without generating this file.
2003-01-20 18:01:37 +00:00
Scott Long
866723162a Remove stale reference to deprecated mini-disklayer stuff. 2003-01-20 16:15:47 +00:00
Orion Hodson
4a532ff091 Re-implemention of the interpolation code used for sample rate
conversion.  The new version has improved interpolation accuracy and
maintains the timing relationship between the input and output signals
exactly.

Approved by:	cg
2003-01-20 00:54:24 +00:00
Josef Karthauser
f4e618b499 Regen 2003-01-20 00:51:19 +00:00
Sam Leffler
c9def0f441 default tx error rate limiting to 0 to disable tx error msgs; this is
consistent with how the old driver worked
2003-01-20 00:50:36 +00:00
Josef Karthauser
6ee4bee25a Support for the "Seiko Epson Perfection 1260 scanner".
Submitted by:	Michael Lestinsky <michael@lestinsky.de>
MFC After:	3 days
2003-01-20 00:41:30 +00:00
Søren Schmidt
7fc7425df3 Small change to the previous commit, zero out the 48BIT flag in ata_command
instead of in dmadone.
2003-01-19 20:18:07 +00:00
Mike Barcroft
72ea009571 Change BUS_SPACE_UNRESTRICTED (~0ul) to plain ~0 when used in the
'int nsegments' argument to bus_dma_tag_create().  ~0ul does not fit in
an int on machines with 64 bit longs.

Noticed by:	alpha tinderbox
2003-01-19 15:13:41 +00:00
Poul-Henning Kamp
0f76d6d822 Finally give CCD the disk mini-layer treatment:
CAUTION:

        Previously CCD would be different from all other disks in
        the system in that there were no "ccd0" device, only a
        "ccd0c" device.

        This is no longer so after this commit.  If you access a
        ccd device through the "/dev/ccd0c" device _and_ have not
        actually put a BSD disklabel on the device, you will have
        to use the name "/dev/ccd0".  If your CCD device contains
        a BSD disklabel there should be no difference.

        You need to recompile ccdconfig(8) using the changed
        src/sys/sys/ccdvar.h for the -g "show me" option to work.

        I have run the regression test I created before I started
        overhauling CCD and it flags no problems, but this code
        is mildly evil, so take care.  If you would cry if you lost
        what's on CCD, make a back before you upgrade.

Create separate cdevsw for the /dev/ccd.ctl device.

Remove the cloning function, the disk-minilayer will do all naming
for us.

Remove the ccdunit and ccdpart functions and carry the softc pointer
in the relevant dev_t's and structures.

Release all memory when a CCD device is unconfigured, previously
the softc would linger behind.

Remove all traces of BSD disklabel fiddling code.

Remove ccdpsize, the disk mini-layer does this for us.

Don't allocate memory with M_WAITOK in ccdstrategy().

Remove boundary checks which the disk mini-layer does for us.

Don't allocate space for more than 2 ccdbuf, RAID was never implemented.

NB: I have not tried to address any of the preexisting ailments of CCD.
2003-01-19 15:00:58 +00:00
Poul-Henning Kamp
1dccd08a34 Unifdef -UDEBUG on the CCD driver. The debugging is mostly useless
and can be added back selectively, should anybody start to interest
themselves for the internal workings of ccd.

This commit will make the diffs for the following commits much more
readable.
2003-01-19 14:35:38 +00:00
Søren Schmidt
188869473d Add support for the ServerWorks CSB6.
The support for the 3'rd channel is only experimental.
2003-01-19 13:03:20 +00:00
Søren Schmidt
15fa4bd593 Fix the 48bit access support for the older Promise 66/100 controllers, the
first attempt was wrong and could cause r/w timeouts.

Add yet another Promise PCI id.
2003-01-19 11:47:32 +00:00
David E. O'Brien
2d3ce7133a Remove miidevs.h and generate it from miidevs at compile time.
The devlist2h.awk tool to do this has been repocopied to sys/tools/.
2003-01-19 02:59:34 +00:00
Poul-Henning Kamp
e9fe7d1f7f Inline now trivial functions getccdbuf() and putccdbuf().
Fix another trivial memory-leak.
2003-01-18 12:23:49 +00:00
Poul-Henning Kamp
6b267654ab Fix minor memory-leak. 2003-01-18 11:33:06 +00:00
Poul-Henning Kamp
b51ea35631 Use the M_CCD malloc bucket instead of M_DEVBUF.
Don't keep a private freelist of a low number of trivially small structures.
2003-01-18 11:04:41 +00:00
Poul-Henning Kamp
360d71d1b5 Inline trivial function ccdintr() into its one caller ccdiodone().
Only call ccdfind() once in ccdiodone() and cache the result.
2003-01-18 10:44:17 +00:00
Poul-Henning Kamp
3b1746df8b Sanitize the copyright section a bit: We do not need two copies of the
four-clause BSD license in the file, one will do.
2003-01-18 10:08:27 +00:00
Marcel Moolenaar
da5e9a5bd6 MFp4: Add support for memory mapped UARTs, but don't add any devices
yet that depend on it because sio(4) needs support for it before it
can be used. There's no reason why zs(4) couldn't attach to puc(4)
in the (near?) future (in principle), so don't make memory mapped I/O
support in sio(4) a precondition for this change.
2003-01-18 02:54:16 +00:00
Takeshi Shibagaki
5770575cfc Add BUFFALO LPC-CF-CLT(10Base-T Compact Flash Ether Card). 2003-01-18 02:14:23 +00:00
Takeshi Shibagaki
d7c38c4ccc Regen. 2003-01-18 02:13:10 +00:00
Takeshi Shibagaki
708d4a51e6 Add Accton EN2216. 2003-01-18 01:14:48 +00:00
Takeshi Shibagaki
4779186a05 Regen. 2003-01-18 01:14:01 +00:00
Takeshi Shibagaki
3f9970c831 Add Allied Telesis WR211PCM. 2003-01-17 18:41:32 +00:00
Takeshi Shibagaki
57fc3d9703 Regen. 2003-01-17 18:40:31 +00:00
Hidetoshi Shimokawa
ae8c82bbe9 Replace M_DONTWAIT with M_NOWAIT for malloc().
Pointed out by: nate@root.org
2003-01-17 15:15:21 +00:00
Hidetoshi Shimokawa
0ef6095d41 Improve some debug massages. 2003-01-17 15:03:57 +00:00
Hidetoshi Shimokawa
6340b71e5f Fix bus manager election process.
- Lock response 0x3f means that the host becomes the bus manager.
- Add missing htonl().
2003-01-17 15:03:25 +00:00
Poul-Henning Kamp
ddbf51af0c Find places to store the previously implicityly passed unit number in
the three configuration ioctls which need a unit number.

Add a "ccd.ctl" device for config operations.

Implement ioctls on ccd.ctl which rely on the explicityly passed
unit numbers.

Update ccdconfig to use the new ccd.ctl interface.

Add code to the kernel to detect old ccdconfig binaries, and whine
about it.

Add code to ccdconfig to detect old kernels, and whine about it.

These two compatibility measures will be retained only for a limited
period since they are in the way of GEOM'ification of ccd.
2003-01-17 14:53:53 +00:00
Hidetoshi Shimokawa
7643dc189d Detect underrun of IT queue for debugging.
Add some comments.
2003-01-17 03:52:48 +00:00
Joerg Wunsch
652dfa8341 Make vinum disk-related devices readable by group "operator" to match
the configuration of any other disk-like devices.

(This is the DEVFS-only part, so no need to MFC.)

PR:		bin/28294, bin/32588
2003-01-16 23:47:04 +00:00
Warner Losh
e2fcd48525 Restore a comment that was lost in the shuffle. 2003-01-16 23:38:08 +00:00
Greg Lehey
0fd9f133ba Correct typo.
Submitted by:	Alan Day <alan@alanday.com>
MFC after:	2 weeks
2003-01-16 23:37:26 +00:00
Hidetoshi Shimokawa
e2ad5d6e8c Improve memory allocation.
- Don't use contigmalloc() and allocate page by page to avoid
	allocation failure.
- allocate buffer by PAGE_SIZE.
2003-01-16 13:09:33 +00:00
Hidetoshi Shimokawa
97ae6c1f15 Use cycleMatch for precise IT DMA start timing. 2003-01-16 07:01:54 +00:00
Sam Leffler
11411c79c7 wi-specific host ap support no longer needed now that it uses
the core 802.11 code

Reviewed by:	imp
2003-01-15 20:12:50 +00:00
Sam Leffler
474b12ddf0 new wi driver that uses the 802.11 link layer code
Reviewed by:	imp
Obtained from:	NetBSD (originally)
2003-01-15 20:11:31 +00:00
Hidetoshi Shimokawa
744bdf5752 DV_PAL shouldn't be here. 2003-01-15 05:28:50 +00:00
Hidetoshi Shimokawa
6d6f7f2891 Add DV_PAL for PAL users. 2003-01-15 05:26:23 +00:00
Hidetoshi Shimokawa
4ed65ce9e1 Fix IT DMA underun while bus reset.
- Reduce number of DELAY's
2003-01-15 04:21:16 +00:00
Matthew N. Dodd
6dc61b5ae5 - GC a few more hand-rolled 'abs' macros.
- GC a few hand-rolled min()/max() macros while I'm here.
2003-01-15 02:15:57 +00:00
Matthew N. Dodd
e2fdcaf285 - Add inline functions for {ll,l,}abs() to libkern.
- Remove hand rolled abs() functions.
2003-01-15 02:02:33 +00:00
Matthew N. Dodd
c94b6ebc27 Suspend/resume support (mostly for MiniPCI Prism2.5 boards).
Reviewed by:	 imp
2003-01-14 23:19:32 +00:00
Josef Karthauser
e22514406d Some USB devices are not prepared to deal with a single byte string
descriptor request, which usbd_get_string_desc() uses to get the
length of a descriptor.  One device for instance returns a full 8
byte long packet instead which confuses the rest of the stack and
leads to the USB port being reset.  The fix is to instead request
two bytes, but not to complain if we only get one.

Submitted by:	kan
MFC after:	3 days
2003-01-14 23:07:43 +00:00
Nate Lawson
d6b992c723 For the cpu throttling message, s/enabled/available
Requested by:	many
2003-01-14 19:39:41 +00:00
Nate Lawson
608654d473 Remove bogus locking from dc(4). Instead, move interrupt allocation
and ether_ifattach() to end.  This fixes a "could sleep" case and
simplifies error exit cases as well.  Also be sure to set errno
and clean up resources in !mac error case.

Tested by:	Ryan Beasley
2003-01-14 19:31:27 +00:00
Olivier Houchard
e550089d43 Don't call destroy_dev it a channel has children.
vchan creation doesn't lead to /dev entry creation if the new vchan is the
first child of a channel,
This fix a panic that happens when loading a sound driver module, creating
vchans and unloading the driver.

Approved by:	cg
MFC after:	3 days
2003-01-14 17:13:52 +00:00
Benno Rice
2c2d1d071e Make the base pcib_route_interrupt method available to other pci-pci bridge
sub-classes.

This allows the powerpc kernel to build again.

Forgotten by:	benno
Spotted by:	grehan
2003-01-14 11:37:56 +00:00
Hidetoshi Shimokawa
5dda08514e Fix for FreeBSD-4.
- Protect whole fw_tbuf_update() with splfw().
2003-01-14 08:35:45 +00:00
Scott Long
2ffaffaa6e Since reseting the SCSI busses via the passthrough interface usually
confuses the controller, tell CAM not to do it.  Also report the
correct error condition to CAM when it tries to probe a target that
doesn't exists.
This should make the CAM interface less risky to use.

MFC After:	3 days
2003-01-13 23:51:14 +00:00
Poul-Henning Kamp
26d48b4044 OK Ok, so I didn't check the NO_GEOM case for the final version...
Stumbled on by:	bde
2003-01-13 20:19:04 +00:00
Orion Hodson
916aaded05 Add Realtek ALC650 id.
Submitted by:	"Mikko S. Hyvarinen" <morphy@morphy.iki.fi>
MFC after:	5 days
2003-01-13 17:43:49 +00:00
Orion Hodson
a7697e5514 Add nForce2 device id.
Submitted by:	"Mikko S. Hyvarinen" <morphy@morphy.iki.fi>
MFC after:	5 days
2003-01-13 17:42:13 +00:00
Poul-Henning Kamp
a4f8615810 Enable the new h0h0magic code which on GEOM kernels make the md(4)
driver a _real_ GEOM driver.
2003-01-13 17:31:46 +00:00
Hidetoshi Shimokawa
0aaa9a23cd Minimal fix for DV part.
- Don't panic on contigmalloc failure.
- Calculate timestamp by feedforward rather than feedback which depends on
	unreliable interrupt timing.
- Overwrite timestamp in CIP header correctly.
- Add debug code for timestamp synchronization.
- Add comments.
2003-01-13 16:08:09 +00:00
Hidetoshi Shimokawa
d0035474c3 Merge big endian and little endian case.
Fill fdf bit fields and others.
2003-01-13 15:08:48 +00:00
Poul-Henning Kamp
0f8500a5b3 Add a mutex around the per unit bioqueue.
Only grab giant in the per unit kthread for SWAP and VNODE backed devices.

Initialize the bioq before the kthread gets a chance to study it.

Don't lock Giant in mddone_swap, we shouldn't need it.
2003-01-13 08:50:23 +00:00
Poul-Henning Kamp
64bfc43b26 Remove the printf which announces the creation of malloc disks: it is
inconsistent when we do not do it for swap or vnode.

We still printf for preloaded disks because of the weak debugging
options people have in embedded/tiny environments where this is
usually used.
2003-01-13 08:01:09 +00:00
David E. O'Brien
44ea4fc8d6 Regenerate 2003-01-13 03:58:41 +00:00
Matthew Dillon
48e3128b34 Bow to the whining masses and change a union back into void *. Retain
removal of unnecessary casts and throw in some minor cleanups to see if
anyone complains, just for the hell of it.
2003-01-13 00:33:17 +00:00
Poul-Henning Kamp
6f4f00f114 Add code to make md(4) a GEOM device driver instead of relying in
the disk mini-layer.

This is currently not enabled.
2003-01-12 21:16:49 +00:00
David E. O'Brien
f9b7742405 Partial support for the nVidia nForce2 chipset's on-board Broadcom/Altima PHY
and 3com MAC.  Specifications for the Altima PHY are available at:
   http://www.altimacom.com/products/ac101L.html

Submitted by:	Mikko S. Hyvarinen <morphy@morphy.iki.fi>
2003-01-12 21:03:38 +00:00
Poul-Henning Kamp
a522a15950 Shift things around a bit in preparation for future evilness. 2003-01-12 17:39:29 +00:00
Warner Losh
26b6ab4e45 Make compile cleanly when USB_DEBUG is defined. 2003-01-12 08:28:14 +00:00
Matthew Dillon
cd72f2180b Change struct file f_data to un_data, a union of the correct struct
pointer types, and remove a huge number of casts from code using it.

Change struct xfile xf_data to xun_data (ABI is still compatible).

If we need to add a #define for f_data and xf_data we can, but I don't
think it will be necessary.  There are no operational changes in this
commit.
2003-01-12 01:37:13 +00:00
Joerg Wunsch
294d88444b Bail out of fd_clone() if the parsed unit number doesn't match our
expectation.

This solves the problem, where in a constellation with two (or more)
drives, an attempt is made to access a device name for that device
using a historic partition letter, like /dev/fd1c.  This is supposed
to create a symlink to the master device, but previously, the link was
always created to /dev/fd0, even if the request was for fd1*.
2003-01-11 20:10:41 +00:00
Eric Anholt
55dbef54ca Add support for the Intel 82820 UP-only AGP bridge.
PR:		41466
Submitted by:	NIIMI Satoshi <sa2c@sa2c.net>
MFC after:	1 week
2003-01-11 20:08:28 +00:00
Takeshi Shibagaki
2b687084b6 Change to correct card entry. RATOC REX-R280 is 10Base-T Ether Card,
RATOC REX-9530 is SCSI2 Card.
2003-01-11 13:04:59 +00:00
Takeshi Shibagaki
ef967a91bd Regen. 2003-01-11 13:01:40 +00:00
Takeshi Shibagaki
b40e62fd9d RATOC REX-R280(10Base-T Ether Card) and REX-9530(SCSI2 Card) have
same product id. So use CIS info(PCCARD_CISTPL_VERS_1).
2003-01-11 13:00:56 +00:00
Sam Leffler
4f0797a36d correct printf format
Noticed by:	alpha tinderbox
2003-01-11 04:55:52 +00:00
Jake Burkholder
776c5378cb Reset the channel in attach if its not the console. 2003-01-11 04:15:46 +00:00
Scott Long
f30ac74cb0 Major bugfixes for large memory and fast systems.
aac.c:
        Re-arrange the interrupt handler to optimize the common case of
        the adapter interrupting us because one or more commands are complete,
        and do a read across the pci bus to ensure that all posted status
        writes are flushed.  This should close a race that could cause command
        completion interrupts to be lost.
        Follow the spec a bit closer when filling out command structures.
        Enable the Fast Response feature to eliminate the need for the card
        to DMA successfull command completions back into host memory.
        Tell the controller how much physical memory we have.  Without this
        there was a chance that our DMA regions would collide with the
        memory window used by the cache on the controller.  The result would
        be massive data corruption.  This seemed to mainly affect systems with
        >2GB of memory.
        Fix a few whitespace problems.

aac_debug.c:
        Add an extra diagnostic when printing out commands.

aac_disk.c:
        Add extra sanity checks.

aacreg.h:
        Prepare for making this 64-bit clean by reducing the use of enumeration
        types in structures.

Many thanks to Justin Gibbs for helping track these down.
2003-01-11 01:59:21 +00:00
Martin Blapp
e808cf6260 When reading PHY regs over the i2c bus, the turnaround ACK bit
is read one clock edge too late. This bit is driven low by
slave (as any other input data bits from slave) when the clock
is LOW. The current code did read the bit after the clock was
driven high again.

Reviewed by:	luoqi
MFC after:	2 weeks
2003-01-10 08:09:58 +00:00
Warner Losh
948c244d94 Add preliminary support for the Hawking PN672TX CardBus cards.
# Preliminary because there are some subtle things the NetBSD driver does
# that we don't do yet.  My card works for me w/o them.
2003-01-10 05:37:15 +00:00
Eric Moore
d163d5b8c8 Fix for DELL PERC firmware. Driver was hanging
during load time; this attributed to the mailbox
busy byte not being set prior to issuing a
polling command.

Approved by: ps
MFC: 7 days
2003-01-09 21:02:28 +00:00
Tom Rhodes
38deb45fc3 Add support for the Davicom DM9009 chipset.
PR:		46859
Submitted by:	Boaz Haberman <boaz@ool-182f8b09.dyn.optonline.net>
Approved by:	rwatson
2003-01-09 20:51:39 +00:00
Søren Schmidt
610e02649a Dont probe PnP devices.
Submitted by: Takahashi Yoshihiro <nyan@FreeBSD.org>
2003-01-09 14:00:07 +00:00
Søren Schmidt
2768d40bf1 Fix typo
PR: 45375
2003-01-09 13:54:07 +00:00
Hidetoshi Shimokawa
435dd29b27 - Add error messages for bulkxfer.
- Reduce register access.
2003-01-09 10:25:07 +00:00
Warner Losh
52b019b3ed Merge from NetBSD and arrange for FreeBSD's slight differences in
ucom.

This gets my Sanyo SCP-4900 working.

Approved by: joe
2003-01-09 04:24:28 +00:00
Thomas Moestl
a0de7a9e73 Add detach, shutdown, suspend and resume methods.
Tested by:	jake
2003-01-09 00:45:10 +00:00
Jake Burkholder
6bfa8a2ef2 Split this into bus specific front end(s), so that it can be used by ppc.
This abstracts out all the differences I could see between the netbsd
sparc64 and macppc zs drivers.   In particular the offsets of the csr and
data registers are different, so we use a separate bus handle for each and
use bus_space_subregion to add the bus specific offsets.

Requested by:	benno
2003-01-08 23:36:16 +00:00
Thomas Moestl
cbbdf2367e Add detach, shutdown, suspend and resume methods. The latter two are
not really tested, but are derived from the original NetBSD version.
2003-01-08 20:12:45 +00:00
David E. O'Brien
ae5c9e57b8 Fix module dependancy name.
PR:		46871
Submitted by:	Hartmut Brandt <brandt@fokus.gmd.de>
2003-01-08 18:53:38 +00:00
Søren Schmidt
fb02f8eeb8 Dont attach a Promise chip located behind a i960 bridge/chip.
This makes it possible to run a Promise SuperTrak SX6000 with
OS type set to "Other" as well as "Linux".
2003-01-08 17:44:36 +00:00
Søren Schmidt
4b4f97ae4c Add support for the nVidia nForce2 ATA part.
Fix support for the nForce1 as well, registers are offset 0x10
against the AMD/VIA parts.
2003-01-08 16:51:41 +00:00
Søren Schmidt
837832bc18 Add code that works around the problem that the older Promise
controllers (ultra/fasttrak-66/100) fails on 48bit accesses.
2003-01-08 10:03:31 +00:00
Scott Long
adb0a47475 Destroy the management device when detaching the driver. 2003-01-08 06:30:34 +00:00
Matthew N. Dodd
dd815daba5 - Add acpi module binding.
- Restore speed and format settings on resume for CS423x and
  CS423x-PCI devices.
2003-01-08 06:24:25 +00:00
David Xu
ce5c58974a Retry to get full device descriptor, this let my slow CD Tower device work. 2003-01-08 05:03:35 +00:00
Jake Burkholder
a6517875d0 Use bus_space_subregion to add offsets to bus handles instead of doing
it manually.
2003-01-08 04:30:30 +00:00
Prafulla Deuskar
bddfcc8792 The README refers to a LICENSE file, so add that file too.
BTW the license is also embedded in the source files.

MFC after:	1 day
2003-01-07 19:36:00 +00:00
Hidetoshi Shimokawa
9a7d0adfaa - Fix print format for FreeBSD-4
- Reduce debug message.
2003-01-07 12:58:08 +00:00
Hidetoshi Shimokawa
64666ed6e7 Don't call fw_bus_probe() twice when successive self-id packets received.
This change should stabilize SBP-II device probing.
2003-01-07 04:26:45 +00:00
John Polstra
029e2ee3ee Put the ASIC revision into the device description string so it appears
in the dmesg output.

MFC after:	3 days
2003-01-07 01:33:03 +00:00
John Polstra
671116122b Don't reference the maxlen and flags fields in the ring control blocks
as separate 16-bit entities.  Some of the ring control blocks are
in NIC memory, so they must be referenced using 32-bit accesses.
Smaller accesses have been observed to fail under some conditions.
This caused the rings to be set up wrong, leading to writes by the
card outside of the intended bounds of the rings.  This problem was
diagnosed by Michael Barthelow.  Don Bowman submitted a patch which
fixed the problem using a slightly different approach.

Reference ring control blocks in NIC memory using a pointer to
volatile.

Parenthesize the BGE_HOSTADDR macro definition properly.

MFC after:	3 days
2003-01-06 23:46:47 +00:00
Thomas Moestl
195530b9dd Convert to use bus_dmamap_load_mbuf(); decouple software TX descriptors
from the hardware descriptors to avoid the overhead of having a DMA
map for each of them. Bump the number of hardware descriptors to 128,
and use half as many software descriptors for now.
Some minor cleanups.
2003-01-06 22:12:57 +00:00
Thomas Moestl
305f2c0632 - Convert to use bus_dmamap_load_mbuf().
- remove DPRINTF(), there is a CTR*() for any of them, and KTR is
  far more useful to debug this driver.
- some cleanups; remove some unused code and definitions.
2003-01-06 22:09:01 +00:00
Sam Leffler
45a0c8fe56 fix memory allocation problems and collateral damage:
o create a separate tag for each object allocated with bus_dmamem_alloc so
  the tag's maxsize is setup appropriately; this reduces memory allocation
  for the queue descriptors from 16M to what it should be and also fixes
  memory allocation for public key operands
o release bus dma resources on detach so module usage doesn't leak
o remove public key op disable now that bus dma memory allocation is fixed
o collect attach error handling in one place

Sponsored by:	Vernier Networks
2003-01-06 21:23:06 +00:00
Hidetoshi Shimokawa
17faeefca6 Use device_printf() and s/fc->dev/fc->bdev/. 2003-01-06 08:07:20 +00:00
Hidetoshi Shimokawa
9bfd777adb Fix fc->dev to fc->bdev. 2003-01-06 05:57:48 +00:00
Mike Barcroft
51afc2ad43 Avoid casting pointers to int and using %x to print them.
Noticed by:	alpha tinderbox
2003-01-05 16:23:49 +00:00
Hidetoshi Shimokawa
a423957600 Reduce diff to RELENG_4. 2003-01-05 14:58:45 +00:00
Hidetoshi Shimokawa
bda19384a1 Syntax fix in fwohci_pci_suspend(). 2003-01-05 09:12:47 +00:00
Brian Feldman
a8be3e63ce Fix the duplicate unlock of the pcm read channel in certain cases.
Reviewed by:	cg
2003-01-05 07:32:33 +00:00
Hidetoshi Shimokawa
94b6f028fd - Change definition of fc->maxrec same as fwdev->maxrec.
- 'spec' and 'ver' are attributes of a unit rather than a node.
- Report Phy and Link info separatelly.
- Reorder intialization step in fwohci_reset().
2003-01-05 06:21:30 +00:00
Jake Burkholder
a720ae1bbe Sync with zs.
- Fix some bogosity with mixing unit numbers and channels, which would only
  work for one instance of the device.
- Use a simpler scheme for input and output queueing.
- Use db_alt_break.
2003-01-05 04:07:31 +00:00
Hidetoshi Shimokawa
bce5729a9d - Remove speed_map API because speed_map is obsoleted by 1394a.
- Add definition of OHCI_HCC_BIBIV in fwohcireg.h.
2003-01-04 16:03:50 +00:00
Hidetoshi Shimokawa
7ddbf617b1 - Handle zero sized directory right way.
- Staticize.
2003-01-04 10:32:31 +00:00
Hidetoshi Shimokawa
d6105b602c - Replace printf() with device_printf().
- Separate fc->dev (i.e. fwohci0) and fc->bdev (i.e. firewire0).
- Remove unused firewirebusreg.h.
- Reduce size of descriptor block for asynchronous transmit and
	check the number of descriptor when copying from mbuf.
- Skip mbuf whose length is zero. NFS seems passing such mbuf and
	some chips generates unrecoverable error.
2003-01-04 10:21:11 +00:00
Hidetoshi Shimokawa
9339321d89 - Propagate suspend/resume to child devices.
- Restore pci config registers after resume.
- Reinitialize and start rx buffers after resume.
- Don't reallocate memory in fwohci_db_init() if the dbch is
	already initialized.
- Fix typo.
- Some clean up.
2003-01-04 06:40:57 +00:00
Poul-Henning Kamp
f05f44f0f2 Remove CCDF_SWAP and CCDF_PARITY, they have never been implemented. 2003-01-03 08:57:40 +00:00
Poul-Henning Kamp
e2a3ea1c45 Remove unused second argument from DEV_STRATEGY(). 2003-01-03 05:57:35 +00:00
Poul-Henning Kamp
d616ee081f Remove unused second argument from BIO_STRATEGY() 2003-01-03 05:51:11 +00:00
Jake Burkholder
777cc88b9d - This damnable chip only has 1 status register for both ports, so the bit
positions for the status bits of port a and port b are different.  To
  avoid needing to know which channel the interrupt handler is working on,
  shift the status bits for port a into the port b bit positions, and always
  check the port b status bits.  This fixes using port b, which I neglected
  to test before.
- Remember to update the channel's tty structure from the passed in termios
  in the param routine.
- Minor style.
2003-01-02 19:04:35 +00:00
Warner Losh
3225a9881d Update to correct NetBSD Id 2003-01-02 04:22:44 +00:00
Matt Jacob
76514802bd Make compiles (LINT and/or ISP_TARGET_MODE options) happier by making sure
printf type format args and actual args match.

Reviewed by:	Sam Leffler <sam@errno.com>
2003-01-02 04:21:52 +00:00
Warner Losh
d77b690ff6 Sync to 1.104 of usbdevs 2003-01-02 04:21:38 +00:00
Warner Losh
cb33fc95b9 Add NEODIO TURBOCONNECT (from NetBSD) 2003-01-02 04:21:04 +00:00
Warner Losh
1732632481 MFNetBSD through 1.42 (to be committed in a moment by me).
o Whitespace nits
o NEODIO added
2003-01-02 04:15:55 +00:00
Alexander Kabaev
851d388443 Do not print the value of sc pointer before is has been ininialized. 2003-01-02 02:46:13 +00:00
Alexander Kabaev
64fe778489 Create debug sysctl nodes if USB_DEBUG is defined.
UBSA_DEBUG is inconsistent with other drivers.
2003-01-02 02:38:57 +00:00
Warner Losh
82e10e2428 It appears that the SANYO SCP-4900 needs similar quirks to the
Metricom Ricochet GS modem.  Add them here.

# A new umodem appears to be needed to make the sanyo phone work, but that's
# more extensive and will come after coordination.
2003-01-01 20:21:48 +00:00
Warner Losh
4dac02c8db Sync to usbdevs 1.103 2003-01-01 20:18:58 +00:00
Warner Losh
4cce0eba8d Add Sanyo SCP-4900 phone. It needs quirks. 2003-01-01 20:18:15 +00:00
Warner Losh
f56d03c008 Now that we've 'branched' 5.0, desupport FreeBSD 3.x in this driver. It
appears that NetBSD has already done this in their tree.
2003-01-01 20:15:42 +00:00