Commit Graph

15716 Commits

Author SHA1 Message Date
mycroft
c7d415bac1 Fix off-by-one problem in array size. 2003-09-26 16:00:12 +00:00
matt
d685af4b25 Regen. 2003-09-26 07:47:14 +00:00
matt
90bc204d53 Add Dell Perc 4/DI 2003-09-26 07:45:15 +00:00
thorpej
a398d77171 Confirmed; don't need to query stripe size on TwinStor. 2003-09-26 03:11:41 +00:00
thorpej
abcd16ecc6 Fix up the TWEIO_COMMAND code to actually work. The 3ware management API
library can now communicate with the card.
2003-09-25 22:26:40 +00:00
christos
7da4d27c12 imake this compile again. 2003-09-25 21:55:49 +00:00
mycroft
eefae40298 Hide the use of config_interrupts() in one place. 2003-09-25 19:29:48 +00:00
mycroft
864b96269c Modify the fdcattach() interface again, splitting it into two parts, so that
DRQ allocation is done earlier.
2003-09-25 19:06:19 +00:00
thorpej
1e3cfaaadc Install twereg.h and tweio.h 2003-09-25 18:05:53 +00:00
thorpej
70b9bb88c1 - Protect against multiple inclusion.
- Pull in <dev/pci/twereg.h> ourselves, as well.
2003-09-25 18:05:40 +00:00
joda
709b6b0e89 regen 2003-09-25 16:49:03 +00:00
joda
074d64615d more nvidia devices 2003-09-25 16:47:54 +00:00
pooka
2ef487b6bc autoconf goop for iavc 2003-09-25 15:58:14 +00:00
pooka
a99f02d0ee Add a driver for the CAPI-compliant AVM B1/T1 cards.
The driver backend is capable of supporting also ISA cards (no DMA)
and primary rate (PRI) cards in addition to the basic rate ones,
but I don't any to test on right now, so we don't support those
currently.

This code was originally written by Juha-Matti Liukkonen <jml@cubical.fi>
of Cubical Solutions Ltd. for FreeBSD, and was ported to NetBSD by
myself for the same company.
2003-09-25 15:53:26 +00:00
bouyer
703c60f5c6 Don't print modes we are using if we don't know which modes are really used. 2003-09-25 09:38:09 +00:00
thorpej
4fa7c2c48b - Fix a bug I introduced in a previous commit (oops).
- Add the twe_drivecommand ioctl structure.
2003-09-25 01:35:25 +00:00
mycroft
3d7395ab71 Update for new attach method. 2003-09-25 01:12:43 +00:00
mycroft
516d857707 Do fd probing after interrupts are enabled, and use tsleep() for delays.
Also try to accept a recalibrate interrupt to terminate the delay -- but that
doesn't seem to work reliably, so do a 2s timeout as well.
2003-09-25 01:05:06 +00:00
thorpej
544359b9a2 - Make CCB allocation slightly more efficient by changing how the
CCB is returned to the caller.
- Make code paths that can use twe_ccb_alloc_wait() use it, and assert
  that a CCB is always returned from that function.
- Assert that a CCB is always returned when allocating the reserved CCB
  for an AEN fetch.
2003-09-23 23:50:04 +00:00
thorpej
765ddabe83 Add a comment clarifying why we clear TWEF_AEN in twe_reset() now. 2003-09-23 23:10:53 +00:00
thorpej
1cad401c12 Separate the AEN fetching path into its own special path that uses the
reserved CCB.  This means that all remaining callers of twe_param_get*()
are called from a valid thread context, and thus have no need to use a
reserved CCB.  This will allow for further cleanup in a future commit.
2003-09-23 23:08:54 +00:00
mycroft
ab223e99bc Allow a device to reject CLEAR_FEATURE ENDPOINT_STALL (with a STALL) -- the
assumption being that the device will never use a STALL of a non-control pipe,
I guess.
2003-09-23 21:44:42 +00:00
mycroft
df8e298ddb Small changes -- if your controller clears DRV_BUSY when recalibrate completes,
you get lucky and the probe is faster.  A more complete fix will require making
the probe use interrupts, since there is no reliable way to poll.
2003-09-23 21:36:07 +00:00
martin
d505bdda83 Fix rx buffer size bitmask, do not explicitly set burst length and use 1536
bytes buffers, so this driver can finally cope with full size ethernet
packets. From Peter Bex.
2003-09-23 19:37:39 +00:00
bouyer
5a2aac1c7c Fix a typo that prevented pre-ata drives from working since 1999. 2003-09-23 16:27:10 +00:00
mycroft
f9d629fb93 Fix more probe delay and/or failure problems:
1) Don't wait for DRQ on an IDENTIFY command -- if it's not set when we see
   BSY clear, abort the command and ignore the drive.  (Do this by testing
   for DRQ in the read/write cases in __wdccommand_intr().)
