Commit Graph

18952 Commits

Author SHA1 Message Date
Warner Losh
eba0fd149d These were a placeholder and don't belong here. Remove them. 2009-04-22 15:01:08 +00:00
Warner Losh
ffed9ec58d Kill stray bootverbose debug tool.
Submitted by:	juli@
2009-04-22 06:33:26 +00:00
Warner Losh
31de65dd02 Turns out the code improvements I did for the TC5299J support were
anti-improvements and broke support for this part.  Revert the part of
the improvement at fault.
2009-04-22 06:30:24 +00:00
Stanislav Sedov
97958cafc8 - Rename ds1672 and ds133x devices to "ds1672_rtc" and "ds133x_rtc"
respectivly. This will allow one to have a kernel with both devices
  present and use it for multiple boards with different types of RTC
  sitting on a bus.

Discussed with:	imp
2009-04-21 22:48:12 +00:00
Takanori Watanabe
450a309dfe Add another FTDI serial converter. 2009-04-21 05:06:31 +00:00
Pyun YongHyeon
2b574f3152 To make it easy whether xl(4) missed Tx completion interrupt check
number of queued packets in watchdog timeout handler. If there are
no queued packets just print a informational message and return
without resetting controller. Also fix to invoke correct Tx
completion handler as 3C905B needs different handler.
2009-04-21 00:42:11 +00:00
Pyun YongHyeon
ba65e0cc90 Clear IFF_DRV_OACTIVE flag if one of queued packets was transmitted.
Previously it used to clear the flag only when the transmit queue
is empty which may slow down Tx performance.
While I'm here check whether driver is running and whether we can
queue more packets in if_start handler. This fixes occasional
watchdog timeouts.

Reported by:	xer < xernet <> hotmail dot it >
Tested by:	xer < xernet <> hotmail dot it >
2009-04-21 00:34:31 +00:00
Stanislav Sedov
50aababbfb - Give a warning and start the oscillator if it was not previously
runned.
- Rename ds1672 -> rtc to follow the other drivers.
- Refactor/simplify the code a bit.

MFC after:	2 weeks
2009-04-20 15:47:06 +00:00
Warner Losh
98f751cd4b Sometimes we can call ed_detach() before the mtx has been initialized.
Avoid it if it hasn't been initialized.
2009-04-20 15:19:54 +00:00
Ed Schouten
2034e6a11f Make mse(4) use si_drv1, instead of using unit numbers.
Discussed with:	imp
2009-04-20 15:15:24 +00:00
Stanislav Sedov
219c5a5a96 - Unlock softc mutex on failure.
MFC after:	1 week
2009-04-20 13:15:25 +00:00
Stanislav Sedov
852761c216 - Properly unlock mutex on failure in channel_trigger. Before this
the function just returned with the mutex held.

MFC after:	1 week
2009-04-20 12:43:07 +00:00
Pyun YongHyeon
f2e491c9c5 For RTL8139C+ controllers, have controller handle padding short
checksum offload frames. Software workaround used for broken
controllers(RTL8169, RTL8168, RTL8168B) seem to cause watchdog
timeouts on RTL8139C+.
Introduce a new flag RL_FLAG_AUTOPAD to mark automatic padding
feature of controller and set it for RTL8139C+ and controllers that
use new descriptor format. This fixes watchdog timeouts seen on
RTL8139C+.

Reported by:	Dimitri Rodis < DimitriR <> integritasystems dot com >
Tested by:	Dimitri Rodis < DimitriR <> integritasystems dot com >
2009-04-20 07:13:04 +00:00
Warner Losh
472dfd2aeb Cleanup resource allocation code a bit. Store the rids on the
resources rather than on the softc.  When we allocate resources for PC
Card, if we only get 16 ports, try again to get the others.
2009-04-20 01:19:59 +00:00
Robert Noland
8f6d3bf7a2 Don't try to setup interrupts for drivers that don't support them.
This causes sis and probably a couple of other driver to panic and fail.

