75390 Commits

Author SHA1 Message Date
Marius Strobl
d526c88ff1 MFC: r207570
On sparc64 obtain the initiator ID from the Open Firmware device tree
in order to match what the PROM built-in driver uses.
2010-05-10 20:34:16 +00:00
Marius Strobl
f02c4538bc MFC: r207537
Add support for SPARC64 V (and where it already makes sense for other
HAL/Fujitsu) CPUs. For the most part this consists of fleshing out the
MMU and cache handling, it doesn't add pmap optimizations possible with
these CPU, yet, though.
With these changes FreeBSD runs stable on Fujitsu Siemens PRIMEPOWER 250
and likely also other models based on SPARC64 V like 450, 650 and 850.
Thanks go to Michael Moll for providing access to a PRIMEPOWER 250.
2010-05-10 20:25:51 +00:00
Marius Strobl
7b2587b9ea MFC: r207533 (partial)
Remove redundant checking of sc_leaving (uart_intr() already handles this).
2010-05-10 20:15:39 +00:00
Marius Strobl
fe353091cd MFC: r207532
Remove a soft member which was never used.
2010-05-10 20:10:45 +00:00
Pyun YongHyeon
4dd3847da5 MFC r207622-207623,207638
r207622:
  Drop driver lock before exiting from interrupt handler.

r207623:
  Make sure to check whether driver is running before processing
  received frames. Also check driver has valid ifp pointer before
  calling msk_stop() in device_shutdown handler. While I'm here
  remove unnecessary accesses to interrupt mask registers in
  device_shutdown handler because driver puts the controller into
  reset state.
  With these changes, msk(4) now survive from heavy RX traffic(1byte
  UDP frame) while reboot is in progress.

r207638:
  When VLAN hardware tagging is disabled, make sure to disable VLAN
  checksum offloading as well as TSO over VLAN.
2010-05-10 20:01:51 +00:00
Pyun YongHyeon
862e7d9d59 MFC r207628,207635:
r207628:
  Enable multi-descriptor transmisstion for fragmented mbufs. There
  is no more need to defragment mbufs. After transmitting the
  multi-fragmented frame, the controller updates only the first
  descriptor of multi-descriptor transmission so it's driver's
  responsibility to clear OWN bits of remaining descriptor of
  multi-descriptor transmission. It seems the controller behaves much
  like jme(4) controllers in descriptor handling.

r207635:
  Free entire mbuf chain instead of the first mbuf.
2010-05-10 19:47:37 +00:00
Jung-uk Kim
c4879659eb MFC: r207330, r207620
- Remove dead code.  Calculated greatest common divisor was not used at all.
- Prefer u_int32_t over unsigned int to make its intention more clearer.
- Move the function to a header file and make it a static inline function.
2010-05-10 19:21:50 +00:00
Marius Strobl
88b965f3c8 MFC: r207500
Add a hack for SPARC64 V CPUs, which set some undocumented bits in the
first data word.
2010-05-10 19:02:21 +00:00
Marius Strobl
b1aecaf73f MFC: r207287
On sparc64 obtain the initiator ID to be used for SPI HBAs from the
Open Firmware device tree in order to match what the PROM built-in
driver uses. This is especially important when netbooting Fujitsu
Siemens PRIMEPOWER250 as in that case the built-in driver isn't used
and the port facts PortSCSIID defaults to 0, conflicting with the
disk at the same address.
2010-05-10 18:56:36 +00:00
Marius Strobl
2322c15734 MFC: r207286
Replace a magic value with the appropriate macro.
2010-05-10 18:54:58 +00:00
Marius Strobl
b867320bf3 MFC: r207285
- On sparc64 obtain the initiator ID from the Open Firmware device tree
  in order to match what the PROM built-in driver uses.
