Commit graph

61626 commits

Author SHA1 Message Date
Matt Jacob b3d93fd0c9 Add MODULE_DEPENDS for cam, pci, mca, eisa and isa where needed.
PR:		106543
MFC after:	3 days
2006-12-11 18:28:31 +00:00
Jung-uk Kim 6b037352d0 - Correct collision counter for BCM5705+. This register is read/clear.
- Correct RX packet drop counter for BCM5705+.  This register is read/clear
and it wraps very quickly under heavy packet drops because only the lower
ten bits are valid according to the documentation.  However, it seems few
more bits are actually valid and the rest bits are always zeros[1].
Therefore, we don't mask them off here.  To get accurate packet drop count,
we need to check the register from bge_rxeof().  It is commented out for now,
not to penalize normal operation.  Actual performance impact should be
measured later.
- Correct integer casting from u_long to uint32_t.  Casting is not really
needed for all supported platforms but we better do this correctly[2].

Tested by:	bde[1]
Suggested by:	bde[2]
2006-12-11 18:00:34 +00:00
Pyun YongHyeon bbc9416dc9 o Add support code for newer Marvell PHYs.
o Remove unused static global variable e1000phy_debug.
o Take advantage of mii_phy_dev_probe().
o Use MII_ANEGTICKS/MII_ANEGTICKS_GIGE instead of magic number 5.
o Add IFM_NONE as e1000phy(4) supports it without issues.
o Nuke magic PHY programming sequence in PHY reset and follow correct
  reset sequence. [1]
o Make manual media selection work for all supported media types.
o Don't set MIIF_NOISOLATE so e1000phy(4) can be used in
  configurations with multiple PHYs.
o In 1000baseT, when setting the link manually, one side must be the
  master and the other the slave. If LINK0 is set, program the PHY
  to be a master, otherwise it's a slave.
o When we lost a link, reset mii_ticks immediately so it correctly
  check number of seconds elapsed in autonegotiation phase.
o Announce link loss right after it happens.
o After kicking autonegotiation, report PHY status instead of
  returning immediatly.
o When link state check is in progress, check auto negotiation
  completion bit only when auto negotiation is enbaled.
o When PHY is resolved to a master, show it with IFM_FLAG2.

Special thanks to marius who fixed several nits in original patch.
In half-duplex mode, nfe(4) fails to send packets. I think it's a bug
in nfe(4) as the same PHY works without problems on msk(4).

Obtained from:	em(4) [1]
Reviewed by:	marius
Tested by:	bz
2006-12-11 11:09:48 +00:00
Pyun YongHyeon eafc9368bc Add additional Marvell PHY registers. 2006-12-11 10:43:32 +00:00
Pyun YongHyeon 938beb1599 Add a bunch of new Marvell PHY ids. 2006-12-11 10:42:04 +00:00
Pyun YongHyeon d2ca0c42f7 style(9) 2006-12-11 10:22:24 +00:00
Alfred Perlstein 7b74982d4e defer all processing to a full fledged thread.
once usb is SMP safe, this should be the first SMPsafe
usb ethernet driver.
2006-12-11 09:57:41 +00:00
Kip Macy abbeb75f29 make size of pad non-zero so that trap-tracing code doesn't overwrite the
base of our stack
2006-12-11 04:50:25 +00:00
Scott Long 66dfa04f7c Teach the brgphy about some new Broadcom IDs.
Submitted by: David Christenson
Sponsored by: www.UIA.net
2006-12-11 01:29:40 +00:00
Sam Leffler a5d62f191b replace if_watchdog w/ a private callout
MFC after:	1 month
2006-12-11 00:41:22 +00:00
Sam Leffler fe8184b687 drop softc lock when passing rx frames up the stack
MFC after:	1 month
2006-12-11 00:37:12 +00:00
Sam Leffler f8f1546232 split wi_start int locked+unlocked variants and use the unlocked
one from the isr to eliminate a recursive lock

MFC after:	1 month
2006-12-11 00:35:51 +00:00
Sam Leffler df64e1e4ef nuke compatibility cruft
MFC after:	1 month
2006-12-11 00:32:15 +00:00
Kip Macy 2e05e7d021 KTR entry contained invalid context reference - ifdef out 2006-12-10 18:09:44 +00:00
Bruce M Simpson 3dbee59bd4 Back out revision 1.264.
Fixing the IP accounting issue, if we plan to do so, needs to be better
thought out; the 'fix' introduces a hash lookup and a possible kernel panic.