Tested by:	cpghost <cpghost@cordula.ws>
PR:		133554
MFC after:	3 days
2009-04-19 16:54:33 +00:00
Ed Schouten
e78a5a3f2f Convert mlx(4) and mly(4) to si_drv1 instead of dev2unit(). 2009-04-18 07:36:38 +00:00
Warner Losh
77944b3551 Make sure that the data in the ROM with a valid signature isn't all
0's.  At least one PC Card ASIC does this...
2009-04-18 04:45:02 +00:00
Warner Losh
f2731d8565 Add GVP NIC 2000P and New Media Livewire. Also New Media LanSurfer
doesn't have a function type of network, so add a quirk for that...
2009-04-18 04:37:53 +00:00
Warner Losh
74677fb82b Establish the interrupt handler AFTER we successfully attach. We need
to do this in case we have a shared interrupt that fires during the
attach process....
2009-04-18 03:10:28 +00:00
Warner Losh
77a6714a6d Remove debug write accidentally left in. 2009-04-18 03:02:44 +00:00
John Baldwin
a28b3fc741 - Add a few more register defintions for the PCI express capability
registers.
- Cleanup PCI-X capability printf to not leave a dangling "supports" for
  some PCI-X bridges.
- Display additional PCI express details including the negotiated and max
  link width and the actual and maximum supported max payload.

MFC after:	1 month
2009-04-17 19:07:44 +00:00
Andrew Thompson
0c512ce8ee Drain the driver tasks on the same taskqueue in which they were enqueued. 2009-04-17 16:07:13 +00:00
Maksim Yevmenkin
018cd707c0 Prevent atkbd(4) interrupt handler from calling keyboard callback function
when polled mode is enabled. This should help with duplicated/missing
characters problem at mountroot, geli, etc. prompts on multi CPU systems
while kbdmux(4) is enabled.

Tested by:	Tobias Grosser <grosser -at- fim -dot- uni-passau -dot- de>
Tested by:	Fabian Keil <freebsd-listen -at- fabiankeil -dot- de>
MFC after:	3 days
2009-04-17 00:30:56 +00:00
Andrew Thompson
a0c4317cc2 Only call ieee80211_start_all() if its a 80211 device.
Submitted by:	Paul B. Mahol
2009-04-16 23:42:00 +00:00
Kip Macy
db90f94b85 call base if_qflush routine to flush if_snd 2009-04-16 23:08:02 +00:00
Kip Macy
279aa3d419 Change if_output to take a struct route as its fourth argument in order
to allow passing a cached struct llentry * down to L2

Reviewed by:	rwatson
2009-04-16 20:30:28 +00:00
Rafal Jaworowski
5817716faf mge(4): fix two bugs, which were leading to crash/hang under very heavy
network load.

1. Leave the RX interrupt routine if there is no mbuf available.

2. Properly initialize and track tx_desc_used_count counter so as not to
leak mbuf while traversing used descriptors.

Obtained from:	Semihalf
2009-04-16 11:38:06 +00:00
Rafal Jaworowski
bc26e2e38f Adjust Marvell Discovery (MV78xxx) support to recognize newest chip revisions,
handle Z0 revision (early silicon) explicitly due to its quirks.

Obtained from:	Marvell, Semihalf
2009-04-16 11:20:18 +00:00
Robert Watson
6cf6d55734 Garbage collect unbuildable and unusable non-MPSAFE network device
drivers that depended on the historic IFF_NEEDSGIANT compatibility
mechanism:

  ar(4)
  ray(4)
  sr(4)

Discussed on:	arch@
2009-04-16 11:09:13 +00:00
Marius Strobl
ecbd3f3a29 Fix whitespace. 2009-04-14 20:51:58 +00:00
Marius Strobl
f880062633 - Remove the second license as I'm also fine with the first one.
- Remove redundant softc members for RIDs.
- Change some softc members to be unsigned where more appropriate.
- Add some missing const.
- Remove support for mmap(2)'ing VGA I/O as it was broken [1] and
  not required by X.Org anyway.
- Fix some confusion between bus, physical and virtual addresses
  which mostly consisted in using members of struct video_adapter
  inappropriately but wasn't fatal except for the regular framebuffer
  mmap(2)'ing.
- Remove redundant bzero(9)'ing of the softc.
- Don't map the framebuffer twice in case the firmware has already
  mapped it as besides wasting resources this isn't possible with
  all MMUs. This is a bit tricky as a) just because the firmware
  provides a property with a virtual address doesn't mean it's
  actually mapped (but typically is when the framebuffer is the
  console) and b) the firmware doesn't necessarily map the it with
  the same byteorder as we do. This make machfb(4) work on machines
  with cheetah-class MMUs (including X.Org).