2) Don't wait for DRQ to deassert when we finish an IDENTIFY (or any other
   non-block command that reads data) -- we don't do this for block I/O, and
   empirically it doesn't clear on my CF cards at all, causing a pointless 1s
   delay.
3) Add comments to some of the delay()s, and add missing ones in wdcreset()
   and the WDCC_RECAL in the so-called "pre-ATA" probe.
4) Slightly simplify the reset sequence -- we were doing an extra I/O.
5) Modify the register writability test to make sure that registers are not
   overlapped -- this can happen in some weird cases with a missing device 1.
6) Check the error register value after the reset -- if it's not 01h or 81h,
   as appropriate (see ATA spec), punt.
Tested with a number of ATA-only, ATAPI-only, mixed ATA-ATAPI, CF, and IDE
disk configurations.

Also remove the SINGLE_DRIVE nonsense again.
2003-09-23 09:19:22 +00:00
simonb
5a696d0850 Fix uninitialised variable introduced with previous change.
Patch from mlelstv.
2003-09-23 09:16:07 +00:00
mycroft
07da406c30 GC a structure element. 2003-09-23 09:11:43 +00:00
skd
f3de6832d9 Additional definitions as per SATA specifications.
Approved by Manuel Bouyer.
2003-09-23 03:55:59 +00:00
thorpej
ddfcdc4f1f Add support for dynamically attaching and detaching RAID array units. 2003-09-22 18:31:10 +00:00
thorpej
2f8976d430 Add TWEIO_{ADD,DEL}_UNIT ioctls (used by 3ware management tools). From
FreeBSD.
2003-09-22 01:44:57 +00:00
thorpej
b2b05806b3 Add a few additional control bits and opcodes. From FreeBSD. 2003-09-22 01:28:25 +00:00
thorpej
0448a55234 Improve AEN handling:
- Make AENs use the generic code table stuff.
- Add a few more AEN codes (from FreeBSD).
- Correct the context of a few AEN codes (some were listed as
  "unit context" when they're really "port context").
- Add a queue of AENs that management tools in userspace can poll
  (from FreeBSD).
2003-09-22 01:13:02 +00:00
thorpej
4431e5d2ea Fetch info about the drives during attach, and inject that info
into the msgbuf using aprint_verbose().
2003-09-21 19:46:44 +00:00
thorpej
a721d80bc9 Report the status of the logical drive (normal, degraded, etc.) at
attach time.
2003-09-21 19:33:10 +00:00
thorpej
21809f0c30 Expose the "param get" functions. 2003-09-21 19:27:27 +00:00
thorpej
291d256789 - Record more information about the array unit, including array
type and stripe depth.
- Report array type and stripe depth when attaching the logical drive.
2003-09-21 19:20:18 +00:00
jdolecek
7cea8a1389 cleanup & uniform descriptor owner handling:
* introduce fsetown(), fgetown(), fownsignal() - this sets/retrieves/signals
  the owner of descriptor, according to appropriate sematics
  of TIOCSPGRP/FIOSETOWN/SIOCSPGRP/TIOCGPGRP/FIOGETOWN/SIOCGPGRP ioctl; use
  these routines instead of custom code where appropriate
* make every place handling TIOCSPGRP/TIOCGPGRP handle also FIOSETOWN/FIOGETOWN
  properly, and remove the translation of FIO[SG]OWN to TIOC[SG]PGRP
  in sys_ioctl() & sys_fcntl()
* also remove the socket-specific hack in sys_ioctl()/sys_fcntl() and
  pass the ioctls down to soo_ioctl() as any other ioctl

change discussed on tech-kern@
2003-09-21 19:16:48 +00:00
thorpej
4cf2e784e2 Add some helper routines to fetch 1, 2, and 4 byte parameter values.
Modeled after code in FreeBSD.
2003-09-21 19:01:05 +00:00
manu
9a42b7a993 Do much more sanity checks when handling entries in the sc_scr array
of struct wsdisplay_softc. Unused entries are NULL, and there were
a lot of places where we did not checked that the caller did not
requested an operation on a NULL entry.

While we are there, one bit of KNFification, and make return code more
consistent by always returning the same code (EINVAL) when a screen
number higer than the maximum is requested.
2003-09-21 18:47:59 +00:00
thorpej
6c5904f215 Add some additional code -> description tables, and add a generic
routine to translate code -> description.  AENs will be converted
to this mechanism in a future commit.

Partially from FreeBSD.
2003-09-21 18:35:31 +00:00
nisimura
1e9ce6571c Regen. 2003-09-21 14:27:40 +00:00
nisimura
cfb11c4317 Redo, again. 2003-09-21 14:23:21 +00:00
nisimura
7fef26674d Redo the previous fix. 2003-09-21 14:12:09 +00:00
enami
a7c2135a0c Correctly resurrect the style in previous. While I'm here, also removed
whitespace at the end of line in comment.
2003-09-21 11:56:40 +00:00
bouyer
0ca58f3790 Ops, remove a line that escaped out of my local tree. 2003-09-21 11:30:43 +00:00
bouyer
9f91a8476e The return value from pciide_mapregs_* are ignored; make them return void.
Re-add support for HPT366 in compat mode.
2003-09-21 11:20:37 +00:00
bouyer
c6beeca692 Since we can't detect ghost drives in the wdc back-end, resurect
WDC_CAPABILITY_SINGLE_DRIVE.
2003-09-21 11:14:00 +00:00
nisimura
e17ee1fa3b Regen to fix the company name. 2003-09-21 07:59:04 +00:00
nisimura
54daa064f1 Fix the company name. It seems these days the company calls itself
"STMicroelectronics" anyway.
2003-09-21 07:45:13 +00:00
enami
893414b366 Make sure the message from pciide_chipen() starts at the beginning of line. 2003-09-20 22:46:02 +00:00
bouyer
d9ce986b70 Remove the "Register ghost test". It won't work, because on ATA register
of both devices are written, and device 0 will respond for device 1 if
device 1 isn't present. Pointed out by Quentin Garnier.
So the only way to know if device 1 is there or not is to send a command, which
is done later.
Detecting the second device here isn't important and won't speed up the probe.
We just need to know if there is at last one device on the bus.

Fix PR kern/22869 from Julio M. Merino Vidal.
2003-09-20 21:42:47 +00:00
jdolecek
ea7271519d regen - addition of KYE G-07 joystick entry
contributed in kern/22837 by Sergey Svishchev
2003-09-20 09:17:36 +00:00
jdolecek
63eb0e1ad8 add entry for KYE G-07 joystick
contributed in PR kern/22837 by Sergey Svishchev
2003-09-20 09:16:44 +00:00
christos
5508d7c9b8 print the name of the driver that found the ghost 2003-09-20 07:07:39 +00:00
enami
3144acc341 Now wdcattach() is called interrupts enabled, config_interrupts() tries to
call ata_raid_check_component() immediately, and panics since DMA setup
isn't done yet.  So, defer the call until attach stage is almost done.
Tested with Promise TX2000.
2003-09-20 02:19:36 +00:00
dyoung
28fe486c9f Allow channels 1-14 in MMK2, for real. Fixes PR 22530 from
FUKAUMI Naoki.
2003-09-20 01:03:30 +00:00
mycroft
d40837608f 1) Use config_interrupts() to attach IDE and ATAPI drives. This eliminates
most polling.
2) Clean up some goofiness in pciide -- get rid of the whole "candisable" path
   (it's gratuitous) and simplify the code by calling pciide_map_compat_intr(),
   *_set_modes() and wdc_print_modes() from central locations.
3) Add a register writability and register ghost test to eliminate phantom
   drives more quickly.
