Commit graph

20059 commits

Author SHA1 Message Date
Marius Strobl
931e615af7 MFC: r208349
Change ad_firmware_geom_adjust() to operate on a struct disk * only and
hook it up to ada(4) also. While at it, rename *ad_firmware_geom_adjust()
to *ata_disk_firmware_geom_adjust() etc now that these are no longer
limited to ad(4). This also allows to maintain a compatibility shim for
pc98_ad_firmware_geom_adjust() for the tier-1 PC98 in stable/8.

Reviewed by:	mav (r208349)
2010-05-23 16:16:33 +00:00
Alexander Motin
6488c6b3e9 MFC r208375, r208393:
Improve suspend/resume support. Make sure controller is idle on suspend
and reset it on resume.
2010-05-23 11:29:34 +00:00
Navdeep Parhar
35ba64bf95 MFC r208356.
Remove bad assertion.
2010-05-23 09:27:14 +00:00
Nathan Whitehorn
502a50e4eb MFC r208149,208285:
Add support for the U4 PCI-Express bridge chipset used in late-generation
Powermac G5 systems. MSI and several other things are not presently
supported.

The U3/U4 internal device support portions of this change were contributed
by Andreas Tobler.
2010-05-23 02:15:31 +00:00
Andrew Thompson
a24aaef782 MFC r208012
Support getting signed and unsigned HID data.

Submitted by:	Alex Deiter
2010-05-20 00:05:33 +00:00
Pyun YongHyeon
f37531017a MFC r208084:
If controller received bad frames make sure to update newly added
  RFA. Also drop frames that have either CRC error or alignment
  error. Normally bad frames are not received at all. But controllers
  running in promiscuous mode will receive bad frames. 82557 will
  also receive bad frames to receive VLAN oversized frames.

  While I'm here mark RNR condition if driver happen to see RNR in
  RFA status and restart RU to receive frames again. Because driver
  checks all received frames in RX loop, RNR condition could be set
  in the middle of RX processing. Just relying on RNR interrupt was
  not enough.

  This change fixes "Memory modified after free" issue when fxp(4)
  is running as a member of if_bridge(4).

  Tested by:	Larry Baird <lab <> gta dot com>
2010-05-19 21:08:38 +00:00
Pyun YongHyeon
71cfff63cb MFC r208081,208083:
r208081:
  Controller updates RFA via DMA so driver needs synchronization.
  Add missing BUS_DMASYNC_POSTWRITE and BUS_DMASYNC_PREREAD.

r208083:
  Dont' allow dma map load deferring. fxp(4) is not able to handle
  EINPROGRESS.
2010-05-19 20:56:18 +00:00
John Baldwin
b58dad48ea MFC 207335:
Initialize the callout structure earlier in attach before calling any
routines that can fail since ciss_free() always tries to stop and drain
the callout.
2010-05-19 19:43:49 +00:00
Alexander Motin
4567e8334a MFC r207536, r207696, r208183:
Import mvs(4) - Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA controllers
driver for CAM ATA subsystem. This driver supports same hardware as
atamarvell, ataadaptec and atamvsata drivers from ata(4), but provides
many additional features, such as NCQ, PMP, etc.
2010-05-19 14:50:07 +00:00
Bernhard Schmidt
a6d4f1ab38 MFC r207926:
Enable 5.5 and 11Mbit TX rates.