Reported by:	Michael Plass [1]
MFC after:	3 days
2009-04-14 20:23:47 +00:00
Marius Strobl
6c9f0f2124 Fix whitespace. 2009-04-14 19:11:02 +00:00
John Baldwin
bfee0576cb - Consolidate duplicated code for reading and sizing BARs and writing base
addresses to BARs into new pci_read_bar() and pci_write_bar() routines.
  pci_add_map(), pci_alloc_map(), and pci_delete_resource() now use these
  routines to work with BARs.
- Just pass the device_t for the new PCI device to various routines instead
  of passing the device, bus, slot, and function.

Reviewed by:	imp
2009-04-14 18:32:37 +00:00
Jack F Vogel
b3096a0430 Thanks to Michael Tuexen and Randall Scott for providing a
few important bug fixes found while they were doing SCTP
development, and that I somehow lost during the scramble.

Thanks guys!!
2009-04-14 17:14:35 +00:00
Ed Schouten
0de5b9b0f0 Use si_drv1 instead of dev2unit() in twe(4) and twa(4)
Reviewed by:	scottl
2009-04-14 14:02:43 +00:00
Ed Schouten
9078597210 Use si_drv1 instead of dev2unit() in powermac_nvram.
Reviewed by:	nwhitehorn
2009-04-14 13:18:39 +00:00
Ed Schouten
b7d9e67c45 Use si_drv1 instead of dev2unit() inside agp(4).
Reviewed by:	rnoland
2009-04-14 13:11:34 +00:00
Ed Schouten
9555aafab2 Let tdfx(4) use si_drv1 instead of using dev2unit(). 2009-04-14 11:57:26 +00:00
Ed Schouten
9ef0e425f3 Use si_drv1 to store joy(4)'s softc.
There are still some calls to dev2unit() left, but I guess we should
take care of those another time.
2009-04-14 11:23:09 +00:00
Kip Macy
f2502470b5 - define em_transmit and em_qflush
- make buF_ring usage conditional but enabled by default

Reviewed by:	jfv
2009-04-14 03:36:59 +00:00
Warner Losh
f133918640 Another NE-2000 clone. The GVC NIC-2000P Ethernet adapter. Based on
the MN5017 chipset.  There's no vendor/product pair on this card, so
it needs to be matched by the CIS strings.
2009-04-14 03:13:05 +00:00
Sam Leffler
19ea87c42b o eliminate a << in calculating the tx time for turbo mode by pre-multiplying
data in the phy tables
o correct the ctrl rate indices in the 5212 turbog phy table
2009-04-13 21:01:08 +00:00
Sam Leffler
e40b6ab1cf don't use caddr_t to match ieee80211_dump_pkt type; supplying the correct
one costs nothing
2009-04-13 20:58:47 +00:00
Sam Leffler
040972a18b o fix dynamic slave-side tdma slot length updating: we need to re-setup the
burst length in the tx q's
o remove re-config of the beaconq on update; it's not needed
2009-04-13 20:57:34 +00:00
Sam Leffler
5e86169a67 add a debug msg for when a fixed transmit rate is not applied because
it's not found in the sta's negotiated rate set
2009-04-13 20:54:08 +00:00
Sam Leffler
89047529ac remove reference to sc_tdmabintcnt; it was removed in r190848 2009-04-13 03:20:21 +00:00
Pyun YongHyeon
0685c824ca Don't blindly set IP packet length from interface MTU in TSO case.
Remote host can advertise smaller MSS than that of sender so upper
stack might have adjusted the MSS which in turn generates IP
packets that are less size than that of interface MTU.

Reported by:	Bjoern Koenig ( bkoenig <> alpha-tierchen dot de )
Tested by:	Bjoern Koenig ( bkoenig <> alpha-tierchen dot de )
MFC after:	3 days
2009-04-13 00:32:34 +00:00
Robert Watson
78b5071407 Update stats in struct tcpstat using two new macros, TCPSTAT_ADD() and
TCPSTAT_INC(), rather than directly manipulating the fields across the
kernel.  This will make it easier to change the implementation of
these statistics, such as using per-CPU versions of the data structures.

