Commit Graph

15674 Commits

Author SHA1 Message Date
tsutsui
2fe24b8c7f Use strlcpy() rather than strncpy() + `\0' termination. 2003-09-27 17:42:11 +00:00
mycroft
c82b47f9bc Fix a non-fatal race condition. 2003-09-27 15:56:03 +00:00
mrg
871eae696e add new driver for broadcom BCM4401 chipset (as seen on recent dell
laptops) written by Cliff Wright <cliff@snipe444.org> and tested by
yours truly.

XXX: missing mcast filter support.

thanks cliff!
2003-09-27 13:13:28 +00:00
tls
d0ffab287c Remove NOSETTLE flag from channel in FibreChannel case. It makes sense that
it should be there, but in practice, on some systems an ugly race condition
rears its head: SCSI commands are issued before the FC thread ever runs, and
fail from then on forever.  Yuck.
2003-09-27 03:43:08 +00:00
wiz
db579612f4 Definition, not defintion. From miod@openbsd. 2003-09-26 22:25:21 +00:00
tsutsui
b299c2186f Remove casts and use %x in printf for tc_offset_t,
which is int32_t on both alpha and pmax.
2003-09-26 17:17:47 +00:00
matt
4c294aa149 Add DELL Perc 4/di (from Freebsd). 2003-09-26 16:31:08 +00:00
simonb
5c54e29374 Cast through (void *) to appease gcc3. 2003-09-26 16:02:24 +00:00
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