Commit Graph

20832 Commits

Author SHA1 Message Date
Nathan Whitehorn
45b570f5ef Fix build on architectures where PAGE_SIZE is a long (sparc64, powerpc). 2010-07-13 19:27:20 +00:00
Jung-uk Kim
36a483bbcd Make SMP code path conditional at run-time. 2010-07-13 16:35:41 +00:00
Alexander Motin
8a6870808d Rise knowledge about curthread->td_intr_frame by one step. Make timer
callback argument really opaque. Not repeat interrupt handler's problem
in case somebody will ever need to have both argument and frame.
2010-07-13 12:46:06 +00:00
Alexander Motin
b6ef82a03b Disable multi-sector PIO transfers if ATA_SET_MULTI command failed.
Submitted by:	Mikolaj Golub on fs@
2010-07-13 06:42:47 +00:00
Takanori Watanabe
1b0f43beb1 Fix comment.
Pointed out by: hrs
2010-07-13 03:56:29 +00:00
Takanori Watanabe
55fdde371a One more Prolific serial device ID.
Submitted by:	Kouichi Hirabayashi on FreeBSD-users-jp
MFC after: 1 week.
2010-07-13 03:49:30 +00:00
Jung-uk Kim
31bc79db46 Fix white spaces. 2010-07-13 02:48:42 +00:00
Jung-uk Kim
502e578cde According to ACPICA User Guide and Programmer Reference, the read data must
be zero extended to fill the 32-bit return value even if the bit width of
the port is less than 32.
2010-07-13 02:45:44 +00:00
Marius Strobl
fd435d5c06 Correct inverted parent DMA tag parameters.
Reviewed by:	ken
MFC after:	3 days
2010-07-12 23:01:21 +00:00
Marius Strobl
cac33e16cf - Make the maxsize parameter of the data buffer DMA tag match maxio, which
was missed in r209599.
  Reported and tested by: Michael Moll
- Declare mpt_dma_buf_alloc() static just like mpt_dma_buf_free(), both are
  used in mpt.c only.

Reviewed by:	ken
MFC after:	r209599
2010-07-12 22:57:57 +00:00
Jack F Vogel
9886a800fc Fix for a panic when TX checksum offload is done and
a packet has only a header in the first mbuf, the
checksum code will dereference a pointer into the
non-existing IP header. Do a check for the size and
pullup if needed. Thanks to Michael Tuexen for this
fix.

MFC: asap - should be in 8.1 IMHO
2010-07-12 21:47:30 +00:00
Alexander Motin
cd646aba81 Revert and remake r209883:
Do not grab lock while setting up interrupt, as it causes LOR with
allocation code. Instead make interrupt handler check that CAM bus
initialization completed before touching it.

While there, slightly improve attach errors handling.

Reported by:	kib
2010-07-12 12:16:11 +00:00
Andrew Thompson
6bce5ae1c5 Use more compact deviceid table.
Submitted by:	Akinori Furukoshi
2010-07-11 23:54:44 +00:00
Andrew Thompson
75c7615952 Update for style(9).
Submitted by:	Akinori Furukoshi (author)
2010-07-11 23:52:12 +00:00
Rafal Jaworowski
d1d3233ebd Convert Freescale PowerPC platforms to FDT convention.
The following systems are affected:

  - MPC8555CDS
  - MPC8572DS

This overhaul covers the following major changes:

  - All integrated peripherals drivers for Freescale MPC85XX SoC, which are
    currently in the FreeBSD source tree are reworked and adjusted so they
    derive config data out of the device tree blob (instead of hard coded /
    tabelarized values).

  - This includes: LBC, PCI / PCI-Express, I2C, DS1553, OpenPIC, TSEC, SEC,
    QUICC, UART, CFI.

  - Thanks to the common FDT infrastrucutre (fdtbus, simplebus) we retire
    ocpbus(4) driver, which was based on hard-coded config data.

Note that world for these platforms has to be built WITH_FDT.

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
2010-07-11 21:08:29 +00:00
Rafal Jaworowski
c5a514a756 Provide more defines for PCI-Express device ctrl. 2010-07-11 20:55:39 +00:00
Rafal Jaworowski
da6bc8989d Introduce PowerPC-specific helper routines for FDT.
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
2010-07-11 20:49:36 +00:00
Rafal Jaworowski
caaa3c62d4 Save fdtbus trigger / polarity data at their correct index. 2010-07-11 20:33:39 +00:00
Rafal Jaworowski
a22cd1e668 Let simplebus(4) diagnostics be a bit more descriptive. 2010-07-11 20:30:59 +00:00
Weongyo Jeong
e7c6c10e16 Fixes a page fault in bwi_pci_probe() because the array isn't terminated
with NULL.