MFC after:	3 days
2009-04-11 22:07:19 +00:00
Warner Losh
e89da24b3d Two refinements to the 3c1 support:
1) Flag it and only access that command on the 3c1
2) The TX PLL appears to power down when not in use, so we have to power
   it back up when we've been idle.  Do this at the start of ifstart.
   Otherwise we fall off the net.
2009-04-11 04:30:38 +00:00
Warner Losh
52fcedff50 o Report ethernet status for at least 10BaseT media. Since I don't
have other media to test against, I've left that media reporting
  unchanged.
o Enable the TX_PLL when we enable TX.  This is harmless on most
  cards, but required to get the 3c1 CF card working.  Power savings
  could be had by managing this better, but for now it gets my card
  working.
2009-04-11 02:47:03 +00:00
Warner Losh
f20765ea29 Don't specify a hint, since it isn't needed. 2009-04-10 18:46:46 +00:00
Warner Losh
56d67d7d37 Fix comment
Submitted by:	danfe@
2009-04-10 17:34:30 +00:00
Warner Losh
0203f7164f Improvements for TC5299J MII support. 2009-04-10 16:12:00 +00:00
Warner Losh
84db505873 The D-Link DE-650 isn't tagged as a network card, so allow it to
attach anyway.
Add a comment about a 'common' mfg/prod pair that's used in a very
large array of different cards.
2009-04-10 15:33:47 +00:00
Warner Losh
613dabd54f Fix some comments. 2009-04-10 15:30:19 +00:00
Warner Losh
f5456b5d2c No need to check for chip type here. 2009-04-10 15:18:03 +00:00
Kip Macy
80cb9f211a Import "flowid" support for serializing flows across transmit queues
Reviewed by:	rwatson and jeli
2009-04-10 06:16:14 +00:00
Jack F Vogel
529f22baa8 Fix build problem with data format. 2009-04-10 05:26:14 +00:00
Andrew Thompson
853a10a581 Revert r190676,190677
The geom and CAM changes for root_hold are the wrong solution for USB design
quirks.

Requested by:	scottl
2009-04-10 04:08:34 +00:00
Jack F Vogel
770e416bb1 Add missing file, sorry bout that :) 2009-04-10 02:45:00 +00:00
Jack F Vogel
0ac6dfec68 Update the ixgbe driver to 1.7.4, this includes support
for the new 82599 adapter family, adds header split, and
many small fixes. The driver should now be added to the
GENERIC kernel.

MFC after: 2 weeks
2009-04-10 00:22:48 +00:00
Jack F Vogel
d035aa2db2 This delta syncs the em and igb drivers with Intel,
adds header split and SCTP support into the igb driver.
Various small improvements and fixes.

MFC after: 2 weeks
2009-04-10 00:05:46 +00:00
Maksim Yevmenkin
b7f32062d1 Whitespace nitpicking
MFC after:	1 week
2009-04-09 19:11:08 +00:00
Maksim Yevmenkin
a449b18a5b Introduce KB_POLLED flag to struct keyboard's kb_flags field.
Reviewed by:	freebsd-current@, freebsd-hackers@
MFC after:	1 week
2009-04-09 18:31:33 +00:00
Maksim Yevmenkin
af60af2dc0 Remove obsolete/bogus layering.
Reviewed by:	freebsd-current@, freebsd-hackers@
MFC after:	1 week
2009-04-09 18:22:51 +00:00
Sam Leffler
dd015656a7 check the method pointer before invoking ah_eepromDetach as it can
be null if attach work fails before hooking up the eeprom support

Obtained from:	madwifi
2009-04-09 16:53:59 +00:00
Xin LI
cd3ef66680 Use DEVICE_SHUTDOWN(9) mechanism for shutdown handler.
Suggested by:	jhb
2009-04-09 07:45:23 +00:00
Marcel Moolenaar
39bc3bff94 Don't use pmap_kextact() when comparing bus handles for Book-E.
We typically wire translation to devices with TLB1 entries and
pmap_kextract() does not know about those and returns 0.  This
causes false positives (read: all serial ports suddenly become
the console).
2009-04-08 22:19:39 +00:00
Maksim Yevmenkin
ed382753a7 Undo SVN rev 183283
Do not use Giant for kbdmux(4) locking. This is wrong and apparently
causing more problems than it solves. This will re-open the issue
where interrupt handlers may race with kbdmux(4) in polling mode.
Typical symptoms include (but not limited to) duplicated and/or
missing characters when low level console functions (such as gets)
are used while interrupts are enabled (for example geli password
prompt, mountroot prompt etc.)