2003-09-19 21:35:56 +00:00
mycroft
e80260e91f Whoops, make sure 6-byte commands work again. 2003-09-18 06:55:53 +00:00
mycroft
f96fe2cc8a Don't print junk if an INQUIRY fails (usually with an ILLEGAL REQUEST due to
an unused LUN).  Also, if the qualifier says the LUN is non-existant, don't
try to attach a device here.
2003-09-18 05:06:53 +00:00
mycroft
9fa456e7b6 nluns should be 8, not 7. 2003-09-18 01:33:58 +00:00
mycroft
9dbb8c86d4 Merge the geometry and cache handling code for all direct access and optical
devices, as it's general to all SCSI MMC devices.  In the process, remove
PQUIRK_NO_FLEX_PAGE.
2003-09-18 00:06:31 +00:00
mycroft
e873dbd7ad If READ CAPACITY fails, try a READ FORMAT CAPACITIES. Separate this into
another function, always doing a page 0 MODE SENSE to get the block
descriptor if we use READ CAPACITY, and use SMS_DBD on the page 4/5 MODE
SENSE.  This does one extra command in some cases, but it separates and
simplifies the code a little.

Why do we prefer READ CAPACITY over READ FORMAT CAPACITIES?  Two reasons:
1) It's much older and is much less likely to have had its command code
abused, and is thus "safer" to try first.  2) ALL of my USB flash readers
and pen drives screw up their capacity descriptors -- mostly off-by-one
errors in the size (they return the maximum LBA number instead, a la READ
CAPACITY, which has *never* been how READ FORMAT CAPACITIES was documented
in the MMC spec), and one returns the "no media" code on slots that have
media inserted (despite returning almost-correct data otherwise)!