PR:		kern/148473
Submitted by:	Grzegorz Dabrowski <grzegorz.dabrowski at gmail dot com>
MFC after:	1 week
2010-07-10 22:37:23 +00:00
Weongyo Jeong
6dcc706bc5 Fixes a bug for LP PHY that some frames have 2 padding bytes at the
start so we should adjust the mbuf if the driver is running in PIO mode.
Now it should work well with WPA authentication and association for LP
PHY devices.

Tested by:	Warren Block <wblock at wonkity.com>
MFC after:	1 month
2010-07-10 21:39:03 +00:00
Alexander Motin
aecfe194a9 If ata_sata_phy_reset() failed and ata_generic_reset() is not called, mark
channel as having no devices connected. This improves hot-unplug operation
on legacy-emulating SATA controllers.
2010-07-10 15:36:27 +00:00
Alexander Motin
663c22a27d On attach, grab channel lock before setting up interrupt. This fixes crash
in ATA_CAM mode if phy connect event arrive before CAM bus initialization
completed.
2010-07-10 15:27:27 +00:00
Alexander Motin
9a9bce34f1 Make hw.ata.ata_dma_check_80pin tunable affect not only device side, but
also controller side cable checks. Make respective sysctl writable.

PR:		kern/143462
2010-07-10 13:46:14 +00:00
Pyun YongHyeon
2610dbf59b Some revision of Yukon controller generates corrupted frame when TX
checksum offloading is enabled.  The frame has a valid checksum
value so payload might be modified during TX checksum calculation.
Disable TX checksum offloading but give users chance to enable it
when they know their controller works without problems with TX
checksum offloading.

Reported by:	Andrzej Tobola <ato <> iem dot pw dot edu dot pl>
2010-07-09 21:21:08 +00:00
Xin LI
c8ed14e2d8 Don't use pack() for structures that is used purely for software state.
Otherwise the resulting, unaligned mutex structure would trigger panic.

Submitted by:		Tom Cough <tom.couch lsi.com>
Reported/Tested by:	jhb
MFC after:		3 days
2010-07-09 17:38:15 +00:00
Jack F Vogel
d6ff3d4d13 Fix of a VLAN problem by jhb, the checksum capability
got lost along the way.

MFC: asap
2010-07-09 17:11:29 +00:00
Navdeep Parhar
bd1a9fbad6 Improve cxgb(4)'s behaviour when faced with temporarily "bouncy" links:
- Run the adapter's tick at 1Hz and remove link state checks from it.
  Instead, have each port check its link state.  Delay the check so that
  it takes place slightly after the driver is notified of a change in
  link state.  This is a cheap way to debounce these notifications if
  many are received in rapid succession.  POLL_LINK_1ST_TIME flag can
  also be eliminated as a side effect of these changes.
- Do not reset the PHY when link goes down.
- Clear port's link_fault flag if the PHY indicates link is down.
- get_link_status_r should leave speed and duplex alone when link is down.

MFC after:	1 month
2010-07-09 00:38:00 +00:00
Navdeep Parhar
2c32b50248 Eliminate ext_intr_task. The "slow" interrupt handler is already
running on the adapter's task queue.  Just do what the task does
instead of enqueueing it.

MFC after:	3 days
2010-07-09 00:36:35 +00:00
Navdeep Parhar
29c54b85f9 Fix bufsize calculation so that cxgbtool can display information for the
last I/O queue too.

MFC after:	3 days
2010-07-09 00:35:09 +00:00
Pyun YongHyeon
78b1140644 Remove enabling RX checksum offloading in RX filter setup. RX
checksum is enabled in sge_init_locked().
While I'm here do not set RX checksum bits in RX descriptor
initialization. It is controller's job to set these bits.

Tested by:	xclin <xclin <> cs dot nctu dot edu dot tw >
2010-07-08 18:22:49 +00:00
Nathan Whitehorn
a26209a43a Missed a file in r209803: this header contains a definition of
OFW_STD_32BIT.

