Commit Graph

28249 Commits

Author SHA1 Message Date
joerg
23abb27f60 Fix logic error 2011-05-24 15:23:41 +00:00
mrg
bb85999d1f for SPI devices, allow platform code to set "scsi-initiator-id" device
property, and if set, use it instead of pfp.PortSCSIID.

on sparc64 systems on "scsi" or "scsi-2" devices, look from our node
up the tree for a "scsi-initiator-id" property, and if present, copy
it into the device properties.

this fixes mpt(4) issues on PRIMEPOWER250 (and probably other) systems.
idea from freebsd r207243/r207287, but reworked to use our device
properties instead of platform #ifdefs.


look in "device_type" as well as "name" for "ethernet" or "network",
and also look to see if a "local-mac-address" is set when choosing if
this may be a network device.  fixes bge(4) nul ethernet address on
the same PRIMEPOWER250.
2011-05-24 10:08:03 +00:00
mrg
046a9cdb65 avoid mutex locking botch and introduce an unlocked version of
pcppi_bell_stop().  fixes a problem reported in private email.
2011-05-24 09:28:03 +00:00
buhrow
463102d28a Suggested to oster@ and approved via private e-mail as a help to
people who are getting reconstruction failures.
2011-05-24 07:33:41 +00:00
joerg
a66d2b0d4c Don't use the name of the task queue as format string 2011-05-23 21:50:44 +00:00
joerg
f62ac60184 rf_panicbuf is already format, so don't pass it as format string to
panic()
2011-05-23 21:49:35 +00:00
joerg
4f9b8d73fe Don't use the device name as format string. 2011-05-23 21:30:56 +00:00
joerg
8c8d4b56e2 Don't use string literal as format string. 2011-05-23 21:18:55 +00:00
drochner
4bd7f95161 -remove references to crypto/arc4/arc4.* -- the code isn't used
anywhere afaics
 (The confusion comes probably from use of arc4random() at various places,
  but this lives in libkern and doesn't share code with the former.)
-g/c non-implementation of arc4 encryption in swcrypto(4)
-remove special casing of ARC4 in crypto(4) -- the point is that it
 doesn't use an IV, and this fact is made explicit by the new "ivsize"
 property of xforms
2011-05-23 15:37:35 +00:00
joerg
56a181efa4 Let's not be silly. Use a fancy "if else" to decide behavior of a bool
and hope cosmic radition doesn't create a third state.
2011-05-22 22:13:33 +00:00
jdc
22439c395e Fix corrupted packet problem on 100Mb/s half duplex links.
We need to set "echo disable" on the internal phy too, not just on the
external phy.
Tested on:
  SUNW,Sun-Blade-2000
  gem0 at pci0 dev 5 function 1: Sun Microsystems ERI Ethernet (rev. 0x01)
  ukphy0 at gem0 phy 1: OUI 0x0006b8, model 0x000c, rev. 1

Setting pointed out by bad@.
2011-05-22 11:19:23 +00:00
mrg
de5a910070 match some fujitsu bge interfaces seen on PRIMEPOWER 250/450 systems.
from Michael Moll <kvedulv@kvedulv.de>, taken from openbsd.
2011-05-22 08:15:20 +00:00
mrg
cdcd8bddc9 regenerate. 2011-05-22 08:13:56 +00:00
mrg
8e96c9415e add some fujitsu ethernet id's and a new vendor id. partly from
Michael Moll <kvedulv@kvedulv.de>, taken from openbsd.

XXX: move the #if 0'd usage of PCI_VENDOR_CITICORP inside the #if 0 code
XXX: region, as this id conflits with the (4th) fijutsi id.
2011-05-22 08:13:17 +00:00
msaitoh
ab5c26c930 Add newer Wireless WiFi Link 4965 devices, Centrino Wireless-N 1030
and Centrino Advanced-N 6230
2011-05-21 12:51:47 +00:00
msaitoh
939f31d12a regen 2011-05-21 12:49:50 +00:00
msaitoh
7d7e944c06 Add some iwn(4) devices. 2011-05-21 12:48:59 +00:00
tsutsui
823c8d62ae Add a kludge to make this build on hp300.
(anyway bus independent driver should not include bus dependent sti_pci.h)
2011-05-21 12:02:55 +00:00
reinoud
9ba99564ec Fix size reporting for DVD+R/DL and BluRay's; the value was trunced due to a
32 bit trunc due to a lacking type cast. The number of sectors for such media
can be more than 1<<32-1.
2011-05-20 09:23:37 +00:00
msaitoh
e43e4777a3 82579 support. 2011-05-20 06:06:59 +00:00
msaitoh
56f5ce9baa Add support for 6050(6250 and 6150) and 6005(6205).
TODO: update iwn.4 manpage.
2011-05-20 01:59:14 +00:00
msaitoh
40d6eb691f Add PCH2 support. 2011-05-20 01:51:36 +00:00
msaitoh
f3a272623e - Add PCH2 support.
- Add 82579 support.
  - Change PBA size for PCH from 10K to 26K as FreeBSD's em-7.1.7
- Add yet another 82567V support.
- Add ICH10+HANKSVILL support.
- Add 82580 quad-1000BaseX support.
2011-05-20 00:57:42 +00:00
msaitoh
4ea65b9c4a regen. 2011-05-20 00:50:47 +00:00
msaitoh
2ecc0b2cf4 Add Intel 82567V, 82580 Quad-1000BaseX and Hanksvill with ICH10. 2011-05-20 00:50:19 +00:00
msaitoh
6687e6b65a regen 2011-05-20 00:47:11 +00:00
msaitoh
8552d6843d Add Intel 82579 2011-05-20 00:46:53 +00:00
riastradh
1e0dbea92c Reject unaligned writes to cgd.
Fixes the following PRs:

PR kern/44515 (cgd dies on non-aligned writes to the raw device)
PR kern/44964 (cgd seems to panic on unaligned writes instead of giving EINVAL)

ok christos
2011-05-19 20:34:13 +00:00
dyoung
b11777e520 #include <sys/bus.h>, not <machine/bus.h>. 2011-05-18 01:02:43 +00:00
dyoung
399cdcdfe9 MI code must #include <sys/bus.h>, not <machine/bus.h>. 2011-05-18 01:01:59 +00:00
dyoung
a6b2b8396b PCI_FLAGS_IO_ENABLED and PCI_FLAGS_MEM_ENABLED changed their functional
role in NetBSD (drivers are no longer supposed to write these to
pa_flags) without changing name.  Correct that.

Rename PCI_FLAGS_IO_ENABLED to PCI_FLAGS_IO_OKAY and
PCI_FLAGS_MEM_ENABLED to PCI_FLAGS_MEM_OKAY, thus making their names
consistent with the other PCI flags and poisoning 3rd-party driver
sources that use the flags in the old bad way.

This patch produces no binary changes in this set of PCI kernels when
they are compiled w/o 'options DIAGNOSTIC' and w/ -V MKREPRO=yes:

algor P4032 P5064 P6032
alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE
evbarm-el GUMSTIX HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321
evbarm-el IXDP425 IXM1200 KUROBOX_PRO
evbarm-el LUBBOCK MARVELL_NAS NAPPI NSLU2 SHEEVAPLUG SMDK2800 TEAMASA_NPWR
evbarm-el TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425
evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3
evbmips64-el XLSATX
evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266
evbppc OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
iyonix GENERIC
landisk GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sbmips-el GENERIC
sgimips GENERIC32_IP2x GENERIC32_IP3x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC
2011-05-17 17:34:47 +00:00
mrg
8169e46991 move and rename the uvm history code out of uvm_stat to "kernhist".
rename "UVMHIST" option to enable the uvm histories.

TODO:
- make UVMHIST properly depend upon KERNHIST
- enable dynamic registration of histories.  this is mostly just
  allocating something in a bitmap, and is only for viewing multiple
  histories in a merged form.


tested on amd64 and sparc64.
2011-05-17 04:18:05 +00:00
mhitch
08cc54d62a I was allowing adapt_max_periph to use all available command slots, which
easily exceeds the maximum of 256 tags used by the scsipi layer because
the tag information from the scsipi layer was ignored and all the tagging
is handled implicitly internal to ciss(4).  But with the DIAGNOSTIC option,
the scsipi layer does a check for > 256 tags and will panic.  So, lets just
limit the adapt_max_periph to 256 so the scsipi layer won't try to user more.
2011-05-16 17:21:37 +00:00
drochner
0fac92398a fix detach() to avoid use-after-free problems:
-stop transfers before freeing data structures
 (and comment out a useless delay)
-free devinfo later
Hot-unplugging an USB cam while in use doesn't crash my box anymore now.
2011-05-16 10:53:19 +00:00
macallan
a37153870a don't leave a mess on screen when attaching, while there use VCONS_DONT_READ
if VCONS_DRAW_INTR is set
2011-05-16 00:59:37 +00:00
christos
97a122a2f7 update from OpenBSD by msaitoh. Tested on amd64. 2011-05-15 13:56:20 +00:00
msaitoh
22c389a767 Add support for Intel 6 series. 2011-05-15 01:00:52 +00:00
msaitoh
720f669b3d regen. 2011-05-15 01:00:07 +00:00
msaitoh
66284465df Add entries for Intel 6 series' devices. 2011-05-15 00:59:36 +00:00
martin
a9fb883f63 PR kern/44956: add support for Qinheng PCI cards to the puc driver 2011-05-14 22:07:38 +00:00
martin
0264248b21 Regen 2011-05-14 21:58:48 +00:00
martin
17cff40edc Add Nanjing QinHeng Electronics, from PR kern/44956. 2011-05-14 21:57:52 +00:00
jakllsch
3af888c194 Convert remaining simplelock usage in dmover(4) to a RUN_ONCE(9). 2011-05-14 18:24:47 +00:00
jakllsch
34c3adecb2 Convert simplelock to mutex in this portion of dmover(4). 2011-05-14 14:49:19 +00:00
jakllsch
4ac4f6b4d6 Modernize simple_lock() and ltsleep() usage in dmover(4).
(Thanks to rmind for providing hints on what was necessary.)
2011-05-14 13:52:00 +00:00
rmind
356c1e108a Replace simple_lock(9) with mutex(9), clean up. 2011-05-14 12:44:15 +00:00
rmind
f46b67cca2 Convert to mutex(9). Replace ltsleep with mtsleep. 2011-05-14 02:58:27 +00:00
rmind
6a0660a9b0 Replace some ltsleep() uses with kpause() and tsleep(). 2011-05-13 22:35:50 +00:00
rmind
3c66f2d262 filemon_open: remove unnecessary check (which has a leak in error path). 2011-05-13 22:31:08 +00:00
rmind
3bc401dcc3 Eliminate few references to ltsleep. 2011-05-13 22:28:40 +00:00
msaitoh
f28852500d regen. 2011-05-13 01:34:04 +00:00
msaitoh
452427b9ae add entries for 82579LM and 82579V 2011-05-13 01:33:10 +00:00
mrg
8c36bb4b69 convert the main raidPtr mutex to a kmutex, and add a couple of cv's to
cover the old sleep/wakeup points for adding_hot_spare and waitForReconCond.
convert all remaining simple_lock's to kmutexes (they're not used or compiled
right now... even with all options enabled) and remove the support for them.