F*** me with a chainsaw.
2003-09-17 23:33:43 +00:00
mycroft
b2d9db1002 Remove PQUIRK_BYTE5_ZERO. 2003-09-17 19:14:56 +00:00
bouyer
65b0588afd Add back support for the legacy VT8237 IDE controller.
This wasn't an error, on this chipset we have the SATA controller on function
0 of the IDE controller, not the pcib bridge.
Fix provided by Stephen Degler.
2003-09-17 16:55:20 +00:00
drochner
b2a29ce0a3 typo in comment 2003-09-17 11:56:19 +00:00
mycroft
4b716264f7 Shuttle products do not need PQUIRK_NOTUR any more. Also removing them for the
other two items, since they are presumed unnecessary.
2003-09-17 07:49:11 +00:00
onoe
1a258bf241 Add Sony PEGA-WL110 CF WLAN 2003-09-16 08:28:55 +00:00
onoe
ac09f329a5 regen: Add Sony PEGA-WL110 CF WLAN 2003-09-16 08:27:33 +00:00
onoe
19cb1c084b Add Sony PEGA-WL110 CF WLAN 2003-09-16 08:26:37 +00:00
bouyer
e9a21b0707 Add support for Intel 82801EB Serial ATA. Not tested with a drive yet,
Matthias Scheler tested that the controller attaches properly.
2003-09-15 20:24:42 +00:00
bouyer
036c4d23c0 Add support for VIA 8237 Serial ATA. From Stephen Degler in kern/22727,
with some cleanup by me.
2003-09-15 20:15:44 +00:00
bouyer
9e1bd0b405 Regen: rename VT8237_RAID to VT8237_SATA 2003-09-15 19:51:09 +00:00
bouyer
4c46f960cc Rename VT8237_RAID to VT8237_SATA, as this is really what it is.
Suggested by Stephen Degler in kern/22727.
2003-09-15 19:50:45 +00:00
jmmv
99aaf4a240 Enable auvia_reset_codec's code and wait until the card is available.
Fixes 'invalid codec' problems (at least with AD1980).  Ok'ed by tsarna@.
2003-09-14 14:48:17 +00:00
junyoung
cc5534f795 Remove duplicate lines. 2003-09-14 13:01:40 +00:00
mycroft
10675507e9 Don't be silent if there is no media present. 2003-09-13 15:49:04 +00:00
mycroft
953ba0b251 Make sure the "raw partition" can always be opened again. 2003-09-13 14:44:50 +00:00
simonb
90fc39f5b8 Make some variables unsigned since that's the type of parameter they're
passed as to other functions.
2003-09-13 12:31:35 +00:00
jdolecek
a8cd2ca54c regen - fix description of one Intel PRO/100 VM variant, as reported
by Lars Heidieker on current-users@
2003-09-13 12:17:18 +00:00
simonb
a4852d80fc Remove an unreachable return statement (and fix a whitespace nit). 2003-09-13 12:17:12 +00:00
jdolecek
3a6c7eacfc fix description of Intel PRO/100 VM Network Controller with 82562ET/EZ PHY
don't activate any quirks for VM_6 variant
problem reported by Lars Heidieker on current-users

