Commit Graph

18732 Commits

Author SHA1 Message Date
John Baldwin
ea66717737 Move the code to update cpu_cx_count out of acpi_cpu_generic_cx_probe() and
into acpi_cpu_startup() which is where all the other code to update this
global variable lives.  This fixes a bug where cpu_cx_count was not updated
correctly if acpi_cpu_generic_cx_probe() returned early.

PR:		kern/108581
Debugged by:	Bruce Cran
Reviewed by:	avg, njl, sepotvin
MFC after:	3 days
2009-03-26 21:10:35 +00:00
Warner Losh
ba32f0ff83 Allow the attach routine to fail gracefully and not panic the system. 2009-03-26 17:36:19 +00:00
Doug Ambrisko
d2b2128a28 Add stuff to support upcoming BMC/IPMI flashing of newer Dell machine
via the Linux tool.
     -  Add Linux shim to ipmi(4)
     -  Create a partitions file to linprocfs to make Linux fdisk see
        disks.  This file is dynamic so we can see disks come and go.
     -  Convert msdosfs to vfat in mtab since Linux uses that for
        msdosfs.
     -  In the Linux mount path convert vfat passed in to msdosfs
        so Linux mount works on FreeBSD.  Note that tasting works
        so that if da0 is a msdos file system
                /compat/linux/bin/mount /dev/da0 /mnt
        works.
     -  fix a 64it bug for l_off_t.
Grabing sh, mount, fdisk, df from Linux, creating a symlink of mtab to
/compat/linux/etc/mtab and then some careful unpacking of the Linux bmc
update tool and hacking makes it work on newer Dell boxes.  Note, probably
if you can't figure out how to do this, then you probably shouldn't be
doing it :-)
2009-03-26 17:14:22 +00:00
Robert Noland
b0f6d6b6bb Fix up waiting on vblank again... This reverts a last minute change that
I made on the last patch, it seems to upset suspend/resume and shutdown.

MFC after:	3 days
2009-03-26 02:10:18 +00:00
Warner Losh
7f01d0bfcd Tweak comments. 2009-03-25 22:21:53 +00:00
Warner Losh
7bd7880964 Add RIOS PCCARD 3. 2009-03-25 22:21:38 +00:00
Warner Losh
a47bf9d7df RIOS Systems co was naughty and used a 'random' id. Use it with the
PCCARD3 name to describe the RIOS PC Card III Ethernet that I have.
2009-03-25 22:20:36 +00:00
Warner Losh
f066fc09ea It appears that the TDK LAK CD011 works with fe driver. I don't have
a dongle for the card, but it passes the sanity testsin the
probe/attach routines and returns the correct MAC address.
2009-03-25 22:12:07 +00:00
Warner Losh
a8eaa9a1b4 Another akihabra find: Mitsubishi B8895. 2009-03-25 07:26:24 +00:00
Pyun YongHyeon
79dd979a7d Fix typo. 2009-03-25 07:05:23 +00:00
Xin LI
d8d1cb5b8f Use __packed from cdefs.h
Submitted by:	pyunyh
Reviewed by:	Shaowei WANG <wsw1wsw2 gmail com>
MFC after:	2 weeks
2009-03-25 06:27:56 +00:00
Robert Noland
24c6d24b27 Rework the management of vblank interrupts a bit.
When a vt switch occurs the irq handler is uninstalled.  Interrupts
and the state tracking of what was enabled/disabled wasn't working
properly.  This should resolve the reports of "slow windows" after a
vt switch, among other things.  The radeon 2d driver seems to work a
bit more correctly than the Intel driver.  With the Intel driver,
vblank interrupts will be enabled at system startup and will only
be disabled after an additional modeset (vt switch, dpms, randr event).

With this patch, I am able to run glxgears synced to vblank and
vt switch while it is running without ill effects.

MFC after:	3 days
2009-03-25 01:50:56 +00:00
Robert Noland
a13575a303 Intel handled the management of the breadcrumb counter inconsistently.
Make sure that we always handle it the same way.

MFC after:	3 days
2009-03-25 01:44:16 +00:00
Robert Noland
eccb3bb8f6 The GART allocations are a propery of the gart, not of scatter-gather
memory.  Track them in the appropriate structure.

MFC after:	3 days
2009-03-25 01:41:56 +00:00
Xin LI
e88ad97fcd Use __attribute__((packed)) for the structure so that hptiop management
utility would work.

