151427 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
Xin LI
50669a65c7 MFC r207247,r207283,207284:
- Add a signal handler for SIGINT which removes output file when necessary.
 - While I'm there, move unlink_input() slightly down to after closing the
   output file, in uncompression path.
 - Language improvements to make the BUGS section easier to read.
2010-05-10 02:07:57 +00:00
Ed Maste
510974559b MFC r207590:
Update GRANDPARENTED text to match the contents of tzdata/factory r19879.
  This eliminates "warning: time zone abbreviation differs from POSIX" on
  installworld.
2010-05-10 01:22:29 +00:00
Jilles Tjoelker
5189ddc04f MFC r207485: pathchk(1): Fix the example so it allows arbitrary pathnames.
Spaces and various other characters in pathnames are not passed through
literally by xargs in its default mode. Instead, use find . -exec ... {} +

Although the -- argument is not strictly required here, add it anyway to
avoid surprises when modifying the code to find -f -somedir ...
2010-05-09 19:32:37 +00:00
Jilles Tjoelker
32d8625838 MFC r207483: pathchk: Add the new POSIX -P option.
This option checks for empty pathnames and components starting with '-'.
Our -p option also checks for the latter, which remains the case.
2010-05-09 19:30:52 +00:00
Fabien Thomas
2a31f8e49e MFC r207731:
Exclude undefined symbol from ELF file when doing function resolve.
2010-05-09 15:39:49 +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
Doug Barton
ad14656b57 MFC 207346:
Fix named-checkconf in the situation where named_chroot_autoupdate
is NOT set, but named_chrootdir IS set.

Remove required_files for named.conf, named-checkconf is enough.
2010-05-08 22:24:01 +00:00
Doug Barton
5857a1b3a6 MFC r206686:
Make 'stop' work even if ${name}_enable is not set.
2010-05-08 21:18:22 +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
a19b488e19 MFC r207498:
Add -d and -f arguments to `camcontrol cmd`, to execute DMA ATA commands.
2010-05-08 13:12:52 +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
Jilles Tjoelker
f1ce4e8acf MFC r207449: telnet: Fix infinite loop if local output generates SIGPIPE.
Instead of catching SIGPIPE and jumping out of the signal handler with
longjmp, ignore it and handle write errors to the local output by exiting
from there. I have changed the error message to mention the local output
instead of NetBSD's wrong "Connection closed by foreign host". Write errors
to the network were already handled by exiting immediately and this now
applies to EPIPE too.

The code assumed that SIGPIPE could only be generated by the network
connection; if it was generated by the local output, it would longjmp out of
the signal handler and write an error message which caused another SIGPIPE.

PR:		19773
Obtained from:	NetBSD
2010-05-07 20:58:50 +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
4f135ef6f8 MFC r207447:
Marvell 88E8059(Yukon Optima) is now supported.
2010-05-06 18:52:59 +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
0fcc3770ff MFC r207381:
Now sge(4) supports hardware VLAN tag insertion/stripping.
2010-05-06 18:37:39 +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