this leaves just a pair of tsleep()/wakeup() calls using old scheduling APIs.
2011-05-11 18:13:12 +00:00
mrg
30308cb715 convert regionBufferPool.mutex/cond and parityBufferPool.mutex/cond
to kmutex/cv.
2011-05-11 06:20:33 +00:00
mrg
c57ca1d4fb convert parityLogPool.mutex to a kmutex. 2011-05-11 06:03:06 +00:00
mrg
662e58c786 convert regionInfo[regionID].mutex to a kmutex. 2011-05-11 05:14:07 +00:00
mrg
3dd617695f convert reintMutex to a kmutex. 2011-05-11 03:38:32 +00:00
mrg
32ab76b94a convert parityLogDiskQueue.mutex to a kmutex/cv.
XXX: some splbio() usage to clean up here
2011-05-11 03:23:26 +00:00
dyoung
e778d5fdd6 Constify pci_attach_args. 2011-05-11 00:12:41 +00:00
dyoung
9316f952b3 Constify pci_attach_args. 2011-05-10 23:48:33 +00:00
dyoung
e4c26632ea Stop abuse of PCI_FLAGS_IO_ENABLED and PCI_FLAGS_MEM_ENABLED. The flags
specifically tell a driver that bridges upstream forward PCI I/O (or
memory) transactions to the device."  Only bus drivers have any business
modifying these.
2011-05-10 18:31:33 +00:00
mrg
1c0dbcb69c convert RF_CommonLogData_s/RF_ReconMap_s mutex to a kmutex/cv. 2011-05-10 07:04:17 +00:00
mrg
de9a772ed6 print "raidN: detached" when unconfiguring a raid device. 2011-05-10 05:08:51 +00:00
mrg
a8b7159c16 convert stripelocks to kmutex. 2011-05-05 08:21:29 +00:00
mrg
c4fdb0522f RF_BROADCAST_COND() is no more. 2011-05-05 08:21:09 +00:00
mrg
710e439b0e convert access_suspend_mutex to a kmutex/cv. 2011-05-05 07:12:58 +00:00
mrg
ec1c557b57 convert the diskqueue mutex into a kmutex 2011-05-05 06:04:09 +00:00
mrg
50fe584a38 finish porting mcpair users to kmutex, and fix a couple of declarations
in rf_netbsdkintf.c.  fixes i386/conf/ALL build.
2011-05-05 04:20:51 +00:00
macallan
bcb7f01345 add support for (ancient) Mach64 CX and GX, while there make sure the visible
vram area starts at the same offset as the area we're going to draw into -
zero that is.
from David Riley
2011-05-04 23:36:21 +00:00
mrg
15d13d88fa convert the pssTable mutex into a kmutex/cv. 2011-05-03 08:18:43 +00:00
mrg
dad44dc109 convert a lockless + spltty() combo to a IPL_VM mutex and cv.
hopefully this will avoid the beep-didn't-stop problem i had recently
that i was able to fix by calling wakeup() on pcppi's softc from ddb.
2011-05-03 04:27:13 +00:00
manu
e687bb4185 Add support for new SUNIX PCI seriel and/or parallel adapters, with new
SUNIX vendor Id 0x1fd4 and product Id 0x1999. Constants were taken from
Linux open source driver distributed by SUNIX.