Reviewed by:	sam
Approved by:	rpaulo (mentor)
2010-05-18 17:43:53 +00:00
Marius Strobl
ed6b099ba7 MFC: r208117
Fix a mismerge in r206001 (MFC'ed to stable/8 in r206211).

PR:		146614
Approved by:	jfv (implicit)
2010-05-18 17:09:20 +00:00
Andrew Thompson
4e2a75d8af MFC r208019
Sync run(4) driver from author's site.
2010-05-17 23:51:57 +00:00
Andrew Thompson
0a22c89dd0 MFC r208018
Reduce diffs to p4.

  Add test code for delaying or failing usb control requests, disabled by
  default under ifdef USB_REQ_DEBUG.
2010-05-17 23:51:20 +00:00
Andrew Thompson
7ed2269651 MFC r208017
Fix possibly wrong bit masking.
2010-05-17 23:50:46 +00:00
Andrew Thompson
298c330015 MFC r208016
Add new FTDI USB device ID.
2010-05-17 23:50:10 +00:00
Andrew Thompson
4251e3198f MFC r208015
Increase the max ports to 12, 3G devices exist where the ppp endpoint is #9.
2010-05-17 23:49:31 +00:00
Andrew Thompson
6b264d7512 MFC r208014
Back out r203140 which was causing problems when the first and the last
 microframe slot was not in the smask. The problem was that the EHCI driver was
 then thinking that the transfer was immediately complete in some cases. Which
 could lead to freeze-like situations, which can be recovered by unplugging the
 USB device.
2010-05-17 23:48:51 +00:00
Andrew Thompson
f3619333d4 MFC r208013
Add missing ifdefs for usb power saving support.
2010-05-17 23:48:03 +00:00
Andrew Thompson
825c2e2677 MFC r208011
Add the ASUS MyPal A730W device id.
2010-05-17 23:47:24 +00:00
Andrew Thompson
948a9feb33 MFC r208010
Provide more information about the device location in the USB system.
2010-05-17 23:46:45 +00:00
Andrew Thompson
25e59d15b9 MFC r208009
Enable support for mouse panning wheels.
2010-05-17 23:46:08 +00:00
Andrew Thompson
51c097f122 MFC r208008
If a USB device is suspended and a USB set config request is issued when the
 USB enumeration lock is locked, then the USB stack fails to resume the device
 because locking the USB enumeration lock is part of the resume procedure. To
 solve this issue a new lock is introduced which only protects the suspend and
 resume callbacks, which can be dropped inside the usbd_do_request_flags()
 function, to allow suspend and resume during so-called enumeration operations.
2010-05-17 23:45:31 +00:00
Andrew Thompson
79e193fb18 MFC r208007
Staticise usb_ref_device and usb_unref_device.
2010-05-17 23:44:52 +00:00
Andrew Thompson
3bf0ccc8be MFC r208006
Add quirks for the Alcor SDCR_6362 Card Reader, Freecom HDD storage device and
 Samsung YP_U4 music player.

PR:		usb/145265, usb/146104
2010-05-17 23:44:18 +00:00
Andrew Thompson
199841d30c MFC r206638
Use the UIPROTO_BOOT_KEYBOARD #define from usb.h rather than a local
 (almost identically named) local #define.
2010-05-17 23:43:07 +00:00
Pyun YongHyeon
0fb00d128a MFC r207852:
SiS190 supports RX 10 bytes padding, CRC stripping as well as VLAN
  hardware tag insertion/stripping. Remove conditional code that
  disables these hardware features on SiS190. Also nuke RX fixup code
  which is no more required on strict-alignment architectures because
  SiS190 supports RX 10 bytes padding.
  Now all hardware features except jumbo frame and WOL are supported.
  Thanks to Masa Murayama who confirmed SiS190 also has the same
  hardware features of SiS191.
  I guess the only difference between SiS191 and SiS190 would be
  jumbo frame support. It will be implemented in near future.
2010-05-17 17:12:35 +00:00
Pyun YongHyeon
cfd81a4a1d MFC r207851:
Implement TSO and TSO over VLAN. Increase number of allowed
  fragmentation of mbuf chain to 32 from 16 because TSO can send 64KB
  sized packet which in turn requires long list of mbuf chain. Due to
  lack of documentation, I'm not sure whether driver have to pull up
  ethernet/IP/TCP header with options to make controller work but
  driver have to parse TCP header to update pseudo TCP checksum
  anyway. The controller expects pseudo TCP checksum computed by
  upper stack and the checksum should follow the MS NDIS
  specification to make TSO work.

  Tested by:	xclin <xclin <> cs dot nctu dot edu dot tw >
2010-05-17 17:02:42 +00:00
Pyun YongHyeon
14d379e521 MFC r207832:
Export hardware MAC statistics through sysctl node. Previously
  fxp(4) already used to extract most hardware MAC statistics but it
  didn't show them. With this change, all MAC statistics counters
  are exported. Because there are a couple of new counters for 82558
  and 82559, enable extended MAC statistics functionality to get
  these counters. Accoring to public data sheet, 82559 MAC statistics
  return 24 DWORD counters(3 counters are unknown at this moment) so
  increase MAC counter structure to meet the MAC statistics block size.
  The completion of MAC counter dump is now checked against
  FXP_STATS_DR_COMPLETE status code which is appended at the end of
  status block. Previously fxp(4) ignored the status of the
  FXP_SCB_COMMAND_CU_DUMPRESET command. fxp(4) does not wait for the
  completion of pending command before issuing
  FXP_SCB_COMMAND_CU_DUMPRESET. Instead it skips the command and try
  it next time. This scheme may show better performance but there is
  chance to loose updated counters after stopping controller. So make
  sure to update MAC statistics in fxp_stop().
  While I'm here move sysctl node creation to fxp_sysctl_node().

  Tested by:	Larry Baird < lab <> gta dot com >
2010-05-17 16:57:55 +00:00
Pyun YongHyeon
629403076a MFC r207750:
8255x configure command requires number of bytes of configuration
  table. The default size of the configuration table was 22 bytes. To
  use extended feature of 82550/82551 the configuration table size
  was expanded to 32 bytes. The added configuration for 82550/82551
  specifies VLAN hardware tagging and IPSec configuration as well as
  TCO.
  To make configuration easier fxp(4) used a configuration template
  and the template was copied to configuration table. After that,
  some parameters of the configuration table was changed depending on
  controller type and operation mode. However the size of template
  was 22 bytes so some configuration parameters were not properly
  initialized on 82550/82551.
  Fix this by increasing the template size. For 82557, 82558 and
  82559 the size of the configuration is still 22 bytes.
2010-05-17 16:47:25 +00:00
Jack F Vogel
70defa90ed Missing fix in lem code to limit WOL to MAGIC,
and made code backward compatible to 7.3 with
conditionals around the buf_ring_free call.
2010-05-14 22:20:58 +00:00
Marius Strobl
331316e3a9 MFC: r207885
Include <machine/ofw_machdep.h> for OF_getscsinitid().
2010-05-14 19:18:07 +00:00
Marius Strobl
b3b31bee14 MFC: r207585
- Don't set CAS_PCS_DATAPATH to anything except CAS_PCS_DATAPATH_SERDES
  on Cassini using the external PCS SERDES otherwise unaligned access
  traps and other strange effects happen with some machines. Don't touch
  the MIF which is unused in that case either. These changes require the
  PHY type to use to be determined via the OFW device tree or from the
  VPD in machines without the former.
- Disable the SERDES pins of Saturn when not used in order to save power
  and ensure they are enabled otherwise.
- In cas_attach() use the correct register offset for CAS_PCS_CONF_EN.
- Add some bus space barriers missing in the PCS code path.

These changes make the Sun GigaSwift Ethernet 1.0 MMF cards as well as
the on-board interfaces found in Sun Fire B100s Blade Server work.

PR:	144867
2010-05-14 19:11:41 +00:00
Navdeep Parhar
63ae3fec8b MFC r207639, r207643, r207687, r207688
r207639: Add IFCAP_LINKSTATE to cxgb
r207643: T3 hardware filters + cxgbtool interface to this functionality.
r207687: if_cxgb should not depend on the T3 firmware module directly.
r207688: various doorbell adjustments
2010-05-13 17:45:32 +00:00
Pyun YongHyeon
afe8083a9d MFC r207763:
Don't change PCIe maximum read request size to 2048 on RTL810x
  controllers. It caused device timeouts.

  Reported by:	McLone < mclone <> gmail dot com >
  Tested by:	McLone < mclone <> gmail dot com >
2010-05-12 17:18:07 +00:00
Pyun YongHyeon
f1702973fc MFC r207748:
It seems controller has two types of promiscuous control, one for
  unicast and the other for multicast. To receive multicast frames
  that host didn't join in promiscuous mode, driver have to set
  promiscuous mode for multicast frames as well.
  The Open Source Software Developer Manual for i8255x was not clear
  how to handle promiscuous mode.

  PR:		kern/145905
2010-05-12 17:07:19 +00:00
Bernhard Schmidt
19e9dc44f7 MFC r207709:
Add a workaround for a bug in the firmware regarding the transition
from passive to active scans. Basicly disable it by increasing the
amount packets to be received to an amount which can't be reached
during dwell times.

Approved by:	rpaulo (mentor)
2010-05-11 17:21:54 +00:00
Rui Paulo
82878b1182 MFC r206367, r206358, r206370, r206371, r206372, r206398, r206415,
r206416, r206417, r206418, r206418:

net80211 ratectl framework.
2010-05-11 11:08:15 +00:00
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
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
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
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
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
Alexander Motin
c200853a4b MFC r207511:
Enable PCI busmastering explicitly to be sure.
2010-05-08 16:10:54 +00:00