Submitted by:	Shaowei WANG <wsw1wsw2 gmail com>
MFC after:	2 weeks
2009-03-25 00:57:09 +00:00
Weongyo Jeong
c4f82f895d set NULL after free to avoid duplicate free.
Tested by:	Ganbold <ganbold_at_micom.mng.net>
2009-03-24 04:20:17 +00:00
Sam Leffler
aa28501a67 fix build w/ AH_DEBUG 2009-03-24 00:09:35 +00:00
Juli Mallett
1b344bf7d7 Remove gratuitous unlock in error case.
Reviewed by:	sam
2009-03-24 00:08:58 +00:00
Jung-uk Kim
0755473ba2 Add a function to reset system time after resuming, which will be used
by amd64 shortly.  It can be turned off by setting "debug.acpi.reset_clock"
tunable to zero.
2009-03-23 22:12:33 +00:00
Jung-uk Kim
d42f0ad883 Check whether devd is running before calling resume notifier and
reshuffle code to reduce unnecessary locking coverage.
2009-03-23 22:06:09 +00:00
George V. Neville-Neil
0c1ff9c605 Minor updates to the Chelsio driver, including removing an LOR.
Submitted by:	Navdeep Parhar at Chelsio
Reviewed by:	gnn
MFC after: 	3 weeks
2009-03-23 19:58:26 +00:00
John Baldwin
f7c701d528 Reenable 64-bit DMA for twa(4) controllers, but use a boundary of 4GB to
prevent individual transactions from crossing a 4GB address boundary.  Due
to bus_size_t type limitations, the driver uses a 2GB boundary in PAE
kernels.

Reviewed by:	scottl
MFC after:	1 week
2009-03-23 19:27:23 +00:00
Andrew Thompson
91f72cedda Fix order of debug printf items, addr and config# were swapped. 2009-03-23 19:10:38 +00:00
John Baldwin
1241692334 Release driver lock at the end of the watchdog routine instead of trying to
acquire it again.

Submitted by:	bland
MFC after:	3 days
2009-03-23 17:51:07 +00:00
Marius Strobl
c9ffd9f058 - Ensure that INTx isn't disabled, as these chips apparently have a
quirk requiring it to be enabled even when using MSI. This makes
  the latter work again after r189285.
- Remove a comment which no longer applies since r190194.
2009-03-23 14:36:50 +00:00
Pyun YongHyeon
6d6588a152 Togging ALLMULTI does not require controller reset so have Rx
filtering handle this. Introduce a new function msk_rxfilter that
handles Rx filter configuration and multicast setup as well as
promiscuous mode. This simplifies code a lot.
Promiscuous mode always have preference to any other Rx
filtering so don't disable the mode when ALLMULTI is set.
2009-03-23 05:46:28 +00:00
Alexander Kabaev
62a5f39429 Do not pass uninitialized data buffer to devctl_queue_data function.
This was botched in revision 190191.
2009-03-23 01:24:17 +00:00
Pyun YongHyeon
df284b3c3a Fix inversed logic. pci_find_extcap() returns 0 when it finds
specified capability.
2009-03-23 00:27:46 +00:00
Robert Noland
746871c800 Fix up the flags to bus_dmamem again. The man page incorrectly showed
the BUS_DMA_NOCACHE flags as being a valid flag for load instead of alloc.

Discussed with:	kib
MFC after:	3 days
2009-03-22 20:58:29 +00:00
Andrew Thompson
2989a67790 Set the endpoint on the preallocated fifo so it doesnt get matched as an
endpoint fifo.

Reported by:	Pieter de Goeje
2009-03-22 17:09:56 +00:00
Warner Losh
e952f9cf75 NO_INQUIRY is wrong for this device. Alternatively, if it is right,
it is right for only a tiny fraction of these devices and this
wild-card entry is too broad.

# I run a kernel without this entry at all without ill effects...
2009-03-22 13:17:46 +00:00
Andrew Thompson
cba3049682 Improve debugging output around ioctls. 2009-03-22 04:19:36 +00:00
George V. Neville-Neil
6b6e256ae1 Fix a bug in the recent update to the Chelsio driver.
The tick routine was not being restarted in the init_locked routine
which could resulted in loss of carrier when updating the MTU.

Submitted by:	Navdeep Parhar at Chelsio
MFC after:	3 weeks
2009-03-21 17:09:00 +00:00
Andrew Thompson
96a7948cf6 Revert r190173 as it breaks 64bit arches. 2009-03-21 05:44:22 +00:00
Marius Strobl
4f09c4c7e5 - In bge_ifmedia_upd_locked() take advantrage of LIST_FOREACH().
- If boot verbose, print asicrev, chiprev and bus type on attach.
- For PCI Express devices:
  1) Adjust max read request size to 4Kbytes
  2) Turn on FIFO_LONG_BURST in RDMA during bge_blockinit()
  Though 1) does not seem to have much to do with the poor TX performance
  observed on PCI Express bge(4), 2) does fix the problem. [1]