- Remove some no longer used includes.
2010-05-10 18:53:32 +00:00
Marius Strobl
07805b83b9 MFC: r207281
Take advantage of OF_getscsinitid().
2010-05-10 18:51:49 +00:00
Marius Strobl
08e6036848 MFC: r207248
Don't bother enabling interrupts before we're ready to handle them. This
prevents the firmware of Fujitsu Siemens PRIMEPOWER250, which both causes
stray interrupts and erroneously enables interrupts at least when calling
SUNW,set-trap-table, from shooting itself in the foot.
2010-05-10 18:50:26 +00:00
Marius Strobl
7a735d2d1a MFC: r207243
Add OF_getscsinitid(), a helper similar to OF_getetheraddr() but for
obtaining the initiator ID to be used for SPI controllers from the
Open Firmware device tree.
2010-05-10 18:47:52 +00:00
Marius Strobl
1ffc8e33a9 MFC: r207242
For the on-board interfaces found in Fujitsu SPARC64 machines obtain the
MAC address via OFW as well.
2010-05-10 18:46:37 +00:00
Marius Strobl
774febca3d MFC: r207241
- Add a missing const.
- Map the NS16550 found in Fujitsu Siemens PRIMEPOWER250 to PNP0501 as well.
2010-05-10 18:45:18 +00:00
Marius Strobl
e6adfc17ca MFC: r207240
Skip the pseudo-devices found in Fujitsu Siemens PRIMEPOWER250.
2010-05-10 18:41:27 +00:00
Pyun YongHyeon
143f0c7b6d MFC r207545,207625:
r207545:
  Fix wrong dma tag usage. Previously it used TX descriptor ring dma
  tag which should be TX mbuf dma tag.

r207625:
  Remove clearing RxHashTable2 register. The register is reprogrammed
  in sge_rxfilter().
2010-05-10 18:37:46 +00:00
Konstantin Belousov
70020ca01e MFC r207580:
Handle busy status of the page in a way expected for pager_getpage().
Flush requested page, unbusy other pages, do not clear m->busy.
2010-05-10 11:50:26 +00:00
Konstantin Belousov
23dfb3511d MFC r207195:
Provide compat32 shims for bpf(4), except zero-copy facilities.
2010-05-09 12:36:51 +00:00
Konstantin Belousov
b0af835660 MFC r207194:
Provide 32bit compat shims for sysctl net.route NET_RT_IFLIST.
2010-05-09 12:34:20 +00:00
Konstantin Belousov
43042bbaf1 MFC r207363:
Remove caddr_t casts.
2010-05-09 12:32:10 +00:00
Konstantin Belousov
19effccdee MFC r204051 (by imp):
n64 has a different size for KINFO_PROC_SIZE.

Approved by:	imp

MFC r207152:
Move the constants specifying the size of struct kinfo_proc into
machine-specific header files. Add KINFO_PROC32_SIZE for struct
kinfo_proc32 for architectures providing COMPAT_FREEBSD32. Add
CTASSERT for the size of struct kinfo_proc32.

MFC r207269:
Style: use #define<TAB> instead of #define<SPACE>.
2010-05-08 18:54:47 +00:00
Alexander Motin
c200853a4b MFC r207511:
Enable PCI busmastering explicitly to be sure.
2010-05-08 16:10:54 +00:00
Alexander Motin
967b11e3ef MFC r207499:
Make SATA XPT negotiate and enable some additional SATA features, such as:
 - device initiated power management (some devices support only this way);
 - Automatic Partial to Slumber Transition (more power saving);
 - DMA auto-activation (expected to slightly improve performance).
More features could be added later, when hardware supports.
2010-05-08 16:06:54 +00:00
Alexander Motin
6cd4144f88 MFC r207433:
Revert r198705.
As scottl@ noticed, max_target/max_lun was intended to be only a hint for
existing bus scanner. Some FC/SAS SIMs report fake values there, that are
smaller then maximum supported IDs. In that case this check makes impossible
manual scan outside hinted range.