Reported by:	Mark Tinguely
2006-12-10 13:44:00 +00:00
Ariff Abdullah e150f641d0 Fix AD1986A (and possibily other codecs too) microphone issues.
Tested by:	xride (using skype, xanalyser, etc. ; play/record)
2006-12-10 06:13:41 +00:00
Kip Macy 160dc4ccc8 remove more uses of trap_conversion to get more meaningful trap messages
add a printf for when we fault on the direct area (should never happen)
2006-12-10 06:00:09 +00:00
Matt Jacob 267271f602 Remember to include isp_library.o when building an isp module. 2006-12-10 05:51:27 +00:00
Matt Jacob 7ffbfcd730 Make cam_xpt's pronouncements match camcontrol
(Tagged -> Command) Queueing.
2006-12-10 05:37:48 +00:00
Matt Jacob f9fbd1a4bc Make MAXPHYS and DFLTPHYS options (finally). 2006-12-10 04:23:23 +00:00
Kip Macy 4d249371ce Do explicit bounds checking as a function of the actual size of the
reloc_target_bitmask array as opposed to the (known) index of the last value.
This change fixes CID 691.
2006-12-10 04:18:03 +00:00
Kip Macy 504baf688e better handle the case of hw.physmemstart being hw.physmem not being set,
previously we were acting as if physmem was being set when it was not
2006-12-10 04:14:29 +00:00
Matt Jacob f334280581 The MODULE_NAME should "ispfw" unless overriden, not "isp". 2006-12-10 03:42:57 +00:00
Matt Jacob 3cce220cba Remove dependency on ispfw and firmware as modules.
Either they're there early and the ispfw sets have
registered themselves, or they're not.

The module dependency stuff isn't quite what we want
anyway. If the user doesn't want the load placed on
system memory by loading the firmware, they don't
specify it to be loaded (either by being linked in
or via being a module to be loaded and then hooked
in with firmware(9)). It doesn't then make sense to
then override what they want by pulling it in anyway.

This might be able to work if we were able to pull in
just exactly what we needed for the card we have- but
that's an optimization left for the future.
2006-12-10 03:41:48 +00:00
Kip Macy 42b20c8aa2 Add hw.physmemstart loader variable to enable the user to specify the address
at which the kernel should start allocating physical memory. The primary
purpose of this is to test 64-bit cleanness of the data path by setting
hw.physmemstart=4G so that all physical allocations are above 4GB. AMD64
and i386/PAE could also benefit from having this option.
2006-12-10 01:52:46 +00:00
Matt Jacob 5bac03f95c Make mpt_pci depend on pci and mpt_cam depend on CAM.
PR:		106536
Suggested by:	Norikatsu Shigemura
MFC after:	3 days
2006-12-10 01:13:56 +00:00
Warner Losh 600313b16e As Bernd Walter points out, the rlphy is used for more things than
just the intenral phy on parts supported by the rl and re drivers, the
RTL8201BL for example.  He also sent me a nice picture of hundreds of
these chips in a tray to boulder his claim.  :-) Therefore remove a
comment that suggested that they were...
2006-12-10 01:10:08 +00:00
Kip Macy 90e405668e Fix handling of the hw.physmem loader variable use real_phys_avail[] which
is already bounded by hw.physmem to calculate phys_avail[] - previously only
real_phys_avail[] was being bound by hw.physmem so we were allocating memory
that wasn't mapped in the direct map
2006-12-09 23:11:30 +00:00
Ariff Abdullah 1b5c0d50f6 - Fix headphone/speakers automute on Lenovo 3000 N100.
Tested by:	xride

- GPIO commit cleanups and fixes for possible breakage during
  previous commit.
2006-12-09 17:52:54 +00:00
Craig Rodrigues b05872f29b Remove unused variable in unionfs_root().
Submitted by:	daichi, Masanori OZAWA
2006-12-09 17:24:18 +00:00
Craig Rodrigues 1e370dbbdc Use vfs_mount_error() in a few places to give more descriptive mount error
messages.
2006-12-09 17:21:25 +00:00
Craig Rodrigues 30d471e654 Add locking around calls to unionfs_get_node_status()
in unionfs_ioctl() and unionfs_poll().

Submitted by:	daichi, Masanori OZAWA <ozawa@ongs.co.jp>
Prompted by:	kris
2006-12-09 16:51:09 +00:00
Craig Rodrigues b16f4eec16 In unionfs_readdir(), prevent a possible NULL dereference.
CID:		1667
Found by:	Coverity Prevent (tm)
2006-12-09 16:34:37 +00:00
Craig Rodrigues acc4bab11b In unionfs_hashrem(), use LIST_FOREACH_SAFE when iterating over
the list of nodes to free them.

CID:		1668
Found by:	Coverity Prevent (tm)
2006-12-09 16:27:50 +00:00
Kip Macy 76cb7acf30 - remove restriction on OFW kernel allocations being 4M
- shuffle memory range following kernel to the beginning of phys_avail
- have the direct area use 256MB pages where possible
- remove dead code from the end of pmap_bootstrap
- have pmap_alloc_contig_pages check all memory ranges in phys_avail before
  giving up