The following models should be supported now:
5008 1 parallel port
5016 16 serial ports, only 8 supported right now (PUC_MAX_PORTS limit)
5027 1 serial port
5037 2 serial ports
5056 4 serial ports
5066 8 serial ports, this model is the only one that was actually tested.
5069 1 serial port and 1 parallel port
5079 2 serial ports and 1 parallel port
5099 4 serial ports and 1 parallel port
2011-05-02 14:23:24 +00:00
manu
355f39714b Don't conflict SUNIX new vendor Id with the previous one 2011-05-02 14:06:50 +00:00
manu
8b8d8da0a5 Add new PCI vendor Id for Sunix, and the corresponding device Id. 2011-05-02 14:00:09 +00:00
jym
a30b258c9c Fix BCM5709 PHY detection for ethernet PHYs (the SerDes case being already
handled):
- export bge(4) and bnx(4) CHIP ID and PHY flags to brgphy(4). Move to
"unsigned int" rather than "int", and reuse the same softc members for
chipid and phyflags (behavior controlled by the sc_isbge/isbnx boolean).
- apply bug fix for revisions A and B, so that autonegotiation can
complete (from OpenBSD).

Bug reported by Rivo Nurges via private mail, patch tested and
confirmed working by him (with thanks!)
2011-05-02 09:03:10 +00:00
mrg
02d186e1e2 convert rb_mutex to a kmutex/cv. 2011-05-02 07:29:18 +00:00
mrg
05ec7078b4 use a unique wchan identifier for node_queue_cv than the old default. 2011-05-02 01:14:06 +00:00
mrg
70f1be105d re-apply the reverted previous, after fixing the missed wakeup:
convert eq_mutex to a kmutex/cv.
convert ltsleep() used for plain timeout into kpause().
2011-05-02 01:07:24 +00:00
mrg
a0ccbf8109 rever the previous for now; it hangs reconstruction. 2011-05-02 00:39:37 +00:00
ahoka
d17d98adaf fix some bugs and simplify locking
from rmind
2011-05-01 14:48:11 +00:00
rmind
9cc6428e00 Remove trailing tabs, add RCS IDs. 2011-05-01 13:20:28 +00:00
mrg
393bf63659 convert eq_mutex to a kmutex.
convert ltsleep() used for plain timeout into kpause().
2011-05-01 10:01:01 +00:00
mrg
44be382b63 convert rf_debug_mem_mutex to a kmutex, and fix RF_DEBUG_MEM option. 2011-05-01 06:49:43 +00:00
mrg
14b1a44c1b convert rf_tracing_mutex to a kmutex. 2011-05-01 06:22:54 +00:00
mrg
480f8c7b98 convert the (unused) rf_sparet_wait_mutex to a real mutex/cv. 2011-05-01 05:44:47 +00:00
mrg
14a4134463 convert mcpair to kmutex. 2011-05-01 01:09:05 +00:00
mrg
2b448af86b - convert rf_printf_mutex to a kmutex
- convert rf_rad_lock and the per-raid "cv" to per-raid kmutex/and real cv
- use rf_mutex_init() in places, and move it with the similar definitions
2011-04-30 01:44:36 +00:00
jakllsch
fb405999a1 Add simplistic atabus(4) rescan support. 2011-04-30 00:34:03 +00:00
bouyer
f523d760b8 - Properly count collisions
- call vte_rxfilter() after starting transmit/receive; this seems to
  fix some IPv6-related multicast issues for me