For ATA/SATA SIMs respective check was instead implemented at SIM level.
Newer SCSI SIMs expected to have these checks at driver or firmware level.
Some older SCSI SIMs have no this check and the issues will get back there.
2010-05-08 13:09:36 +00:00
Alexander Motin
16dd0aa252 MFC r207432:
Add Target/LUN ID checks.
2010-05-08 13:07:50 +00:00
Alexander Motin
6e2b58a6e8 MFC r207431:
Add Target/LUN ID checks and deny access to targets 1-14 when PMP absent.
2010-05-08 13:05:27 +00:00
Alexander Motin
57a1dc2264 MFC r207430:
Add Target/LUN ID checks and deny access to targets 1-14 when PMP absent.
Enforce PMA bit clearing when PMP detached to avoid further scan timeouts.
2010-05-08 13:02:52 +00:00
Alexander Motin
78e93514f4 MFC r207428:
Report PMP absence using target 15, same as for precence (not a wildcard),
to not confuse target ID checks at SIMs.
2010-05-08 12:58:22 +00:00
Konstantin Belousov
5d3f8936f8 MFC r207463:
Remove debugging code that was not used once since commit.
2010-05-08 12:40:38 +00:00
Michael Tuexen
0bd5a0aeb4 MFC 206758, 206840, 206891, 206892, 207099, 207191, 207197
* Fix a bug where SACKs are not sent when they should.
* Get delayed SACK working again.
* Really print the nr_mapping array when it should be printed.
* Update highest_tsn variables when sliding mapping arrays.
* Sending a FWDTSN chunk should not affect the retran count.
* Cleanups.
2010-05-07 20:02:36 +00:00
Konstantin Belousov
bb45d7918d MFC r207606:
Fix typo in comment.
2010-05-07 11:11:58 +00:00
Pyun YongHyeon
50e9463eb2 MFC r207446:
Add Marvell PHYG65G Gigabit PHY which is found on 88E8059 Yukon Optima.

  Tested by:	James LaLagna < jameslalagna <> gmail dot com >
2010-05-06 18:50:23 +00:00
Pyun YongHyeon
0deeb1ec10 MFC r207445:
Add basic support for Marvell 88E8059 Yukon Optima.

  Tested by:	James LaLagna < jameslalagna <> gmail dot com >
2010-05-06 18:47:16 +00:00
Pyun YongHyeon
6c3a42ef44 MFC r207409,207442:
r207409:
  Both RX_GMF_LP_THR and RX_GMF_UP_THR must be 16 bits register. If
  it is 8bits register then RX FIFO size can't exceed 2KB which is
  not true for almost all Yukon II controller.

r207442:
  Disable non-ASF packet flushing on Yukon Extreme as vendor's driver
  does. Without this change, Yukon Extreme seems to generate lots of
  RX FIFO overruns even though controller has available RX buffers.
  These excessive RX FIFO overruns generated lots of pause frames
  which in turn killed devices plugged into switch. It seems there is
  still occasional RX frame corruption on Yukon Extreme but this
  change seems to fix the pause frame storm.

  Reported by:	jhb
  Tested by:	jhb
2010-05-06 18:43:00 +00:00
Pyun YongHyeon
854e8c0af1 MFC r207380:
Enable VLAN hardware tag insertion/stripping. Due to lack of SiS190
  controller, I'm not sure whether this is also applicable to SiS190
  so this feature is only activated on SiS191 controller.
  In theory, controller reinitialization is not needed when VLAN tag
  configuration is changed, but xclin said controller was not stable
  whenever toggling VLAN tag bit. To address that, sge(4)
  reinitialize controller for VLAN configuration which seems to work
  as expected. VLAN tag information for TX/RX descriptor and
  configure bit of RxMacControl register was found by xclin.

  Submitted by:	xclin <xclin <> cs dot nctu dot edu dot tw > (initial version)
  Tested by:	xclin <xclin <> cs dot nctu dot edu dot tw >
2010-05-06 18:34:15 +00:00
Pyun YongHyeon
c033f53b7e MFC r207379:
Enable FCS stripping and padding 10 bytes bit of RX MAC control
  register. Due to lack of SiS190 controller, I'm not sure whether
  this is also applicable to SiS190 so this feature is only activated
  on SiS191 controller.
  The controller can pad 10 bytes before DMAing a received frame to
  RX buffer and received bytes include the padded bytes. This padding
  is very useful on strict-alignment architectures because driver
  does not have to copy received frame to align IP header on 4 bytes
  boundary. It also gives better RX performance on non-strict
  alignment architectures. Special thanks to xclin to give me
  valuable register information. Without his enthusiastic trial and
  errors this wouldn't be even possible.

  While I'm here tighten validity check of received frame. Controller
  clears RDS_CRCOK bit when it received bad CRC frames. xclin found
  that using loop back testing.

  Tested by:	xclin <xclin <> cs dot nctu dot edu dot tw >