Pointy hat to:	me
2010-07-08 18:15:06 +00:00
Nathan Whitehorn
054e5dcbe4 Change the argument type to OF_call_method to take an array of cell_t
instead of unsigned longs to prepare for platforms where they are not
the same.
2010-07-08 14:29:23 +00:00
Nathan Whitehorn
517524ec87 Fix iicbus_get_addr() on 64-bit big-endian systems. The bus accessor
passes a uintptr_t, not a uint32_t.
2010-07-08 14:19:52 +00:00
Adrian Chadd
d273f00076 Extend the ath debugging a little to log the interface name.
Some devices have >1 atheros card and the current debug prints
make it impossible to tell which interface is being unhappy.
2010-07-08 14:08:03 +00:00
Konstantin Belousov
83d5d2963e Do not mention VM_ALLOC_RETRY in comment, and normalize the terminology
(blocking -> sleeping).

Reviewed by:	alc
MFC after:	3 days
2010-07-08 08:39:02 +00:00
Jung-uk Kim
3664686221 Fix mis-merges in the previous commit. 2010-07-06 21:41:08 +00:00
Jung-uk Kim
a88e22b7ad Merge ACPICA 20100702. 2010-07-06 20:57:28 +00:00
Konstantin Belousov
d12fc952b7 Calculate nshift only once.
Also noted by:	avg
MFC after:	1 week
2010-07-06 18:22:57 +00:00
Pyun YongHyeon
864104fe59 Zero entire status block and add missing bus_dmamap_sync(9). 2010-07-06 18:17:31 +00:00
Jung-uk Kim
061b7e5463 Plug a possible memory leak.
Submitted by:	Yamagi Burmeister (lists at yamagi dot org)
2010-07-06 18:08:55 +00:00
Jung-uk Kim
c3cbd4125e Fix a possible null pointer dereference. A patch for -STABLE was
Submitted by:	Yamagi Burmeister (lists at yamagi dot org)
2010-07-06 18:05:05 +00:00
Pyun YongHyeon
55a24a0597 It seems read DMA mode register requires both IPv4 TSO and IPv6 TSO
configuration to get IPv4 TSO work on BCM57780. While I'm here
apply the same fix to BCM5785 which shares similar hardware feature
of BCM57780. This change makes TSO work on BCM57780.

Tested by:	Tong Liu <nemoliu <> gmail dot com>
2010-07-06 02:07:59 +00:00
Warner Losh
2a08b0b7a1 Add a safety-belt. If the identified disk has 0 blocks, don't attach
it.  This can happen in some cases when plugging in SD/SmartCard PC
Cards with empty slots.  It is better to detect this bogosity, and
refuse to attach rather than panic with a division by zero (in one of
many places) down stream.
2010-07-04 07:42:52 +00:00
Warner Losh
907659f0dc Minor formatting nits. 2010-07-04 05:58:17 +00:00
Alexander Motin
7ce1f3e580 Add ata(4) ability to limit initial ATA mode for devices via device hints.
After boot this mode can be changed with atacontrol/camcontrol as usual.
It works for both legacy and ATA_CAM wrapper mode.

PR:		kern/123980
2010-07-03 14:14:42 +00:00
Kevin Lo
a02f351b57 Fix build 2010-07-01 05:03:24 +00:00
Jack F Vogel
b827058579 OK, I was a bit sleep this morning and checked in
the core changes but left out the shared code, lol.
Well, and a couple fixes to the core... hopefully
this will all be complete now.

Happy happy joy joy :)
2010-06-30 21:05:51 +00:00
Jack F Vogel
911fddbcb5 SR-IOV support added to igb
What this provides is support for the 'virtual function'
interface that a FreeBSD VM may be assigned from a host
like KVM on Linux, or newer versions of Xen with such
support.

When the guest is set up with the capability, a special
limited function 82576 PCI device is present in its virtual
PCI space, so with this driver installed in the guest that
device will be detected and function nearly like the bare
metal, as it were.

The interface is only allowed a single queue in this configuration
however initial performance tests have looked very good.

Enjoy!!
2010-06-30 17:26:47 +00:00
Jack F Vogel
17d2646b7c Left out header change in last delta - new member
in adapter so that advertise changes can be done
to one port without the other changing.
2010-06-30 16:28:28 +00:00