- when the MCR0_BROADCAST bit is set broadcast receive is disabled.
  Rename it to MCR0_BROADCAST_DIS to reflect its function, and fix usage.
- Fix loop over multicast addresses to not set the same address in the
  3 perfect filter slots.
2011-04-28 17:32:48 +00:00
mrg
4f6a431a93 prepare to convert more raidframe old lock/sleep APIs to mutex/condvar:
- remove RF_DECLARE_EXTERN_MUTEX and RF_DECLARE_STATIC_MUTEX, the qualifier
  can be provided at the use point with the normal define
- rename the *LGMGR_MUTEX() macros to *mutex2() names, and add some more
  defines for use:
	rf_declare_mutex2()
	rf_declare_cond2()
	rf_lock_mutex2()
	rf_unlock_mutex2()
	rf_init_mutex2()
	rf_destroy_mutex2()
	rf_init_cond2()
	rf_destroy_cond2()
	rf_wait_cond2()
	rf_signal_cond2()
	rf_broadcast_cond2()
- use the new names for the configureMutex(), which previous used some combo
  of direct mutex* calls and macros
- convert the node_queue to use a mutex/cv combo
- in rf_ShutdownEngine() and DAGExecutionThread(), also signal the former from
  the latter when it is done and about to exit
- convert iodone_lock to use the new macros
2011-04-27 07:55:14 +00:00
plunky
4de0226ca9 drop 'external' inline here, to avoid C99 vs GNU differences 2011-04-27 07:47:33 +00:00
ahoka
73b363db12 remove some debug printf leftover 2011-04-26 17:42:20 +00:00
ahoka
50cd66ec6e it seems we have a config_detach_children (though undocumented)
lets use that to detach flash devices before detaching nand
2011-04-26 17:31:57 +00:00
ahoka
55074f67ed whitespace 2011-04-26 17:27:52 +00:00
ahoka
8f72be80f9 fix some bugs in detachment 2011-04-26 13:38:13 +00:00
hannken
881623aec8 Fixup previous.
The bug was in scsibusdetach(), which is not doing things in the proper
order: it has to detach its children and check for error.  If no error,
then it can release the resources that the children were using.

From David Young via source-changes-d.
2011-04-26 07:41:18 +00:00
hannken
a9ad02bf75 Don't kill outstanding requests when detaching a scsibus on shutdown.
Both the controller and tyhe targets are still running.
2011-04-25 14:14:22 +00:00
jruoho
cc54315739 Add a missing case value in a switch statement. 2011-04-25 05:30:21 +00:00
plunky
b0b433c20f use static inline for ec_readmem(), it is not referenced elsewhere
(avoids C99 vs GNU semantics for external inline functions)
2011-04-24 18:54:41 +00:00
plunky
20a9540ac8 use static inline for msk_rxvalid(), it is not referenced elsewhere
(avoids C99 vs GNU semantics for external inline functions)
2011-04-24 18:53:02 +00:00