2010-05-06 18:30:46 +00:00
Pyun YongHyeon
ac61735c1d MFC r207375-207377.
r207375:
  Preserve unknown bits of RX MAC control register when driver
  programs RX filter configuration. It seems RX MAC control register
  is one of key registers to get various offloading features as well
  as performance. Blindly clearing unrelated bits can result in
  unexpected results.

  Tested by:    xclin <xclin <> cs dot nctu dot edu dot tw >

r207376:
  Remove wrong link state chage.

r207377:
  Explicitly marks SiS190 to differentiate it from SiS191.
2010-05-06 18:17:36 +00:00
Marko Zec
eeb631840d MFC r207572:
When destroying a vnet, shut down all netgraph nodes tied to that vnet
  before proceeding with dismantling other protocol domains.

  This change only affects options VIMAGE builds.

  Reviewed by:  julian, bz
2010-05-06 09:54:01 +00:00
Marko Zec
ee17e64f2c MFC r207475:
Remove a redundant variable assignment.

  Reviewed by:  bz, rwatson
2010-05-06 09:52:32 +00:00
Bjoern A. Zeeb
480d7c6c41 MFC r207369:
MFP4: @176978-176982, 176984, 176990-176994, 177441

  "Whitspace" churn after the VIMAGE/VNET whirls.

  Remove the need for some "init" functions within the network
  stack, like pim6_init(), icmp_init() or significantly shorten
  others like ip6_init() and nd6_init(), using static initialization
  again where possible and formerly missed.

  Move (most) variables back to the place they used to be before the
  container structs and VIMAGE_GLOABLS (before r185088) and try to
  reduce the diff to stable/7 and earlier as good as possible,
  to help out-of-tree consumers to update from 6.x or 7.x to 8 or 9.

  This also removes some header file pollution for putatively
  static global variables.

  Revert VIMAGE specific changes in ipfilter::ip_auth.c, that are
  no longer needed.

  Reviewed by:	jhb
  Discussed with:	rwatson
  Sponsored by:	The FreeBSD Foundation
  Sponsored by:	CK Software GmbH
2010-05-06 06:44:19 +00:00
Konstantin Belousov
d4b0face18 MFC r207570:
Style and comment adjustements.
2010-05-06 04:57:10 +00:00
Rick Macklem
175abb7ed7 MFC: r207350
For the experimental NFS client, it should always flush dirty
buffers before closing the NFSv4 opens, as the comment states.
This patch deletes the call to nfscl_mustflush() which would
return 0 for the case where a delegation still exists, which
was incorrect and could cause crashes during recovery from
an expired lease.
2010-05-06 01:08:36 +00:00
Rick Macklem
5783c9fe30 MFC: r207349
Delete a diagnostic statement that is no longer useful from
the experimental NFS client.
2010-05-06 00:49:10 +00:00
Alexander Motin
5d86e524cf MFC r207282:
Update device identify data and serial number when device change detected.
Reprobe immediately following this should have fresh data.
2010-05-05 05:18:08 +00:00
Alexander Motin
79206e9340 MFC r207490:
Add xpt_schedule_dev_sendq() call, lost at r203108. It is not needed in
usual operation, but required in some conditions to make queue running
after being shrinked.
2010-05-05 05:11:12 +00:00
Andrew Thompson
ba752236ec MFC r201797
Remove unused uhci_dump_qhs().
2010-05-04 21:16:01 +00:00
Martin Matuska
8d0dcb5513 MFC r207480:
Change description of tunable group vfs.zfs.txg to be more
understandable.

Approved by:    pjd, delphij (mentor)
2010-05-04 08:37:28 +00:00
Konstantin Belousov
22df1496d2 MFC r206894:
The cache_enter(9) function shall not be called for doomed dvp.
Assert this.

Verify that dvp is not reclaimed before calling cache_enter().
2010-05-04 05:25:48 +00:00