- Nuke the RX CPU self-diag, which prevents working cards from working
  (Linux tg3 does not have this diag neither does OpenBSD's bge(4)).
  The increasing of the firmware handshaking timeout to 20000 retries
  done as part of the original commit isn't merged as way already have a
  way higher BGE_TIMEOUT of 100000.

PR:		119361 [1]
Obtained from:	tg3 via DragonflyBSD [1], DragonflyBSD
2009-03-21 00:23:07 +00:00
Andrew Thompson
8755859a43 Fix compile with USB_HAVE_BUSDMA/USB_HAVE_UGEN/USB_HAVE_STRINGS.
Submitted by:	Hans Petter Selasky
2009-03-20 23:12:14 +00:00
Andrew Thompson
d891ddcaea Add umass quirk.
PR:			usb/132799
Reported by:		Yoshihiro Ota
Submitted by:		Hans Petter Selasky
2009-03-20 22:17:27 +00:00
Andrew Thompson
01cf783140 MFp4 //depot/projects/usb @159423, 159497
- Return a Zero Length packet on read errors.
- Allow for smaller buffer size.

Submitted by:	Hans Petter Selasky
2009-03-20 22:15:22 +00:00
Andrew Thompson
80536a485c MFp4 //depot/projects/usb@159446
Remove unused and depreciated function: usb2_get_devid().

Submitted by:	Hans Petter Selasky
2009-03-20 22:12:15 +00:00
Andrew Thompson
090f65a6f6 MFp4 //depot/projects/usb@159517
Fix warnings with the IAR compiler.

Submitted by:	Hans Petter Selasky
2009-03-20 22:10:36 +00:00
Andrew Thompson
bafdb74c0b MFp4 //depot/projects/usb
Sync usb_core.h after header changes.

Submitted by:	Hans Petter Selasky
2009-03-20 22:04:33 +00:00
Andrew Thompson
e1ccac965c MFp4 //depot/projects/usb @159479,159502,159516,159522,159529
Workaround for buggy USB hardware not handling new SETUP packet before STATUS
stage is complete, this allows xfers to endpoint0 to return a short frame.

Submitted by: Hans Petter Selasky
Reported by:  me
2009-03-20 22:01:45 +00:00
Andrew Thompson
0f7d454847 MFp4 //depot/projects/usb @159479,159502,159516,159522,159529
Workaround for buggy USB hardware not handling new SETUP packet before STATUS
stage is complete, this allows xfers to endpoint0 to return a short frame.

Submitted by:	Hans Petter Selasky
Reported by:	me
2009-03-20 21:57:54 +00:00
Andrew Thompson
578d0eff90 MFp4 //depot/projects/usb @159431,159437,159438
- start using the new USB typedefs in the USB core
- Remove usage of USB_ADD_BYTES()

Submitted by:	Hans Petter Selasky
2009-03-20 21:50:54 +00:00
Andrew Thompson
bdc081c60f MFp4 //depot/projects/usb@159392
Add ifdefs for making parts of usb conditional.

Submitted by:	Hans Petter Selasky
2009-03-20 21:48:11 +00:00
Andrew Thompson
ab42e8b2df MFp4 //depot/projects/usb @159430
- Move tunable defines into usb_core.h and dependancy towards usb_defs.h
- Leave hardcoded defines in "usb_defs.h".
- Allow overriding all tunable defines.
- Add more customisable typedefs.
- Correct maximum device number.

Submitted by:	Hans Petter Selasky
2009-03-20 19:04:31 +00:00
Andrew Thompson
c629193176 MFp4 //depot/projects/usb @159379,159380
Fixes for 8-bit and 16-bit compilation.

Submitted by:	Hans Petter Selasky
2009-03-20 18:59:53 +00:00
Andrew Thompson
296ade6016 MFp4 //depot/projects/usb @159375,159376,159377
Further remove dependancy towards Giant.

Submitted by:	Hans Petter Selasky
2009-03-20 18:56:27 +00:00
Robert Noland
a80ca4341a vm_offset_t is unsigned, so compare of >= 0 is not needed.
Found with:	Coverity Prevent(tm)
CID:		2259

MFC after:	3 days
2009-03-20 18:35:16 +00:00
Robert Noland
45d0290a5d vm_offset_t is unsigned and therefore can not be negative.
Avoid unnessecary compares.

Found with:	Coverity Prevent(tm)
CID:		2362,4215,4214,4209,4208,2363,4211,4210,4213,4212

MFC after:	3 days
2009-03-20 18:30:20 +00:00