MFC after:	3 days
2009-04-08 20:52:30 +00:00
Sam Leffler
9fb0fccb89 o add a capability for drivers that require 802.3 encapsulation of
frames passed down through the transmit path
o mark ndis requiring 802.3 encap'd frames

Reviewed by:	"Paul B. Mahol" <onemda@gmail.com>, thompsa
2009-04-08 16:19:50 +00:00
Sam Leffler
293d484820 remove unused struct member 2009-04-08 16:12:28 +00:00
Marcel Moolenaar
d7ae5af5c4 Fix hangs caused by hardware that signals receive errors
(framing, parity, etc), but does not indicate characters
being received. Since no chracters have been received,
ignore the line errors.

PR:		131006
MFC after:	3 days
2009-04-08 00:14:06 +00:00
Robert Noland
e12ce94f36 check offsets for R300_ZB_ZPASS_ADDR
Submitted by:	Maciej Cencora <m.cencora@gmail.com>
MFC after:	3 days
2009-04-07 22:26:53 +00:00
Robert Noland
3c834e3435 Add regs required for occlusion queries support
Submitted by:	Maciej Cencora <m.cencora@gmail.com>
MFC after:	3 days
2009-04-07 22:20:58 +00:00
Ed Schouten
82b70c3e01 Improve clarity: if (a && (b ? b : c)) -> if (a && (b || c))
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
2009-04-07 19:44:06 +00:00
Warner Losh
05ea372876 More chip types, and fix a comment. 2009-04-07 17:06:06 +00:00
Xin LI
8eadd1b28e When multiple cards are present, register a shutdown handler for each card
instead of just register one for the first adapter.  Without doing this
there would be some data loss upon shutdown because data could be ignored
when flushing to disk.

MFC after:	3 days
2009-04-07 16:40:31 +00:00
Xin LI
6447075520 Update driver to vendor's version 1.16 plus some local changes:
- override_kernel_driver() has been removed since this is an
   in-tree version of driver.
 - __DATE__ and __TIME__ removed from version string to make
   binary update builders happy.
 - Utilize pause(9) for __FreeBSDversion >= 700033 (redo 167086).
 - Utilize kproc_suspend_check() for __FreeBSDversion >= 800002.
   (redo 172836).
 - Don't read past end of pVDevice (redo 143787).
 - Make sure that controller and channel are initialized (redo 169823).
 - Don't include cam/cam_xpt_periph.h (redo 158177).

MFC After:	3 days
2009-04-07 16:38:25 +00:00
Warner Losh
0ca89d1986 Fix a comment to match the code. 2009-04-07 16:15:59 +00:00
Warner Losh
7687c7e37c Remove DL10019 workaround, since the code it calls isn't quite ready. 2009-04-07 15:44:50 +00:00
Warner Losh
fb0030f35a Move tick to end of file for better code references. 2009-04-07 15:43:34 +00:00
Warner Losh
800c135a2d The DL100xx cards have 24k of packet memory, not 16k. Use it for them
and update comments about original patches doing this and it not
working.  It works for both the DL10019 and DL10022 based cards that I
have.  It really helps the DL10019 cards, since they were using 8k
instead of the normal 16k that regular NE-2000 cards help.