- informal benchmarking indicates a ~5% speedup on buildworld
2006-12-09 05:22:22 +00:00
Craig Rodrigues e9022ef898 Minor cleanup. If we are doing a mount update, and we pass in
an "export" flag indicating that we are trying to NFS export the
filesystem, and the MSDOSFS_LARGEFS flag is set on the filesystem,
then deny the mount update and export request.  Otherwise,
let the full mount update proceed normally.
MSDOSFS_LARGES and NFS don't mix because of the way inodes are calculated
for MSDOSFS_LARGEFS.

MFC after:	3 days
2006-12-09 01:49:19 +00:00
Matt Jacob 6890d7af94 clarify a comment slightly 2006-12-09 01:33:55 +00:00
Matt Jacob 9b03492a7d Find another spot where tagged command queueing got
accidentally nuked.
2006-12-09 01:30:05 +00:00
Luigi Rizzo 294dd290c6 Fix an oscure bug triggered by a recent change in kern_socket.c.
The symptoms were that outgoing DHCP requests for diskless kernels
had the IP header corrupt. After long investigations, the source of
the problem was found in ether_output() - for SIMPLEX interfaces
and broadcast traffic, a copy of the packet is passed back to the kernel
through if_simloop(). However if_simloop() modifies the mbuf, while
the copy obtained through m_copym() is a readonly one.

The bug has been there forever, but it has been triggered only recently
by a change in sosend_dgram() which passed down mbufs with sufficient
space to prepend the header.

This fix is trivial - use m_dup() instead of m_copy() to create
the copy. As an alternative, we could try and modify if_simloop()
to play safely with readonly mbufs, but i don't think it is worthwhile
because 1) this is a relatively infrequent code path so we do not need
to worry too much about performance, and 2) the cost of doing an
extra m_pullup in if_simloop() is probably the same as doing the
copy of the cluster, anyways.

MFC after: 1 week
2006-12-08 10:36:45 +00:00
Kip Macy 35d10226b7 Remove the requirement that phys_avail be sorted in ascending order
by explicitly finding the lowest and highest addresses when calculating
the size of the vm_pages array

Reviewed by :alc
2006-12-08 08:44:47 +00:00
Tim Kientzle 8d3027e203 The ISO9660 spec does allow files up to 4G. Change the i_size
field to "unsigned long" so that it actually works.
Thanks to Robert Sciuk for sending me a DVD that
demonstrated ISO9660-formatted media with a file >2G.
I've now fixed this both in libarchive and in the cd9660
filesystem.

MFC after: 14 days
2006-12-08 07:43:53 +00:00
Marius Strobl 22e5ade048 - Revert the parts of the previous revision which reloaded the watchdog
timer in xl_txeof()/xl_txeof_90xB(); xl_poll_locked() unconditionally
  invokes xl_txeof()/xl_txeof_90xB(), effectively circumventing that
  the watchdog ever fires in the DEVICE_POLLING case as its timer is
  constantly reloaded.
- Remove the banal and pedantically outdated comment regarding setting
  xl_wdog_timer to 0 in xl_txeof().

Pointed out by:	bde
2006-12-08 03:18:16 +00:00
Matt Jacob 7185cd3625 PH! Forgot to do my cross-compile check. Also now rearranged things so
the ENDIAN defines are consistent between mpt.h and mpt.c.
2006-12-07 23:51:00 +00:00
Matt Jacob 0e0521a153 MFP4: principally to reapply tagged command support to FC and SAS cards. 2006-12-07 22:02:28 +00:00
Marcel Moolenaar d2a2b3293e Add support for multiple FAST handlers.
Reviewed & tested by: grehan@
2006-12-07 17:08:16 +00:00
Kevin Lo f910c56c11 Add header files <sys/lock.h> and <sys/mutex.h> for mtx_init() and friends.
Approved by: cognet
2006-12-07 15:24:38 +00:00
Ariff Abdullah cc726a7f98 Don't try to workaround broken apps (if any). If this still the case,
lets fix the broken apps instead.
2006-12-07 07:48:58 +00:00
Ariff Abdullah b45d0ec80d Remove comment that is no longer relevant since previous
buffering fix.
2006-12-07 07:48:20 +00:00
Craig Rodrigues 3a13c9cc28 Use vfs_mount_error() to log mount errors in a few places with human
readable strings which can be retrieved if an "errmsg" parameter is
passed into nmount().
2006-12-07 02:57:00 +00:00
Kip Macy 5b1bbad223 fix CID 1671 by freeing listp before exit from vnex_attach 2006-12-07 02:09:06 +00:00