also don't activate any quirks for VM_3 - VM_5 variants, neither
VE_2 - VE_4, in anticipation that the more modern variants don't need
the quirks
2003-09-13 12:13:29 +00:00
jdolecek
a034152027 move dupfd from struct proc to struct lwp - it's per-LWP, not per-process; we
use curlwp where the lwp is not directly available, i.e. in device open
routines

briefly discussed on tech-kern
2003-09-13 08:32:10 +00:00
mycroft
09e452d82a Do the quirk initialization earlier. 2003-09-13 03:18:13 +00:00
mycroft
96b1a8d146 Arrange for the SCSI device to be target 0, and us to be the highest target
number.  This will make my life easier later...
2003-09-13 03:16:49 +00:00
mycroft
ec14ab4b89 The Ricoh power hackery is not reliable -- many cards just do not have the
voltage sense wired.  So, disable it and force the card to 5V by default.
Also, recode the hack to use the "direct Vcc" feature of the chip, letting
it manage the voltage directly, as this is supported on both the 296 and
396.
2003-09-12 22:09:04 +00:00
mycroft
509e3d9fce Set SCSIPI_CHAN_NOSETTLE. 2003-09-12 19:02:30 +00:00
mycroft
af0c320925 Some devices really want INQUIRY to be the first command they receive. Also,
the result of the extra TEST UNIT READY was being ignored anyway.  So, I wrote
it, I nuke it.
2003-09-12 16:39:25 +00:00
mycroft
8b05b0c1d3 In usbd_setup_pipe(), check the return value from usbd_clear_endpoint_stall(). 2003-09-12 16:22:57 +00:00
mycroft
af7e1b8144 Tweak a debugging printf(). 2003-09-12 16:18:08 +00:00
mycroft
6c1f753c7c ZIP drives don't need PQUIRK_NOTUR -- tested on both a 100 (by me) and a 250
(by gendalia).  The 100 seems to have another problem that I'm looking into.
2003-09-12 14:52:38 +00:00
ichiro
be42cc58d7 regen. 2003-09-11 11:34:46 +00:00
ichiro
7c4ee7e804 add product
Quatech Inc, PCMCIA Enhanced Parallel Port Card
2003-09-11 11:34:18 +00:00
jmmv
16091f0f1c After initialization of the AD1980 codec, swap master and surround volume
controls.  As it was before, the master volume control in all mixer programs
did nothing.  It seems that this codec is not correctly wired in (almost?)
all motherboards.

Patch by Quentin Garnier.  Fixes first part of PR kern/22548.
2003-09-11 09:21:29 +00:00
mycroft
dad4d4580d Update actlen even in the case where a TD returns an error -- this is critical
for the umass bulk-only STALL case.
2003-09-10 20:08:29 +00:00
uwe
f03574d68b G/c cs4231_round_buffersize and cs4231_round_blocksize. The round_*
mehtods are DMA-specific, so don't belong here in the first place.
SBus and EBus glue already changed to do the right thing.
2003-09-10 11:53:53 +00:00
uwe
a0a4638c6f Get rid of the disgusting struct apc_dma *dma = NULL; hack now that we
have proper definitions for offsets of APM DMA registers.

NULL out round_buffersize and round_blocksize in audio_hw_if.  We
don't seem to have any special requirements and audio(9) already
provides enough rounding.
2003-09-10 11:45:45 +00:00
uwe
725f80b71c Define APC DMA registers as offsets for bus space ops, so that we can
avoid linear mapping.  Actually, cs4231_sbus.c is already converted to
not use linear mapping of DMA registers, but it uses quick and
disgusting hack.
2003-09-10 11:37:13 +00:00
uwe
b3935a6934 Use EBDMA_BURST_SIZE_16. Introduce EBus specific round_blocksize to
make block size multiple of 16 words.  No point in using
round_buffersize that returns the argument unchanged, so just NULL it
in audio_hw_if.
2003-09-10 10:40:40 +00:00
augustss
efbfbb9402 Regen. 2003-09-10 06:54:40 +00:00