# Note to self: need to provide a common routine to setup memory
# parameters.
2009-04-07 15:40:38 +00:00
Warner Losh
8d2c1f1602 Apply generic media stuff to pccard case too, when we aren't using miibus
for this.
2009-04-07 15:36:02 +00:00
Warner Losh
03a9bf492b Minor fixes to comments about media autoselect. 2009-04-07 15:34:26 +00:00
Warner Losh
990b9c1594 Another GlobalVillage card. 2009-04-07 05:57:56 +00:00
Warner Losh
1cac1dbfab Provide a generic ifmedia set of routines as a fallback. The
DP8390-based cards have no generic way of reporting status of the link
or setting the media type.  Some specific versions of these cards do,
however, allow for this, and we already support some of them.  Make
the 'ed' experience more uniform by providing "autoselect" as the
meida and status "active" always.  This won't affect the chips that
provide more specific details.
2009-04-07 05:41:38 +00:00
Sean Bruno
4470fe9dbe Minor updates as a precursor to fixing sbp_targ
firewire.c -- expand a comment and repair a typo
sbp.h -- define Logical Unit Reset so it can be used in sbp_targ

Reviewed by:	scottl@freebsd.org
2009-04-07 02:33:46 +00:00
Ed Schouten
2dae467d61 Reduce the dcons polling frequency to 25 Hz.
It makes little sense to use 100 Hz polling in dcons. We cannot live
without polling, because that's just how dcons works. It polls the
buffer filled by the firewire hardware. 25 Hz is probably enough for
most use cases.

Discussed with:	rwatson
Tested by:	kan
2009-04-06 13:09:02 +00:00
Alexander Kabaev
9ec7a1f568 Fix logic in MOD_LOAD handler to call dcons_attach after all successful
dcons_drv_init invocations. Testing return value for 0 does not work for
cases where dcons_drv_init was called already as part of low level
console initialization.
2009-04-06 02:29:28 +00:00
Andrew Thompson
6830af1a05 Remove usb_sw_transfer.[ch] which are now empty after r190735. 2009-04-06 00:32:54 +00:00
Andrew Thompson
fde875265f Provide a better commit log for r190735, forced by making a whitespace change.
Refactor how we interface with the root HUB. This is achieved by making a
direct call from usb2_do_request to the host controller for root hub requests,
this call will perform the controller specific register read/writes and return
the error code.

This cuts out a lot of code in the host controller files and saves one thread
per USB bus.

Submitted by:	Hans Petter Selasky
2009-04-06 00:22:49 +00:00
Andrew Thompson
5cbbd666e1 Catch up with usb2_config struct layout changes. 2009-04-05 18:26:19 +00:00
Andrew Thompson
9f2b42e596 MFp4 //depot/projects/usb@160056
Remove code for unused and unlikely quirk, "uq_power_claim"

Submitted by:	Hans Petter Selasky
2009-04-05 18:22:13 +00:00
Andrew Thompson
afa07055be MFp4 //depot/projects/usb@160052
Wait until line configuration is complete before starting data transfers.

Submitted by:	Hans Petter Selasky
2009-04-05 18:22:03 +00:00
Andrew Thompson
de967835e0 MFp4 //depot/projects/usb@159995
- add support for more complicated HID descriptors which can have multiple
  definitions of the same field.
- remove old modulo patch in ums, which I think is due to bad HID parsing,
  which should be fixed now.

Reported by:	netchild
Submitted by:	Hans Petter Selasky
2009-04-05 18:21:51 +00:00
Andrew Thompson
03797f3300 MFp4 //depot/projects/usb@159948
Add more debugging output on enumeration failures.

Submitted by:	Hans Petter Selasky
2009-04-05 18:21:31 +00:00
Andrew Thompson
4565300d56 MFp4 //depot/projects/usb@159946
Some cancelable flags are always true.  Substitute these away. These cancelable
flags were mostly useful with the root HUB which is now handled differently.

Submitted by:	Hans Petter Selasky
2009-04-05 18:21:21 +00:00
Andrew Thompson
3b01d5130c MFp4 //depot/projects/usb@159926
Minor code factorisation in atmegadci.c

Submitted by:	Hans Petter Selasky
2009-04-05 18:21:08 +00:00
Andrew Thompson
c48fb077ea MFp4 //depot/projects/usb@159925
Cast variables properly for non-32-bit platforms.

Submitted by:	Hans Petter Selasky
2009-04-05 18:20:58 +00:00
Andrew Thompson
3930731567 MFp4 //depot/projects/usb@159922
Refactor how we interface with the root HUB. This cuts around 1200 lines of
code totally and saves one thread per USB bus.

Submitted by:	Hans Petter Selasky
2009-04-05 18:20:49 +00:00